@sodax/sdk 2.2.0 → 2.3.0-rc.2

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,9 +1,9 @@
1
- import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, ILeverageYieldApiV2, GetLeverageVaultsResponseV2, GetLeverageVaultResponseV2, VaultQueryV2, VaultAssetResponseV2, LeverageYieldPositionV2, LeverageYieldAprV2, LeverageYieldEffectiveAprV2, LeverageYieldLsdAprV2, VaultTotalAssetsResponseV2, VaultAssetsQueryV2, PreviewDepositResponseV2, PreviewWithdrawResponseV2, VaultSharesQueryV2, PreviewRedeemResponseV2, VaultOwnerQueryV2, ShareBalanceResponseV2, MaxWithdrawResponseV2, LeverageYieldDepositQuoteRequestV2, LeverageYieldWithdrawQuoteRequestV2, CreateDepositIntentParamsV2, CreateWithdrawIntentParamsV2, LeverageYieldSubmitTxRequestV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeSubmitTxStatusDataV2, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, LeveragePosition, LeveragePositionAccount, LeveragePositionCollateral, LeveragePositionPendingState, EvmRawTransaction, SponsoringApiErrorCode } from '@sodax/types';
1
+ import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, ILeverageYieldApiV2, GetLeverageVaultsResponseV2, GetLeverageVaultResponseV2, VaultQueryV2, VaultAssetResponseV2, LeverageYieldPositionV2, LeverageYieldAprV2, LeverageYieldEffectiveAprV2, LeverageYieldLsdAprV2, VaultTotalAssetsResponseV2, VaultAssetsQueryV2, PreviewDepositResponseV2, PreviewWithdrawResponseV2, VaultSharesQueryV2, PreviewRedeemResponseV2, VaultOwnerQueryV2, ShareBalanceResponseV2, MaxWithdrawResponseV2, LeverageYieldDepositQuoteRequestV2, LeverageYieldWithdrawQuoteRequestV2, CreateDepositIntentParamsV2, CreateWithdrawIntentParamsV2, LeverageYieldSubmitTxRequestV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, Hash, IWalletProvider, EvmSpokeOnlyChainKey, EvmRawTransaction, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeSubmitTxStatusDataV2, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, LeveragePosition, LeveragePositionAccount, LeveragePositionCollateral, LeveragePositionPendingState, SponsoringApiErrorCode } from '@sodax/types';
2
2
  export * from '@sodax/types';
3
3
  export { SodaxFeature } from '@sodax/types';
4
4
  import * as v from 'valibot';
5
5
  import * as viem from 'viem';
6
- import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, Hash, HttpTransport, GetLogsReturnType } from 'viem';
6
+ import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, Hash as Hash$1, HttpTransport, GetLogsReturnType } from 'viem';
7
7
  import { StacksNetwork, ClarityValue } from '@sodax/libs/stacks/core';
8
8
  import { networks, Psbt } from 'bitcoinjs-lib';
9
9
  import { JsonRpcProvider } from 'near-api-js';
@@ -254,6 +254,8 @@ type MapRelayFailureCtx = {
254
254
  action?: string;
255
255
  srcChainKey?: string;
256
256
  dstChainKey?: string;
257
+ /** The broadcast source tx, so a caller can keep reading status after a post-broadcast failure. */
258
+ srcTxHash?: string;
257
259
  /**
258
260
  * Phase override. Defaults to `'relay'`. Set to `'destinationExecution'` for migration's
259
261
  * secondary `waitUntilIntentExecuted` watcher (`migratebnUSD`) where the failure is
@@ -354,6 +356,8 @@ declare function executionFailed(feature: SodaxFeature, cause: unknown, context?
354
356
  declare function approveFailed(feature: SodaxFeature, cause: unknown, context?: Ctx): SodaxError<'USER_REJECTED' | 'APPROVE_FAILED'>;
355
357
  /** `ALLOWANCE_CHECK_FAILED` — reading on-chain allowance failed. */
356
358
  declare function allowanceCheckFailed(feature: SodaxFeature, cause: unknown, context?: Ctx): SodaxError<'ALLOWANCE_CHECK_FAILED'>;
359
+ /** Re-issues `error` with `context` merged over its own; code, message, feature and cause are kept. */
360
+ declare function withErrorContext<C extends SodaxErrorCode>(error: SodaxError<C>, context: Ctx): SodaxError<C>;
357
361
  /** `GAS_ESTIMATION_FAILED` — gas estimation call failed. */
358
362
  declare function gasEstimationFailed(feature: SodaxFeature, cause: unknown, context?: Ctx): SodaxError<'GAS_ESTIMATION_FAILED'>;
359
363
  /** `UNKNOWN` — last-resort outer catch when no narrower code applies. */
@@ -9137,6 +9141,127 @@ declare function getEvmViemChain(key: EvmChainKey): Chain;
9137
9141
  */
9138
9142
  declare function deepMerge<T extends Record<string, unknown>>(target: T, source: DeepPartial<T>): T;
9139
9143
 
9144
+ /**
9145
+ * How an approve-then-deposit flow gets the source token approved:
9146
+ * - `'not-required'` — allowance already sufficient (or none needed, e.g. a native token): one transaction.
9147
+ * - `'atomic-batch'` — approve and the deposit go out as one EIP-5792 batch: one signature.
9148
+ * - `'sequential'` — approve first, wait for it to confirm, then the deposit: two signatures, or
9149
+ * three when the token must reset a stale allowance first.
9150
+ */
9151
+ type ApprovalStrategy = 'not-required' | 'atomic-batch' | 'sequential';
9152
+ /**
9153
+ * What swap's and leverage yield's `getApprovalStrategy` return when the allowance read fails. Bridge's
9154
+ * returns `isAllowanceValid`'s own error, so invalid params stay `VALIDATION_FAILED` there.
9155
+ */
9156
+ type ApprovalStrategyErrorCode = Extract<SodaxErrorCode, 'ALLOWANCE_CHECK_FAILED'>;
9157
+ type ApprovalStrategyError = SodaxError<ApprovalStrategyErrorCode>;
9158
+ /**
9159
+ * `context.reason` of the `INTENT_CREATION_FAILED` returned when the wallet refused the batch before
9160
+ * anything was signed (unsupported method, capability, chain or atomicity). Nothing was sent, so
9161
+ * approving separately and then sending the deposit cannot duplicate anything.
9162
+ */
9163
+ declare const ATOMIC_BATCH_REFUSED = "atomic-batch-refused";
9164
+ /**
9165
+ * `context.reason` of a batch the wallet accepted but that did not confirm as a deposit — not within
9166
+ * the timeout, or with a result that does not say whether it landed (`TX_VERIFICATION_FAILED`, with
9167
+ * `context.batchId`, plus `context.callCount` when known). It may have landed: do not retry it.
9168
+ */
9169
+ declare const ATOMIC_BATCH_UNCONFIRMED = "atomic-batch-unconfirmed";
9170
+ /**
9171
+ * `context.reason` of the `USER_REJECTED` returned when the user declined the account upgrade a
9172
+ * `'ready'` wallet asked for (EIP-5792 5750), as opposed to rejecting the batch itself. Retry with
9173
+ * `allowAccountUpgrade: false` to approve separately without upgrading.
9174
+ */
9175
+ declare const ACCOUNT_UPGRADE_DECLINED = "account-upgrade-declined";
9176
+ /** The account-upgrade choice every approve-then-deposit flow and its strategy read take. */
9177
+ type ApprovalOptions = {
9178
+ /**
9179
+ * Whether a wallet that must first upgrade the account to batch (EIP-5792 `'ready'`, e.g. a MetaMask
9180
+ * EOA becoming a smart account) may be asked to. `false` approves separately instead. Defaults to `true`.
9181
+ */
9182
+ allowAccountUpgrade?: boolean;
9183
+ };
9184
+ type ResolveApprovalStrategyParams = ApprovalOptions & {
9185
+ srcChainKey: SpokeChainKey;
9186
+ walletProvider: IWalletProvider;
9187
+ };
9188
+ /**
9189
+ * How to approve once the allowance is known to be short: `'atomic-batch'` for an EVM spoke source
9190
+ * whose wallet reports EIP-5792 atomic support on that chain, `'sequential'` otherwise. The Sonic hub
9191
+ * always gets `'sequential'`. Read-only; sends nothing.
9192
+ */
9193
+ declare function resolveApprovalStrategy({ srcChainKey, walletProvider, allowAccountUpgrade, }: ResolveApprovalStrategyParams): Promise<Exclude<ApprovalStrategy, 'not-required'>>;
9194
+ type ApprovalBatchErrorCode = 'USER_REJECTED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED';
9195
+ type SendApprovalBatchParams = {
9196
+ walletProvider: IEvmWalletProvider;
9197
+ srcChainKey: EvmSpokeOnlyChainKey;
9198
+ /** The approval leg(s) then the deposit, in broadcast order — the deposit must be the last call. */
9199
+ txs: readonly EvmRawTransaction[];
9200
+ /** How long to wait for the batch to confirm, in ms. */
9201
+ timeoutMs: number;
9202
+ /** The feature the returned errors belong to. */
9203
+ feature: SodaxFeature;
9204
+ /** Merged into every returned error's `context`. */
9205
+ context?: SodaxErrorContext;
9206
+ /**
9207
+ * Called with the batch id as soon as the wallet accepts the batch, before the wait. Persist it: if the
9208
+ * wait ends without a receipt, {@link confirmApprovalBatch} with that id is the only way back to the
9209
+ * deposit. A listener that throws is ignored.
9210
+ */
9211
+ onBatchSent?: (batchId: string) => void;
9212
+ };
9213
+ type ApprovalBatchResult = {
9214
+ /** The transaction that carries the deposit — what the relay and `submit-tx` take as the source tx. */
9215
+ txHash: Hash;
9216
+ batchId: string;
9217
+ };
9218
+ /**
9219
+ * Sends approve + deposit as one EIP-5792 atomic batch and waits for it, so the user signs once.
9220
+ *
9221
+ * - The wallet refuses the batch before signing (or cannot batch at all) → `INTENT_CREATION_FAILED`
9222
+ * with `context.reason:` {@link ATOMIC_BATCH_REFUSED}. Only this case may fall back to approving
9223
+ * separately.
9224
+ * - The user rejects the batch → `USER_REJECTED`; a declined account upgrade (5750) adds
9225
+ * `context.reason:` {@link ACCOUNT_UPGRADE_DECLINED}.
9226
+ * - Never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
9227
+ * `context.reason: 'atomic-batch-failed'`. Nothing was deposited.
9228
+ * - Anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
9229
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
9230
+ * have landed — never retry it, as a batch or as separate transactions.
9231
+ */
9232
+ declare function sendApprovalBatch({ walletProvider, srcChainKey, txs, timeoutMs, feature, context, onBatchSent, }: SendApprovalBatchParams): Promise<Result<ApprovalBatchResult, SodaxError<ApprovalBatchErrorCode>>>;
9233
+ type ConfirmApprovalBatchParams = {
9234
+ walletProvider: IEvmWalletProvider;
9235
+ /** The id `sendAtomicBatch` returned — what {@link SendApprovalBatchParams.onBatchSent} reported. */
9236
+ batchId: string;
9237
+ /**
9238
+ * How many calls the batch carried, deposit last. Without it, only a batch whose receipts all share one
9239
+ * transaction identifies the deposit.
9240
+ */
9241
+ callCount?: number;
9242
+ /** How long to wait for the batch to confirm, in ms. */
9243
+ timeoutMs: number;
9244
+ feature: SodaxFeature;
9245
+ context?: SodaxErrorContext;
9246
+ };
9247
+ /**
9248
+ * Waits for a batch the wallet already accepted and reads the deposit's transaction from it. This is
9249
+ * the second half of {@link sendApprovalBatch}, and how an app resumes a batch it reported as
9250
+ * unconfirmed (after a reload, say) instead of sending the deposit again.
9251
+ *
9252
+ * - Never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
9253
+ * `context.reason: 'atomic-batch-failed'`. Nothing was deposited.
9254
+ * - Anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
9255
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and any `callCount` given. It
9256
+ * may still land.
9257
+ */
9258
+ declare function confirmApprovalBatch({ walletProvider, batchId, callCount, timeoutMs, feature, context, }: ConfirmApprovalBatchParams): Promise<Result<ApprovalBatchResult, SodaxError<ApprovalBatchErrorCode>>>;
9259
+ /**
9260
+ * Whether `error` is a batch the wallet refused before anything was signed or sent — the one batch
9261
+ * failure after which approving separately cannot duplicate anything.
9262
+ */
9263
+ declare function isAtomicBatchRefusal(error: unknown): boolean;
9264
+
9140
9265
  type Erc20ApproveParams<Raw extends boolean> = {
9141
9266
  token: Address$1;
9142
9267
  amount: bigint;
@@ -9820,7 +9945,7 @@ declare class EvmVaultTokenService {
9820
9945
  * @param walletProvider - IEvmWalletProvider
9821
9946
  * @returns Transaction hash
9822
9947
  */
9823
- static deposit(vault: Address$1, token: Address$1, amount: bigint, walletProvider: IEvmWalletProvider): Promise<Hash>;
9948
+ static deposit(vault: Address$1, token: Address$1, amount: bigint, walletProvider: IEvmWalletProvider): Promise<Hash$1>;
9824
9949
  /**
9825
9950
  * Withdraws a specified amount of a token from the vault.
9826
9951
  * @param vault - The address of the vault.
@@ -9829,7 +9954,7 @@ declare class EvmVaultTokenService {
9829
9954
  * @param provider - EvmWalletProvider
9830
9955
  * @returns Transaction hash
9831
9956
  */
9832
- static withdraw(vault: Address$1, token: Address$1, amount: bigint, provider: IEvmWalletProvider): Promise<Hash>;
9957
+ static withdraw(vault: Address$1, token: Address$1, amount: bigint, provider: IEvmWalletProvider): Promise<Hash$1>;
9833
9958
  /**
9834
9959
  * Encodes the deposit transaction data for the vault.
9835
9960
  * @param vault - The address of the vault.
@@ -11206,9 +11331,9 @@ declare class SpokeService {
11206
11331
  * Sign and broadcast the approval plan for an ERC-20 on the hub or an EVM spoke.
11207
11332
  *
11208
11333
  * A token of the TetherToken lineage rejects an allowance change from one non-zero value to
11209
- * another, so a wallet holding a stale allowance needs `approve(0)` first. The transactions cannot
11210
- * be batched: each one is only valid once its predecessor has been mined. The hash of the last is
11211
- * returned, so the contract callers see is unchanged.
11334
+ * another, so a wallet holding a stale allowance needs `approve(0)` first. Sent as separate
11335
+ * transactions, each is only valid once its predecessor has been mined, so this waits between them
11336
+ * (an EIP-5792 atomic batch can carry both, in order). The hash of the last is returned.
11212
11337
  */
11213
11338
  private executeErc20ApprovalPlan;
11214
11339
  /**
@@ -11411,7 +11536,7 @@ type GetRelayResponse<T extends RelayAction> = T extends 'submit' ? SubmitTxResp
11411
11536
  type IntentRelayRequestParams = SubmitTxParams | GetTransactionPacketsParams | GetPacketParams;
11412
11537
  type RelayAndWaitParams = {
11413
11538
  srcTxHash: string;
11414
- data: RelayExtraData | OnDemandRelayData;
11539
+ data?: RelayExtraData | OnDemandRelayData;
11415
11540
  chainKey: SpokeChainKey;
11416
11541
  relayerApiEndpoint: HttpUrl;
11417
11542
  timeout: number | undefined;
@@ -13466,7 +13591,8 @@ declare function estimateSwapSpeedTier({ srcToken, dstToken }: SwapSpeedTierPara
13466
13591
  * opted out there is no record at all, and on the default path the client-side fallback leaves
13467
13592
  * behind whatever state the backend last reached. The relay packet is the second source, and
13468
13593
  * reading it is identical for every feature — so the read, its failure classification and the
13469
- * budget vocabulary live here rather than once per feature.
13594
+ * budget vocabulary live here rather than once per feature. So does reading the intent journal,
13595
+ * which settles a solver answer for every solver-backed feature.
13470
13596
  *
13471
13597
  * Deliberately NOT exported from `./index.js`: `DETAILED_STATUS_NOT_DELIVERED` is already public
13472
13598
  * through the swap barrel, and the SDK's root barrel re-exports both with a flat `export *`, so a
@@ -13508,11 +13634,23 @@ type DetailedSwapStatus = {
13508
13634
  dstTxHash: Hex;
13509
13635
  data: SolverIntentStatusResponse;
13510
13636
  };
13637
+ /**
13638
+ * A {@link DetailedSwapStatus} collapsed to one vocabulary, whichever source answered. `hubTxHash` is
13639
+ * the hub intent tx; `fillTxHash` may be absent even when solved (the backend can confirm a fill
13640
+ * from the on-chain journal without one).
13641
+ */
13642
+ type SwapStatusSummary = {
13643
+ state: 'pending' | 'solved' | 'failed';
13644
+ hubTxHash?: Hex;
13645
+ fillTxHash?: Hex;
13646
+ };
13647
+ /** Collapses a {@link DetailedSwapStatus} so callers need not switch on `source`. Pure. */
13648
+ declare function summarizeSwapStatus(status: DetailedSwapStatus): SwapStatusSummary;
13511
13649
 
13512
13650
  /** Swap-module narrow error types. */
13513
13651
 
13514
13652
  declare const swapInvariant: FeatureInvariant;
13515
- type SwapAction = 'swap' | 'createLimitOrder';
13653
+ type SwapAction = 'swap' | 'swapWithApproval' | 'createLimitOrder';
13516
13654
  type SwapCreateIntentErrorCode = CreateIntentErrorCode;
13517
13655
  /**
13518
13656
  * Codes returnable by `postExecution`.
@@ -13525,16 +13663,20 @@ type PostExecutionErrorCode = Extract<SodaxErrorCode, 'EXECUTION_FAILED' | 'EXTE
13525
13663
  /** The only code `getDetailedStatus` returns: no status source could produce a usable answer. */
13526
13664
  type DetailedStatusErrorCode = Extract<SodaxErrorCode, 'LOOKUP_FAILED'>;
13527
13665
  type SwapErrorCode = Extract<SodaxErrorCode, 'USER_REJECTED' | 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
13666
+ /** Codes returnable by `swapWithApproval`: every `swap` code plus the approval leg's. */
13667
+ type SwapWithApprovalErrorCode = SwapErrorCode | Extract<SodaxErrorCode, 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED'>;
13528
13668
  type SwapCreateIntentError = SodaxError<SwapCreateIntentErrorCode>;
13529
13669
  type PostExecutionError = SodaxError<PostExecutionErrorCode>;
13530
13670
  type SwapError = SodaxError<SwapErrorCode>;
13531
13671
  type DetailedStatusError = SodaxError<DetailedStatusErrorCode>;
13672
+ type SwapWithApprovalError = SodaxError<SwapWithApprovalErrorCode>;
13532
13673
  declare const isSwapCreateIntentError: (e: unknown) => e is SodaxError<CreateIntentErrorCode>;
13533
13674
  declare const isPostExecutionError: (e: unknown) => e is SodaxError<PostExecutionErrorCode>;
13534
13675
  declare const isSwapError: (e: unknown) => e is SodaxError<SwapErrorCode>;
13676
+ declare const isSwapWithApprovalError: (e: unknown) => e is SodaxError<SwapWithApprovalErrorCode>;
13535
13677
 
13536
13678
  type GetIntentSubmitTxExtraDataParams = {
13537
- txHash: Hash$1;
13679
+ txHash: Hash;
13538
13680
  } | {
13539
13681
  intent: Intent;
13540
13682
  };
@@ -13543,6 +13685,25 @@ type SwapResponse = {
13543
13685
  intent: Intent;
13544
13686
  intentDeliveryInfo: IntentDeliveryInfo;
13545
13687
  };
13688
+ /** How {@link SwapService.swapWithApproval} gets the source token approved — see {@link ApprovalStrategy}. */
13689
+ type SwapApprovalStrategy = ApprovalStrategy;
13690
+ type SwapWithApprovalResponse = SwapResponse & {
13691
+ approvalStrategy: SwapApprovalStrategy;
13692
+ };
13693
+ /** Params for `swapWithApproval` / `getApprovalStrategy`: `swap()`'s, plus the account-upgrade choice. */
13694
+ type SwapWithApprovalParams<K extends SpokeChainKey> = SwapActionParams<K, false> & ApprovalOptions & {
13695
+ /**
13696
+ * `swapWithApproval` only: the `context.batchId` of an {@link ATOMIC_BATCH_UNCONFIRMED} error from an
13697
+ * earlier call with the same `params` and wallet. Waits for that batch again instead of sending
13698
+ * anything and, once its deposit confirms, completes the swap through the client-side relay.
13699
+ */
13700
+ resumeBatchId?: string;
13701
+ /**
13702
+ * With `resumeBatchId`: that error's `context.callCount`. Without it, a batch the wallet confirmed as one
13703
+ * transaction per call cannot be matched to its deposit and stays unconfirmed.
13704
+ */
13705
+ resumeBatchCallCount?: number;
13706
+ };
13546
13707
  type CreateIntentResult<K extends SpokeChainKey, Raw extends boolean> = {
13547
13708
  tx: TxReturnType<K, Raw>;
13548
13709
  intent: Intent & FeeAmount;
@@ -13578,6 +13739,11 @@ type SwapServiceConstructorParams = {
13578
13739
  spoke: SpokeService;
13579
13740
  hubProvider: HubProvider;
13580
13741
  backendApi: BackendApiService;
13742
+ /**
13743
+ * @deprecated Configure through `new Sodax({ swaps: { useBackendSubmitTx } })` ({@link SwapsOptions});
13744
+ * removed in v3. Still honored: when set, it wins over the configured value.
13745
+ */
13746
+ useBackendSubmitTx?: boolean;
13581
13747
  };
13582
13748
  /**
13583
13749
  * Main entry point for the SODAX swap feature.
@@ -13602,10 +13768,11 @@ declare class SwapService {
13602
13768
  readonly solver: SolverConfig;
13603
13769
  readonly relayerApiEndpoint: HttpUrl;
13604
13770
  readonly backendApi: BackendApiService;
13771
+ private readonly useBackendSubmitTxOverride;
13605
13772
  /**
13606
13773
  * Effective 2-step submit-tx flow (`swaps.useBackendSubmitTx`, default on). Read live off
13607
13774
  * `ConfigService`, like {@link SwapService.partnerFee}, so the config object and the behavior can
13608
- * never disagree.
13775
+ * never disagree — unless a direct constructor caller passed the deprecated override.
13609
13776
  */
13610
13777
  get useBackendSubmitTx(): boolean;
13611
13778
  /**
@@ -13615,7 +13782,7 @@ declare class SwapService {
13615
13782
  * `BridgeService` and `LeverageYieldService` resolve their fees the same way.
13616
13783
  */
13617
13784
  get partnerFee(): PartnerFee | undefined;
13618
- constructor({ config, hubProvider, spoke, backendApi }: SwapServiceConstructorParams);
13785
+ constructor({ config, hubProvider, spoke, backendApi, useBackendSubmitTx }: SwapServiceConstructorParams);
13619
13786
  /**
13620
13787
  * Estimates the gas cost for a raw (unsigned) transaction on a spoke chain.
13621
13788
  *
@@ -13683,16 +13850,25 @@ declare class SwapService {
13683
13850
  * polled and passes {@link DETAILED_STATUS_SOLVER_TIMEOUT_MS}. Both go through here so the
13684
13851
  * durable-intent reconcile below is written once.
13685
13852
  *
13686
- * `timeoutMs` bounds the solver request alone. The reconcile that a failed or NOT_FOUND solver read
13687
- * falls through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
13853
+ * `timeoutMs` bounds the solver request alone. The reconcile that a non-final solver read falls
13854
+ * through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
13855
+ *
13856
+ * `reconcileNonFinal` is for `getDetailedStatus` alone: it reconciles an in-flight answer as well as
13857
+ * a `NOT_FOUND`, and reads a journal cancel as `FAILED`. The solver can keep reporting a cancelled
13858
+ * intent in flight, and nothing else ends that poll. `getStatus` leaves it off and keeps its answers.
13688
13859
  */
13689
13860
  private resolveSolverStatus;
13690
13861
  /**
13691
13862
  * Reads a swap's status from its source-chain transaction — the identifier a caller always holds.
13692
13863
  *
13693
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
13694
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
13695
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
13864
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
13865
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
13866
+ * is tagged with `source` (discriminate on it).
13867
+ *
13868
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
13869
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
13870
+ * intent in flight. A cancelled intent is already refunded, so do not offer to cancel it again.
13871
+ * Otherwise it carries the solver's answer unmodified, and the backend arm its record unmodified.
13696
13872
  *
13697
13873
  * **Any** unusable backend response routes to the solver — a 404, a transport or server error, or
13698
13874
  * a record the backend gave up on. See `docs/SWAPS.md` § Get Detailed Status for why.
@@ -13793,6 +13969,63 @@ declare class SwapService {
13793
13969
  * - `UNKNOWN` — uncategorized fallback.
13794
13970
  */
13795
13971
  swap<K extends SpokeChainKey>(_params: SwapActionParams<K, false>): Promise<Result<SwapResponse, SwapError>>;
13972
+ /**
13973
+ * Which approval path {@link swapWithApproval} would take for these params, so a UI can say up front
13974
+ * whether the swap costs one signature or two. Read-only; sends nothing.
13975
+ *
13976
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
13977
+ * that chain — `'supported'`, or `'ready'` (the wallet asks the user to upgrade the account on the
13978
+ * first batch; pass `allowAccountUpgrade: false` to treat such a wallet as unable to batch). The Sonic
13979
+ * hub, a Stellar source that needs a trustline, and wallets without batch support get `'sequential'`;
13980
+ * other non-EVM sources have no allowance and get `'not-required'`.
13981
+ *
13982
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
13983
+ */
13984
+ getApprovalStrategy<K extends SpokeChainKey>(_params: SwapWithApprovalParams<K>): Promise<Result<SwapApprovalStrategy, ApprovalStrategyError>>;
13985
+ /**
13986
+ * {@link swap} with the source-token approval folded in. Picks a path with
13987
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
13988
+ * wallet, approve and the swap transaction as **one atomic batch — one signature**; otherwise
13989
+ * approve, wait for it to confirm, then the swap transaction. Completion (backend submit-tx with
13990
+ * the client-side relay fallback) is exactly `swap()`'s.
13991
+ *
13992
+ * A wallet that refuses the batch before signing anything (e.g. EIP-5792 5760, atomicity not
13993
+ * supported) falls back to the two-step path. A batch the user saw is never retried as separate
13994
+ * transactions:
13995
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:`
13996
+ * {@link ACCOUNT_UPGRADE_DECLINED}, after which `allowAccountUpgrade: false` swaps without one;
13997
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
13998
+ * `context.reason: 'atomic-batch-failed'`;
13999
+ * - anything else short of a confirmed deposit receipt (not confirmed within `timeout`, a partial
14000
+ * revert, receipts that do not identify the deposit) → `TX_VERIFICATION_FAILED` with
14001
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
14002
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
14003
+ * finish it once it does.
14004
+ *
14005
+ * @returns A `Result<SwapWithApprovalResponse, SwapWithApprovalError>` — `swap()`'s response plus the
14006
+ * `approvalStrategy` that ran. Errors are `swap()`'s codes plus `APPROVE_FAILED` and
14007
+ * `ALLOWANCE_CHECK_FAILED`.
14008
+ */
14009
+ swapWithApproval<K extends SpokeChainKey>(_params: SwapWithApprovalParams<K>): Promise<Result<SwapWithApprovalResponse, SwapWithApprovalError>>;
14010
+ /**
14011
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
14012
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeSwap}.
14013
+ */
14014
+ private createIntentInAtomicBatch;
14015
+ /**
14016
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
14017
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
14018
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
14019
+ */
14020
+ private resumeAtomicBatch;
14021
+ /** Approve, wait for the approval to confirm, then create the intent — two or more signatures. */
14022
+ private approveThenCreateIntent;
14023
+ /**
14024
+ * Completes a swap whose intent tx is already broadcast: the backend 2-step attempt when
14025
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackSwapSteps} on any non-success.
14026
+ * Shared by `swap()` and `swapWithApproval()`, which differ only in how the intent tx is created.
14027
+ */
14028
+ private completeSwap;
13796
14029
  /**
13797
14030
  * Client-side swap completion (opt-out via `swaps.useBackendSubmitTx: false`): verify the broadcast intent
13798
14031
  * tx landed, then relay it to the hub — or use it directly when the source IS the hub — then notify the
@@ -14064,7 +14297,7 @@ declare class SwapService {
14064
14297
  * @param txHash - Transaction hash of the hub-chain (Sonic) intent creation transaction.
14065
14298
  * @returns A `Result` containing the `Intent` struct, or an error if the tx has no matching event.
14066
14299
  */
14067
- getIntent(txHash: Hash$1): Promise<Result<Intent>>;
14300
+ getIntent(txHash: Hash): Promise<Result<Intent>>;
14068
14301
  /**
14069
14302
  * Fetches the fill state of an intent from the hub chain by the solver's fill transaction hash.
14070
14303
  *
@@ -14074,7 +14307,7 @@ declare class SwapService {
14074
14307
  * @param txHash - Transaction hash of the hub-chain (Sonic) intent fill transaction.
14075
14308
  * @returns A `Result` containing `IntentState`: `{ exists, remainingInput, receivedOutput, pendingPayment }`.
14076
14309
  */
14077
- getFilledIntent(txHash: Hash$1): Promise<Result<IntentState>>;
14310
+ getFilledIntent(txHash: Hash): Promise<Result<IntentState>>;
14078
14311
  /**
14079
14312
  * Polls the relayer API until the solver's fill transaction has been delivered to the
14080
14313
  * destination spoke chain, then returns the relay packet data.
@@ -14872,7 +15105,7 @@ type DetailedBridgeStatus = {
14872
15105
  */
14873
15106
 
14874
15107
  declare const bridgeInvariant: FeatureInvariant;
14875
- type BridgeAction = 'bridge';
15108
+ type BridgeAction = 'bridge' | 'bridgeWithApproval';
14876
15109
  type BridgeOrchestrationErrorCode = Extract<SodaxErrorCode, 'USER_REJECTED' | 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'UNKNOWN'>;
14877
15110
  type BridgeCreateIntentErrorCode = CreateIntentErrorCode;
14878
15111
  type BridgeApproveErrorCode = ApproveErrorCode;
@@ -14884,7 +15117,10 @@ type BridgeLookupErrorCode = LookupErrorCode;
14884
15117
  */
14885
15118
  type BridgeDetailedStatusErrorCode = Extract<SodaxErrorCode, 'LOOKUP_FAILED'>;
14886
15119
  type BridgeErrorCode = Extract<SodaxErrorCode, 'USER_REJECTED' | 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED' | 'LOOKUP_FAILED' | 'UNKNOWN'>;
15120
+ /** Codes returnable by `bridgeWithApproval`: every `bridge` code plus the approval leg's. */
15121
+ type BridgeWithApprovalErrorCode = BridgeOrchestrationErrorCode | Extract<SodaxErrorCode, 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED'>;
14887
15122
  type BridgeOrchestrationError = SodaxError<BridgeOrchestrationErrorCode>;
15123
+ type BridgeWithApprovalError = SodaxError<BridgeWithApprovalErrorCode>;
14888
15124
  type BridgeCreateIntentError = SodaxError<BridgeCreateIntentErrorCode>;
14889
15125
  type BridgeApproveError = SodaxError<BridgeApproveErrorCode>;
14890
15126
  type BridgeAllowanceCheckError = SodaxError<BridgeAllowanceCheckErrorCode>;
@@ -14892,6 +15128,7 @@ type BridgeLookupError = SodaxError<BridgeLookupErrorCode>;
14892
15128
  type BridgeDetailedStatusError = SodaxError<BridgeDetailedStatusErrorCode>;
14893
15129
  type BridgeError = SodaxError<BridgeErrorCode>;
14894
15130
  declare const isBridgeOrchestrationError: (e: unknown) => e is SodaxError<BridgeOrchestrationErrorCode>;
15131
+ declare const isBridgeWithApprovalError: (e: unknown) => e is SodaxError<BridgeWithApprovalErrorCode>;
14895
15132
  declare const isBridgeCreateIntentError: (e: unknown) => e is SodaxError<CreateIntentErrorCode>;
14896
15133
  declare const isBridgeApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
14897
15134
  declare const isBridgeAllowanceCheckError: (e: unknown) => e is SodaxError<AllowanceCheckErrorCode>;
@@ -14939,6 +15176,23 @@ type BridgeExtras<K extends SpokeChainKey = SpokeChainKey> = (GetChainType<K> ex
14939
15176
  apiKey?: string;
14940
15177
  };
14941
15178
  type BridgeParams<ChainKey extends SpokeChainKey, Raw extends boolean> = SpokeExecActionParams<ChainKey, Raw, CreateBridgeIntentParams<ChainKey>, BridgeExtras<ChainKey>>;
15179
+ /** Params for `bridgeWithApproval` / `getApprovalStrategy`: `bridge()`'s, plus the account-upgrade choice. */
15180
+ type BridgeWithApprovalParams<K extends SpokeChainKey> = BridgeParams<K, false> & ApprovalOptions & {
15181
+ /**
15182
+ * `bridgeWithApproval` only: the `context.batchId` of an {@link ATOMIC_BATCH_UNCONFIRMED} error from an
15183
+ * earlier call with the same `params` and wallet. Waits for that batch again instead of sending
15184
+ * anything and, once its deposit confirms, completes the bridge through the client-side relay.
15185
+ */
15186
+ resumeBatchId?: string;
15187
+ /**
15188
+ * With `resumeBatchId`: that error's `context.callCount`. Without it, a batch the wallet confirmed as one
15189
+ * transaction per call cannot be matched to its deposit and stays unconfirmed.
15190
+ */
15191
+ resumeBatchCallCount?: number;
15192
+ };
15193
+ type BridgeWithApprovalResponse = TxHashPair & {
15194
+ approvalStrategy: ApprovalStrategy;
15195
+ };
14942
15196
  type BridgeServiceConstructorParams = {
14943
15197
  hubProvider: HubProvider;
14944
15198
  config: ConfigService;
@@ -15074,6 +15328,58 @@ declare class BridgeService {
15074
15328
  * }
15075
15329
  */
15076
15330
  bridge<K extends SpokeChainKey>(_params: BridgeParams<K, false>): Promise<Result<TxHashPair, BridgeOrchestrationError>>;
15331
+ /**
15332
+ * Which approval path {@link bridgeWithApproval} would take for these params, so a UI can say up
15333
+ * front whether the bridge costs one signature or two. Read-only; sends nothing.
15334
+ *
15335
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
15336
+ * that chain (`'supported'`, or `'ready'` unless `allowAccountUpgrade: false`). The Sonic hub,
15337
+ * Stellar and wallets without batch support get `'sequential'`; other non-EVM sources have no
15338
+ * allowance and get `'not-required'`.
15339
+ *
15340
+ * @returns `isAllowanceValid`'s error — `VALIDATION_FAILED` for invalid params, `ALLOWANCE_CHECK_FAILED`
15341
+ * when the read fails — or the strategy.
15342
+ */
15343
+ getApprovalStrategy<K extends SpokeChainKey>(_params: BridgeWithApprovalParams<K>): Promise<Result<ApprovalStrategy, BridgeAllowanceCheckError>>;
15344
+ /**
15345
+ * {@link bridge} with the source-token approval folded in. Picks a path with
15346
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
15347
+ * wallet, approve and the deposit as **one atomic batch — one signature**; otherwise approve, wait
15348
+ * for it to confirm, then the deposit. Completion is exactly `bridge()`'s.
15349
+ *
15350
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
15351
+ * the user saw is never retried as separate transactions:
15352
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
15353
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` bridges without one;
15354
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
15355
+ * `context.reason: 'atomic-batch-failed'`;
15356
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
15357
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
15358
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
15359
+ * finish it once it does.
15360
+ *
15361
+ * @returns `bridge()`'s `TxHashPair` plus the `approvalStrategy` that ran. Errors are `bridge()`'s
15362
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
15363
+ */
15364
+ bridgeWithApproval<K extends SpokeChainKey>(_params: BridgeWithApprovalParams<K>): Promise<Result<BridgeWithApprovalResponse, BridgeWithApprovalError>>;
15365
+ /**
15366
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
15367
+ * then hand back the batch's transaction hash as the deposit tx, for {@link completeBridge}.
15368
+ */
15369
+ private createBridgeIntentInAtomicBatch;
15370
+ /**
15371
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
15372
+ * the wallet: waits for it again, then relays its deposit client-side and waits for the settlement packet.
15373
+ */
15374
+ private resumeAtomicBatch;
15375
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
15376
+ private approveThenCreateBridgeIntent;
15377
+ /**
15378
+ * Completes a bridge whose deposit tx is already broadcast: the backend submit-tx attempt when
15379
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackBridgeSteps} on any non-success.
15380
+ * Shared by `bridge()` and `bridgeWithApproval()`, which differ only in how the deposit is sent.
15381
+ */
15382
+ private completeBridge;
15077
15383
  /**
15078
15384
  * Client-side bridge completion (opt-out via `bridge.useBackendSubmitTx: false`): verify the broadcast
15079
15385
  * spoke-deposit tx, then relay it to the hub and wait for the settlement packet. Extracted verbatim from
@@ -16210,7 +16516,7 @@ declare class ClService {
16210
16516
  * @returns `Result<ClMintPositionEventLog>` — on success, contains `{ tokenId }` (the NFT
16211
16517
  * token ID of the newly minted position).
16212
16518
  */
16213
- getMintPositionEvent(hubTxHash: Hash$1): Promise<Result<ClMintPositionEventLog>>;
16519
+ getMintPositionEvent(hubTxHash: Hash): Promise<Result<ClMintPositionEventLog>>;
16214
16520
  /**
16215
16521
  * Build and submit the spoke-side transaction that adds liquidity to an existing position.
16216
16522
  *
@@ -18375,7 +18681,7 @@ type DetailedLeverageYieldStatus = {
18375
18681
  */
18376
18682
 
18377
18683
  declare const leverageYieldInvariant: FeatureInvariant;
18378
- type LeverageYieldAction = 'deposit' | 'withdraw' | 'approve' | 'allowanceCheck' | 'vaultSwap' | 'openPosition' | 'openPositionFromDebtToken' | 'operatePosition' | 'openLeveragePosition' | 'submitLeveragePositionIntent' | 'runLeveragePositionOperation' | 'getPositionLegQuote';
18684
+ type LeverageYieldAction = 'deposit' | 'withdraw' | 'approve' | 'allowanceCheck' | 'vaultSwap' | 'vaultSwapWithApproval' | 'openPosition' | 'openPositionFromDebtToken' | 'operatePosition' | 'openLeveragePosition' | 'submitLeveragePositionIntent' | 'runLeveragePositionOperation' | 'getPositionLegQuote';
18379
18685
  type LeverageYieldCreateIntentErrorCode = CreateIntentErrorCode;
18380
18686
  type LeverageYieldApproveErrorCode = ApproveErrorCode;
18381
18687
  type LeverageYieldAllowanceCheckErrorCode = AllowanceCheckErrorCode;
@@ -18398,6 +18704,8 @@ type LeverageYieldPostExecutionErrorCode = Extract<SodaxErrorCode, 'EXECUTION_FA
18398
18704
  * plus verify, relay and solver-notify codes. Mirrors the swap domain's `SwapErrorCode`.
18399
18705
  */
18400
18706
  type LeverageYieldSwapErrorCode = Extract<SodaxErrorCode, 'USER_REJECTED' | 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
18707
+ /** Codes returnable by `vaultSwapWithApproval`: every `vaultSwap` code plus the approval leg's. */
18708
+ type VaultSwapWithApprovalErrorCode = LeverageYieldSwapErrorCode | Extract<SodaxErrorCode, 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED'>;
18401
18709
  type LeverageYieldErrorCode = Extract<SodaxErrorCode, 'USER_REJECTED' | 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED' | 'LOOKUP_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
18402
18710
  type LeverageYieldCreateIntentError = SodaxError<LeverageYieldCreateIntentErrorCode>;
18403
18711
  type LeverageYieldApproveError = SodaxError<LeverageYieldApproveErrorCode>;
@@ -18406,6 +18714,7 @@ type LeverageYieldLookupError = SodaxError<LeverageYieldLookupErrorCode>;
18406
18714
  type LeverageYieldDetailedStatusError = SodaxError<LeverageYieldDetailedStatusErrorCode>;
18407
18715
  type LeverageYieldPostExecutionError = SodaxError<LeverageYieldPostExecutionErrorCode>;
18408
18716
  type LeverageYieldSwapError = SodaxError<LeverageYieldSwapErrorCode>;
18717
+ type VaultSwapWithApprovalError = SodaxError<VaultSwapWithApprovalErrorCode>;
18409
18718
  type LeverageYieldError = SodaxError<LeverageYieldErrorCode>;
18410
18719
  declare const isLeverageYieldCreateIntentError: (e: unknown) => e is SodaxError<CreateIntentErrorCode>;
18411
18720
  declare const isLeverageYieldApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
@@ -18413,6 +18722,7 @@ declare const isLeverageYieldAllowanceCheckError: (e: unknown) => e is SodaxErro
18413
18722
  declare const isLeverageYieldLookupError: (e: unknown) => e is SodaxError<LookupErrorCode>;
18414
18723
  declare const isLeverageYieldPostExecutionError: (e: unknown) => e is SodaxError<LeverageYieldPostExecutionErrorCode>;
18415
18724
  declare const isLeverageYieldSwapError: (e: unknown) => e is SodaxError<LeverageYieldSwapErrorCode>;
18725
+ declare const isVaultSwapWithApprovalError: (e: unknown) => e is SodaxError<VaultSwapWithApprovalErrorCode>;
18416
18726
  declare const isLeverageYieldError: (e: unknown) => e is SodaxError<LeverageYieldErrorCode>;
18417
18727
 
18418
18728
  /**
@@ -18827,6 +19137,20 @@ type CreateVaultIntentResult<K extends SpokeChainKey, Raw extends boolean> = {
18827
19137
  intent: Intent & FeeAmount;
18828
19138
  relayData: RelayExtraData;
18829
19139
  };
19140
+ /** Params for `vaultSwapWithApproval` / `getApprovalStrategy`: `vaultSwap()`'s, plus the account-upgrade choice. */
19141
+ type VaultSwapWithApprovalParams<K extends SpokeChainKey> = VaultSwapActionParams<K, false> & ApprovalOptions & {
19142
+ /**
19143
+ * `vaultSwapWithApproval` only: the `context.batchId` of an {@link ATOMIC_BATCH_UNCONFIRMED} error from an
19144
+ * earlier call with the same `params` and wallet. Waits for that batch again instead of sending
19145
+ * anything and, once its deposit confirms, completes the vault swap through the client-side relay.
19146
+ */
19147
+ resumeBatchId?: string;
19148
+ /**
19149
+ * With `resumeBatchId`: that error's `context.callCount`. Without it, a batch the wallet confirmed as one
19150
+ * transaction per call cannot be matched to its deposit and stays unconfirmed.
19151
+ */
19152
+ resumeBatchCallCount?: number;
19153
+ };
18830
19154
  /**
18831
19155
  * Success value of {@link LeverageYieldService.vaultSwap}. Mirrors the swap domain's
18832
19156
  * `SwapResponse` — duplicated deliberately so the leverage-yield surface stands alone.
@@ -18836,6 +19160,9 @@ type VaultSwapResponse = {
18836
19160
  intent: Intent;
18837
19161
  intentDeliveryInfo: IntentDeliveryInfo;
18838
19162
  };
19163
+ type VaultSwapWithApprovalResponse = VaultSwapResponse & {
19164
+ approvalStrategy: ApprovalStrategy;
19165
+ };
18839
19166
  type LeverageYieldApproveParams<R extends boolean> = {
18840
19167
  vault: Address;
18841
19168
  /** Amount of the vault's underlying asset to approve. */
@@ -19017,6 +19344,68 @@ declare class LeverageYieldService {
19017
19344
  * `EXECUTION_FAILED`, `EXTERNAL_API_ERROR` or `UNKNOWN`.
19018
19345
  */
19019
19346
  vaultSwap<K extends SpokeChainKey>(_params: VaultSwapActionParams<K, false>): Promise<Result<VaultSwapResponse, LeverageYieldSwapError>>;
19347
+ /**
19348
+ * Which approval path {@link vaultSwapWithApproval} would take for a vault swap's source token, so a
19349
+ * UI can say up front whether a deposit costs one signature or two. Read-only; sends nothing. Not
19350
+ * the hub-side {@link approve} / {@link isAllowanceValid}, which cover depositing into a vault directly.
19351
+ *
19352
+ * A withdraw (`hubWalletSwap`) spends from the hub wallet and is always `'not-required'`. A deposit
19353
+ * approves the same spender a swap does. `'atomic-batch'` needs an EVM spoke source and a wallet
19354
+ * that reports EIP-5792 atomic support for that chain (`'supported'`, or `'ready'` unless
19355
+ * `allowAccountUpgrade: false`); the Sonic hub, Stellar and wallets without batch support get
19356
+ * `'sequential'`.
19357
+ *
19358
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
19359
+ */
19360
+ getApprovalStrategy<K extends SpokeChainKey>(_params: VaultSwapWithApprovalParams<K>): Promise<Result<ApprovalStrategy, ApprovalStrategyError>>;
19361
+ /**
19362
+ * {@link vaultSwap} with a deposit's source-token approval folded in. Picks a path with
19363
+ * {@link getApprovalStrategy}: none when the allowance already suffices (and never for a withdraw);
19364
+ * on an EIP-5792 wallet, approve and the deposit as **one atomic batch — one signature**; otherwise
19365
+ * approve, wait for it to confirm, then the deposit. Intent creation, the leverage-yield partner fee
19366
+ * and completion (backend submit-tx with its `operation`, then the client-side fallback) are exactly
19367
+ * `vaultSwap()`'s.
19368
+ *
19369
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
19370
+ * the user saw is never retried as separate transactions:
19371
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
19372
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` deposits without one;
19373
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
19374
+ * `context.reason: 'atomic-batch-failed'`;
19375
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
19376
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
19377
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
19378
+ * finish it once it does.
19379
+ *
19380
+ * @returns `vaultSwap()`'s response plus the `approvalStrategy` that ran. Errors are `vaultSwap()`'s
19381
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
19382
+ */
19383
+ vaultSwapWithApproval<K extends SpokeChainKey>(_params: VaultSwapWithApprovalParams<K>): Promise<Result<VaultSwapWithApprovalResponse, VaultSwapWithApprovalError>>;
19384
+ /**
19385
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
19386
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeVaultSwap}.
19387
+ */
19388
+ private createVaultIntentInAtomicBatch;
19389
+ /**
19390
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
19391
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
19392
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
19393
+ */
19394
+ private resumeAtomicBatch;
19395
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
19396
+ private approveThenCreateVaultIntent;
19397
+ /** Whether the deposit's source-token allowance already covers `inputAmount`. */
19398
+ private isDepositAllowanceValid;
19399
+ /** The deposit's unsigned approval leg(s) on an EVM spoke, for the atomic batch. */
19400
+ private buildDepositApproveTxs;
19401
+ /** Signs and sends the deposit's approval (hub, EVM spoke or Stellar); resolves at broadcast. */
19402
+ private approveDeposit;
19403
+ /**
19404
+ * Completes a vault swap whose intent tx is already broadcast: the backend submit-tx attempt when
19405
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackVaultSwapSteps} on any non-success.
19406
+ * Shared by `vaultSwap()` and `vaultSwapWithApproval()`, which differ only in how the intent tx is sent.
19407
+ */
19408
+ private completeVaultSwap;
19020
19409
  /**
19021
19410
  * Client-side vault-swap completion (the opt-out path, and the fallback): verify the broadcast
19022
19411
  * intent tx landed,
@@ -19103,6 +19492,9 @@ declare class LeverageYieldService {
19103
19492
  * unreadable backend into an error, which is right for a polled read that would otherwise spend a
19104
19493
  * budget on an unverified miss, and wrong to impose on a surface that already ships without it.
19105
19494
  *
19495
+ * Every non-final answer is reconciled, an in-flight one included, and a journal cancel reads
19496
+ * `FAILED`: the solver can keep reporting a cancelled intent in flight, and nothing else ends that poll.
19497
+ *
19106
19498
  * `timeoutMs` bounds the solver request alone. The reconcile carries its own
19107
19499
  * {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
19108
19500
  */
@@ -19111,9 +19503,14 @@ declare class LeverageYieldService {
19111
19503
  * Reads a vault swap's status from its source-chain transaction — the identifier a caller always
19112
19504
  * holds after `vaultSwap()`.
19113
19505
  *
19114
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
19115
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
19116
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
19506
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
19507
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
19508
+ * is tagged with `source` (discriminate on it).
19509
+ *
19510
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
19511
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
19512
+ * intent in flight. Otherwise it carries the solver's answer unmodified, and the backend arm its
19513
+ * record unmodified.
19117
19514
  *
19118
19515
  * `sodax.api.leverageYield.getSubmitTxStatus` cannot answer for every vault swap. Sometimes there
19119
19516
  * is no record — `useBackendSubmitTx: false`, or the submit was rejected. More often the record
@@ -19133,8 +19530,8 @@ declare class LeverageYieldService {
19133
19530
  *
19134
19531
  * @param params - `srcChainKey` and `srcTxHash` of the source-chain vault-swap transaction.
19135
19532
  * @param config - Optional per-request override. Its `apiKey` reaches every keyed leg — the
19136
- * submit-tx record read, the solver read, and the durable-intent read a solver `NOT_FOUND` falls
19137
- * back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
19533
+ * submit-tx record read, the solver read, and the durable-intent read a non-final solver answer
19534
+ * falls back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
19138
19535
  * @returns A `Result` containing a {@link DetailedLeverageYieldStatus}. Fails with `LOOKUP_FAILED`
19139
19536
  * when no source can answer yet. Branch on `error.context.reason`:
19140
19537
  * `DETAILED_STATUS_NOT_DELIVERED` is the ambiguous miss a caller should bound with a retry
@@ -20210,7 +20607,7 @@ declare class EvmSolverService {
20210
20607
  * @throws If the transaction contains no matching `IntentCreated` event, or if the
20211
20608
  * intent's chain IDs are not recognized.
20212
20609
  */
20213
- static getIntent(txHash: Hash$1, config: ConfigService, publicClient: PublicClient): Promise<Intent>;
20610
+ static getIntent(txHash: Hash, config: ConfigService, publicClient: PublicClient): Promise<Intent>;
20214
20611
  /**
20215
20612
  * Reads an `IntentState` struct from a hub-chain fill transaction receipt.
20216
20613
  *
@@ -20223,7 +20620,7 @@ declare class EvmSolverService {
20223
20620
  * @returns `IntentState`: `{ exists, remainingInput, receivedOutput, pendingPayment }`.
20224
20621
  * @throws If the transaction contains no matching `IntentFilled` event.
20225
20622
  */
20226
- static getFilledIntent(txHash: Hash$1, solverConfig: SolverConfig, publicClient: PublicClient): Promise<IntentState>;
20623
+ static getFilledIntent(txHash: Hash, solverConfig: SolverConfig, publicClient: PublicClient): Promise<IntentState>;
20227
20624
  /**
20228
20625
  * Computes the keccak256 hash of an intent struct, which serves as its unique ID on the hub chain.
20229
20626
  *
@@ -20877,4 +21274,4 @@ declare function timeToBreakevenYears(supplyApyPct: number, borrowApyPct: number
20877
21274
  */
20878
21275
  declare function resolvePositionFundingAddress(chainKey: SpokeChainKey, hubChainKey: SpokeChainKey, token: XToken | undefined): string;
20879
21276
 
20880
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BackendApiServiceOptions, BackendHttpError, type BalanceCollector, type BalanceReadContext, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BreakevenInput, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeDetailedStatusError, type BridgeDetailedStatusErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedBridgeStatus, type DetailedBridgeStatusKey, type DetailedLeverageYieldStatus, type DetailedLeverageYieldStatusKey, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetBalanceParams, type GetBalancesParams, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageBorrowSizing, type LeverageLegProjection, type LeverageLegQuote, type LeverageLegRequest, type LeveragePositionIntentResult, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, LeverageYieldApiService, type LeverageYieldApiServiceOptions, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldDetailedStatusError, type LeverageYieldDetailedStatusErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldExtras, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, MAX_POSITION_FEE_BPS, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, type OnDemandBtcPayload, type OnDemandRelayData, type OpenPositionFromDebtTokenParams, type OpenPositionParams, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OracleCandle, type OracleCandleInterval, type OracleCandlesResponse, type OracleMarketInterval, type OracleMarketsResponse, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PositionBatchCall, type PositionDirectCall, type PositionFundingParams, type PositionIntentCall, type PositionIntentNotifier, type PositionLegQuote, type PositionOperationParams, type PositionOrigin, type PositionSide, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiHost, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReserveRiskParams, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringApiServiceOptions, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type SwapSpeedTier, type SwapSpeedTierParams, type SwapSpeedTierResult, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletBalanceMap, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, canonicalizeBitcoinAddress, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, encodeTokenIdentifier, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isApprovalSupportedChainKeyType, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isNoRouteRefusal, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidBitcoinAddress, isValidInjectiveAddress, isValidNearAccountId, leverageYieldInvariant, leveragedNetApyPct, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, projectLeverageLeg, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, reportPositionIntent, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, resolvePositionFundingAddress, retry, reverseEncodeAddress, robinhoodChain, serializeAddressData, settleWalletBalances, silentLogger, sizeLeverageBorrow, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, timeToBreakevenYears, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
21277
+ export { ACCOUNT_UPGRADE_DECLINED, ALLOWANCE_CHECK_CODES, APPROVE_CODES, ATOMIC_BATCH_REFUSED, ATOMIC_BATCH_UNCONFIRMED, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalBatchErrorCode, type ApprovalBatchResult, type ApprovalOptions, type ApprovalStrategy, type ApprovalStrategyError, type ApprovalStrategyErrorCode, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BackendApiServiceOptions, BackendHttpError, type BalanceCollector, type BalanceReadContext, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BreakevenInput, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeDetailedStatusError, type BridgeDetailedStatusErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BridgeWithApprovalError, type BridgeWithApprovalErrorCode, type BridgeWithApprovalParams, type BridgeWithApprovalResponse, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConfirmApprovalBatchParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedBridgeStatus, type DetailedBridgeStatusKey, type DetailedLeverageYieldStatus, type DetailedLeverageYieldStatusKey, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetBalanceParams, type GetBalancesParams, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageBorrowSizing, type LeverageLegProjection, type LeverageLegQuote, type LeverageLegRequest, type LeveragePositionIntentResult, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, LeverageYieldApiService, type LeverageYieldApiServiceOptions, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldDetailedStatusError, type LeverageYieldDetailedStatusErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldExtras, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, MAX_POSITION_FEE_BPS, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, type OnDemandBtcPayload, type OnDemandRelayData, type OpenPositionFromDebtTokenParams, type OpenPositionParams, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OracleCandle, type OracleCandleInterval, type OracleCandlesResponse, type OracleMarketInterval, type OracleMarketsResponse, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PositionBatchCall, type PositionDirectCall, type PositionFundingParams, type PositionIntentCall, type PositionIntentNotifier, type PositionLegQuote, type PositionOperationParams, type PositionOrigin, type PositionSide, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiHost, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReserveRiskParams, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolveApprovalStrategyParams, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendApprovalBatchParams, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringApiServiceOptions, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapApprovalStrategy, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type SwapSpeedTier, type SwapSpeedTierParams, type SwapSpeedTierResult, type SwapStatusSummary, type SwapWithApprovalError, type SwapWithApprovalErrorCode, type SwapWithApprovalParams, type SwapWithApprovalResponse, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VaultSwapWithApprovalError, type VaultSwapWithApprovalErrorCode, type VaultSwapWithApprovalParams, type VaultSwapWithApprovalResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletBalanceMap, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, canonicalizeBitcoinAddress, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, confirmApprovalBatch, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, encodeTokenIdentifier, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isApprovalSupportedChainKeyType, isAtomicBatchRefusal, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isBridgeWithApprovalError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isNoRouteRefusal, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isSwapWithApprovalError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidBitcoinAddress, isValidInjectiveAddress, isValidNearAccountId, isVaultSwapWithApprovalError, leverageYieldInvariant, leveragedNetApyPct, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, projectLeverageLeg, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, reportPositionIntent, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveApprovalStrategy, resolveLogger, resolvePositionFundingAddress, retry, reverseEncodeAddress, robinhoodChain, sendApprovalBatch, serializeAddressData, settleWalletBalances, silentLogger, sizeLeverageBorrow, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, summarizeSwapStatus, swapExactInSingleParamsAbi, swapInvariant, timeToBreakevenYears, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, withErrorContext, wrappedSonicAbi };