@azuro-org/toolkit 4.4.0 → 4.5.0-beta.1

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/README.md CHANGED
@@ -12,10 +12,10 @@ npm i --save @azuro-org/toolkit
12
12
  #### Peer Dependencies
13
13
 
14
14
  ```
15
- @apollo/client@^3.8.0-beta.7
16
- @azuro-org/dictionaries@^3.0.12
17
- viem@^2.17.3
18
- @wagmi/core@^2.11.7
15
+ @apollo/client@^3.11.10
16
+ @azuro-org/dictionaries@^3.0.21
17
+ viem@^2.21.53
18
+ @wagmi/core@^2.15.2
19
19
  ```
20
20
 
21
21
  Package information can be found in our [Doc](https://gem.azuro.org/hub/apps/toolkit/overview)
package/dist/config.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { type Chain } from 'viem/chains';
2
- import { type Address } from 'viem';
3
1
  import { Environment } from './envs';
4
- import { type Contracts } from './utils/setupContracts';
2
+ import { type ChainData } from './global';
5
3
  export declare const ODDS_DECIMALS = 12;
6
4
  export declare const MARGIN_DECIMALS = 12;
7
5
  export declare const MIN_LIVE_BET_AMOUNT = 1;
@@ -43,29 +41,37 @@ export declare const LIVE_BET_DATA_TYPES: {
43
41
  };
44
42
  export declare const LIVE_TYPED_DATA_DOMAIN_NAME = "Live Betting";
45
43
  export declare const LIVE_TYPED_DATA_DOMAIN_VERSION = "1.0.0";
44
+ export declare const CASHOUT_DATA_TYPES: {
45
+ readonly CashOutItem: readonly [{
46
+ readonly name: "betId";
47
+ readonly type: "uint256";
48
+ }, {
49
+ readonly name: "bettingContract";
50
+ readonly type: "address";
51
+ }, {
52
+ readonly name: "minOdds";
53
+ readonly type: "uint64";
54
+ }];
55
+ readonly CashOutOrder: readonly [{
56
+ readonly name: "attention";
57
+ readonly type: "string";
58
+ }, {
59
+ readonly name: "chainId";
60
+ readonly type: "uint256";
61
+ }, {
62
+ readonly name: "items";
63
+ readonly type: "CashOutItem[]";
64
+ }, {
65
+ readonly name: "expiresAt";
66
+ readonly type: "uint64";
67
+ }];
68
+ };
69
+ export declare const CASHOUT_TYPED_DATA_DOMAIN_NAME = "Cash Out";
70
+ export declare const CASHOUT_TYPED_DATA_DOMAIN_VERSION = "1.0.0";
46
71
  export declare const deBridgeUrl = "https://api.dln.trade/v1.0";
47
72
  export declare const deBridgeTxUrl = "https://stats-api.dln.trade/api";
48
73
  export declare const liveHostAddress = "0x67Fca88E2f5F2C33b86bFa4EccfCb8dCD6a56D17";
49
74
  export declare const liveSupportedChains: ChainId[];
50
- type BetToken = {
51
- address: Address;
52
- symbol: string;
53
- decimals: number;
54
- };
55
- export type ChainData = {
56
- chain: Omit<Chain, 'id'> & {
57
- id: ChainId;
58
- };
59
- graphql: {
60
- prematch: string;
61
- live: string;
62
- };
63
- socket: string;
64
- api: string;
65
- environment: Environment;
66
- contracts: Contracts;
67
- betToken: BetToken;
68
- };
69
75
  export declare const chainsData: {
70
76
  100: ChainData;
71
77
  137: ChainData;
@@ -75,4 +81,3 @@ export declare const chainsData: {
75
81
  };
76
82
  export declare const chainsDataByEnv: Record<Environment, ChainData>;
77
83
  export type ChainId = keyof typeof chainsData;
78
- export {};
@@ -7,11 +7,12 @@ export type LiveBetFragment = {
7
7
  potentialPayout: string;
8
8
  payout?: string | null;
9
9
  result?: Types.BetResult | null;
10
- isRedeemed: boolean;
11
- isRedeemable: boolean;
12
10
  odds: string;
13
11
  settledOdds?: string | null;
14
12
  affiliate?: string | null;
13
+ isRedeemed: boolean;
14
+ isRedeemable: boolean;
15
+ isCashedOut: boolean;
15
16
  tokenId: string;
16
17
  createdAt: string;
17
18
  txHash: string;
@@ -7,11 +7,12 @@ export type PrematchBetFragment = {
7
7
  potentialPayout: string;
8
8
  payout?: string | null;
9
9
  result?: Types.BetResult | null;
10
- isRedeemed: boolean;
11
- isRedeemable: boolean;
12
10
  odds: string;
13
11
  settledOdds?: string | null;
14
12
  affiliate?: string | null;
13
+ isRedeemed: boolean;
14
+ isRedeemable: boolean;
15
+ isCashedOut: boolean;
15
16
  tokenId: string;
16
17
  createdAt: string;
17
18
  txHash: string;
@@ -17,11 +17,12 @@ export type LiveBetsQuery = {
17
17
  potentialPayout: string;
18
18
  payout?: string | null;
19
19
  result?: Types.BetResult | null;
20
- isRedeemed: boolean;
21
- isRedeemable: boolean;
22
20
  odds: string;
23
21
  settledOdds?: string | null;
24
22
  affiliate?: string | null;
23
+ isRedeemed: boolean;
24
+ isRedeemable: boolean;
25
+ isCashedOut: boolean;
25
26
  tokenId: string;
26
27
  createdAt: string;
27
28
  txHash: string;
@@ -17,11 +17,12 @@ export type PrematchBetsQuery = {
17
17
  potentialPayout: string;
18
18
  payout?: string | null;
19
19
  result?: Types.BetResult | null;
20
- isRedeemed: boolean;
21
- isRedeemable: boolean;
22
20
  odds: string;
23
21
  settledOdds?: string | null;
24
22
  affiliate?: string | null;
23
+ isRedeemed: boolean;
24
+ isRedeemable: boolean;
25
+ isCashedOut: boolean;
25
26
  tokenId: string;
26
27
  createdAt: string;
27
28
  txHash: string;