@azuro-org/toolkit 4.5.0-beta.4 → 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 CHANGED
@@ -12,10 +12,10 @@ npm i --save @azuro-org/toolkit
12
12
  #### Peer Dependencies
13
13
 
14
14
  ```
15
- @apollo/client@^3.11.10
16
- @azuro-org/dictionaries@^3.0.21
17
- viem@^2.21.53
18
- @wagmi/core@^2.15.2
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['BigInt']['input'];
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
31
- export type LiveConditionsQueryResult = Apollo.QueryResult<LiveConditionsQuery, LiveConditionsQueryVariables>;
29
+ export declare const LiveConditionsDocument: import("graphql/language/ast").DocumentNode;
@@ -17,4 +17,4 @@ export type LiveConditionFragment = {
17
17
  };
18
18
  };
19
19
  };
20
- export declare const LiveConditionFragmentDoc: import("@apollo/client").DocumentNode;
20
+ export declare const LiveConditionFragmentDoc: 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: Apollo.DocumentNode;
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['String']['input'];
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
21
- export type PrematchConditionsBatchQueryResult = Apollo.QueryResult<PrematchConditionsBatchQuery, PrematchConditionsBatchQueryVariables>;
19
+ export declare const PrematchConditionsBatchDocument: import("graphql/language/ast").DocumentNode;
@@ -9,4 +9,4 @@ export type BettorFragment = {
9
9
  wonBetsCount: number;
10
10
  lostBetsCount: number;
11
11
  };
12
- export declare const BettorFragmentDoc: import("@apollo/client").DocumentNode;
12
+ export declare const BettorFragmentDoc: import("graphql/language/ast").DocumentNode;
@@ -30,4 +30,4 @@ export type PrematchConditionFragment = {
30
30
  };
31
31
  };
32
32
  };
33
- export declare const PrematchConditionFragmentDoc: import("@apollo/client").DocumentNode;
33
+ export declare const PrematchConditionFragmentDoc: import("graphql/language/ast").DocumentNode;
@@ -44,4 +44,4 @@ export type LiveBetFragment = {
44
44
  payout: string;
45
45
  } | null;
46
46
  };
47
- export declare const LiveBetFragmentDoc: import("@apollo/client").DocumentNode;
47
+ export declare const LiveBetFragmentDoc: import("graphql/language/ast").DocumentNode;
@@ -28,4 +28,4 @@ export type MainGameInfoFragment = {
28
28
  name: string;
29
29
  }>;
30
30
  };
31
- export declare const MainGameInfoFragmentDoc: import("@apollo/client").DocumentNode;
31
+ export declare const MainGameInfoFragmentDoc: import("graphql/language/ast").DocumentNode;
@@ -79,4 +79,4 @@ export type PrematchBetFragment = {
79
79
  payout: string;
80
80
  } | null;
81
81
  };
82
- export declare const PrematchBetFragmentDoc: import("@apollo/client").DocumentNode;
82
+ export declare const PrematchBetFragmentDoc: 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: Apollo.DocumentNode;
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['String']['input'];
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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: Apollo.DocumentNode;
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 {gql}from'@apollo/client';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'));
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";
@@ -4185,7 +4185,7 @@ const chainsDataByEnv = {
4185
4185
  }
4186
4186
  }
4187
4187
  `;const LiveConditionDocument = gql `
4188
- query LiveCondition($conditionId: BigInt!) {
4188
+ query LiveCondition($conditionId: ID!) {
4189
4189
  condition(id: $conditionId, subgraphError: allow) {
4190
4190
  ...LiveCondition
4191
4191
  }
@@ -4358,7 +4358,7 @@ const chainsDataByEnv = {
4358
4358
  }
4359
4359
  }
4360
4360
  ${BettorFragmentDoc}`;const PrematchConditionDocument = gql `
4361
- query PrematchCondition($id: String!) {
4361
+ query PrematchCondition($id: ID!) {
4362
4362
  condition(id: $id, subgraphError: allow) {
4363
4363
  ...PrematchCondition
4364
4364
  }
@@ -4395,7 +4395,7 @@ const chainsDataByEnv = {
4395
4395
  }
4396
4396
  }
4397
4397
  ${MainGameInfoFragmentDoc}`;const GameBetsDocument = gql `
4398
- query GameBets($gameId: String!, $actor: String) {
4398
+ query GameBets($gameId: BigInt!, $actor: String) {
4399
4399
  bets(where: {_games_: {gameId: $gameId}, actor: $actor}) {
4400
4400
  rawAmount
4401
4401
  rawPotentialPayout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/toolkit",
3
- "version": "4.5.0-beta.4",
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
- "@apollo/client": "^3.11.10",
43
- "@azuro-org/dictionaries": "^3.0.21",
44
- "viem": "^2.21.53",
45
- "@wagmi/core": "^2.15.2"
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-react-apollo": "^3.3.7",
52
- "@typescript-eslint/eslint-plugin": "^6.19.1",
53
- "eslint": "^8.56.0",
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",