@sodax/sdk 2.0.0-rc.13 → 2.0.0-rc.14
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 +314 -73
- package/dist/index.d.cts +97 -45
- package/dist/index.d.ts +97 -45
- package/dist/index.mjs +315 -76
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { getAbiItem, parseAbi, isAddress, toHex, hexToBytes, encodeAbiParameters
|
|
|
2
2
|
import { bcs } from '@mysten/sui/bcs';
|
|
3
3
|
import { PublicKey, Connection, VersionedTransaction, SystemProgram, ComputeBudgetProgram, TransactionMessage, TransactionInstruction } from '@solana/web3.js';
|
|
4
4
|
import { rpc, Address, xdr, Account, Horizon, Contract, TransactionBuilder, nativeToScVal, TimeoutInfinite, scValToBigInt, Operation, Asset, FeeBumpTransaction } from '@stellar/stellar-sdk';
|
|
5
|
-
import { serializeCV, Cl, deserializeCV, cvToString, createNetwork, fetchFeeEstimateTransaction, fetchCallReadOnlyFunction, parseContractId, PostConditionMode, noneCV, someCV, uintCV,
|
|
5
|
+
import { serializeCV, Cl, deserializeCV, cvToString, createNetwork, fetchFeeEstimateTransaction, fetchCallReadOnlyFunction, parseContractId, PostConditionMode, noneCV, someCV, uintCV, getAddressFromPublicKey, makeUnsignedContractCall, serializePayloadBytes } from '@sodax/libs/stacks/core';
|
|
6
6
|
import { kaia, redbellyMainnet, mainnet, lightlinkPhoenix, polygon, bsc, optimism, base, arbitrum, avalanche, sonic } from 'viem/chains';
|
|
7
7
|
import * as rlp from 'rlp';
|
|
8
8
|
import { initEccLib, networks, Transaction, Psbt, payments, opcodes, script } from 'bitcoinjs-lib';
|
|
@@ -14,7 +14,8 @@ import { TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, getAssociatedTokenAddress } fr
|
|
|
14
14
|
import { AnchorProvider, Program } from '@coral-xyz/anchor';
|
|
15
15
|
import BN from 'bn.js';
|
|
16
16
|
import * as IconSdkRaw from 'icon-sdk-js';
|
|
17
|
-
import { ChainGrpcWasmApi, TxGrpcApi,
|
|
17
|
+
import { ChainGrpcWasmApi, TxGrpcApi, toBase64, fromBase64, MsgExecuteContract, ChainRestAuthApi, BaseAccount, createTransaction } from '@injectivelabs/sdk-ts';
|
|
18
|
+
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
|
|
18
19
|
import { getNetworkEndpoints, Network } from '@injectivelabs/networks';
|
|
19
20
|
import BigNumber5, { BigNumber } from 'bignumber.js';
|
|
20
21
|
import { Token, Price } from '@pancakeswap/swap-sdk-core';
|
|
@@ -303,7 +304,8 @@ var HubVaultSymbols = [
|
|
|
303
304
|
"sodaNEAR",
|
|
304
305
|
"sodaKAIA",
|
|
305
306
|
"sodaSTX",
|
|
306
|
-
"sodaUSDS"
|
|
307
|
+
"sodaUSDS",
|
|
308
|
+
"sodaJITOSOL"
|
|
307
309
|
];
|
|
308
310
|
var SodaTokens = {
|
|
309
311
|
sodaBNB: {
|
|
@@ -530,9 +532,18 @@ var SodaTokens = {
|
|
|
530
532
|
chainKey: ChainKeys.SONIC_MAINNET,
|
|
531
533
|
hubAsset: "0x243b0c26c8b38793908d7C64e8510f21B19B4613",
|
|
532
534
|
vault: "0x243b0c26c8b38793908d7C64e8510f21B19B4613"
|
|
535
|
+
},
|
|
536
|
+
sodaJITOSOL: {
|
|
537
|
+
symbol: "sodaJITOSOL",
|
|
538
|
+
name: "Soda JITOSOL",
|
|
539
|
+
decimals: 18,
|
|
540
|
+
address: "0xe1bad4400d947Bc4fa66f9c0A143D800002083a0",
|
|
541
|
+
chainKey: ChainKeys.SONIC_MAINNET,
|
|
542
|
+
hubAsset: "0xe1bad4400d947Bc4fa66f9c0A143D800002083a0",
|
|
543
|
+
vault: "0xe1bad4400d947Bc4fa66f9c0A143D800002083a0"
|
|
533
544
|
}
|
|
534
545
|
};
|
|
535
|
-
var LsodaSymbols = ["lsodaWEETH", "lsodaWSTETH"];
|
|
546
|
+
var LsodaSymbols = ["lsodaWEETH", "lsodaWSTETH", "lsodaJITOSOL"];
|
|
536
547
|
var LsodaTokens = {
|
|
537
548
|
lsodaWEETH: {
|
|
538
549
|
symbol: "lsodaWEETH",
|
|
@@ -551,6 +562,15 @@ var LsodaTokens = {
|
|
|
551
562
|
chainKey: ChainKeys.SONIC_MAINNET,
|
|
552
563
|
hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a",
|
|
553
564
|
vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a"
|
|
565
|
+
},
|
|
566
|
+
lsodaJITOSOL: {
|
|
567
|
+
symbol: "lsodaJITOSOL",
|
|
568
|
+
name: "Leveraged Soda JITOSOL",
|
|
569
|
+
decimals: 18,
|
|
570
|
+
address: "0xD7Ae4853E0f93682F5DaA14734F5D18cBa09Bd78",
|
|
571
|
+
chainKey: ChainKeys.SONIC_MAINNET,
|
|
572
|
+
hubAsset: "0xD7Ae4853E0f93682F5DaA14734F5D18cBa09Bd78",
|
|
573
|
+
vault: "0xD7Ae4853E0f93682F5DaA14734F5D18cBa09Bd78"
|
|
554
574
|
}
|
|
555
575
|
};
|
|
556
576
|
var sonicSupportedTokens = {
|
|
@@ -828,7 +848,7 @@ var solanaSupportedTokens = {
|
|
|
828
848
|
address: "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn",
|
|
829
849
|
chainKey: ChainKeys.SOLANA_MAINNET,
|
|
830
850
|
hubAsset: "0x942f89a324d2652e447b9fcf08effc9f9776a680",
|
|
831
|
-
vault:
|
|
851
|
+
vault: SodaTokens.sodaJITOSOL.address
|
|
832
852
|
},
|
|
833
853
|
mSOL: {
|
|
834
854
|
symbol: "mSOL",
|
|
@@ -1261,6 +1281,15 @@ var baseSupportedTokens = {
|
|
|
1261
1281
|
chainKey: ChainKeys.BASE_MAINNET,
|
|
1262
1282
|
hubAsset: "0xaa81bb5ba3c972ab53605d3ba7e443a3de6d1cb9",
|
|
1263
1283
|
vault: "0xaa81bb5ba3c972ab53605d3ba7e443a3de6d1cb9"
|
|
1284
|
+
},
|
|
1285
|
+
AERO: {
|
|
1286
|
+
symbol: "AERO",
|
|
1287
|
+
name: "Aerodrome Finance",
|
|
1288
|
+
decimals: 18,
|
|
1289
|
+
address: "0x940181a94A35A4569e4529A3CDfB74e38FD98631",
|
|
1290
|
+
chainKey: ChainKeys.BASE_MAINNET,
|
|
1291
|
+
hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173",
|
|
1292
|
+
vault: "0x348e086ab6f424dfc575a325c28624ed23973173"
|
|
1264
1293
|
}
|
|
1265
1294
|
};
|
|
1266
1295
|
var optimismSupportedTokens = {
|
|
@@ -1943,6 +1972,33 @@ var stellarSupportedTokens = {
|
|
|
1943
1972
|
chainKey: ChainKeys.STELLAR_MAINNET,
|
|
1944
1973
|
hubAsset: "0xD749B5FfFED7cEDaa3239abDd16D677179C29AEc",
|
|
1945
1974
|
vault: SodaTokens.sodaSODA.address
|
|
1975
|
+
},
|
|
1976
|
+
sodaETH: {
|
|
1977
|
+
symbol: "sodaETH",
|
|
1978
|
+
name: "Soda ETH",
|
|
1979
|
+
decimals: 7,
|
|
1980
|
+
address: "CDK5EWVTZLGSLI6D5OSES7XUKWZUKBXDRNOWUVDNPP5RJRP5EYWCW7SL",
|
|
1981
|
+
chainKey: ChainKeys.STELLAR_MAINNET,
|
|
1982
|
+
hubAsset: "0x4985a4b72ac723723e9ae82382d12d77e9a715de",
|
|
1983
|
+
vault: SodaTokens.sodaETH.address
|
|
1984
|
+
},
|
|
1985
|
+
sodaBTC: {
|
|
1986
|
+
symbol: "sodaBTC",
|
|
1987
|
+
name: "Soda BTC",
|
|
1988
|
+
decimals: 7,
|
|
1989
|
+
address: "CD6XWBW74YVFDQQYUM2GALCULMA5MAWGP6NTCWF3ZYXP4Z7MEVY4JKBX",
|
|
1990
|
+
chainKey: ChainKeys.STELLAR_MAINNET,
|
|
1991
|
+
hubAsset: "0xddee01f63c18843e2bac30cb702864d7632c83a2",
|
|
1992
|
+
vault: SodaTokens.sodaBTC.address
|
|
1993
|
+
},
|
|
1994
|
+
sodaBNB: {
|
|
1995
|
+
symbol: "sodaBNB",
|
|
1996
|
+
name: "Soda BNB",
|
|
1997
|
+
decimals: 7,
|
|
1998
|
+
address: "CCXTXZAFLVNTMORVWYB6BGL7YEW3U3ONDAL2FGBRGDUQH7AGANVQPRS6",
|
|
1999
|
+
chainKey: ChainKeys.STELLAR_MAINNET,
|
|
2000
|
+
hubAsset: "0xa10be5f5c2dea7d272555dc73ea2a7317c3c5b63",
|
|
2001
|
+
vault: SodaTokens.sodaBNB.address
|
|
1946
2002
|
}
|
|
1947
2003
|
};
|
|
1948
2004
|
var suiSupportedTokens = {
|
|
@@ -3082,6 +3138,21 @@ var spokeChainConfig = {
|
|
|
3082
3138
|
assetCode: "SODA",
|
|
3083
3139
|
contractId: "CAH5LKJC2ZB4RVUVEVL2QWJWNJLHQE2UF767ILLQ5EQ4O3OURR2XIUGM",
|
|
3084
3140
|
assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
assetCode: "sodaETH",
|
|
3144
|
+
contractId: "CDK5EWVTZLGSLI6D5OSES7XUKWZUKBXDRNOWUVDNPP5RJRP5EYWCW7SL",
|
|
3145
|
+
assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
|
|
3146
|
+
},
|
|
3147
|
+
{
|
|
3148
|
+
assetCode: "sodaBTC",
|
|
3149
|
+
contractId: "CD6XWBW74YVFDQQYUM2GALCULMA5MAWGP6NTCWF3ZYXP4Z7MEVY4JKBX",
|
|
3150
|
+
assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
|
|
3151
|
+
},
|
|
3152
|
+
{
|
|
3153
|
+
assetCode: "sodaBNB",
|
|
3154
|
+
contractId: "CCXTXZAFLVNTMORVWYB6BGL7YEW3U3ONDAL2FGBRGDUQH7AGANVQPRS6",
|
|
3155
|
+
assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
|
|
3085
3156
|
}
|
|
3086
3157
|
],
|
|
3087
3158
|
supportedTokens: stellarSupportedTokens,
|
|
@@ -3357,7 +3428,8 @@ var moneyMarketSupportedTokens = {
|
|
|
3357
3428
|
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.bnUSD,
|
|
3358
3429
|
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDC,
|
|
3359
3430
|
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.SODA,
|
|
3360
|
-
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDT
|
|
3431
|
+
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDT,
|
|
3432
|
+
spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.JitoSOL
|
|
3361
3433
|
],
|
|
3362
3434
|
[ChainKeys.ICON_MAINNET]: [
|
|
3363
3435
|
// spokeChainConfig[ChainKeys.ICON].supportedTokens.ICX,
|
|
@@ -3368,7 +3440,10 @@ var moneyMarketSupportedTokens = {
|
|
|
3368
3440
|
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.XLM,
|
|
3369
3441
|
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.bnUSD,
|
|
3370
3442
|
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SODA,
|
|
3371
|
-
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.USDC
|
|
3443
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.USDC,
|
|
3444
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaETH,
|
|
3445
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaBTC,
|
|
3446
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaBNB
|
|
3372
3447
|
],
|
|
3373
3448
|
[ChainKeys.SUI_MAINNET]: [
|
|
3374
3449
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.SUI,
|
|
@@ -3619,7 +3694,8 @@ var swapSupportedTokens = {
|
|
|
3619
3694
|
spokeChainConfig[ChainKeys.SONIC_MAINNET].supportedTokens.USDT,
|
|
3620
3695
|
spokeChainConfig[ChainKeys.SONIC_MAINNET].supportedTokens.wS,
|
|
3621
3696
|
spokeChainConfig[ChainKeys.SONIC_MAINNET].supportedTokens.SODA,
|
|
3622
|
-
|
|
3697
|
+
// sodaUSDS is staging-only — see stagingSwapSupportedTokens
|
|
3698
|
+
...Object.values(SodaTokens).filter((t) => t !== SodaTokens.sodaUSDS),
|
|
3623
3699
|
...Object.values(LsodaTokens)
|
|
3624
3700
|
],
|
|
3625
3701
|
[ChainKeys.AVALANCHE_MAINNET]: [
|
|
@@ -3639,36 +3715,35 @@ var swapSupportedTokens = {
|
|
|
3639
3715
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.tBTC,
|
|
3640
3716
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.USDC,
|
|
3641
3717
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.USDT,
|
|
3642
|
-
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.SODA,
|
|
3643
3718
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.ARB,
|
|
3644
3719
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.AAVE,
|
|
3645
3720
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.LINK,
|
|
3646
3721
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.UNI,
|
|
3647
3722
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.CRV,
|
|
3648
3723
|
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.PENDLE,
|
|
3649
|
-
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.rETH
|
|
3724
|
+
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.rETH,
|
|
3725
|
+
spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.SODA
|
|
3650
3726
|
],
|
|
3651
3727
|
[ChainKeys.BASE_MAINNET]: [
|
|
3652
3728
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.ETH,
|
|
3653
|
-
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.bnUSD,
|
|
3654
3729
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.weETH,
|
|
3655
3730
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.USDC,
|
|
3656
3731
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.wstETH,
|
|
3657
3732
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.cbBTC,
|
|
3658
|
-
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SODA,
|
|
3659
3733
|
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.VIRTUAL,
|
|
3660
|
-
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.cbETH
|
|
3734
|
+
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.cbETH,
|
|
3735
|
+
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SODA
|
|
3661
3736
|
],
|
|
3662
3737
|
[ChainKeys.OPTIMISM_MAINNET]: [
|
|
3663
3738
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.ETH,
|
|
3664
|
-
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.bnUSD,
|
|
3665
3739
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.USDC,
|
|
3666
3740
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.wstETH,
|
|
3667
3741
|
// spokeChainConfig[OPTIMISM_MAINNET_CHAIN_ID].supportedTokens.weETH, // NOTE: Not Implemented
|
|
3668
3742
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.USDT,
|
|
3669
3743
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.SODA,
|
|
3670
3744
|
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.OP,
|
|
3671
|
-
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.WBTC
|
|
3745
|
+
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.WBTC,
|
|
3746
|
+
spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.bnUSD
|
|
3672
3747
|
],
|
|
3673
3748
|
[ChainKeys.POLYGON_MAINNET]: [
|
|
3674
3749
|
spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.POL,
|
|
@@ -3724,7 +3799,6 @@ var swapSupportedTokens = {
|
|
|
3724
3799
|
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["SUI.LL"],
|
|
3725
3800
|
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["S.LL"],
|
|
3726
3801
|
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["POL.LL"],
|
|
3727
|
-
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["HYPE.LL"],
|
|
3728
3802
|
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens.LL
|
|
3729
3803
|
],
|
|
3730
3804
|
[ChainKeys.SOLANA_MAINNET]: [
|
|
@@ -3763,7 +3837,10 @@ var swapSupportedTokens = {
|
|
|
3763
3837
|
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.bnUSD,
|
|
3764
3838
|
// NOTE: Not Implemented
|
|
3765
3839
|
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.USDC,
|
|
3766
|
-
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SODA
|
|
3840
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SODA,
|
|
3841
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaETH,
|
|
3842
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaBTC,
|
|
3843
|
+
spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.sodaBNB
|
|
3767
3844
|
],
|
|
3768
3845
|
[ChainKeys.SUI_MAINNET]: [
|
|
3769
3846
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.SUI,
|
|
@@ -3781,12 +3858,8 @@ var swapSupportedTokens = {
|
|
|
3781
3858
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WAL,
|
|
3782
3859
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.NAVX
|
|
3783
3860
|
],
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
|
|
3787
|
-
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC
|
|
3788
|
-
// spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.SODA, // NOTE: not in solver wiki
|
|
3789
|
-
],
|
|
3861
|
+
// Injective is currently staging-only — see stagingSwapSupportedTokens
|
|
3862
|
+
[ChainKeys.INJECTIVE_MAINNET]: [],
|
|
3790
3863
|
[ChainKeys.NEAR_MAINNET]: [
|
|
3791
3864
|
spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.NEAR,
|
|
3792
3865
|
spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.bnUSD,
|
|
@@ -3853,12 +3926,53 @@ var swapSupportedTokens = {
|
|
|
3853
3926
|
spokeChainConfig[ChainKeys.STACKS_MAINNET].supportedTokens.USDC
|
|
3854
3927
|
]
|
|
3855
3928
|
};
|
|
3929
|
+
var stagingSwapSupportedTokens = {
|
|
3930
|
+
[ChainKeys.SONIC_MAINNET]: [SodaTokens.sodaUSDS],
|
|
3931
|
+
[ChainKeys.AVALANCHE_MAINNET]: [],
|
|
3932
|
+
[ChainKeys.ARBITRUM_MAINNET]: [],
|
|
3933
|
+
[ChainKeys.BASE_MAINNET]: [
|
|
3934
|
+
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.bnUSD,
|
|
3935
|
+
spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.AERO
|
|
3936
|
+
],
|
|
3937
|
+
[ChainKeys.OPTIMISM_MAINNET]: [],
|
|
3938
|
+
[ChainKeys.POLYGON_MAINNET]: [
|
|
3939
|
+
spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.USDT,
|
|
3940
|
+
spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.wstETH
|
|
3941
|
+
],
|
|
3942
|
+
[ChainKeys.BSC_MAINNET]: [],
|
|
3943
|
+
[ChainKeys.HYPEREVM_MAINNET]: [],
|
|
3944
|
+
[ChainKeys.LIGHTLINK_MAINNET]: [
|
|
3945
|
+
spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["HYPE.LL"]
|
|
3946
|
+
],
|
|
3947
|
+
[ChainKeys.SOLANA_MAINNET]: [],
|
|
3948
|
+
[ChainKeys.ICON_MAINNET]: [],
|
|
3949
|
+
[ChainKeys.STELLAR_MAINNET]: [],
|
|
3950
|
+
[ChainKeys.SUI_MAINNET]: [spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDT],
|
|
3951
|
+
[ChainKeys.INJECTIVE_MAINNET]: [
|
|
3952
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
|
|
3953
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
|
|
3954
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC
|
|
3955
|
+
// spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.SODA, // NOTE: not in solver wiki
|
|
3956
|
+
],
|
|
3957
|
+
[ChainKeys.NEAR_MAINNET]: [],
|
|
3958
|
+
[ChainKeys.BITCOIN_MAINNET]: [],
|
|
3959
|
+
[ChainKeys.ETHEREUM_MAINNET]: [
|
|
3960
|
+
spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wstETH,
|
|
3961
|
+
spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.weETH
|
|
3962
|
+
],
|
|
3963
|
+
[ChainKeys.REDBELLY_MAINNET]: [],
|
|
3964
|
+
[ChainKeys.KAIA_MAINNET]: [],
|
|
3965
|
+
[ChainKeys.STACKS_MAINNET]: []
|
|
3966
|
+
};
|
|
3856
3967
|
var swapsConfig = {
|
|
3857
|
-
partnerFee: void 0,
|
|
3858
3968
|
supportedTokens: swapSupportedTokens
|
|
3859
3969
|
};
|
|
3860
3970
|
var getSupportedSolverTokens = (chainId) => swapSupportedTokens[chainId];
|
|
3861
|
-
var
|
|
3971
|
+
var getStagingSolverTokens = (chainId) => [
|
|
3972
|
+
...swapSupportedTokens[chainId],
|
|
3973
|
+
...stagingSwapSupportedTokens[chainId]
|
|
3974
|
+
];
|
|
3975
|
+
var isSwapSupportedToken = (chainId, token) => [...swapSupportedTokens[chainId], ...stagingSwapSupportedTokens[chainId]].some((t) => t.address.toLowerCase() === token.toLowerCase());
|
|
3862
3976
|
|
|
3863
3977
|
// ../types/dist/leverageYield/leverageYield.js
|
|
3864
3978
|
var leverageYieldVaults = [
|
|
@@ -3889,6 +4003,20 @@ var leverageYieldVaults = [
|
|
|
3889
4003
|
fallbackAprPct: 2.4,
|
|
3890
4004
|
label: "Lido (stETH)"
|
|
3891
4005
|
}
|
|
4006
|
+
},
|
|
4007
|
+
{
|
|
4008
|
+
name: LsodaTokens.lsodaJITOSOL.symbol,
|
|
4009
|
+
vault: LsodaTokens.lsodaJITOSOL.vault,
|
|
4010
|
+
asset: SodaTokens.sodaJITOSOL.address,
|
|
4011
|
+
// sodaJITOSOL on Sonic
|
|
4012
|
+
borrowToken: SodaTokens.sodaSOL.address,
|
|
4013
|
+
// sodaSOL on Sonic
|
|
4014
|
+
lsdSource: {
|
|
4015
|
+
// DefiLlama pool for Jito's JitoSOL native staking on Solana (project: 'jito-liquid-staking').
|
|
4016
|
+
poolId: "0e7d0722-9054-4907-8593-567b353c0900",
|
|
4017
|
+
fallbackAprPct: 5.5,
|
|
4018
|
+
label: "Jito (JitoSOL)"
|
|
4019
|
+
}
|
|
3892
4020
|
}
|
|
3893
4021
|
];
|
|
3894
4022
|
var leverageYieldConfig = {
|
|
@@ -3896,11 +4024,8 @@ var leverageYieldConfig = {
|
|
|
3896
4024
|
};
|
|
3897
4025
|
|
|
3898
4026
|
// ../types/dist/sodax-config/sodax-config.js
|
|
3899
|
-
var bridgeConfig = {
|
|
3900
|
-
partnerFee: void 0
|
|
3901
|
-
};
|
|
4027
|
+
var bridgeConfig = {};
|
|
3902
4028
|
var sodaxConfig = {
|
|
3903
|
-
fee: void 0,
|
|
3904
4029
|
chains: spokeChainConfig,
|
|
3905
4030
|
swaps: swapsConfig,
|
|
3906
4031
|
moneyMarket: moneyMarketConfig,
|
|
@@ -4048,7 +4173,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
|
|
|
4048
4173
|
}
|
|
4049
4174
|
|
|
4050
4175
|
// ../types/dist/index.js
|
|
4051
|
-
var CONFIG_VERSION =
|
|
4176
|
+
var CONFIG_VERSION = 212;
|
|
4052
4177
|
function isEvmSpokeChainConfig(value) {
|
|
4053
4178
|
return typeof value === "object" && value !== null && value.chain.type === "EVM" && value.chain.key !== HUB_CHAIN_KEY;
|
|
4054
4179
|
}
|
|
@@ -4435,7 +4560,10 @@ async function pollForExecutedPacket(payload) {
|
|
|
4435
4560
|
}
|
|
4436
4561
|
const txPackets = txPacketsResult.value;
|
|
4437
4562
|
if (txPackets.success && txPackets.data.length > 0) {
|
|
4438
|
-
const
|
|
4563
|
+
const candidates = txPackets.data.filter(
|
|
4564
|
+
(packet2) => packet2.src_tx_hash.toLowerCase() === payload.srcTxHash.toLowerCase()
|
|
4565
|
+
);
|
|
4566
|
+
const packet = payload.selectPacket ? payload.selectPacket(candidates) : candidates[0];
|
|
4439
4567
|
if (packet?.status === "executed") {
|
|
4440
4568
|
return { kind: "found", packet };
|
|
4441
4569
|
}
|
|
@@ -13325,14 +13453,7 @@ function deepMerge(target, source) {
|
|
|
13325
13453
|
|
|
13326
13454
|
// src/shared/config/mergeSodaxConfig.ts
|
|
13327
13455
|
function mergeSodaxConfig(base2, override) {
|
|
13328
|
-
|
|
13329
|
-
if (override.fee !== void 0) {
|
|
13330
|
-
merged.fee = override.fee;
|
|
13331
|
-
}
|
|
13332
|
-
if (override.bridge?.partnerFee !== void 0) {
|
|
13333
|
-
merged.bridge.partnerFee = override.bridge.partnerFee;
|
|
13334
|
-
}
|
|
13335
|
-
return merged;
|
|
13456
|
+
return deepMerge(base2, override);
|
|
13336
13457
|
}
|
|
13337
13458
|
|
|
13338
13459
|
// src/shared/logger.ts
|
|
@@ -13372,6 +13493,12 @@ var ConfigService = class {
|
|
|
13372
13493
|
* {@link initialize}'s dynamic-config swap never clobbers it. Read by services via `config.logger`.
|
|
13373
13494
|
*/
|
|
13374
13495
|
logger;
|
|
13496
|
+
/**
|
|
13497
|
+
* Global partner fee. Resolved once at construction and kept independent of {@link sodax} so that
|
|
13498
|
+
* {@link initialize}'s dynamic-config swap never clobbers it. The backend never supplies it — it is
|
|
13499
|
+
* a client-side option set via `new Sodax({ fee })`. Per-feature overrides live on the feature config.
|
|
13500
|
+
*/
|
|
13501
|
+
fee;
|
|
13375
13502
|
initialized = false;
|
|
13376
13503
|
// data structures for quick lookup
|
|
13377
13504
|
supportedHubAssetsSet;
|
|
@@ -13383,11 +13510,12 @@ var ConfigService = class {
|
|
|
13383
13510
|
stakedATokenAddressesSet;
|
|
13384
13511
|
chainToSupportedTokenAddressMap;
|
|
13385
13512
|
hubAssetToXTokenMap;
|
|
13386
|
-
constructor({ api, config, userConfig, logger }) {
|
|
13513
|
+
constructor({ api, config, userConfig, logger, fee }) {
|
|
13387
13514
|
this.api = api;
|
|
13388
13515
|
this.sodax = config;
|
|
13389
13516
|
this.userConfig = userConfig;
|
|
13390
13517
|
this.logger = logger ?? resolveLogger(void 0);
|
|
13518
|
+
this.fee = fee;
|
|
13391
13519
|
this.loadSodaxConfigDataStructures(config);
|
|
13392
13520
|
}
|
|
13393
13521
|
async initialize() {
|
|
@@ -13620,6 +13748,24 @@ var ConfigService = class {
|
|
|
13620
13748
|
get moneyMarket() {
|
|
13621
13749
|
return this.sodax.moneyMarket;
|
|
13622
13750
|
}
|
|
13751
|
+
get leverageYield() {
|
|
13752
|
+
return this.sodax.leverageYield;
|
|
13753
|
+
}
|
|
13754
|
+
// Effective partner fee per feature: the feature-specific override if set, otherwise the global
|
|
13755
|
+
// `fee` client option ({@link fee}). The global fee is the default, overridable per-feature. `??`
|
|
13756
|
+
// (never a merge) keeps the chosen PartnerFee variant intact — no discriminated-union hybrid.
|
|
13757
|
+
get swapPartnerFee() {
|
|
13758
|
+
return this.swaps.partnerFee ?? this.fee;
|
|
13759
|
+
}
|
|
13760
|
+
get moneyMarketPartnerFee() {
|
|
13761
|
+
return this.moneyMarket.partnerFee ?? this.fee;
|
|
13762
|
+
}
|
|
13763
|
+
get bridgePartnerFee() {
|
|
13764
|
+
return this.bridge.partnerFee ?? this.fee;
|
|
13765
|
+
}
|
|
13766
|
+
get leverageYieldPartnerFee() {
|
|
13767
|
+
return this.leverageYield.partnerFee ?? this.fee;
|
|
13768
|
+
}
|
|
13623
13769
|
get dex() {
|
|
13624
13770
|
return this.sodax.dex;
|
|
13625
13771
|
}
|
|
@@ -14431,12 +14577,23 @@ var StacksSpokeService = class {
|
|
|
14431
14577
|
postConditionMode: PostConditionMode.Allow
|
|
14432
14578
|
};
|
|
14433
14579
|
if (params.raw === true) {
|
|
14434
|
-
if (
|
|
14435
|
-
throw new Error(
|
|
14580
|
+
if (!params.srcPublicKey) {
|
|
14581
|
+
throw new Error("Stacks raw transactions require srcPublicKey (the signer public key for srcAddress).");
|
|
14582
|
+
}
|
|
14583
|
+
let derivedAddress;
|
|
14584
|
+
try {
|
|
14585
|
+
derivedAddress = getAddressFromPublicKey(params.srcPublicKey, this.network);
|
|
14586
|
+
} catch (error) {
|
|
14587
|
+
throw new Error(`srcPublicKey is not a valid Stacks public key: ${error.message}`);
|
|
14588
|
+
}
|
|
14589
|
+
if (derivedAddress !== params.srcAddress) {
|
|
14590
|
+
throw new Error(
|
|
14591
|
+
`srcPublicKey does not match srcAddress: it derives ${derivedAddress}, but srcAddress is ${params.srcAddress}.`
|
|
14592
|
+
);
|
|
14436
14593
|
}
|
|
14437
14594
|
const tx = await makeUnsignedContractCall({
|
|
14438
14595
|
...reqData,
|
|
14439
|
-
publicKey: params.
|
|
14596
|
+
publicKey: params.srcPublicKey,
|
|
14440
14597
|
network: this.network,
|
|
14441
14598
|
fee: 0,
|
|
14442
14599
|
// placeholder — we'll estimate
|
|
@@ -17392,8 +17549,8 @@ function chain(...args) {
|
|
|
17392
17549
|
const id = (a) => a;
|
|
17393
17550
|
const wrap = (a, b) => (c) => a(b(c));
|
|
17394
17551
|
const encode3 = args.map((x) => x.encode).reduceRight(wrap, id);
|
|
17395
|
-
const
|
|
17396
|
-
return { encode: encode3, decode };
|
|
17552
|
+
const decode2 = args.map((x) => x.decode).reduce(wrap, id);
|
|
17553
|
+
return { encode: encode3, decode: decode2 };
|
|
17397
17554
|
}
|
|
17398
17555
|
// @__NO_SIDE_EFFECTS__
|
|
17399
17556
|
function alphabet(letters) {
|
|
@@ -23494,6 +23651,8 @@ var IconSpokeService = class {
|
|
|
23494
23651
|
};
|
|
23495
23652
|
}
|
|
23496
23653
|
};
|
|
23654
|
+
var GAS_BUFFER_MULTIPLIER = 1.2;
|
|
23655
|
+
var GAS_PRICE_REGEX = /^(\d+)(.*)$/;
|
|
23497
23656
|
var InjectiveSpokeService = class {
|
|
23498
23657
|
config;
|
|
23499
23658
|
chainGrpcWasmApi;
|
|
@@ -23501,6 +23660,7 @@ var InjectiveSpokeService = class {
|
|
|
23501
23660
|
endpoints;
|
|
23502
23661
|
pollingIntervalMs;
|
|
23503
23662
|
maxTimeoutMs;
|
|
23663
|
+
gasPrice;
|
|
23504
23664
|
constructor(config) {
|
|
23505
23665
|
this.config = config;
|
|
23506
23666
|
this.endpoints = getNetworkEndpoints(Network.Mainnet);
|
|
@@ -23508,6 +23668,16 @@ var InjectiveSpokeService = class {
|
|
|
23508
23668
|
this.txClient = new TxGrpcApi(this.endpoints.grpc);
|
|
23509
23669
|
this.pollingIntervalMs = this.config.sodaxConfig.chains[ChainKeys.INJECTIVE_MAINNET].pollingConfig.pollingIntervalMs;
|
|
23510
23670
|
this.maxTimeoutMs = this.config.sodaxConfig.chains[ChainKeys.INJECTIVE_MAINNET].pollingConfig.maxTimeoutMs;
|
|
23671
|
+
this.gasPrice = this.config.getChainConfig(ChainKeys.INJECTIVE_MAINNET).gasPrice;
|
|
23672
|
+
}
|
|
23673
|
+
/** Parse a chain-config gas price like `"500000000inj"` into its numeric price and denom. */
|
|
23674
|
+
parseGasPrice(gasPrice) {
|
|
23675
|
+
const match = GAS_PRICE_REGEX.exec(gasPrice);
|
|
23676
|
+
const price = match?.[1];
|
|
23677
|
+
if (price === void 0) {
|
|
23678
|
+
throw new Error(`Invalid Injective gasPrice config: ${gasPrice}`);
|
|
23679
|
+
}
|
|
23680
|
+
return { price: BigInt(price), denom: match?.[2] || "inj" };
|
|
23511
23681
|
}
|
|
23512
23682
|
/**
|
|
23513
23683
|
* Estimate the gas for a transaction.
|
|
@@ -23516,7 +23686,7 @@ var InjectiveSpokeService = class {
|
|
|
23516
23686
|
* @returns {Promise<InjectiveGasEstimate>} The estimated gas for the transaction.
|
|
23517
23687
|
*/
|
|
23518
23688
|
async estimateGas({ tx }) {
|
|
23519
|
-
const txRaw =
|
|
23689
|
+
const txRaw = TxRaw.fromPartial({
|
|
23520
23690
|
bodyBytes: tx.signedDoc.bodyBytes,
|
|
23521
23691
|
authInfoBytes: tx.signedDoc.authInfoBytes,
|
|
23522
23692
|
signatures: []
|
|
@@ -23555,7 +23725,9 @@ var InjectiveSpokeService = class {
|
|
|
23555
23725
|
chainConfig.networkId,
|
|
23556
23726
|
from,
|
|
23557
23727
|
chainConfig.addresses.assetManager,
|
|
23558
|
-
msg
|
|
23728
|
+
msg,
|
|
23729
|
+
void 0,
|
|
23730
|
+
funds
|
|
23559
23731
|
);
|
|
23560
23732
|
}
|
|
23561
23733
|
const res = await params.walletProvider.execute(from, chainConfig.addresses.assetManager, msg, funds);
|
|
@@ -23576,27 +23748,50 @@ var InjectiveSpokeService = class {
|
|
|
23576
23748
|
);
|
|
23577
23749
|
return BigInt(fromBase64(response.data));
|
|
23578
23750
|
}
|
|
23579
|
-
async getRawTransaction(chainId, senderAddress, contractAddress, msg, memo) {
|
|
23751
|
+
async getRawTransaction(chainId, senderAddress, contractAddress, msg, memo, funds = []) {
|
|
23580
23752
|
const msgExec = MsgExecuteContract.fromJSON({
|
|
23581
23753
|
contractAddress,
|
|
23582
23754
|
sender: senderAddress,
|
|
23583
23755
|
msg,
|
|
23584
|
-
funds
|
|
23756
|
+
funds
|
|
23585
23757
|
});
|
|
23586
|
-
const
|
|
23758
|
+
const accountResponse = await new ChainRestAuthApi(this.endpoints.rest).fetchCosmosAccount(senderAddress);
|
|
23759
|
+
const baseAccount = BaseAccount.fromRestCosmosApi(accountResponse);
|
|
23760
|
+
const pubKey = baseAccount.pubKey.key;
|
|
23761
|
+
if (!pubKey) {
|
|
23762
|
+
throw new Error(`The pubKey for ${senderAddress} is missing \u2014 the account has not signed a transaction yet.`);
|
|
23763
|
+
}
|
|
23764
|
+
const txArgs = {
|
|
23587
23765
|
message: msgExec,
|
|
23588
23766
|
memo: memo || "",
|
|
23589
|
-
|
|
23590
|
-
|
|
23767
|
+
pubKey,
|
|
23768
|
+
sequence: baseAccount.sequence,
|
|
23769
|
+
accountNumber: baseAccount.accountNumber,
|
|
23591
23770
|
chainId
|
|
23592
|
-
}
|
|
23771
|
+
};
|
|
23772
|
+
const draft = createTransaction(txArgs);
|
|
23773
|
+
const { gasInfo } = await this.txClient.simulate(
|
|
23774
|
+
TxRaw.fromPartial({
|
|
23775
|
+
bodyBytes: draft.txRaw.bodyBytes,
|
|
23776
|
+
authInfoBytes: draft.txRaw.authInfoBytes,
|
|
23777
|
+
signatures: []
|
|
23778
|
+
// not required for simulation
|
|
23779
|
+
})
|
|
23780
|
+
);
|
|
23781
|
+
const gas = Math.ceil(gasInfo.gasUsed * GAS_BUFFER_MULTIPLIER);
|
|
23782
|
+
const { price, denom } = this.parseGasPrice(this.gasPrice);
|
|
23783
|
+
const fee = {
|
|
23784
|
+
amount: [{ denom, amount: (BigInt(gas) * price).toString() }],
|
|
23785
|
+
gas: gas.toString()
|
|
23786
|
+
};
|
|
23787
|
+
const { txRaw, signDoc } = createTransaction({ ...txArgs, fee });
|
|
23593
23788
|
const rawTx = {
|
|
23594
23789
|
from: senderAddress,
|
|
23595
23790
|
to: contractAddress,
|
|
23596
23791
|
signedDoc: {
|
|
23597
23792
|
bodyBytes: txRaw.bodyBytes,
|
|
23598
23793
|
chainId,
|
|
23599
|
-
accountNumber: BigInt(
|
|
23794
|
+
accountNumber: BigInt(signDoc.accountNumber),
|
|
23600
23795
|
authInfoBytes: txRaw.authInfoBytes
|
|
23601
23796
|
}
|
|
23602
23797
|
};
|
|
@@ -25735,6 +25930,24 @@ var SolverApiService = class {
|
|
|
25735
25930
|
}
|
|
25736
25931
|
}
|
|
25737
25932
|
};
|
|
25933
|
+
function decodePacketIntentTarget(payload) {
|
|
25934
|
+
try {
|
|
25935
|
+
const hex = payload.startsWith("0x") ? payload.slice(2) : payload;
|
|
25936
|
+
const decoded = rlp.decode(Buffer.from(hex, "hex"));
|
|
25937
|
+
const field1 = decoded?.[1];
|
|
25938
|
+
if (!field1 || field1.length === 0) return void 0;
|
|
25939
|
+
return `0x${Buffer.from(field1).toString("hex")}`.toLowerCase();
|
|
25940
|
+
} catch {
|
|
25941
|
+
return void 0;
|
|
25942
|
+
}
|
|
25943
|
+
}
|
|
25944
|
+
function selectSolvedIntentPacket(packets, intentsContract) {
|
|
25945
|
+
if (packets.length <= 1) return packets[0];
|
|
25946
|
+
const target = intentsContract.toLowerCase();
|
|
25947
|
+
const matched = packets.find((packet) => decodePacketIntentTarget(packet.payload) === target);
|
|
25948
|
+
if (matched) return matched;
|
|
25949
|
+
return packets.reduce((highest, packet) => packet.conn_sn > highest.conn_sn ? packet : highest);
|
|
25950
|
+
}
|
|
25738
25951
|
|
|
25739
25952
|
// src/swap/errors.ts
|
|
25740
25953
|
var swapInvariant = createInvariant("swap");
|
|
@@ -25770,7 +25983,7 @@ var SwapService = class {
|
|
|
25770
25983
|
relayerApiEndpoint;
|
|
25771
25984
|
constructor({ config, hubProvider, spoke }) {
|
|
25772
25985
|
this.solver = config.solver;
|
|
25773
|
-
this.partnerFee = config.
|
|
25986
|
+
this.partnerFee = config.swapPartnerFee;
|
|
25774
25987
|
this.relayerApiEndpoint = config.relay.relayerApiEndpoint;
|
|
25775
25988
|
this.config = config;
|
|
25776
25989
|
this.hubProvider = hubProvider;
|
|
@@ -25788,10 +26001,13 @@ var SwapService = class {
|
|
|
25788
26001
|
/**
|
|
25789
26002
|
* Requests a price quote from the solver API for a given token pair and amount.
|
|
25790
26003
|
*
|
|
25791
|
-
* Adjusts `payload.amount` by the
|
|
25792
|
-
*
|
|
26004
|
+
* Adjusts `payload.amount` by the partner fee before forwarding to the solver, so the returned
|
|
26005
|
+
* `quoted_amount` reflects the net output the user actually receives. Pass `partnerFee` to match
|
|
26006
|
+
* a per-action override supplied to `createIntent` (`extras.partnerFee`); omit it to use the
|
|
26007
|
+
* configured swap fee.
|
|
25793
26008
|
*
|
|
25794
|
-
* @param payload -
|
|
26009
|
+
* @param payload - The solver quote request, optionally carrying a per-call `partnerFee` override
|
|
26010
|
+
* (defaults to the configured swap partner fee). `partnerFee` is stripped before forwarding.
|
|
25795
26011
|
* @returns A `Result` containing `{ quoted_amount: bigint }` on success, or a
|
|
25796
26012
|
* `SolverErrorResponse` (with a `SolverIntentErrorCode`) on failure.
|
|
25797
26013
|
*
|
|
@@ -25807,11 +26023,12 @@ var SwapService = class {
|
|
|
25807
26023
|
* if (response.ok) console.log('Quoted amount:', response.value.quoted_amount);
|
|
25808
26024
|
*/
|
|
25809
26025
|
async getQuote(payload) {
|
|
25810
|
-
|
|
25811
|
-
|
|
25812
|
-
|
|
26026
|
+
const { partnerFee = this.partnerFee, ...request } = payload;
|
|
26027
|
+
const adjustedPayload = {
|
|
26028
|
+
...request,
|
|
26029
|
+
amount: adjustAmountByFee(request.amount, partnerFee, request.quote_type)
|
|
25813
26030
|
};
|
|
25814
|
-
return SolverApiService.getQuote(
|
|
26031
|
+
return SolverApiService.getQuote(adjustedPayload, this.solver, this.config);
|
|
25815
26032
|
}
|
|
25816
26033
|
/**
|
|
25817
26034
|
* Calculates the partner fee that will be deducted from the given input amount.
|
|
@@ -26161,7 +26378,8 @@ var SwapService = class {
|
|
|
26161
26378
|
* - `UNKNOWN` — defensive fallback.
|
|
26162
26379
|
*/
|
|
26163
26380
|
async createIntent(_params) {
|
|
26164
|
-
const { params, skipSimulation } = _params;
|
|
26381
|
+
const { params, skipSimulation, extras } = _params;
|
|
26382
|
+
const partnerFee = extras?.partnerFee ?? this.partnerFee;
|
|
26165
26383
|
const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
|
|
26166
26384
|
try {
|
|
26167
26385
|
swapInvariant(
|
|
@@ -26196,6 +26414,13 @@ var SwapService = class {
|
|
|
26196
26414
|
{ ...baseCtx, field: "minOutputAmount" }
|
|
26197
26415
|
);
|
|
26198
26416
|
}
|
|
26417
|
+
if (isStacksChainKeyType(params.srcChainKey) && _params.raw === true) {
|
|
26418
|
+
swapInvariant(
|
|
26419
|
+
extras?.srcPublicKey !== void 0,
|
|
26420
|
+
"srcPublicKey is required for Stacks createIntent (raw) \u2014 the source tx is built unsigned and needs the signer public key",
|
|
26421
|
+
{ ...baseCtx, field: "srcPublicKey" }
|
|
26422
|
+
);
|
|
26423
|
+
}
|
|
26199
26424
|
const personalAddress = params.srcAddress;
|
|
26200
26425
|
let walletAddress = personalAddress;
|
|
26201
26426
|
if (isBitcoinChainKeyType(params.srcChainKey) && _params.raw === false) {
|
|
@@ -26213,7 +26438,7 @@ var SwapService = class {
|
|
|
26213
26438
|
createIntentParams: params,
|
|
26214
26439
|
creatorHubWalletAddress,
|
|
26215
26440
|
solverConfig: this.solver,
|
|
26216
|
-
fee:
|
|
26441
|
+
fee: partnerFee,
|
|
26217
26442
|
hubProvider: this.hubProvider
|
|
26218
26443
|
};
|
|
26219
26444
|
const [txResult2, intent2, feeAmount2, data2] = await SonicSpokeService.createSwapIntent(
|
|
@@ -26239,11 +26464,12 @@ var SwapService = class {
|
|
|
26239
26464
|
},
|
|
26240
26465
|
creatorHubWalletAddress,
|
|
26241
26466
|
this.config,
|
|
26242
|
-
|
|
26467
|
+
partnerFee
|
|
26243
26468
|
);
|
|
26244
26469
|
const coreDepositParams = {
|
|
26245
26470
|
srcChainKey: params.srcChainKey,
|
|
26246
26471
|
srcAddress: walletAddress,
|
|
26472
|
+
srcPublicKey: extras?.srcPublicKey,
|
|
26247
26473
|
to: creatorHubWalletAddress,
|
|
26248
26474
|
token: params.inputToken,
|
|
26249
26475
|
amount: params.inputAmount,
|
|
@@ -26562,6 +26788,11 @@ var SwapService = class {
|
|
|
26562
26788
|
* Use this after `getStatus` returns `SolverIntentStatusCode.SOLVED (3)` to obtain the
|
|
26563
26789
|
* destination-chain transaction hash from `packet.dst_tx_hash`.
|
|
26564
26790
|
*
|
|
26791
|
+
* A single solver fill tx emits multiple relay packets sharing the same `src_tx_hash`. The
|
|
26792
|
+
* user-facing `IntentFilled` delivery is the packet whose payload targets the hub intents
|
|
26793
|
+
* contract; `selectSolvedIntentPacket` disambiguates so the returned `dst_tx_hash` is the
|
|
26794
|
+
* destination delivery tx rather than an internal hop.
|
|
26795
|
+
*
|
|
26565
26796
|
* @param chainId - The destination spoke chain key (where output tokens are delivered).
|
|
26566
26797
|
* @param fillTxHash - The solver's fill transaction hash, obtained from `getStatus.fill_tx_hash`.
|
|
26567
26798
|
* @param timeout - Poll timeout in milliseconds. Defaults to `DEFAULT_RELAY_TX_TIMEOUT` (120 s).
|
|
@@ -26577,7 +26808,8 @@ var SwapService = class {
|
|
|
26577
26808
|
intentRelayChainId: getIntentRelayChainId(chainId).toString(),
|
|
26578
26809
|
srcTxHash: fillTxHash,
|
|
26579
26810
|
timeout,
|
|
26580
|
-
apiUrl: this.relayerApiEndpoint
|
|
26811
|
+
apiUrl: this.relayerApiEndpoint,
|
|
26812
|
+
selectPacket: (packets) => selectSolvedIntentPacket(packets, this.solver.intentsContract)
|
|
26581
26813
|
});
|
|
26582
26814
|
}
|
|
26583
26815
|
/**
|
|
@@ -29102,10 +29334,10 @@ var BridgeService = class {
|
|
|
29102
29334
|
* @returns Fee amount to be deducted, in the same units as `inputAmount`.
|
|
29103
29335
|
*/
|
|
29104
29336
|
getFee(inputAmount) {
|
|
29105
|
-
if (!this.config.
|
|
29337
|
+
if (!this.config.bridgePartnerFee) {
|
|
29106
29338
|
return 0n;
|
|
29107
29339
|
}
|
|
29108
|
-
return calculateFeeAmount(inputAmount, this.config.
|
|
29340
|
+
return calculateFeeAmount(inputAmount, this.config.bridgePartnerFee);
|
|
29109
29341
|
}
|
|
29110
29342
|
/**
|
|
29111
29343
|
* Checks whether the caller has sufficient token allowance to execute the bridge.
|
|
@@ -29382,7 +29614,7 @@ var BridgeService = class {
|
|
|
29382
29614
|
}
|
|
29383
29615
|
const hubWallet = await this.hubProvider.getUserHubWalletAddress(walletAddress, params.srcChainKey);
|
|
29384
29616
|
const effectiveSkipSimulation = skipSimulation || isBitcoinChainKeyType(params.srcChainKey) && this.spoke.bitcoin.walletMode === "USER";
|
|
29385
|
-
const data = this.buildBridgeData(params, srcToken, dstToken, this.config.
|
|
29617
|
+
const data = this.buildBridgeData(params, srcToken, dstToken, this.config.bridgePartnerFee);
|
|
29386
29618
|
const coreParams = {
|
|
29387
29619
|
srcChainKey: params.srcChainKey,
|
|
29388
29620
|
srcAddress: walletAddress,
|
|
@@ -35261,7 +35493,7 @@ var MoneyMarketService = class _MoneyMarketService {
|
|
|
35261
35493
|
this.config = config;
|
|
35262
35494
|
this.hubProvider = hubProvider;
|
|
35263
35495
|
this.spoke = spoke;
|
|
35264
|
-
this.partnerFee = config.
|
|
35496
|
+
this.partnerFee = config.moneyMarketPartnerFee;
|
|
35265
35497
|
this.relayerApiEndpoint = config.relay.relayerApiEndpoint;
|
|
35266
35498
|
this.data = new MoneyMarketDataService({ hubProvider, config });
|
|
35267
35499
|
}
|
|
@@ -37403,7 +37635,7 @@ var LeverageYieldService = class {
|
|
|
37403
37635
|
* `UNKNOWN` (defensive fallback).
|
|
37404
37636
|
*/
|
|
37405
37637
|
async createVaultIntent(_params) {
|
|
37406
|
-
const { params, skipSimulation, hubWalletSwap, partnerFee = this.config.
|
|
37638
|
+
const { params, skipSimulation, hubWalletSwap, partnerFee = this.config.swapPartnerFee } = _params;
|
|
37407
37639
|
const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
|
|
37408
37640
|
try {
|
|
37409
37641
|
leverageYieldInvariant(
|
|
@@ -38035,11 +38267,18 @@ var Sodax = class {
|
|
|
38035
38267
|
// hub provider for the hub chain (e.g. Sonic mainnet)
|
|
38036
38268
|
spoke;
|
|
38037
38269
|
// spoke service enabling spoke chain operations
|
|
38038
|
-
constructor(
|
|
38039
|
-
const logger = resolveLogger(
|
|
38040
|
-
|
|
38270
|
+
constructor(options) {
|
|
38271
|
+
const logger = resolveLogger(options?.logger);
|
|
38272
|
+
const fee = options?.fee;
|
|
38273
|
+
this.instanceConfig = options ? mergeSodaxConfig(sodaxConfig, options) : sodaxConfig;
|
|
38041
38274
|
this.backendApi = new BackendApiService(this.instanceConfig.api, logger);
|
|
38042
|
-
this.config = new ConfigService({
|
|
38275
|
+
this.config = new ConfigService({
|
|
38276
|
+
api: this.backendApi,
|
|
38277
|
+
config: this.instanceConfig,
|
|
38278
|
+
userConfig: options,
|
|
38279
|
+
logger,
|
|
38280
|
+
fee
|
|
38281
|
+
});
|
|
38043
38282
|
this.hubProvider = new EvmHubProvider({ config: this.config });
|
|
38044
38283
|
this.spoke = new SpokeService({ config: this.config, hubProvider: this.hubProvider });
|
|
38045
38284
|
this.swaps = new SwapService({
|
|
@@ -38119,4 +38358,4 @@ var isPartnerError = isCodeMember(PARTNER_CODES);
|
|
|
38119
38358
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
38120
38359
|
*/
|
|
38121
38360
|
|
|
38122
|
-
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, 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, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, stacksSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
38361
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, 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, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|