@sodax/sdk 1.3.1-beta-rc2 → 1.3.1-beta-rc3
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.cjs +120 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -23
- package/dist/index.d.ts +43 -23
- package/dist/index.mjs +119 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7932,7 +7932,7 @@ var spokeChainConfig = {
|
|
|
7932
7932
|
},
|
|
7933
7933
|
[BITCOIN_MAINNET_CHAIN_ID]: {
|
|
7934
7934
|
addresses: {
|
|
7935
|
-
assetManager: "
|
|
7935
|
+
assetManager: "bc1pxguu2r4p9jcxp3gj7dh4r4jd9qzccwpyap3nj5nlapy28s76lhrqw522fz"
|
|
7936
7936
|
},
|
|
7937
7937
|
chain: baseChainInfo[BITCOIN_MAINNET_CHAIN_ID],
|
|
7938
7938
|
bnUSD: "no",
|
|
@@ -7960,9 +7960,9 @@ var spokeChainConfig = {
|
|
|
7960
7960
|
xChainId: BITCOIN_MAINNET_CHAIN_ID
|
|
7961
7961
|
}
|
|
7962
7962
|
},
|
|
7963
|
-
radfiApiUrl: "https://
|
|
7963
|
+
radfiApiUrl: "https://api.canary.radfi.co/api",
|
|
7964
7964
|
radfiApiKey: "",
|
|
7965
|
-
radfiUmsUrl: "https://
|
|
7965
|
+
radfiUmsUrl: "https://ums.radfi.co/api",
|
|
7966
7966
|
network: "MAINNET",
|
|
7967
7967
|
rpcUrl: "https://mempool.space/api"
|
|
7968
7968
|
},
|
|
@@ -26623,6 +26623,26 @@ function isSolanaRawSpokeProviderConfig(value) {
|
|
|
26623
26623
|
function isNearRawSpokeProviderConfig(value) {
|
|
26624
26624
|
return typeof value === "object" && value !== null && "walletAddress" in value && "chainConfig" in value && value.chainConfig.chain.type === "NEAR";
|
|
26625
26625
|
}
|
|
26626
|
+
function isSubmitSwapTxResponse(value) {
|
|
26627
|
+
return typeof value === "object" && value !== null && typeof value.success === "boolean" && typeof value.message === "string";
|
|
26628
|
+
}
|
|
26629
|
+
function isSubmitSwapTxStatusResponse(value) {
|
|
26630
|
+
if (typeof value !== "object" || value === null) return false;
|
|
26631
|
+
const obj = value;
|
|
26632
|
+
if (typeof obj.success !== "boolean") return false;
|
|
26633
|
+
if (typeof obj.data !== "object" || obj.data === null) return false;
|
|
26634
|
+
const data = obj.data;
|
|
26635
|
+
if (typeof data.txHash !== "string") return false;
|
|
26636
|
+
if (typeof data.srcChainId !== "string") return false;
|
|
26637
|
+
if (typeof data.status !== "string") return false;
|
|
26638
|
+
if (typeof data.failedAttempts !== "number") return false;
|
|
26639
|
+
if (data.result !== void 0) {
|
|
26640
|
+
if (typeof data.result !== "object" || data.result === null) return false;
|
|
26641
|
+
const result = data.result;
|
|
26642
|
+
if (typeof result.dstIntentTxHash !== "string") return false;
|
|
26643
|
+
}
|
|
26644
|
+
return true;
|
|
26645
|
+
}
|
|
26626
26646
|
async function retry(action, retryCount = DEFAULT_MAX_RETRY, delayMs = DEFAULT_RETRY_DELAY_MS) {
|
|
26627
26647
|
do {
|
|
26628
26648
|
try {
|
|
@@ -26834,10 +26854,11 @@ var BackendApiService = class {
|
|
|
26834
26854
|
* @returns Promise<T>
|
|
26835
26855
|
*/
|
|
26836
26856
|
async makeRequest(endpoint, config) {
|
|
26837
|
-
const url = `${this.baseURL}${endpoint}`;
|
|
26857
|
+
const url = config.baseURL ? `${config.baseURL}${endpoint}` : `${this.baseURL}${endpoint}`;
|
|
26838
26858
|
const headers = { ...this.defaultHeaders, ...config.headers };
|
|
26839
26859
|
const controller = new AbortController();
|
|
26840
|
-
const
|
|
26860
|
+
const timeout = config.timeout ?? this.timeout;
|
|
26861
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
26841
26862
|
try {
|
|
26842
26863
|
const response = await fetch(url, {
|
|
26843
26864
|
method: config.method,
|
|
@@ -26856,7 +26877,7 @@ var BackendApiService = class {
|
|
|
26856
26877
|
clearTimeout(timeoutId);
|
|
26857
26878
|
if (error instanceof Error) {
|
|
26858
26879
|
if (error.name === "AbortError") {
|
|
26859
|
-
throw new Error(`Request timeout after ${
|
|
26880
|
+
throw new Error(`Request timeout after ${timeout}ms`);
|
|
26860
26881
|
}
|
|
26861
26882
|
console.error("[BackendApiService] Request error:", error.message);
|
|
26862
26883
|
throw error;
|
|
@@ -26872,16 +26893,50 @@ var BackendApiService = class {
|
|
|
26872
26893
|
* @param txHash - The intent created transaction hash from the hub chain
|
|
26873
26894
|
* @returns Promise<IntentResponse>
|
|
26874
26895
|
*/
|
|
26875
|
-
async getIntentByTxHash(txHash) {
|
|
26876
|
-
return this.makeRequest(`/intent/tx/${txHash}`, { method: "GET" });
|
|
26896
|
+
async getIntentByTxHash(txHash, config) {
|
|
26897
|
+
return this.makeRequest(`/intent/tx/${txHash}`, { ...config, method: "GET" });
|
|
26877
26898
|
}
|
|
26878
26899
|
/**
|
|
26879
26900
|
* Get intent details by intent hash
|
|
26880
26901
|
* @param intentHash - Intent hash
|
|
26881
26902
|
* @returns Promise<IntentResponse>
|
|
26882
26903
|
*/
|
|
26883
|
-
async getIntentByHash(intentHash) {
|
|
26884
|
-
return this.makeRequest(`/intent/${intentHash}`, { method: "GET" });
|
|
26904
|
+
async getIntentByHash(intentHash, config) {
|
|
26905
|
+
return this.makeRequest(`/intent/${intentHash}`, { ...config, method: "GET" });
|
|
26906
|
+
}
|
|
26907
|
+
// Swap submit-tx endpoints
|
|
26908
|
+
/**
|
|
26909
|
+
* Submit a swap transaction to be processed (relay, post execution to solver, etc.)
|
|
26910
|
+
* @param params - Swap transaction submission data
|
|
26911
|
+
* @returns Promise<SubmitSwapTxResponse>
|
|
26912
|
+
*/
|
|
26913
|
+
async submitSwapTx(params, config) {
|
|
26914
|
+
const data = await this.makeRequest("/swaps/submit-tx", {
|
|
26915
|
+
...config,
|
|
26916
|
+
method: "POST",
|
|
26917
|
+
body: JSON.stringify(params)
|
|
26918
|
+
});
|
|
26919
|
+
if (!isSubmitSwapTxResponse(data)) {
|
|
26920
|
+
throw new Error("Invalid submitSwapTx response: unexpected response shape");
|
|
26921
|
+
}
|
|
26922
|
+
return data;
|
|
26923
|
+
}
|
|
26924
|
+
/**
|
|
26925
|
+
* Get the processing status of a submitted swap transaction
|
|
26926
|
+
* @param params - Query parameters containing txHash and optional srcChainId
|
|
26927
|
+
* @returns Promise<SubmitSwapTxStatusResponse>
|
|
26928
|
+
*/
|
|
26929
|
+
async getSubmitSwapTxStatus(params, config) {
|
|
26930
|
+
const queryParams = new URLSearchParams();
|
|
26931
|
+
queryParams.append("txHash", params.txHash);
|
|
26932
|
+
if (params.srcChainId) queryParams.append("srcChainId", params.srcChainId);
|
|
26933
|
+
const queryString = queryParams.toString();
|
|
26934
|
+
const endpoint = `/swaps/submit-tx/status?${queryString}`;
|
|
26935
|
+
const data = await this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26936
|
+
if (!isSubmitSwapTxStatusResponse(data)) {
|
|
26937
|
+
throw new Error("Invalid submitSwapTxStatus response: unexpected response shape");
|
|
26938
|
+
}
|
|
26939
|
+
return data;
|
|
26885
26940
|
}
|
|
26886
26941
|
// Solver endpoints
|
|
26887
26942
|
/**
|
|
@@ -26889,13 +26944,13 @@ var BackendApiService = class {
|
|
|
26889
26944
|
* @param params - Object containing offset and limit parameters for pagination
|
|
26890
26945
|
* @returns Promise<OrderbookResponse>
|
|
26891
26946
|
*/
|
|
26892
|
-
async getOrderbook(params) {
|
|
26947
|
+
async getOrderbook(params, config) {
|
|
26893
26948
|
const queryParams = new URLSearchParams();
|
|
26894
26949
|
queryParams.append("offset", params.offset);
|
|
26895
26950
|
queryParams.append("limit", params.limit);
|
|
26896
26951
|
const queryString = queryParams.toString();
|
|
26897
26952
|
const endpoint = `/solver/orderbook?${queryString}`;
|
|
26898
|
-
return this.makeRequest(endpoint, { method: "GET" });
|
|
26953
|
+
return this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26899
26954
|
}
|
|
26900
26955
|
/**
|
|
26901
26956
|
* Get all intents created by a specific user address with optional filters.
|
|
@@ -26909,7 +26964,7 @@ var BackendApiService = class {
|
|
|
26909
26964
|
*
|
|
26910
26965
|
* @returns {Promise<UserIntentsResponse>} Promise resolving to an array of intent responses for the user.
|
|
26911
26966
|
*/
|
|
26912
|
-
async getUserIntents(params) {
|
|
26967
|
+
async getUserIntents(params, config) {
|
|
26913
26968
|
const { userAddress, startDate, endDate, limit, offset } = params;
|
|
26914
26969
|
const queryParams = new URLSearchParams();
|
|
26915
26970
|
if (startDate) queryParams.append("startDate", new Date(startDate).toISOString());
|
|
@@ -26918,7 +26973,7 @@ var BackendApiService = class {
|
|
|
26918
26973
|
if (offset) queryParams.append("offset", offset);
|
|
26919
26974
|
const queryString = queryParams.toString();
|
|
26920
26975
|
const endpoint = queryString.length > 0 ? `/intent/user/${userAddress}?${queryString}` : `/intent/user/${userAddress}`;
|
|
26921
|
-
return this.makeRequest(endpoint, { method: "GET" });
|
|
26976
|
+
return this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26922
26977
|
}
|
|
26923
26978
|
// Money Market endpoints
|
|
26924
26979
|
/**
|
|
@@ -26926,23 +26981,23 @@ var BackendApiService = class {
|
|
|
26926
26981
|
* @param userAddress - User's wallet address
|
|
26927
26982
|
* @returns Promise<MoneyMarketPosition>
|
|
26928
26983
|
*/
|
|
26929
|
-
async getMoneyMarketPosition(userAddress) {
|
|
26930
|
-
return this.makeRequest(`/moneymarket/position/${userAddress}`, { method: "GET" });
|
|
26984
|
+
async getMoneyMarketPosition(userAddress, config) {
|
|
26985
|
+
return this.makeRequest(`/moneymarket/position/${userAddress}`, { ...config, method: "GET" });
|
|
26931
26986
|
}
|
|
26932
26987
|
/**
|
|
26933
26988
|
* Get all money market assets
|
|
26934
26989
|
* @returns Promise<MoneyMarketAsset[]>
|
|
26935
26990
|
*/
|
|
26936
|
-
async getAllMoneyMarketAssets() {
|
|
26937
|
-
return this.makeRequest("/moneymarket/asset/all", { method: "GET" });
|
|
26991
|
+
async getAllMoneyMarketAssets(config) {
|
|
26992
|
+
return this.makeRequest("/moneymarket/asset/all", { ...config, method: "GET" });
|
|
26938
26993
|
}
|
|
26939
26994
|
/**
|
|
26940
26995
|
* Get specific money market asset details
|
|
26941
26996
|
* @param reserveAddress - Reserve contract address
|
|
26942
26997
|
* @returns Promise<MoneyMarketAsset>
|
|
26943
26998
|
*/
|
|
26944
|
-
async getMoneyMarketAsset(reserveAddress) {
|
|
26945
|
-
return this.makeRequest(`/moneymarket/asset/${reserveAddress}`, { method: "GET" });
|
|
26999
|
+
async getMoneyMarketAsset(reserveAddress, config) {
|
|
27000
|
+
return this.makeRequest(`/moneymarket/asset/${reserveAddress}`, { ...config, method: "GET" });
|
|
26946
27001
|
}
|
|
26947
27002
|
/**
|
|
26948
27003
|
* Get borrowers for a specific money market asset
|
|
@@ -26950,13 +27005,13 @@ var BackendApiService = class {
|
|
|
26950
27005
|
* @param params - Object containing offset and limit parameters for pagination
|
|
26951
27006
|
* @returns Promise<MoneyMarketAssetBorrowers>
|
|
26952
27007
|
*/
|
|
26953
|
-
async getMoneyMarketAssetBorrowers(reserveAddress, params) {
|
|
27008
|
+
async getMoneyMarketAssetBorrowers(reserveAddress, params, config) {
|
|
26954
27009
|
const queryParams = new URLSearchParams();
|
|
26955
27010
|
queryParams.append("offset", params.offset);
|
|
26956
27011
|
queryParams.append("limit", params.limit);
|
|
26957
27012
|
const queryString = queryParams.toString();
|
|
26958
27013
|
const endpoint = `/moneymarket/asset/${reserveAddress}/borrowers?${queryString}`;
|
|
26959
|
-
return this.makeRequest(endpoint, { method: "GET" });
|
|
27014
|
+
return this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26960
27015
|
}
|
|
26961
27016
|
/**
|
|
26962
27017
|
* Get suppliers for a specific money market asset
|
|
@@ -26964,69 +27019,76 @@ var BackendApiService = class {
|
|
|
26964
27019
|
* @param params - Object containing offset and limit parameters for pagination
|
|
26965
27020
|
* @returns Promise<MoneyMarketAssetSuppliers>
|
|
26966
27021
|
*/
|
|
26967
|
-
async getMoneyMarketAssetSuppliers(reserveAddress, params) {
|
|
27022
|
+
async getMoneyMarketAssetSuppliers(reserveAddress, params, config) {
|
|
26968
27023
|
const queryParams = new URLSearchParams();
|
|
26969
27024
|
queryParams.append("offset", params.offset);
|
|
26970
27025
|
queryParams.append("limit", params.limit);
|
|
26971
27026
|
const queryString = queryParams.toString();
|
|
26972
27027
|
const endpoint = `/moneymarket/asset/${reserveAddress}/suppliers?${queryString}`;
|
|
26973
|
-
return this.makeRequest(endpoint, { method: "GET" });
|
|
27028
|
+
return this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26974
27029
|
}
|
|
26975
27030
|
/**
|
|
26976
27031
|
* Get all money market borrowers
|
|
26977
27032
|
* @param params - Object containing offset and limit parameters for pagination
|
|
26978
27033
|
* @returns Promise<MoneyMarketBorrowers>
|
|
26979
27034
|
*/
|
|
26980
|
-
async getAllMoneyMarketBorrowers(params) {
|
|
27035
|
+
async getAllMoneyMarketBorrowers(params, config) {
|
|
26981
27036
|
const queryParams = new URLSearchParams();
|
|
26982
27037
|
queryParams.append("offset", params.offset);
|
|
26983
27038
|
queryParams.append("limit", params.limit);
|
|
26984
27039
|
const queryString = queryParams.toString();
|
|
26985
27040
|
const endpoint = `/moneymarket/borrowers?${queryString}`;
|
|
26986
|
-
return this.makeRequest(endpoint, { method: "GET" });
|
|
27041
|
+
return this.makeRequest(endpoint, { ...config, method: "GET" });
|
|
26987
27042
|
}
|
|
26988
27043
|
/**
|
|
26989
27044
|
* Get all supported config
|
|
26990
27045
|
* @returns Promise<GetAllConfigApiResponse>
|
|
26991
27046
|
*/
|
|
26992
|
-
async getAllConfig() {
|
|
26993
|
-
return this.makeRequest("/config/all", { method: "GET" });
|
|
27047
|
+
async getAllConfig(config) {
|
|
27048
|
+
return this.makeRequest("/config/all", { ...config, method: "GET" });
|
|
26994
27049
|
}
|
|
26995
27050
|
/**
|
|
26996
27051
|
* Get all supported spoke chains
|
|
26997
27052
|
* @returns Promise<GetChainsApiResponse>
|
|
26998
27053
|
*/
|
|
26999
|
-
async getChains() {
|
|
27000
|
-
return this.makeRequest("/config/spoke/chains", { method: "GET" });
|
|
27054
|
+
async getChains(config) {
|
|
27055
|
+
return this.makeRequest("/config/spoke/chains", { ...config, method: "GET" });
|
|
27001
27056
|
}
|
|
27002
27057
|
/**
|
|
27003
27058
|
* Get all supported swap tokens
|
|
27004
27059
|
* @returns Promise<GetSwapTokensApiResponse>
|
|
27005
27060
|
*/
|
|
27006
|
-
async getSwapTokens() {
|
|
27007
|
-
return this.makeRequest("/config/swap/tokens", { method: "GET" });
|
|
27061
|
+
async getSwapTokens(config) {
|
|
27062
|
+
return this.makeRequest("/config/swap/tokens", { ...config, method: "GET" });
|
|
27008
27063
|
}
|
|
27009
27064
|
/**
|
|
27010
27065
|
* Get supported swap tokens for a specific spoke chain
|
|
27011
27066
|
* @param chainId - Spoke chain id
|
|
27012
27067
|
* @returns Promise<GetSwapTokensByChainIdApiResponse>
|
|
27013
27068
|
*/
|
|
27014
|
-
async getSwapTokensByChainId(chainId) {
|
|
27015
|
-
return this.makeRequest(`/config/swap/${chainId}/tokens`, {
|
|
27069
|
+
async getSwapTokensByChainId(chainId, config) {
|
|
27070
|
+
return this.makeRequest(`/config/swap/${chainId}/tokens`, {
|
|
27071
|
+
...config,
|
|
27072
|
+
method: "GET"
|
|
27073
|
+
});
|
|
27016
27074
|
}
|
|
27017
27075
|
/**
|
|
27018
27076
|
* Get all supported money market tokens
|
|
27019
27077
|
* @returns Promise<GetMoneyMarketTokensApiResponse>
|
|
27020
27078
|
*/
|
|
27021
|
-
async getMoneyMarketTokens() {
|
|
27022
|
-
return this.makeRequest("/config/money-market/tokens", {
|
|
27079
|
+
async getMoneyMarketTokens(config) {
|
|
27080
|
+
return this.makeRequest("/config/money-market/tokens", {
|
|
27081
|
+
...config,
|
|
27082
|
+
method: "GET"
|
|
27083
|
+
});
|
|
27023
27084
|
}
|
|
27024
27085
|
/**
|
|
27025
27086
|
* Get all supported money market tokens
|
|
27026
27087
|
* @returns Promise<GetMoneyMarketTokensApiResponse>
|
|
27027
27088
|
*/
|
|
27028
|
-
async getMoneyMarketReserveAssets() {
|
|
27089
|
+
async getMoneyMarketReserveAssets(config) {
|
|
27029
27090
|
return this.makeRequest("/config/money-market/reserve-assets", {
|
|
27091
|
+
...config,
|
|
27030
27092
|
method: "GET"
|
|
27031
27093
|
});
|
|
27032
27094
|
}
|
|
@@ -27035,8 +27097,9 @@ var BackendApiService = class {
|
|
|
27035
27097
|
* @param chainId - Spoke chain id
|
|
27036
27098
|
* @returns Promise<GetMoneyMarketTokensByChainIdApiResponse>
|
|
27037
27099
|
*/
|
|
27038
|
-
async getMoneyMarketTokensByChainId(chainId) {
|
|
27100
|
+
async getMoneyMarketTokensByChainId(chainId, config) {
|
|
27039
27101
|
return this.makeRequest(`/config/money-market/${chainId}/tokens`, {
|
|
27102
|
+
...config,
|
|
27040
27103
|
method: "GET"
|
|
27041
27104
|
});
|
|
27042
27105
|
}
|
|
@@ -27044,30 +27107,39 @@ var BackendApiService = class {
|
|
|
27044
27107
|
* Get all supported hub assets (assets representing spoke token deposit)
|
|
27045
27108
|
* @returns Promise<GetHubAssetsApiResponse>
|
|
27046
27109
|
*/
|
|
27047
|
-
async getHubAssets() {
|
|
27048
|
-
return this.makeRequest("/config/hub/assets", { method: "GET" });
|
|
27110
|
+
async getHubAssets(config) {
|
|
27111
|
+
return this.makeRequest("/config/hub/assets", { ...config, method: "GET" });
|
|
27049
27112
|
}
|
|
27050
27113
|
/**
|
|
27051
27114
|
* Get supported hub assets (assets representing spoke token deposit) for a specific spoke chain
|
|
27052
27115
|
* @param chainId - Spoke chain id
|
|
27053
27116
|
* @returns Promise<GetHubAssetsByChainIdApiResponse>
|
|
27054
27117
|
*/
|
|
27055
|
-
async getHubAssetsByChainId(chainId) {
|
|
27056
|
-
return this.makeRequest(`/config/hub/${chainId}/assets`, {
|
|
27118
|
+
async getHubAssetsByChainId(chainId, config) {
|
|
27119
|
+
return this.makeRequest(`/config/hub/${chainId}/assets`, {
|
|
27120
|
+
...config,
|
|
27121
|
+
method: "GET"
|
|
27122
|
+
});
|
|
27057
27123
|
}
|
|
27058
27124
|
/**
|
|
27059
27125
|
* Get the intent relay chain id map
|
|
27060
27126
|
* @returns Promise<GetRelayChainIdMapApiResponse>
|
|
27061
27127
|
*/
|
|
27062
|
-
async getRelayChainIdMap() {
|
|
27063
|
-
return this.makeRequest("/config/relay/chain-id-map", {
|
|
27128
|
+
async getRelayChainIdMap(config) {
|
|
27129
|
+
return this.makeRequest("/config/relay/chain-id-map", {
|
|
27130
|
+
...config,
|
|
27131
|
+
method: "GET"
|
|
27132
|
+
});
|
|
27064
27133
|
}
|
|
27065
27134
|
/**
|
|
27066
27135
|
* Get the spoke chain config
|
|
27067
27136
|
* @returns Promise<GetSpokeChainConfigApiResponse>
|
|
27068
27137
|
*/
|
|
27069
|
-
async getSpokeChainConfig() {
|
|
27070
|
-
return this.makeRequest("/config/spoke/all-chains-configs", {
|
|
27138
|
+
async getSpokeChainConfig(config) {
|
|
27139
|
+
return this.makeRequest("/config/spoke/all-chains-configs", {
|
|
27140
|
+
...config,
|
|
27141
|
+
method: "GET"
|
|
27142
|
+
});
|
|
27071
27143
|
}
|
|
27072
27144
|
/**
|
|
27073
27145
|
* Set custom headers for API requests
|
|
@@ -30940,6 +31012,6 @@ var BalnSwapService = class {
|
|
|
30940
31012
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
30941
31013
|
*/
|
|
30942
31014
|
|
|
30943
|
-
export { ARBITRUM_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, BITCOIN_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinBaseSpokeProvider, BitcoinRawSpokeProvider, BitcoinSpokeProvider, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_IDS, CONFIG_VERSION, ChainIdToIntentRelayChainId, ChainTypeArr, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, ETHEREUM_MAINNET_CHAIN_ID, EVM_CHAIN_IDS, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, EvmHubProvider, EvmRawSpokeProvider, EvmSolverService, EvmSpokeProvider, EvmSpokeService, EvmVaultTokenService, EvmWalletAbstraction, FEE_PERCENTAGE_SCALE, HALF_RAY, HALF_WAD, HUB_CHAIN_IDS, HYPEREVM_MAINNET_CHAIN_ID, HubService, HubVaultSymbols, ICON_MAINNET_CHAIN_ID, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_MAINNET_CHAIN_ID, IconBaseSpokeProvider, IconRawSpokeProvider, IconSpokeProvider, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveBaseSpokeProvider, InjectiveExecuteResponse, InjectiveRawSpokeProvider, InjectiveSpokeProvider, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataType, IntentFilledEventAbi, IntentsAbi, KAIA_MAINNET_CHAIN_ID, LIGHTLINK_MAINNET_CHAIN_ID, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MoneyMarketDataService, MoneyMarketService, NEAR_MAINNET_CHAIN_ID, NearBaseSpokeProvider, NearRawSpokeProvider, NearSpokeProvider, OPTIMISM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, PartnerFeeClaimService, PartnerService, ProtocolIntentsAbi, RAY, RAY_DECIMALS, REDBELLY_MAINNET_CHAIN_ID, RadfiProvider, SECONDS_PER_YEAR, SOLANA_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_MAINNET_CHAIN_ID, STELLAR_PRIORITY_FEE, SUI_MAINNET_CHAIN_ID, SodaTokens, SodaTokensAsHubAssets, Sodax, SolanaBaseSpokeProvider, SolanaRawSpokeProvider, SolanaSpokeProvider, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicBaseSpokeProvider, SonicRawSpokeProvider, SonicSpokeProvider, SonicSpokeService, SpokeService, StakingLogic, StakingService, StellarBaseSpokeProvider, StellarRawSpokeProvider, StellarSpokeProvider, StellarSpokeService, SuiBaseSpokeProvider, SuiRawSpokeProvider, SuiSpokeProvider, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, WalletAbstractionService, adjustAmountByFee, assetManagerAbi, balnSwapAbi, baseChainInfo, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, constructRawSpokeProvider, convertTransactionInstructionToRaw, defaultSharedConfig, defaultSodaxConfig, deriveUserWalletAddress, detectBitcoinAddressType, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hubAssets, hubChainConfig, hyper, isAddressString, isBalnMigrateParams, isBitcoinRawSpokeProvider, isBitcoinSpokeProvider, isBitcoinSpokeProviderType, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmRawSpokeProviderConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNearRawSpokeProvider, isNearRawSpokeProviderConfig, isNearSpokeProvider, isNearSpokeProviderType, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaRawSpokeProviderConfig, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicRawSpokeProviderConfig, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarRawSpokeProviderConfig, isStellarSpokeProvider, isStellarSpokeProviderType, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isSwapSupportedToken, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, solverConfig, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, stakedSodaAbi, stakingRouterAbi, submitTransaction, supportedSpokeChains, swapSupportedTokens, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
31015
|
+
export { ARBITRUM_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, BITCOIN_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinBaseSpokeProvider, BitcoinRawSpokeProvider, BitcoinSpokeProvider, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_IDS, CONFIG_VERSION, ChainIdToIntentRelayChainId, ChainTypeArr, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, ETHEREUM_MAINNET_CHAIN_ID, EVM_CHAIN_IDS, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, EvmHubProvider, EvmRawSpokeProvider, EvmSolverService, EvmSpokeProvider, EvmSpokeService, EvmVaultTokenService, EvmWalletAbstraction, FEE_PERCENTAGE_SCALE, HALF_RAY, HALF_WAD, HUB_CHAIN_IDS, HYPEREVM_MAINNET_CHAIN_ID, HubService, HubVaultSymbols, ICON_MAINNET_CHAIN_ID, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_MAINNET_CHAIN_ID, IconBaseSpokeProvider, IconRawSpokeProvider, IconSpokeProvider, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveBaseSpokeProvider, InjectiveExecuteResponse, InjectiveRawSpokeProvider, InjectiveSpokeProvider, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataType, IntentFilledEventAbi, IntentsAbi, KAIA_MAINNET_CHAIN_ID, LIGHTLINK_MAINNET_CHAIN_ID, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MoneyMarketDataService, MoneyMarketService, NEAR_MAINNET_CHAIN_ID, NearBaseSpokeProvider, NearRawSpokeProvider, NearSpokeProvider, OPTIMISM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, PartnerFeeClaimService, PartnerService, ProtocolIntentsAbi, RAY, RAY_DECIMALS, REDBELLY_MAINNET_CHAIN_ID, RadfiProvider, SECONDS_PER_YEAR, SOLANA_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_MAINNET_CHAIN_ID, STELLAR_PRIORITY_FEE, SUI_MAINNET_CHAIN_ID, SodaTokens, SodaTokensAsHubAssets, Sodax, SolanaBaseSpokeProvider, SolanaRawSpokeProvider, SolanaSpokeProvider, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicBaseSpokeProvider, SonicRawSpokeProvider, SonicSpokeProvider, SonicSpokeService, SpokeService, StakingLogic, StakingService, StellarBaseSpokeProvider, StellarRawSpokeProvider, StellarSpokeProvider, StellarSpokeService, SuiBaseSpokeProvider, SuiRawSpokeProvider, SuiSpokeProvider, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, WalletAbstractionService, adjustAmountByFee, assetManagerAbi, balnSwapAbi, baseChainInfo, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, constructRawSpokeProvider, convertTransactionInstructionToRaw, defaultSharedConfig, defaultSodaxConfig, deriveUserWalletAddress, detectBitcoinAddressType, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hubAssets, hubChainConfig, hyper, isAddressString, isBalnMigrateParams, isBitcoinRawSpokeProvider, isBitcoinSpokeProvider, isBitcoinSpokeProviderType, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmRawSpokeProviderConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNearRawSpokeProvider, isNearRawSpokeProviderConfig, isNearSpokeProvider, isNearSpokeProviderType, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaRawSpokeProviderConfig, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicRawSpokeProviderConfig, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarRawSpokeProviderConfig, isStellarSpokeProvider, isStellarSpokeProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isSwapSupportedToken, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, solverConfig, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, stakedSodaAbi, stakingRouterAbi, submitTransaction, supportedSpokeChains, swapSupportedTokens, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
30944
31016
|
//# sourceMappingURL=index.mjs.map
|
|
30945
31017
|
//# sourceMappingURL=index.mjs.map
|