@azuro-org/toolkit 6.0.0-beta.7 → 6.0.0-beta.9
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/docs/bets/bets.d.ts +65 -0
- package/dist/docs/bets/bettors.d.ts +1 -1
- package/dist/docs/bets/fragments/bet.d.ts +57 -0
- package/dist/docs/bets/fragments/bettor.d.ts +1 -1
- package/dist/docs/bets/fragments/legacyLiveBet.d.ts +1 -1
- package/dist/docs/bets/fragments/legacyPrematchBet.d.ts +1 -1
- package/dist/docs/bets/gameBets.d.ts +1 -1
- package/dist/docs/bets/legacyBets.d.ts +1 -1
- package/dist/docs/feed/condition.d.ts +1 -1
- package/dist/docs/feed/conditions.d.ts +1 -1
- package/dist/docs/feed/conditionsBatch.d.ts +1 -1
- package/dist/docs/feed/fragments/condition.d.ts +1 -1
- package/dist/docs/feed/fragments/gameInfo.d.ts +1 -1
- package/dist/docs/feed/game.d.ts +1 -1
- package/dist/docs/feed/games.d.ts +1 -1
- package/dist/docs/feed/navigation.d.ts +1 -1
- package/dist/docs/feed/sports.d.ts +1 -1
- package/dist/docs/feed/sportsNavigation.d.ts +1 -1
- package/dist/docs/index.d.ts +2 -0
- package/dist/docs/legacy-live-feed/games.d.ts +1 -1
- package/dist/global.d.ts +7 -1
- package/dist/helpers/gqlRequest.d.ts +8 -0
- package/dist/index.js +103 -43
- package/dist/index.js.map +1 -1
- package/dist/utils/bet/createBet.d.ts +1 -1
- package/dist/utils/bet/createComboBet.d.ts +1 -1
- package/dist/utils/bet/getBet.d.ts +1 -1
- package/dist/utils/bet/getBetCalculation.d.ts +1 -1
- package/dist/utils/bet/getBetFee.d.ts +1 -1
- package/dist/utils/bet/getBetStatus.d.ts +1 -1
- package/dist/utils/bet/getBetTypedData.d.ts +1 -1
- package/dist/utils/bet/getBetsByBettor.d.ts +6 -6
- package/dist/utils/bet/getComboBetTypedData.d.ts +1 -1
- package/dist/utils/bet/types.d.ts +3 -0
- package/dist/utils/bonus/getAvailableFreebets.d.ts +1 -1
- package/dist/utils/bonus/getBonuses.d.ts +1 -1
- package/dist/utils/calcMinOdds.d.ts +1 -1
- package/dist/utils/cashout/createCashout.d.ts +1 -1
- package/dist/utils/cashout/getCalculatedCashout.d.ts +1 -1
- package/dist/utils/cashout/getCashout.d.ts +1 -1
- package/dist/utils/cashout/getCashoutTypedData.d.ts +1 -1
- package/dist/utils/cashout/getPrecalculatedCashouts.d.ts +1 -1
- package/dist/utils/feed/getConditionsByGameIds.d.ts +1 -1
- package/dist/utils/feed/getConditionsState.d.ts +1 -1
- package/dist/utils/feed/getGamesByFilters.d.ts +1 -1
- package/dist/utils/feed/getGamesByIds.d.ts +1 -1
- package/dist/utils/feed/getNavigation.d.ts +1 -1
- package/dist/utils/feed/getSports.d.ts +1 -1
- package/dist/utils/feed/searchGames.d.ts +1 -1
- package/dist/utils/getIsPendingResolution.d.ts +1 -1
- package/dist/utils/getProviderFromId.d.ts +0 -8
- package/dist/utils/groupConditionsByMarket.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
core: {
|
|
33
|
+
__typename?: 'CoreContract';
|
|
34
|
+
address: string;
|
|
35
|
+
liquidityPool: {
|
|
36
|
+
__typename?: 'LiquidityPoolContract';
|
|
37
|
+
address: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
selections: Array<{
|
|
41
|
+
__typename?: 'V3_Selection';
|
|
42
|
+
odds: string;
|
|
43
|
+
result?: Types.SelectionResult | null;
|
|
44
|
+
conditionKind: Types.V3_SelectionConditionKind;
|
|
45
|
+
outcome: {
|
|
46
|
+
__typename?: 'V3_Outcome';
|
|
47
|
+
outcomeId: string;
|
|
48
|
+
title?: string | null;
|
|
49
|
+
condition: {
|
|
50
|
+
__typename?: 'V3_Condition';
|
|
51
|
+
conditionId: string;
|
|
52
|
+
title?: string | null;
|
|
53
|
+
status: Types.ConditionStatus;
|
|
54
|
+
gameId: string;
|
|
55
|
+
wonOutcomeIds?: Array<string> | null;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
cashout?: {
|
|
60
|
+
__typename?: 'Cashout';
|
|
61
|
+
payout: string;
|
|
62
|
+
} | null;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
export declare const BetsDocument: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
core: {
|
|
26
|
+
__typename?: 'CoreContract';
|
|
27
|
+
address: string;
|
|
28
|
+
liquidityPool: {
|
|
29
|
+
__typename?: 'LiquidityPoolContract';
|
|
30
|
+
address: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
selections: Array<{
|
|
34
|
+
__typename?: 'V3_Selection';
|
|
35
|
+
odds: string;
|
|
36
|
+
result?: Types.SelectionResult | null;
|
|
37
|
+
conditionKind: Types.V3_SelectionConditionKind;
|
|
38
|
+
outcome: {
|
|
39
|
+
__typename?: 'V3_Outcome';
|
|
40
|
+
outcomeId: string;
|
|
41
|
+
title?: string | null;
|
|
42
|
+
condition: {
|
|
43
|
+
__typename?: 'V3_Condition';
|
|
44
|
+
conditionId: string;
|
|
45
|
+
title?: string | null;
|
|
46
|
+
status: Types.ConditionStatus;
|
|
47
|
+
gameId: string;
|
|
48
|
+
wonOutcomeIds?: Array<string> | null;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
cashout?: {
|
|
53
|
+
__typename?: 'Cashout';
|
|
54
|
+
payout: string;
|
|
55
|
+
} | null;
|
|
56
|
+
};
|
|
57
|
+
export declare const BetFragmentDoc: import("graphql").DocumentNode;
|
package/dist/docs/feed/game.d.ts
CHANGED
package/dist/docs/index.d.ts
CHANGED
|
@@ -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';
|
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
|
|
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 */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DocumentNode } from 'graphql';
|
|
2
|
+
type Props<TVariables> = {
|
|
3
|
+
url: string;
|
|
4
|
+
document: DocumentNode;
|
|
5
|
+
variables?: TVariables extends Record<string, never> ? never : TVariables;
|
|
6
|
+
};
|
|
7
|
+
export declare const gqlRequest: <TResult, TVariables>(props: Props<TVariables>) => Promise<TResult>;
|
|
8
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -6235,7 +6235,13 @@ const chainsDataByEnv = {
|
|
|
6235
6235
|
[Environment.BscDevUSDT]: bscTestnetData,
|
|
6236
6236
|
[Environment.BscUSDT]: bscData,
|
|
6237
6237
|
};/**
|
|
6238
|
-
* Bet order states in the
|
|
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,55 @@ 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
|
+
affiliate
|
|
6470
|
+
isRedeemed
|
|
6471
|
+
isRedeemable
|
|
6472
|
+
isCashedOut
|
|
6473
|
+
core {
|
|
6474
|
+
address
|
|
6475
|
+
liquidityPool {
|
|
6476
|
+
address
|
|
6477
|
+
}
|
|
6478
|
+
}
|
|
6479
|
+
selections {
|
|
6480
|
+
odds
|
|
6481
|
+
result
|
|
6482
|
+
conditionKind
|
|
6483
|
+
outcome {
|
|
6484
|
+
outcomeId
|
|
6485
|
+
title
|
|
6486
|
+
condition {
|
|
6487
|
+
conditionId
|
|
6488
|
+
title
|
|
6489
|
+
status
|
|
6490
|
+
gameId
|
|
6491
|
+
wonOutcomeIds
|
|
6492
|
+
}
|
|
6493
|
+
}
|
|
6494
|
+
}
|
|
6495
|
+
freebetId
|
|
6496
|
+
isFreebetAmountReturnable
|
|
6497
|
+
paymasterContractAddress
|
|
6498
|
+
cashout {
|
|
6499
|
+
payout
|
|
6500
|
+
}
|
|
6446
6501
|
}
|
|
6447
6502
|
`;const BettorsDocument = gql `
|
|
6448
6503
|
query Bettors($where: Bettor_filter!) {
|
|
@@ -6534,7 +6589,20 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
|
|
|
6534
6589
|
}
|
|
6535
6590
|
}
|
|
6536
6591
|
}
|
|
6537
|
-
`;const
|
|
6592
|
+
`;const BetsDocument = gql `
|
|
6593
|
+
query Bets($first: Int, $skip: Int, $where: V3_Bet_filter!) {
|
|
6594
|
+
v3Bets(
|
|
6595
|
+
first: $first
|
|
6596
|
+
skip: $skip
|
|
6597
|
+
where: $where
|
|
6598
|
+
orderBy: createdBlockNumber
|
|
6599
|
+
orderDirection: desc
|
|
6600
|
+
subgraphError: allow
|
|
6601
|
+
) {
|
|
6602
|
+
...Bet
|
|
6603
|
+
}
|
|
6604
|
+
}
|
|
6605
|
+
${BetFragmentDoc}`;const LegacyLiveGamesDocument = gql `
|
|
6538
6606
|
query LegacyLiveGames($first: Int, $skip: Int, $where: Game_filter!, $orderBy: Game_orderBy, $orderDirection: OrderDirection) {
|
|
6539
6607
|
games(
|
|
6540
6608
|
first: $first
|
|
@@ -7367,14 +7435,6 @@ var _SubgraphErrorPolicy_;
|
|
|
7367
7435
|
/**
|
|
7368
7436
|
* Extracts the provider ID from a condition ID string.
|
|
7369
7437
|
* 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
7438
|
* */
|
|
7379
7439
|
const getProviderFromId = (id) => {
|
|
7380
7440
|
return +(id.slice(1, 1 + CONDITION_PROVIDER_LENGTH));
|
|
@@ -7393,7 +7453,7 @@ const getProviderFromId = (id) => {
|
|
|
7393
7453
|
* Calculates the minimum acceptable odds considering slippage for single or combo bets.
|
|
7394
7454
|
* For combo bets, applies fee modifiers and multiplies individual odds to calculate total odds.
|
|
7395
7455
|
*
|
|
7396
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
|
|
7456
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
|
|
7397
7457
|
*
|
|
7398
7458
|
* @example
|
|
7399
7459
|
* import { calcMindOdds } from '@azuro-org/toolkit'
|
|
@@ -7441,7 +7501,7 @@ const normalizeTimestampToMs = (timestamp) => {
|
|
|
7441
7501
|
* Determines if a game is pending resolution after completion.
|
|
7442
7502
|
* Returns true if the game is in Live state but has exceeded the expected resolution window (100 minutes after start).
|
|
7443
7503
|
*
|
|
7444
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
7504
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
7445
7505
|
*
|
|
7446
7506
|
* @example
|
|
7447
7507
|
* import { getIsPendingResolution, GameState } from '@azuro-org/toolkit'
|
|
@@ -7464,7 +7524,7 @@ const getIsPendingResolution = ({ state, startsAt }) => {
|
|
|
7464
7524
|
* Groups game conditions by their market types and sorts them according to sport-specific ordering.
|
|
7465
7525
|
* It processes outcomes to include selection names, handles duplicate conditions, and organizes data for display.
|
|
7466
7526
|
*
|
|
7467
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
7527
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
7468
7528
|
*
|
|
7469
7529
|
* @example
|
|
7470
7530
|
* import { groupConditionsByMarket } from '@azuro-org/toolkit'
|
|
@@ -7618,7 +7678,7 @@ const filterLastGames = (games) => {
|
|
|
7618
7678
|
* Determines the current status of a bet based on order state, on-chain status, and game states.
|
|
7619
7679
|
* Returns a unified bet status that combines API order state and blockchain data.
|
|
7620
7680
|
*
|
|
7621
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7681
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetStatus
|
|
7622
7682
|
*
|
|
7623
7683
|
* @example
|
|
7624
7684
|
* import { getBetStatus, BetStatus } from '@azuro-org/toolkit'
|
|
@@ -7658,7 +7718,7 @@ const getBetStatus = (props) => {
|
|
|
7658
7718
|
|| lastGames.some((game) => getIsPendingResolution(game))) {
|
|
7659
7719
|
return BetStatus.PendingResolution;
|
|
7660
7720
|
}
|
|
7661
|
-
const isLive = games
|
|
7721
|
+
const isLive = games?.some(game => game.state === GameState.Live);
|
|
7662
7722
|
if (isLive) {
|
|
7663
7723
|
return BetStatus.Live;
|
|
7664
7724
|
}
|
|
@@ -7667,7 +7727,7 @@ const getBetStatus = (props) => {
|
|
|
7667
7727
|
* Retrieves the current relayer fee information for placing bets on a specific chain.
|
|
7668
7728
|
* Returns gas price, bet token rate, and calculated relayer fee amount.
|
|
7669
7729
|
*
|
|
7670
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7730
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetFee
|
|
7671
7731
|
*
|
|
7672
7732
|
* @example
|
|
7673
7733
|
* import { getBetFee } from '@azuro-org/toolkit'
|
|
@@ -7692,7 +7752,7 @@ const getBetFee = async (chainId) => {
|
|
|
7692
7752
|
* Generates EIP-712 typed data for signing a single (ordinary) bet.
|
|
7693
7753
|
* This typed data is used with wallet signing methods to create a bet signature.
|
|
7694
7754
|
*
|
|
7695
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7755
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetTypedData
|
|
7696
7756
|
*
|
|
7697
7757
|
* @example
|
|
7698
7758
|
* import { getBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -7752,7 +7812,7 @@ const getBetTypedData = (props) => {
|
|
|
7752
7812
|
* Generates EIP-712 typed data for signing a combo (parlay) bet.
|
|
7753
7813
|
* This typed data is used with wallet signing methods to create a combo bet signature.
|
|
7754
7814
|
*
|
|
7755
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7815
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getComboBetTypedData
|
|
7756
7816
|
*
|
|
7757
7817
|
* @example
|
|
7758
7818
|
* import { getComboBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -7814,7 +7874,7 @@ const getComboBetTypedData = (props) => {
|
|
|
7814
7874
|
* Creates a single (ordinary) bet by submitting signed bet data to the Azuro API.
|
|
7815
7875
|
* This function sends the bet order to the relayer which will then place the bet on-chain.
|
|
7816
7876
|
*
|
|
7817
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7877
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createBet
|
|
7818
7878
|
*
|
|
7819
7879
|
* @example
|
|
7820
7880
|
* import { createBet } from '@azuro-org/toolkit'
|
|
@@ -7874,7 +7934,7 @@ const createBet = async (props) => {
|
|
|
7874
7934
|
* Creates a combo (parlay) bet by submitting signed bet data to the Azuro API.
|
|
7875
7935
|
* This function sends the combo bet order to the relayer which will then place the bet on-chain.
|
|
7876
7936
|
*
|
|
7877
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
7937
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createComboBet
|
|
7878
7938
|
*
|
|
7879
7939
|
* @example
|
|
7880
7940
|
* import { createComboBet } from '@azuro-org/toolkit'
|
|
@@ -7939,7 +7999,7 @@ const createComboBet = async (props) => {
|
|
|
7939
7999
|
* Retrieves bet order data by order ID from the Azuro API.
|
|
7940
8000
|
* Returns null if the bet order is not found.
|
|
7941
8001
|
*
|
|
7942
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8002
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBet
|
|
7943
8003
|
*
|
|
7944
8004
|
* @example
|
|
7945
8005
|
* import { getBet } from '@azuro-org/toolkit'
|
|
@@ -7970,7 +8030,7 @@ const getBet = async ({ chainId, orderId }) => {
|
|
|
7970
8030
|
* User's account is required to provide the **correct** maximum bet amount.
|
|
7971
8031
|
* It may be undefined if the user isn't logged in.
|
|
7972
8032
|
*
|
|
7973
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8033
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetCalculation
|
|
7974
8034
|
*
|
|
7975
8035
|
* @example
|
|
7976
8036
|
* import { getBetCalculation } from '@azuro-org/toolkit'
|
|
@@ -8029,7 +8089,7 @@ function serializeApiParams(struct) {
|
|
|
8029
8089
|
* Retrieves all bet orders for a specific bettor address with optional filtering.
|
|
8030
8090
|
* Supports pagination and filtering by state, result, affiliate, and redemption status.
|
|
8031
8091
|
*
|
|
8032
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8092
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetsByBettor
|
|
8033
8093
|
*
|
|
8034
8094
|
* @example
|
|
8035
8095
|
* import { getBetsByBettor } from '@azuro-org/toolkit'
|
|
@@ -8040,13 +8100,13 @@ function serializeApiParams(struct) {
|
|
|
8040
8100
|
* // Get all bets
|
|
8041
8101
|
* const allBets = await getBetsByBettor({ chainId, bettor })
|
|
8042
8102
|
*
|
|
8043
|
-
* // Get only
|
|
8044
|
-
* const
|
|
8103
|
+
* // Get only redeemable bets
|
|
8104
|
+
* const redeemableBets = await getBetsByBettor({
|
|
8045
8105
|
* chainId,
|
|
8046
8106
|
* bettor,
|
|
8047
|
-
*
|
|
8048
|
-
*
|
|
8049
|
-
* limit:
|
|
8107
|
+
* result: [BetOrderResult.Won, BetOrderResult.Canceled],
|
|
8108
|
+
* isRedeemed: false,
|
|
8109
|
+
* limit: 1000,
|
|
8050
8110
|
* })
|
|
8051
8111
|
* */
|
|
8052
8112
|
const getBetsByBettor = async (props) => {
|
|
@@ -8080,7 +8140,7 @@ const getBetsByBettor = async (props) => {
|
|
|
8080
8140
|
* Fetches detailed conditions data for a given list of game IDs.
|
|
8081
8141
|
* Returns comprehensive condition information including outcomes, odds, and game relationships.
|
|
8082
8142
|
*
|
|
8083
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8143
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsByGameIds
|
|
8084
8144
|
*
|
|
8085
8145
|
* @example
|
|
8086
8146
|
* import { getConditionsByGameIds } from '@azuro-org/toolkit'
|
|
@@ -8117,7 +8177,7 @@ const getConditionsByGameIds = async (props) => {
|
|
|
8117
8177
|
};/**
|
|
8118
8178
|
* Fetches up-to-date condition states and outcome odds for a list of conditions.
|
|
8119
8179
|
*
|
|
8120
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8180
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsState
|
|
8121
8181
|
*
|
|
8122
8182
|
* @example
|
|
8123
8183
|
* import { getConditionsState } from '@azuro-org/toolkit'
|
|
@@ -8157,7 +8217,7 @@ const getConditionsState = async (props) => {
|
|
|
8157
8217
|
* Fetches games by applying various filters such as sport, league, or game state.
|
|
8158
8218
|
* Returns paginated results ideal for building sport/country/league listing pages.
|
|
8159
8219
|
*
|
|
8160
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8220
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByFilters
|
|
8161
8221
|
*
|
|
8162
8222
|
* @example
|
|
8163
8223
|
* import { GameState, getGamesByFilters } from '@azuro-org/toolkit'
|
|
@@ -8202,7 +8262,7 @@ const getGamesByFilters = async (props) => {
|
|
|
8202
8262
|
* Fetches game data for a specific list of game IDs.
|
|
8203
8263
|
* Returns detailed information for each requested game including participants, timing, and league data.
|
|
8204
8264
|
*
|
|
8205
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8265
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByIds
|
|
8206
8266
|
*
|
|
8207
8267
|
* @example
|
|
8208
8268
|
* import { getGamesByIds } from '@azuro-org/toolkit'
|
|
@@ -8241,7 +8301,7 @@ const getGamesByIds = async (props) => {
|
|
|
8241
8301
|
* Fetches navigation structure with sports, countries, and leagues hierarchy.
|
|
8242
8302
|
* Returns active game counts at each level for building navigation menus.
|
|
8243
8303
|
*
|
|
8244
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8304
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getNavigation
|
|
8245
8305
|
*
|
|
8246
8306
|
* @example
|
|
8247
8307
|
* import { getNavigation } from '@azuro-org/toolkit'
|
|
@@ -8282,7 +8342,7 @@ const getNavigation = async (props) => {
|
|
|
8282
8342
|
* Fetches a complete sports hierarchy including countries, leagues, and games.
|
|
8283
8343
|
* Returns nested structure with all games organized by sport, country, and league.
|
|
8284
8344
|
*
|
|
8285
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8345
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getSports
|
|
8286
8346
|
*
|
|
8287
8347
|
* @example
|
|
8288
8348
|
* import { GameState, getSports } from '@azuro-org/toolkit'
|
|
@@ -8326,7 +8386,7 @@ const getSports = async (props) => {
|
|
|
8326
8386
|
* Searches for games by text query across game titles, leagues, and countries.
|
|
8327
8387
|
* The minimum query length is 3 characters. Returns paginated results.
|
|
8328
8388
|
*
|
|
8329
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
8389
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/searchGames
|
|
8330
8390
|
*
|
|
8331
8391
|
* @example
|
|
8332
8392
|
* import { searchGames } from '@azuro-org/toolkit'
|
|
@@ -8472,7 +8532,7 @@ const getWaveLevels = async ({ waveId, chainId } = { waveId: 'active', chainId:
|
|
|
8472
8532
|
* Retrieves precalculated cashout availability and prices for specified conditions.
|
|
8473
8533
|
* Returns margin information and outcome prices for each available condition.
|
|
8474
8534
|
*
|
|
8475
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
8535
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
8476
8536
|
*
|
|
8477
8537
|
* @example
|
|
8478
8538
|
* import { getPrecalculatedCashouts } from '@azuro-org/toolkit'
|
|
@@ -8522,7 +8582,7 @@ const getPrecalculatedCashouts = async (props) => {
|
|
|
8522
8582
|
* Retrieves the calculated cashout information for a specific bet, including the cashout amount and odds.
|
|
8523
8583
|
* Returns null if no cashout calculation is available for the bet.
|
|
8524
8584
|
*
|
|
8525
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
|
|
8585
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
|
|
8526
8586
|
*
|
|
8527
8587
|
* @example
|
|
8528
8588
|
* import { getCalculatedCashout } from '@azuro-org/toolkit'
|
|
@@ -8576,7 +8636,7 @@ const getCalculatedCashout = async (props) => {
|
|
|
8576
8636
|
* Generates EIP-712 typed data for signing a cashout order.
|
|
8577
8637
|
* This typed data must be signed by the user before submitting the cashout.
|
|
8578
8638
|
*
|
|
8579
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
|
|
8639
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
|
|
8580
8640
|
*
|
|
8581
8641
|
* @example
|
|
8582
8642
|
* import { getCashoutTypedData } from '@azuro-org/toolkit'
|
|
@@ -8641,7 +8701,7 @@ const getCashoutTypedData = (props) => {
|
|
|
8641
8701
|
* Creates a cashout order for an existing bet by submitting the signed cashout calculation to the Azuro API.
|
|
8642
8702
|
* This finalizes the cashout process after obtaining a calculation and signing the typed data.
|
|
8643
8703
|
*
|
|
8644
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
|
|
8704
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
|
|
8645
8705
|
*
|
|
8646
8706
|
* @example
|
|
8647
8707
|
* import { createCashout } from '@azuro-org/toolkit'
|
|
@@ -8693,7 +8753,7 @@ const createCashout = async (props) => {
|
|
|
8693
8753
|
* Retrieves the status and details of a cashout order by its order ID.
|
|
8694
8754
|
* Returns null if the cashout order is not found.
|
|
8695
8755
|
*
|
|
8696
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
|
|
8756
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
|
|
8697
8757
|
*
|
|
8698
8758
|
* @example
|
|
8699
8759
|
* import { getCashout } from '@azuro-org/toolkit'
|
|
@@ -8726,7 +8786,7 @@ const getCashout = async ({ chainId, orderId }) => {
|
|
|
8726
8786
|
* Fetches all bonuses for a bettor account filtered by status.
|
|
8727
8787
|
* By default, retrieves only available bonuses. Returns null if no bonuses are found.
|
|
8728
8788
|
*
|
|
8729
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
|
|
8789
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
|
|
8730
8790
|
*
|
|
8731
8791
|
* @example
|
|
8732
8792
|
* import { getBonuses, BonusStatus } from '@azuro-org/toolkit'
|
|
@@ -8806,7 +8866,7 @@ const getBonuses = async (props) => {
|
|
|
8806
8866
|
* Retrieves available freebets for a bettor that can be applied to specific bet selections.
|
|
8807
8867
|
* Returns null if no freebets are available for the given selections.
|
|
8808
8868
|
*
|
|
8809
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
|
|
8869
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
|
|
8810
8870
|
*
|
|
8811
8871
|
* @example
|
|
8812
8872
|
* import { getAvailableFreebets } from '@azuro-org/toolkit'
|
|
@@ -8883,4 +8943,4 @@ const getAvailableFreebets = async ({ chainId, account, affiliate, selections })
|
|
|
8883
8943
|
publicCustomData: bonus.publicCustomData,
|
|
8884
8944
|
};
|
|
8885
8945
|
});
|
|
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
|
|
8946
|
+
};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
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,7 +18,7 @@ export type CreateBetResult = CreateBetResponse;
|
|
|
18
18
|
* Creates a single (ordinary) bet by submitting signed bet data to the Azuro API.
|
|
19
19
|
* This function sends the bet order to the relayer which will then place the bet on-chain.
|
|
20
20
|
*
|
|
21
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
21
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createBet
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* import { createBet } from '@azuro-org/toolkit'
|
|
@@ -18,7 +18,7 @@ export type CreateComboBetResult = CreateBetResponse;
|
|
|
18
18
|
* Creates a combo (parlay) bet by submitting signed bet data to the Azuro API.
|
|
19
19
|
* This function sends the combo bet order to the relayer which will then place the bet on-chain.
|
|
20
20
|
*
|
|
21
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
21
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/createComboBet
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* import { createComboBet } from '@azuro-org/toolkit'
|
|
@@ -10,7 +10,7 @@ export type GetBetResult = GetBetResponse | null;
|
|
|
10
10
|
* Retrieves bet order data by order ID from the Azuro API.
|
|
11
11
|
* Returns null if the bet order is not found.
|
|
12
12
|
*
|
|
13
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
13
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBet
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* import { getBet } from '@azuro-org/toolkit'
|
|
@@ -20,7 +20,7 @@ export type GetBetCalculationResult = GetBetCalculationResponse['response'];
|
|
|
20
20
|
* User's account is required to provide the **correct** maximum bet amount.
|
|
21
21
|
* It may be undefined if the user isn't logged in.
|
|
22
22
|
*
|
|
23
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
23
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetCalculation
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* import { getBetCalculation } from '@azuro-org/toolkit'
|
|
@@ -17,7 +17,7 @@ export type GetBetFeeResult = BetFeeResponse;
|
|
|
17
17
|
* Retrieves the current relayer fee information for placing bets on a specific chain.
|
|
18
18
|
* Returns gas price, bet token rate, and calculated relayer fee amount.
|
|
19
19
|
*
|
|
20
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
20
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetFee
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* import { getBetFee } from '@azuro-org/toolkit'
|
|
@@ -22,7 +22,7 @@ type Props = {
|
|
|
22
22
|
* Determines the current status of a bet based on order state, on-chain status, and game states.
|
|
23
23
|
* Returns a unified bet status that combines API order state and blockchain data.
|
|
24
24
|
*
|
|
25
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
25
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetStatus
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { getBetStatus, BetStatus } from '@azuro-org/toolkit'
|
|
@@ -16,7 +16,7 @@ export type GetBetTypedDataParams = {
|
|
|
16
16
|
* Generates EIP-712 typed data for signing a single (ordinary) bet.
|
|
17
17
|
* This typed data is used with wallet signing methods to create a bet signature.
|
|
18
18
|
*
|
|
19
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
19
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetTypedData
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* import { getBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -23,7 +23,7 @@ export type GetBetsByBettorResult = (BetOrderData & {
|
|
|
23
23
|
* Retrieves all bet orders for a specific bettor address with optional filtering.
|
|
24
24
|
* Supports pagination and filtering by state, result, affiliate, and redemption status.
|
|
25
25
|
*
|
|
26
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
26
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getBetsByBettor
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* import { getBetsByBettor } from '@azuro-org/toolkit'
|
|
@@ -34,13 +34,13 @@ export type GetBetsByBettorResult = (BetOrderData & {
|
|
|
34
34
|
* // Get all bets
|
|
35
35
|
* const allBets = await getBetsByBettor({ chainId, bettor })
|
|
36
36
|
*
|
|
37
|
-
* // Get only
|
|
38
|
-
* const
|
|
37
|
+
* // Get only redeemable bets
|
|
38
|
+
* const redeemableBets = await getBetsByBettor({
|
|
39
39
|
* chainId,
|
|
40
40
|
* bettor,
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* limit:
|
|
41
|
+
* result: [BetOrderResult.Won, BetOrderResult.Canceled],
|
|
42
|
+
* isRedeemed: false,
|
|
43
|
+
* limit: 1000,
|
|
44
44
|
* })
|
|
45
45
|
* */
|
|
46
46
|
export declare const getBetsByBettor: (props: GetBetsByBettorParams) => Promise<GetBetsByBettorResult>;
|
|
@@ -16,7 +16,7 @@ export type GetComboBetTypedDataParams = {
|
|
|
16
16
|
* Generates EIP-712 typed data for signing a combo (parlay) bet.
|
|
17
17
|
* This typed data is used with wallet signing methods to create a combo bet signature.
|
|
18
18
|
*
|
|
19
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
19
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bet/getComboBetTypedData
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* import { getComboBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -10,6 +10,7 @@ export type BetMetaData = {
|
|
|
10
10
|
address: Address;
|
|
11
11
|
liquidityPool: {
|
|
12
12
|
address: Address;
|
|
13
|
+
asset: string;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
16
|
odds: string;
|
|
@@ -99,6 +100,7 @@ export type BetOrderConditionData = {
|
|
|
99
100
|
potentialLoss: string | null;
|
|
100
101
|
};
|
|
101
102
|
export type BetOrderData = {
|
|
103
|
+
/** bettorAddressLowerCase_nonce */
|
|
102
104
|
id: string;
|
|
103
105
|
state: BetOrderState;
|
|
104
106
|
environment: Environment;
|
|
@@ -112,6 +114,7 @@ export type BetOrderData = {
|
|
|
112
114
|
odds: number;
|
|
113
115
|
bonusId: string | null;
|
|
114
116
|
isFreebet: boolean;
|
|
117
|
+
isSponsoredBetReturnable?: boolean;
|
|
115
118
|
betId: number | null;
|
|
116
119
|
txHash: Hex | null;
|
|
117
120
|
margin: string;
|
|
@@ -18,7 +18,7 @@ export type GetAvailableFreebets = Freebet[] | null;
|
|
|
18
18
|
* Retrieves available freebets for a bettor that can be applied to specific bet selections.
|
|
19
19
|
* Returns null if no freebets are available for the given selections.
|
|
20
20
|
*
|
|
21
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
|
|
21
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* import { getAvailableFreebets } from '@azuro-org/toolkit'
|
|
@@ -59,7 +59,7 @@ export type GetBonusesParams = {
|
|
|
59
59
|
* Fetches all bonuses for a bettor account filtered by status.
|
|
60
60
|
* By default, retrieves only available bonuses. Returns null if no bonuses are found.
|
|
61
61
|
*
|
|
62
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
|
|
62
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* import { getBonuses, BonusStatus } from '@azuro-org/toolkit'
|
|
@@ -6,7 +6,7 @@ export type CalcMinOddsParams = {
|
|
|
6
6
|
* Calculates the minimum acceptable odds considering slippage for single or combo bets.
|
|
7
7
|
* For combo bets, applies fee modifiers and multiplies individual odds to calculate total odds.
|
|
8
8
|
*
|
|
9
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
|
|
9
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* import { calcMindOdds } from '@azuro-org/toolkit'
|
|
@@ -22,7 +22,7 @@ export type CreateCashoutParams = {
|
|
|
22
22
|
* Creates a cashout order for an existing bet by submitting the signed cashout calculation to the Azuro API.
|
|
23
23
|
* This finalizes the cashout process after obtaining a calculation and signing the typed data.
|
|
24
24
|
*
|
|
25
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
|
|
25
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { createCashout } from '@azuro-org/toolkit'
|
|
@@ -23,7 +23,7 @@ export type GetCalculatedCashoutParams = {
|
|
|
23
23
|
* Retrieves the calculated cashout information for a specific bet, including the cashout amount and odds.
|
|
24
24
|
* Returns null if no cashout calculation is available for the bet.
|
|
25
25
|
*
|
|
26
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
|
|
26
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* import { getCalculatedCashout } from '@azuro-org/toolkit'
|
|
@@ -12,7 +12,7 @@ export type GetCashoutParams = {
|
|
|
12
12
|
* Retrieves the status and details of a cashout order by its order ID.
|
|
13
13
|
* Returns null if the cashout order is not found.
|
|
14
14
|
*
|
|
15
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
|
|
15
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* import { getCashout } from '@azuro-org/toolkit'
|
|
@@ -12,7 +12,7 @@ export type GetCashoutTypedDataParams = {
|
|
|
12
12
|
* Generates EIP-712 typed data for signing a cashout order.
|
|
13
13
|
* This typed data must be signed by the user before submitting the cashout.
|
|
14
14
|
*
|
|
15
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
|
|
15
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* import { getCashoutTypedData } from '@azuro-org/toolkit'
|
|
@@ -22,7 +22,7 @@ export type GetPrecalculatedCashoutsParams = {
|
|
|
22
22
|
* Retrieves precalculated cashout availability and prices for specified conditions.
|
|
23
23
|
* Returns margin information and outcome prices for each available condition.
|
|
24
24
|
*
|
|
25
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
25
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { getPrecalculatedCashouts } from '@azuro-org/toolkit'
|
|
@@ -34,7 +34,7 @@ export type GetConditionsByGameIdsResponseResult = GetConditionsByGameIdsRespons
|
|
|
34
34
|
* Fetches detailed conditions data for a given list of game IDs.
|
|
35
35
|
* Returns comprehensive condition information including outcomes, odds, and game relationships.
|
|
36
36
|
*
|
|
37
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
37
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsByGameIds
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* import { getConditionsByGameIds } from '@azuro-org/toolkit'
|
|
@@ -20,7 +20,7 @@ export type GetConditionsStateResult = ConditionsStateResponse['conditions'];
|
|
|
20
20
|
/**
|
|
21
21
|
* Fetches up-to-date condition states and outcome odds for a list of conditions.
|
|
22
22
|
*
|
|
23
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
23
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getConditionsState
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* import { getConditionsState } from '@azuro-org/toolkit'
|
|
@@ -20,7 +20,7 @@ export type GetGamesByFiltersResult = PaginatedGamesResponse;
|
|
|
20
20
|
* Fetches games by applying various filters such as sport, league, or game state.
|
|
21
21
|
* Returns paginated results ideal for building sport/country/league listing pages.
|
|
22
22
|
*
|
|
23
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
23
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByFilters
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* import { GameState, getGamesByFilters } from '@azuro-org/toolkit'
|
|
@@ -12,7 +12,7 @@ export type GetGamesByIdsResult = GetGamesByIdsResponse['games'];
|
|
|
12
12
|
* Fetches game data for a specific list of game IDs.
|
|
13
13
|
* Returns detailed information for each requested game including participants, timing, and league data.
|
|
14
14
|
*
|
|
15
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
15
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getGamesByIds
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* import { getGamesByIds } from '@azuro-org/toolkit'
|
|
@@ -47,7 +47,7 @@ export type GetNavigationResult = NavigationSportData[];
|
|
|
47
47
|
* Fetches navigation structure with sports, countries, and leagues hierarchy.
|
|
48
48
|
* Returns active game counts at each level for building navigation menus.
|
|
49
49
|
*
|
|
50
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
50
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getNavigation
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* import { getNavigation } from '@azuro-org/toolkit'
|
|
@@ -39,7 +39,7 @@ export type GetSportsResult = GetSportsResponse['sports'];
|
|
|
39
39
|
* Fetches a complete sports hierarchy including countries, leagues, and games.
|
|
40
40
|
* Returns nested structure with all games organized by sport, country, and league.
|
|
41
41
|
*
|
|
42
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
42
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/getSports
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* import { GameState, getSports } from '@azuro-org/toolkit'
|
|
@@ -14,7 +14,7 @@ export type SearchGamesResult = PaginatedGamesResponse;
|
|
|
14
14
|
* Searches for games by text query across game titles, leagues, and countries.
|
|
15
15
|
* The minimum query length is 3 characters. Returns paginated results.
|
|
16
16
|
*
|
|
17
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/
|
|
17
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/feed/searchGames
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* import { searchGames } from '@azuro-org/toolkit'
|
|
@@ -7,7 +7,7 @@ export type GetIsPendingResolutionParams = {
|
|
|
7
7
|
* Determines if a game is pending resolution after completion.
|
|
8
8
|
* Returns true if the game is in Live state but has exceeded the expected resolution window (100 minutes after start).
|
|
9
9
|
*
|
|
10
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
10
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* import { getIsPendingResolution, GameState } from '@azuro-org/toolkit'
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Extracts the provider ID from a condition ID string.
|
|
3
3
|
* The provider ID is encoded in characters 2-4 of the condition ID.
|
|
4
|
-
*
|
|
5
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getProviderFromId
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import { getProviderFromId } from '@azuro-org/toolkit'
|
|
9
|
-
*
|
|
10
|
-
* const providerId = getProviderFromId('C001234567890')
|
|
11
|
-
* console.log(providerId) // 001
|
|
12
4
|
* */
|
|
13
5
|
export declare const getProviderFromId: (id: string) => number;
|
|
@@ -26,7 +26,7 @@ export type GameMarkets = Market[];
|
|
|
26
26
|
* Groups game conditions by their market types and sorts them according to sport-specific ordering.
|
|
27
27
|
* It processes outcomes to include selection names, handles duplicate conditions, and organizes data for display.
|
|
28
28
|
*
|
|
29
|
-
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
29
|
+
* - Docs: https://dev-gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
32
|
* import { groupConditionsByMarket } from '@azuro-org/toolkit'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azuro-org/toolkit",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.9",
|
|
4
4
|
"description": "This framework-agnostic package provides essential utilities for building applications on the Azuro Protocol.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|