@sodax/sdk 0.0.1-rc.10 → 0.0.1-rc.11

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.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Address, Hex, PublicClient, HttpTransport, Hash, GetLogsReturnType, TransactionReceipt, WalletClient, CustomTransport, Chain, Account } from 'viem';
2
- import { ICWWalletProvider, IInjectiveWalletProvider, CWExecuteResponse, SpokeChainId, Hex as Hex$1, IEvmWalletProvider, Address as Address$1, Token, HubAddress, Hash as Hash$1, IIconWalletProvider, ISolanaWalletProvider, SolanaBase58PublicKey, IStellarWalletProvider, ISuiWalletProvider, ChainType, CosmosNetworkEnv, CWRawTransaction, EvmRawTransaction, StellarRawTransaction, HubChainId, EvmRawTransactionReceipt, ChainId, OriginalAssetAddress } from '@sodax/types';
2
+ import { ICWWalletProvider, IInjectiveWalletProvider, CWExecuteResponse, SpokeChainId, Hex as Hex$1, IEvmWalletProvider, Address as Address$1, Token, HubAddress, Hash as Hash$1, IconEoaAddress, IIconWalletProvider, ISolanaWalletProvider, SolanaBase58PublicKey, IStellarWalletProvider, ISuiWalletProvider, ChainType, CosmosNetworkEnv, CWRawTransaction, EvmRawTransaction, StellarRawTransaction, HubChainId, ICON_MAINNET_CHAIN_ID, EvmRawTransactionReceipt, ChainId, OriginalAssetAddress } from '@sodax/types';
3
3
  export * from '@sodax/types';
4
4
  import { Transaction, TransactionResult } from '@mysten/sui/transactions';
5
5
  import { IconService } from 'icon-sdk-js';
@@ -5183,12 +5183,13 @@ declare class SolverService {
5183
5183
  getFee(inputAmount: bigint): Promise<bigint>;
5184
5184
  /**
5185
5185
  * Get the status of an intent from Solver API
5186
+ * NOTE: intentHash should be retrieved from relay packet dst_tx_hash property (see createAndSubmitIntent)
5186
5187
  * @param {IntentStatusRequest} intentStatusRequest - The intent status request
5187
5188
  * @returns {Promise<Result<IntentStatusResponse, IntentErrorResponse>>} The intent status response
5188
5189
  *
5189
5190
  * @example
5190
5191
  * const intentStatusRequest = {
5191
- * "intentHash": "a0dd7652-b360-4123-ab2d-78cfbcd20c6b"
5192
+ * "intentHash": "a0dd7652-b360-4123-ab2d-78cfbcd20c6b" // destination tx hash from relay packet
5192
5193
  * } satisfies IntentStatusRequest
5193
5194
  *
5194
5195
  * const response = await solverService.getStatus(intentStatusRequest);
@@ -5315,7 +5316,7 @@ declare class SolverService {
5315
5316
  *
5316
5317
  * const txReceipt = approveResult.value;
5317
5318
  */
5318
- approve<S extends SpokeProvider, R extends boolean = false>(token: Address$1, amount: bigint, address: Address$1, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>>>;
5319
+ approve<S extends SpokeProvider, R extends boolean = false>(token: Address$1, amount: bigint, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>>>;
5319
5320
  /**
5320
5321
  * Creates an intent by handling token approval and intent creation
5321
5322
  * NOTE: This method does not submit the intent to the Solver API
@@ -5601,6 +5602,260 @@ declare class EvmSolverService {
5601
5602
  static encodeCancelIntent(intent: Intent, intentsContract: Address): EvmContractCall;
5602
5603
  }
5603
5604
 
5605
+ type IcxMigrateParams = {
5606
+ icx: IcxTokenType;
5607
+ amount: bigint;
5608
+ to: Address;
5609
+ action: 'migrate';
5610
+ };
5611
+ type IcxCreateRevertMigrationParams = {
5612
+ amount: bigint;
5613
+ to: IconEoaAddress;
5614
+ action: 'revert';
5615
+ };
5616
+ type IcxRevertMigrationParams = {
5617
+ wICX: IconAddress;
5618
+ amount: bigint;
5619
+ userWallet: Address;
5620
+ to: Hex;
5621
+ };
5622
+ /**
5623
+ * Service for handling ICX migration operations on the hub chain.
5624
+ * Provides functionality to migrate wICX tokens from ICON to the hub chain.
5625
+ */
5626
+ declare class IcxMigrationService {
5627
+ private readonly hubProvider;
5628
+ constructor(hubProvider: EvmHubProvider);
5629
+ /**
5630
+ * Retrieves the available amount of SODA tokens in the ICX migration contract.
5631
+ * This represents the amount of tokens available for migration.
5632
+ *
5633
+ * @returns The available balance of SODA tokens in the migration contract
5634
+ */
5635
+ getAvailableAmount(): Promise<bigint>;
5636
+ /**
5637
+ * Generates transaction data for migrating wICX tokens from ICON to the hub chain.
5638
+ * This method creates the necessary contract calls to:
5639
+ * 1. Approve the migration contract to spend the wICX tokens
5640
+ * 2. Execute the migration swap
5641
+ *
5642
+ * @param params - The migration parameters including token address, amount, and recipient
5643
+ * @returns Encoded transaction data for the migration operation
5644
+ * @throws Will throw an error if the hub asset configuration is not found
5645
+ */
5646
+ migrateData(params: IcxMigrateParams): Hex;
5647
+ /**
5648
+ * Generates transaction data for migrating back tokens to the ICON chain.
5649
+ * @param params - The migration parameters including token address, amount, and recipient
5650
+ * @returns Encoded transaction data for the migration operation
5651
+ * @throws Will throw an error if the hub asset configuration is not found
5652
+ */
5653
+ revertMigration(params: IcxRevertMigrationParams): Hex;
5654
+ /**
5655
+ * Encodes a migration transaction for the ICX swap contract.
5656
+ * This creates the contract call data for swapping wICX tokens to SODA tokens.
5657
+ *
5658
+ * @param amount - The amount of wICX tokens to migrate
5659
+ * @param to - The address that will receive the migrated SODA tokens
5660
+ * @returns The encoded contract call for the migration operation
5661
+ */
5662
+ encodeMigrate(amount: bigint, to: Address): EvmContractCall;
5663
+ /**
5664
+ * Encodes a revert migration transaction for the ICX swap contract.
5665
+ * This creates the contract call data for swapping SODA tokens to wICX tokens.
5666
+ *
5667
+ * @param amount - The amount of wICX tokens to migrate
5668
+ * @param to - The address that will receive the migrated SODA tokens
5669
+ * @returns The encoded contract call for the migration operation
5670
+ */
5671
+ encodeRevertMigration(amount: bigint, to: Address): EvmContractCall;
5672
+ }
5673
+
5674
+ type GetMigrationFailedPayload<T extends MigrationErrorCode> = T extends 'CREATE_MIGRATION_INTENT_FAILED' ? IcxMigrateParams : T extends 'CREATE_REVERT_MIGRATION_INTENT_FAILED' ? IcxCreateRevertMigrationParams : T extends 'REVERT_MIGRATION_FAILED' ? IcxCreateRevertMigrationParams : T extends 'MIGRATION_FAILED' ? IcxMigrateParams : never;
5675
+ type MigrationFailedErrorData<T extends MigrationErrorCode> = {
5676
+ payload: GetMigrationFailedPayload<T>;
5677
+ error: unknown;
5678
+ };
5679
+ type MigrationErrorCode = 'MIGRATION_FAILED' | 'CREATE_MIGRATION_INTENT_FAILED' | 'CREATE_REVERT_MIGRATION_INTENT_FAILED' | 'REVERT_MIGRATION_FAILED';
5680
+ type MigrationErrorData<T extends MigrationErrorCode> = T extends 'CREATE_MIGRATION_INTENT_FAILED' ? MigrationFailedErrorData<T> : T extends 'CREATE_REVERT_MIGRATION_INTENT_FAILED' ? MigrationFailedErrorData<T> : T extends 'REVERT_MIGRATION_FAILED' ? MigrationFailedErrorData<T> : T extends 'MIGRATION_FAILED' ? MigrationFailedErrorData<T> : never;
5681
+ type MigrationError<T extends MigrationErrorCode> = {
5682
+ code: T;
5683
+ data: MigrationErrorData<T>;
5684
+ };
5685
+ type MigrationAction = 'migrate' | 'revert';
5686
+ type MigrationParams = Prettify<{
5687
+ token: 'ICX';
5688
+ } & IcxMigrateParams>;
5689
+ type MigrationTokens = 'ICX';
5690
+ type GetMigrateParams<T extends MigrationTokens> = T extends 'ICX' ? IcxMigrateParams : never;
5691
+ type GetRevertMigrationParams<T extends MigrationTokens> = T extends 'ICX' ? IcxCreateRevertMigrationParams : never;
5692
+ declare class MigrationService {
5693
+ private readonly icxMigration;
5694
+ private readonly hubProvider;
5695
+ private readonly config;
5696
+ constructor(hubProvider: EvmHubProvider, config?: MigrationServiceConfig);
5697
+ migrateData(params: IcxMigrateParams): Promise<Hex$1>;
5698
+ /**
5699
+ * Checks if the allowance is valid for the migration transaction.
5700
+ * @param params - The parameters for the migration transaction.
5701
+ * @param spokeProvider - The spoke provider.
5702
+ * @returns {Promise<Result<boolean>>} - Returns the result of the allowance check or error
5703
+ *
5704
+ * @example
5705
+ * const result = await migrationService.isAllowanceValid(
5706
+ * {
5707
+ * token: 'ICX', // Token to migrate
5708
+ * icx: 'cx...', // Address of the ICX or wICX token to migrate
5709
+ * amount: 1000n, // Amount to migrate (in ICX decimals, usually 18)
5710
+ * to: '0x...', // Address to receive the migrated SODA tokens
5711
+ * action: 'migrate', // Action to perform (migrate or revert)
5712
+ * },
5713
+ * spokeProvider, // IconSpokeProvider instance
5714
+ * );
5715
+ *
5716
+ */
5717
+ isAllowanceValid<S extends SpokeProvider>(params: MigrationParams | IcxCreateRevertMigrationParams, spokeProvider: S): Promise<Result<boolean>>;
5718
+ /**
5719
+ * Approves the amount spending for the revert migration transaction.
5720
+ * @param params - The parameters for the revert migration transaction.
5721
+ * @param spokeProvider - The spoke provider.
5722
+ * @param raw - Whether to return the raw transaction hash instead of the transaction receipt
5723
+ * @returns {Promise<Result<TxReturnType<S, R>>>} - Returns the raw transaction payload or transaction hash
5724
+ *
5725
+ * @example
5726
+ * const result = await migrationService.approve(
5727
+ * {
5728
+ * amount: 1000n, // Amount of SODA tokens to revert
5729
+ * to: 'hx...', // Icon Address to receive the reverted SODA tokens as ICX
5730
+ * action: 'revert',
5731
+ * },
5732
+ * spokeProvider, // SonicSpokeProvider instance
5733
+ * true // Optional raw flag to return the raw transaction hash instead of the transaction receipt
5734
+ * );
5735
+ *
5736
+ */
5737
+ approve<S extends SpokeProvider, R extends boolean = false>(params: IcxCreateRevertMigrationParams, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>>>;
5738
+ /**
5739
+ * Creates a migration intent and submits (relays) it to the hub chain.
5740
+ * @param params - The parameters for the migration transaction.
5741
+ * @param spokeProvider - The spoke provider.
5742
+ * @param timeout - The timeout in milliseconds for the transaction. Default is 60 seconds.
5743
+ * @returns {Promise<Result<[Hex, Hex], MigrationError<'MIGRATION_FAILED'> | MigrationError<'CREATE_MIGRATION_INTENT_FAILED'> | RelayError>>}
5744
+ * Returns a Result containing a tuple of [spokeTxHash, hubTxHash] if successful,
5745
+ * or an error describing why the migration or relay failed.
5746
+ *
5747
+ * @example
5748
+ * const result = await migrationService.createAndSubmitMigrateIntent(
5749
+ * {
5750
+ * token: 'ICX', // Token to migrate
5751
+ * icx: 'cx...', // Address of the ICX or wICX token to migrate
5752
+ * amount: 1000n, // Amount to migrate (in ICX decimals, usually 18)
5753
+ * to: '0x...', // Address to receive the migrated SODA tokens
5754
+ * action: 'migrate',
5755
+ * },
5756
+ * spokeProvider, // IconSpokeProvider instance
5757
+ * 30000 // Optional timeout in milliseconds (default: 60000, i.e. 60 seconds)
5758
+ * );
5759
+ *
5760
+ * if (!result.ok) {
5761
+ * // Handle error
5762
+ * }
5763
+ *
5764
+ * const [
5765
+ * spokeTxHash, // transaction hash on the spoke chain
5766
+ * hubTxHash, // transaction hash on the hub chain (i.e. the transaction that was relayed to the hub)
5767
+ * ] = result.value;
5768
+ * console.log('Migration transaction hashes:', { spokeTxHash, hubTxHash });
5769
+ */
5770
+ createAndSubmitMigrateIntent(params: MigrationParams, spokeProvider: IconSpokeProvider, timeout?: number): Promise<Result<[
5771
+ Hex$1,
5772
+ Hex$1
5773
+ ], MigrationError<'MIGRATION_FAILED'> | MigrationError<'CREATE_MIGRATION_INTENT_FAILED'> | RelayError>>;
5774
+ /**
5775
+ * Creates a revert migration (SODA to ICX) intent and submits (relays) it to the spoke chain.
5776
+ * @param params - The parameters for the revert migration transaction.
5777
+ * @param spokeProvider - The SonicSpokeProvider instance.
5778
+ * @param timeout - The timeout in milliseconds for the transaction. Default is 60 seconds.
5779
+ *
5780
+ * @returns {Promise<Result<[Hex, Hex], MigrationError<'REVERT_MIGRATION_FAILED'> | MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'> | RelayError>>}
5781
+ * Returns a Result containing a tuple of [hubTxHash, spokeTxHash] if successful,
5782
+ * or an error describing why the revert migration or relay failed.
5783
+ *
5784
+ *
5785
+ * @example
5786
+ * const result = await migrationService.createAndSubmitRevertMigrationIntent(
5787
+ * {
5788
+ * amount: 1000n, // Amount of SODA tokens to revert
5789
+ * to: 'hx...', // Icon Address to receive the reverted SODA tokens as ICX
5790
+ * action: 'revert',
5791
+ * },
5792
+ * spokeProvider, // SonicSpokeProvider instance
5793
+ * 30000 // Optional timeout in milliseconds (default: 60000, i.e. 60 seconds)
5794
+ * );
5795
+ *
5796
+ * if (!result.ok) {
5797
+ * // Handle error
5798
+ * }
5799
+ *
5800
+ * const [
5801
+ * hubTxHash, // transaction hash on the hub chain
5802
+ * spokeTxHash, // transaction hash on the spoke chain (i.e. the transaction that was relayed to the spoke)
5803
+ * ] = result.value;
5804
+ * console.log('Revert migration transaction hashes:', { hubTxHash, spokeTxHash });
5805
+ */
5806
+ createAndSubmitRevertMigrationIntent(params: IcxCreateRevertMigrationParams, spokeProvider: SonicSpokeProvider, timeout?: number): Promise<Result<[
5807
+ Hex$1,
5808
+ Hex$1
5809
+ ], MigrationError<'REVERT_MIGRATION_FAILED'> | MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'> | RelayError>>;
5810
+ /**
5811
+ * Migrates ICX or wICX tokens from ICON to the hub chain.
5812
+ * This function handles the migration of ICX or wICX tokens to SODA tokens on the hub chain.
5813
+ * Note: This function does not relay the transaction to the spoke chain.
5814
+ * You should call the `isAllowanceValid` function before calling this function to check if the allowance is valid.
5815
+ * You should call the `relayTxAndWaitPacket` function after calling this function to relay the transaction to the spoke chain.
5816
+ *
5817
+ * @param {MigrationParams} params - The parameters for the migration transaction.
5818
+ * @param {IconSpokeProvider} spokeProvider - The spoke provider.
5819
+ * @param {boolean} raw - Whether to return the raw transaction hash instead of the transaction receipt
5820
+ * @returns {Promise<Result<TxReturnType<IconSpokeProvider, R>, MigrationError<'CREATE_MIGRATION_INTENT_FAILED'>>>} - Returns the raw transaction payload or transaction hash
5821
+ *
5822
+ * @example
5823
+ * const result = await migrationService.createMigrateIntent(
5824
+ * {
5825
+ * icx: 'cx...', // Address of the ICX or wICX token to migrate
5826
+ * amount: 1000n, // Amount to migrate (in ICX decimals, usually 18)
5827
+ * to: '0x...', // Address to receive the migrated SODA tokens
5828
+ * },
5829
+ * spokeProvider, // IconSpokeProvider instance
5830
+ * true // Optional raw flag to return the raw transaction hash instead of the transaction receipt
5831
+ * );
5832
+ *
5833
+ * if (!result.ok) {
5834
+ * // Handle error
5835
+ * }
5836
+ */
5837
+ createMigrateIntent<R extends boolean = false>(params: MigrationParams, spokeProvider: IconSpokeProvider, raw?: boolean): Promise<Result<TxReturnType<IconSpokeProvider, R>, MigrationError<'CREATE_MIGRATION_INTENT_FAILED'>>>;
5838
+ /**
5839
+ * Creates a revert migration intent transaction on the hub chain.
5840
+ * Note: This function does not relay the transaction to the spoke chain.
5841
+ * You should call the `isAllowanceValid` function before calling this function to check if the allowance is valid.
5842
+ * You should call the `relayTxAndWaitPacket` function after calling this function to relay the transaction to the spoke chain.
5843
+ * @param {IcxCreateRevertMigrationParams} - The parameters for the revert migration transaction.
5844
+ * @param {SonicSpokeProvider} spokeProvider - The spoke provider.
5845
+ * @param {boolean} raw - Whether to return the raw transaction hash instead of the transaction receipt
5846
+ * @returns {Promise<Result<TxReturnType<SonicSpokeProvider, R>, MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'>>>} - Returns the transaction hash or error
5847
+ *
5848
+ * @example
5849
+ * const result = await migrationService.createRevertMigrationIntent(
5850
+ * {
5851
+ * amount: 1000n, // Amount of SODA tokens to revert
5852
+ * to: 'hx...', // Icon Address to receive the reverted SODA tokens as ICX
5853
+ * action: 'revert',
5854
+ * },
5855
+ */
5856
+ createRevertMigrationIntent<R extends boolean = false>(params: IcxCreateRevertMigrationParams, spokeProvider: SonicSpokeProvider, raw?: R): Promise<Result<TxReturnType<SonicSpokeProvider, R>, MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'>>>;
5857
+ }
5858
+
5604
5859
  type CWSpokeDepositParams = {
5605
5860
  from: string;
5606
5861
  to?: HubAddress;
@@ -5742,6 +5997,8 @@ type EvmHubChainConfig = BaseHubChainConfig<'EVM'> & {
5742
5997
  assetManager: Address$1;
5743
5998
  hubWallet: Address$1;
5744
5999
  xTokenManager: Address$1;
6000
+ icxMigration: Address$1;
6001
+ sodaToken: Address$1;
5745
6002
  };
5746
6003
  nativeToken: Address$1;
5747
6004
  };
@@ -5757,6 +6014,7 @@ type MoneyMarketConfig = {
5757
6014
  };
5758
6015
  type MoneyMarketServiceConfig = Prettify<MoneyMarketConfig & PartnerFeeConfig & RelayerApiConfig>;
5759
6016
  type SolverServiceConfig = Prettify<SolverConfig & PartnerFeeConfig & RelayerApiConfig>;
6017
+ type MigrationServiceConfig = Prettify<RelayerApiConfig>;
5760
6018
  type MoneyMarketConfigParams = Prettify<MoneyMarketConfig & Optional<PartnerFeeConfig, 'partnerFee'>> | Optional<PartnerFeeConfig, 'partnerFee'>;
5761
6019
  type Default = {
5762
6020
  default: boolean;
@@ -5817,6 +6075,7 @@ type IconSpokeChainConfig = BaseSpokeChainConfig<'ICON'> & {
5817
6075
  assetManager: IconAddress;
5818
6076
  connection: IconAddress;
5819
6077
  rateLimit: IconAddress;
6078
+ wICX: `cx${string}`;
5820
6079
  };
5821
6080
  nid: Hex$1;
5822
6081
  };
@@ -5900,6 +6159,7 @@ type FeeAmount = {
5900
6159
  };
5901
6160
  type EvmTxReturnType<T extends boolean> = T extends true ? TransactionReceipt : Hex$1;
5902
6161
  type IconAddress = `hx${string}` | `cx${string}`;
6162
+ type IcxTokenType = (typeof spokeChainConfig)[typeof ICON_MAINNET_CHAIN_ID]['addresses']['wICX'] | (typeof spokeChainConfig)[typeof ICON_MAINNET_CHAIN_ID]['nativeToken'];
5903
6163
  type Result<T, E = Error | unknown> = {
5904
6164
  ok: true;
5905
6165
  value: T;
@@ -6122,6 +6382,7 @@ declare function requestJsonRpc(rawTransaction: unknown, id?: number): Promise<R
6122
6382
  type SodaxConfig = {
6123
6383
  solver?: SolverConfigParams;
6124
6384
  moneyMarket?: MoneyMarketConfigParams;
6385
+ migration?: MigrationServiceConfig;
6125
6386
  hubProviderConfig?: EvmHubProviderConfig;
6126
6387
  relayerApiEndpoint?: HttpUrl;
6127
6388
  };
@@ -6134,6 +6395,7 @@ declare class Sodax {
6134
6395
  readonly config?: SodaxConfig;
6135
6396
  readonly solver: SolverService;
6136
6397
  readonly moneyMarket: MoneyMarketService;
6398
+ readonly migration: MigrationService;
6137
6399
  private readonly hubProvider;
6138
6400
  private readonly relayerApiEndpoint;
6139
6401
  constructor(config?: SodaxConfig);
@@ -6717,6 +6979,7 @@ declare const spokeChainConfig: {
6717
6979
  readonly assetManager: "cx1be33c283c7dc7617181d1b21a6a2309e71b1ee7";
6718
6980
  readonly connection: "cxe5cdf3b0f26967b0efc72d470d57bbf534268f94";
6719
6981
  readonly rateLimit: "cxbbdcea9e6757023a046067ba8daa3c4c50304358";
6982
+ readonly wICX: "cx3975b43d260fb8ec802cef6e60c2f4d07486f11d";
6720
6983
  };
6721
6984
  readonly chain: {
6722
6985
  readonly id: "0x1.icon";
@@ -6812,4 +7075,4 @@ declare function isSuiSpokeProvider(value: SpokeProvider): value is SuiSpokeProv
6812
7075
  declare function isConfiguredSolverConfig(value: SolverConfigParams): value is Prettify<SolverConfig & Optional<PartnerFeeConfig, 'partnerFee'>>;
6813
7076
  declare function isConfiguredMoneyMarketConfig(value: MoneyMarketConfigParams): value is Prettify<MoneyMarketConfig & Optional<PartnerFeeConfig, 'partnerFee'>>;
6814
7077
 
6815
- export { type AggregatedReserveData, type AssetInfo, type BaseCurrencyInfo, type BaseHubChainConfig, type BaseSpokeChainConfig, type BaseSpokeChainInfo, BigIntToHex, type BorrowInfo, type CWReturnType, CWSpokeProvider, type CosmosSpokeChainConfig, type CreateIntentParams, type CustomProvider, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, EVM_CHAIN_IDS, EVM_SPOKE_CHAIN_IDS, Erc20Service, EvmAssetManagerService, type EvmChainId, type EvmContractCall, type EvmDepositToDataParams, 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 GetAddressType, type GetPacketParams, type GetPacketResponse, type GetRawTxReturnType, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeChainIdType, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HttpPrefixedUrl, type HttpUrl, type HubAssetInfo, type HubChainConfig, type HubChainInfo, type HubVaultSymbol, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, INTENT_RELAY_CHAIN_IDS, type ISpokeProvider, type IWalletProvider, type IconAddress, type IconJsonRpcVersion, type IconRawTransaction, type IconReturnType, type IconSpokeChainConfig, IconSpokeProvider, type IcxRawTransaction, type Intent, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, IntentErrorCode, type IntentErrorResponse, type IntentExecutionRequest, type IntentExecutionResponse, type IntentQuoteRequest, type IntentQuoteResponse, type IntentQuoteResponseRaw, type IntentRelayChainId, type IntentRelayRequest, type IntentRelayRequestParams, type IntentState, IntentStatusCode, type IntentStatusRequest, type IntentStatusResponse, type IntentSubmitError, type IntentSubmitErrorCode, type IntentSubmitErrorData, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, MAX_UINT256, type MoneyMarketAction, type MoneyMarketBorrowParams, type MoneyMarketConfig, type MoneyMarketConfigParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketSupplyParams, type MoneyMarketWithdrawParams, type Optional, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeConfig, type PartnerFeePercentage, type Prettify, type PromiseCWTxReturnType, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, type QuoteType, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type ReserveDataLegacy, type ResponseAddressType, type ResponseSigningType, type Result, Sodax, type SodaxConfig, type SolanaChainConfig, type SolanaRawTransaction, type SolanaReturnType, SolanaSpokeProvider, type SolverConfig, type SolverConfigParams, SolverService, type SolverServiceConfig, type SonicSpokeChainConfig, type SonicSpokeDepositParams, SonicSpokeProvider, SonicSpokeService, type SpokeChainConfig, type SpokeChainInfo, type SpokeDepositParams, type SpokeProvider, SpokeService, type SpokeTokenSymbols, type StellarReturnType, type StellarSpokeChainConfig, StellarSpokeProvider, type SubmitTxParams, type SubmitTxResponse, type SuiRawTransaction, type SuiReturnType, type SuiSpokeChainConfig, SuiSpokeProvider, type TokenInfo, type TxReturnType, type UserReserveData, VAULT_TOKEN_DECIMALS, type VaultReserves, type VaultType, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WithdrawInfo, assetManagerAbi, calculateFeeAmount, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, encodeAddress, encodeContractCalls, erc20Abi, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getIconAddressBytes, getIntentRelayChainId, getMoneyMarketConfig, getOriginalAssetAddress, getPacket, getRandomBytes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hubAssetToOriginalAssetMap, hubAssets, hubVaults, hubVaultsAddressSet, intentRelayChainIdToSpokeChainIdMap, isCWSpokeProvider, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIntentRelayChainId, isJsonRpcPayloadResponse, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSupportedToken, isNativeToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, originalAssetTohubAssetMap, poolAbi, randomUint256, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, submitTransaction, supportedHubAssets, supportedHubChains, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, variableDebtTokenAbi, vaultTokenAbi, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
7078
+ export { type AggregatedReserveData, type AssetInfo, type BaseCurrencyInfo, type BaseHubChainConfig, type BaseSpokeChainConfig, type BaseSpokeChainInfo, BigIntToHex, type BorrowInfo, type CWReturnType, CWSpokeProvider, type CosmosSpokeChainConfig, type CreateIntentParams, type CustomProvider, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, EVM_CHAIN_IDS, EVM_SPOKE_CHAIN_IDS, Erc20Service, EvmAssetManagerService, type EvmChainId, type EvmContractCall, type EvmDepositToDataParams, 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 GetAddressType, type GetMigrateParams, type GetMigrationFailedPayload, type GetPacketParams, type GetPacketResponse, type GetRawTxReturnType, type GetRelayRequestParamType, type GetRelayResponse, type GetRevertMigrationParams, type GetSpokeChainIdType, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HttpPrefixedUrl, type HttpUrl, type HubAssetInfo, type HubChainConfig, type HubChainInfo, type HubVaultSymbol, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, INTENT_RELAY_CHAIN_IDS, type ISpokeProvider, type IWalletProvider, type IconAddress, type IconJsonRpcVersion, type IconRawTransaction, type IconReturnType, type IconSpokeChainConfig, IconSpokeProvider, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type Intent, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, IntentErrorCode, type IntentErrorResponse, type IntentExecutionRequest, type IntentExecutionResponse, type IntentQuoteRequest, type IntentQuoteResponse, type IntentQuoteResponseRaw, type IntentRelayChainId, type IntentRelayRequest, type IntentRelayRequestParams, type IntentState, IntentStatusCode, type IntentStatusRequest, type IntentStatusResponse, type IntentSubmitError, type IntentSubmitErrorCode, type IntentSubmitErrorData, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, MigrationService, type MigrationServiceConfig, type MigrationTokens, type MoneyMarketAction, type MoneyMarketBorrowParams, type MoneyMarketConfig, type MoneyMarketConfigParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketSupplyParams, type MoneyMarketWithdrawParams, type Optional, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeConfig, type PartnerFeePercentage, type Prettify, type PromiseCWTxReturnType, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, type QuoteType, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type ReserveDataLegacy, type ResponseAddressType, type ResponseSigningType, type Result, Sodax, type SodaxConfig, type SolanaChainConfig, type SolanaRawTransaction, type SolanaReturnType, SolanaSpokeProvider, type SolverConfig, type SolverConfigParams, SolverService, type SolverServiceConfig, type SonicSpokeChainConfig, type SonicSpokeDepositParams, SonicSpokeProvider, SonicSpokeService, type SpokeChainConfig, type SpokeChainInfo, type SpokeDepositParams, type SpokeProvider, SpokeService, type SpokeTokenSymbols, type StellarReturnType, type StellarSpokeChainConfig, StellarSpokeProvider, type SubmitTxParams, type SubmitTxResponse, type SuiRawTransaction, type SuiReturnType, type SuiSpokeChainConfig, SuiSpokeProvider, type TokenInfo, type TxReturnType, type UserReserveData, VAULT_TOKEN_DECIMALS, type VaultReserves, type VaultType, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WithdrawInfo, assetManagerAbi, calculateFeeAmount, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, encodeAddress, encodeContractCalls, erc20Abi, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getIconAddressBytes, getIntentRelayChainId, getMoneyMarketConfig, getOriginalAssetAddress, getPacket, getRandomBytes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hubAssetToOriginalAssetMap, hubAssets, hubVaults, hubVaultsAddressSet, intentRelayChainIdToSpokeChainIdMap, isCWSpokeProvider, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIntentRelayChainId, isJsonRpcPayloadResponse, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSupportedToken, isNativeToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, originalAssetTohubAssetMap, poolAbi, randomUint256, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, submitTransaction, supportedHubAssets, supportedHubChains, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, variableDebtTokenAbi, vaultTokenAbi, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };