@azuro-org/toolkit 5.1.7 → 5.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/utils/getBetCalculation.d.ts +23 -0
- package/dist/utils/getMaxBet.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { createBet } from './utils/createBet';
|
|
|
17
17
|
export { createComboBet } from './utils/createComboBet';
|
|
18
18
|
export { getBet, type GetBetResponse } from './utils/getBet';
|
|
19
19
|
export { getMaxBet, type GetMaxBetResponse } from './utils/getMaxBet';
|
|
20
|
+
export { getBetCalculation, type GetBetCalculationResponse } from './utils/getBetCalculation';
|
|
20
21
|
export { getWaveLevels, WaveLevelName, type WaveLevelData, type WaveLevelsResponse } from './utils/wave/getWaveLevels';
|
|
21
22
|
export { getWaveStats, type WaveStatsResponse } from './utils/wave/getWaveStats';
|
|
22
23
|
export { getWavePeriods, type WavePeriodsResponse } from './utils/wave/getWavePeriods';
|
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 {parseUnits,formatUnits}from'viem';var Environment;
|
|
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;
|
|
2
2
|
(function (Environment) {
|
|
3
3
|
Environment["GnosisDevXDAI"] = "GnosisDevXDAI";
|
|
4
4
|
Environment["GnosisXDAI"] = "GnosisXDAI";
|
|
@@ -8143,7 +8143,8 @@ const getBetStatus = (props) => {
|
|
|
8143
8143
|
}
|
|
8144
8144
|
const data = await response.json();
|
|
8145
8145
|
return data;
|
|
8146
|
-
}
|
|
8146
|
+
};/** @deprecated use `getBetCalculation` instead */
|
|
8147
|
+
const getMaxBet = async (props) => {
|
|
8147
8148
|
const { chainId, selections } = props;
|
|
8148
8149
|
const { api, environment } = chainsData[chainId];
|
|
8149
8150
|
const response = await fetch(`${api}/bet/calculation`, {
|
|
@@ -8168,6 +8169,35 @@ const getBetStatus = (props) => {
|
|
|
8168
8169
|
}
|
|
8169
8170
|
const data = await response.json();
|
|
8170
8171
|
return data.response;
|
|
8172
|
+
};const getBetCalculation = async (props) => {
|
|
8173
|
+
const { chainId, selections, account } = props;
|
|
8174
|
+
const { api, environment } = chainsData[chainId];
|
|
8175
|
+
const params = {
|
|
8176
|
+
bets: selections.map(({ conditionId, outcomeId }) => ({
|
|
8177
|
+
conditionId,
|
|
8178
|
+
outcomeId: +outcomeId,
|
|
8179
|
+
})),
|
|
8180
|
+
environment,
|
|
8181
|
+
};
|
|
8182
|
+
if (account && isAddress(account)) {
|
|
8183
|
+
params.wallet = account;
|
|
8184
|
+
}
|
|
8185
|
+
const response = await fetch(`${api}/bet/calculation_new`, {
|
|
8186
|
+
method: 'POST',
|
|
8187
|
+
headers: {
|
|
8188
|
+
'Accept': 'application/json',
|
|
8189
|
+
'Content-Type': 'application/json',
|
|
8190
|
+
},
|
|
8191
|
+
body: JSON.stringify(params),
|
|
8192
|
+
});
|
|
8193
|
+
if (response.status === 404) {
|
|
8194
|
+
return null;
|
|
8195
|
+
}
|
|
8196
|
+
if (!response.ok) {
|
|
8197
|
+
throw new Error(`Status ${response.status}: ${response.statusText}`);
|
|
8198
|
+
}
|
|
8199
|
+
const data = await response.json();
|
|
8200
|
+
return data.response;
|
|
8171
8201
|
};var WaveLevelName;
|
|
8172
8202
|
(function (WaveLevelName) {
|
|
8173
8203
|
WaveLevelName["Grey"] = "Grey";
|
|
@@ -8523,4 +8553,4 @@ const createCashout = async (props) => {
|
|
|
8523
8553
|
publicCustomData: bonus.publicCustomData,
|
|
8524
8554
|
};
|
|
8525
8555
|
});
|
|
8526
|
-
};export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetRestrictionType,BetResult,BetState,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,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,EventRestrictionState,Event_OrderBy,FreebetType,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,NavigationDocument,ODDS_COMBO_FEE_MODIFIER,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VirtualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,baseData,baseSepoliaData,bscData,bscTestnetData,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,getApiEndpoint,getAvailableFreebets,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getBonuses,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,paymasterAbi,polygonAmoyData,polygonData,relayerAbi,setupContracts,spicyData,vaultAbi};//# sourceMappingURL=index.js.map
|
|
8556
|
+
};export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetRestrictionType,BetResult,BetState,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,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,EventRestrictionState,Event_OrderBy,FreebetType,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,NavigationDocument,ODDS_COMBO_FEE_MODIFIER,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VirtualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,baseData,baseSepoliaData,bscData,bscTestnetData,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,getApiEndpoint,getAvailableFreebets,getBet,getBetCalculation,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getBonuses,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,paymasterAbi,polygonAmoyData,polygonData,relayerAbi,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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import { type ChainId } from '../config';
|
|
3
|
+
import { type Selection } from '../global';
|
|
4
|
+
export type GetBetCalculationResponse = {
|
|
5
|
+
response: {
|
|
6
|
+
/** if `minBet` is `undefined`, there is no bottom limit */
|
|
7
|
+
minBet: number | undefined;
|
|
8
|
+
maxBet: number;
|
|
9
|
+
maxPayout: `${number}`;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type GetBetCalculation = {
|
|
13
|
+
chainId: ChainId;
|
|
14
|
+
selections: Selection[];
|
|
15
|
+
account: Address | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const getBetCalculation: (props: GetBetCalculation) => Promise<{
|
|
18
|
+
/** if `minBet` is `undefined`, there is no bottom limit */
|
|
19
|
+
minBet: number | undefined;
|
|
20
|
+
maxBet: number;
|
|
21
|
+
maxPayout: `${number}`;
|
|
22
|
+
} | null>;
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azuro-org/toolkit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0-beta.0",
|
|
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",
|