@azuro-org/toolkit 6.0.0-beta.1 → 6.0.0-beta.3
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 +15 -15
- package/dist/utils/getEndpoints.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5845,37 +5845,37 @@ const isDevChain = (chainId) => {
|
|
|
5845
5845
|
chainId === bscTestnet.id);
|
|
5846
5846
|
};
|
|
5847
5847
|
/** @deprecated Use REST API instead */
|
|
5848
|
-
const getFeedGraphqlEndpoint = (chainId) => (`https://thegraph-1.
|
|
5849
|
-
const getBetsGraphqlEndpoint = (chainId) => (`https://thegraph.
|
|
5848
|
+
const getFeedGraphqlEndpoint = (chainId) => (`https://thegraph-1.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-data-feed-${endpointNameByChainId[chainId]}`);
|
|
5849
|
+
const getBetsGraphqlEndpoint = (chainId) => (`https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-${endpointNameByChainId[chainId]}-v3`);
|
|
5850
5850
|
/**
|
|
5851
5851
|
* @deprecated Only for v2 feed
|
|
5852
5852
|
*/
|
|
5853
5853
|
const getLegacyLiveGraphqlEndpoint = (chainId) => {
|
|
5854
5854
|
if (isDevChain(chainId)) {
|
|
5855
|
-
return 'https://thegraph.
|
|
5855
|
+
return 'https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev';
|
|
5856
5856
|
}
|
|
5857
5857
|
// if (chainId === polygonAmoy.id) {
|
|
5858
|
-
// return 'https://thegraph.
|
|
5858
|
+
// return 'https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-preprod'
|
|
5859
5859
|
// }
|
|
5860
|
-
return 'https://thegraph.
|
|
5860
|
+
return 'https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed';
|
|
5861
5861
|
};
|
|
5862
5862
|
const getSocketEndpoint = (chainId) => {
|
|
5863
5863
|
if (isDevChain(chainId)) {
|
|
5864
|
-
return 'wss://dev-streams.
|
|
5864
|
+
return 'wss://dev-streams.onchainfeed.org/v1/streams';
|
|
5865
5865
|
}
|
|
5866
5866
|
// if (chainId === polygonAmoy.id) {
|
|
5867
5867
|
// return 'wss://preprod-streams.azuro.org/v1/streams'
|
|
5868
5868
|
// }
|
|
5869
|
-
return 'wss://streams.
|
|
5869
|
+
return 'wss://streams.onchainfeed.org/v1/streams';
|
|
5870
5870
|
};
|
|
5871
5871
|
const getApiEndpoint = (chainId) => {
|
|
5872
5872
|
if (isDevChain(chainId)) {
|
|
5873
|
-
return 'https://dev-api.
|
|
5873
|
+
return 'https://dev-api.onchainfeed.org/api/v1/public';
|
|
5874
5874
|
}
|
|
5875
5875
|
// if (chainId === polygonAmoy.id) {
|
|
5876
5876
|
// return 'https://preprod-api.azuro.org/api/v1/public'
|
|
5877
5877
|
// }
|
|
5878
|
-
return 'https://api.
|
|
5878
|
+
return 'https://api.onchainfeed.org/api/v1/public';
|
|
5879
5879
|
};const ODDS_DECIMALS = 12;
|
|
5880
5880
|
const ODDS_COMBO_FEE_MODIFIER = 0.99;
|
|
5881
5881
|
const CLIENT_DATA_TYPES = [
|
|
@@ -8009,7 +8009,7 @@ function serializeApiParams(struct) {
|
|
|
8009
8009
|
append(key, subValue);
|
|
8010
8010
|
});
|
|
8011
8011
|
}
|
|
8012
|
-
append(key,
|
|
8012
|
+
append(key, value);
|
|
8013
8013
|
});
|
|
8014
8014
|
return params;
|
|
8015
8015
|
}/**
|
|
@@ -8163,7 +8163,7 @@ const getGamesByFilters = async (props) => {
|
|
|
8163
8163
|
sportHub: props.sportHub,
|
|
8164
8164
|
// conditionState: props.conditionsState,
|
|
8165
8165
|
orderBy: props.orderBy || GameOrderBy.StartsAt,
|
|
8166
|
-
|
|
8166
|
+
orderDirection: props.orderDir || OrderDirection$1.Asc,
|
|
8167
8167
|
perPage: props.perPage || 1000,
|
|
8168
8168
|
page: props.page || 1,
|
|
8169
8169
|
});
|
|
@@ -8291,9 +8291,9 @@ const getSports = async (props) => {
|
|
|
8291
8291
|
leagueSlug: props.leagueSlug,
|
|
8292
8292
|
numberOfGames: props.numberOfGames ? Math.max(props.numberOfGames, 10) : 10,
|
|
8293
8293
|
orderBy: props.orderBy,
|
|
8294
|
-
|
|
8294
|
+
orderDirection: props.orderDir,
|
|
8295
8295
|
// TODO requested to be in api, not implemented yet
|
|
8296
|
-
gameState: props.gameState,
|
|
8296
|
+
// gameState: props.gameState,
|
|
8297
8297
|
// sportHub: props.sportHub,
|
|
8298
8298
|
});
|
|
8299
8299
|
const response = await fetch(`${api}/market-manager/sports?${params}`, {
|
|
@@ -8375,9 +8375,9 @@ const searchGames = async (props) => {
|
|
|
8375
8375
|
const environment = environments[props.chainId];
|
|
8376
8376
|
const params = serializeApiParams({
|
|
8377
8377
|
environment,
|
|
8378
|
-
perPage: props.perPage || 10,
|
|
8379
|
-
page: props.page || 1,
|
|
8380
8378
|
request: props.query,
|
|
8379
|
+
page: props.page || 1,
|
|
8380
|
+
perPage: props.perPage || 10,
|
|
8381
8381
|
});
|
|
8382
8382
|
const response = await fetch(`${api}/market-manager/search?${params}`, {
|
|
8383
8383
|
method: 'GET',
|
|
@@ -5,6 +5,6 @@ export declare const getBetsGraphqlEndpoint: (chainId: ChainId) => string;
|
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Only for v2 feed
|
|
7
7
|
*/
|
|
8
|
-
export declare const getLegacyLiveGraphqlEndpoint: (chainId: ChainId) => "https://thegraph.
|
|
9
|
-
export declare const getSocketEndpoint: (chainId: ChainId) => "wss://dev-streams.
|
|
10
|
-
export declare const getApiEndpoint: (chainId: ChainId) => "https://dev-api.
|
|
8
|
+
export declare const getLegacyLiveGraphqlEndpoint: (chainId: ChainId) => "https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev" | "https://thegraph.onchainfeed.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed";
|
|
9
|
+
export declare const getSocketEndpoint: (chainId: ChainId) => "wss://dev-streams.onchainfeed.org/v1/streams" | "wss://streams.onchainfeed.org/v1/streams";
|
|
10
|
+
export declare const getApiEndpoint: (chainId: ChainId) => "https://dev-api.onchainfeed.org/api/v1/public" | "https://api.onchainfeed.org/api/v1/public";
|
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.3",
|
|
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",
|