@azuro-org/toolkit 4.2.1 → 4.3.0

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
@@ -3,6 +3,7 @@ import { type Address } from 'viem';
3
3
  import { Environment } from './envs';
4
4
  import { type Contracts } from './utils/setupContracts';
5
5
  export declare const ODDS_DECIMALS = 12;
6
+ export declare const MARGIN_DECIMALS = 12;
6
7
  export declare const MIN_LIVE_BET_AMOUNT = 1;
7
8
  export declare const deBridgeUrl = "https://api.dln.trade/v1.0";
8
9
  export declare const deBridgeTxUrl = "https://stats-api.dln.trade/api";
@@ -2,7 +2,8 @@ import * as Types from './types';
2
2
  import * as Apollo from '@apollo/client';
3
3
  export type NavigationQueryVariables = Types.Exact<{
4
4
  first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
5
- where?: Types.InputMaybe<Types.Game_Filter>;
5
+ sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
6
+ gameFilter?: Types.InputMaybe<Types.Game_Filter>;
6
7
  withGameCount: Types.Scalars['Boolean']['input'];
7
8
  }>;
8
9
  export type NavigationQuery = {
@@ -12,6 +13,7 @@ export type NavigationQuery = {
12
13
  id: string;
13
14
  slug: string;
14
15
  name: string;
16
+ sportId: string;
15
17
  countries: Array<{
16
18
  __typename?: 'Country';
17
19
  id: string;
@@ -13,8 +13,10 @@ export type SportsQuery = {
13
13
  __typename?: 'Query';
14
14
  sports: Array<{
15
15
  __typename?: 'Sport';
16
+ id: string;
16
17
  slug: string;
17
18
  name: string;
19
+ sportId: string;
18
20
  countries: Array<{
19
21
  __typename?: 'Country';
20
22
  slug: string;
@@ -2,7 +2,8 @@ import * as Types from './types';
2
2
  import * as Apollo from '@apollo/client';
3
3
  export type SportsNavigationQueryVariables = Types.Exact<{
4
4
  first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
5
- where?: Types.InputMaybe<Types.Game_Filter>;
5
+ sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
6
+ gameFilter?: Types.InputMaybe<Types.Game_Filter>;
6
7
  withGameCount: Types.Scalars['Boolean']['input'];
7
8
  }>;
8
9
  export type SportsNavigationQuery = {
@@ -12,6 +13,7 @@ export type SportsNavigationQuery = {
12
13
  id: string;
13
14
  slug: string;
14
15
  name: string;
16
+ sportId: string;
15
17
  games?: Array<{
16
18
  __typename?: 'Game';
17
19
  id: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { environments, Environment } from './envs';
2
- export { ODDS_DECIMALS, MIN_LIVE_BET_AMOUNT, deBridgeUrl, deBridgeTxUrl, liveHostAddress, liveSupportedChains, type ChainData, chainsData, chainsDataByEnv, type ChainId, } from './config';
2
+ export { ODDS_DECIMALS, MARGIN_DECIMALS, MIN_LIVE_BET_AMOUNT, deBridgeUrl, deBridgeTxUrl, liveHostAddress, liveSupportedChains, type ChainData, chainsData, chainsDataByEnv, type ChainId, } from './config';
3
3
  export * from './global';
4
4
  export * from './abis';
5
5
  export * from './docs';
package/dist/index.js CHANGED
@@ -3930,6 +3930,7 @@ const getApiEndpoint = (chainId) => {
3930
3930
  }
3931
3931
  return 'https://api.azuro.org/api/v1/public';
3932
3932
  };const ODDS_DECIMALS = 12;
3933
+ const MARGIN_DECIMALS = 12;
3933
3934
  const MIN_LIVE_BET_AMOUNT = 1;
3934
3935
  const deBridgeUrl = 'https://api.dln.trade/v1.0';
3935
3936
  const deBridgeTxUrl = 'https://stats-api.dln.trade/api';
@@ -4378,20 +4379,21 @@ const chainsDataByEnv = {
4378
4379
  }
4379
4380
  }
4380
4381
  ${LiveBetFragmentDoc}`;const NavigationDocument = gql `
4381
- query Navigation($first: Int, $where: Game_filter, $withGameCount: Boolean!) {
4382
- sports(subgraphError: allow) {
4382
+ query Navigation($first: Int, $sportFilter: Sport_filter, $gameFilter: Game_filter, $withGameCount: Boolean!) {
4383
+ sports(where: $sportFilter, subgraphError: allow) {
4383
4384
  id
4384
4385
  slug
4385
4386
  name
4387
+ sportId
4386
4388
  countries(where: {hasActiveLeagues: true}) {
4387
4389
  id
4388
4390
  slug
4389
4391
  name
4390
- leagues(where: {games_: $where}) {
4392
+ leagues(where: {games_: $gameFilter}) {
4391
4393
  id
4392
4394
  slug
4393
4395
  name
4394
- games(first: $first, where: $where) @include(if: $withGameCount) {
4396
+ games(first: $first, where: $gameFilter) @include(if: $withGameCount) {
4395
4397
  id
4396
4398
  }
4397
4399
  }
@@ -4414,8 +4416,10 @@ const chainsDataByEnv = {
4414
4416
  ${PrematchBetFragmentDoc}`;const SportsDocument = gql `
4415
4417
  query Sports($first: Int, $sportFilter: Sport_filter, $countryFilter: Country_filter, $leagueFilter: League_filter, $gameFilter: Game_filter, $gameOrderBy: Game_orderBy, $gameOrderDirection: OrderDirection) {
4416
4418
  sports(where: $sportFilter, subgraphError: allow) {
4419
+ id
4417
4420
  slug
4418
4421
  name
4422
+ sportId
4419
4423
  countries(where: $countryFilter, orderBy: turnover, orderDirection: desc) {
4420
4424
  slug
4421
4425
  name
@@ -4438,12 +4442,13 @@ const chainsDataByEnv = {
4438
4442
  }
4439
4443
  }
4440
4444
  ${MainGameInfoFragmentDoc}`;const SportsNavigationDocument = gql `
4441
- query SportsNavigation($first: Int, $where: Game_filter, $withGameCount: Boolean!) {
4442
- sports(subgraphError: allow) {
4445
+ query SportsNavigation($first: Int, $sportFilter: Sport_filter, $gameFilter: Game_filter, $withGameCount: Boolean!) {
4446
+ sports(where: $sportFilter, subgraphError: allow) {
4443
4447
  id
4444
4448
  slug
4445
4449
  name
4446
- games(first: $first, where: $where) @include(if: $withGameCount) {
4450
+ sportId
4451
+ games(first: $first, where: $gameFilter) @include(if: $withGameCount) {
4447
4452
  id
4448
4453
  }
4449
4454
  }
@@ -5778,4 +5783,4 @@ const getDeBridgeOrder = async (orderId) => {
5778
5783
  }
5779
5784
  const data = await response.json();
5780
5785
  return data;
5781
- };export{BetResult,BetStatus,Bet_OrderBy,BettorFragmentDoc,BettorsDocument,ConditionStatus$1 as ConditionStatus,DeBridgeExternalCallStatus,DeBridgeOrderStatus,Environment,FreeBetStatus,GameBetsDocument,GameDocument,GameStatus,Game_OrderBy$1 as Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,LiveBetFragmentDoc,LiveBetsDocument,LiveConditionDocument,LiveConditionFragmentDoc,LiveConditionsDocument,GameStatus$1 as LiveGraphGameStatus,MIN_LIVE_BET_AMOUNT,MainGameInfoFragmentDoc,NavigationDocument,ODDS_DECIMALS,OrderDirection$1 as OrderDirection,PrematchBetFragmentDoc,PrematchBetsDocument,PrematchConditionDocument,PrematchConditionFragmentDoc,PrematchConditionsBatchDocument,PrematchConditionsDocument,GameStatus$2 as PrematchGraphGameStatus,SelectionResult$1 as SelectionResult,SportsDocument,SportsNavigationDocument,WaveLevelName,activateWave,calcLiveOdds,calcMindOdds,calcPrematchOdds,chainsData,chainsDataByEnv,createDeBridgeBet,deBridgeTxUrl,deBridgeUrl,environments,FreeBet as freeBetAbi,getApiEndpoint,getBetStatus,getDeBridgeOrder,getDeBridgeSupportedChains,getDeBridgeSupportedTokens,getFreeBets,getGameStatus,getLiveBetFee,getLiveGraphqlEndpoint,getPrematchBetDataBytes,getPrematchGraphqlEndpoint,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,groupByConditionId,groupConditionsByMarket,liveCoreAbi,liveHostAddress,liveSupportedChains,lpAbi,prematchComboCoreAbi,prematchCoreAbi,proxyFrontAbi,setupContracts};
5786
+ };export{BetResult,BetStatus,Bet_OrderBy,BettorFragmentDoc,BettorsDocument,ConditionStatus$1 as ConditionStatus,DeBridgeExternalCallStatus,DeBridgeOrderStatus,Environment,FreeBetStatus,GameBetsDocument,GameDocument,GameStatus,Game_OrderBy$1 as Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,LiveBetFragmentDoc,LiveBetsDocument,LiveConditionDocument,LiveConditionFragmentDoc,LiveConditionsDocument,GameStatus$1 as LiveGraphGameStatus,MARGIN_DECIMALS,MIN_LIVE_BET_AMOUNT,MainGameInfoFragmentDoc,NavigationDocument,ODDS_DECIMALS,OrderDirection$1 as OrderDirection,PrematchBetFragmentDoc,PrematchBetsDocument,PrematchConditionDocument,PrematchConditionFragmentDoc,PrematchConditionsBatchDocument,PrematchConditionsDocument,GameStatus$2 as PrematchGraphGameStatus,SelectionResult$1 as SelectionResult,SportsDocument,SportsNavigationDocument,WaveLevelName,activateWave,calcLiveOdds,calcMindOdds,calcPrematchOdds,chainsData,chainsDataByEnv,createDeBridgeBet,deBridgeTxUrl,deBridgeUrl,environments,FreeBet as freeBetAbi,getApiEndpoint,getBetStatus,getDeBridgeOrder,getDeBridgeSupportedChains,getDeBridgeSupportedTokens,getFreeBets,getGameStatus,getLiveBetFee,getLiveGraphqlEndpoint,getPrematchBetDataBytes,getPrematchGraphqlEndpoint,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,groupByConditionId,groupConditionsByMarket,liveCoreAbi,liveHostAddress,liveSupportedChains,lpAbi,prematchComboCoreAbi,prematchCoreAbi,proxyFrontAbi,setupContracts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/toolkit",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "Set of helpers to work with Azuro protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,8 +41,8 @@
41
41
  "peerDependencies": {
42
42
  "@apollo/client": "^3.10.8",
43
43
  "@azuro-org/dictionaries": "^3.0.16",
44
- "viem": "^2.17.3",
45
- "@wagmi/core": "^2.11.7"
44
+ "viem": "^2.21.7",
45
+ "@wagmi/core": "^2.13.5"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@graphql-codegen/cli": "^4.0.1",