@sodax/sdk 0.0.1-rc.41 → 0.0.1-rc.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as viem from 'viem';
2
2
  import { Address, Hex, PublicClient, HttpTransport, Hash, GetLogsReturnType, TransactionReceipt, WalletClient, CustomTransport, Chain, Account as Account$1 } from 'viem';
3
- import { IInjectiveWalletProvider, InjectiveExecuteResponse, SpokeChainId, Hex as Hex$1, IEvmWalletProvider, Address as Address$1, HubAddress, EvmRawTransaction, IStellarWalletProvider, StellarRawTransaction, ISuiWalletProvider, Hash as Hash$1, IconEoaAddress, XToken, IIconWalletProvider, ISolanaWalletProvider, SolanaBase58PublicKey, ChainType, HubChainId, Token, InjectiveNetworkEnv, InjectiveRawTransaction, ICON_MAINNET_CHAIN_ID, EvmRawTransactionReceipt, ChainId, OriginalAssetAddress } from '@sodax/types';
3
+ import { IInjectiveWalletProvider, InjectiveExecuteResponse, SpokeChainId, Hex as Hex$1, IEvmWalletProvider, Address as Address$1, HubAddress, EvmRawTransaction, IStellarWalletProvider, HttpUrl, StellarRawTransaction, ISuiWalletProvider, Hash as Hash$1, IconEoaAddress, XToken, IIconWalletProvider, ISolanaWalletProvider, SolanaBase58PublicKey, ChainType, HubChainId, Token, BaseSpokeChainInfo, InjectiveNetworkEnv, InjectiveRawTransaction, ICON_MAINNET_CHAIN_ID, EvmChainId, EvmRawTransactionReceipt, ChainId, OriginalAssetAddress } from '@sodax/types';
4
4
  export * from '@sodax/types';
5
5
  import { TxGrpcApi } from '@injectivelabs/sdk-ts';
6
6
  import { SorobanRpc, rpc, Transaction, Memo, MemoType, Operation, FeeBumpTransaction, Horizon, Account, xdr } from '@stellar/stellar-sdk';
@@ -4885,6 +4885,484 @@ declare const variableDebtTokenAbi: readonly [{
4885
4885
  readonly stateMutability: "view";
4886
4886
  }];
4887
4887
 
4888
+ declare const stakedSodaAbi: readonly [{
4889
+ readonly inputs: readonly [{
4890
+ readonly internalType: "address";
4891
+ readonly name: "user";
4892
+ readonly type: "address";
4893
+ }];
4894
+ readonly name: "getUnstakeRequests";
4895
+ readonly outputs: readonly [{
4896
+ readonly components: readonly [{
4897
+ readonly internalType: "uint256";
4898
+ readonly name: "id";
4899
+ readonly type: "uint256";
4900
+ }, {
4901
+ readonly components: readonly [{
4902
+ readonly internalType: "uint256";
4903
+ readonly name: "amount";
4904
+ readonly type: "uint256";
4905
+ }, {
4906
+ readonly internalType: "uint256";
4907
+ readonly name: "startTime";
4908
+ readonly type: "uint256";
4909
+ }, {
4910
+ readonly internalType: "address";
4911
+ readonly name: "to";
4912
+ readonly type: "address";
4913
+ }];
4914
+ readonly internalType: "struct IStakedSoda.UnstakeRequest";
4915
+ readonly name: "request";
4916
+ readonly type: "tuple";
4917
+ }];
4918
+ readonly internalType: "struct IStakedSoda.UserUnstakeInfo[]";
4919
+ readonly name: "";
4920
+ readonly type: "tuple[]";
4921
+ }];
4922
+ readonly stateMutability: "view";
4923
+ readonly type: "function";
4924
+ }, {
4925
+ readonly inputs: readonly [{
4926
+ readonly internalType: "address";
4927
+ readonly name: "account";
4928
+ readonly type: "address";
4929
+ }, {
4930
+ readonly internalType: "uint256";
4931
+ readonly name: "amount";
4932
+ readonly type: "uint256";
4933
+ }];
4934
+ readonly name: "depositFor";
4935
+ readonly outputs: readonly [{
4936
+ readonly internalType: "uint256";
4937
+ readonly name: "";
4938
+ readonly type: "uint256";
4939
+ }];
4940
+ readonly stateMutability: "nonpayable";
4941
+ readonly type: "function";
4942
+ }, {
4943
+ readonly inputs: readonly [{
4944
+ readonly internalType: "address";
4945
+ readonly name: "account";
4946
+ readonly type: "address";
4947
+ }, {
4948
+ readonly internalType: "uint256";
4949
+ readonly name: "value";
4950
+ readonly type: "uint256";
4951
+ }];
4952
+ readonly name: "withdrawTo";
4953
+ readonly outputs: readonly [{
4954
+ readonly internalType: "bool";
4955
+ readonly name: "";
4956
+ readonly type: "bool";
4957
+ }];
4958
+ readonly stateMutability: "nonpayable";
4959
+ readonly type: "function";
4960
+ }, {
4961
+ readonly inputs: readonly [{
4962
+ readonly internalType: "address";
4963
+ readonly name: "account";
4964
+ readonly type: "address";
4965
+ }, {
4966
+ readonly internalType: "uint256";
4967
+ readonly name: "value";
4968
+ readonly type: "uint256";
4969
+ }];
4970
+ readonly name: "unstake";
4971
+ readonly outputs: readonly [{
4972
+ readonly internalType: "uint256";
4973
+ readonly name: "requestId";
4974
+ readonly type: "uint256";
4975
+ }];
4976
+ readonly stateMutability: "nonpayable";
4977
+ readonly type: "function";
4978
+ }, {
4979
+ readonly inputs: readonly [{
4980
+ readonly internalType: "uint256";
4981
+ readonly name: "requestId";
4982
+ readonly type: "uint256";
4983
+ }];
4984
+ readonly name: "cancelUnstakeRequest";
4985
+ readonly outputs: readonly [];
4986
+ readonly stateMutability: "nonpayable";
4987
+ readonly type: "function";
4988
+ }, {
4989
+ readonly inputs: readonly [{
4990
+ readonly internalType: "uint256";
4991
+ readonly name: "requestId";
4992
+ readonly type: "uint256";
4993
+ }];
4994
+ readonly name: "claim";
4995
+ readonly outputs: readonly [];
4996
+ readonly stateMutability: "nonpayable";
4997
+ readonly type: "function";
4998
+ }, {
4999
+ readonly inputs: readonly [];
5000
+ readonly name: "asset";
5001
+ readonly outputs: readonly [{
5002
+ readonly internalType: "address";
5003
+ readonly name: "";
5004
+ readonly type: "address";
5005
+ }];
5006
+ readonly stateMutability: "view";
5007
+ readonly type: "function";
5008
+ }, {
5009
+ readonly inputs: readonly [];
5010
+ readonly name: "totalAssets";
5011
+ readonly outputs: readonly [{
5012
+ readonly internalType: "uint256";
5013
+ readonly name: "";
5014
+ readonly type: "uint256";
5015
+ }];
5016
+ readonly stateMutability: "view";
5017
+ readonly type: "function";
5018
+ }, {
5019
+ readonly inputs: readonly [{
5020
+ readonly internalType: "uint256";
5021
+ readonly name: "assets";
5022
+ readonly type: "uint256";
5023
+ }];
5024
+ readonly name: "convertToShares";
5025
+ readonly outputs: readonly [{
5026
+ readonly internalType: "uint256";
5027
+ readonly name: "";
5028
+ readonly type: "uint256";
5029
+ }];
5030
+ readonly stateMutability: "view";
5031
+ readonly type: "function";
5032
+ }, {
5033
+ readonly inputs: readonly [{
5034
+ readonly internalType: "uint256";
5035
+ readonly name: "shares";
5036
+ readonly type: "uint256";
5037
+ }];
5038
+ readonly name: "convertToAssets";
5039
+ readonly outputs: readonly [{
5040
+ readonly internalType: "uint256";
5041
+ readonly name: "";
5042
+ readonly type: "uint256";
5043
+ }];
5044
+ readonly stateMutability: "view";
5045
+ readonly type: "function";
5046
+ }, {
5047
+ readonly inputs: readonly [{
5048
+ readonly internalType: "address";
5049
+ readonly name: "receiver";
5050
+ readonly type: "address";
5051
+ }];
5052
+ readonly name: "maxDeposit";
5053
+ readonly outputs: readonly [{
5054
+ readonly internalType: "uint256";
5055
+ readonly name: "";
5056
+ readonly type: "uint256";
5057
+ }];
5058
+ readonly stateMutability: "view";
5059
+ readonly type: "function";
5060
+ }, {
5061
+ readonly inputs: readonly [{
5062
+ readonly internalType: "uint256";
5063
+ readonly name: "assets";
5064
+ readonly type: "uint256";
5065
+ }];
5066
+ readonly name: "previewDeposit";
5067
+ readonly outputs: readonly [{
5068
+ readonly internalType: "uint256";
5069
+ readonly name: "";
5070
+ readonly type: "uint256";
5071
+ }];
5072
+ readonly stateMutability: "view";
5073
+ readonly type: "function";
5074
+ }, {
5075
+ readonly inputs: readonly [{
5076
+ readonly internalType: "uint256";
5077
+ readonly name: "assets";
5078
+ readonly type: "uint256";
5079
+ }, {
5080
+ readonly internalType: "address";
5081
+ readonly name: "receiver";
5082
+ readonly type: "address";
5083
+ }];
5084
+ readonly name: "deposit";
5085
+ readonly outputs: readonly [{
5086
+ readonly internalType: "uint256";
5087
+ readonly name: "";
5088
+ readonly type: "uint256";
5089
+ }];
5090
+ readonly stateMutability: "nonpayable";
5091
+ readonly type: "function";
5092
+ }, {
5093
+ readonly inputs: readonly [{
5094
+ readonly internalType: "address";
5095
+ readonly name: "receiver";
5096
+ readonly type: "address";
5097
+ }];
5098
+ readonly name: "maxMint";
5099
+ readonly outputs: readonly [{
5100
+ readonly internalType: "uint256";
5101
+ readonly name: "";
5102
+ readonly type: "uint256";
5103
+ }];
5104
+ readonly stateMutability: "view";
5105
+ readonly type: "function";
5106
+ }, {
5107
+ readonly inputs: readonly [{
5108
+ readonly internalType: "uint256";
5109
+ readonly name: "shares";
5110
+ readonly type: "uint256";
5111
+ }];
5112
+ readonly name: "previewMint";
5113
+ readonly outputs: readonly [{
5114
+ readonly internalType: "uint256";
5115
+ readonly name: "";
5116
+ readonly type: "uint256";
5117
+ }];
5118
+ readonly stateMutability: "view";
5119
+ readonly type: "function";
5120
+ }, {
5121
+ readonly inputs: readonly [{
5122
+ readonly internalType: "uint256";
5123
+ readonly name: "shares";
5124
+ readonly type: "uint256";
5125
+ }, {
5126
+ readonly internalType: "address";
5127
+ readonly name: "receiver";
5128
+ readonly type: "address";
5129
+ }];
5130
+ readonly name: "mint";
5131
+ readonly outputs: readonly [{
5132
+ readonly internalType: "uint256";
5133
+ readonly name: "";
5134
+ readonly type: "uint256";
5135
+ }];
5136
+ readonly stateMutability: "nonpayable";
5137
+ readonly type: "function";
5138
+ }, {
5139
+ readonly inputs: readonly [{
5140
+ readonly internalType: "address";
5141
+ readonly name: "owner";
5142
+ readonly type: "address";
5143
+ }];
5144
+ readonly name: "maxWithdraw";
5145
+ readonly outputs: readonly [{
5146
+ readonly internalType: "uint256";
5147
+ readonly name: "";
5148
+ readonly type: "uint256";
5149
+ }];
5150
+ readonly stateMutability: "view";
5151
+ readonly type: "function";
5152
+ }, {
5153
+ readonly inputs: readonly [{
5154
+ readonly internalType: "uint256";
5155
+ readonly name: "assets";
5156
+ readonly type: "uint256";
5157
+ }];
5158
+ readonly name: "previewWithdraw";
5159
+ readonly outputs: readonly [{
5160
+ readonly internalType: "uint256";
5161
+ readonly name: "";
5162
+ readonly type: "uint256";
5163
+ }];
5164
+ readonly stateMutability: "view";
5165
+ readonly type: "function";
5166
+ }, {
5167
+ readonly inputs: readonly [{
5168
+ readonly internalType: "uint256";
5169
+ readonly name: "assets";
5170
+ readonly type: "uint256";
5171
+ }, {
5172
+ readonly internalType: "address";
5173
+ readonly name: "receiver";
5174
+ readonly type: "address";
5175
+ }, {
5176
+ readonly internalType: "address";
5177
+ readonly name: "owner";
5178
+ readonly type: "address";
5179
+ }];
5180
+ readonly name: "withdraw";
5181
+ readonly outputs: readonly [{
5182
+ readonly internalType: "uint256";
5183
+ readonly name: "";
5184
+ readonly type: "uint256";
5185
+ }];
5186
+ readonly stateMutability: "nonpayable";
5187
+ readonly type: "function";
5188
+ }, {
5189
+ readonly inputs: readonly [{
5190
+ readonly internalType: "address";
5191
+ readonly name: "owner";
5192
+ readonly type: "address";
5193
+ }];
5194
+ readonly name: "maxRedeem";
5195
+ readonly outputs: readonly [{
5196
+ readonly internalType: "uint256";
5197
+ readonly name: "";
5198
+ readonly type: "uint256";
5199
+ }];
5200
+ readonly stateMutability: "view";
5201
+ readonly type: "function";
5202
+ }, {
5203
+ readonly inputs: readonly [{
5204
+ readonly internalType: "uint256";
5205
+ readonly name: "shares";
5206
+ readonly type: "uint256";
5207
+ }];
5208
+ readonly name: "previewRedeem";
5209
+ readonly outputs: readonly [{
5210
+ readonly internalType: "uint256";
5211
+ readonly name: "";
5212
+ readonly type: "uint256";
5213
+ }];
5214
+ readonly stateMutability: "view";
5215
+ readonly type: "function";
5216
+ }, {
5217
+ readonly inputs: readonly [{
5218
+ readonly internalType: "uint256";
5219
+ readonly name: "shares";
5220
+ readonly type: "uint256";
5221
+ }, {
5222
+ readonly internalType: "address";
5223
+ readonly name: "receiver";
5224
+ readonly type: "address";
5225
+ }, {
5226
+ readonly internalType: "address";
5227
+ readonly name: "owner";
5228
+ readonly type: "address";
5229
+ }];
5230
+ readonly name: "redeem";
5231
+ readonly outputs: readonly [{
5232
+ readonly internalType: "uint256";
5233
+ readonly name: "";
5234
+ readonly type: "uint256";
5235
+ }];
5236
+ readonly stateMutability: "nonpayable";
5237
+ readonly type: "function";
5238
+ }, {
5239
+ readonly inputs: readonly [];
5240
+ readonly name: "unstakingPeriod";
5241
+ readonly outputs: readonly [{
5242
+ readonly internalType: "uint256";
5243
+ readonly name: "";
5244
+ readonly type: "uint256";
5245
+ }];
5246
+ readonly stateMutability: "view";
5247
+ readonly type: "function";
5248
+ }, {
5249
+ readonly inputs: readonly [];
5250
+ readonly name: "minUnstakingPeriod";
5251
+ readonly outputs: readonly [{
5252
+ readonly internalType: "uint256";
5253
+ readonly name: "";
5254
+ readonly type: "uint256";
5255
+ }];
5256
+ readonly stateMutability: "view";
5257
+ readonly type: "function";
5258
+ }, {
5259
+ readonly inputs: readonly [];
5260
+ readonly name: "maxPenalty";
5261
+ readonly outputs: readonly [{
5262
+ readonly internalType: "uint256";
5263
+ readonly name: "";
5264
+ readonly type: "uint256";
5265
+ }];
5266
+ readonly stateMutability: "view";
5267
+ readonly type: "function";
5268
+ }, {
5269
+ readonly inputs: readonly [];
5270
+ readonly name: "getParameters";
5271
+ readonly outputs: readonly [{
5272
+ readonly internalType: "uint256";
5273
+ readonly name: "";
5274
+ readonly type: "uint256";
5275
+ }, {
5276
+ readonly internalType: "uint256";
5277
+ readonly name: "";
5278
+ readonly type: "uint256";
5279
+ }, {
5280
+ readonly internalType: "uint256";
5281
+ readonly name: "";
5282
+ readonly type: "uint256";
5283
+ }];
5284
+ readonly stateMutability: "view";
5285
+ readonly type: "function";
5286
+ }];
5287
+
5288
+ declare const stakingRouterAbi: readonly [{
5289
+ readonly inputs: readonly [{
5290
+ readonly internalType: "uint256";
5291
+ readonly name: "amount";
5292
+ readonly type: "uint256";
5293
+ }, {
5294
+ readonly internalType: "address";
5295
+ readonly name: "to";
5296
+ readonly type: "address";
5297
+ }, {
5298
+ readonly internalType: "uint128";
5299
+ readonly name: "minReceive";
5300
+ readonly type: "uint128";
5301
+ }];
5302
+ readonly name: "stake";
5303
+ readonly outputs: readonly [];
5304
+ readonly stateMutability: "nonpayable";
5305
+ readonly type: "function";
5306
+ }, {
5307
+ readonly inputs: readonly [{
5308
+ readonly internalType: "uint256";
5309
+ readonly name: "amount";
5310
+ readonly type: "uint256";
5311
+ }, {
5312
+ readonly internalType: "uint256";
5313
+ readonly name: "minAmount";
5314
+ readonly type: "uint256";
5315
+ }, {
5316
+ readonly internalType: "address";
5317
+ readonly name: "asset";
5318
+ readonly type: "address";
5319
+ }, {
5320
+ readonly internalType: "uint256";
5321
+ readonly name: "chainID";
5322
+ readonly type: "uint256";
5323
+ }, {
5324
+ readonly internalType: "bytes";
5325
+ readonly name: "to";
5326
+ readonly type: "bytes";
5327
+ }];
5328
+ readonly name: "unstake";
5329
+ readonly outputs: readonly [];
5330
+ readonly stateMutability: "nonpayable";
5331
+ readonly type: "function";
5332
+ }, {
5333
+ readonly inputs: readonly [{
5334
+ readonly internalType: "uint256";
5335
+ readonly name: "amount";
5336
+ readonly type: "uint256";
5337
+ }];
5338
+ readonly name: "estimateXSodaAmount";
5339
+ readonly outputs: readonly [{
5340
+ readonly internalType: "uint256";
5341
+ readonly name: "";
5342
+ readonly type: "uint256";
5343
+ }, {
5344
+ readonly internalType: "uint256";
5345
+ readonly name: "";
5346
+ readonly type: "uint256";
5347
+ }];
5348
+ readonly stateMutability: "view";
5349
+ readonly type: "function";
5350
+ }, {
5351
+ readonly inputs: readonly [{
5352
+ readonly internalType: "uint256";
5353
+ readonly name: "amount";
5354
+ readonly type: "uint256";
5355
+ }];
5356
+ readonly name: "estimateInstantUnstake";
5357
+ readonly outputs: readonly [{
5358
+ readonly internalType: "uint256";
5359
+ readonly name: "";
5360
+ readonly type: "uint256";
5361
+ }];
5362
+ readonly stateMutability: "view";
5363
+ readonly type: "function";
5364
+ }];
5365
+
4888
5366
  interface State {
4889
5367
  connection: string;
4890
5368
  rate_limit: string;
@@ -5282,6 +5760,14 @@ declare class SpokeService {
5282
5760
  */
5283
5761
  static callWallet<T extends SpokeProvider = SpokeProvider, R extends boolean = false>(from: HubAddress, payload: Hex$1, spokeProvider: T, hubProvider: EvmHubProvider, raw?: R, skipSimulation?: boolean): Promise<TxReturnType<T, R>>;
5284
5762
  static verifySimulation(from: HubAddress, payload: Hex$1, spokeProvider: SpokeProvider, hubProvider: EvmHubProvider, skipSimulation: boolean): Promise<void>;
5763
+ /**
5764
+ * Verifies the transaction hash for the spoke chain to exist on chain.
5765
+ * Only stellar and solana need to be verified. For other chains, we assume the transaction exists on chain.
5766
+ * @param txHash - The transaction hash to verify.
5767
+ * @param spokeProvider - The spoke provider.
5768
+ * @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
5769
+ */
5770
+ static verifyTxHash(txHash: string, spokeProvider: SpokeProvider): Promise<Result<boolean>>;
5285
5771
  }
5286
5772
 
5287
5773
  type PoolBaseCurrencyHumanized = {
@@ -6285,6 +6771,7 @@ declare class StellarSpokeService {
6285
6771
  static callWallet<R extends boolean = false>(from: HubAddress, payload: Hex, spokeProvider: StellarSpokeProvider, hubProvider: EvmHubProvider, raw?: R): PromiseStellarTxReturnType<R>;
6286
6772
  private static transfer;
6287
6773
  private static call;
6774
+ static waitForTransaction(spokeProvider: StellarSpokeProvider, txHash: string, pollingTimeout?: number, maxAttempts?: number): Promise<Result<boolean, Error>>;
6288
6775
  }
6289
6776
 
6290
6777
  type SuiNativeCoinResult = {
@@ -6521,15 +7008,25 @@ declare class SolverService {
6521
7008
  */
6522
7009
  getQuote(payload: SolverIntentQuoteRequest): Promise<Result<SolverIntentQuoteResponse, SolverErrorResponse>>;
6523
7010
  /**
6524
- * Get the fee for a given input amount
7011
+ * Get the partner fee for a given input amount
6525
7012
  * @param {bigint} inputAmount - The amount of input tokens
6526
- * @returns {Promise<bigint>} The fee amount (denominated in input tokens)
7013
+ * @returns {Promise<bigint>} The partner fee amount (denominated in input tokens)
6527
7014
  *
6528
7015
  * @example
6529
- * const fee: bigint = await solverService.getFee(1000000000000000n);
6530
- * console.log('Fee:', fee);
7016
+ * const fee: bigint = await solverService.getPartnerFee(1000000000000000n);
7017
+ * console.log('Partner fee:', fee);
6531
7018
  */
6532
- getFee(inputAmount: bigint): bigint;
7019
+ getPartnerFee(inputAmount: bigint): bigint;
7020
+ /**
7021
+ * Get the solver fee for a given input amount (0.1% fee)
7022
+ * @param {bigint} inputAmount - The amount of input tokens
7023
+ * @returns {Promise<bigint>} The solver fee amount (denominated in input tokens)
7024
+ *
7025
+ * @example
7026
+ * const fee: bigint = await solverService.getSolverFee(1000000000000000n);
7027
+ * console.log('Solver fee:', fee);
7028
+ */
7029
+ getSolverFee(inputAmount: bigint): bigint;
6533
7030
  /**
6534
7031
  * Get the status of an intent from Solver API
6535
7032
  * NOTE: intentHash should be retrieved from relay packet dst_tx_hash property (see createAndSubmitIntent)
@@ -7668,6 +8165,14 @@ declare class BalnSwapService {
7668
8165
  * @returns The transaction hash or raw transaction data
7669
8166
  */
7670
8167
  unstake<R extends boolean = false>(params: BalnLockParams, spokeProvider: SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
8168
+ /**
8169
+ * Executes a cancel unstake operation directly through the wallet provider.
8170
+ * @param params - The lock parameters including lock ID
8171
+ * @param spokeProvider - The Sonic spoke provider
8172
+ * @param raw - Whether to return raw transaction data
8173
+ * @returns The transaction hash or raw transaction data
8174
+ */
8175
+ cancelUnstake<R extends boolean = false>(params: BalnLockParams, spokeProvider: SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
7671
8176
  /**
7672
8177
  * Gets detailed locks for a specific user including unstake requests and staked amounts.
7673
8178
  *
@@ -7714,6 +8219,13 @@ declare class BalnSwapService {
7714
8219
  * @returns The encoded contract call for the unstake operation
7715
8220
  */
7716
8221
  encodeUnstake(lockId: bigint): EvmContractCall;
8222
+ /**
8223
+ * Encodes a cancel unstake transaction for the BALN swap contract.
8224
+ *
8225
+ * @param lockId - The lock ID to cancel unstake for
8226
+ * @returns The encoded contract call for the cancel unstake operation
8227
+ */
8228
+ encodeCancelUnstake(lockId: bigint): EvmContractCall;
7717
8229
  /**
7718
8230
  * Executes a contract call through the Sonic wallet provider.
7719
8231
  * @param spokeProvider - The Sonic spoke provider
@@ -8109,6 +8621,533 @@ declare class BridgeService {
8109
8621
  filterTokensWithSameVault(tokens: Record<string, XToken>, to: SpokeChainId, srcAssetInfo: HubAssetInfo | undefined): XToken[];
8110
8622
  }
8111
8623
 
8624
+ declare class StakingLogic {
8625
+ private constructor();
8626
+ /**
8627
+ * Retrieves all unstake requests for a specific user.
8628
+ * @param stakedSoda - The address of the StakedSoda contract.
8629
+ * @param user - The address of the user.
8630
+ * @param publicClient - PublicClient<HttpTransport>
8631
+ * @returns Array of user unstake info for the user.
8632
+ */
8633
+ static getUnstakeSodaRequests(stakedSoda: Address, user: Address, publicClient: PublicClient<HttpTransport>): Promise<readonly UserUnstakeInfo[]>;
8634
+ /**
8635
+ * Encodes the depositFor transaction data.
8636
+ * @param stakedSoda - The address of the StakedSoda contract.
8637
+ * @param account - The address of the account to deposit for.
8638
+ * @param amount - The amount of tokens to deposit.
8639
+ * @returns The encoded contract call data.
8640
+ */
8641
+ static encodeDepositFor(stakedSoda: Address, account: Address, amount: bigint): EvmContractCall;
8642
+ /**
8643
+ * Encodes the withdrawTo transaction data.
8644
+ * @param stakedSoda - The address of the StakedSoda contract.
8645
+ * @param account - The address of the account to withdraw to.
8646
+ * @param value - The amount of tokens to withdraw.
8647
+ * @returns The encoded contract call data.
8648
+ */
8649
+ static encodeWithdrawTo(stakedSoda: Address, account: Address, value: bigint): EvmContractCall;
8650
+ /**
8651
+ * Encodes the unstake transaction data.
8652
+ * @param stakedSoda - The address of the StakedSoda contract.
8653
+ * @param account - The address of the account to unstake for.
8654
+ * @param value - The amount of tokens to unstake.
8655
+ * @returns The encoded contract call data.
8656
+ */
8657
+ static encodeUnstake(stakedSoda: Address, account: Address, value: bigint): EvmContractCall;
8658
+ /**
8659
+ * Encodes the cancelUnstakeSodaRequest transaction data.
8660
+ * @param stakedSoda - The address of the StakedSoda contract.
8661
+ * @param requestId - The ID of the unstake request to cancel.
8662
+ * @returns The encoded contract call data.
8663
+ */
8664
+ static encodeCancelUnstakeSodaRequest(stakedSoda: Address, requestId: bigint): EvmContractCall;
8665
+ /**
8666
+ * Encodes the cancelUnstakeRequest transaction data (alias for encodeCancelUnstakeSodaRequest).
8667
+ * @param stakedSoda - The address of the StakedSoda contract.
8668
+ * @param requestId - The ID of the unstake request to cancel.
8669
+ * @returns The encoded contract call data.
8670
+ */
8671
+ static encodeCancelUnstakeRequest(stakedSoda: Address, requestId: bigint): EvmContractCall;
8672
+ /**
8673
+ * Encodes the claim transaction data.
8674
+ * @param stakedSoda - The address of the StakedSoda contract.
8675
+ * @param requestId - The ID of the unstake request to claim.
8676
+ * @returns The encoded contract call data.
8677
+ */
8678
+ static encodeClaim(stakedSoda: Address, requestId: bigint): EvmContractCall;
8679
+ /**
8680
+ * Returns the total amount of SODA assets held by the xSoda vault.
8681
+ * @param xSoda - The address of the xSoda token contract.
8682
+ * @param publicClient - PublicClient<HttpTransport>
8683
+ * @returns The total amount of SODA assets.
8684
+ */
8685
+ static getXSodaTotalAssets(xSoda: Address, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8686
+ /**
8687
+ * Calculates the number of xSoda shares equivalent to a given amount of SODA assets.
8688
+ * @param xSoda - The address of the xSoda token contract.
8689
+ * @param assets - The amount of SODA assets to convert.
8690
+ * @param publicClient - PublicClient<HttpTransport>
8691
+ * @returns The number of xSoda shares.
8692
+ */
8693
+ static convertSodaToXSodaShares(xSoda: Address, assets: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8694
+ /**
8695
+ * Calculates the amount of SODA assets corresponding to a specific number of xSoda shares.
8696
+ * @param xSoda - The address of the xSoda token contract.
8697
+ * @param shares - The number of xSoda shares to convert.
8698
+ * @param publicClient - PublicClient<HttpTransport>
8699
+ * @returns The amount of SODA assets.
8700
+ */
8701
+ static convertXSodaSharesToSoda(xSoda: Address, shares: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8702
+ /**
8703
+ * Simulates the effects of depositing SODA into xSoda without executing it.
8704
+ * @param xSoda - The address of the xSoda token contract.
8705
+ * @param assets - The amount of SODA assets to deposit.
8706
+ * @param publicClient - PublicClient<HttpTransport>
8707
+ * @returns The number of xSoda shares that would be minted.
8708
+ */
8709
+ static previewXSodaDeposit(xSoda: Address, assets: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8710
+ /**
8711
+ * Simulates the effects of minting xSoda shares without executing it.
8712
+ * @param xSoda - The address of the xSoda token contract.
8713
+ * @param shares - The number of xSoda shares to mint.
8714
+ * @param publicClient - PublicClient<HttpTransport>
8715
+ * @returns The amount of SODA assets that would be deposited.
8716
+ */
8717
+ static previewXSodaMint(xSoda: Address, shares: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8718
+ /**
8719
+ * Simulates the effects of withdrawing SODA from xSoda without executing it.
8720
+ * @param xSoda - The address of the xSoda token contract.
8721
+ * @param assets - The amount of SODA assets to withdraw.
8722
+ * @param publicClient - PublicClient<HttpTransport>
8723
+ * @returns The number of xSoda shares that would be burned.
8724
+ */
8725
+ static previewXSodaWithdraw(xSoda: Address, assets: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8726
+ /**
8727
+ * Simulates the effects of redeeming xSoda shares without executing it.
8728
+ * @param xSoda - The address of the xSoda token contract.
8729
+ * @param shares - The number of xSoda shares to redeem.
8730
+ * @param publicClient - PublicClient<HttpTransport>
8731
+ * @returns The amount of SODA assets that would be withdrawn.
8732
+ */
8733
+ static previewXSodaRedeem(xSoda: Address, shares: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8734
+ /**
8735
+ * Encodes the xSoda deposit transaction data (deposit SODA to get xSoda shares).
8736
+ * @param xSoda - The address of the xSoda token contract.
8737
+ * @param assets - The amount of SODA assets to deposit.
8738
+ * @param receiver - The address of the receiver.
8739
+ * @returns The encoded contract call data.
8740
+ */
8741
+ static encodeXSodaDeposit(xSoda: Address, assets: bigint, receiver: Address): EvmContractCall;
8742
+ /**
8743
+ * Encodes the xSoda mint transaction data (mint xSoda shares by depositing SODA).
8744
+ * @param xSoda - The address of the xSoda token contract.
8745
+ * @param shares - The number of xSoda shares to mint.
8746
+ * @param receiver - The address of the receiver.
8747
+ * @returns The encoded contract call data.
8748
+ */
8749
+ static encodeXSodaMint(xSoda: Address, shares: bigint, receiver: Address): EvmContractCall;
8750
+ /**
8751
+ * Encodes the xSoda withdraw transaction data (withdraw SODA by burning xSoda shares).
8752
+ * @param xSoda - The address of the xSoda token contract.
8753
+ * @param assets - The amount of SODA assets to withdraw.
8754
+ * @param receiver - The address of the receiver.
8755
+ * @param owner - The address of the owner.
8756
+ * @returns The encoded contract call data.
8757
+ */
8758
+ static encodeXSodaWithdraw(xSoda: Address, assets: bigint, receiver: Address, owner: Address): EvmContractCall;
8759
+ /**
8760
+ * Encodes the xSoda redeem transaction data (redeem xSoda shares to get SODA).
8761
+ * @param xSoda - The address of the xSoda token contract.
8762
+ * @param shares - The number of xSoda shares to redeem.
8763
+ * @param receiver - The address of the receiver.
8764
+ * @param owner - The address of the owner.
8765
+ * @returns The encoded contract call data.
8766
+ */
8767
+ static encodeXSodaRedeem(xSoda: Address, shares: bigint, receiver: Address, owner: Address): EvmContractCall;
8768
+ /**
8769
+ * Encodes the StakingRouter stake transaction data.
8770
+ * @param stakingRouter - The address of the StakingRouter contract.
8771
+ * @param amount - The amount of SODA to stake.
8772
+ * @param to - The address to receive the staked tokens.
8773
+ * @param minReceive - The minimum amount to receive.
8774
+ * @returns The encoded contract call data.
8775
+ */
8776
+ static encodeStakingRouterStake(stakingRouter: Address, amount: bigint, to: Address, minReceive: bigint): EvmContractCall;
8777
+ /**
8778
+ * Encodes the StakingRouter unstake transaction data.
8779
+ * @param stakingRouter - The address of the StakingRouter contract.
8780
+ * @param amount - The amount of xSoda to unstake.
8781
+ * @param minAmount - The minimum amount of SODA to receive.
8782
+ * @param asset - The asset address to receive.
8783
+ * @param chainID - The destination chain ID.
8784
+ * @param to - The destination address as bytes.
8785
+ * @returns The encoded contract call data.
8786
+ */
8787
+ static encodeStakingRouterUnstake(stakingRouter: Address, amount: bigint, minAmount: bigint, asset: Address, chainID: bigint, to: Hex): EvmContractCall;
8788
+ /**
8789
+ * Estimates the xSoda amount and preview deposit for a given SODA amount.
8790
+ * @param stakingRouter - The address of the StakingRouter contract.
8791
+ * @param amount - The amount of SODA to estimate.
8792
+ * @param publicClient - PublicClient<HttpTransport>
8793
+ * @returns Tuple containing [xSodaAmount, previewDepositAmount].
8794
+ */
8795
+ static estimateXSodaAmount(stakingRouter: Address, amount: bigint, publicClient: PublicClient<HttpTransport>): Promise<readonly [bigint, bigint]>;
8796
+ /**
8797
+ * Estimates the instant unstake amount for a given xSoda amount.
8798
+ * @param stakingRouter - The address of the StakingRouter contract.
8799
+ * @param amount - The amount of xSoda to estimate unstake for.
8800
+ * @param publicClient - PublicClient<HttpTransport>
8801
+ * @returns The estimated SODA amount from instant unstake.
8802
+ */
8803
+ static estimateInstantUnstake(stakingRouter: Address, amount: bigint, publicClient: PublicClient<HttpTransport>): Promise<bigint>;
8804
+ }
8805
+
8806
+ type StakeParams = {
8807
+ amount: bigint;
8808
+ minReceive: bigint;
8809
+ account: Address;
8810
+ action: 'stake';
8811
+ };
8812
+ type UnstakeParams = {
8813
+ amount: bigint;
8814
+ account: Address;
8815
+ action: 'unstake';
8816
+ };
8817
+ type ClaimParams = {
8818
+ requestId: bigint;
8819
+ amount: bigint;
8820
+ action: 'claim';
8821
+ };
8822
+ type CancelUnstakeParams = {
8823
+ requestId: bigint;
8824
+ action: 'cancelUnstake';
8825
+ };
8826
+ type InstantUnstakeParams = {
8827
+ amount: bigint;
8828
+ minAmount: bigint;
8829
+ account: Address;
8830
+ action: 'instantUnstake';
8831
+ };
8832
+ type StakingAction = 'stake' | 'unstake' | 'claim' | 'cancelUnstake' | 'instantUnstake';
8833
+ type StakingParams = StakeParams | UnstakeParams | ClaimParams | CancelUnstakeParams | InstantUnstakeParams;
8834
+ type StakingInfo = {
8835
+ totalStaked: bigint;
8836
+ totalUnderlying: bigint;
8837
+ userXSodaBalance: bigint;
8838
+ userXSodaValue: bigint;
8839
+ userUnderlying: bigint;
8840
+ };
8841
+ type UnstakingInfo = {
8842
+ userUnstakeSodaRequests: readonly UserUnstakeInfo[];
8843
+ totalUnstaking: bigint;
8844
+ };
8845
+ type UnstakeRequestWithPenalty = UserUnstakeInfo & {
8846
+ penalty: bigint;
8847
+ penaltyPercentage: number;
8848
+ claimableAmount: bigint;
8849
+ };
8850
+ type StakingConfig = {
8851
+ unstakingPeriod: bigint;
8852
+ minUnstakingPeriod: bigint;
8853
+ maxPenalty: bigint;
8854
+ };
8855
+ type StakingErrorCode = 'STAKE_FAILED' | 'UNSTAKE_FAILED' | 'INSTANT_UNSTAKE_FAILED' | 'CLAIM_FAILED' | 'CANCEL_UNSTAKE_FAILED' | 'INFO_FETCH_FAILED' | 'ALLOWANCE_CHECK_FAILED' | 'APPROVAL_FAILED';
8856
+ type StakingError<T extends StakingErrorCode> = {
8857
+ code: T;
8858
+ error: unknown;
8859
+ };
8860
+ /**
8861
+ * StakingService provides a high-level interface for staking operations
8862
+ * including staking SODA tokens, unstaking, claiming rewards, and retrieving staking information.
8863
+ * All transaction methods return encoded contract calls that can be sent via a wallet provider.
8864
+ */
8865
+ declare class StakingService {
8866
+ private readonly hubProvider;
8867
+ private readonly relayerApiEndpoint;
8868
+ constructor(hubProvider: EvmHubProvider, relayerApiEndpoint: HttpUrl);
8869
+ /**
8870
+ * Check if allowance is valid for the staking operations
8871
+ * @param params - The staking parameters
8872
+ * @param spokeProvider - The spoke provider
8873
+ * @returns {Promise<Result<boolean, StakingError<'ALLOWANCE_CHECK_FAILED'>>>}
8874
+ */
8875
+ isAllowanceValid<S extends SpokeProvider>({ params, spokeProvider, }: Prettify<{
8876
+ params: StakingParams;
8877
+ spokeProvider: S;
8878
+ }>): Promise<Result<boolean, StakingError<'ALLOWANCE_CHECK_FAILED'>>>;
8879
+ /**
8880
+ * Approve token spending for the staking operations
8881
+ * @param params - The staking parameters
8882
+ * @param spokeProvider - The spoke provider
8883
+ * @param raw - Whether to return raw transaction data
8884
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'APPROVAL_FAILED'>>>
8885
+ */
8886
+ approve<S extends SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
8887
+ params: StakingParams;
8888
+ spokeProvider: S;
8889
+ raw?: R;
8890
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'APPROVAL_FAILED'>>>;
8891
+ /**
8892
+ * Execute stake transaction for staking SODA tokens to receive xSoda shares
8893
+ * NOTE: For EVM chains, you may need to approve token spending first using the approve method
8894
+ * @param params - The staking parameters
8895
+ * @param spokeProvider - The spoke provider
8896
+ * @param timeout - The timeout in milliseconds for the transaction (default: DEFAULT_RELAY_TX_TIMEOUT)
8897
+ * @returns Promise<Result<[SpokeTxHash, HubTxHash], StakingError<'STAKE_FAILED'> | RelayError>>
8898
+ */
8899
+ stake(params: StakeParams, spokeProvider: SpokeProvider, timeout?: number): Promise<Result<[string, string], StakingError<'STAKE_FAILED'> | RelayError>>;
8900
+ /**
8901
+ * Create stake intent only (without relaying to hub)
8902
+ * NOTE: This method only executes the transaction on the spoke chain and creates the stake intent
8903
+ * In order to successfully stake tokens, you need to:
8904
+ * 1. Check if the allowance is sufficient using isAllowanceValid
8905
+ * 2. Approve the appropriate contract to spend the tokens using approve
8906
+ * 3. Create the stake intent using this method
8907
+ * 4. Relay the transaction to the hub and await completion using the stake method
8908
+ *
8909
+ * @param params - The stake parameters including amount and account
8910
+ * @param spokeProvider - The spoke provider for the source chain
8911
+ * @param raw - Whether to return the raw transaction data (default: false)
8912
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'STAKE_FAILED'>> & { data?: { address: string; payload: Hex } }>
8913
+ */
8914
+ createStakeIntent<S extends SpokeProvider = SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
8915
+ params: StakeParams;
8916
+ spokeProvider: S;
8917
+ raw?: R;
8918
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'STAKE_FAILED'>> & {
8919
+ data?: {
8920
+ address: string;
8921
+ payload: Hex;
8922
+ };
8923
+ }>;
8924
+ /**
8925
+ * Build stake data using StakingRouter (simplified flow)
8926
+ * @param sodaAsset - The SODA asset information
8927
+ * @param to - The destination address
8928
+ * @param params - The staking parameters
8929
+ * @returns The encoded contract call data
8930
+ */
8931
+ buildStakeData(sodaAsset: HubAssetInfo, to: Address, params: StakeParams): Hex;
8932
+ /**
8933
+ * Execute unstake transaction for unstaking xSoda shares
8934
+ * @param params - The unstaking parameters
8935
+ * @param spokeProvider - The spoke provider
8936
+ * @param timeout - The timeout in milliseconds for the transaction (default: DEFAULT_RELAY_TX_TIMEOUT)
8937
+ * @returns Promise<Result<[SpokeTxHash, HubTxHash], StakingError<'UNSTAKE_FAILED'> | RelayError>>
8938
+ */
8939
+ unstake(params: UnstakeParams, spokeProvider: SpokeProvider, timeout?: number): Promise<Result<[string, string], StakingError<'UNSTAKE_FAILED'> | RelayError>>;
8940
+ /**
8941
+ * Create unstake intent only (without relaying to hub)
8942
+ * NOTE: This method only executes the transaction on the spoke chain and creates the unstake intent
8943
+ * In order to successfully unstake tokens, you need to:
8944
+ * 1. Check if the allowance is sufficient using isAllowanceValid
8945
+ * 2. Approve the appropriate contract to spend the tokens using approve
8946
+ * 3. Create the unstake intent using this method
8947
+ * 4. Relay the transaction to the hub and await completion using the unstake method
8948
+ *
8949
+ * @param params - The unstake parameters including amount and account
8950
+ * @param spokeProvider - The spoke provider for the source chain
8951
+ * @param raw - Whether to return the raw transaction data (default: false)
8952
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'UNSTAKE_FAILED'>> & { data?: { address: string; payload: Hex } }>
8953
+ */
8954
+ createUnstakeIntent<S extends SpokeProvider = SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
8955
+ params: UnstakeParams;
8956
+ spokeProvider: S;
8957
+ raw?: R;
8958
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'UNSTAKE_FAILED'>> & {
8959
+ data?: {
8960
+ address: string;
8961
+ payload: Hex;
8962
+ };
8963
+ }>;
8964
+ /**
8965
+ * Build unstake data for unstaking xSoda shares
8966
+ * @param hubWallet - The hub wallet address
8967
+ * @param params - The unstake parameters
8968
+ * @returns The encoded contract call data
8969
+ */
8970
+ buildUnstakeData(hubWallet: Address, params: UnstakeParams): Hex;
8971
+ /**
8972
+ * Execute instant unstake transaction for instantly unstaking xSoda shares
8973
+ * @param params - The instant unstaking parameters
8974
+ * @param spokeProvider - The spoke provider
8975
+ * @param timeout - The timeout in milliseconds for the transaction (default: DEFAULT_RELAY_TX_TIMEOUT)
8976
+ * @returns Promise<Result<[SpokeTxHash, HubTxHash], StakingError<'INSTANT_UNSTAKE_FAILED'> | RelayError>>
8977
+ */
8978
+ instantUnstake(params: InstantUnstakeParams, spokeProvider: SpokeProvider, timeout?: number): Promise<Result<[string, string], StakingError<'INSTANT_UNSTAKE_FAILED'> | RelayError>>;
8979
+ /**
8980
+ * Create instant unstake intent only (without relaying to hub)
8981
+ * NOTE: This method only executes the transaction on the spoke chain and creates the instant unstake intent
8982
+ * In order to successfully instant unstake tokens, you need to:
8983
+ * 1. Create the instant unstake intent using this method
8984
+ * 2. Relay the transaction to the hub and await completion using the instantUnstake method
8985
+ *
8986
+ * @param params - The instant unstake parameters including amount, minAmount and account
8987
+ * @param spokeProvider - The spoke provider for the source chain
8988
+ * @param raw - Whether to return the raw transaction data (default: false)
8989
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'INSTANT_UNSTAKE_FAILED'>> & { data?: { address: string; payload: Hex } }>
8990
+ */
8991
+ createInstantUnstakeIntent<S extends SpokeProvider = SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
8992
+ params: InstantUnstakeParams;
8993
+ spokeProvider: S;
8994
+ raw?: R;
8995
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'INSTANT_UNSTAKE_FAILED'>> & {
8996
+ data?: {
8997
+ address: string;
8998
+ payload: Hex;
8999
+ };
9000
+ }>;
9001
+ /**
9002
+ * Build instant unstake data for instantly unstaking xSoda shares
9003
+ * @param sodaAsset - The SODA asset information
9004
+ * @param dstChainId - The destination chain ID
9005
+ * @param dstWallet - The destination wallet address
9006
+ * @param params - The instant unstake parameters
9007
+ * @returns The encoded contract call data
9008
+ */
9009
+ buildInstantUnstakeData(sodaAsset: HubAssetInfo, dstChainId: SpokeChainId, dstWallet: Hex, params: InstantUnstakeParams): Hex;
9010
+ /**
9011
+ * Execute claim transaction for claiming unstaked tokens after the unstaking period
9012
+ * @param params - The claim parameters
9013
+ * @param spokeProvider - The spoke provider
9014
+ * @param timeout - The timeout in milliseconds for the transaction (default: DEFAULT_RELAY_TX_TIMEOUT)
9015
+ * @returns Promise<Result<[SpokeTxHash, HubTxHash], StakingError<'CLAIM_FAILED'> | RelayError>>
9016
+ */
9017
+ claim(params: ClaimParams, spokeProvider: SpokeProvider, timeout?: number): Promise<Result<[string, string], StakingError<'CLAIM_FAILED'> | RelayError>>;
9018
+ /**
9019
+ * Create claim intent only (without relaying to hub)
9020
+ * NOTE: This method only executes the transaction on the spoke chain and creates the claim intent
9021
+ * In order to successfully claim tokens, you need to:
9022
+ * 1. Create the claim intent using this method
9023
+ * 2. Relay the transaction to the hub and await completion using the claim method
9024
+ *
9025
+ * @param params - The claim parameters including requestId
9026
+ * @param spokeProvider - The spoke provider for the source chain
9027
+ * @param raw - Whether to return the raw transaction data (default: false)
9028
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'CLAIM_FAILED'>> & { data?: { address: string; payload: Hex } }>
9029
+ */
9030
+ createClaimIntent<S extends SpokeProvider = SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
9031
+ params: ClaimParams;
9032
+ spokeProvider: S;
9033
+ raw?: R;
9034
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'CLAIM_FAILED'>> & {
9035
+ data?: {
9036
+ address: string;
9037
+ payload: Hex;
9038
+ };
9039
+ }>;
9040
+ /**
9041
+ * Build claim data for claiming unstaked tokens
9042
+ * @param sodaAsset - The SODA asset information
9043
+ * @param dstChainId - The destination chain ID
9044
+ * @param dstWallet - The destination wallet address
9045
+ * @param params - The claim parameters
9046
+ * @returns The encoded contract call data
9047
+ */
9048
+ buildClaimData(sodaAsset: HubAssetInfo, dstChainId: SpokeChainId, dstWallet: Hex, params: ClaimParams): Hex;
9049
+ /**
9050
+ * Execute cancel unstake transaction for cancelling an unstake request
9051
+ * @param params - The cancel unstake parameters
9052
+ * @param spokeProvider - The spoke provider
9053
+ * @param timeout - The timeout in milliseconds for the transaction (default: DEFAULT_RELAY_TX_TIMEOUT)
9054
+ * @returns Promise<Result<[SpokeTxHash, HubTxHash], StakingError<'CANCEL_UNSTAKE_FAILED'> | RelayError>>
9055
+ */
9056
+ cancelUnstake(params: CancelUnstakeParams, spokeProvider: SpokeProvider, timeout?: number): Promise<Result<[string, string], StakingError<'CANCEL_UNSTAKE_FAILED'> | RelayError>>;
9057
+ /**
9058
+ * Create cancel unstake intent only (without relaying to hub)
9059
+ * NOTE: This method only executes the transaction on the spoke chain and creates the cancel unstake intent
9060
+ * In order to successfully cancel an unstake request, you need to:
9061
+ * 1. Create the cancel unstake intent using this method
9062
+ * 2. Relay the transaction to the hub and await completion using the cancelUnstake method
9063
+ *
9064
+ * @param params - The cancel unstake parameters including requestId
9065
+ * @param spokeProvider - The spoke provider for the source chain
9066
+ * @param raw - Whether to return the raw transaction data (default: false)
9067
+ * @returns Promise<Result<TxReturnType<S, R>, StakingError<'CANCEL_UNSTAKE_FAILED'>> & { data?: { address: string; payload: Hex } }>
9068
+ */
9069
+ createCancelUnstakeIntent<S extends SpokeProvider = SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<{
9070
+ params: CancelUnstakeParams;
9071
+ spokeProvider: S;
9072
+ raw?: R;
9073
+ }>): Promise<Result<TxReturnType<S, R>, StakingError<'CANCEL_UNSTAKE_FAILED'>> & {
9074
+ data?: {
9075
+ address: string;
9076
+ payload: Hex;
9077
+ };
9078
+ }>;
9079
+ /**
9080
+ * Build cancel unstake data for cancelling an unstake request
9081
+ * @param params - The cancel unstake parameters
9082
+ * @param hubWallet - The hub wallet address
9083
+ * @returns Promise<Hex> - The encoded contract call data
9084
+ */
9085
+ buildCancelUnstakeData(params: CancelUnstakeParams, hubWallet: Address): Promise<Hex>;
9086
+ /**
9087
+ * Get comprehensive staking information for a user using spoke provider
9088
+ * @param spokeProvider - The spoke provider
9089
+ * @returns Promise<Result<StakingInfo, StakingError<'INFO_FETCH_FAILED'>>>
9090
+ */
9091
+ getStakingInfoFromSpoke(spokeProvider: SpokeProvider): Promise<Result<StakingInfo, StakingError<'INFO_FETCH_FAILED'>>>;
9092
+ /**
9093
+ * Get comprehensive staking information for a user
9094
+ * @param userAddress - The user's address
9095
+ * @returns Promise<Result<StakingInfo, StakingError<'INFO_FETCH_FAILED'>>>
9096
+ */
9097
+ getStakingInfo(userAddress: Address): Promise<Result<StakingInfo, StakingError<'INFO_FETCH_FAILED'>>>;
9098
+ /**
9099
+ * Get unstaking information for a user
9100
+ * @param param - The user's address or spoke provider
9101
+ * @returns Promise<Result<UnstakingInfo, StakingError<'INFO_FETCH_FAILED'>>>
9102
+ */
9103
+ getUnstakingInfo(param: SpokeProvider | Address): Promise<Result<UnstakingInfo, StakingError<'INFO_FETCH_FAILED'>>>;
9104
+ /**
9105
+ * Get staking configuration from the stakedSoda contract
9106
+ * @returns Promise<Result<StakingConfig, StakingError<'INFO_FETCH_FAILED'>>>
9107
+ */
9108
+ getStakingConfig(): Promise<Result<StakingConfig, StakingError<'INFO_FETCH_FAILED'>>>;
9109
+ /**
9110
+ * Calculate penalty for an unstake request based on the contract logic
9111
+ * @param startTime - The start time of the unstake request
9112
+ * @param config - The staking configuration
9113
+ * @returns The penalty amount and percentage
9114
+ */
9115
+ private calculatePenalty;
9116
+ /**
9117
+ * Get unstaking information with penalty calculations
9118
+ * @param param - The user's address or spoke provider
9119
+ * @returns Promise<Result<UnstakingInfo & { requestsWithPenalty: UnstakeRequestWithPenalty[] }, StakingError<'INFO_FETCH_FAILED'>>>
9120
+ */
9121
+ getUnstakingInfoWithPenalty(param: SpokeProvider | Address): Promise<Result<UnstakingInfo & {
9122
+ requestsWithPenalty: UnstakeRequestWithPenalty[];
9123
+ }, StakingError<'INFO_FETCH_FAILED'>>>;
9124
+ /**
9125
+ * Get instant unstake ratio for a given amount
9126
+ * @param amount - The amount of xSoda to estimate instant unstake for
9127
+ * @returns Promise<Result<bigint, StakingError<'INFO_FETCH_FAILED'>>>
9128
+ */
9129
+ getInstantUnstakeRatio(amount: bigint): Promise<Result<bigint, StakingError<'INFO_FETCH_FAILED'>>>;
9130
+ /**
9131
+ * Get converted assets amount for xSODA shares
9132
+ * @param amount - The amount of xSoda shares to convert
9133
+ * @returns Promise<Result<bigint, StakingError<'INFO_FETCH_FAILED'>>>
9134
+ */
9135
+ getConvertedAssets(amount: bigint): Promise<Result<bigint, StakingError<'INFO_FETCH_FAILED'>>>;
9136
+ /**
9137
+ * Get stake ratio for a given amount (xSoda amount and preview deposit)
9138
+ * @param amount - The amount of SODA to estimate stake for
9139
+ * @returns Promise<Result<[bigint, bigint], StakingError<'INFO_FETCH_FAILED'>>>
9140
+ */
9141
+ getStakeRatio(amount: bigint): Promise<Result<[bigint, bigint], StakingError<'INFO_FETCH_FAILED'>>>;
9142
+ /**
9143
+ * Helper method to get xSoda balance for a user
9144
+ * @param xSoda - The xSoda token contract address
9145
+ * @param userAddress - The user's address
9146
+ * @returns Promise<bigint>
9147
+ */
9148
+ private getXSodaBalance;
9149
+ }
9150
+
8112
9151
  declare class IconSpokeProvider {
8113
9152
  readonly walletProvider: IIconWalletProvider;
8114
9153
  readonly chainConfig: IconSpokeChainConfig;
@@ -8153,20 +9192,12 @@ type LegacybnUSDTokenAddress = (typeof bnUSDLegacyTokens)[number]['address'];
8153
9192
  type LegacybnUSDToken = (typeof bnUSDLegacyTokens)[number];
8154
9193
  type NewbnUSDChainId = (typeof newbnUSDSpokeChainIds)[number];
8155
9194
  type IntentRelayChainId = (typeof ChainIdToIntentRelayChainId)[keyof typeof ChainIdToIntentRelayChainId];
8156
- type EvmChainId = (typeof EVM_CHAIN_IDS)[number];
8157
- type EvmSpokeChainId = (typeof EVM_CHAIN_IDS)[number];
8158
- type BaseSpokeChainInfo<T extends ChainType> = {
8159
- name: string;
8160
- id: GetSpokeChainIdType<T>;
8161
- type: T;
8162
- };
8163
9195
  type SpokeChainInfo<T extends ChainType> = BaseSpokeChainInfo<T>;
8164
9196
  type HubChainInfo<T extends ChainType> = {
8165
9197
  name: string;
8166
9198
  id: HubChainId;
8167
9199
  type: T;
8168
9200
  };
8169
- type GetSpokeChainIdType<T extends ChainType> = T extends 'EVM' ? EvmSpokeChainId : SpokeChainId;
8170
9201
  type AssetInfo = {
8171
9202
  chainId: bigint;
8172
9203
  spokeAddress: `0x${string}`;
@@ -8201,6 +9232,10 @@ type EvmHubChainConfig = BaseHubChainConfig<'EVM'> & {
8201
9232
  icxMigration: Address$1;
8202
9233
  balnSwap: Address$1;
8203
9234
  sodaToken: Address$1;
9235
+ sodaVault: Address$1;
9236
+ stakedSoda: Address$1;
9237
+ xSoda: Address$1;
9238
+ stakingRouter: Address$1;
8204
9239
  };
8205
9240
  nativeToken: Address$1;
8206
9241
  wrappedNativeToken: Address$1;
@@ -8338,6 +9373,15 @@ type TokenInfo = {
8338
9373
  maxDeposit: bigint;
8339
9374
  isSupported: boolean;
8340
9375
  };
9376
+ type UnstakeSodaRequest = {
9377
+ amount: bigint;
9378
+ startTime: bigint;
9379
+ to: Address$1;
9380
+ };
9381
+ type UserUnstakeInfo = {
9382
+ id: bigint;
9383
+ request: UnstakeSodaRequest;
9384
+ };
8341
9385
  type VaultReserves = {
8342
9386
  tokens: readonly Address$1[];
8343
9387
  balances: readonly bigint[];
@@ -8406,7 +9450,6 @@ type HttpPrefixedUrl = `http${string}`;
8406
9450
  type SpokeDepositParams = EvmSpokeDepositParams | InjectiveSpokeDepositParams | IconSpokeDepositParams;
8407
9451
  type GetSpokeDepositParamsType<T extends SpokeProvider> = T extends EvmSpokeProvider ? EvmSpokeDepositParams : T extends InjectiveSpokeProvider ? InjectiveSpokeDepositParams : T extends SuiSpokeProvider ? SuiSpokeDepositParams : T extends IconSpokeProvider ? IconSpokeDepositParams : T extends StellarSpokeProvider ? StellarSpokeDepositParams : T extends SolanaSpokeProvider ? SolanaSpokeDepositParams : T extends SonicSpokeProvider ? SonicSpokeDepositParams : never;
8408
9452
  type GetAddressType<T extends SpokeProvider> = T extends EvmSpokeProvider ? Address$1 : T extends InjectiveSpokeProvider ? string : T extends StellarSpokeProvider ? Hex$1 : T extends IconSpokeProvider ? IconAddress : T extends SuiSpokeProvider ? Hex$1 : T extends SolanaSpokeProvider ? Hex$1 : T extends SonicSpokeProvider ? Address$1 : never;
8409
- type HttpUrl = `http://${string}` | `https://${string}`;
8410
9453
  type SolverConfig = {
8411
9454
  intentsContract: Address$1;
8412
9455
  solverApiEndpoint: HttpUrl;
@@ -8666,6 +9709,7 @@ declare class Sodax {
8666
9709
  readonly migration: MigrationService;
8667
9710
  readonly backendApiService: BackendApiService;
8668
9711
  readonly bridge: BridgeService;
9712
+ readonly staking: StakingService;
8669
9713
  readonly hubProvider: EvmHubProvider;
8670
9714
  readonly relayerApiEndpoint: HttpUrl;
8671
9715
  constructor(config?: SodaxConfig);
@@ -9235,6 +10279,7 @@ declare function hexToBigInt(hex: string): bigint;
9235
10279
  */
9236
10280
  declare function deriveUserWalletAddress(spokeProvider: SpokeProvider, hubProvider: EvmHubProvider, walletAddress?: string): Promise<Address$1>;
9237
10281
  declare function parseToStroops(amount: string): bigint;
10282
+ declare function sleep(ms: number): Promise<void>;
9238
10283
 
9239
10284
  declare const DEFAULT_MAX_RETRY = 3;
9240
10285
  declare const DEFAULT_RELAY_TX_TIMEOUT = 120000;
@@ -9252,7 +10297,6 @@ declare const DEFAULT_BACKEND_API_HEADERS: {
9252
10297
  Accept: string;
9253
10298
  };
9254
10299
  declare const VAULT_TOKEN_DECIMALS = 18;
9255
- declare const EVM_CHAIN_IDS: readonly ["0xa86a.avax", "0xa4b1.arbitrum", "0x2105.base", "0x38.bsc", "sonic", "0xa.optimism", "0x89.polygon", "nibiru", "hyper", "lightlink"];
9256
10300
  declare const ChainIdToIntentRelayChainId: {
9257
10301
  readonly "0xa86a.avax": 6n;
9258
10302
  readonly "0xa4b1.arbitrum": 23n;
@@ -9440,11 +10484,7 @@ declare const isSodaVaultToken: (address: string) => boolean;
9440
10484
  declare const getHubChainConfig: (chainId: HubChainId) => EvmHubChainConfig;
9441
10485
  declare const spokeChainConfig: {
9442
10486
  readonly sonic: {
9443
- readonly chain: {
9444
- readonly name: "Sonic";
9445
- readonly id: "sonic";
9446
- readonly type: "EVM";
9447
- };
10487
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9448
10488
  readonly addresses: {
9449
10489
  readonly walletRouter: "0xC67C3e55c665E78b25dc9829B3Aa5af47d914733";
9450
10490
  readonly wrappedSonic: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38";
@@ -9623,11 +10663,7 @@ declare const spokeChainConfig: {
9623
10663
  readonly testToken: "3Q2HS3png7fLaYerqCun3zw8rnBZo2Ksvdg6RHTyM4Ns";
9624
10664
  readonly xTokenManager: "";
9625
10665
  };
9626
- readonly chain: {
9627
- readonly id: "solana";
9628
- readonly name: "Solana";
9629
- readonly type: "SOLANA";
9630
- };
10666
+ readonly chain: BaseSpokeChainInfo<"SOLANA">;
9631
10667
  readonly nativeToken: "11111111111111111111111111111111";
9632
10668
  readonly bnUSD: "3rSPCLNEF7Quw4wX8S1NyKivELoyij8eYA2gJwBgt4V5";
9633
10669
  readonly supportedTokens: {
@@ -9665,11 +10701,7 @@ declare const spokeChainConfig: {
9665
10701
  readonly walletAddress: "";
9666
10702
  };
9667
10703
  readonly "0xa86a.avax": {
9668
- readonly chain: {
9669
- readonly name: "Avalanche";
9670
- readonly id: "0xa86a.avax";
9671
- readonly type: "EVM";
9672
- };
10704
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9673
10705
  readonly addresses: {
9674
10706
  readonly assetManager: "0x5bDD1E1C5173F4c912cC919742FB94A55ECfaf86";
9675
10707
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -9715,11 +10747,7 @@ declare const spokeChainConfig: {
9715
10747
  };
9716
10748
  };
9717
10749
  readonly nibiru: {
9718
- readonly chain: {
9719
- readonly name: "Nibiru";
9720
- readonly id: "nibiru";
9721
- readonly type: "EVM";
9722
- };
10750
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9723
10751
  readonly addresses: {
9724
10752
  readonly assetManager: "0x6958a4CBFe11406E2a1c1d3a71A1971aD8B3b92F";
9725
10753
  readonly connection: "0x772FFE538E45b2cDdFB5823041EC26C44815B9AB";
@@ -9751,11 +10779,7 @@ declare const spokeChainConfig: {
9751
10779
  };
9752
10780
  };
9753
10781
  readonly "0xa4b1.arbitrum": {
9754
- readonly chain: {
9755
- readonly name: "Arbitrum";
9756
- readonly id: "0xa4b1.arbitrum";
9757
- readonly type: "EVM";
9758
- };
10782
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9759
10783
  readonly addresses: {
9760
10784
  readonly assetManager: "0x348BE44F63A458be9C1b13D6fD8e99048F297Bc3";
9761
10785
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -9829,11 +10853,7 @@ declare const spokeChainConfig: {
9829
10853
  };
9830
10854
  };
9831
10855
  readonly "0x2105.base": {
9832
- readonly chain: {
9833
- readonly name: "BASE";
9834
- readonly id: "0x2105.base";
9835
- readonly type: "EVM";
9836
- };
10856
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9837
10857
  readonly addresses: {
9838
10858
  readonly assetManager: "0x348BE44F63A458be9C1b13D6fD8e99048F297Bc3";
9839
10859
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -9893,11 +10913,7 @@ declare const spokeChainConfig: {
9893
10913
  };
9894
10914
  };
9895
10915
  readonly "0xa.optimism": {
9896
- readonly chain: {
9897
- readonly name: "Optimism";
9898
- readonly id: "0xa.optimism";
9899
- readonly type: "EVM";
9900
- };
10916
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9901
10917
  readonly addresses: {
9902
10918
  readonly assetManager: "0x348BE44F63A458be9C1b13D6fD8e99048F297Bc3";
9903
10919
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -9957,11 +10973,7 @@ declare const spokeChainConfig: {
9957
10973
  };
9958
10974
  };
9959
10975
  readonly "0x38.bsc": {
9960
- readonly chain: {
9961
- readonly name: "BSC";
9962
- readonly id: "0x38.bsc";
9963
- readonly type: "EVM";
9964
- };
10976
+ readonly chain: BaseSpokeChainInfo<"EVM">;
9965
10977
  readonly addresses: {
9966
10978
  readonly assetManager: "0x348BE44F63A458be9C1b13D6fD8e99048F297Bc3";
9967
10979
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -10014,11 +11026,7 @@ declare const spokeChainConfig: {
10014
11026
  };
10015
11027
  };
10016
11028
  readonly "0x89.polygon": {
10017
- readonly chain: {
10018
- readonly name: "Polygon";
10019
- readonly id: "0x89.polygon";
10020
- readonly type: "EVM";
10021
- };
11029
+ readonly chain: BaseSpokeChainInfo<"EVM">;
10022
11030
  readonly addresses: {
10023
11031
  readonly assetManager: "0x348BE44F63A458be9C1b13D6fD8e99048F297Bc3";
10024
11032
  readonly connection: "0x4555aC13D7338D9E671584C1D118c06B2a3C88eD";
@@ -10057,11 +11065,7 @@ declare const spokeChainConfig: {
10057
11065
  };
10058
11066
  };
10059
11067
  readonly hyper: {
10060
- readonly chain: {
10061
- readonly name: "HyperEVM";
10062
- readonly id: "hyper";
10063
- readonly type: "EVM";
10064
- };
11068
+ readonly chain: BaseSpokeChainInfo<"EVM">;
10065
11069
  readonly addresses: {
10066
11070
  readonly assetManager: "0xAfd6A6e4287A511D3BAAd013093815268846FBb7";
10067
11071
  readonly connection: "0xA143488cDc5B74B366231E6A4d5a55A2D9Dc8484";
@@ -10093,11 +11097,7 @@ declare const spokeChainConfig: {
10093
11097
  };
10094
11098
  };
10095
11099
  readonly lightlink: {
10096
- readonly chain: {
10097
- readonly name: "lightlink";
10098
- readonly id: "lightlink";
10099
- readonly type: "EVM";
10100
- };
11100
+ readonly chain: BaseSpokeChainInfo<"EVM">;
10101
11101
  readonly addresses: {
10102
11102
  readonly assetManager: "0x4A1C82744cDDeE675A255fB289Cb0917A482e7C7";
10103
11103
  readonly connection: "0x6D2126DB97dd88AfA85127253807D04A066b6746";
@@ -10213,11 +11213,7 @@ declare const spokeChainConfig: {
10213
11213
  readonly testToken: "";
10214
11214
  readonly xTokenManager: "";
10215
11215
  };
10216
- readonly chain: {
10217
- readonly id: "injective-1";
10218
- readonly name: "Injective";
10219
- readonly type: "INJECTIVE";
10220
- };
11216
+ readonly chain: BaseSpokeChainInfo<"INJECTIVE">;
10221
11217
  readonly nativeToken: "inj";
10222
11218
  readonly bnUSD: "factory/inj1d036ftaatxpkqsu9hja8r24rv3v33chz3appxp/bnUSD";
10223
11219
  readonly networkId: "injective-1";
@@ -10320,11 +11316,7 @@ declare const spokeChainConfig: {
10320
11316
  readonly bnUSD: "CD6YBFFWMU2UJHX2NGRJ7RN76IJVTCC7MRA46DUBXNB7E6W7H7JRJ2CX";
10321
11317
  readonly horizonRpcUrl: "https://horizon.stellar.org";
10322
11318
  readonly sorobanRpcUrl: "https://rpc.ankr.com/stellar_soroban";
10323
- readonly chain: {
10324
- readonly name: "Stellar";
10325
- readonly id: "stellar";
10326
- readonly type: "STELLAR";
10327
- };
11319
+ readonly chain: BaseSpokeChainInfo<"STELLAR">;
10328
11320
  };
10329
11321
  readonly sui: {
10330
11322
  readonly addresses: {
@@ -10417,11 +11409,7 @@ declare const spokeChainConfig: {
10417
11409
  readonly nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
10418
11410
  readonly bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD";
10419
11411
  readonly rpc_url: "https://fullnode.mainnet.sui.io:443";
10420
- readonly chain: {
10421
- readonly name: "Sui";
10422
- readonly id: "sui";
10423
- readonly type: "SUI";
10424
- };
11412
+ readonly chain: BaseSpokeChainInfo<"SUI">;
10425
11413
  };
10426
11414
  readonly "0x1.icon": {
10427
11415
  readonly addresses: {
@@ -10430,11 +11418,7 @@ declare const spokeChainConfig: {
10430
11418
  readonly rateLimit: "cxbbdcea9e6757023a046067ba8daa3c4c50304358";
10431
11419
  readonly wICX: "cx3975b43d260fb8ec802cef6e60c2f4d07486f11d";
10432
11420
  };
10433
- readonly chain: {
10434
- readonly id: "0x1.icon";
10435
- readonly name: "ICON";
10436
- readonly type: "ICON";
10437
- };
11421
+ readonly chain: BaseSpokeChainInfo<"ICON">;
10438
11422
  readonly supportedTokens: {
10439
11423
  readonly ICX: {
10440
11424
  readonly symbol: "ICX";
@@ -10550,7 +11534,7 @@ declare const hubVaults: {
10550
11534
  declare const hubVaultTokensMap: Map<string, Token>;
10551
11535
  declare const getHubVaultTokenByAddress: (address: string) => Token | undefined;
10552
11536
  declare const bnUSDLegacySpokeChainIds: readonly ["0x1.icon", "sui", "stellar"];
10553
- declare const newbnUSDSpokeChainIds: ("0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "sonic" | "0xa.optimism" | "0x89.polygon" | "nibiru" | "hyper" | "lightlink" | "injective-1" | "solana" | "sui" | "stellar")[];
11537
+ declare const newbnUSDSpokeChainIds: ("0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0xa.optimism" | "0x89.polygon" | "solana" | "sui" | "stellar" | "nibiru" | "hyper" | "lightlink")[];
10554
11538
  declare const bnUSDLegacyTokens: readonly [{
10555
11539
  readonly symbol: "bnUSD (legacy)";
10556
11540
  readonly name: "bnUSD";
@@ -11118,7 +12102,7 @@ declare const hubAssetToOriginalAssetMap: Map<SpokeChainId, Map<Address, Origina
11118
12102
  declare const chainIdToHubAssetsMap: Map<SpokeChainId, Map<Address, HubAssetInfo>>;
11119
12103
  declare const supportedHubAssets: Set<Address>;
11120
12104
  declare const supportedSodaAssets: Set<Address>;
11121
- declare const spokeChainIdsSet: Set<"0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "sonic" | "0xa.optimism" | "0x89.polygon" | "nibiru" | "hyper" | "lightlink" | "injective-1" | "solana" | "sui" | "stellar" | "0x1.icon">;
12105
+ declare const spokeChainIdsSet: Set<"0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0xa.optimism" | "0x89.polygon" | "solana" | "sui" | "stellar" | "0x1.icon" | "nibiru" | "hyper" | "lightlink">;
11122
12106
  declare const getOriginalAssetInfoFromVault: (chainId: SpokeChainId, vault: Address) => OriginalAssetAddress[];
11123
12107
  declare const getHubAssetInfo: (chainId: SpokeChainId, asset: OriginalAssetAddress) => HubAssetInfo | undefined;
11124
12108
  declare const isValidOriginalAssetAddress: (chainId: SpokeChainId, asset: OriginalAssetAddress) => boolean;
@@ -11135,6 +12119,7 @@ declare const intentRelayChainIdToSpokeChainIdMap: Map<IntentRelayChainId, Spoke
11135
12119
  declare const supportedTokensPerChain: Map<SpokeChainId, readonly XToken[]>;
11136
12120
  declare const getSpokeChainIdFromIntentRelayChainId: (intentRelayChainId: IntentRelayChainId) => SpokeChainId;
11137
12121
  declare const isNativeToken: (chainId: SpokeChainId, token: Token | string) => boolean;
12122
+ declare const findSupportedTokenBySymbol: (chainId: SpokeChainId, symbol: string) => XToken | undefined;
11138
12123
 
11139
12124
  declare function isEvmHubChainConfig(value: HubChainConfig): value is EvmHubChainConfig;
11140
12125
  declare function isEvmSpokeChainConfig(value: SpokeChainConfig): value is EvmSpokeChainConfig;
@@ -11178,4 +12163,4 @@ declare function isUnifiedBnUSDMigrateParams(value: unknown): value is UnifiedBn
11178
12163
  declare function isBalnMigrateParams(value: unknown): value is BalnMigrateParams;
11179
12164
  declare function isIcxCreateRevertMigrationParams(value: unknown): value is IcxCreateRevertMigrationParams;
11180
12165
 
11181
- export { type AggregatedReserveData, type ApiResponse, type AssetInfo, type BackendApiConfig, BackendApiService, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BaseCurrencyInfo, type BaseHubChainConfig, type BaseSpokeChainConfig, type BaseSpokeChainInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, ChainIdToIntentRelayChainId, type CombinedReserveData, type ComputedUserReserve, type CreateBridgeIntentParams, type CreateIntentParams, type CustomProvider, 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, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, EVM_CHAIN_IDS, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, type EvmChainId, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, type EvmHubChainConfig, EvmHubProvider, type EvmHubProviderConfig, type EvmInitializedConfig, type EvmReturnType, EvmSolverService, type EvmSpokeChainConfig, type EvmSpokeChainId, type EvmSpokeDepositParams, EvmSpokeProvider, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetEstimateGasReturnType, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeChainIdType, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, type HttpPrefixedUrl, type HttpUrl, type HubAssetInfo, type HubChainConfig, type HubChainInfo, type HubTxHash, type HubVaultSymbol, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, type ISpokeProvider, type IWalletProvider, type IconAddress, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, type IconRawTransaction, type IconReturnType, type IconSpokeChainConfig, IconSpokeProvider, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjectiveGasEstimate, type InjectiveReturnType, type InjectiveSpokeChainConfig, InjectiveSpokeProvider, type Intent, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, type IntentPostExecutionFailedErrorData, type IntentRelayChainId, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfig, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeConfig, type PartnerFeePercentage, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, type QuoteType, RAY, RAY_DECIMALS, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, SodaTokens, SodaTokensAsHubAssets, SodaVaultTokensSet, Sodax, type SodaxConfig, type SolanaChainConfig, type SolanaGasEstimate, type SolanaRawTransaction, type SolanaReturnType, SolanaSpokeProvider, type SolverConfig, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, SolverService, type SolverServiceConfig, type SonicSpokeChainConfig, type SonicSpokeDepositParams, SonicSpokeProvider, SonicSpokeService, type SpokeChainConfig, type SpokeChainInfo, type SpokeDepositParams, type SpokeProvider, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StellarAssetTrustline, type StellarGasEstimate, type StellarReturnType, type StellarRpcConfig, type StellarSpokeChainConfig, type StellarSpokeDepositParams, StellarSpokeProvider, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, type SuiGasEstimate, type SuiRawTransaction, type SuiReturnType, type SuiSpokeChainConfig, type SuiSpokeDepositParams, SuiSpokeProvider, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, type TokenInfo, type TransferToHubParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnstakeRequest, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, VAULT_TOKEN_DECIMALS, type VaultReserves, type VaultType, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getHubVaultTokenByAddress, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getOriginalAssetAddress, getOriginalAssetInfoFromVault, getOriginalTokenFromOriginalAssetAddress, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hubAssetToOriginalAssetMap, hubAssets, hubVaultTokensMap, hubVaults, hubVaultsAddressSet, hyper, intentRelayChainIdToSpokeChainIdMap, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveSpokeProvider, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketSupportedToken, isMoneyMarketWithdrawUnknownError, isNativeToken, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSodaVaultToken, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isUnifiedBnUSDMigrateParams, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, isValidVault, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, originalAssetTohubAssetMap, parseToStroops, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, submitTransaction, supportedHubAssets, supportedHubChains, supportedSodaAssets, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
12166
+ export { type AggregatedReserveData, type ApiResponse, type AssetInfo, type BackendApiConfig, BackendApiService, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BaseCurrencyInfo, type BaseHubChainConfig, type BaseSpokeChainConfig, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CancelUnstakeParams, ChainIdToIntentRelayChainId, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type CreateBridgeIntentParams, type CreateIntentParams, type CustomProvider, 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, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, type EvmHubChainConfig, EvmHubProvider, type EvmHubProviderConfig, type EvmInitializedConfig, type EvmReturnType, EvmSolverService, type EvmSpokeChainConfig, type EvmSpokeDepositParams, EvmSpokeProvider, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetEstimateGasReturnType, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, type HttpPrefixedUrl, type HubAssetInfo, type HubChainConfig, type HubChainInfo, type HubTxHash, type HubVaultSymbol, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, type ISpokeProvider, type IWalletProvider, type IconAddress, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, type IconRawTransaction, type IconReturnType, type IconSpokeChainConfig, IconSpokeProvider, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjectiveGasEstimate, type InjectiveReturnType, type InjectiveSpokeChainConfig, InjectiveSpokeProvider, type InstantUnstakeParams, type Intent, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, type IntentPostExecutionFailedErrorData, type IntentRelayChainId, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfig, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeConfig, type PartnerFeePercentage, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, type QuoteType, RAY, RAY_DECIMALS, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, SodaTokens, SodaTokensAsHubAssets, SodaVaultTokensSet, Sodax, type SodaxConfig, type SolanaChainConfig, type SolanaGasEstimate, type SolanaRawTransaction, type SolanaReturnType, SolanaSpokeProvider, type SolverConfig, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, SolverService, type SolverServiceConfig, type SonicSpokeChainConfig, type SonicSpokeDepositParams, SonicSpokeProvider, SonicSpokeService, type SpokeChainConfig, type SpokeChainInfo, type SpokeDepositParams, type SpokeProvider, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StellarAssetTrustline, type StellarGasEstimate, type StellarReturnType, type StellarRpcConfig, type StellarSpokeChainConfig, type StellarSpokeDepositParams, StellarSpokeProvider, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, type SuiGasEstimate, type SuiRawTransaction, type SuiReturnType, type SuiSpokeChainConfig, type SuiSpokeDepositParams, SuiSpokeProvider, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, type TokenInfo, type TransferToHubParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, type VaultType, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, findSupportedTokenBySymbol, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getHubVaultTokenByAddress, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getOriginalAssetAddress, getOriginalAssetInfoFromVault, getOriginalTokenFromOriginalAssetAddress, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hubAssetToOriginalAssetMap, hubAssets, hubVaultTokensMap, hubVaults, hubVaultsAddressSet, hyper, intentRelayChainIdToSpokeChainIdMap, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveSpokeProvider, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketSupportedToken, isMoneyMarketWithdrawUnknownError, isNativeToken, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSodaVaultToken, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isUnifiedBnUSDMigrateParams, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, isValidVault, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, originalAssetTohubAssetMap, parseToStroops, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, stakedSodaAbi, stakingRouterAbi, submitTransaction, supportedHubAssets, supportedHubChains, supportedSodaAssets, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };