@azuro-org/toolkit 4.5.1 → 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 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',
@@ -4198,7 +4203,7 @@ const baseData = {
4198
4203
  cashout: '0xFffF9220288787B24276135E58C0BF68D803F0ad',
4199
4204
  }),
4200
4205
  betToken: {
4201
- address: '0x9e09f213Ff75e53D52e9e777A6567A68683E935f',
4206
+ address: '0x4200000000000000000000000000000000000006',
4202
4207
  symbol: 'WETH',
4203
4208
  decimals: 18,
4204
4209
  },
@@ -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
- if (!liveSupportedChains.includes(chainId)) {
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
- if (!liveSupportedChains.includes(chainId)) {
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
- if (!liveSupportedChains.includes(chainId)) {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/toolkit",
3
- "version": "4.5.1",
3
+ "version": "4.5.3",
4
4
  "description": "Set of helpers to work with Azuro protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",