@sodax/sdk 2.1.0-rc.1 → 2.1.0-rc.3

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,4 +1,4 @@
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, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, 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, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, 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, 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, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
2
2
  export * from '@sodax/types';
3
3
  export { SodaxFeature } from '@sodax/types';
4
4
  import * as viem from 'viem';
@@ -59,7 +59,7 @@ export { SwapsApiError, SwapsApiErrorCode, SwapsApiErrorContext } from '@sodax/s
59
59
  * because retry semantics differ — re-estimation is cheap, retry-on-failure is the norm).
60
60
  * - `LOOKUP_FAILED` — any other read-only on-chain query / off-chain config fetch.
61
61
  * `context.method` partitions this code (`'getStakingInfo'`, `'getBridgeableAmount'`, …).
62
- * - `EXTERNAL_API_ERROR` — an upstream API call failed (e.g. solver, backend, swaps). `context.api`
62
+ * - `EXTERNAL_API_ERROR` — an upstream API call failed (e.g. solver, backend, swaps, bridge). `context.api`
63
63
  * identifies which service.
64
64
  * - `UNKNOWN` — last-resort catch in an outer `try`. Should be extremely rare in production.
65
65
  */
@@ -111,7 +111,7 @@ type SodaxErrorContext = {
111
111
  srcChainKey?: string;
112
112
  dstChainKey?: string;
113
113
  relayCode?: RelayCode;
114
- api?: 'solver' | 'backend' | 'swaps' | 'sponsoring';
114
+ api?: 'solver' | 'backend' | 'swaps' | 'sponsoring' | 'bridge';
115
115
  method?: string;
116
116
  status?: number;
117
117
  nextAction?: string;
@@ -7669,6 +7669,157 @@ declare class SponsoringApiService implements ResultifiedSponsoringApi {
7669
7669
  getBaseURL(): string;
7670
7670
  }
7671
7671
 
7672
+ /**
7673
+ * {@link IBridgeApiV2} with every method's return wrapped in `Result<T>` and an
7674
+ * optional trailing `RequestOverrideConfig`. `BridgeApiService` implements this
7675
+ * (rather than `IBridgeApiV2` directly) because it never throws — like
7676
+ * `SwapsApiService`, it returns `{ ok: false }` on failure instead of
7677
+ * `Promise<T>` rejection. The mapped type keeps the class in lockstep with the
7678
+ * canonical interface: every endpoint is covered with its exact payload types.
7679
+ */
7680
+ type ResultifiedBridgeApiV2 = {
7681
+ [K in keyof IBridgeApiV2]: IBridgeApiV2[K] extends (...args: infer A) => Promise<infer R> ? (...args: [...A, config?: RequestOverrideConfig]) => Promise<Result<R>> : never;
7682
+ };
7683
+ /**
7684
+ * Map the SDK-domain bridge params (`CreateBridgeIntentParams`) onto the wire DTO
7685
+ * {@link CreateBridgeIntentParamsV2} (swaps naming). The input is typed structurally rather
7686
+ * than imported from `../bridge/BridgeService.js` to keep `backendApi` free of a
7687
+ * `backendApi → bridge` import cycle.
7688
+ *
7689
+ * @param params - SDK-domain params (`srcToken`/`dstToken`/`amount`/`recipient`).
7690
+ * @param extras - Optional `srcPublicKey` / Bitcoin `bound` extras.
7691
+ */
7692
+ declare function toCreateBridgeIntentParamsV2(params: {
7693
+ srcChainKey: string;
7694
+ dstChainKey: string;
7695
+ srcToken: string;
7696
+ dstToken: string;
7697
+ amount: bigint;
7698
+ srcAddress: string;
7699
+ recipient: string;
7700
+ }, extras?: {
7701
+ srcPublicKey?: string;
7702
+ bound?: BitcoinBoundExtrasV2;
7703
+ partnerFee?: PartnerFeeV2;
7704
+ }): CreateBridgeIntentParamsV2;
7705
+ /**
7706
+ * HTTP client for the backend **Bridge API v2** (`/bridge/*`).
7707
+ *
7708
+ * Mirrors every endpoint of {@link IBridgeApiV2} (one method per route) and
7709
+ * validates each response at runtime with a valibot schema (see
7710
+ * `bridgeApiSchemas.ts`). On a contract drift, the response is rejected as
7711
+ * `{ ok: false }` with a descriptive error rather than returned untyped.
7712
+ *
7713
+ * All public methods return `Promise<Result<T>>` — they never throw. On network
7714
+ * failure, timeout, non-2xx HTTP response, or response-shape validation failure,
7715
+ * the returned Result has `ok: false` with a canonical
7716
+ * `SodaxError<'EXTERNAL_API_ERROR'>` (`feature: 'backend'`, `context.api: 'bridge'`)
7717
+ * in the `error` field; the underlying failure is preserved on `error.cause`.
7718
+ *
7719
+ * Per-call request overrides (base URL, timeout, headers) can be passed as the
7720
+ * optional last argument to any method via `RequestOverrideConfig`.
7721
+ *
7722
+ * The Bridge API is served on the base backend host (`/bridge/*` sub-paths) — its config is resolved by
7723
+ * `resolveBridgeApiConfig` (an alias of `resolveBaseApiConfig`), so it is typed as a flat
7724
+ * {@link BaseApiConfig}. It defaults to the same host as the swaps client but is not configured with it:
7725
+ * a `swapsApiConfig` slice does not move the bridge routes; set `baseURL` / `baseApiConfig` instead.
7726
+ *
7727
+ * Reachable on the Sodax facade as `sodax.api.bridge`.
7728
+ */
7729
+ declare class BridgeApiService implements ResultifiedBridgeApiV2 {
7730
+ private readonly config;
7731
+ private readonly headers;
7732
+ private readonly logger;
7733
+ constructor(config: BaseApiConfig, logger?: SodaxLogger);
7734
+ /**
7735
+ * Issues a single HTTP request, validates the JSON body against `schema`, and
7736
+ * wraps the result in `Result<T>`. The service-level `baseURL`/`timeout`/
7737
+ * `headers` are merged with the optional per-call `overrideConfig` (which takes
7738
+ * precedence) inside {@link makeRequest}. Every public method delegates here.
7739
+ */
7740
+ private request;
7741
+ /**
7742
+ * Fetch all supported bridge tokens grouped by SpokeChainKey.
7743
+ *
7744
+ * @returns `Result<GetBridgeTokensResponseV2>` — map of chain key → token list.
7745
+ */
7746
+ getTokens(config?: RequestOverrideConfig): Promise<Result<GetBridgeTokensResponseV2>>;
7747
+ /**
7748
+ * Fetch supported bridge tokens for a single SpokeChainKey.
7749
+ *
7750
+ * @param chainKey - SODAX SpokeChainKey (e.g. `0xa4b1.arbitrum`, `solana`).
7751
+ * @returns `Result<GetBridgeTokensByChainResponseV2>` — token list for the chain.
7752
+ */
7753
+ getTokensByChain(chainKey: string, config?: RequestOverrideConfig): Promise<Result<GetBridgeTokensByChainResponseV2>>;
7754
+ /**
7755
+ * Check whether the source token allowance is already sufficient for the bridge.
7756
+ *
7757
+ * @returns `Result<BridgeAllowanceCheckResponseV2>` — `{ valid }`.
7758
+ */
7759
+ checkAllowance(body: CreateBridgeIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<BridgeAllowanceCheckResponseV2>>;
7760
+ /**
7761
+ * Build an unsigned token-approval transaction for the source token.
7762
+ *
7763
+ * @returns `Result<BridgeApproveResponseV2>` — `{ tx }` (chain-specific unsigned tx).
7764
+ */
7765
+ approve(body: CreateBridgeIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<BridgeApproveResponseV2>>;
7766
+ /**
7767
+ * Build an unsigned spoke-deposit (create-bridge-intent) transaction.
7768
+ *
7769
+ * @returns `Result<CreateBridgeIntentResponseV2>` — `{ tx, relayData }` (no intent struct).
7770
+ */
7771
+ createBridgeIntent(body: CreateBridgeIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<CreateBridgeIntentResponseV2>>;
7772
+ /**
7773
+ * Submit a broadcast bridge (spoke-deposit) transaction to be processed (relayed).
7774
+ * Carries the FULL `relayData { address, payload }` envelope. Idempotent on `(txHash, srcChainKey)`.
7775
+ *
7776
+ * @returns `Result<BridgeSubmitTxResponseV2>` — `{ success, data: { status, message } }`.
7777
+ */
7778
+ submitTx(body: BridgeSubmitTxRequestV2, config?: RequestOverrideConfig): Promise<Result<BridgeSubmitTxResponseV2>>;
7779
+ /**
7780
+ * Get the processing status of a submitted bridge transaction by `(txHash, srcChainKey)`.
7781
+ *
7782
+ * @returns `Result<BridgeSubmitTxStatusResponseV2>` — `{ success, data }` (processing state).
7783
+ */
7784
+ getSubmitTxStatus(query: BridgeSubmitTxStatusQueryV2, config?: RequestOverrideConfig): Promise<Result<BridgeSubmitTxStatusResponseV2>>;
7785
+ /**
7786
+ * Bridge partner fee for an input amount (per-request `partnerFee` override, else the configured default).
7787
+ * NOTE: this is a pure client-side computation
7788
+ * in the SDK core (`sodax.bridge.getFee`) — prefer that (no round-trip); this HTTP variant exists for
7789
+ * parity with the backend `/bridge/fee` endpoint (for consumers using only `sodax.api.bridge`).
7790
+ *
7791
+ * @returns `Result<BridgeFeeResponseV2>` — `{ fee }` (decimal string).
7792
+ */
7793
+ getFee(body: BridgeFeeRequestV2, config?: RequestOverrideConfig): Promise<Result<BridgeFeeResponseV2>>;
7794
+ /**
7795
+ * Deposit capacity / withdrawal liquidity for a (from, to) token pair. Computable client-side in the
7796
+ * SDK core (`sodax.bridge.getBridgeableAmount`); this HTTP variant mirrors `/bridge/bridgeable-amount`.
7797
+ *
7798
+ * @returns `Result<BridgeableAmountResponseV2>` — `{ limit }`.
7799
+ */
7800
+ getBridgeableAmount(body: BridgeQuoteRequestV2, config?: RequestOverrideConfig): Promise<Result<BridgeableAmountResponseV2>>;
7801
+ /**
7802
+ * Whether a (from, to) token pair is bridgeable. Computable client-side in the SDK core
7803
+ * (`sodax.bridge.isBridgeable`); this HTTP variant mirrors `/bridge/bridgeable/check`.
7804
+ *
7805
+ * @returns `Result<BridgeableCheckResponseV2>` — `{ bridgeable }`.
7806
+ */
7807
+ isBridgeable(body: BridgeQuoteRequestV2, config?: RequestOverrideConfig): Promise<Result<BridgeableCheckResponseV2>>;
7808
+ /**
7809
+ * Merge additional headers into the service's default header set. Existing
7810
+ * keys are overwritten; keys absent from `headers` are preserved.
7811
+ */
7812
+ setHeaders(headers: Record<string, string>): void;
7813
+ /** Return the base URL the service is currently pointing at. */
7814
+ getBaseURL(): string;
7815
+ /**
7816
+ * Return the effective per-request timeout (ms). Callers that bound a request tighter than the
7817
+ * service default (e.g. `pollBackendSubmitTx` clamping to its poll cutoff) need this as the ceiling,
7818
+ * because a `RequestOverrideConfig.timeout` REPLACES the service value rather than lowering it.
7819
+ */
7820
+ getTimeout(): number;
7821
+ }
7822
+
7672
7823
  /** Full details of a single swap intent as stored and returned by the backend. */
7673
7824
  interface IntentResponse {
7674
7825
  intentHash: string;
@@ -7814,6 +7965,7 @@ interface MoneyMarketBorrowers {
7814
7965
  declare class BackendApiService implements IConfigApiV1 {
7815
7966
  readonly swaps: SwapsApiService;
7816
7967
  readonly sponsoring: SponsoringApiService;
7968
+ readonly bridge: BridgeApiService;
7817
7969
  private readonly config;
7818
7970
  private readonly headers;
7819
7971
  private readonly logger;
@@ -8149,6 +8301,12 @@ type ConfigServiceConstructorParams = {
8149
8301
  * never supplies it; it is purely a client-side option.
8150
8302
  */
8151
8303
  fee?: PartnerFee;
8304
+ /**
8305
+ * RadFi/Bound request signer (the `radfi.signRequest` option passed to `new Sodax(...)`). Held
8306
+ * outside the swappable `SodaxConfig` — like {@link logger} — so a dynamic config fetch never
8307
+ * replaces it. Read by {@link BitcoinSpokeService} to inject Bound `x-api-signature` headers.
8308
+ */
8309
+ radfiSigner?: RadfiSigner;
8152
8310
  };
8153
8311
  /**
8154
8312
  * ConfigApiService - Service for fetching configuration data from the backend API or fallbacking to default values
@@ -8172,6 +8330,13 @@ declare class ConfigService {
8172
8330
  * a client-side option set via `new Sodax({ fee })`. Per-feature overrides live on the feature config.
8173
8331
  */
8174
8332
  readonly fee: PartnerFee | undefined;
8333
+ /**
8334
+ * RadFi/Bound request signer. Resolved once at construction and kept independent of {@link sodax}
8335
+ * so that {@link initialize}'s dynamic-config swap never clobbers it. Read by `BitcoinSpokeService`
8336
+ * via `config.radfiSigner`; `undefined` unless the consumer passed `radfi.signRequest` to
8337
+ * `new Sodax(...)`. Holds the function reference only — never a credential.
8338
+ */
8339
+ readonly radfiSigner: RadfiSigner | undefined;
8175
8340
  private initialized;
8176
8341
  private supportedHubAssetsSet;
8177
8342
  private supportedSodaVaultAssetsSet;
@@ -8182,7 +8347,7 @@ declare class ConfigService {
8182
8347
  private stakedATokenAddressesSet;
8183
8348
  private chainToSupportedTokenAddressMap;
8184
8349
  private hubAssetToXTokenMap;
8185
- constructor({ api, config, userConfig, logger, analytics, fee }: ConfigServiceConstructorParams);
8350
+ constructor({ api, config, userConfig, logger, analytics, fee, radfiSigner }: ConfigServiceConstructorParams);
8186
8351
  initialize(): Promise<Result<void>>;
8187
8352
  getChains(): GetChainsApiResponse;
8188
8353
  getSwapTokens(): GetSwapTokensApiResponse;
@@ -8289,6 +8454,12 @@ declare function mergeSodaxConfig(base: SodaxDefaultConfig, override: SodaxOptio
8289
8454
  declare function encodeContractCalls(calls: EvmContractCall[]): Hex;
8290
8455
  declare function waitForTransactionReceipt(hash: Hex, provider: IEvmWalletProvider): Promise<EvmRawTransactionReceipt>;
8291
8456
 
8457
+ /**
8458
+ * True when `(chainKey, token)` denotes native BTC on the Bitcoin chain — the only transfer whose amount is
8459
+ * denominated in satoshis and therefore subject to `BITCOIN_DUST_SATS`. BTC-family tokens are 8-decimal,
8460
+ * so a base-unit amount equals its satoshi value on both the deposit (source) and delivery (destination) side.
8461
+ */
8462
+ declare function isNativeBitcoinTransfer(config: ConfigService, chainKey: SpokeChainKey, token: XToken | undefined): boolean;
8292
8463
  declare function retry<T>(action: (retryCount: number) => Promise<T>, retryCount?: number, delayMs?: number): Promise<T>;
8293
8464
  declare function getRandomBytes(length: number): Uint8Array;
8294
8465
  declare function randomUint256(): bigint;
@@ -8392,6 +8563,30 @@ type Erc20IsAllowanceParams<ChainKey extends EvmChainKey> = {
8392
8563
  nativeToken: Address$1;
8393
8564
  publicClient: PublicClient;
8394
8565
  };
8566
+ type Erc20GetAllowanceParams = {
8567
+ token: Address$1;
8568
+ owner: Address$1;
8569
+ spender: Address$1;
8570
+ publicClient: PublicClient;
8571
+ };
8572
+ type Erc20PlanApprovalParams = Erc20GetAllowanceParams & {
8573
+ amount: bigint;
8574
+ nativeToken: Address$1;
8575
+ };
8576
+ /** Why {@link Erc20Service.planApproval} chose the plan it did. Diagnostic only. */
8577
+ type Erc20ApprovalPlanReason = 'native-token' | 'zero-allowance' | 'probe-passed' | 'reset-required' | 'reset-not-viable' | 'allowance-read-failed';
8578
+ type Erc20ApprovalPlan = {
8579
+ /**
8580
+ * Present only when the token rejects an allowance change from one non-zero value to another and
8581
+ * a stale allowance exists. Approve this first and wait for it to be mined — {@link approveAmount}
8582
+ * is not valid until it has landed. Always `0n`; it is carried as an amount so that no caller has
8583
+ * to hardcode the constant.
8584
+ */
8585
+ readonly resetAmount?: bigint;
8586
+ /** The approval the caller actually asked for. */
8587
+ readonly approveAmount: bigint;
8588
+ readonly reason: Erc20ApprovalPlanReason;
8589
+ };
8395
8590
  type Erc20Token = {
8396
8591
  name: string;
8397
8592
  symbol: string;
@@ -8401,12 +8596,42 @@ type Erc20Token = {
8401
8596
  declare class Erc20Service {
8402
8597
  private constructor();
8403
8598
  static getErc20Token(token: Address$1, publicClient: PublicClient): Promise<Erc20Token>;
8599
+ /**
8600
+ * Read the current on-chain allowance of `spender` over `owner`'s balance.
8601
+ * @param params - Token, owner, spender, and publicClient for the chain.
8602
+ * @returns The raw allowance.
8603
+ */
8604
+ static getAllowance(params: Erc20GetAllowanceParams): Promise<bigint>;
8404
8605
  /**
8405
8606
  * Check if spender has enough ERC20 allowance for given amount.
8406
8607
  * @param params - Token, amount, owner, spender, chainKey, and publicClient for the chain.
8407
8608
  * @returns Whether allowance is sufficient for the amount.
8408
8609
  */
8409
8610
  static isAllowanceValid<ChainKey extends EvmChainKey>(params: Erc20IsAllowanceParams<ChainKey>): Promise<Result<boolean>>;
8611
+ /**
8612
+ * Decide how many approve transactions this token needs for `amount`.
8613
+ *
8614
+ * Tokens of the 2017 TetherToken lineage reject an allowance change from one non-zero value to
8615
+ * another, so a wallet holding a stale allowance can never approve — every retry reverts the same
8616
+ * way. Such a token needs `approve(0)` first.
8617
+ *
8618
+ * Detection is behavioural: a simulated approve either reverts or it does not. That answers the
8619
+ * question that actually matters ("will this approve revert?") instead of "is this token USDT?",
8620
+ * so a token listed later, or upgraded later behind the same address, is covered without a code
8621
+ * change — and no token list is hardcoded.
8622
+ *
8623
+ * The probes only run once an allowance is already set. The common path (nothing approved yet)
8624
+ * costs a single read.
8625
+ */
8626
+ static planApproval(params: Erc20PlanApprovalParams): Promise<Erc20ApprovalPlan>;
8627
+ /**
8628
+ * Simulate `approve(spender, amount)` as `owner`.
8629
+ *
8630
+ * `call` rather than `simulateContract`, because a TetherToken-lineage `approve` returns no value
8631
+ * and ABI decoding would fail even on a successful call. `account` is required: the guard reads
8632
+ * `allowed[msg.sender][spender]`.
8633
+ */
8634
+ private static canApprove;
8410
8635
  /**
8411
8636
  * Approve ERC20 amount spending
8412
8637
  * @param token - ERC20 token address
@@ -8552,6 +8777,21 @@ type SpokeApproveParamsEvmSpoke<K extends EvmSpokeOnlyChainKey, Raw extends bool
8552
8777
  type SpokeApproveParamsStellar<K extends StellarChainKey, Raw extends boolean> = SpokeApproveParamsCommon<K, Raw> & {
8553
8778
  srcChainKey: K;
8554
8779
  };
8780
+ /**
8781
+ * The unsigned transactions an approval needs, named rather than ordered.
8782
+ *
8783
+ * `resetTx` is present only for a token that rejects an allowance change from one non-zero value to
8784
+ * another while a stale allowance exists. When it is, **broadcast it first and wait for it to be
8785
+ * mined** — `approveTx` is not valid until the reset has landed.
8786
+ *
8787
+ * Deliberately not an array: the only consumers map these onto named fields anyway
8788
+ * (`ApproveResponseV2.tx` / `resetTx`), and a positional contract crossing a package boundary
8789
+ * invites a reader to guess which end is which.
8790
+ */
8791
+ type ApprovalTxs<K extends SpokeChainKey> = {
8792
+ readonly resetTx?: TxReturnType<K, true>;
8793
+ readonly approveTx: TxReturnType<K, true>;
8794
+ };
8555
8795
  /**
8556
8796
  * Plain union of approve-capable variants. Callers who want narrow-`K` typing should instantiate
8557
8797
  * the specific variant (e.g. `SpokeApproveParamsHub<R>`) directly.
@@ -8572,6 +8812,8 @@ type RawDestinationParams = {
8572
8812
  */
8573
8813
  type HookRequest = {
8574
8814
  kind: typeof HookKind.HYPERCORE_DEPOSIT;
8815
+ } | {
8816
+ kind: typeof HookKind.FLINT_DEPOSIT;
8575
8817
  };
8576
8818
  type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
8577
8819
  inputToken: string;
@@ -9235,11 +9477,22 @@ type RadfiMaxSpentResponse = {
9235
9477
  feeRate: number;
9236
9478
  fee: number;
9237
9479
  };
9480
+ /**
9481
+ * Runtime wiring for {@link RadfiProvider} — everything that is a live object rather than
9482
+ * serializable config (which belongs on {@link RadfiConfig}). An object, not a positional
9483
+ * parameter, because this is a public class and the next such dependency would otherwise be
9484
+ * a third argument. gh-831.
9485
+ */
9486
+ type RadfiProviderOptions = {
9487
+ /** Attaches per-request headers to outbound Bound `apiUrl` calls, e.g. a backend's HMAC closure. */
9488
+ signer?: RadfiSigner;
9489
+ };
9238
9490
  declare class RadfiProvider {
9239
9491
  private readonly config;
9492
+ private readonly signer?;
9240
9493
  accessToken: string;
9241
9494
  refreshToken: string;
9242
- constructor(config: RadfiConfig);
9495
+ constructor(config: RadfiConfig, options?: RadfiProviderOptions);
9243
9496
  /**
9244
9497
  * Authenticate with Bound Exchange: BIP322-sign a login message, then call the Bound Exchange API.
9245
9498
  * Returns accessToken, refreshToken, and tradingAddress.
@@ -9297,6 +9550,9 @@ declare class RadfiProvider {
9297
9550
  }, accessToken: string): Promise<string>;
9298
9551
  /**
9299
9552
  * Fetch expired (or near-expiry) UTXOs for a trading wallet address from UMS API.
9553
+ *
9554
+ * UMS call — unsigned by design, like `getBalance`: the backend credential is scoped to the
9555
+ * Sodax endpoints on `apiUrl`, so a configured signer intentionally does not reach here.
9300
9556
  */
9301
9557
  getExpiredUtxos(tradingAddress: string, params?: {
9302
9558
  page?: number;
@@ -10041,8 +10297,51 @@ declare class SpokeService {
10041
10297
  /**
10042
10298
  * Approve ERC-20 spending on hub / EVM spoke or request a Stellar trustline using unified params.
10043
10299
  * Feature services map their action payloads into {@link SpokeApproveParams}.
10300
+ *
10301
+ * A signed ERC-20 approval can take **two** transactions: a token of the TetherToken lineage
10302
+ * rejects an allowance change from one non-zero value to another, so a stale allowance is zeroed
10303
+ * first and the user signs twice. The returned hash is always the last transaction's, so the
10304
+ * contract callers see is unchanged. An unsigned caller still gets exactly one transaction — use
10305
+ * {@link SpokeService.buildApproveTxs} to get the whole plan.
10044
10306
  */
10045
10307
  approve<K extends SpokeChainKey, Raw extends boolean>(params: SpokeApproveParams<K, Raw>): Promise<Result<TxReturnType<K, Raw>>>;
10308
+ /**
10309
+ * The unsigned approval transactions, named rather than ordered (see {@link ApprovalTxs}).
10310
+ *
10311
+ * `resetTx` is present only when the token needs its stale allowance cleared first (see
10312
+ * {@link Erc20Service.planApproval}); broadcast it and wait for it to be mined before `approveTx`,
10313
+ * which is not valid until the reset has landed. Unsigned callers — the swaps API and the apps
10314
+ * built on it — need this, because {@link SpokeService.approve} can only hand back a single `tx`.
10315
+ *
10316
+ * Deliberately separate from {@link SpokeService.approve} rather than a mode of it: the two return
10317
+ * genuinely different shapes, and folding them together would put a union in the return type of
10318
+ * the method every feature approves through.
10319
+ */
10320
+ buildApproveTxs<K extends SpokeChainKey>(params: SpokeApproveParams<K, true>): Promise<Result<ApprovalTxs<K>>>;
10321
+ /**
10322
+ * Sign and broadcast the approval plan for an ERC-20 on the hub or an EVM spoke.
10323
+ *
10324
+ * A token of the TetherToken lineage rejects an allowance change from one non-zero value to
10325
+ * another, so a wallet holding a stale allowance needs `approve(0)` first. The transactions cannot
10326
+ * be batched: each one is only valid once its predecessor has been mined. The hash of the last is
10327
+ * returned, so the contract callers see is unchanged.
10328
+ */
10329
+ private executeErc20ApprovalPlan;
10330
+ /**
10331
+ * Stellar approves by adding a trustline — always a single transaction, with no allowance to plan
10332
+ * around. Shared by both entry points so the param mapping and its cast live in one place.
10333
+ */
10334
+ private requestTrustlineForApproval;
10335
+ /** Resolve the chain-specific inputs {@link Erc20Service.planApproval} needs, and record the plan. */
10336
+ private planErc20Approval;
10337
+ /** The read client for an EVM chain, whether it is the hub or a spoke. */
10338
+ private getEvmPublicClient;
10339
+ /**
10340
+ * Log a plan only when it says something: an extra transaction the user will have to sign, or a
10341
+ * probe that could not reach a verdict. The ordinary single approve is the vast majority of calls
10342
+ * and stays silent.
10343
+ */
10344
+ private logApprovalPlan;
10046
10345
  /**
10047
10346
  * Estimate the gas for a raw transaction.
10048
10347
  * @param {TxReturnType<T, true>} params - The parameters for the raw transaction.
@@ -10203,6 +10502,14 @@ type RelayAndWaitParams = {
10203
10502
  timeout: number | undefined;
10204
10503
  pollTxHash?: string;
10205
10504
  };
10505
+ /**
10506
+ * Minimum `timeout` a feature's client-side relay fallback passes to {@link relayTxAndWaitPacket} when
10507
+ * its shared budget is spent. `relayTxAndWaitPacket` submits the tx to the relay BEFORE `timeout`
10508
+ * bounds anything (only the packet wait is bounded), so a zero/negative remainder must never skip the
10509
+ * call: the spoke deposit has already landed on chain and would otherwise sit unrelayed. Re-relay is
10510
+ * idempotent, so spending this floor is always safe.
10511
+ */
10512
+ declare const RELAY_FALLBACK_FLOOR_MS = 5000;
10206
10513
  /**
10207
10514
  * Submits a transaction to the intent relay service.
10208
10515
  *
@@ -12381,14 +12688,29 @@ declare class SwapService {
12381
12688
  * - Stellar: approves the trustline (adds/increases it).
12382
12689
  * - Other chain types: returns an error — approval is not supported.
12383
12690
  *
12384
- * When `raw: true`, returns unsigned transaction data instead of broadcasting.
12691
+ * When `raw: true`, returns unsigned transaction data instead of broadcasting. That is always a
12692
+ * single transaction, which cannot express the two-step approval a TetherToken-lineage token
12693
+ * needs when a stale allowance already exists — use {@link SwapService.buildApproveTxs} for the
12694
+ * whole plan.
12385
12695
  * When `raw: false`, a matching wallet provider for `K` must be supplied and the transaction
12386
- * is signed and broadcast immediately.
12696
+ * is signed and broadcast immediately. Such an approval can take **two** transactions, so the
12697
+ * user may sign twice; the returned hash is the last one's.
12387
12698
  *
12388
12699
  * @param _params - Swap action params including the source chain key, input token, amount, and wallet provider.
12389
12700
  * @returns A `Result` wrapping the chain-specific transaction return type (`TxReturnType<K, Raw>`).
12390
12701
  */
12391
12702
  approve<K extends SpokeChainKey, Raw extends boolean>(_params: SwapActionParams<K, Raw>): Promise<Result<TxReturnType<K, Raw>>>;
12703
+ /**
12704
+ * The unsigned approval transactions for the swap's source token, in the order they must be
12705
+ * broadcast.
12706
+ *
12707
+ * Two transactions when the source token needs its stale allowance cleared first, one otherwise.
12708
+ * {@link SwapService.approve} is unchanged and still returns a single transaction; this is the
12709
+ * entry point for unsigned callers that need to handle the two-step case. When `resetTx` is
12710
+ * present, broadcast it and wait for it to be mined first — `approveTx` is not valid until the
12711
+ * reset has landed.
12712
+ */
12713
+ buildApproveTxs<K extends SpokeChainKey>(_params: SwapActionParams<K, true>): Promise<Result<ApprovalTxs<K>>>;
12392
12714
  /**
12393
12715
  * Creates a swap intent on the user's source spoke chain without submitting it to the solver.
12394
12716
  *
@@ -13330,11 +13652,40 @@ type CreateBridgeIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
13330
13652
  dstToken: string;
13331
13653
  recipient: string;
13332
13654
  };
13333
- type BridgeParams<ChainKey extends SpokeChainKey, Raw extends boolean> = SpokeExecActionParams<ChainKey, Raw, CreateBridgeIntentParams<ChainKey>>;
13655
+ /**
13656
+ * Per-action extras for bridge intent creation, supplied via the `extras` slot of the bridge
13657
+ * action params. Mirrors `SwapExtras` chain-keyed slots, plus a chain-agnostic `partnerFee` per-action
13658
+ * override that takes precedence over the config-level `bridgePartnerFee` (omit it to use the configured fee).
13659
+ *
13660
+ * - `srcPublicKey` — only for Stacks sources (their address can't yield the signer public key at
13661
+ * raw-tx build time); keyed off `K` so non-Stacks actions can't set it.
13662
+ * - `bound` — Bound Exchange (Radfi) inputs for raw Bitcoin TRADING-mode sources; keyed off `K`
13663
+ * so non-Bitcoin actions can't set it.
13664
+ */
13665
+ type BridgeExtras<K extends SpokeChainKey = SpokeChainKey> = (GetChainType<K> extends 'STACKS' ? {
13666
+ srcPublicKey?: string;
13667
+ } : {
13668
+ srcPublicKey?: never;
13669
+ }) & (GetChainType<K> extends 'BITCOIN' ? {
13670
+ bound?: BitcoinBoundExtras;
13671
+ } : {
13672
+ bound?: never;
13673
+ }) & {
13674
+ /**
13675
+ * Per-action partner-fee override. When present, takes precedence over the config-level
13676
+ * `bridgePartnerFee` for this call, so an integrator can charge (and route) its own fee per bridge.
13677
+ * Omit to use the configured fee. Chain-agnostic (unlike `srcPublicKey`/`bound`).
13678
+ */
13679
+ partnerFee?: PartnerFee;
13680
+ };
13681
+ type BridgeParams<ChainKey extends SpokeChainKey, Raw extends boolean> = SpokeExecActionParams<ChainKey, Raw, CreateBridgeIntentParams<ChainKey>, BridgeExtras<ChainKey>>;
13334
13682
  type BridgeServiceConstructorParams = {
13335
13683
  hubProvider: HubProvider;
13336
13684
  config: ConfigService;
13337
13685
  spoke: SpokeService;
13686
+ backendApi: BackendApiService;
13687
+ /** Opt-in backend submit-tx flow (from `SodaxOptions.bridgeOptions.useBackendSubmitTx`). Default off. */
13688
+ useBackendSubmitTx?: boolean;
13338
13689
  };
13339
13690
  /**
13340
13691
  * Orchestrates cross-chain token transfers within the SODAX hub-and-spoke architecture.
@@ -13355,17 +13706,21 @@ declare class BridgeService {
13355
13706
  readonly hubProvider: HubProvider;
13356
13707
  readonly config: ConfigService;
13357
13708
  readonly spoke: SpokeService;
13358
- constructor({ hubProvider, config, spoke }: BridgeServiceConstructorParams);
13709
+ readonly backendApi: BackendApiService;
13710
+ readonly useBackendSubmitTx: boolean;
13711
+ constructor({ hubProvider, config, spoke, backendApi, useBackendSubmitTx }: BridgeServiceConstructorParams);
13359
13712
  /**
13360
13713
  * Calculates the partner fee deducted from a given bridge input amount.
13361
13714
  *
13362
- * Returns `0n` when no partner fee is configured. The fee is denominated in the
13363
- * same units as `inputAmount` (vault token decimals, 18 dp).
13715
+ * Returns `0n` when no partner fee is configured. `inputAmount` must be in 18-dp hub/vault
13716
+ * units — the units the hub deducts the fee in (see `buildBridgeData`) — NOT the spoke token's
13717
+ * native base units. This matters for a fixed `PartnerFee.amount`, which is wei-denominated
13718
+ * (18 dp); a percentage fee is unit-agnostic.
13364
13719
  *
13365
- * @param inputAmount - Gross amount being bridged, in vault token base units.
13720
+ * @param inputAmount - Gross amount being bridged, in 18-dp hub/vault units.
13366
13721
  * @returns Fee amount to be deducted, in the same units as `inputAmount`.
13367
13722
  */
13368
- getFee(inputAmount: bigint): bigint;
13723
+ getFee(inputAmount: bigint, partnerFee?: PartnerFee | undefined): bigint;
13369
13724
  /**
13370
13725
  * Checks whether the caller has sufficient token allowance to execute the bridge.
13371
13726
  *
@@ -13431,6 +13786,27 @@ declare class BridgeService {
13431
13786
  * }
13432
13787
  */
13433
13788
  bridge<K extends SpokeChainKey>(_params: BridgeParams<K, false>): Promise<Result<TxHashPair, BridgeOrchestrationError>>;
13789
+ /**
13790
+ * Client-side bridge completion (the default path): verify the broadcast spoke-deposit tx, then
13791
+ * relay it to the hub and wait for the settlement packet. Extracted verbatim from `bridge()` so the
13792
+ * opt-in backend submit-tx path ({@link submitTx}) can fall back to it on any non-success. Bridge
13793
+ * always relays — there is no hub-source short-circuit.
13794
+ */
13795
+ private fallbackBridgeSteps;
13796
+ /**
13797
+ * Backend bridge path (opt-in via `bridgeOptions.useBackendSubmitTx`): hand the broadcast
13798
+ * spoke-deposit tx to the bridge API (`POST /bridge/submit-tx`) with the FULL `relayData`
13799
+ * envelope; the backend relays server-side. Polls `getSubmitTxStatus` until `executed`, then
13800
+ * returns the same {@link TxHashPair} the client-side path returns (`result.dstIntentTxHash` →
13801
+ * destination tx hash; bridge has no solver `intent_hash`).
13802
+ *
13803
+ * Never throws — returns `{ ok: false }` on any non-success (submit `!ok`, terminal `failed` /
13804
+ * abandoned, or poll timeout) so `bridge()` falls back to {@link fallbackBridgeSteps}. Falling back
13805
+ * is safe: re-relaying an already-relayed bridge tx is idempotent — the relay dedups and returns the
13806
+ * existing `executed` packet. Polling stops at `deadline - reserve` so the fallback keeps a
13807
+ * guaranteed slice of the shared `bridge` budget.
13808
+ */
13809
+ private submitTx;
13434
13810
  /**
13435
13811
  * Submits the spoke-side deposit transaction that initiates a bridge transfer,
13436
13812
  * without waiting for the cross-chain relay to complete.
@@ -13464,6 +13840,20 @@ declare class BridgeService {
13464
13840
  * Sonic-sourced "withdraw directly" bridge can find the matching vault/decimals.
13465
13841
  */
13466
13842
  private resolveBridgeEndpointToken;
13843
+ /**
13844
+ * Post-fee amounts for a bridge, in the units each hub step operates in. Single source for the fee +
13845
+ * vault-decimal pipeline, so {@link buildBridgeData}'s encoded hub calls and the BTC-destination dust
13846
+ * guard in {@link createBridgeIntent} can never disagree about what actually gets delivered.
13847
+ *
13848
+ * A spoke endpoint's amount is translated INTO 18-dp vault units on the way in (skipped when the
13849
+ * endpoint already IS the vault asset), the partner fee is deducted there — so a fixed
13850
+ * `PartnerFee.amount` is wei-denominated, never spoke-denominated — and the remainder is translated
13851
+ * back OUT into the destination endpoint's own units.
13852
+ *
13853
+ * @returns `feeAmount` and `withdrawAmount` in 18-dp vault units (what the hub fee transfer and vault
13854
+ * withdrawal use), and `delivered` in the destination endpoint's units (what the recipient receives).
13855
+ */
13856
+ private computeBridgeAmounts;
13467
13857
  /**
13468
13858
  * Encodes the hub-side execution payload for a bridge operation.
13469
13859
  *
@@ -17577,6 +17967,12 @@ declare class HookService {
17577
17967
  * Encodes a hook's `deliveryData` payload. One common entry point for all hooks — the encoding is
17578
17968
  * selected by {@link HookRequest.kind} and uses that hook's schema from {@link HOOK_DELIVERY_ABI}.
17579
17969
  *
17970
+ * Rejects the zero address. Every hook treats its recipient as the account to credit, and a
17971
+ * zero recipient is unrecoverable on arrival: the receiver reverts, which rolls back the whole
17972
+ * cross-chain withdrawal inside `SpokeAssetManager.recvMessage` and leaves the message wedged —
17973
+ * every retry hits the same revert. Failing here keeps that mistake client-side, before an intent
17974
+ * exists. Malformed and non-EVM addresses already throw inside viem's encoder.
17975
+ *
17580
17976
  * @param request - The hook selection (and any hook-specific params).
17581
17977
  * @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
17582
17978
  */
@@ -17936,4 +18332,4 @@ type DexApproveErrorCode = ApproveErrorCode;
17936
18332
  type DexApproveError = SodaxError<DexApproveErrorCode>;
17937
18333
  declare const isDexApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
17938
18334
 
17939
- 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 ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, BackendHttpError, 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 BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, 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, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, 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 Erc20ApproveParams, type Erc20IsAllowanceParams, 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 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 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 LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, 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, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, 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 PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, 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 ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, 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 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, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, 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 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, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, 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, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, 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, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, 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, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
18335
+ 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, BackendHttpError, 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 BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, 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, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, 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 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 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 LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, 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, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, 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 PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, 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 ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, 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 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, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, 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 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, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, 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, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, 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, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, 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, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };