@azuro-org/toolkit 4.5.2 → 4.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +3 -0
- package/dist/index.js +11 -6
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -71,6 +71,9 @@ export declare const CASHOUT_TYPED_DATA_DOMAIN_VERSION = "1.0.0";
|
|
|
71
71
|
export declare const deBridgeUrl = "https://api.dln.trade/v1.0";
|
|
72
72
|
export declare const deBridgeTxUrl = "https://stats-api.dln.trade/api";
|
|
73
73
|
export declare const liveHostAddress = "0x67Fca88E2f5F2C33b86bFa4EccfCb8dCD6a56D17";
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated please, check the liveCore address existence for specific chain in chainsData
|
|
76
|
+
*/
|
|
74
77
|
export declare const liveSupportedChains: ChainId[];
|
|
75
78
|
export declare const chainsData: {
|
|
76
79
|
100: ChainData;
|
package/dist/index.js
CHANGED
|
@@ -3983,6 +3983,9 @@ const CASHOUT_TYPED_DATA_DOMAIN_VERSION = '1.0.0';
|
|
|
3983
3983
|
const deBridgeUrl = 'https://api.dln.trade/v1.0';
|
|
3984
3984
|
const deBridgeTxUrl = 'https://stats-api.dln.trade/api';
|
|
3985
3985
|
const liveHostAddress = '0x67Fca88E2f5F2C33b86bFa4EccfCb8dCD6a56D17';
|
|
3986
|
+
/**
|
|
3987
|
+
* @deprecated please, check the liveCore address existence for specific chain in chainsData
|
|
3988
|
+
*/
|
|
3986
3989
|
const liveSupportedChains = [polygon.id, gnosis.id, polygonAmoy.id];
|
|
3987
3990
|
const gnosisData = {
|
|
3988
3991
|
chain: gnosis,
|
|
@@ -4125,6 +4128,8 @@ const chilizData = {
|
|
|
4125
4128
|
proxyFront: '0x45779134E5091756601Cb5bA389f9C76b914E520',
|
|
4126
4129
|
azuroBet: '0x8609D1c8610D7F24d826FB76ea878d240537A8B8',
|
|
4127
4130
|
cashout: '0xAE0830d7588aB44e5D4443168a8D666B54F385FE',
|
|
4131
|
+
liveRelayer: '0xA95D8Bd97F567380Bdc068462b9da547af37dAfD',
|
|
4132
|
+
liveCore: '0x2b387115201fe9daef7f3f5f6f3e29a3a94844bc',
|
|
4128
4133
|
}),
|
|
4129
4134
|
betToken: {
|
|
4130
4135
|
address: '0x677F7e16C7Dd57be1D4C8aD1244883214953DC47',
|
|
@@ -5792,10 +5797,10 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
|
|
|
5792
5797
|
const data = await response.json();
|
|
5793
5798
|
return data;
|
|
5794
5799
|
};const getLiveBetTypedData = ({ account, chainId, bet }) => {
|
|
5795
|
-
|
|
5800
|
+
const { contracts } = chainsData[chainId];
|
|
5801
|
+
if (!contracts.liveCore) {
|
|
5796
5802
|
throw new Error('provided chainId is not supported for live bet');
|
|
5797
5803
|
}
|
|
5798
|
-
const { contracts } = chainsData[chainId];
|
|
5799
5804
|
const EIP712Domain = {
|
|
5800
5805
|
name: LIVE_TYPED_DATA_DOMAIN_NAME,
|
|
5801
5806
|
version: LIVE_TYPED_DATA_DOMAIN_VERSION,
|
|
@@ -5831,10 +5836,10 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
|
|
|
5831
5836
|
})(LiveBetState || (LiveBetState = {}));
|
|
5832
5837
|
const createLiveBet = async (props) => {
|
|
5833
5838
|
const { chainId, account, bet, signature } = props;
|
|
5834
|
-
|
|
5839
|
+
const { api, environment, contracts } = chainsData[chainId];
|
|
5840
|
+
if (!contracts.liveCore) {
|
|
5835
5841
|
throw new Error('provided chainId is not supported for live bet');
|
|
5836
5842
|
}
|
|
5837
|
-
const { api, environment } = chainsData[chainId];
|
|
5838
5843
|
const order = { bet };
|
|
5839
5844
|
const signedBet = {
|
|
5840
5845
|
environment,
|
|
@@ -5859,10 +5864,10 @@ const createLiveBet = async (props) => {
|
|
|
5859
5864
|
const data = await response.json();
|
|
5860
5865
|
return data;
|
|
5861
5866
|
};const getLiveBet = async ({ chainId, orderId }) => {
|
|
5862
|
-
|
|
5867
|
+
const { api, contracts } = chainsData[chainId];
|
|
5868
|
+
if (!contracts.liveCore) {
|
|
5863
5869
|
throw new Error('provided chainId is not supported for live bet');
|
|
5864
5870
|
}
|
|
5865
|
-
const { api } = chainsData[chainId];
|
|
5866
5871
|
const response = await fetch(`${api}/orders/${orderId}`);
|
|
5867
5872
|
if (response.status === 404) {
|
|
5868
5873
|
return null;
|