@sodax/sdk 2.0.0-rc.13 → 2.0.0-rc.15
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 +443 -144
- package/dist/index.d.cts +140 -49
- package/dist/index.d.ts +140 -49
- package/dist/index.mjs +444 -147
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IConfigApi, ApiConfig, SodaxLogger, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, SodaxConfig,
|
|
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, 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';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
import * as viem from 'viem';
|
|
4
4
|
import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, HttpTransport, Hash, GetLogsReturnType } from 'viem';
|
|
@@ -7813,16 +7813,22 @@ type ConfigServiceConstructorParams = {
|
|
|
7813
7813
|
api: BackendApiService;
|
|
7814
7814
|
config: SodaxConfig;
|
|
7815
7815
|
/**
|
|
7816
|
-
* The raw user-provided config override (the `
|
|
7816
|
+
* The raw user-provided config override (the `SodaxOptions` passed to `new Sodax(...)`),
|
|
7817
7817
|
* NOT the merged result. Re-applied on top of dynamic config in {@link ConfigService.initialize} so
|
|
7818
7818
|
* that a remote config fetch never clobbers explicit user overrides.
|
|
7819
7819
|
*/
|
|
7820
|
-
userConfig?:
|
|
7820
|
+
userConfig?: SodaxOptions;
|
|
7821
7821
|
/**
|
|
7822
7822
|
* Pre-resolved SDK log sink. Held outside the swappable `SodaxConfig` so a dynamic config fetch
|
|
7823
7823
|
* in {@link ConfigService.initialize} never replaces it. Defaults to the console logger when omitted.
|
|
7824
7824
|
*/
|
|
7825
7825
|
logger?: SodaxLogger;
|
|
7826
|
+
/**
|
|
7827
|
+
* Global partner fee (the `fee` option passed to `new Sodax(...)`). Held outside the swappable
|
|
7828
|
+
* `SodaxConfig` — like {@link logger} — so a dynamic config fetch never replaces it. The backend
|
|
7829
|
+
* never supplies it; it is purely a client-side option.
|
|
7830
|
+
*/
|
|
7831
|
+
fee?: PartnerFee;
|
|
7826
7832
|
};
|
|
7827
7833
|
/**
|
|
7828
7834
|
* ConfigApiService - Service for fetching configuration data from the backend API or fallbacking to default values
|
|
@@ -7836,6 +7842,12 @@ declare class ConfigService {
|
|
|
7836
7842
|
* {@link initialize}'s dynamic-config swap never clobbers it. Read by services via `config.logger`.
|
|
7837
7843
|
*/
|
|
7838
7844
|
readonly logger: SodaxLogger;
|
|
7845
|
+
/**
|
|
7846
|
+
* Global partner fee. Resolved once at construction and kept independent of {@link sodax} so that
|
|
7847
|
+
* {@link initialize}'s dynamic-config swap never clobbers it. The backend never supplies it — it is
|
|
7848
|
+
* a client-side option set via `new Sodax({ fee })`. Per-feature overrides live on the feature config.
|
|
7849
|
+
*/
|
|
7850
|
+
readonly fee: PartnerFee | undefined;
|
|
7839
7851
|
private initialized;
|
|
7840
7852
|
private supportedHubAssetsSet;
|
|
7841
7853
|
private supportedSodaVaultAssetsSet;
|
|
@@ -7846,7 +7858,7 @@ declare class ConfigService {
|
|
|
7846
7858
|
private stakedATokenAddressesSet;
|
|
7847
7859
|
private chainToSupportedTokenAddressMap;
|
|
7848
7860
|
private hubAssetToXTokenMap;
|
|
7849
|
-
constructor({ api, config, userConfig, logger }: ConfigServiceConstructorParams);
|
|
7861
|
+
constructor({ api, config, userConfig, logger, fee }: ConfigServiceConstructorParams);
|
|
7850
7862
|
initialize(): Promise<Result<void>>;
|
|
7851
7863
|
getChains(): GetChainsApiResponse;
|
|
7852
7864
|
getSwapTokens(): GetSwapTokensApiResponse;
|
|
@@ -7899,6 +7911,11 @@ declare class ConfigService {
|
|
|
7899
7911
|
get swaps(): SwapsConfig;
|
|
7900
7912
|
get bridge(): BridgeConfig;
|
|
7901
7913
|
get moneyMarket(): MoneyMarketConfig;
|
|
7914
|
+
get leverageYield(): LeverageYieldConfig;
|
|
7915
|
+
get swapPartnerFee(): PartnerFee | undefined;
|
|
7916
|
+
get moneyMarketPartnerFee(): PartnerFee | undefined;
|
|
7917
|
+
get bridgePartnerFee(): PartnerFee | undefined;
|
|
7918
|
+
get leverageYieldPartnerFee(): PartnerFee | undefined;
|
|
7902
7919
|
get dex(): DexConfig;
|
|
7903
7920
|
getChainConfig<K extends SpokeChainKey>(key: K): GetSpokeChainConfigType<K>;
|
|
7904
7921
|
get sodaxConfig(): SodaxConfig;
|
|
@@ -7912,18 +7929,25 @@ declare class ConfigService {
|
|
|
7912
7929
|
declare function parseTokenArrayFromJson(input: unknown): readonly XToken[];
|
|
7913
7930
|
|
|
7914
7931
|
/**
|
|
7915
|
-
* Layers a user
|
|
7932
|
+
* Layers a user SodaxOptions override on top of a full base config (the static default in the
|
|
7916
7933
|
* Sodax constructor, or the dynamic config in {@link ConfigService.initialize}).
|
|
7917
7934
|
*
|
|
7918
|
-
*
|
|
7919
|
-
*
|
|
7920
|
-
*
|
|
7921
|
-
*
|
|
7922
|
-
*
|
|
7923
|
-
*
|
|
7924
|
-
*
|
|
7935
|
+
* Every field is deep-merged, so a user can override `api.timeout` without dropping the sibling `api.baseURL`,
|
|
7936
|
+
* and can set a per-feature `partnerFee` (`swaps` / `moneyMarket` / `bridge` / `leverageYield`) without
|
|
7937
|
+
* disturbing that feature's other defaults. A per-feature `partnerFee` is never present on the base config —
|
|
7938
|
+
* it is a `SodaxOptions`/feature-options field, not part of `SodaxDefaultConfig` or the backend dynamic
|
|
7939
|
+
* config, so it never travels on the wire. Every fee override therefore lands on an empty slot and a complete
|
|
7940
|
+
* `PartnerFee` is written wholesale; there is no base variant to merge against, so no partial-variant hybrid
|
|
7941
|
+
* (`{address, amount, percentage}`) can arise. `PartnerFee` is a discriminated union and downstream
|
|
7942
|
+
* discrimination treats any object with a bigint `amount` as the amount variant (see `isPartnerFeeAmount` /
|
|
7943
|
+
* `calculateFeeAmount`), which is exactly why a fee override must be a complete `PartnerFee`, not a partial.
|
|
7944
|
+
*
|
|
7945
|
+
* The global `fee` is NOT merged here: it is a `SodaxOptions` client option (like `logger`), resolved once
|
|
7946
|
+
* and held on `ConfigService.fee`, where it acts as the per-feature fee fallback (`featureFee ?? fee`, via
|
|
7947
|
+
* `ConfigService.swapPartnerFee` / `moneyMarketPartnerFee` / `bridgePartnerFee`). Config merging and
|
|
7948
|
+
* effective-fee resolution are separate concerns, so the merge layer deliberately leaves `fee` alone.
|
|
7925
7949
|
*/
|
|
7926
|
-
declare function mergeSodaxConfig(base:
|
|
7950
|
+
declare function mergeSodaxConfig(base: SodaxDefaultConfig, override: SodaxOptions): SodaxConfig;
|
|
7927
7951
|
|
|
7928
7952
|
/**
|
|
7929
7953
|
* ABI-encode an array of ContractCall objects.
|
|
@@ -8091,6 +8115,8 @@ type OptionalSkipSimulation$1 = {
|
|
|
8091
8115
|
};
|
|
8092
8116
|
type DepositParams<C extends SpokeChainKey, Raw extends boolean = boolean> = {
|
|
8093
8117
|
srcAddress: GetAddressType<C>;
|
|
8118
|
+
srcPublicKey?: string;
|
|
8119
|
+
accessToken?: string;
|
|
8094
8120
|
srcChainKey: C;
|
|
8095
8121
|
to: HubAddress;
|
|
8096
8122
|
token: GetTokenAddressType<C>;
|
|
@@ -8225,6 +8251,29 @@ type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
|
8225
8251
|
type CreateLimitOrderParams<K extends SpokeChainKey = SpokeChainKey> = Omit<CreateIntentParams<K>, 'deadline'> & {
|
|
8226
8252
|
deadline?: bigint;
|
|
8227
8253
|
};
|
|
8254
|
+
type SrcPublicKeySlot<K extends SpokeChainKey> = GetChainType<K> extends 'STACKS' ? {
|
|
8255
|
+
srcPublicKey?: string;
|
|
8256
|
+
} : {
|
|
8257
|
+
srcPublicKey?: never;
|
|
8258
|
+
};
|
|
8259
|
+
/** Bound Exchange (Radfi) inputs for raw Bitcoin TRADING-mode swap intents. */
|
|
8260
|
+
type BitcoinBoundExtras = {
|
|
8261
|
+
/** Bound token, for raw Bitcoin TRADING callers; falls back to the RadfiProvider instance token when omitted. */
|
|
8262
|
+
accessToken?: string;
|
|
8263
|
+
};
|
|
8264
|
+
type BitcoinBoundSlot<K extends SpokeChainKey> = GetChainType<K> extends 'BITCOIN' ? {
|
|
8265
|
+
bound?: BitcoinBoundExtras;
|
|
8266
|
+
} : {
|
|
8267
|
+
bound?: never;
|
|
8268
|
+
};
|
|
8269
|
+
/**
|
|
8270
|
+
* Per-action extras for swap intent creation, supplied via the `extras` slot of the swap
|
|
8271
|
+
* action params.
|
|
8272
|
+
*/
|
|
8273
|
+
type SwapExtras<K extends SpokeChainKey = SpokeChainKey> = {
|
|
8274
|
+
/** Overrides the configured swap partner fee for this action; falls back to config when omitted. */
|
|
8275
|
+
partnerFee?: PartnerFee;
|
|
8276
|
+
} & SrcPublicKeySlot<K> & BitcoinBoundSlot<K>;
|
|
8228
8277
|
type Intent = {
|
|
8229
8278
|
intentId: bigint;
|
|
8230
8279
|
creator: Address;
|
|
@@ -8654,11 +8703,30 @@ type IntentDeliveryInfo = {
|
|
|
8654
8703
|
dstTxHash: string;
|
|
8655
8704
|
dstAddress: string;
|
|
8656
8705
|
};
|
|
8706
|
+
type RelayTxStatus = 'pending' | 'validating' | 'executing' | 'executed';
|
|
8707
|
+
type PacketData = {
|
|
8708
|
+
src_chain_id: number;
|
|
8709
|
+
src_tx_hash: string;
|
|
8710
|
+
src_address: string;
|
|
8711
|
+
status: RelayTxStatus;
|
|
8712
|
+
dst_chain_id: number;
|
|
8713
|
+
conn_sn: number;
|
|
8714
|
+
dst_address: string;
|
|
8715
|
+
dst_tx_hash: string;
|
|
8716
|
+
signatures: string[];
|
|
8717
|
+
payload: string;
|
|
8718
|
+
};
|
|
8657
8719
|
type WaitUntilIntentExecutedPayload = {
|
|
8658
8720
|
intentRelayChainId: string;
|
|
8659
8721
|
srcTxHash: string;
|
|
8660
8722
|
timeout?: number;
|
|
8661
8723
|
apiUrl: HttpUrl;
|
|
8724
|
+
/**
|
|
8725
|
+
* Disambiguates when a single src tx emits multiple relay packets. Receives the candidates
|
|
8726
|
+
* already filtered by `srcTxHash` and returns the desired one (or undefined to keep polling).
|
|
8727
|
+
* Defaults to "first candidate" — the legacy behavior for single-packet flows.
|
|
8728
|
+
*/
|
|
8729
|
+
selectPacket?: (packets: PacketData[]) => PacketData | undefined;
|
|
8662
8730
|
};
|
|
8663
8731
|
type RelayAction = 'submit' | 'get_transaction_packets' | 'get_packet';
|
|
8664
8732
|
type IntentRelayRequest<T extends RelayAction> = {
|
|
@@ -8725,6 +8793,15 @@ type RadfiErrorBody = {
|
|
|
8725
8793
|
message?: string;
|
|
8726
8794
|
};
|
|
8727
8795
|
};
|
|
8796
|
+
/**
|
|
8797
|
+
* Shape of a parsed Bound Exchange JSON response: the {@link RadfiErrorBody} envelope fields plus an
|
|
8798
|
+
* optional, per-call typed `data` payload. Modeled as a superset of `RadfiErrorBody` so a parsed body
|
|
8799
|
+
* can be handed straight to {@link RadfiApiError} on the error path. `data` is optional because Bound
|
|
8800
|
+
* can answer 2xx with a logical-error envelope (no `data`); callers guard before dereferencing it.
|
|
8801
|
+
*/
|
|
8802
|
+
type RadfiResponseEnvelope<T = unknown> = RadfiErrorBody & {
|
|
8803
|
+
data?: T;
|
|
8804
|
+
};
|
|
8728
8805
|
/**
|
|
8729
8806
|
* Structured error from a Bound Exchange HTTP request. Exposes `status` (HTTP), `code`
|
|
8730
8807
|
* (Bound Exchange-specific identifier), and `details` (human-readable) so callers can
|
|
@@ -8833,7 +8910,7 @@ declare class RadfiProvider {
|
|
|
8833
8910
|
walletAddress: string;
|
|
8834
8911
|
publicKey: string;
|
|
8835
8912
|
}, accessToken: string): Promise<RadfiTradingWallet>;
|
|
8836
|
-
getTradingWallet(userAddress: string
|
|
8913
|
+
getTradingWallet(userAddress: string): Promise<RadfiTradingWallet>;
|
|
8837
8914
|
getBalance(address: string): Promise<RadfiWalletBalance>;
|
|
8838
8915
|
checkIfTradingWalletExists(userAddress: string): Promise<boolean>;
|
|
8839
8916
|
createWithdrawTransaction(params: {
|
|
@@ -8905,6 +8982,27 @@ declare class RadfiProvider {
|
|
|
8905
8982
|
tokenId: string;
|
|
8906
8983
|
withdrawTo: string;
|
|
8907
8984
|
}, accessToken: string): Promise<RadfiMaxSpentResponse>;
|
|
8985
|
+
/**
|
|
8986
|
+
* Resolve the bearer credential for an authenticated Bound Exchange call, failing fast when none
|
|
8987
|
+
* is available. A server-side raw-build caller that never ran the interactive sign-in would
|
|
8988
|
+
* otherwise send `Authorization: Bearer ` (empty) and get an opaque 403 from Bound's gateway;
|
|
8989
|
+
* throwing here turns that into an actionable client-side error naming the fix. We deliberately do
|
|
8990
|
+
* NOT validate the token's contents (expiry / scope / signature) — only Bound can, and an invalid
|
|
8991
|
+
* token still surfaces as a legible 401/403 via `parseJsonBody`.
|
|
8992
|
+
*/
|
|
8993
|
+
private resolveAuth;
|
|
8994
|
+
/**
|
|
8995
|
+
* Parse a Bound Exchange response body as JSON defensively.
|
|
8996
|
+
*
|
|
8997
|
+
* Bound (or an upstream gateway / WAF / CDN) can answer a request with an HTML error page
|
|
8998
|
+
* instead of JSON — e.g. an unauthenticated call, a blocked origin, a 404, or a 5xx. Calling
|
|
8999
|
+
* `res.json()` on that throws a cryptic `SyntaxError: Unexpected token '<'` that masks the real
|
|
9000
|
+
* HTTP status and bubbles up as an opaque failure (it surfaced as a `createIntent` /
|
|
9001
|
+
* `INTENT_CREATION_FAILED` "is not valid JSON" error on the Bitcoin raw-tx path). Reading the
|
|
9002
|
+
* body as text first and parsing it ourselves lets us raise a `RadfiApiError` carrying the
|
|
9003
|
+
* actual status code and a body snippet instead.
|
|
9004
|
+
*/
|
|
9005
|
+
private parseJsonBody;
|
|
8908
9006
|
private request;
|
|
8909
9007
|
}
|
|
8910
9008
|
|
|
@@ -9060,9 +9158,7 @@ declare class BitcoinSpokeService {
|
|
|
9060
9158
|
/**
|
|
9061
9159
|
* Deposit operation - transfer BTC to the asset manager
|
|
9062
9160
|
*/
|
|
9063
|
-
deposit<Raw extends boolean = false>(params: DepositParams<BitcoinChainKey, Raw>
|
|
9064
|
-
accessToken?: string;
|
|
9065
|
-
}): Promise<TxReturnType<BitcoinChainKey, Raw>>;
|
|
9161
|
+
deposit<Raw extends boolean = false>(params: DepositParams<BitcoinChainKey, Raw>): Promise<TxReturnType<BitcoinChainKey, Raw>>;
|
|
9066
9162
|
/**
|
|
9067
9163
|
* Build deposit PSBT with embedded cross-chain data
|
|
9068
9164
|
*/
|
|
@@ -9469,14 +9565,6 @@ interface State {
|
|
|
9469
9565
|
hub_chain_id: string;
|
|
9470
9566
|
owner: string;
|
|
9471
9567
|
}
|
|
9472
|
-
/**
|
|
9473
|
-
* InjectiveSpokeService provides methods for interacting with the Injective spoke chain,
|
|
9474
|
-
* specifically for managing token deposits and transfers between the spoke chain and hub chain.
|
|
9475
|
-
* It handles the cross-chain communication and token bridging functionality, allowing users to:
|
|
9476
|
-
* - Deposit tokens from Injective to the hub chain
|
|
9477
|
-
* - Check token balances on the spoke chain
|
|
9478
|
-
* - Transfer tokens with custom data payloads
|
|
9479
|
-
*/
|
|
9480
9568
|
declare class InjectiveSpokeService {
|
|
9481
9569
|
private readonly config;
|
|
9482
9570
|
readonly chainGrpcWasmApi: ChainGrpcWasmApi;
|
|
@@ -9484,7 +9572,10 @@ declare class InjectiveSpokeService {
|
|
|
9484
9572
|
readonly endpoints: NetworkEndpoints;
|
|
9485
9573
|
private readonly pollingIntervalMs;
|
|
9486
9574
|
private readonly maxTimeoutMs;
|
|
9575
|
+
private readonly gasPrice;
|
|
9487
9576
|
constructor(config: ConfigService);
|
|
9577
|
+
/** Parse a chain-config gas price like `"500000000inj"` into its numeric price and denom. */
|
|
9578
|
+
private parseGasPrice;
|
|
9488
9579
|
/**
|
|
9489
9580
|
* Estimate the gas for a transaction.
|
|
9490
9581
|
* @param {InjectiveRawTransaction} rawTx - The raw transaction to estimate the gas for.
|
|
@@ -9508,7 +9599,7 @@ declare class InjectiveSpokeService {
|
|
|
9508
9599
|
* @returns {Promise<bigint>} The balance of the token.
|
|
9509
9600
|
*/
|
|
9510
9601
|
getDeposit(params: GetDepositParams<InjectiveChainKey>): Promise<bigint>;
|
|
9511
|
-
getRawTransaction(chainId: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string): Promise<InjectiveRawTransaction>;
|
|
9602
|
+
getRawTransaction(chainId: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string, funds?: InjectiveCoin[]): Promise<InjectiveRawTransaction>;
|
|
9512
9603
|
getState(chainId: InjectiveChainKey): Promise<State>;
|
|
9513
9604
|
/**
|
|
9514
9605
|
* Sends a message to the hub chain.
|
|
@@ -9649,7 +9740,6 @@ declare class SpokeService {
|
|
|
9649
9740
|
waitForTxReceipt<C extends SpokeChainKey = SpokeChainKey>(params: WaitForTxReceiptParams<C>): Promise<Result<WaitForTxReceiptReturnType<C>>>;
|
|
9650
9741
|
}
|
|
9651
9742
|
|
|
9652
|
-
type RelayTxStatus = 'pending' | 'validating' | 'executing' | 'executed';
|
|
9653
9743
|
/**
|
|
9654
9744
|
* Stable error message strings emitted by relay-layer helpers ({@link submitTransaction},
|
|
9655
9745
|
* {@link relayTxAndWaitPacket}) on failure.
|
|
@@ -9704,18 +9794,6 @@ type SubmitTxResponse = {
|
|
|
9704
9794
|
success: boolean;
|
|
9705
9795
|
message: string;
|
|
9706
9796
|
};
|
|
9707
|
-
type PacketData = {
|
|
9708
|
-
src_chain_id: number;
|
|
9709
|
-
src_tx_hash: string;
|
|
9710
|
-
src_address: string;
|
|
9711
|
-
status: RelayTxStatus;
|
|
9712
|
-
dst_chain_id: number;
|
|
9713
|
-
conn_sn: number;
|
|
9714
|
-
dst_address: string;
|
|
9715
|
-
dst_tx_hash: string;
|
|
9716
|
-
signatures: string[];
|
|
9717
|
-
payload: string;
|
|
9718
|
-
};
|
|
9719
9797
|
type GetTransactionPacketsResponse = {
|
|
9720
9798
|
success: boolean;
|
|
9721
9799
|
data: PacketData[];
|
|
@@ -11688,8 +11766,8 @@ type CreateIntentResult<K extends SpokeChainKey, Raw extends boolean> = {
|
|
|
11688
11766
|
intent: Intent & FeeAmount;
|
|
11689
11767
|
relayData: RelayExtraData;
|
|
11690
11768
|
};
|
|
11691
|
-
type SwapActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateIntentParams<K>>;
|
|
11692
|
-
type LimitOrderActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateLimitOrderParams<K>>;
|
|
11769
|
+
type SwapActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateIntentParams<K>, SwapExtras<K>>;
|
|
11770
|
+
type LimitOrderActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateLimitOrderParams<K>, SwapExtras<K>>;
|
|
11693
11771
|
/**
|
|
11694
11772
|
* Params for `cancelIntent`.
|
|
11695
11773
|
* Because `Intent.srcChain` is an `IntentRelayChainId` (bigint) whose literal type cannot
|
|
@@ -11703,6 +11781,10 @@ type CancelIntentParams<K extends SpokeChainKey> = {
|
|
|
11703
11781
|
timeout?: number;
|
|
11704
11782
|
};
|
|
11705
11783
|
type CancelIntentActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CancelIntentParams<K>>;
|
|
11784
|
+
type GetQuoteParams = SolverIntentQuoteRequest & {
|
|
11785
|
+
/** Optional per-call override of the configured swap partner fee. Falls back to config when omitted. */
|
|
11786
|
+
partnerFee?: PartnerFee;
|
|
11787
|
+
};
|
|
11706
11788
|
type SwapServiceConstructorParams = {
|
|
11707
11789
|
config: ConfigService;
|
|
11708
11790
|
spoke: SpokeService;
|
|
@@ -11742,10 +11824,13 @@ declare class SwapService {
|
|
|
11742
11824
|
/**
|
|
11743
11825
|
* Requests a price quote from the solver API for a given token pair and amount.
|
|
11744
11826
|
*
|
|
11745
|
-
* Adjusts `payload.amount` by the
|
|
11746
|
-
*
|
|
11827
|
+
* Adjusts `payload.amount` by the partner fee before forwarding to the solver, so the returned
|
|
11828
|
+
* `quoted_amount` reflects the net output the user actually receives. Pass `partnerFee` to match
|
|
11829
|
+
* a per-action override supplied to `createIntent` (`extras.partnerFee`); omit it to use the
|
|
11830
|
+
* configured swap fee.
|
|
11747
11831
|
*
|
|
11748
|
-
* @param payload -
|
|
11832
|
+
* @param payload - The solver quote request, optionally carrying a per-call `partnerFee` override
|
|
11833
|
+
* (defaults to the configured swap partner fee). `partnerFee` is stripped before forwarding.
|
|
11749
11834
|
* @returns A `Result` containing `{ quoted_amount: bigint }` on success, or a
|
|
11750
11835
|
* `SolverErrorResponse` (with a `SolverIntentErrorCode`) on failure.
|
|
11751
11836
|
*
|
|
@@ -11760,7 +11845,7 @@ declare class SwapService {
|
|
|
11760
11845
|
* });
|
|
11761
11846
|
* if (response.ok) console.log('Quoted amount:', response.value.quoted_amount);
|
|
11762
11847
|
*/
|
|
11763
|
-
getQuote(payload:
|
|
11848
|
+
getQuote(payload: GetQuoteParams): Promise<Result<SolverIntentQuoteResponse, SolverErrorResponse>>;
|
|
11764
11849
|
/**
|
|
11765
11850
|
* Calculates the partner fee that will be deducted from the given input amount.
|
|
11766
11851
|
*
|
|
@@ -12040,6 +12125,11 @@ declare class SwapService {
|
|
|
12040
12125
|
* Use this after `getStatus` returns `SolverIntentStatusCode.SOLVED (3)` to obtain the
|
|
12041
12126
|
* destination-chain transaction hash from `packet.dst_tx_hash`.
|
|
12042
12127
|
*
|
|
12128
|
+
* A single solver fill tx emits multiple relay packets sharing the same `src_tx_hash`. The
|
|
12129
|
+
* user-facing `IntentFilled` delivery is the packet whose payload targets the hub intents
|
|
12130
|
+
* contract; `selectSolvedIntentPacket` disambiguates so the returned `dst_tx_hash` is the
|
|
12131
|
+
* destination delivery tx rather than an internal hop.
|
|
12132
|
+
*
|
|
12043
12133
|
* @param chainId - The destination spoke chain key (where output tokens are delivered).
|
|
12044
12134
|
* @param fillTxHash - The solver's fill transaction hash, obtained from `getStatus.fill_tx_hash`.
|
|
12045
12135
|
* @param timeout - Poll timeout in milliseconds. Defaults to `DEFAULT_RELAY_TX_TIMEOUT` (120 s).
|
|
@@ -16170,7 +16260,8 @@ type LeverageYieldSwapDepositParams = {
|
|
|
16170
16260
|
solver?: Address;
|
|
16171
16261
|
/**
|
|
16172
16262
|
* Partner fee for this deposit, carried on the payload as the swap layer's per-intent
|
|
16173
|
-
* fee override. Defaults to the
|
|
16263
|
+
* fee override. Defaults to the effective swap fee (`config.swapPartnerFee` = the `swaps`
|
|
16264
|
+
* override if set, else the global `fee`).
|
|
16174
16265
|
*/
|
|
16175
16266
|
partnerFee?: PartnerFee;
|
|
16176
16267
|
};
|
|
@@ -16226,7 +16317,7 @@ type LeverageYieldSwapPayload = {
|
|
|
16226
16317
|
* user's hub wallet — `srcChainKey` is then the chain the user *signs* on, and the
|
|
16227
16318
|
* intent is created by authorising the hub wallet via a `Connection.sendMessage`
|
|
16228
16319
|
* instead of a spoke-side AssetManager deposit.
|
|
16229
|
-
* - `partnerFee` overrides the
|
|
16320
|
+
* - `partnerFee` overrides the effective swap fee (`config.swapPartnerFee`) for this
|
|
16230
16321
|
* intent only.
|
|
16231
16322
|
*/
|
|
16232
16323
|
type VaultSwapActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateIntentParams<K>> & {
|
|
@@ -16505,7 +16596,7 @@ declare class Sodax {
|
|
|
16505
16596
|
readonly config: ConfigService;
|
|
16506
16597
|
readonly hubProvider: HubProvider;
|
|
16507
16598
|
readonly spoke: SpokeService;
|
|
16508
|
-
constructor(
|
|
16599
|
+
constructor(options?: SodaxOptions);
|
|
16509
16600
|
/**
|
|
16510
16601
|
* Initializes the Sodax instance with dynamic configuration.
|
|
16511
16602
|
* You should use this option if you do not want to update package versions when new chains and tokens are added.
|
|
@@ -17062,4 +17153,4 @@ type DexErrorCode = LookupErrorCode;
|
|
|
17062
17153
|
type DexError = SodaxError<DexErrorCode>;
|
|
17063
17154
|
declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
17064
17155
|
|
|
17065
|
-
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, 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 GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, 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, 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 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 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 };
|
|
17156
|
+
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, 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, 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 };
|