@azuro-org/toolkit 4.5.0-beta.3 → 4.5.0-beta.5
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 +4 -4
- package/dist/docs/live/condition.d.ts +2 -4
- package/dist/docs/live/conditions.d.ts +1 -3
- package/dist/docs/live/fragments/condition.d.ts +1 -1
- package/dist/docs/prematch/bettors.d.ts +1 -3
- package/dist/docs/prematch/condition.d.ts +2 -4
- package/dist/docs/prematch/conditions.d.ts +1 -3
- package/dist/docs/prematch/conditionsBatch.d.ts +1 -3
- package/dist/docs/prematch/fragments/bettor.d.ts +1 -1
- package/dist/docs/prematch/fragments/condition.d.ts +1 -1
- package/dist/docs/prematch/fragments/liveBet.d.ts +1 -1
- package/dist/docs/prematch/fragments/mainGameInfo.d.ts +1 -1
- package/dist/docs/prematch/fragments/prematchBet.d.ts +1 -1
- package/dist/docs/prematch/game.d.ts +1 -3
- package/dist/docs/prematch/gameBets.d.ts +2 -4
- package/dist/docs/prematch/games.d.ts +1 -3
- package/dist/docs/prematch/liveBets.d.ts +1 -3
- package/dist/docs/prematch/navigation.d.ts +1 -3
- package/dist/docs/prematch/prematchBets.d.ts +1 -3
- package/dist/docs/prematch/sports.d.ts +1 -3
- package/dist/docs/prematch/sportsNavigation.d.ts +1 -3
- package/dist/index.js +8 -4
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -12,10 +12,10 @@ npm i --save @azuro-org/toolkit
|
|
|
12
12
|
#### Peer Dependencies
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
@
|
|
16
|
-
@
|
|
17
|
-
viem@^2.
|
|
18
|
-
|
|
15
|
+
@azuro-org/dictionaries@^3.0.26
|
|
16
|
+
@wagmi/core@^2.16.3
|
|
17
|
+
viem@^2.22.11
|
|
18
|
+
graphql-tag@^2.12.0
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Package information can be found in our [Doc](https://gem.azuro.org/hub/apps/toolkit/overview)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type LiveConditionQueryVariables = Types.Exact<{
|
|
4
|
-
conditionId: Types.Scalars['
|
|
3
|
+
conditionId: Types.Scalars['ID']['input'];
|
|
5
4
|
}>;
|
|
6
5
|
export type LiveConditionQuery = {
|
|
7
6
|
__typename?: 'Query';
|
|
@@ -24,5 +23,4 @@ export type LiveConditionQuery = {
|
|
|
24
23
|
};
|
|
25
24
|
} | null;
|
|
26
25
|
};
|
|
27
|
-
export declare const LiveConditionDocument:
|
|
28
|
-
export type LiveConditionQueryResult = Apollo.QueryResult<LiveConditionQuery, LiveConditionQueryVariables>;
|
|
26
|
+
export declare const LiveConditionDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type LiveConditionsQueryVariables = Types.Exact<{
|
|
4
3
|
where: Types.Condition_Filter;
|
|
5
4
|
orderBy?: Types.InputMaybe<Types.Condition_OrderBy>;
|
|
@@ -27,5 +26,4 @@ export type LiveConditionsQuery = {
|
|
|
27
26
|
};
|
|
28
27
|
}>;
|
|
29
28
|
};
|
|
30
|
-
export declare const LiveConditionsDocument:
|
|
31
|
-
export type LiveConditionsQueryResult = Apollo.QueryResult<LiveConditionsQuery, LiveConditionsQueryVariables>;
|
|
29
|
+
export declare const LiveConditionsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type BettorsQueryVariables = Types.Exact<{
|
|
4
3
|
where: Types.Bettor_Filter;
|
|
5
4
|
}>;
|
|
@@ -17,5 +16,4 @@ export type BettorsQuery = {
|
|
|
17
16
|
lostBetsCount: number;
|
|
18
17
|
}>;
|
|
19
18
|
};
|
|
20
|
-
export declare const BettorsDocument:
|
|
21
|
-
export type BettorsQueryResult = Apollo.QueryResult<BettorsQuery, BettorsQueryVariables>;
|
|
19
|
+
export declare const BettorsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type PrematchConditionQueryVariables = Types.Exact<{
|
|
4
|
-
id: Types.Scalars['
|
|
3
|
+
id: Types.Scalars['ID']['input'];
|
|
5
4
|
}>;
|
|
6
5
|
export type PrematchConditionQuery = {
|
|
7
6
|
__typename?: 'Query';
|
|
@@ -37,5 +36,4 @@ export type PrematchConditionQuery = {
|
|
|
37
36
|
};
|
|
38
37
|
} | null;
|
|
39
38
|
};
|
|
40
|
-
export declare const PrematchConditionDocument:
|
|
41
|
-
export type PrematchConditionQueryResult = Apollo.QueryResult<PrematchConditionQuery, PrematchConditionQueryVariables>;
|
|
39
|
+
export declare const PrematchConditionDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type PrematchConditionsQueryVariables = Types.Exact<{
|
|
4
3
|
where: Types.Condition_Filter;
|
|
5
4
|
orderBy?: Types.InputMaybe<Types.Condition_OrderBy>;
|
|
@@ -40,5 +39,4 @@ export type PrematchConditionsQuery = {
|
|
|
40
39
|
};
|
|
41
40
|
}>;
|
|
42
41
|
};
|
|
43
|
-
export declare const PrematchConditionsDocument:
|
|
44
|
-
export type PrematchConditionsQueryResult = Apollo.QueryResult<PrematchConditionsQuery, PrematchConditionsQueryVariables>;
|
|
42
|
+
export declare const PrematchConditionsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type PrematchConditionsBatchQueryVariables = Types.Exact<{
|
|
4
3
|
conditionFilter?: Types.InputMaybe<Types.Condition_Filter>;
|
|
5
4
|
}>;
|
|
@@ -17,5 +16,4 @@ export type PrematchConditionsBatchQuery = {
|
|
|
17
16
|
}>;
|
|
18
17
|
}>;
|
|
19
18
|
};
|
|
20
|
-
export declare const PrematchConditionsBatchDocument:
|
|
21
|
-
export type PrematchConditionsBatchQueryResult = Apollo.QueryResult<PrematchConditionsBatchQuery, PrematchConditionsBatchQueryVariables>;
|
|
19
|
+
export declare const PrematchConditionsBatchDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type GameQueryVariables = Types.Exact<{
|
|
4
3
|
gameId: Types.Scalars['BigInt']['input'];
|
|
5
4
|
}>;
|
|
@@ -35,5 +34,4 @@ export type GameQuery = {
|
|
|
35
34
|
}>;
|
|
36
35
|
}>;
|
|
37
36
|
};
|
|
38
|
-
export declare const GameDocument:
|
|
39
|
-
export type GameQueryResult = Apollo.QueryResult<GameQuery, GameQueryVariables>;
|
|
37
|
+
export declare const GameDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type GameBetsQueryVariables = Types.Exact<{
|
|
4
|
-
gameId: Types.Scalars['
|
|
3
|
+
gameId: Types.Scalars['BigInt']['input'];
|
|
5
4
|
actor?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
|
6
5
|
}>;
|
|
7
6
|
export type GameBetsQuery = {
|
|
@@ -50,5 +49,4 @@ export type GameBetsQuery = {
|
|
|
50
49
|
}>;
|
|
51
50
|
}>;
|
|
52
51
|
};
|
|
53
|
-
export declare const GameBetsDocument:
|
|
54
|
-
export type GameBetsQueryResult = Apollo.QueryResult<GameBetsQuery, GameBetsQueryVariables>;
|
|
52
|
+
export declare const GameBetsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type GamesQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
skip?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
@@ -39,5 +38,4 @@ export type GamesQuery = {
|
|
|
39
38
|
}>;
|
|
40
39
|
}>;
|
|
41
40
|
};
|
|
42
|
-
export declare const GamesDocument:
|
|
43
|
-
export type GamesQueryResult = Apollo.QueryResult<GamesQuery, GamesQueryVariables>;
|
|
41
|
+
export declare const GamesDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type LiveBetsQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
skip?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
@@ -55,5 +54,4 @@ export type LiveBetsQuery = {
|
|
|
55
54
|
} | null;
|
|
56
55
|
}>;
|
|
57
56
|
};
|
|
58
|
-
export declare const LiveBetsDocument:
|
|
59
|
-
export type LiveBetsQueryResult = Apollo.QueryResult<LiveBetsQuery, LiveBetsQueryVariables>;
|
|
57
|
+
export declare const LiveBetsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type NavigationQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
|
|
@@ -32,5 +31,4 @@ export type NavigationQuery = {
|
|
|
32
31
|
}>;
|
|
33
32
|
}>;
|
|
34
33
|
};
|
|
35
|
-
export declare const NavigationDocument:
|
|
36
|
-
export type NavigationQueryResult = Apollo.QueryResult<NavigationQuery, NavigationQueryVariables>;
|
|
34
|
+
export declare const NavigationDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type PrematchBetsQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
skip?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
@@ -90,5 +89,4 @@ export type PrematchBetsQuery = {
|
|
|
90
89
|
} | null;
|
|
91
90
|
}>;
|
|
92
91
|
};
|
|
93
|
-
export declare const PrematchBetsDocument:
|
|
94
|
-
export type PrematchBetsQueryResult = Apollo.QueryResult<PrematchBetsQuery, PrematchBetsQueryVariables>;
|
|
92
|
+
export declare const PrematchBetsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type SportsQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
|
|
@@ -61,5 +60,4 @@ export type SportsQuery = {
|
|
|
61
60
|
}>;
|
|
62
61
|
}>;
|
|
63
62
|
};
|
|
64
|
-
export declare const SportsDocument:
|
|
65
|
-
export type SportsQueryResult = Apollo.QueryResult<SportsQuery, SportsQueryVariables>;
|
|
63
|
+
export declare const SportsDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
|
-
import * as Apollo from '@apollo/client';
|
|
3
2
|
export type SportsNavigationQueryVariables = Types.Exact<{
|
|
4
3
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
5
4
|
sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
|
|
@@ -20,5 +19,4 @@ export type SportsNavigationQuery = {
|
|
|
20
19
|
}>;
|
|
21
20
|
}>;
|
|
22
21
|
};
|
|
23
|
-
export declare const SportsNavigationDocument:
|
|
24
|
-
export type SportsNavigationQueryResult = Apollo.QueryResult<SportsNavigationQuery, SportsNavigationQueryVariables>;
|
|
22
|
+
export declare const SportsNavigationDocument: import("graphql/language/ast").DocumentNode;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {gnosis,polygon,polygonAmoy,chiliz,spicy}from'viem/chains';import {erc721Abi,parseUnits,formatUnits,encodeAbiParameters,parseAbiParameters,encodeFunctionData}from'viem';import
|
|
1
|
+
import {gnosis,polygon,polygonAmoy,chiliz,spicy}from'viem/chains';import {erc721Abi,parseUnits,formatUnits,encodeAbiParameters,parseAbiParameters,encodeFunctionData}from'viem';import gql from'graphql-tag';import {readContracts,readContract}from'@wagmi/core';import {dictionaries,getMarketKey,getMarketName,getSelectionName,getMarketDescription}from'@azuro-org/dictionaries';const isDevEnabled = Boolean(JSON.parse(process.env.AZURO_UNSTABLE_DEV_ENABLED || 'false'));
|
|
2
2
|
var Environment;
|
|
3
3
|
(function (Environment) {
|
|
4
4
|
Environment["GnosisDevXDAI"] = "GnosisDevXDAI";
|
|
@@ -3992,6 +3992,7 @@ const gnosisData = {
|
|
|
3992
3992
|
prematchComboCore: '0xDbC3BE2DDB53e1a288F7b7a4d020F8056D3b0F7C',
|
|
3993
3993
|
proxyFront: '0x3A1c6640daeAc3513726F06A9f03911CC1080251',
|
|
3994
3994
|
azuroBet: '0xA3A1B460c68dc91c5B3f71f5487A76fac42858bf',
|
|
3995
|
+
cashout: '0x7145e4690A8846d5457D7352625e26b6A605a5AF',
|
|
3995
3996
|
liveRelayer: '0x936c02503A32aA23BCF7CFaF5c29100b0F93FCfe',
|
|
3996
3997
|
liveCore: '0x0223ff7efca5aec919c471fa2eb44cda466f1500',
|
|
3997
3998
|
}),
|
|
@@ -4041,6 +4042,7 @@ const polygonData = {
|
|
|
4041
4042
|
prematchComboCore: '0x92a4e8Bc6B92a2e1ced411f41013B5FE6BE07613',
|
|
4042
4043
|
proxyFront: '0x0DEE52b98ba8326DaD4C346a4F806Fd871360a00',
|
|
4043
4044
|
azuroBet: '0x8ed7296b5CAe379d07C70280Af622BC410F01Ed7',
|
|
4045
|
+
cashout: '0x365f97EE637f7a9260838F7d2a3601EA800627bE',
|
|
4044
4046
|
liveRelayer: '0xC6BB817a7f02874F360d135D880200A2E440207D',
|
|
4045
4047
|
liveCore: '0xc389558Faca41bC747F763cf8616704187CDcD04',
|
|
4046
4048
|
}),
|
|
@@ -4065,6 +4067,7 @@ const polygonAmoyData = {
|
|
|
4065
4067
|
prematchComboCore: '0xdF71998f7931caD24439A12A2F56D7326C3D0295',
|
|
4066
4068
|
proxyFront: '0x7003CaA0847CA296EBF51C43D9021656a663304f',
|
|
4067
4069
|
azuroBet: '0x5E59ee1b09Cb2Cf031e4Beaa8dB48D4B8b7e38AD',
|
|
4070
|
+
cashout: '0x080d71059891Fb4d722855df28bFB208335F1587',
|
|
4068
4071
|
liveRelayer: '0x355B8493380fA5D57E4d3aFBF7C5f38b64AD5eA9',
|
|
4069
4072
|
liveCore: '0x51eD5C2596d9AE32cE53ac1915Cb9333AFeF3156',
|
|
4070
4073
|
}),
|
|
@@ -4114,6 +4117,7 @@ const chilizData = {
|
|
|
4114
4117
|
prematchComboCore: '0x724fa8931428D5B636F7191d3e848f28Ab23C425',
|
|
4115
4118
|
proxyFront: '0x45779134E5091756601Cb5bA389f9C76b914E520',
|
|
4116
4119
|
azuroBet: '0x8609D1c8610D7F24d826FB76ea878d240537A8B8',
|
|
4120
|
+
cashout: '0xAE0830d7588aB44e5D4443168a8D666B54F385FE',
|
|
4117
4121
|
}),
|
|
4118
4122
|
betToken: {
|
|
4119
4123
|
address: '0x677F7e16C7Dd57be1D4C8aD1244883214953DC47',
|
|
@@ -4181,7 +4185,7 @@ const chainsDataByEnv = {
|
|
|
4181
4185
|
}
|
|
4182
4186
|
}
|
|
4183
4187
|
`;const LiveConditionDocument = gql `
|
|
4184
|
-
query LiveCondition($conditionId:
|
|
4188
|
+
query LiveCondition($conditionId: ID!) {
|
|
4185
4189
|
condition(id: $conditionId, subgraphError: allow) {
|
|
4186
4190
|
...LiveCondition
|
|
4187
4191
|
}
|
|
@@ -4354,7 +4358,7 @@ const chainsDataByEnv = {
|
|
|
4354
4358
|
}
|
|
4355
4359
|
}
|
|
4356
4360
|
${BettorFragmentDoc}`;const PrematchConditionDocument = gql `
|
|
4357
|
-
query PrematchCondition($id:
|
|
4361
|
+
query PrematchCondition($id: ID!) {
|
|
4358
4362
|
condition(id: $id, subgraphError: allow) {
|
|
4359
4363
|
...PrematchCondition
|
|
4360
4364
|
}
|
|
@@ -4391,7 +4395,7 @@ const chainsDataByEnv = {
|
|
|
4391
4395
|
}
|
|
4392
4396
|
}
|
|
4393
4397
|
${MainGameInfoFragmentDoc}`;const GameBetsDocument = gql `
|
|
4394
|
-
query GameBets($gameId:
|
|
4398
|
+
query GameBets($gameId: BigInt!, $actor: String) {
|
|
4395
4399
|
bets(where: {_games_: {gameId: $gameId}, actor: $actor}) {
|
|
4396
4400
|
rawAmount
|
|
4397
4401
|
rawPotentialPayout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azuro-org/toolkit",
|
|
3
|
-
"version": "4.5.0-beta.
|
|
3
|
+
"version": "4.5.0-beta.5",
|
|
4
4
|
"description": "Set of helpers to work with Azuro protocol",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,26 +39,27 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/Azuro-protocol/toolkit#readme",
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
42
|
+
"@azuro-org/dictionaries": "^3.0.26",
|
|
43
|
+
"graphql-tag": "^2.12.0",
|
|
44
|
+
"@wagmi/core": "^2.16.3",
|
|
45
|
+
"viem": "^2.22.11"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
+
"@babel/core": "^7.17.0",
|
|
48
49
|
"@graphql-codegen/cli": "^4.0.1",
|
|
49
|
-
"@graphql-codegen/client-preset": "^4.0.0",
|
|
50
50
|
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
|
|
51
|
-
"@graphql-codegen/typescript
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
|
55
|
-
"eslint-plugin-import": "^2.29.1",
|
|
56
|
-
"@babel/core": "^7.17.0",
|
|
51
|
+
"@graphql-codegen/typescript": "^4.1.2",
|
|
52
|
+
"@graphql-codegen/typescript-document-nodes": "^4.0.12",
|
|
53
|
+
"@graphql-codegen/typescript-operations": "^4.4.0",
|
|
57
54
|
"@rollup/plugin-babel": "^6.0.3",
|
|
58
55
|
"@rollup/plugin-commonjs": "^23.0.3",
|
|
59
56
|
"@rollup/plugin-json": "^4.1.0",
|
|
60
57
|
"@types/node": "^17.0.21",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
61
59
|
"builtin-modules": "^3.3.0",
|
|
60
|
+
"eslint": "^8.56.0",
|
|
61
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
62
|
+
"eslint-plugin-import": "^2.29.1",
|
|
62
63
|
"minimist": "^1.2.7",
|
|
63
64
|
"rimraf": "^3.0.2",
|
|
64
65
|
"rollup": "^2.67.0",
|