@sodax/sdk 2.0.0-rc.17 → 2.0.0-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { IConfigApi, ApiConfig, SodaxLogger, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, 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, 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 } 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, 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 } from '@sodax/types';
2
2
  export * from '@sodax/types';
3
+ export { SodaxFeature } from '@sodax/types';
3
4
  import * as viem from 'viem';
4
5
  import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, HttpTransport, Hash, GetLogsReturnType } from 'viem';
5
6
  import { StacksNetwork, ClarityValue } from '@sodax/libs/stacks/core';
@@ -30,6 +31,7 @@ import BigNumber$1 from 'bignumber.js';
30
31
  * The closed-union type `SodaxErrorCode` is the default generic of `SodaxError<C>`, so any
31
32
  * throw with an unlisted string code is a compile error — additions go through this file.
32
33
  */
34
+
33
35
  /**
34
36
  * Reason-only error codes. Each code answers "what kind of failure was this?", not
35
37
  * "which feature?".
@@ -53,16 +55,12 @@ import BigNumber$1 from 'bignumber.js';
53
55
  * because retry semantics differ — re-estimation is cheap, retry-on-failure is the norm).
54
56
  * - `LOOKUP_FAILED` — any other read-only on-chain query / off-chain config fetch.
55
57
  * `context.method` partitions this code (`'getStakingInfo'`, `'getBridgeableAmount'`, …).
56
- * - `EXTERNAL_API_ERROR` — an upstream API call failed (e.g. solver, backend). `context.api`
58
+ * - `EXTERNAL_API_ERROR` — an upstream API call failed (e.g. solver, backend, swaps). `context.api`
57
59
  * identifies which service.
58
60
  * - `UNKNOWN` — last-resort catch in an outer `try`. Should be extremely rare in production.
59
61
  */
60
62
  type SodaxErrorCode = 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'EXECUTION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED' | 'GAS_ESTIMATION_FAILED' | 'LOOKUP_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN';
61
- /**
62
- * The producing feature of a SodaxError. Required at construction so consumers /
63
- * loggers always have a feature tag.
64
- */
65
- type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery' | 'leverageYield';
63
+
66
64
  /**
67
65
  * Orchestration phase tag attached via `context.phase`. Canonical superset across all
68
66
  * features — all features draw from this list rather than minting their own.
@@ -108,7 +106,7 @@ type SodaxErrorContext = {
108
106
  srcChainKey?: string;
109
107
  dstChainKey?: string;
110
108
  relayCode?: RelayCode;
111
- api?: 'solver' | 'backend';
109
+ api?: 'solver' | 'backend' | 'swaps';
112
110
  method?: string;
113
111
  direction?: 'forward' | 'reverse';
114
112
  field?: string;
@@ -133,7 +131,7 @@ declare const LOOKUP_CODES: ReadonlySet<LookupErrorCode>;
133
131
  /** Runtime list of all valid error codes — useful for membership checks and exhaustive switches. */
134
132
  declare const SODAX_ERROR_CODES: readonly ["VALIDATION_FAILED", "INTENT_CREATION_FAILED", "EXECUTION_FAILED", "TX_VERIFICATION_FAILED", "TX_SUBMIT_FAILED", "RELAY_TIMEOUT", "RELAY_FAILED", "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED", "GAS_ESTIMATION_FAILED", "LOOKUP_FAILED", "EXTERNAL_API_ERROR", "UNKNOWN"];
135
133
  /** Runtime list of all valid feature tags. */
136
- declare const SODAX_FEATURES: readonly ["swap", "moneyMarket", "bridge", "staking", "migration", "dex", "partner", "recovery", "leverageYield"];
134
+ declare const SODAX_FEATURES: readonly ["swap", "moneyMarket", "bridge", "staking", "migration", "dex", "partner", "recovery", "backend", "leverageYield"];
137
135
 
138
136
  /**
139
137
  * Canonical error type for the SODAX SDK.
@@ -4851,6 +4849,113 @@ declare const ProtocolIntentsAbi: readonly [{
4851
4849
  }];
4852
4850
  }];
4853
4851
  readonly stateMutability: "view";
4852
+ }, {
4853
+ readonly type: "function";
4854
+ readonly name: "cancelIntent";
4855
+ readonly inputs: readonly [{
4856
+ readonly name: "fromToken";
4857
+ readonly type: "address";
4858
+ readonly internalType: "address";
4859
+ }, {
4860
+ readonly name: "toToken";
4861
+ readonly type: "address";
4862
+ readonly internalType: "address";
4863
+ }];
4864
+ readonly outputs: readonly [];
4865
+ readonly stateMutability: "nonpayable";
4866
+ }, {
4867
+ readonly type: "function";
4868
+ readonly name: "getUserIntent";
4869
+ readonly inputs: readonly [{
4870
+ readonly name: "user";
4871
+ readonly type: "address";
4872
+ readonly internalType: "address";
4873
+ }, {
4874
+ readonly name: "fromToken";
4875
+ readonly type: "address";
4876
+ readonly internalType: "address";
4877
+ }, {
4878
+ readonly name: "toToken";
4879
+ readonly type: "address";
4880
+ readonly internalType: "address";
4881
+ }];
4882
+ readonly outputs: readonly [{
4883
+ readonly name: "intentHash";
4884
+ readonly type: "bytes32";
4885
+ readonly internalType: "bytes32";
4886
+ }];
4887
+ readonly stateMutability: "view";
4888
+ }, {
4889
+ readonly type: "function";
4890
+ readonly name: "getIntentDetails";
4891
+ readonly inputs: readonly [{
4892
+ readonly name: "intentHash";
4893
+ readonly type: "bytes32";
4894
+ readonly internalType: "bytes32";
4895
+ }];
4896
+ readonly outputs: readonly [{
4897
+ readonly name: "intent";
4898
+ readonly type: "tuple";
4899
+ readonly internalType: "struct Intents.Intent";
4900
+ readonly components: readonly [{
4901
+ readonly name: "intentId";
4902
+ readonly type: "uint256";
4903
+ readonly internalType: "uint256";
4904
+ }, {
4905
+ readonly name: "creator";
4906
+ readonly type: "address";
4907
+ readonly internalType: "address";
4908
+ }, {
4909
+ readonly name: "inputToken";
4910
+ readonly type: "address";
4911
+ readonly internalType: "address";
4912
+ }, {
4913
+ readonly name: "outputToken";
4914
+ readonly type: "address";
4915
+ readonly internalType: "address";
4916
+ }, {
4917
+ readonly name: "inputAmount";
4918
+ readonly type: "uint256";
4919
+ readonly internalType: "uint256";
4920
+ }, {
4921
+ readonly name: "minOutputAmount";
4922
+ readonly type: "uint256";
4923
+ readonly internalType: "uint256";
4924
+ }, {
4925
+ readonly name: "deadline";
4926
+ readonly type: "uint256";
4927
+ readonly internalType: "uint256";
4928
+ }, {
4929
+ readonly name: "allowPartialFill";
4930
+ readonly type: "bool";
4931
+ readonly internalType: "bool";
4932
+ }, {
4933
+ readonly name: "srcChain";
4934
+ readonly type: "uint256";
4935
+ readonly internalType: "uint256";
4936
+ }, {
4937
+ readonly name: "dstChain";
4938
+ readonly type: "uint256";
4939
+ readonly internalType: "uint256";
4940
+ }, {
4941
+ readonly name: "srcAddress";
4942
+ readonly type: "bytes";
4943
+ readonly internalType: "bytes";
4944
+ }, {
4945
+ readonly name: "dstAddress";
4946
+ readonly type: "bytes";
4947
+ readonly internalType: "bytes";
4948
+ }, {
4949
+ readonly name: "solver";
4950
+ readonly type: "address";
4951
+ readonly internalType: "address";
4952
+ }, {
4953
+ readonly name: "data";
4954
+ readonly type: "bytes";
4955
+ readonly internalType: "bytes";
4956
+ }];
4957
+ }];
4958
+ readonly stateMutability: "view";
4854
4959
  }];
4855
4960
 
4856
4961
  declare const sonicWalletFactoryAbi: readonly [{
@@ -7383,6 +7488,195 @@ type RequestOverrideConfig = {
7383
7488
  timeout?: number;
7384
7489
  headers?: Record<string, string>;
7385
7490
  };
7491
+
7492
+ /**
7493
+ * {@link ISwapsApiV2} with every method's return wrapped in `Result<T>` and an
7494
+ * optional trailing `RequestOverrideConfig`. `SwapsApiService` implements this
7495
+ * (rather than `ISwapsApiV2` directly) because it never throws — like
7496
+ * `BackendApiService`, it returns `{ ok: false }` on failure instead of
7497
+ * `Promise<T>` rejection. The mapped type keeps the class in lockstep with the
7498
+ * canonical interface: every endpoint is covered with its exact payload types.
7499
+ */
7500
+ type ResultifiedSwapsApiV2 = {
7501
+ [K in keyof ISwapsApiV2]: ISwapsApiV2[K] extends (...args: infer A) => Promise<infer R> ? (...args: [...A, config?: RequestOverrideConfig]) => Promise<Result<R>> : never;
7502
+ };
7503
+ /**
7504
+ * HTTP client for the backend **Swaps API v2** (`/swaps/*`).
7505
+ *
7506
+ * Mirrors every endpoint of {@link ISwapsApiV2} (one method per route) and
7507
+ * validates each response at runtime with a valibot schema (see
7508
+ * `swapsApiSchemas.ts`). On a contract drift, the response is rejected as
7509
+ * `{ ok: false }` with a descriptive error rather than returned untyped.
7510
+ *
7511
+ * All public methods return `Promise<Result<T>>` — they never throw. On network
7512
+ * failure, timeout, non-2xx HTTP response, or response-shape validation failure,
7513
+ * the returned Result has `ok: false` with a canonical
7514
+ * `SodaxError<'EXTERNAL_API_ERROR'>` (`feature: 'backend'`, `context.api: 'swaps'`)
7515
+ * in the `error` field; the underlying failure is preserved on `error.cause`.
7516
+ *
7517
+ * Per-call request overrides (base URL, timeout, headers) can be passed as the
7518
+ * optional last argument to any method via `RequestOverrideConfig`.
7519
+ *
7520
+ * Reachable on the Sodax facade as `sodax.api.swaps`.
7521
+ */
7522
+ declare class SwapsApiService implements ResultifiedSwapsApiV2 {
7523
+ private readonly config;
7524
+ private readonly headers;
7525
+ private readonly logger;
7526
+ constructor(config: SwapsApiConfig, logger?: SodaxLogger);
7527
+ /**
7528
+ * Issues a single HTTP request, validates the JSON body against `schema`, and
7529
+ * wraps the result in `Result<T>`. The service-level `baseURL`/`timeout`/
7530
+ * `headers` are merged with the optional per-call `overrideConfig` (which takes
7531
+ * precedence) inside {@link makeRequest}. Every public method delegates here.
7532
+ */
7533
+ private request;
7534
+ /**
7535
+ * Fetch all supported swap tokens grouped by SpokeChainKey.
7536
+ *
7537
+ * @returns `Result<GetSwapTokensResponseV2>` — map of chain key → token list.
7538
+ */
7539
+ getTokens(config?: RequestOverrideConfig): Promise<Result<GetSwapTokensResponseV2>>;
7540
+ /**
7541
+ * Fetch supported swap tokens for a single SpokeChainKey.
7542
+ *
7543
+ * @param chainKey - SODAX SpokeChainKey (e.g. `0xa4b1.arbitrum`, `solana`).
7544
+ * @returns `Result<GetSwapTokensByChainResponseV2>` — token list for the chain.
7545
+ */
7546
+ getTokensByChain(chainKey: string, config?: RequestOverrideConfig): Promise<Result<GetSwapTokensByChainResponseV2>>;
7547
+ /**
7548
+ * Get a solver quote for a cross-chain swap.
7549
+ *
7550
+ * Pass `query.includeTxData = true` to also build an unsigned create-intent
7551
+ * transaction (`txData`) using the quoted amount as `minOutputAmount`; in that
7552
+ * case `srcAddress`/`dstAddress` are required in the body.
7553
+ *
7554
+ * @returns `Result<QuoteResponseV2>` — `quotedAmount` (decimal string) and optional `txData`.
7555
+ */
7556
+ getQuote(body: QuoteRequestV2, query?: QuoteQueryV2, config?: RequestOverrideConfig): Promise<Result<QuoteResponseV2>>;
7557
+ /**
7558
+ * Compute a swap deadline (hub timestamp + `offsetSeconds`, default 300s).
7559
+ *
7560
+ * @returns `Result<DeadlineResponseV2>` — unix-seconds deadline (decimal string).
7561
+ */
7562
+ getDeadline(query?: DeadlineQueryV2, config?: RequestOverrideConfig): Promise<Result<DeadlineResponseV2>>;
7563
+ /**
7564
+ * Check whether the source token allowance is already sufficient for the intent.
7565
+ *
7566
+ * @returns `Result<AllowanceCheckResponseV2>` — `{ valid }`.
7567
+ */
7568
+ checkAllowance(body: CreateIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<AllowanceCheckResponseV2>>;
7569
+ /**
7570
+ * Build an unsigned token-approval transaction for the source token.
7571
+ *
7572
+ * @returns `Result<ApproveResponseV2>` — `{ tx }` (chain-specific unsigned tx).
7573
+ */
7574
+ approve(body: CreateIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<ApproveResponseV2>>;
7575
+ /**
7576
+ * Build an unsigned create-intent transaction.
7577
+ *
7578
+ * @returns `Result<CreateIntentResponseV2>` — `{ tx, intent, relayData }`.
7579
+ */
7580
+ createIntent(body: CreateIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<CreateIntentResponseV2>>;
7581
+ /**
7582
+ * Submit the broadcast intent tx to the relay.
7583
+ *
7584
+ * @returns `Result<SubmitIntentResponseV2>` — `{ result }` (opaque relay response).
7585
+ */
7586
+ submitIntent(body: SubmitIntentRequestV2, config?: RequestOverrideConfig): Promise<Result<SubmitIntentResponseV2>>;
7587
+ /**
7588
+ * Poll the solver for intent execution status.
7589
+ *
7590
+ * @returns `Result<StatusResponseV2>` — `{ status, fillTxHash? }` (`fillTxHash` set when `status === 3`).
7591
+ */
7592
+ getStatus(body: StatusRequestV2, config?: RequestOverrideConfig): Promise<Result<StatusResponseV2>>;
7593
+ /**
7594
+ * Build an unsigned cancel-intent transaction. The `intent` field carries
7595
+ * `bigint` numerics — {@link toJsonBody} serializes them to decimal strings.
7596
+ *
7597
+ * @returns `Result<CancelIntentResponseV2>` — `{ tx }`.
7598
+ */
7599
+ cancelIntent(body: CancelIntentRequestV2, config?: RequestOverrideConfig): Promise<Result<CancelIntentResponseV2>>;
7600
+ /**
7601
+ * Compute the keccak256 hash of an Intent struct. The `intent` field carries
7602
+ * `bigint` numerics — {@link toJsonBody} serializes them to decimal strings.
7603
+ *
7604
+ * @returns `Result<IntentHashResponseV2>` — `{ hash }`.
7605
+ */
7606
+ getIntentHash(body: IntentHashRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentHashResponseV2>>;
7607
+ /**
7608
+ * Long-poll the relayer until the fill packet lands on the destination chain.
7609
+ *
7610
+ * @returns `Result<IntentPacketResponseV2>` — delivered packet data.
7611
+ */
7612
+ getSolvedIntentPacket(body: IntentPacketRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentPacketResponseV2>>;
7613
+ /**
7614
+ * Recover the relay extra data needed by `/swaps/intents/submit`. Provide
7615
+ * EITHER `txHash` OR `intent` (whose `bigint` numerics {@link toJsonBody} serializes).
7616
+ *
7617
+ * @returns `Result<IntentExtraDataResponseV2>` — `{ address, payload }`.
7618
+ */
7619
+ getIntentSubmitTxExtraData(body: IntentExtraDataRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentExtraDataResponseV2>>;
7620
+ /**
7621
+ * Get the on-chain fill state for an intent by its hub-chain tx hash.
7622
+ *
7623
+ * @returns `Result<IntentStateV2>` — `{ exists, remainingInput, receivedOutput, pendingPayment }`.
7624
+ */
7625
+ getFilledIntent(txHash: string, config?: RequestOverrideConfig): Promise<Result<IntentStateV2>>;
7626
+ /**
7627
+ * Look up an Intent struct by its hub-chain creation tx hash.
7628
+ *
7629
+ * @returns `Result<GetIntentResponseV2>` — the decoded intent (bigint fields as decimal strings).
7630
+ */
7631
+ getIntent(txHash: string, config?: RequestOverrideConfig): Promise<Result<GetIntentResponseV2>>;
7632
+ /**
7633
+ * Build an unsigned create-limit-order-intent transaction (same as create-intent
7634
+ * but `deadline` is optional).
7635
+ *
7636
+ * @returns `Result<CreateLimitOrderResponseV2>` — `{ tx, intent, relayData }`.
7637
+ */
7638
+ createLimitOrderIntent(body: CreateLimitOrderParamsV2, config?: RequestOverrideConfig): Promise<Result<CreateLimitOrderResponseV2>>;
7639
+ /**
7640
+ * Estimate gas for a raw transaction on a spoke chain.
7641
+ *
7642
+ * @returns `Result<GasEstimateResponseV2>` — `{ gas }` (chain-specific shape).
7643
+ */
7644
+ estimateGas(body: GasEstimateRequestV2, config?: RequestOverrideConfig): Promise<Result<GasEstimateResponseV2>>;
7645
+ /**
7646
+ * Compute the partner fee for a given input amount.
7647
+ *
7648
+ * @returns `Result<FeeResponseV2>` — `{ fee }` (decimal string).
7649
+ */
7650
+ getPartnerFee(query: FeeQueryV2, config?: RequestOverrideConfig): Promise<Result<FeeResponseV2>>;
7651
+ /**
7652
+ * Compute the protocol (solver) fee for a given input amount.
7653
+ *
7654
+ * @returns `Result<FeeResponseV2>` — `{ fee }` (decimal string).
7655
+ */
7656
+ getSolverFee(query: FeeQueryV2, config?: RequestOverrideConfig): Promise<Result<FeeResponseV2>>;
7657
+ /**
7658
+ * Submit a swap transaction to be processed (relay, post-execution, etc.). The
7659
+ * `intent` field carries `bigint` numerics — {@link toJsonBody} serializes them.
7660
+ * Idempotent on `(txHash, srcChainKey)`.
7661
+ *
7662
+ * @returns `Result<SubmitTxResponseV2>` — `{ success, data: { status, message } }`.
7663
+ */
7664
+ submitTx(body: SubmitTxRequestV2, config?: RequestOverrideConfig): Promise<Result<SubmitTxResponseV2>>;
7665
+ /**
7666
+ * Get the processing status of a submitted swap transaction by `(txHash, srcChainKey)`.
7667
+ *
7668
+ * @returns `Result<SubmitTxStatusResponseV2>` — `{ success, data }` (processing state).
7669
+ */
7670
+ getSubmitTxStatus(query: SubmitTxStatusQueryV2, config?: RequestOverrideConfig): Promise<Result<SubmitTxStatusResponseV2>>;
7671
+ /**
7672
+ * Merge additional headers into the service's default header set. Existing
7673
+ * keys are overwritten; keys absent from `headers` are preserved.
7674
+ */
7675
+ setHeaders(headers: Record<string, string>): void;
7676
+ /** Return the base URL the service is currently pointing at. */
7677
+ getBaseURL(): string;
7678
+ }
7679
+
7386
7680
  /** Full details of a single swap intent as stored and returned by the backend. */
7387
7681
  interface IntentResponse {
7388
7682
  intentHash: string;
@@ -7394,16 +7688,16 @@ interface IntentResponse {
7394
7688
  intent: {
7395
7689
  intentId: string;
7396
7690
  creator: string;
7397
- inputToken: `0x${string}`;
7398
- outputToken: `0x${string}`;
7691
+ inputToken: string;
7692
+ outputToken: string;
7399
7693
  inputAmount: string;
7400
7694
  minOutputAmount: string;
7401
7695
  deadline: string;
7402
7696
  allowPartialFill: boolean;
7403
7697
  srcChain: number;
7404
7698
  dstChain: number;
7405
- srcAddress: `0x${string}`;
7406
- dstAddress: `0x${string}`;
7699
+ srcAddress: string;
7700
+ dstAddress: string;
7407
7701
  solver: string;
7408
7702
  data: string;
7409
7703
  };
@@ -7516,37 +7810,54 @@ interface MoneyMarketBorrowers {
7516
7810
  * - **Money market** — query per-user positions, per-reserve asset stats,
7517
7811
  * and paginated borrower/supplier lists.
7518
7812
  *
7519
- * All public methods return `Promise<Result<T>>` — they never throw. On
7520
- * network failure, timeout, or a non-2xx HTTP response the returned Result
7521
- * has `ok: false` with a descriptive `Error` in the `error` field.
7813
+ * All public methods return `Promise<Result<T>>` — they never throw. On network
7814
+ * failure, timeout, non-2xx HTTP response, or unexpected response shape the
7815
+ * returned Result has `ok: false` with a canonical `SodaxError<'EXTERNAL_API_ERROR'>`
7816
+ * (`feature: 'backend'`, `context.api: 'backend'`) in the `error` field; the
7817
+ * underlying failure is preserved on `error.cause`.
7522
7818
  *
7523
7819
  * Per-call request overrides (base URL, timeout, headers) can be passed as
7524
7820
  * the optional last argument to any method via `RequestOverrideConfig`.
7525
7821
  */
7526
- declare class BackendApiService implements IConfigApi {
7822
+ declare class BackendApiService implements IConfigApiV1 {
7823
+ readonly swaps: SwapsApiService;
7527
7824
  private readonly config;
7528
7825
  private readonly headers;
7529
7826
  private readonly logger;
7530
7827
  constructor(config: ApiConfig, logger?: SodaxLogger);
7531
- /**
7532
- * Execute a single HTTP request and return the parsed JSON body.
7533
- *
7534
- * Applies an `AbortController`-backed timeout (falls back to `this.config.timeout`
7535
- * when `config.timeout` is absent). Throws on non-2xx status codes or when the
7536
- * request exceeds the timeout, so callers should use {@link request} instead of
7537
- * calling this directly.
7538
- *
7539
- * @throws `Error('HTTP_REQUEST_FAILED')` on non-2xx responses.
7540
- * @throws `Error('REQUEST_TIMEOUT')` when the request exceeds the timeout.
7541
- * @throws `Error('UNKNOWN_REQUEST_ERROR')` for any other unexpected failure.
7542
- */
7543
- private makeRequest;
7544
7828
  /**
7545
7829
  * Wraps {@link makeRequest} in a `Result<T>` so all errors are captured rather
7546
7830
  * than propagated as thrown exceptions. Every public endpoint method delegates
7547
7831
  * here instead of calling `makeRequest` directly.
7548
7832
  */
7833
+ /**
7834
+ * Fold any per-call override (carried on `config` alongside `method`/`body`) over the service
7835
+ * defaults: baseURL truthy-fallback (an empty-string override defers to the default), timeout
7836
+ * nullish-fallback, headers merged (override wins per key). Mirrors the original makeRequest merge.
7837
+ */
7838
+ private resolveRequestConfig;
7839
+ /**
7840
+ * Wrap a thrown transport failure (HTTP_REQUEST_FAILED / REQUEST_TIMEOUT / network error) as the
7841
+ * canonical backend `SodaxError` — identical shape to SwapsApiService; the underlying failure is
7842
+ * preserved on `error.cause`.
7843
+ */
7844
+ private toExternalApiError;
7845
+ /**
7846
+ * Issue a request and validate the JSON body against `schema`, wrapping the result in `Result<T>`.
7847
+ * Mirrors {@link SwapsApiService}: a 2xx body that fails the schema is surfaced as
7848
+ * `EXTERNAL_API_ERROR` (`context.reason: 'invalid_response_shape'`) rather than returned untyped.
7849
+ * Every data/token/money-market method delegates here; the config/relay reads use
7850
+ * {@link requestUnvalidated} instead.
7851
+ */
7549
7852
  private request;
7853
+ /**
7854
+ * Issue a request WITHOUT response-shape validation (passthrough typing). Reserved for the
7855
+ * config/relay reads whose shapes are too large/brittle to schema-validate (`SodaxConfig` via
7856
+ * `getAllConfig`, `SpokeChainConfigMap` via `getSpokeChainConfig`) or carry `bigint` values that
7857
+ * cannot survive JSON validation (`getRelayChainIdMap`). `ConfigService` version-gates and falls
7858
+ * back to packaged defaults, so it relies on no response-shape guarantee from these endpoints.
7859
+ */
7860
+ private requestUnvalidated;
7550
7861
  /**
7551
7862
  * Fetch a swap intent by the hub-chain transaction hash that created it.
7552
7863
  *
@@ -7565,34 +7876,6 @@ declare class BackendApiService implements IConfigApi {
7565
7876
  * @returns `Result<IntentResponse>` — on success, the full intent details.
7566
7877
  */
7567
7878
  getIntentByHash(intentHash: string, config?: RequestOverrideConfig): Promise<Result<IntentResponse>>;
7568
- /**
7569
- * Submit a signed spoke-chain swap transaction to the backend for processing.
7570
- *
7571
- * The backend relays the transaction to the hub chain, posts execution data
7572
- * to the solver, and advances the intent through its lifecycle. The response
7573
- * shape is validated at runtime via a type guard; an invalid shape is
7574
- * returned as `{ ok: false }`.
7575
- *
7576
- * @param params - The signed transaction hash, source chain key, sender wallet
7577
- * address, intent data, and relay data required to process the swap.
7578
- * @returns `Result<SubmitSwapTxResponse>` — on success, a confirmation object
7579
- * with `success: true` and a human-readable `message`.
7580
- */
7581
- submitSwapTx(params: SubmitSwapTxRequest, config?: RequestOverrideConfig): Promise<Result<SubmitSwapTxResponse>>;
7582
- /**
7583
- * Poll the backend relay pipeline for the current status of a previously
7584
- * submitted swap transaction.
7585
- *
7586
- * Status progresses through: `pending` → `verifying` → `verified` →
7587
- * `relaying` → `relayed` → `posting_execution` → `executed` (or `failed`).
7588
- *
7589
- * @param params - Object containing the source-chain transaction hash and,
7590
- * optionally, the source chain key to disambiguate cross-chain hashes.
7591
- * @returns `Result<SubmitSwapTxStatusResponse>` — on success, includes the
7592
- * current `status`, any `failureReason`, and (once executed) the
7593
- * `dstIntentTxHash` on the hub chain.
7594
- */
7595
- getSubmitSwapTxStatus(params: GetSubmitSwapTxStatusParams, config?: RequestOverrideConfig): Promise<Result<SubmitSwapTxStatusResponse>>;
7596
7879
  /**
7597
7880
  * Fetch a paginated snapshot of the solver orderbook — open swap intents
7598
7881
  * that are currently waiting to be filled by the solver.
@@ -7798,6 +8081,10 @@ declare class BackendApiService implements IConfigApi {
7798
8081
  * without constructing a new service instance. Existing header keys are
7799
8082
  * overwritten; keys absent from `headers` are preserved.
7800
8083
  *
8084
+ * The headers are also fanned out to the sub-services (`swaps`), which hold
8085
+ * their own header copies — so a token set here applies to every request made
8086
+ * through this client, including `swaps.*`.
8087
+ *
7801
8088
  * @param headers - Key-value pairs to add or overwrite in the default headers.
7802
8089
  */
7803
8090
  setHeaders(headers: Record<string, string>): void;
@@ -7809,6 +8096,59 @@ declare class BackendApiService implements IConfigApi {
7809
8096
  getBaseURL(): string;
7810
8097
  }
7811
8098
 
8099
+ /**
8100
+ * Optional per-phase payload builders for {@link ResolvedAnalytics.trackResult}. Each is a lazy thunk
8101
+ * invoked only if its event actually emits, so payloads are never built when analytics is off.
8102
+ * `success` receives the resolved value, `failure` the `Result` error.
8103
+ */
8104
+ interface AnalyticsActionData<T, E> {
8105
+ start?: () => Record<string, unknown>;
8106
+ success?: (value: T) => Record<string, unknown>;
8107
+ failure?: (error: E) => Record<string, unknown>;
8108
+ }
8109
+ /**
8110
+ * The SDK-internal analytics emitter, resolved once from the consumer's {@link AnalyticsOption} and
8111
+ * held on `ConfigService` (`config.analytics`).
8112
+ *
8113
+ * Services never touch the raw config — they call {@link ResolvedAnalytics.emit}, which is the only
8114
+ * gate. When analytics is disabled, off for a feature/action, or above the configured detail level,
8115
+ * the `build` thunk is never invoked, so event payloads are never constructed on hot feature paths.
8116
+ * This is what keeps feature code free of analytics overhead unless a consumer explicitly opts in.
8117
+ */
8118
+ interface ResolvedAnalytics {
8119
+ /**
8120
+ * Whether an event for `feature`/`action` at `level` would be emitted. Call sites rarely need this
8121
+ * directly — {@link emit} checks it internally — but it is exposed for the rare case where even
8122
+ * deciding what to emit is itself costly. Omit `action` to ask whether the feature is tracked at all.
8123
+ */
8124
+ isEnabled(feature: SodaxFeature, action?: string, level?: AnalyticsDetailLevel): boolean;
8125
+ /**
8126
+ * Emit one user-action event. `build` produces the optional structured payload and is invoked
8127
+ * lazily — only when the event passes the enabled/feature/action/level gate — so disabled analytics
8128
+ * costs nothing but a boolean check at the call site. A faulty consumer tracker can never break a
8129
+ * feature flow: delivery is wrapped and fire-and-forget.
8130
+ */
8131
+ emit(feature: SodaxFeature, action: string, phase: AnalyticsEventPhase, build?: () => Record<string, unknown>, level?: AnalyticsDetailLevel): void;
8132
+ /**
8133
+ * Wrap a `Result`-returning action flow: emit `start` before `run`, then `success` or `failure`
8134
+ * from the resolved `Result` (and `failure` + rethrow if `run` throws), returning the `Result`
8135
+ * unchanged. This is the canonical way to instrument a feature method — one call at the boundary
8136
+ * covers every internal return point, so action code stays free of scattered emit calls.
8137
+ */
8138
+ trackResult<T, E>(feature: SodaxFeature, action: string, run: () => Promise<Result<T, E>>, data?: AnalyticsActionData<T, E>): Promise<Result<T, E>>;
8139
+ }
8140
+ /** Disabled emitter: every gate is closed, `build` is never called, nothing is delivered. */
8141
+ declare const noopAnalytics: ResolvedAnalytics;
8142
+ /**
8143
+ * Resolve an {@link AnalyticsOption} (a config object, `false`, or `undefined`) into a concrete
8144
+ * {@link ResolvedAnalytics}.
8145
+ *
8146
+ * Defaults to {@link noopAnalytics} so analytics is **off** unless a consumer opts in with an
8147
+ * `AnalyticsConfig`. This mirrors `resolveLogger` but with the opposite default — logging is on by
8148
+ * default, analytics is off — per issue #175 ("no needless invocations unless explicitly enabled").
8149
+ */
8150
+ declare function resolveAnalytics(option: AnalyticsOption | undefined): ResolvedAnalytics;
8151
+
7812
8152
  type ConfigServiceConstructorParams = {
7813
8153
  api: BackendApiService;
7814
8154
  config: SodaxConfig;
@@ -7823,6 +8163,11 @@ type ConfigServiceConstructorParams = {
7823
8163
  * in {@link ConfigService.initialize} never replaces it. Defaults to the console logger when omitted.
7824
8164
  */
7825
8165
  logger?: SodaxLogger;
8166
+ /**
8167
+ * Pre-resolved analytics emitter. Like {@link logger}, held outside the swappable `SodaxConfig` so a
8168
+ * dynamic config fetch never replaces it. Defaults to the no-op (disabled) emitter when omitted.
8169
+ */
8170
+ analytics?: ResolvedAnalytics;
7826
8171
  /**
7827
8172
  * Global partner fee (the `fee` option passed to `new Sodax(...)`). Held outside the swappable
7828
8173
  * `SodaxConfig` — like {@link logger} — so a dynamic config fetch never replaces it. The backend
@@ -7835,13 +8180,17 @@ type ConfigServiceConstructorParams = {
7835
8180
  */
7836
8181
  declare class ConfigService {
7837
8182
  private sodax;
7838
- private readonly api;
7839
- private readonly userConfig?;
7840
8183
  /**
7841
8184
  * SDK log sink. Resolved once at construction and kept independent of {@link sodax} so that
7842
8185
  * {@link initialize}'s dynamic-config swap never clobbers it. Read by services via `config.logger`.
7843
8186
  */
7844
8187
  readonly logger: SodaxLogger;
8188
+ /**
8189
+ * Analytics emitter. Resolved once at construction and kept independent of {@link sodax} so that
8190
+ * {@link initialize}'s dynamic-config swap never clobbers it. Read by services via `config.analytics`;
8191
+ * disabled (no-op) unless the consumer passed an `analytics` config to `new Sodax(...)`.
8192
+ */
8193
+ readonly analytics: ResolvedAnalytics;
7845
8194
  /**
7846
8195
  * Global partner fee. Resolved once at construction and kept independent of {@link sodax} so that
7847
8196
  * {@link initialize}'s dynamic-config swap never clobbers it. The backend never supplies it — it is
@@ -7858,7 +8207,7 @@ declare class ConfigService {
7858
8207
  private stakedATokenAddressesSet;
7859
8208
  private chainToSupportedTokenAddressMap;
7860
8209
  private hubAssetToXTokenMap;
7861
- constructor({ api, config, userConfig, logger, fee }: ConfigServiceConstructorParams);
8210
+ constructor({ api, config, userConfig, logger, analytics, fee }: ConfigServiceConstructorParams);
7862
8211
  initialize(): Promise<Result<void>>;
7863
8212
  getChains(): GetChainsApiResponse;
7864
8213
  getSwapTokens(): GetSwapTokensApiResponse;
@@ -7869,6 +8218,14 @@ declare class ConfigService {
7869
8218
  getMoneyMarketReserveAssets(): GetMoneyMarketReserveAssetsApiResponse;
7870
8219
  isValidOriginalAssetAddress(chainId: SpokeChainKey, asset: OriginalAssetAddress): boolean;
7871
8220
  getOriginalAssetAddress(chainId: SpokeChainKey, hubAsset: Address): OriginalAssetAddress | undefined;
8221
+ /**
8222
+ * Resolves the {@link XToken} descriptor (hub asset, vault, decimals) for a hub-asset address.
8223
+ *
8224
+ * Useful when a caller holds a hub asset directly on Sonic that has no spoke-token entry under
8225
+ * the hub chain — e.g. a partner BTC fee held as the BTC hub asset, which only exists as a spoke
8226
+ * token on Bitcoin. Returns `undefined` when the address is not a known hub asset.
8227
+ */
8228
+ getXTokenFromHubAsset(hubAsset: string): XToken | undefined;
7872
8229
  getSpokeTokenFromOriginalAssetAddress(chainId: SpokeChainKey, originalAssetAddress: OriginalAssetAddress): XToken | undefined;
7873
8230
  isValidHubAsset(hubAsset: Address): boolean;
7874
8231
  /**
@@ -9188,6 +9545,26 @@ declare class BitcoinSpokeService {
9188
9545
  * Deposit operation - transfer BTC to the asset manager
9189
9546
  */
9190
9547
  deposit<Raw extends boolean = false>(params: DepositParams<BitcoinChainKey, Raw>): Promise<TxReturnType<BitcoinChainKey, Raw>>;
9548
+ /**
9549
+ * Sign and submit a TRADING-wallet raw transaction — the Bound-built *unsigned* PSBT returned by
9550
+ * `deposit({ raw: true })` / the Swaps API (`createIntent().tx.data`). Signs it with the wallet
9551
+ * provider's key, then sends it to Bound Exchange to co-sign with the second 2-of-2 key and
9552
+ * broadcast. Returns the broadcast tx id.
9553
+ *
9554
+ * This is the client-side completion of the TRADING deposit flow: the backend builds the PSBT
9555
+ * (it can't broadcast — the user's signature is missing), the client signs here, and Bound
9556
+ * co-signs + broadcasts. `relayData` ({ address, payload }) is the relay identity returned by
9557
+ * `createIntent()`; forwarding it lets Bound auto-resubmit a stuck relay. It is **not** recoverable
9558
+ * from `rawTx` (whose `to` is the asset manager, not the hub wallet), so callers must supply it.
9559
+ *
9560
+ * @throws if the chain is not in `TRADING` wallet mode (raw txs only exist in TRADING mode).
9561
+ */
9562
+ signAndSubmitRawTransaction(params: {
9563
+ rawTx: BitcoinRawTransaction;
9564
+ walletProvider: IBitcoinWalletProvider;
9565
+ relayData?: RelayExtraData;
9566
+ accessToken?: string;
9567
+ }): Promise<string>;
9191
9568
  /**
9192
9569
  * Build deposit PSBT with embedded cross-chain data
9193
9570
  */
@@ -9859,6 +10236,8 @@ type RelayAndWaitParams = {
9859
10236
  * requires coordinated updates across all callers — prefer adding a new code to
9860
10237
  * {@link RELAY_ERROR_CODES} over renaming.
9861
10238
  *
10239
+ * NOTE: if transaction was already relayed, post request will return { success: true, message: 'Transaction registered' }
10240
+ *
9862
10241
  * @param payload - The request payload containing the 'submit' action type and parameters.
9863
10242
  * @param apiUrl - The URL of the intent relay service.
9864
10243
  * @returns The response from the intent relay service.
@@ -11734,8 +12113,6 @@ declare function isSpokeApproveParamsStellar<K extends SpokeChainKey, Raw extend
11734
12113
  srcChainKey: StellarChainKey;
11735
12114
  }>;
11736
12115
  declare function isRawDestinationParams(value: unknown): value is RawDestinationParams;
11737
- declare function isSubmitSwapTxResponse(value: unknown): value is SubmitSwapTxResponse;
11738
- declare function isSubmitSwapTxStatusResponse(value: unknown): value is SubmitSwapTxStatusResponse;
11739
12116
  declare function isBitcoinWalletProviderType(wp: IWalletProvider): wp is IBitcoinWalletProvider;
11740
12117
  declare function isEvmWalletProviderType(walletProvider: IWalletProvider): walletProvider is IEvmWalletProvider;
11741
12118
  declare function isStellarWalletProviderType(walletProvider: IWalletProvider): walletProvider is IStellarWalletProvider;
@@ -11818,6 +12195,9 @@ type SwapServiceConstructorParams = {
11818
12195
  config: ConfigService;
11819
12196
  spoke: SpokeService;
11820
12197
  hubProvider: HubProvider;
12198
+ backendApi: BackendApiService;
12199
+ /** Opt-in backend submit-tx 2-step flow (from `SodaxOptions.swapsOptions.useBackendSubmitTx`). Default off. */
12200
+ useBackendSubmitTx?: boolean;
11821
12201
  };
11822
12202
  /**
11823
12203
  * Main entry point for the SODAX swap feature.
@@ -11842,7 +12222,9 @@ declare class SwapService {
11842
12222
  readonly solver: SolverConfig;
11843
12223
  readonly partnerFee: PartnerFee | undefined;
11844
12224
  readonly relayerApiEndpoint: HttpUrl;
11845
- constructor({ config, hubProvider, spoke }: SwapServiceConstructorParams);
12225
+ readonly backendApi: BackendApiService;
12226
+ readonly useBackendSubmitTx: boolean;
12227
+ constructor({ config, hubProvider, spoke, backendApi, useBackendSubmitTx }: SwapServiceConstructorParams);
11846
12228
  /**
11847
12229
  * Estimates the gas cost for a raw (unsigned) transaction on a spoke chain.
11848
12230
  *
@@ -11936,14 +12318,22 @@ declare class SwapService {
11936
12318
  /**
11937
12319
  * Executes a full end-to-end cross-chain swap.
11938
12320
  *
11939
- * Orchestrates the complete swap lifecycle:
11940
- * 1. Calls `createIntent` to submit the intent transaction on the source spoke chain.
11941
- * 2. Verifies the spoke transaction landed on-chain.
11942
- * 3. For non-hub source chains: submits the spoke tx to the relayer and waits for the
11943
- * relay packet to land on the hub (Sonic). Skipped when `srcChainKey` is the hub.
11944
- * 4. Calls `postExecution` to notify the solver, triggering it to fill the intent.
11945
- *
11946
- * @param _params - Swap action params including intent parameters, wallet provider, and optional timeout.
12321
+ * Orchestrates the complete swap lifecycle. `createIntent` first submits the intent transaction on
12322
+ * the source spoke chain; completion then runs via one of two paths, both bounded by a single
12323
+ * shared `timeout` budget:
12324
+ *
12325
+ * - **Client-side (default), {@link fallbackSwapSteps}:** verifies the spoke tx landed on-chain,
12326
+ * relays it to the hub (Sonic) and waits for the packet skipped when `srcChainKey` is the hub,
12327
+ * where the spoke tx already is the hub tx — then calls `postExecution` to notify the solver,
12328
+ * triggering it to fill the intent.
12329
+ * - **Backend 2-step (opt-in via `swapsOptions.useBackendSubmitTx`), {@link submitTx}:** hands the
12330
+ * broadcast tx to the swaps API, which verifies, relays and post-executes server-side, then polls
12331
+ * for completion. On ANY non-success it transparently falls back to the client-side path above —
12332
+ * safe because re-relaying / re-posting an already-processed swap is idempotent (no double-fill).
12333
+ *
12334
+ * @param _params - Swap action params including intent parameters, wallet provider, and an optional
12335
+ * `timeout` — the single shared budget for the whole completion flow (relay/poll plus any
12336
+ * fallback), so total wall-clock never exceeds it.
11947
12337
  * @returns A `Result<SwapResponse, SwapError>`. On success:
11948
12338
  * - `solverExecutionResponse` — solver acknowledgement (`{ answer: 'OK', intent_hash }`).
11949
12339
  * - `intent` — the on-chain intent object that was created.
@@ -11964,6 +12354,29 @@ declare class SwapService {
11964
12354
  * - `UNKNOWN` — uncategorized fallback.
11965
12355
  */
11966
12356
  swap<K extends SpokeChainKey>(_params: SwapActionParams<K, false>): Promise<Result<SwapResponse, SwapError>>;
12357
+ /**
12358
+ * Client-side swap completion (the default path): relay the broadcast intent tx to the hub — or
12359
+ * use it directly when the source IS the hub — then notify the solver via post-execution and
12360
+ * build the {@link SwapResponse}. Extracted verbatim from `swap()` so the opt-in backend 2-step
12361
+ * path ({@link submitTx}) can fall back to it on any non-success.
12362
+ */
12363
+ private fallbackSwapSteps;
12364
+ /**
12365
+ * Backend 2-step swap path (opt-in via `swapsOptions.useBackendSubmitTx`): hand the broadcast
12366
+ * intent tx to the swaps API (`POST /swaps/submit-tx`); the backend relays + post-executes
12367
+ * server-side. Polls `getSubmitTxStatus` until `executed`, then reconstructs the same
12368
+ * {@link SwapResponse} the client-side path returns (`result.dstIntentTxHash` → delivery info,
12369
+ * `result.intent_hash` → solver response).
12370
+ *
12371
+ * Never throws — returns `{ ok: false }` on any non-success (submit `!ok`, terminal `failed` /
12372
+ * abandoned, or poll timeout) so `swap()` falls back to {@link fallbackSwapSteps}.
12373
+ *
12374
+ * Falling back is safe: re-relaying / re-posting an already-processed swap is idempotent — the
12375
+ * relay dedups and returns the existing `executed` packet, and the solver re-affirms the intent
12376
+ * (no double-fill). Verified live by `e2e-tests/e2e-relay.test.ts`. Polling stops at
12377
+ * `deadline - reserve` so the fallback keeps a guaranteed slice of the shared `swap` budget.
12378
+ */
12379
+ private submitTx;
11967
12380
  /**
11968
12381
  * Checks whether the relevant spender contract is already approved to spend the input token amount.
11969
12382
  *
@@ -13060,6 +13473,16 @@ declare class BridgeService {
13060
13473
  * contains the hub wallet address and encoded hub execution payload needed for relay.
13061
13474
  */
13062
13475
  createBridgeIntent<K extends SpokeChainKey, Raw extends boolean>(_params: BridgeParams<K, Raw>): Promise<Result<IntentTxResult<K, Raw>, BridgeCreateIntentError>>;
13476
+ /**
13477
+ * Resolves a bridge endpoint's {@link XToken} descriptor from a chain key + token address.
13478
+ *
13479
+ * Spoke endpoints (and hub-native tokens such as USDC/WETH/S whose on-chain address equals their
13480
+ * hub asset) resolve by original asset address. On the hub a caller may instead hold a hub asset
13481
+ * that has no spoke-token entry under the hub chain — e.g. a partner BTC fee held as the BTC hub
13482
+ * asset, whose only spoke-token entry lives on Bitcoin. Resolve those by hub-asset address so the
13483
+ * Sonic-sourced "withdraw directly" bridge can find the matching vault/decimals.
13484
+ */
13485
+ private resolveBridgeEndpointToken;
13063
13486
  /**
13064
13487
  * Encodes the hub-side execution payload for a bridge operation.
13065
13488
  *
@@ -15839,6 +16262,18 @@ type PartnerFeeClaimSwapParams = {
15839
16262
  timeout?: number;
15840
16263
  };
15841
16264
  type PartnerFeeClaimSwapAction<K extends SpokeChainKey, Raw extends boolean> = SpokeExecActionParams<K, Raw, PartnerFeeClaimSwapParams>;
16265
+ type PartnerFeeClaimCancelParams = {
16266
+ srcChainKey: HubChainKey;
16267
+ srcAddress: Address$1;
16268
+ fromToken: Address$1;
16269
+ toToken: Address$1;
16270
+ };
16271
+ type PartnerFeeClaimCancelAction<K extends SpokeChainKey, Raw extends boolean> = SpokeExecActionParams<K, Raw, PartnerFeeClaimCancelParams>;
16272
+ type GetUserIntentParams = {
16273
+ user: Address$1;
16274
+ fromToken: Address$1;
16275
+ toToken: Address$1;
16276
+ };
15842
16277
  type PartnerFeeClaimServiceConstructorParams = {
15843
16278
  config: ConfigService;
15844
16279
  hubProvider: HubProvider;
@@ -15973,6 +16408,11 @@ declare class PartnerFeeClaimService {
15973
16408
  * This is the low-level building block. Use `swap` for the full flow that also waits for
15974
16409
  * the solver to execute the intent.
15975
16410
  *
16411
+ * Guards against same-token intents: if the configured output token equals `fromToken` the solver
16412
+ * cannot fill the swap, so the call is rejected with `VALIDATION_FAILED` before any transaction is
16413
+ * built. The guard fails closed — if the preference lookup fails the call returns that error rather
16414
+ * than submitting an intent that may become unfillable.
16415
+ *
15976
16416
  * @param _params - Action descriptor containing:
15977
16417
  * - `params.srcChainKey` — must be the hub chain key (Sonic).
15978
16418
  * - `params.srcAddress` — partner's EVM address; also used as the intent creator.
@@ -16003,10 +16443,59 @@ declare class PartnerFeeClaimService {
16003
16443
  *
16004
16444
  * On failure the `error` is tagged:
16005
16445
  * - `WAIT_INTENT_AUTO_SWAP_FAILED` — transaction was submitted but receipt polling failed.
16006
- * - Error from `createIntentAutoSwap` — if the initial submission failed.
16446
+ * - Error from `createIntentAutoSwap` — if the initial submission failed, including
16447
+ * `VALIDATION_FAILED` when the output token equals the fee token (same-token guard) or the
16448
+ * preference lookup that backs the guard fails.
16007
16449
  * - Error from `SolverApiService.postExecution` — if the solver notification failed.
16008
16450
  */
16009
16451
  swap(_params: PartnerFeeClaimSwapAction<HubChainKey, false>): Promise<Result<IntentAutoSwapResult>>;
16452
+ /**
16453
+ * Cancels a partner fee-claim auto-swap intent and refunds the input token to the partner.
16454
+ *
16455
+ * This targets the ProtocolIntents contract's own `cancelIntent(fromToken, toToken)`, which is
16456
+ * the only authorized cancel path for partner auto-swap intents: the intent's `creator` is the
16457
+ * ProtocolIntents contract (not the partner), so the generic `SwapService.cancelIntent` reverts
16458
+ * with `Unauthorized()`. ProtocolIntents looks up the caller's intent for the token pair, cancels
16459
+ * it in the main intents contract (as the creator), and transfers the locked `inputAmount` back
16460
+ * to the partner (`msg.sender`).
16461
+ *
16462
+ * Use this to recover funds stuck in an unfillable intent — most commonly a same-token claim
16463
+ * (`fromToken === toToken`) the solver refused to fill (see the guard in {@link swap}).
16464
+ *
16465
+ * @param _params - Action descriptor containing:
16466
+ * - `params.srcChainKey` — must be the hub chain key (Sonic).
16467
+ * - `params.srcAddress` — the partner's EVM address; must match the intent's owner.
16468
+ * - `params.fromToken` — the stuck intent's input (fee) token, hub-chain address.
16469
+ * - `params.toToken` — the stuck intent's output token, hub-chain address.
16470
+ * - `raw` — when `true`, returns the unsigned transaction object instead of submitting it.
16471
+ * - `walletProvider` — required when `raw` is `false`; must be an EVM wallet provider.
16472
+ * @returns A `Result` containing the submitted transaction hash (`raw: false`) or the unsigned
16473
+ * raw transaction (`raw: true`).
16474
+ */
16475
+ cancelIntent<Raw extends boolean>(_params: PartnerFeeClaimCancelAction<HubChainKey, Raw>): Promise<Result<TxReturnType<HubChainKey, Raw>>>;
16476
+ /**
16477
+ * Returns the stored intent hash for a partner's `(user, fromToken, toToken)` token pair.
16478
+ *
16479
+ * A non-zero hash means an auto-swap intent currently exists for that pair (e.g. an unfilled
16480
+ * same-token claim) and can be cancelled via {@link cancelIntent}. A zero hash
16481
+ * (`0x000…0`) means there is no open intent for the pair.
16482
+ *
16483
+ * @param params.user - The partner's EVM address on Sonic.
16484
+ * @param params.fromToken - Input (fee) token, hub-chain address.
16485
+ * @param params.toToken - Output token, hub-chain address.
16486
+ * @returns A `Result` containing the intent hash, or an `Error` tagged `LOOKUP_FAILED`.
16487
+ */
16488
+ getUserIntent({ user, fromToken, toToken }: GetUserIntentParams): Promise<Result<Hex, Error>>;
16489
+ /**
16490
+ * Reads the full {@link Intent} details for a stored intent hash from the ProtocolIntents contract.
16491
+ *
16492
+ * Useful for displaying a stuck intent before cancelling it — e.g. the locked `inputAmount` and
16493
+ * `inputToken`. Pair with {@link getUserIntent} to resolve the hash from a token pair.
16494
+ *
16495
+ * @param intentHash - The intent hash (from {@link getUserIntent}).
16496
+ * @returns A `Result` containing the `Intent`, or an `Error` tagged `LOOKUP_FAILED`.
16497
+ */
16498
+ getIntentDetails(intentHash: Hex): Promise<Result<Intent, Error>>;
16010
16499
  }
16011
16500
 
16012
16501
  type PartnerServiceConfig = {
@@ -16616,6 +17105,7 @@ declare class Sodax {
16616
17105
  readonly moneyMarket: MoneyMarketService;
16617
17106
  readonly migration: MigrationService;
16618
17107
  readonly backendApi: BackendApiService;
17108
+ readonly api: BackendApiService;
16619
17109
  readonly bridge: BridgeService;
16620
17110
  readonly staking: StakingService;
16621
17111
  readonly partners: PartnerService;
@@ -17266,4 +17756,4 @@ type DexErrorCode = LookupErrorCode;
17266
17756
  type DexError = SodaxError<DexErrorCode>;
17267
17757
  declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
17268
17758
 
17269
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, 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 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 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, 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 ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, 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, 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, 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, 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, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, 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, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
17759
+ export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, 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, 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 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, 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, 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, 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, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, 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, 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, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };