@sx-bet/sportx-js
Version:
Provides an easy to use API to interact with the SportX relayer.
99 lines • 4.46 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenDecimalMapping = exports.RELAYER_HTTP_ENDPOINTS = exports.EIP712_FILL_HASHER_ADDRESSES = exports.FILL_ORDER_ADDRESS = exports.TOKEN_ADDRESSES = exports.CHAIN_IDS = exports.EIP712_VERSION = exports.TOKEN_TRANSFER_PROXY_ADDRESS = exports.DEFAULT_RPC_URLS = exports.RELAYER_URLS = exports.Tokens = exports.Environments = exports.Networks = exports.FRACTION_DENOMINATOR = exports.PERCENTAGE_PRECISION_EXPONENT = exports.RELAYER_TIMEOUT = void 0;
const bignumber_1 = require("@ethersproject/bignumber");
exports.RELAYER_TIMEOUT = 10000;
exports.PERCENTAGE_PRECISION_EXPONENT = 20;
exports.FRACTION_DENOMINATOR = bignumber_1.BigNumber.from(10).pow(exports.PERCENTAGE_PRECISION_EXPONENT);
var Networks;
(function (Networks) {
Networks["SX_TORONTO"] = "sx-toronto";
Networks["SX_MAINNET"] = "sx-mainnet";
})(Networks = exports.Networks || (exports.Networks = {}));
var Environments;
(function (Environments) {
Environments["SxToronto"] = "toronto";
Environments["SxStage"] = "stage";
Environments["SxMainnet"] = "production";
})(Environments = exports.Environments || (exports.Environments = {}));
var Tokens;
(function (Tokens) {
Tokens["WETH"] = "WETH";
Tokens["SPORTX"] = "SX";
Tokens["USDC"] = "USDC";
})(Tokens = exports.Tokens || (exports.Tokens = {}));
exports.RELAYER_URLS = {
[]: "https://api.toronto.sx.bet",
[]: "https://api.stage.sx.bet",
[]: "https://api.sx.bet",
};
exports.DEFAULT_RPC_URLS = {
[]: "https://rpc.toronto.sx.technology",
[]: "https://rpc.sx.technology",
[]: "https://rpc.sx.technology"
};
exports.TOKEN_TRANSFER_PROXY_ADDRESS = {
[]: "0x6681293989e06a4E7c7e18c13C1AE13925BdfdB7",
[]: "0xA82Aec37d413dBF27bc4A6b830C14C145ffF9279",
[]: "0xCc4fBba7D0E0F2A03113F42f5D3aE80d9B2aD55d",
};
exports.EIP712_VERSION = {
[]: "4.0",
[]: "4.0",
[]: "4.0",
};
exports.CHAIN_IDS = {
[]: 647,
[]: 416,
};
exports.TOKEN_ADDRESSES = {
[]: {
[]: "0x93964E8d07585672b4d38E5F88E674fF2C418B02",
[]: "0x5147891461a7C81075950f8eE6384e019e39ab98",
[]: "0x2D4e10Ee64CCF407C7F765B363348f7F62D2E06e",
},
[]: {
[]: "0xA173954Cc4b1810C0dBdb007522ADbC182DaB380",
[]: "0xe2aa35C2039Bd0Ff196A6Ef99523CC0D3972ae3e",
[]: "0xaa99bE3356a11eE92c3f099BD7a038399633566f",
},
};
exports.FILL_ORDER_ADDRESS = {
[]: "0x5eC99Afcc00876AF7bd75eC2BC82D9Db220ca7F8",
[]: "0xDE9C81f453a31832925E5E9D0a2C86E5786eaaca",
[]: "0xF3440625e1751208350384d11C5AC89ed2b6eEb2",
};
exports.EIP712_FILL_HASHER_ADDRESSES = {
[]: "0xd29EA8FB542BcA706c374b008f87344062a530e9",
[]: "0xb2d7C177FFF04E2BE8CeFFa67955dEF19eac70e8",
[]: "0x3E96B0a25d51e3Cc89C557f152797c33B839968f"
};
exports.RELAYER_HTTP_ENDPOINTS = {
SPORTS: "/sports",
LEAGUES: "/leagues",
ACTIVE_LEAGUES: "/leagues/active",
ACTIVE_ORDERS: "/active-orders",
ORDERS: "/orders",
PENDING_BETS: "/pending-bets",
METADATA: "/metadata",
ACTIVE_MARKETS: "/markets/active",
POPULAR: "/markets/popular",
HISTORICAL_MARKETS: "/markets/find",
NEW_ORDER: "/orders/new",
FILL_ORDERS: "/orders/fill",
CANCEL_ORDERS: "/orders/cancel/v2",
CANCEL_EVENT_ORDERS: "/orders/cancel/event",
CANCEL_ALL_ORDERS: "/orders/cancel/all",
TRADES: "/trades",
USER_TOKEN: "/user/token",
LIVE_SCORES: "/live-scores",
};
exports.TokenDecimalMapping = {
[][Tokens.WETH]]: 18,
[][Tokens.SPORTX]]: 18,
[][Tokens.USDC]]: 6,
[][Tokens.WETH]]: 18,
[][Tokens.SPORTX]]: 18,
[][Tokens.USDC]]: 6
};
//# sourceMappingURL=constants.js.map