@azuro-org/toolkit 6.0.0 → 6.0.2
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/index.js +32 -30
- 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 +1 -1
- package/dist/utils/bet/getComboBetTypedData.d.ts +1 -1
- 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 +2 -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 +4 -5
- package/dist/utils/feed/searchGames.d.ts +1 -1
- package/dist/utils/getIsPendingResolution.d.ts +1 -1
- package/dist/utils/groupConditionsByMarket.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7454,7 +7454,7 @@ const getProviderFromId = (id) => {
|
|
|
7454
7454
|
* Calculates the minimum acceptable odds considering slippage for single or combo bets.
|
|
7455
7455
|
* For combo bets, applies fee modifiers and multiplies individual odds to calculate total odds.
|
|
7456
7456
|
*
|
|
7457
|
-
* - Docs: https://
|
|
7457
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/calcMinOdds
|
|
7458
7458
|
*
|
|
7459
7459
|
* @example
|
|
7460
7460
|
* import { calcMindOdds } from '@azuro-org/toolkit'
|
|
@@ -7502,7 +7502,7 @@ const normalizeTimestampToMs = (timestamp) => {
|
|
|
7502
7502
|
* Determines if a game is pending resolution after completion.
|
|
7503
7503
|
* Returns true if the game is in Live state but has exceeded the expected resolution window (100 minutes after start).
|
|
7504
7504
|
*
|
|
7505
|
-
* - Docs: https://
|
|
7505
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
7506
7506
|
*
|
|
7507
7507
|
* @example
|
|
7508
7508
|
* import { getIsPendingResolution, GameState } from '@azuro-org/toolkit'
|
|
@@ -7525,7 +7525,7 @@ const getIsPendingResolution = ({ state, startsAt }) => {
|
|
|
7525
7525
|
* Groups game conditions by their market types and sorts them according to sport-specific ordering.
|
|
7526
7526
|
* It processes outcomes to include selection names, handles duplicate conditions, and organizes data for display.
|
|
7527
7527
|
*
|
|
7528
|
-
* - Docs: https://
|
|
7528
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
7529
7529
|
*
|
|
7530
7530
|
* @example
|
|
7531
7531
|
* import { groupConditionsByMarket } from '@azuro-org/toolkit'
|
|
@@ -7546,7 +7546,7 @@ const groupConditionsByMarket = (conditions) => {
|
|
|
7546
7546
|
const stateByOutcomeIds = {};
|
|
7547
7547
|
for (let conditionIndex = 0; conditionIndex < conditions.length; conditionIndex++) {
|
|
7548
7548
|
const condition = conditions[conditionIndex];
|
|
7549
|
-
const { conditionId, outcomes: rawOutcomes, state, wonOutcomeIds, isExpressForbidden, title: customMarketName, margin, game: { gameId }, } = condition;
|
|
7549
|
+
const { conditionId, outcomes: rawOutcomes, state, wonOutcomeIds, isExpressForbidden, title: customMarketName, margin, hidden, game: { gameId }, } = condition;
|
|
7550
7550
|
const firstOutcomeId = rawOutcomes[0].outcomeId;
|
|
7551
7551
|
const marketKey = getMarketKey(firstOutcomeId);
|
|
7552
7552
|
const marketName = customMarketName && customMarketName !== 'null' ? customMarketName : getMarketName({ outcomeId: firstOutcomeId });
|
|
@@ -7585,6 +7585,7 @@ const groupConditionsByMarket = (conditions) => {
|
|
|
7585
7585
|
conditionId,
|
|
7586
7586
|
state,
|
|
7587
7587
|
isExpressForbidden,
|
|
7588
|
+
hidden,
|
|
7588
7589
|
margin,
|
|
7589
7590
|
outcomes: [],
|
|
7590
7591
|
};
|
|
@@ -7679,7 +7680,7 @@ const filterLastGames = (games) => {
|
|
|
7679
7680
|
* Determines the current status of a bet based on order state, on-chain status, and game states.
|
|
7680
7681
|
* Returns a unified bet status that combines API order state and blockchain data.
|
|
7681
7682
|
*
|
|
7682
|
-
* - Docs: https://
|
|
7683
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetStatus
|
|
7683
7684
|
*
|
|
7684
7685
|
* @example
|
|
7685
7686
|
* import { getBetStatus, BetStatus } from '@azuro-org/toolkit'
|
|
@@ -7728,7 +7729,7 @@ const getBetStatus = (props) => {
|
|
|
7728
7729
|
* Retrieves the current relayer fee information for placing bets on a specific chain.
|
|
7729
7730
|
* Returns gas price, bet token rate, and calculated relayer fee amount.
|
|
7730
7731
|
*
|
|
7731
|
-
* - Docs: https://
|
|
7732
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetFee
|
|
7732
7733
|
*
|
|
7733
7734
|
* @example
|
|
7734
7735
|
* import { getBetFee } from '@azuro-org/toolkit'
|
|
@@ -7753,7 +7754,7 @@ const getBetFee = async (chainId) => {
|
|
|
7753
7754
|
* Generates EIP-712 typed data for signing a single (ordinary) bet.
|
|
7754
7755
|
* This typed data is used with wallet signing methods to create a bet signature.
|
|
7755
7756
|
*
|
|
7756
|
-
* - Docs: https://
|
|
7757
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetTypedData
|
|
7757
7758
|
*
|
|
7758
7759
|
* @example
|
|
7759
7760
|
* import { getBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -7813,7 +7814,7 @@ const getBetTypedData = (props) => {
|
|
|
7813
7814
|
* Generates EIP-712 typed data for signing a combo (parlay) bet.
|
|
7814
7815
|
* This typed data is used with wallet signing methods to create a combo bet signature.
|
|
7815
7816
|
*
|
|
7816
|
-
* - Docs: https://
|
|
7817
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getComboBetTypedData
|
|
7817
7818
|
*
|
|
7818
7819
|
* @example
|
|
7819
7820
|
* import { getComboBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -7875,7 +7876,7 @@ const getComboBetTypedData = (props) => {
|
|
|
7875
7876
|
* Creates a single (ordinary) bet by submitting signed bet data to the Azuro API.
|
|
7876
7877
|
* This function sends the bet order to the relayer which will then place the bet on-chain.
|
|
7877
7878
|
*
|
|
7878
|
-
* - Docs: https://
|
|
7879
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/createBet
|
|
7879
7880
|
*
|
|
7880
7881
|
* @example
|
|
7881
7882
|
* import { createBet } from '@azuro-org/toolkit'
|
|
@@ -7935,7 +7936,7 @@ const createBet = async (props) => {
|
|
|
7935
7936
|
* Creates a combo (parlay) bet by submitting signed bet data to the Azuro API.
|
|
7936
7937
|
* This function sends the combo bet order to the relayer which will then place the bet on-chain.
|
|
7937
7938
|
*
|
|
7938
|
-
* - Docs: https://
|
|
7939
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/createComboBet
|
|
7939
7940
|
*
|
|
7940
7941
|
* @example
|
|
7941
7942
|
* import { createComboBet } from '@azuro-org/toolkit'
|
|
@@ -8000,7 +8001,7 @@ const createComboBet = async (props) => {
|
|
|
8000
8001
|
* Retrieves bet order data by order ID from the Azuro API.
|
|
8001
8002
|
* Returns null if the bet order is not found.
|
|
8002
8003
|
*
|
|
8003
|
-
* - Docs: https://
|
|
8004
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBet
|
|
8004
8005
|
*
|
|
8005
8006
|
* @example
|
|
8006
8007
|
* import { getBet } from '@azuro-org/toolkit'
|
|
@@ -8031,7 +8032,7 @@ const getBet = async ({ chainId, orderId }) => {
|
|
|
8031
8032
|
* User's account is required to provide the **correct** maximum bet amount.
|
|
8032
8033
|
* It may be undefined if the user isn't logged in.
|
|
8033
8034
|
*
|
|
8034
|
-
* - Docs: https://
|
|
8035
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetCalculation
|
|
8035
8036
|
*
|
|
8036
8037
|
* @example
|
|
8037
8038
|
* import { getBetCalculation } from '@azuro-org/toolkit'
|
|
@@ -8090,7 +8091,7 @@ function serializeApiParams(struct) {
|
|
|
8090
8091
|
* Retrieves all bet orders for a specific bettor address with optional filtering.
|
|
8091
8092
|
* Supports pagination and filtering by state, result, affiliate, and redemption status.
|
|
8092
8093
|
*
|
|
8093
|
-
* - Docs: https://
|
|
8094
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetsByBettor
|
|
8094
8095
|
*
|
|
8095
8096
|
* @example
|
|
8096
8097
|
* import { getBetsByBettor } from '@azuro-org/toolkit'
|
|
@@ -8141,7 +8142,7 @@ const getBetsByBettor = async (props) => {
|
|
|
8141
8142
|
* Fetches detailed conditions data for a given list of game IDs.
|
|
8142
8143
|
* Returns comprehensive condition information including outcomes, odds, and game relationships.
|
|
8143
8144
|
*
|
|
8144
|
-
* - Docs: https://
|
|
8145
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getConditionsByGameIds
|
|
8145
8146
|
*
|
|
8146
8147
|
* @example
|
|
8147
8148
|
* import { getConditionsByGameIds } from '@azuro-org/toolkit'
|
|
@@ -8178,7 +8179,7 @@ const getConditionsByGameIds = async (props) => {
|
|
|
8178
8179
|
};/**
|
|
8179
8180
|
* Fetches up-to-date condition states and outcome odds for a list of conditions.
|
|
8180
8181
|
*
|
|
8181
|
-
* - Docs: https://
|
|
8182
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getConditionsState
|
|
8182
8183
|
*
|
|
8183
8184
|
* @example
|
|
8184
8185
|
* import { getConditionsState } from '@azuro-org/toolkit'
|
|
@@ -8195,6 +8196,7 @@ const getConditionsState = async (props) => {
|
|
|
8195
8196
|
return [];
|
|
8196
8197
|
}
|
|
8197
8198
|
const api = getApiEndpoint(props.chainId);
|
|
8199
|
+
const environment = environments[props.chainId];
|
|
8198
8200
|
const response = await fetch(`${api}/market-manager/condition-batch`, {
|
|
8199
8201
|
method: 'POST',
|
|
8200
8202
|
headers: {
|
|
@@ -8203,6 +8205,7 @@ const getConditionsState = async (props) => {
|
|
|
8203
8205
|
},
|
|
8204
8206
|
body: JSON.stringify({
|
|
8205
8207
|
conditionIds,
|
|
8208
|
+
environment,
|
|
8206
8209
|
}),
|
|
8207
8210
|
});
|
|
8208
8211
|
if (!response.ok) {
|
|
@@ -8218,7 +8221,7 @@ const getConditionsState = async (props) => {
|
|
|
8218
8221
|
* Fetches games by applying various filters such as sport, league, or game state.
|
|
8219
8222
|
* Returns paginated results ideal for building sport/country/league listing pages.
|
|
8220
8223
|
*
|
|
8221
|
-
* - Docs: https://
|
|
8224
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getGamesByFilters
|
|
8222
8225
|
*
|
|
8223
8226
|
* @example
|
|
8224
8227
|
* import { GameState, getGamesByFilters } from '@azuro-org/toolkit'
|
|
@@ -8263,7 +8266,7 @@ const getGamesByFilters = async (props) => {
|
|
|
8263
8266
|
* Fetches game data for a specific list of game IDs.
|
|
8264
8267
|
* Returns detailed information for each requested game including participants, timing, and league data.
|
|
8265
8268
|
*
|
|
8266
|
-
* - Docs: https://
|
|
8269
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getGamesByIds
|
|
8267
8270
|
*
|
|
8268
8271
|
* @example
|
|
8269
8272
|
* import { getGamesByIds } from '@azuro-org/toolkit'
|
|
@@ -8302,7 +8305,7 @@ const getGamesByIds = async (props) => {
|
|
|
8302
8305
|
* Fetches navigation structure with sports, countries, and leagues hierarchy.
|
|
8303
8306
|
* Returns active game counts at each level for building navigation menus.
|
|
8304
8307
|
*
|
|
8305
|
-
* - Docs: https://
|
|
8308
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getNavigation
|
|
8306
8309
|
*
|
|
8307
8310
|
* @example
|
|
8308
8311
|
* import { getNavigation } from '@azuro-org/toolkit'
|
|
@@ -8343,7 +8346,7 @@ const getNavigation = async (props) => {
|
|
|
8343
8346
|
* Fetches a complete sports hierarchy including countries, leagues, and games.
|
|
8344
8347
|
* Returns nested structure with all games organized by sport, country, and league.
|
|
8345
8348
|
*
|
|
8346
|
-
* - Docs: https://
|
|
8349
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getSports
|
|
8347
8350
|
*
|
|
8348
8351
|
* @example
|
|
8349
8352
|
* import { GameState, getSports } from '@azuro-org/toolkit'
|
|
@@ -8351,12 +8354,11 @@ const getNavigation = async (props) => {
|
|
|
8351
8354
|
* const sports = await getSports({
|
|
8352
8355
|
* chainId: 137,
|
|
8353
8356
|
* states: [GameState.Prematch, GameState.Live],
|
|
8354
|
-
*
|
|
8355
|
-
* perPage: 50,
|
|
8357
|
+
* numberOfGames: 50,
|
|
8356
8358
|
* })
|
|
8357
8359
|
* */
|
|
8358
8360
|
const getSports = async (props) => {
|
|
8359
|
-
const { chainId, gameState, sportIds, sportSlug, countrySlug, leagueSlug, numberOfGames, orderBy, orderDir } = props;
|
|
8361
|
+
const { chainId, gameState, sportIds, sportSlug, countrySlug, leagueSlug, numberOfGames, orderBy = GameOrderBy.StartsAt, orderDir = OrderDirection$1.Asc, } = props;
|
|
8360
8362
|
const api = getApiEndpoint(chainId);
|
|
8361
8363
|
const environment = environments[chainId];
|
|
8362
8364
|
const params = serializeApiParams({
|
|
@@ -8387,7 +8389,7 @@ const getSports = async (props) => {
|
|
|
8387
8389
|
* Searches for games by text query across game titles, leagues, and countries.
|
|
8388
8390
|
* The minimum query length is 3 characters. Returns paginated results.
|
|
8389
8391
|
*
|
|
8390
|
-
* - Docs: https://
|
|
8392
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/searchGames
|
|
8391
8393
|
*
|
|
8392
8394
|
* @example
|
|
8393
8395
|
* import { searchGames } from '@azuro-org/toolkit'
|
|
@@ -8533,7 +8535,7 @@ const getWaveLevels = async ({ waveId, chainId } = { waveId: 'active', chainId:
|
|
|
8533
8535
|
* Retrieves precalculated cashout availability and prices for specified conditions.
|
|
8534
8536
|
* Returns margin information and outcome prices for each available condition.
|
|
8535
8537
|
*
|
|
8536
|
-
* - Docs: https://
|
|
8538
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
8537
8539
|
*
|
|
8538
8540
|
* @example
|
|
8539
8541
|
* import { getPrecalculatedCashouts } from '@azuro-org/toolkit'
|
|
@@ -8583,7 +8585,7 @@ const getPrecalculatedCashouts = async (props) => {
|
|
|
8583
8585
|
* Retrieves the calculated cashout information for a specific bet, including the cashout amount and odds.
|
|
8584
8586
|
* Returns null if no cashout calculation is available for the bet.
|
|
8585
8587
|
*
|
|
8586
|
-
* - Docs: https://
|
|
8588
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCalculatedCashout
|
|
8587
8589
|
*
|
|
8588
8590
|
* @example
|
|
8589
8591
|
* import { getCalculatedCashout } from '@azuro-org/toolkit'
|
|
@@ -8637,7 +8639,7 @@ const getCalculatedCashout = async (props) => {
|
|
|
8637
8639
|
* Generates EIP-712 typed data for signing a cashout order.
|
|
8638
8640
|
* This typed data must be signed by the user before submitting the cashout.
|
|
8639
8641
|
*
|
|
8640
|
-
* - Docs: https://
|
|
8642
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashoutTypedData
|
|
8641
8643
|
*
|
|
8642
8644
|
* @example
|
|
8643
8645
|
* import { getCashoutTypedData } from '@azuro-org/toolkit'
|
|
@@ -8702,7 +8704,7 @@ const getCashoutTypedData = (props) => {
|
|
|
8702
8704
|
* Creates a cashout order for an existing bet by submitting the signed cashout calculation to the Azuro API.
|
|
8703
8705
|
* This finalizes the cashout process after obtaining a calculation and signing the typed data.
|
|
8704
8706
|
*
|
|
8705
|
-
* - Docs: https://
|
|
8707
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/createCashout
|
|
8706
8708
|
*
|
|
8707
8709
|
* @example
|
|
8708
8710
|
* import { createCashout } from '@azuro-org/toolkit'
|
|
@@ -8754,7 +8756,7 @@ const createCashout = async (props) => {
|
|
|
8754
8756
|
* Retrieves the status and details of a cashout order by its order ID.
|
|
8755
8757
|
* Returns null if the cashout order is not found.
|
|
8756
8758
|
*
|
|
8757
|
-
* - Docs: https://
|
|
8759
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout
|
|
8758
8760
|
*
|
|
8759
8761
|
* @example
|
|
8760
8762
|
* import { getCashout } from '@azuro-org/toolkit'
|
|
@@ -8787,7 +8789,7 @@ const getCashout = async ({ chainId, orderId }) => {
|
|
|
8787
8789
|
* Fetches all bonuses for a bettor account filtered by status.
|
|
8788
8790
|
* By default, retrieves only available bonuses. Returns null if no bonuses are found.
|
|
8789
8791
|
*
|
|
8790
|
-
* - Docs: https://
|
|
8792
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getBonuses
|
|
8791
8793
|
*
|
|
8792
8794
|
* @example
|
|
8793
8795
|
* import { getBonuses, BonusStatus } from '@azuro-org/toolkit'
|
|
@@ -8867,7 +8869,7 @@ const getBonuses = async (props) => {
|
|
|
8867
8869
|
* Retrieves available freebets for a bettor that can be applied to specific bet selections.
|
|
8868
8870
|
* Returns null if no freebets are available for the given selections.
|
|
8869
8871
|
*
|
|
8870
|
-
* - Docs: https://
|
|
8872
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bonus/getAvailableFreebets
|
|
8871
8873
|
*
|
|
8872
8874
|
* @example
|
|
8873
8875
|
* import { getAvailableFreebets } from '@azuro-org/toolkit'
|
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://
|
|
21
|
+
* - Docs: https://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://
|
|
21
|
+
* - Docs: https://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://
|
|
13
|
+
* - Docs: https://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://
|
|
23
|
+
* - Docs: https://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://
|
|
20
|
+
* - Docs: https://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://
|
|
25
|
+
* - Docs: https://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://
|
|
19
|
+
* - Docs: https://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://
|
|
26
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getBetsByBettor
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* import { getBetsByBettor } from '@azuro-org/toolkit'
|
|
@@ -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://
|
|
19
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/bet/getComboBetTypedData
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* import { getComboBetTypedData } from '@azuro-org/toolkit'
|
|
@@ -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://
|
|
21
|
+
* - Docs: https://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://
|
|
62
|
+
* - Docs: https://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://
|
|
9
|
+
* - Docs: https://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://
|
|
25
|
+
* - Docs: https://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://
|
|
26
|
+
* - Docs: https://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://
|
|
15
|
+
* - Docs: https://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://
|
|
15
|
+
* - Docs: https://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://
|
|
25
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getPrecalculatedCashouts
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { getPrecalculatedCashouts } from '@azuro-org/toolkit'
|
|
@@ -12,6 +12,7 @@ export type ConditionDetailedData = {
|
|
|
12
12
|
isExpressForbidden: boolean;
|
|
13
13
|
isPrematchEnabled: boolean;
|
|
14
14
|
isLiveEnabled: boolean;
|
|
15
|
+
hidden?: boolean;
|
|
15
16
|
margin: string;
|
|
16
17
|
outcomes: {
|
|
17
18
|
title: string | null;
|
|
@@ -34,7 +35,7 @@ export type GetConditionsByGameIdsResponseResult = GetConditionsByGameIdsRespons
|
|
|
34
35
|
* Fetches detailed conditions data for a given list of game IDs.
|
|
35
36
|
* Returns comprehensive condition information including outcomes, odds, and game relationships.
|
|
36
37
|
*
|
|
37
|
-
* - Docs: https://
|
|
38
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getConditionsByGameIds
|
|
38
39
|
*
|
|
39
40
|
* @example
|
|
40
41
|
* 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://
|
|
23
|
+
* - Docs: https://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://
|
|
23
|
+
* - Docs: https://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://
|
|
15
|
+
* - Docs: https://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://
|
|
50
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getNavigation
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* import { getNavigation } from '@azuro-org/toolkit'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type GameState,
|
|
1
|
+
import { type GameState, OrderDirection } from '../../global';
|
|
2
2
|
import type { ChainId } from '../../config';
|
|
3
|
-
import { type GameData,
|
|
3
|
+
import { type GameData, GameOrderBy } from './types';
|
|
4
4
|
export type GetSportsParams = {
|
|
5
5
|
chainId: ChainId;
|
|
6
6
|
gameState: GameState.Live | GameState.Prematch;
|
|
@@ -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://
|
|
42
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getSports
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* import { GameState, getSports } from '@azuro-org/toolkit'
|
|
@@ -47,8 +47,7 @@ export type GetSportsResult = GetSportsResponse['sports'];
|
|
|
47
47
|
* const sports = await getSports({
|
|
48
48
|
* chainId: 137,
|
|
49
49
|
* states: [GameState.Prematch, GameState.Live],
|
|
50
|
-
*
|
|
51
|
-
* perPage: 50,
|
|
50
|
+
* numberOfGames: 50,
|
|
52
51
|
* })
|
|
53
52
|
* */
|
|
54
53
|
export declare const getSports: (props: GetSportsParams) => Promise<GetSportsResult>;
|
|
@@ -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://
|
|
17
|
+
* - Docs: https://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://
|
|
10
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/getIsPendingResolution
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* import { getIsPendingResolution, GameState } from '@azuro-org/toolkit'
|
|
@@ -17,6 +17,7 @@ type Condition = {
|
|
|
17
17
|
conditionId: string;
|
|
18
18
|
state: ConditionState;
|
|
19
19
|
margin: string;
|
|
20
|
+
hidden?: boolean;
|
|
20
21
|
isExpressForbidden: boolean;
|
|
21
22
|
outcomes: MarketOutcome[];
|
|
22
23
|
};
|
|
@@ -26,7 +27,7 @@ export type GameMarkets = Market[];
|
|
|
26
27
|
* Groups game conditions by their market types and sorts them according to sport-specific ordering.
|
|
27
28
|
* It processes outcomes to include selection names, handles duplicate conditions, and organizes data for display.
|
|
28
29
|
*
|
|
29
|
-
* - Docs: https://
|
|
30
|
+
* - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/groupConditionsByMarket
|
|
30
31
|
*
|
|
31
32
|
* @example
|
|
32
33
|
* import { groupConditionsByMarket } from '@azuro-org/toolkit'
|
package/package.json
CHANGED