@sodax/sdk 2.0.0-rc.18 → 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.cjs +1187 -310
- package/dist/index.d.cts +304 -67
- package/dist/index.d.ts +304 -67
- package/dist/index.mjs +1186 -309
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SodaxFeature,
|
|
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
3
|
export { SodaxFeature } from '@sodax/types';
|
|
4
4
|
import * as viem from 'viem';
|
|
@@ -55,7 +55,7 @@ import BigNumber$1 from 'bignumber.js';
|
|
|
55
55
|
* because retry semantics differ — re-estimation is cheap, retry-on-failure is the norm).
|
|
56
56
|
* - `LOOKUP_FAILED` — any other read-only on-chain query / off-chain config fetch.
|
|
57
57
|
* `context.method` partitions this code (`'getStakingInfo'`, `'getBridgeableAmount'`, …).
|
|
58
|
-
* - `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`
|
|
59
59
|
* identifies which service.
|
|
60
60
|
* - `UNKNOWN` — last-resort catch in an outer `try`. Should be extremely rare in production.
|
|
61
61
|
*/
|
|
@@ -106,7 +106,7 @@ type SodaxErrorContext = {
|
|
|
106
106
|
srcChainKey?: string;
|
|
107
107
|
dstChainKey?: string;
|
|
108
108
|
relayCode?: RelayCode;
|
|
109
|
-
api?: 'solver' | 'backend';
|
|
109
|
+
api?: 'solver' | 'backend' | 'swaps';
|
|
110
110
|
method?: string;
|
|
111
111
|
direction?: 'forward' | 'reverse';
|
|
112
112
|
field?: string;
|
|
@@ -131,7 +131,7 @@ declare const LOOKUP_CODES: ReadonlySet<LookupErrorCode>;
|
|
|
131
131
|
/** Runtime list of all valid error codes — useful for membership checks and exhaustive switches. */
|
|
132
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"];
|
|
133
133
|
/** Runtime list of all valid feature tags. */
|
|
134
|
-
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"];
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Canonical error type for the SODAX SDK.
|
|
@@ -7488,6 +7488,195 @@ type RequestOverrideConfig = {
|
|
|
7488
7488
|
timeout?: number;
|
|
7489
7489
|
headers?: Record<string, string>;
|
|
7490
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
|
+
|
|
7491
7680
|
/** Full details of a single swap intent as stored and returned by the backend. */
|
|
7492
7681
|
interface IntentResponse {
|
|
7493
7682
|
intentHash: string;
|
|
@@ -7499,16 +7688,16 @@ interface IntentResponse {
|
|
|
7499
7688
|
intent: {
|
|
7500
7689
|
intentId: string;
|
|
7501
7690
|
creator: string;
|
|
7502
|
-
inputToken:
|
|
7503
|
-
outputToken:
|
|
7691
|
+
inputToken: string;
|
|
7692
|
+
outputToken: string;
|
|
7504
7693
|
inputAmount: string;
|
|
7505
7694
|
minOutputAmount: string;
|
|
7506
7695
|
deadline: string;
|
|
7507
7696
|
allowPartialFill: boolean;
|
|
7508
7697
|
srcChain: number;
|
|
7509
7698
|
dstChain: number;
|
|
7510
|
-
srcAddress:
|
|
7511
|
-
dstAddress:
|
|
7699
|
+
srcAddress: string;
|
|
7700
|
+
dstAddress: string;
|
|
7512
7701
|
solver: string;
|
|
7513
7702
|
data: string;
|
|
7514
7703
|
};
|
|
@@ -7621,37 +7810,54 @@ interface MoneyMarketBorrowers {
|
|
|
7621
7810
|
* - **Money market** — query per-user positions, per-reserve asset stats,
|
|
7622
7811
|
* and paginated borrower/supplier lists.
|
|
7623
7812
|
*
|
|
7624
|
-
* All public methods return `Promise<Result<T>>` — they never throw. On
|
|
7625
|
-
*
|
|
7626
|
-
* has `ok: false` with a
|
|
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`.
|
|
7627
7818
|
*
|
|
7628
7819
|
* Per-call request overrides (base URL, timeout, headers) can be passed as
|
|
7629
7820
|
* the optional last argument to any method via `RequestOverrideConfig`.
|
|
7630
7821
|
*/
|
|
7631
|
-
declare class BackendApiService implements
|
|
7822
|
+
declare class BackendApiService implements IConfigApiV1 {
|
|
7823
|
+
readonly swaps: SwapsApiService;
|
|
7632
7824
|
private readonly config;
|
|
7633
7825
|
private readonly headers;
|
|
7634
7826
|
private readonly logger;
|
|
7635
7827
|
constructor(config: ApiConfig, logger?: SodaxLogger);
|
|
7636
|
-
/**
|
|
7637
|
-
* Execute a single HTTP request and return the parsed JSON body.
|
|
7638
|
-
*
|
|
7639
|
-
* Applies an `AbortController`-backed timeout (falls back to `this.config.timeout`
|
|
7640
|
-
* when `config.timeout` is absent). Throws on non-2xx status codes or when the
|
|
7641
|
-
* request exceeds the timeout, so callers should use {@link request} instead of
|
|
7642
|
-
* calling this directly.
|
|
7643
|
-
*
|
|
7644
|
-
* @throws `Error('HTTP_REQUEST_FAILED')` on non-2xx responses.
|
|
7645
|
-
* @throws `Error('REQUEST_TIMEOUT')` when the request exceeds the timeout.
|
|
7646
|
-
* @throws `Error('UNKNOWN_REQUEST_ERROR')` for any other unexpected failure.
|
|
7647
|
-
*/
|
|
7648
|
-
private makeRequest;
|
|
7649
7828
|
/**
|
|
7650
7829
|
* Wraps {@link makeRequest} in a `Result<T>` so all errors are captured rather
|
|
7651
7830
|
* than propagated as thrown exceptions. Every public endpoint method delegates
|
|
7652
7831
|
* here instead of calling `makeRequest` directly.
|
|
7653
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
|
+
*/
|
|
7654
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;
|
|
7655
7861
|
/**
|
|
7656
7862
|
* Fetch a swap intent by the hub-chain transaction hash that created it.
|
|
7657
7863
|
*
|
|
@@ -7670,34 +7876,6 @@ declare class BackendApiService implements IConfigApi {
|
|
|
7670
7876
|
* @returns `Result<IntentResponse>` — on success, the full intent details.
|
|
7671
7877
|
*/
|
|
7672
7878
|
getIntentByHash(intentHash: string, config?: RequestOverrideConfig): Promise<Result<IntentResponse>>;
|
|
7673
|
-
/**
|
|
7674
|
-
* Submit a signed spoke-chain swap transaction to the backend for processing.
|
|
7675
|
-
*
|
|
7676
|
-
* The backend relays the transaction to the hub chain, posts execution data
|
|
7677
|
-
* to the solver, and advances the intent through its lifecycle. The response
|
|
7678
|
-
* shape is validated at runtime via a type guard; an invalid shape is
|
|
7679
|
-
* returned as `{ ok: false }`.
|
|
7680
|
-
*
|
|
7681
|
-
* @param params - The signed transaction hash, source chain key, sender wallet
|
|
7682
|
-
* address, intent data, and relay data required to process the swap.
|
|
7683
|
-
* @returns `Result<SubmitSwapTxResponse>` — on success, a confirmation object
|
|
7684
|
-
* with `success: true` and a human-readable `message`.
|
|
7685
|
-
*/
|
|
7686
|
-
submitSwapTx(params: SubmitSwapTxRequest, config?: RequestOverrideConfig): Promise<Result<SubmitSwapTxResponse>>;
|
|
7687
|
-
/**
|
|
7688
|
-
* Poll the backend relay pipeline for the current status of a previously
|
|
7689
|
-
* submitted swap transaction.
|
|
7690
|
-
*
|
|
7691
|
-
* Status progresses through: `pending` → `verifying` → `verified` →
|
|
7692
|
-
* `relaying` → `relayed` → `posting_execution` → `executed` (or `failed`).
|
|
7693
|
-
*
|
|
7694
|
-
* @param params - Object containing the source-chain transaction hash and,
|
|
7695
|
-
* optionally, the source chain key to disambiguate cross-chain hashes.
|
|
7696
|
-
* @returns `Result<SubmitSwapTxStatusResponse>` — on success, includes the
|
|
7697
|
-
* current `status`, any `failureReason`, and (once executed) the
|
|
7698
|
-
* `dstIntentTxHash` on the hub chain.
|
|
7699
|
-
*/
|
|
7700
|
-
getSubmitSwapTxStatus(params: GetSubmitSwapTxStatusParams, config?: RequestOverrideConfig): Promise<Result<SubmitSwapTxStatusResponse>>;
|
|
7701
7879
|
/**
|
|
7702
7880
|
* Fetch a paginated snapshot of the solver orderbook — open swap intents
|
|
7703
7881
|
* that are currently waiting to be filled by the solver.
|
|
@@ -7903,6 +8081,10 @@ declare class BackendApiService implements IConfigApi {
|
|
|
7903
8081
|
* without constructing a new service instance. Existing header keys are
|
|
7904
8082
|
* overwritten; keys absent from `headers` are preserved.
|
|
7905
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
|
+
*
|
|
7906
8088
|
* @param headers - Key-value pairs to add or overwrite in the default headers.
|
|
7907
8089
|
*/
|
|
7908
8090
|
setHeaders(headers: Record<string, string>): void;
|
|
@@ -7998,8 +8180,6 @@ type ConfigServiceConstructorParams = {
|
|
|
7998
8180
|
*/
|
|
7999
8181
|
declare class ConfigService {
|
|
8000
8182
|
private sodax;
|
|
8001
|
-
private readonly api;
|
|
8002
|
-
private readonly userConfig?;
|
|
8003
8183
|
/**
|
|
8004
8184
|
* SDK log sink. Resolved once at construction and kept independent of {@link sodax} so that
|
|
8005
8185
|
* {@link initialize}'s dynamic-config swap never clobbers it. Read by services via `config.logger`.
|
|
@@ -9365,6 +9545,26 @@ declare class BitcoinSpokeService {
|
|
|
9365
9545
|
* Deposit operation - transfer BTC to the asset manager
|
|
9366
9546
|
*/
|
|
9367
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>;
|
|
9368
9568
|
/**
|
|
9369
9569
|
* Build deposit PSBT with embedded cross-chain data
|
|
9370
9570
|
*/
|
|
@@ -10036,6 +10236,8 @@ type RelayAndWaitParams = {
|
|
|
10036
10236
|
* requires coordinated updates across all callers — prefer adding a new code to
|
|
10037
10237
|
* {@link RELAY_ERROR_CODES} over renaming.
|
|
10038
10238
|
*
|
|
10239
|
+
* NOTE: if transaction was already relayed, post request will return { success: true, message: 'Transaction registered' }
|
|
10240
|
+
*
|
|
10039
10241
|
* @param payload - The request payload containing the 'submit' action type and parameters.
|
|
10040
10242
|
* @param apiUrl - The URL of the intent relay service.
|
|
10041
10243
|
* @returns The response from the intent relay service.
|
|
@@ -11911,8 +12113,6 @@ declare function isSpokeApproveParamsStellar<K extends SpokeChainKey, Raw extend
|
|
|
11911
12113
|
srcChainKey: StellarChainKey;
|
|
11912
12114
|
}>;
|
|
11913
12115
|
declare function isRawDestinationParams(value: unknown): value is RawDestinationParams;
|
|
11914
|
-
declare function isSubmitSwapTxResponse(value: unknown): value is SubmitSwapTxResponse;
|
|
11915
|
-
declare function isSubmitSwapTxStatusResponse(value: unknown): value is SubmitSwapTxStatusResponse;
|
|
11916
12116
|
declare function isBitcoinWalletProviderType(wp: IWalletProvider): wp is IBitcoinWalletProvider;
|
|
11917
12117
|
declare function isEvmWalletProviderType(walletProvider: IWalletProvider): walletProvider is IEvmWalletProvider;
|
|
11918
12118
|
declare function isStellarWalletProviderType(walletProvider: IWalletProvider): walletProvider is IStellarWalletProvider;
|
|
@@ -11995,6 +12195,9 @@ type SwapServiceConstructorParams = {
|
|
|
11995
12195
|
config: ConfigService;
|
|
11996
12196
|
spoke: SpokeService;
|
|
11997
12197
|
hubProvider: HubProvider;
|
|
12198
|
+
backendApi: BackendApiService;
|
|
12199
|
+
/** Opt-in backend submit-tx 2-step flow (from `SodaxOptions.swapsOptions.useBackendSubmitTx`). Default off. */
|
|
12200
|
+
useBackendSubmitTx?: boolean;
|
|
11998
12201
|
};
|
|
11999
12202
|
/**
|
|
12000
12203
|
* Main entry point for the SODAX swap feature.
|
|
@@ -12019,7 +12222,9 @@ declare class SwapService {
|
|
|
12019
12222
|
readonly solver: SolverConfig;
|
|
12020
12223
|
readonly partnerFee: PartnerFee | undefined;
|
|
12021
12224
|
readonly relayerApiEndpoint: HttpUrl;
|
|
12022
|
-
|
|
12225
|
+
readonly backendApi: BackendApiService;
|
|
12226
|
+
readonly useBackendSubmitTx: boolean;
|
|
12227
|
+
constructor({ config, hubProvider, spoke, backendApi, useBackendSubmitTx }: SwapServiceConstructorParams);
|
|
12023
12228
|
/**
|
|
12024
12229
|
* Estimates the gas cost for a raw (unsigned) transaction on a spoke chain.
|
|
12025
12230
|
*
|
|
@@ -12113,14 +12318,22 @@ declare class SwapService {
|
|
|
12113
12318
|
/**
|
|
12114
12319
|
* Executes a full end-to-end cross-chain swap.
|
|
12115
12320
|
*
|
|
12116
|
-
* Orchestrates the complete swap lifecycle
|
|
12117
|
-
*
|
|
12118
|
-
*
|
|
12119
|
-
*
|
|
12120
|
-
*
|
|
12121
|
-
*
|
|
12122
|
-
*
|
|
12123
|
-
*
|
|
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.
|
|
12124
12337
|
* @returns A `Result<SwapResponse, SwapError>`. On success:
|
|
12125
12338
|
* - `solverExecutionResponse` — solver acknowledgement (`{ answer: 'OK', intent_hash }`).
|
|
12126
12339
|
* - `intent` — the on-chain intent object that was created.
|
|
@@ -12141,6 +12354,29 @@ declare class SwapService {
|
|
|
12141
12354
|
* - `UNKNOWN` — uncategorized fallback.
|
|
12142
12355
|
*/
|
|
12143
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;
|
|
12144
12380
|
/**
|
|
12145
12381
|
* Checks whether the relevant spender contract is already approved to spend the input token amount.
|
|
12146
12382
|
*
|
|
@@ -16869,6 +17105,7 @@ declare class Sodax {
|
|
|
16869
17105
|
readonly moneyMarket: MoneyMarketService;
|
|
16870
17106
|
readonly migration: MigrationService;
|
|
16871
17107
|
readonly backendApi: BackendApiService;
|
|
17108
|
+
readonly api: BackendApiService;
|
|
16872
17109
|
readonly bridge: BridgeService;
|
|
16873
17110
|
readonly staking: StakingService;
|
|
16874
17111
|
readonly partners: PartnerService;
|
|
@@ -17519,4 +17756,4 @@ type DexErrorCode = LookupErrorCode;
|
|
|
17519
17756
|
type DexError = SodaxError<DexErrorCode>;
|
|
17520
17757
|
declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
17521
17758
|
|
|
17522
|
-
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, 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, 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 };
|
|
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 };
|