@azuro-org/toolkit 6.0.0-beta.8 → 6.0.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.
Files changed (50) hide show
  1. package/README.md +1 -2
  2. package/dist/docs/bets/bets.d.ts +66 -0
  3. package/dist/docs/bets/fragments/bet.d.ts +58 -0
  4. package/dist/docs/bets/gameBets.d.ts +1 -1
  5. package/dist/docs/bets/types.d.ts +10 -10
  6. package/dist/docs/index.d.ts +2 -0
  7. package/dist/docs/legacy-live-feed/types.d.ts +10 -10
  8. package/dist/global.d.ts +7 -1
  9. package/dist/index.js +107 -46
  10. package/dist/index.js.map +1 -1
  11. package/dist/utils/bet/createBet.d.ts +1 -1
  12. package/dist/utils/bet/createComboBet.d.ts +1 -1
  13. package/dist/utils/bet/getBet.d.ts +1 -1
  14. package/dist/utils/bet/getBetCalculation.d.ts +1 -1
  15. package/dist/utils/bet/getBetFee.d.ts +1 -1
  16. package/dist/utils/bet/getBetStatus.d.ts +1 -1
  17. package/dist/utils/bet/getBetTypedData.d.ts +1 -1
  18. package/dist/utils/bet/getBetsByBettor.d.ts +6 -6
  19. package/dist/utils/bet/getComboBetTypedData.d.ts +1 -1
  20. package/dist/utils/bet/types.d.ts +1 -0
  21. package/dist/utils/bonus/getAvailableFreebets.d.ts +1 -1
  22. package/dist/utils/bonus/getBonuses.d.ts +1 -1
  23. package/dist/utils/calcMinOdds.d.ts +1 -1
  24. package/dist/utils/cashout/createCashout.d.ts +1 -1
  25. package/dist/utils/cashout/getCalculatedCashout.d.ts +1 -1
  26. package/dist/utils/cashout/getCashout.d.ts +1 -1
  27. package/dist/utils/cashout/getCashoutTypedData.d.ts +1 -1
  28. package/dist/utils/cashout/getPrecalculatedCashouts.d.ts +1 -1
  29. package/dist/utils/feed/getConditionsByGameIds.d.ts +1 -1
  30. package/dist/utils/feed/getConditionsState.d.ts +1 -1
  31. package/dist/utils/feed/getGamesByFilters.d.ts +1 -1
  32. package/dist/utils/feed/getGamesByIds.d.ts +1 -1
  33. package/dist/utils/feed/getNavigation.d.ts +1 -1
  34. package/dist/utils/feed/getSports.d.ts +1 -1
  35. package/dist/utils/feed/searchGames.d.ts +1 -1
  36. package/dist/utils/getIsPendingResolution.d.ts +1 -1
  37. package/dist/utils/getProviderFromId.d.ts +0 -8
  38. package/dist/utils/groupConditionsByMarket.d.ts +1 -1
  39. package/package.json +11 -12
  40. package/dist/docs/feed/condition.d.ts +0 -33
  41. package/dist/docs/feed/conditions.d.ts +0 -36
  42. package/dist/docs/feed/conditionsBatch.d.ts +0 -19
  43. package/dist/docs/feed/fragments/condition.d.ts +0 -27
  44. package/dist/docs/feed/fragments/gameInfo.d.ts +0 -40
  45. package/dist/docs/feed/game.d.ts +0 -46
  46. package/dist/docs/feed/games.d.ts +0 -50
  47. package/dist/docs/feed/navigation.d.ts +0 -45
  48. package/dist/docs/feed/sports.d.ts +0 -72
  49. package/dist/docs/feed/sportsNavigation.d.ts +0 -23
  50. package/dist/docs/feed/types.d.ts +0 -2415
package/README.md CHANGED
@@ -14,10 +14,9 @@ npm i --save @azuro-org/toolkit
14
14
  ```
15
15
  @azuro-org/dictionaries@^3.0.28
16
16
  graphql-tag@^2.12.6
17
- @wagmi/core@^2.20.3
18
17
  viem@^2.37.4
19
18
  ```
20
19
 
21
20
  ## Documentation
22
21
 
23
- Package documentation can be found in our [Doc](https://gem.azuro.org/hub/apps/toolkit/overview)
22
+ Package documentation can be found in our [Doc](https://gem.azuro.org/hub/apps/toolkit)
@@ -0,0 +1,66 @@
1
+ import * as Types from './types';
2
+ export type BetsQueryVariables = Types.Exact<{
3
+ first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
4
+ skip?: Types.InputMaybe<Types.Scalars['Int']['input']>;
5
+ where: Types.V3_Bet_Filter;
6
+ }>;
7
+ export type BetsQuery = {
8
+ __typename?: 'Query';
9
+ v3Bets: Array<{
10
+ __typename?: 'V3_Bet';
11
+ id: string;
12
+ actor: string;
13
+ amount: string;
14
+ status: Types.BetStatus;
15
+ potentialPayout: string;
16
+ payout?: string | null;
17
+ result?: Types.BetResult | null;
18
+ odds: string;
19
+ settledOdds?: string | null;
20
+ redeemedTxHash?: string | null;
21
+ affiliate: string;
22
+ isRedeemed: boolean;
23
+ isRedeemable: boolean;
24
+ isCashedOut: boolean;
25
+ freebetId?: string | null;
26
+ isFreebetAmountReturnable?: boolean | null;
27
+ paymasterContractAddress?: string | null;
28
+ tokenId: string;
29
+ createdAt: string;
30
+ resolvedAt?: string | null;
31
+ txHash: string;
32
+ redeemedAt?: string | null;
33
+ core: {
34
+ __typename?: 'CoreContract';
35
+ address: string;
36
+ liquidityPool: {
37
+ __typename?: 'LiquidityPoolContract';
38
+ address: string;
39
+ };
40
+ };
41
+ selections: Array<{
42
+ __typename?: 'V3_Selection';
43
+ odds: string;
44
+ result?: Types.SelectionResult | null;
45
+ conditionKind: Types.V3_SelectionConditionKind;
46
+ outcome: {
47
+ __typename?: 'V3_Outcome';
48
+ outcomeId: string;
49
+ title?: string | null;
50
+ condition: {
51
+ __typename?: 'V3_Condition';
52
+ conditionId: string;
53
+ title?: string | null;
54
+ status: Types.ConditionStatus;
55
+ gameId: string;
56
+ wonOutcomeIds?: Array<string> | null;
57
+ };
58
+ };
59
+ }>;
60
+ cashout?: {
61
+ __typename?: 'Cashout';
62
+ payout: string;
63
+ } | null;
64
+ }>;
65
+ };
66
+ export declare const BetsDocument: import("graphql/language/ast").DocumentNode;
@@ -0,0 +1,58 @@
1
+ import * as Types from '../types';
2
+ export type BetFragment = {
3
+ __typename?: 'V3_Bet';
4
+ id: string;
5
+ actor: string;
6
+ amount: string;
7
+ status: Types.BetStatus;
8
+ potentialPayout: string;
9
+ payout?: string | null;
10
+ result?: Types.BetResult | null;
11
+ odds: string;
12
+ settledOdds?: string | null;
13
+ redeemedTxHash?: string | null;
14
+ affiliate: string;
15
+ isRedeemed: boolean;
16
+ isRedeemable: boolean;
17
+ isCashedOut: boolean;
18
+ freebetId?: string | null;
19
+ isFreebetAmountReturnable?: boolean | null;
20
+ paymasterContractAddress?: string | null;
21
+ tokenId: string;
22
+ createdAt: string;
23
+ resolvedAt?: string | null;
24
+ txHash: string;
25
+ redeemedAt?: string | null;
26
+ core: {
27
+ __typename?: 'CoreContract';
28
+ address: string;
29
+ liquidityPool: {
30
+ __typename?: 'LiquidityPoolContract';
31
+ address: string;
32
+ };
33
+ };
34
+ selections: Array<{
35
+ __typename?: 'V3_Selection';
36
+ odds: string;
37
+ result?: Types.SelectionResult | null;
38
+ conditionKind: Types.V3_SelectionConditionKind;
39
+ outcome: {
40
+ __typename?: 'V3_Outcome';
41
+ outcomeId: string;
42
+ title?: string | null;
43
+ condition: {
44
+ __typename?: 'V3_Condition';
45
+ conditionId: string;
46
+ title?: string | null;
47
+ status: Types.ConditionStatus;
48
+ gameId: string;
49
+ wonOutcomeIds?: Array<string> | null;
50
+ };
51
+ };
52
+ }>;
53
+ cashout?: {
54
+ __typename?: 'Cashout';
55
+ payout: string;
56
+ } | null;
57
+ };
58
+ export declare const BetFragmentDoc: import("graphql/language/ast").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  import * as Types from './types';
2
2
  export type GameBetsQueryVariables = Types.Exact<{
3
- gameId: Types.Scalars['BigInt']['input'];
3
+ gameId: Types.Scalars['String']['input'];
4
4
  actor?: Types.InputMaybe<Types.Scalars['String']['input']>;
5
5
  }>;
6
6
  export type GameBetsQuery = {
@@ -42,24 +42,24 @@ export type Scalars = {
42
42
  output: number;
43
43
  };
44
44
  BigDecimal: {
45
- input: any;
46
- output: any;
45
+ input: string;
46
+ output: string;
47
47
  };
48
48
  BigInt: {
49
- input: any;
50
- output: any;
49
+ input: string;
50
+ output: string;
51
51
  };
52
52
  Bytes: {
53
- input: any;
54
- output: any;
53
+ input: string;
54
+ output: string;
55
55
  };
56
56
  Int8: {
57
- input: any;
58
- output: any;
57
+ input: string;
58
+ output: string;
59
59
  };
60
60
  Timestamp: {
61
- input: any;
62
- output: any;
61
+ input: string;
62
+ output: string;
63
63
  };
64
64
  };
65
65
  export type AffiliateMonthly = {
@@ -1,8 +1,10 @@
1
1
  export * from './bets/fragments/bettor';
2
2
  export * from './bets/fragments/legacyLiveBet';
3
3
  export * from './bets/fragments/legacyPrematchBet';
4
+ export * from './bets/fragments/bet';
4
5
  export * from './bets/bettors';
5
6
  export * from './bets/legacyBets';
6
7
  export * from './bets/gameBets';
8
+ export * from './bets/bets';
7
9
  export * from './legacy-live-feed/games';
8
10
  export { BetResult, Bet_OrderBy as Legacy_Bet_OrderBy, GameStatus as LegacyGameStatus, SelectionResult, BetStatus as GraphBetStatus, V3_Bet_OrderBy as Bet_OrderBy, ConditionStatus as BetConditionStatus, V3_SelectionConditionKind as SelectionKind, } from './bets/types';
@@ -42,24 +42,24 @@ export type Scalars = {
42
42
  output: number;
43
43
  };
44
44
  BigDecimal: {
45
- input: any;
46
- output: any;
45
+ input: string;
46
+ output: string;
47
47
  };
48
48
  BigInt: {
49
- input: any;
50
- output: any;
49
+ input: string;
50
+ output: string;
51
51
  };
52
52
  Bytes: {
53
- input: any;
54
- output: any;
53
+ input: string;
54
+ output: string;
55
55
  };
56
56
  Int8: {
57
- input: any;
58
- output: any;
57
+ input: string;
58
+ output: string;
59
59
  };
60
60
  Timestamp: {
61
- input: any;
62
- output: any;
61
+ input: string;
62
+ output: string;
63
63
  };
64
64
  };
65
65
  export declare enum Aggregation_Interval {
package/dist/global.d.ts CHANGED
@@ -33,7 +33,13 @@ export type WaveId = number | 'active';
33
33
  /** a string in format `YYYY-MM-DDTHH:mm:ss.sssZ` */
34
34
  export type ISOTimestamp = string;
35
35
  /**
36
- * Bet order states in the DB. To show aggregated states to the end user, use `getBetStatus` helper
36
+ * Bet order states in the backend.
37
+ *
38
+ * Flow:
39
+ * Created → Placed → Sent → (Accepted | Rejected) → Settled
40
+ * Cancellation may occur at any point in the flow after "Created".
41
+ *
42
+ * To show aggregated states to the end user, use `getBetStatus` helper
37
43
  * */
38
44
  export declare enum BetOrderState {
39
45
  /** First status when created */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import {gnosis,polygon,polygonAmoy,chiliz,spicy,base,baseSepolia,bscTestnet,bsc}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {isAddress,parseUnits,formatUnits}from'viem';var Environment;
1
+ import {bsc,bscTestnet,baseSepolia,base,spicy,chiliz,polygonAmoy,polygon,gnosis}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {isAddress,parseUnits,formatUnits}from'viem';var Environment;
2
2
  (function (Environment) {
3
3
  Environment["GnosisDevXDAI"] = "GnosisDevXDAI";
4
4
  Environment["GnosisXDAI"] = "GnosisXDAI";
@@ -6235,7 +6235,13 @@ const chainsDataByEnv = {
6235
6235
  [Environment.BscDevUSDT]: bscTestnetData,
6236
6236
  [Environment.BscUSDT]: bscData,
6237
6237
  };/**
6238
- * Bet order states in the DB. To show aggregated states to the end user, use `getBetStatus` helper
6238
+ * Bet order states in the backend.
6239
+ *
6240
+ * Flow:
6241
+ * Created → Placed → Sent → (Accepted | Rejected) → Settled
6242
+ * Cancellation may occur at any point in the flow after "Created".
6243
+ *
6244
+ * To show aggregated states to the end user, use `getBetStatus` helper
6239
6245
  * */
6240
6246
  var BetOrderState;
6241
6247
  (function (BetOrderState) {
@@ -6443,6 +6449,56 @@ var EventRestrictionState;
6443
6449
  cashout {
6444
6450
  payout
6445
6451
  }
6452
+ }
6453
+ `;const BetFragmentDoc = gql `
6454
+ fragment Bet on V3_Bet {
6455
+ id
6456
+ tokenId: betId
6457
+ actor
6458
+ amount
6459
+ status
6460
+ potentialPayout
6461
+ payout
6462
+ result
6463
+ odds
6464
+ settledOdds
6465
+ createdAt: createdBlockTimestamp
6466
+ resolvedAt: resolvedBlockTimestamp
6467
+ txHash: createdTxHash
6468
+ redeemedTxHash
6469
+ redeemedAt: redeemedBlockTimestamp
6470
+ affiliate
6471
+ isRedeemed
6472
+ isRedeemable
6473
+ isCashedOut
6474
+ core {
6475
+ address
6476
+ liquidityPool {
6477
+ address
6478
+ }
6479
+ }
6480
+ selections {
6481
+ odds
6482
+ result
6483
+ conditionKind
6484
+ outcome {
6485
+ outcomeId
6486
+ title
6487
+ condition {
6488
+ conditionId
6489
+ title
6490
+ status
6491
+ gameId
6492
+ wonOutcomeIds
6493
+ }
6494
+ }
6495
+ }
6496
+ freebetId
6497
+ isFreebetAmountReturnable
6498
+ paymasterContractAddress
6499
+ cashout {
6500
+ payout
6501
+ }
6446
6502
  }
6447
6503
  `;const BettorsDocument = gql `
6448
6504
  query Bettors($where: Bettor_filter!) {
@@ -6475,8 +6531,8 @@ var EventRestrictionState;
6475
6531
  }
6476
6532
  ${LegacyPrematchBetFragmentDoc}
6477
6533
  ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
6478
- query GameBets($gameId: BigInt!, $actor: String) {
6479
- bets(where: {_games_: {gameId: $gameId}, actor: $actor}) {
6534
+ query GameBets($gameId: String!, $actor: String) {
6535
+ bets(where: {_games_contains: [$gameId], actor: $actor}) {
6480
6536
  rawAmount
6481
6537
  rawPotentialPayout
6482
6538
  result
@@ -6534,7 +6590,20 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
6534
6590
  }
6535
6591
  }
6536
6592
  }
6537
- `;const LegacyLiveGamesDocument = gql `
6593
+ `;const BetsDocument = gql `
6594
+ query Bets($first: Int, $skip: Int, $where: V3_Bet_filter!) {
6595
+ v3Bets(
6596
+ first: $first
6597
+ skip: $skip
6598
+ where: $where
6599
+ orderBy: createdBlockNumber
6600
+ orderDirection: desc
6601
+ subgraphError: allow
6602
+ ) {
6603
+ ...Bet
6604
+ }
6605
+ }
6606
+ ${BetFragmentDoc}`;const LegacyLiveGamesDocument = gql `
6538
6607
  query LegacyLiveGames($first: Int, $skip: Int, $where: Game_filter!, $orderBy: Game_orderBy, $orderDirection: OrderDirection) {
6539
6608
  games(
6540
6609
  first: $first
@@ -7367,14 +7436,6 @@ var _SubgraphErrorPolicy_;
7367
7436
  /**
7368
7437
  * Extracts the provider ID from a condition ID string.
7369
7438
  * The provider ID is encoded in characters 2-4 of the condition ID.
7370
- *
7371
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getProviderFromId
7372
- *
7373
- * @example
7374
- * import { getProviderFromId } from '@azuro-org/toolkit'
7375
- *
7376
- * const providerId = getProviderFromId('C001234567890')
7377
- * console.log(providerId) // 001
7378
7439
  * */
7379
7440
  const getProviderFromId = (id) => {
7380
7441
  return +(id.slice(1, 1 + CONDITION_PROVIDER_LENGTH));
@@ -7384,7 +7445,7 @@ const getProviderFromId = (id) => {
7384
7445
  return +value;
7385
7446
  }
7386
7447
  const [int, digits] = value.split('.');
7387
- if (!digitsCount || digitsCount < 0 || !digits?.length || digits.length < digitsCount) {
7448
+ if (!digits?.length || digits.length < digitsCount) {
7388
7449
  return +(int || 0);
7389
7450
  }
7390
7451
  return +`${int}.${digits.slice(0, digitsCount)}`;
@@ -7393,7 +7454,7 @@ const getProviderFromId = (id) => {
7393
7454
  * Calculates the minimum acceptable odds considering slippage for single or combo bets.
7394
7455
  * For combo bets, applies fee modifiers and multiplies individual odds to calculate total odds.
7395
7456
  *
7396
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
7457
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
7397
7458
  *
7398
7459
  * @example
7399
7460
  * import { calcMindOdds } from '@azuro-org/toolkit'
@@ -7441,7 +7502,7 @@ const normalizeTimestampToMs = (timestamp) => {
7441
7502
  * Determines if a game is pending resolution after completion.
7442
7503
  * Returns true if the game is in Live state but has exceeded the expected resolution window (100 minutes after start).
7443
7504
  *
7444
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
7505
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
7445
7506
  *
7446
7507
  * @example
7447
7508
  * import { getIsPendingResolution, GameState } from '@azuro-org/toolkit'
@@ -7464,7 +7525,7 @@ const getIsPendingResolution = ({ state, startsAt }) => {
7464
7525
  * Groups game conditions by their market types and sorts them according to sport-specific ordering.
7465
7526
  * It processes outcomes to include selection names, handles duplicate conditions, and organizes data for display.
7466
7527
  *
7467
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
7528
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
7468
7529
  *
7469
7530
  * @example
7470
7531
  * import { groupConditionsByMarket } from '@azuro-org/toolkit'
@@ -7618,7 +7679,7 @@ const filterLastGames = (games) => {
7618
7679
  * Determines the current status of a bet based on order state, on-chain status, and game states.
7619
7680
  * Returns a unified bet status that combines API order state and blockchain data.
7620
7681
  *
7621
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBetStatus
7682
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetStatus
7622
7683
  *
7623
7684
  * @example
7624
7685
  * import { getBetStatus, BetStatus } from '@azuro-org/toolkit'
@@ -7667,7 +7728,7 @@ const getBetStatus = (props) => {
7667
7728
  * Retrieves the current relayer fee information for placing bets on a specific chain.
7668
7729
  * Returns gas price, bet token rate, and calculated relayer fee amount.
7669
7730
  *
7670
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBetFee
7731
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetFee
7671
7732
  *
7672
7733
  * @example
7673
7734
  * import { getBetFee } from '@azuro-org/toolkit'
@@ -7692,7 +7753,7 @@ const getBetFee = async (chainId) => {
7692
7753
  * Generates EIP-712 typed data for signing a single (ordinary) bet.
7693
7754
  * This typed data is used with wallet signing methods to create a bet signature.
7694
7755
  *
7695
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBetTypedData
7756
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetTypedData
7696
7757
  *
7697
7758
  * @example
7698
7759
  * import { getBetTypedData } from '@azuro-org/toolkit'
@@ -7752,7 +7813,7 @@ const getBetTypedData = (props) => {
7752
7813
  * Generates EIP-712 typed data for signing a combo (parlay) bet.
7753
7814
  * This typed data is used with wallet signing methods to create a combo bet signature.
7754
7815
  *
7755
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getComboBetTypedData
7816
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getComboBetTypedData
7756
7817
  *
7757
7818
  * @example
7758
7819
  * import { getComboBetTypedData } from '@azuro-org/toolkit'
@@ -7814,7 +7875,7 @@ const getComboBetTypedData = (props) => {
7814
7875
  * Creates a single (ordinary) bet by submitting signed bet data to the Azuro API.
7815
7876
  * This function sends the bet order to the relayer which will then place the bet on-chain.
7816
7877
  *
7817
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/createBet
7878
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createBet
7818
7879
  *
7819
7880
  * @example
7820
7881
  * import { createBet } from '@azuro-org/toolkit'
@@ -7874,7 +7935,7 @@ const createBet = async (props) => {
7874
7935
  * Creates a combo (parlay) bet by submitting signed bet data to the Azuro API.
7875
7936
  * This function sends the combo bet order to the relayer which will then place the bet on-chain.
7876
7937
  *
7877
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/createComboBet
7938
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createComboBet
7878
7939
  *
7879
7940
  * @example
7880
7941
  * import { createComboBet } from '@azuro-org/toolkit'
@@ -7939,7 +8000,7 @@ const createComboBet = async (props) => {
7939
8000
  * Retrieves bet order data by order ID from the Azuro API.
7940
8001
  * Returns null if the bet order is not found.
7941
8002
  *
7942
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBet
8003
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBet
7943
8004
  *
7944
8005
  * @example
7945
8006
  * import { getBet } from '@azuro-org/toolkit'
@@ -7970,7 +8031,7 @@ const getBet = async ({ chainId, orderId }) => {
7970
8031
  * User's account is required to provide the **correct** maximum bet amount.
7971
8032
  * It may be undefined if the user isn't logged in.
7972
8033
  *
7973
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBetCalculation
8034
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetCalculation
7974
8035
  *
7975
8036
  * @example
7976
8037
  * import { getBetCalculation } from '@azuro-org/toolkit'
@@ -8029,7 +8090,7 @@ function serializeApiParams(struct) {
8029
8090
  * Retrieves all bet orders for a specific bettor address with optional filtering.
8030
8091
  * Supports pagination and filtering by state, result, affiliate, and redemption status.
8031
8092
  *
8032
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/bet/getBetsByBettor
8093
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetsByBettor
8033
8094
  *
8034
8095
  * @example
8035
8096
  * import { getBetsByBettor } from '@azuro-org/toolkit'
@@ -8040,13 +8101,13 @@ function serializeApiParams(struct) {
8040
8101
  * // Get all bets
8041
8102
  * const allBets = await getBetsByBettor({ chainId, bettor })
8042
8103
  *
8043
- * // Get only resolved bets
8044
- * const resolvedBets = await getBetsByBettor({
8104
+ * // Get only redeemable bets
8105
+ * const redeemableBets = await getBetsByBettor({
8045
8106
  * chainId,
8046
8107
  * bettor,
8047
- * state: 'Sent',
8048
- * result: 'Won',
8049
- * limit: 50,
8108
+ * result: [BetOrderResult.Won, BetOrderResult.Canceled],
8109
+ * isRedeemed: false,
8110
+ * limit: 1000,
8050
8111
  * })
8051
8112
  * */
8052
8113
  const getBetsByBettor = async (props) => {
@@ -8080,7 +8141,7 @@ const getBetsByBettor = async (props) => {
8080
8141
  * Fetches detailed conditions data for a given list of game IDs.
8081
8142
  * Returns comprehensive condition information including outcomes, odds, and game relationships.
8082
8143
  *
8083
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getConditionsByGameIds
8144
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsByGameIds
8084
8145
  *
8085
8146
  * @example
8086
8147
  * import { getConditionsByGameIds } from '@azuro-org/toolkit'
@@ -8117,7 +8178,7 @@ const getConditionsByGameIds = async (props) => {
8117
8178
  };/**
8118
8179
  * Fetches up-to-date condition states and outcome odds for a list of conditions.
8119
8180
  *
8120
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getConditionsState
8181
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsState
8121
8182
  *
8122
8183
  * @example
8123
8184
  * import { getConditionsState } from '@azuro-org/toolkit'
@@ -8157,7 +8218,7 @@ const getConditionsState = async (props) => {
8157
8218
  * Fetches games by applying various filters such as sport, league, or game state.
8158
8219
  * Returns paginated results ideal for building sport/country/league listing pages.
8159
8220
  *
8160
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getGamesByFilters
8221
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByFilters
8161
8222
  *
8162
8223
  * @example
8163
8224
  * import { GameState, getGamesByFilters } from '@azuro-org/toolkit'
@@ -8202,7 +8263,7 @@ const getGamesByFilters = async (props) => {
8202
8263
  * Fetches game data for a specific list of game IDs.
8203
8264
  * Returns detailed information for each requested game including participants, timing, and league data.
8204
8265
  *
8205
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getGamesByIds
8266
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByIds
8206
8267
  *
8207
8268
  * @example
8208
8269
  * import { getGamesByIds } from '@azuro-org/toolkit'
@@ -8241,7 +8302,7 @@ const getGamesByIds = async (props) => {
8241
8302
  * Fetches navigation structure with sports, countries, and leagues hierarchy.
8242
8303
  * Returns active game counts at each level for building navigation menus.
8243
8304
  *
8244
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getNavigation
8305
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getNavigation
8245
8306
  *
8246
8307
  * @example
8247
8308
  * import { getNavigation } from '@azuro-org/toolkit'
@@ -8282,7 +8343,7 @@ const getNavigation = async (props) => {
8282
8343
  * Fetches a complete sports hierarchy including countries, leagues, and games.
8283
8344
  * Returns nested structure with all games organized by sport, country, and league.
8284
8345
  *
8285
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/getSports
8346
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getSports
8286
8347
  *
8287
8348
  * @example
8288
8349
  * import { GameState, getSports } from '@azuro-org/toolkit'
@@ -8326,7 +8387,7 @@ const getSports = async (props) => {
8326
8387
  * Searches for games by text query across game titles, leagues, and countries.
8327
8388
  * The minimum query length is 3 characters. Returns paginated results.
8328
8389
  *
8329
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/feed/searchGames
8390
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/searchGames
8330
8391
  *
8331
8392
  * @example
8332
8393
  * import { searchGames } from '@azuro-org/toolkit'
@@ -8472,7 +8533,7 @@ const getWaveLevels = async ({ waveId, chainId } = { waveId: 'active', chainId:
8472
8533
  * Retrieves precalculated cashout availability and prices for specified conditions.
8473
8534
  * Returns margin information and outcome prices for each available condition.
8474
8535
  *
8475
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
8536
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
8476
8537
  *
8477
8538
  * @example
8478
8539
  * import { getPrecalculatedCashouts } from '@azuro-org/toolkit'
@@ -8522,7 +8583,7 @@ const getPrecalculatedCashouts = async (props) => {
8522
8583
  * Retrieves the calculated cashout information for a specific bet, including the cashout amount and odds.
8523
8584
  * Returns null if no cashout calculation is available for the bet.
8524
8585
  *
8525
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
8586
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
8526
8587
  *
8527
8588
  * @example
8528
8589
  * import { getCalculatedCashout } from '@azuro-org/toolkit'
@@ -8576,7 +8637,7 @@ const getCalculatedCashout = async (props) => {
8576
8637
  * Generates EIP-712 typed data for signing a cashout order.
8577
8638
  * This typed data must be signed by the user before submitting the cashout.
8578
8639
  *
8579
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
8640
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
8580
8641
  *
8581
8642
  * @example
8582
8643
  * import { getCashoutTypedData } from '@azuro-org/toolkit'
@@ -8641,7 +8702,7 @@ const getCashoutTypedData = (props) => {
8641
8702
  * Creates a cashout order for an existing bet by submitting the signed cashout calculation to the Azuro API.
8642
8703
  * This finalizes the cashout process after obtaining a calculation and signing the typed data.
8643
8704
  *
8644
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
8705
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
8645
8706
  *
8646
8707
  * @example
8647
8708
  * import { createCashout } from '@azuro-org/toolkit'
@@ -8693,7 +8754,7 @@ const createCashout = async (props) => {
8693
8754
  * Retrieves the status and details of a cashout order by its order ID.
8694
8755
  * Returns null if the cashout order is not found.
8695
8756
  *
8696
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
8757
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
8697
8758
  *
8698
8759
  * @example
8699
8760
  * import { getCashout } from '@azuro-org/toolkit'
@@ -8726,7 +8787,7 @@ const getCashout = async ({ chainId, orderId }) => {
8726
8787
  * Fetches all bonuses for a bettor account filtered by status.
8727
8788
  * By default, retrieves only available bonuses. Returns null if no bonuses are found.
8728
8789
  *
8729
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
8790
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
8730
8791
  *
8731
8792
  * @example
8732
8793
  * import { getBonuses, BonusStatus } from '@azuro-org/toolkit'
@@ -8806,7 +8867,7 @@ const getBonuses = async (props) => {
8806
8867
  * Retrieves available freebets for a bettor that can be applied to specific bet selections.
8807
8868
  * Returns null if no freebets are available for the given selections.
8808
8869
  *
8809
- * - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
8870
+ * - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
8810
8871
  *
8811
8872
  * @example
8812
8873
  * import { getAvailableFreebets } from '@azuro-org/toolkit'
@@ -8883,4 +8944,4 @@ const getAvailableFreebets = async ({ chainId, account, affiliate, selections })
8883
8944
  publicCustomData: bonus.publicCustomData,
8884
8945
  };
8885
8946
  });
8886
- };export{BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetOrderResult,BetOrderState,BetRestrictionType,BetResult,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BettorFragmentDoc,BettorsDocument,BonusStatus,BonusType,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionState,Environment,EventRestrictionState,FreebetType,GameBetsDocument,GameOrderBy,GameState,BetStatus$1 as GraphBetStatus,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,ODDS_COMBO_FEE_MODIFIER,ODDS_DECIMALS,OrderDirection$1 as OrderDirection,V3_SelectionConditionKind as SelectionKind,SelectionResult,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,WaveLevelName,activateWave,azuroBetAbi,baseData,baseSepoliaData,bscData,bscTestnetData,calcMinOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,getApiEndpoint,getAvailableFreebets,getBet,getBetCalculation,getBetFee,getBetStatus,getBetTypedData,getBetsByBettor,getBetsGraphqlEndpoint,getBonuses,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getConditionsByGameIds,getConditionsState,getFeedGraphqlEndpoint,getGamesByFilters,getGamesByIds,getIsPendingResolution,getNavigation,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getSports,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,paymasterAbi,polygonAmoyData,polygonData,relayerAbi,searchGames,setupContracts,spicyData,vaultAbi};//# sourceMappingURL=index.js.map
8947
+ };export{BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetOrderResult,BetOrderState,BetRestrictionType,BetResult,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,BonusStatus,BonusType,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionState,Environment,EventRestrictionState,FreebetType,GameBetsDocument,GameOrderBy,GameState,BetStatus$1 as GraphBetStatus,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,ODDS_COMBO_FEE_MODIFIER,ODDS_DECIMALS,OrderDirection$1 as OrderDirection,V3_SelectionConditionKind as SelectionKind,SelectionResult,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,WaveLevelName,activateWave,azuroBetAbi,baseData,baseSepoliaData,bscData,bscTestnetData,calcMinOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,getApiEndpoint,getAvailableFreebets,getBet,getBetCalculation,getBetFee,getBetStatus,getBetTypedData,getBetsByBettor,getBetsGraphqlEndpoint,getBonuses,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getConditionsByGameIds,getConditionsState,getFeedGraphqlEndpoint,getGamesByFilters,getGamesByIds,getIsPendingResolution,getNavigation,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getSports,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,paymasterAbi,polygonAmoyData,polygonData,relayerAbi,searchGames,setupContracts,spicyData,vaultAbi};//# sourceMappingURL=index.js.map