@sodax/sdk 2.0.0-rc.12 → 2.0.0-rc.14
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 +1271 -91
- package/dist/index.d.cts +572 -45
- package/dist/index.d.ts +572 -45
- package/dist/index.mjs +1260 -95
- 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';
|
|
@@ -62,7 +62,7 @@ type SodaxErrorCode = 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'EXECUTIO
|
|
|
62
62
|
* The producing feature of a SodaxError. Required at construction so consumers /
|
|
63
63
|
* loggers always have a feature tag.
|
|
64
64
|
*/
|
|
65
|
-
type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery';
|
|
65
|
+
type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery' | 'leverageYield';
|
|
66
66
|
/**
|
|
67
67
|
* Orchestration phase tag attached via `context.phase`. Canonical superset across all
|
|
68
68
|
* features — all features draw from this list rather than minting their own.
|
|
@@ -133,7 +133,7 @@ declare const LOOKUP_CODES: ReadonlySet<LookupErrorCode>;
|
|
|
133
133
|
/** Runtime list of all valid error codes — useful for membership checks and exhaustive switches. */
|
|
134
134
|
declare const SODAX_ERROR_CODES: readonly ["VALIDATION_FAILED", "INTENT_CREATION_FAILED", "EXECUTION_FAILED", "TX_VERIFICATION_FAILED", "TX_SUBMIT_FAILED", "RELAY_TIMEOUT", "RELAY_FAILED", "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED", "GAS_ESTIMATION_FAILED", "LOOKUP_FAILED", "EXTERNAL_API_ERROR", "UNKNOWN"];
|
|
135
135
|
/** Runtime list of all valid feature tags. */
|
|
136
|
-
declare const SODAX_FEATURES: readonly ["swap", "moneyMarket", "bridge", "staking", "migration", "dex", "partner", "recovery"];
|
|
136
|
+
declare const SODAX_FEATURES: readonly ["swap", "moneyMarket", "bridge", "staking", "migration", "dex", "partner", "recovery", "leverageYield"];
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Canonical error type for the SODAX SDK.
|
|
@@ -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,7 @@ type OptionalSkipSimulation$1 = {
|
|
|
8091
8115
|
};
|
|
8092
8116
|
type DepositParams<C extends SpokeChainKey, Raw extends boolean = boolean> = {
|
|
8093
8117
|
srcAddress: GetAddressType<C>;
|
|
8118
|
+
srcPublicKey?: string;
|
|
8094
8119
|
srcChainKey: C;
|
|
8095
8120
|
to: HubAddress;
|
|
8096
8121
|
token: GetTokenAddressType<C>;
|
|
@@ -8225,6 +8250,19 @@ type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
|
8225
8250
|
type CreateLimitOrderParams<K extends SpokeChainKey = SpokeChainKey> = Omit<CreateIntentParams<K>, 'deadline'> & {
|
|
8226
8251
|
deadline?: bigint;
|
|
8227
8252
|
};
|
|
8253
|
+
type SrcPublicKeySlot<K extends SpokeChainKey> = GetChainType<K> extends 'STACKS' ? {
|
|
8254
|
+
srcPublicKey?: string;
|
|
8255
|
+
} : {
|
|
8256
|
+
srcPublicKey?: never;
|
|
8257
|
+
};
|
|
8258
|
+
/**
|
|
8259
|
+
* Per-action extras for swap intent creation, supplied via the `extras` slot of the swap
|
|
8260
|
+
* action params.
|
|
8261
|
+
*/
|
|
8262
|
+
type SwapExtras<K extends SpokeChainKey = SpokeChainKey> = {
|
|
8263
|
+
/** Overrides the configured swap partner fee for this action; falls back to config when omitted. */
|
|
8264
|
+
partnerFee?: PartnerFee;
|
|
8265
|
+
} & SrcPublicKeySlot<K>;
|
|
8228
8266
|
type Intent = {
|
|
8229
8267
|
intentId: bigint;
|
|
8230
8268
|
creator: Address;
|
|
@@ -8654,11 +8692,30 @@ type IntentDeliveryInfo = {
|
|
|
8654
8692
|
dstTxHash: string;
|
|
8655
8693
|
dstAddress: string;
|
|
8656
8694
|
};
|
|
8695
|
+
type RelayTxStatus = 'pending' | 'validating' | 'executing' | 'executed';
|
|
8696
|
+
type PacketData = {
|
|
8697
|
+
src_chain_id: number;
|
|
8698
|
+
src_tx_hash: string;
|
|
8699
|
+
src_address: string;
|
|
8700
|
+
status: RelayTxStatus;
|
|
8701
|
+
dst_chain_id: number;
|
|
8702
|
+
conn_sn: number;
|
|
8703
|
+
dst_address: string;
|
|
8704
|
+
dst_tx_hash: string;
|
|
8705
|
+
signatures: string[];
|
|
8706
|
+
payload: string;
|
|
8707
|
+
};
|
|
8657
8708
|
type WaitUntilIntentExecutedPayload = {
|
|
8658
8709
|
intentRelayChainId: string;
|
|
8659
8710
|
srcTxHash: string;
|
|
8660
8711
|
timeout?: number;
|
|
8661
8712
|
apiUrl: HttpUrl;
|
|
8713
|
+
/**
|
|
8714
|
+
* Disambiguates when a single src tx emits multiple relay packets. Receives the candidates
|
|
8715
|
+
* already filtered by `srcTxHash` and returns the desired one (or undefined to keep polling).
|
|
8716
|
+
* Defaults to "first candidate" — the legacy behavior for single-packet flows.
|
|
8717
|
+
*/
|
|
8718
|
+
selectPacket?: (packets: PacketData[]) => PacketData | undefined;
|
|
8662
8719
|
};
|
|
8663
8720
|
type RelayAction = 'submit' | 'get_transaction_packets' | 'get_packet';
|
|
8664
8721
|
type IntentRelayRequest<T extends RelayAction> = {
|
|
@@ -9469,14 +9526,6 @@ interface State {
|
|
|
9469
9526
|
hub_chain_id: string;
|
|
9470
9527
|
owner: string;
|
|
9471
9528
|
}
|
|
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
9529
|
declare class InjectiveSpokeService {
|
|
9481
9530
|
private readonly config;
|
|
9482
9531
|
readonly chainGrpcWasmApi: ChainGrpcWasmApi;
|
|
@@ -9484,7 +9533,10 @@ declare class InjectiveSpokeService {
|
|
|
9484
9533
|
readonly endpoints: NetworkEndpoints;
|
|
9485
9534
|
private readonly pollingIntervalMs;
|
|
9486
9535
|
private readonly maxTimeoutMs;
|
|
9536
|
+
private readonly gasPrice;
|
|
9487
9537
|
constructor(config: ConfigService);
|
|
9538
|
+
/** Parse a chain-config gas price like `"500000000inj"` into its numeric price and denom. */
|
|
9539
|
+
private parseGasPrice;
|
|
9488
9540
|
/**
|
|
9489
9541
|
* Estimate the gas for a transaction.
|
|
9490
9542
|
* @param {InjectiveRawTransaction} rawTx - The raw transaction to estimate the gas for.
|
|
@@ -9508,7 +9560,7 @@ declare class InjectiveSpokeService {
|
|
|
9508
9560
|
* @returns {Promise<bigint>} The balance of the token.
|
|
9509
9561
|
*/
|
|
9510
9562
|
getDeposit(params: GetDepositParams<InjectiveChainKey>): Promise<bigint>;
|
|
9511
|
-
getRawTransaction(chainId: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string): Promise<InjectiveRawTransaction>;
|
|
9563
|
+
getRawTransaction(chainId: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string, funds?: InjectiveCoin[]): Promise<InjectiveRawTransaction>;
|
|
9512
9564
|
getState(chainId: InjectiveChainKey): Promise<State>;
|
|
9513
9565
|
/**
|
|
9514
9566
|
* Sends a message to the hub chain.
|
|
@@ -9649,7 +9701,6 @@ declare class SpokeService {
|
|
|
9649
9701
|
waitForTxReceipt<C extends SpokeChainKey = SpokeChainKey>(params: WaitForTxReceiptParams<C>): Promise<Result<WaitForTxReceiptReturnType<C>>>;
|
|
9650
9702
|
}
|
|
9651
9703
|
|
|
9652
|
-
type RelayTxStatus = 'pending' | 'validating' | 'executing' | 'executed';
|
|
9653
9704
|
/**
|
|
9654
9705
|
* Stable error message strings emitted by relay-layer helpers ({@link submitTransaction},
|
|
9655
9706
|
* {@link relayTxAndWaitPacket}) on failure.
|
|
@@ -9704,18 +9755,6 @@ type SubmitTxResponse = {
|
|
|
9704
9755
|
success: boolean;
|
|
9705
9756
|
message: string;
|
|
9706
9757
|
};
|
|
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
9758
|
type GetTransactionPacketsResponse = {
|
|
9720
9759
|
success: boolean;
|
|
9721
9760
|
data: PacketData[];
|
|
@@ -11688,8 +11727,8 @@ type CreateIntentResult<K extends SpokeChainKey, Raw extends boolean> = {
|
|
|
11688
11727
|
intent: Intent & FeeAmount;
|
|
11689
11728
|
relayData: RelayExtraData;
|
|
11690
11729
|
};
|
|
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>>;
|
|
11730
|
+
type SwapActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateIntentParams<K>, SwapExtras<K>>;
|
|
11731
|
+
type LimitOrderActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateLimitOrderParams<K>, SwapExtras<K>>;
|
|
11693
11732
|
/**
|
|
11694
11733
|
* Params for `cancelIntent`.
|
|
11695
11734
|
* Because `Intent.srcChain` is an `IntentRelayChainId` (bigint) whose literal type cannot
|
|
@@ -11703,6 +11742,10 @@ type CancelIntentParams<K extends SpokeChainKey> = {
|
|
|
11703
11742
|
timeout?: number;
|
|
11704
11743
|
};
|
|
11705
11744
|
type CancelIntentActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CancelIntentParams<K>>;
|
|
11745
|
+
type GetQuoteParams = SolverIntentQuoteRequest & {
|
|
11746
|
+
/** Optional per-call override of the configured swap partner fee. Falls back to config when omitted. */
|
|
11747
|
+
partnerFee?: PartnerFee;
|
|
11748
|
+
};
|
|
11706
11749
|
type SwapServiceConstructorParams = {
|
|
11707
11750
|
config: ConfigService;
|
|
11708
11751
|
spoke: SpokeService;
|
|
@@ -11742,10 +11785,13 @@ declare class SwapService {
|
|
|
11742
11785
|
/**
|
|
11743
11786
|
* Requests a price quote from the solver API for a given token pair and amount.
|
|
11744
11787
|
*
|
|
11745
|
-
* Adjusts `payload.amount` by the
|
|
11746
|
-
*
|
|
11788
|
+
* Adjusts `payload.amount` by the partner fee before forwarding to the solver, so the returned
|
|
11789
|
+
* `quoted_amount` reflects the net output the user actually receives. Pass `partnerFee` to match
|
|
11790
|
+
* a per-action override supplied to `createIntent` (`extras.partnerFee`); omit it to use the
|
|
11791
|
+
* configured swap fee.
|
|
11747
11792
|
*
|
|
11748
|
-
* @param payload -
|
|
11793
|
+
* @param payload - The solver quote request, optionally carrying a per-call `partnerFee` override
|
|
11794
|
+
* (defaults to the configured swap partner fee). `partnerFee` is stripped before forwarding.
|
|
11749
11795
|
* @returns A `Result` containing `{ quoted_amount: bigint }` on success, or a
|
|
11750
11796
|
* `SolverErrorResponse` (with a `SolverIntentErrorCode`) on failure.
|
|
11751
11797
|
*
|
|
@@ -11760,7 +11806,7 @@ declare class SwapService {
|
|
|
11760
11806
|
* });
|
|
11761
11807
|
* if (response.ok) console.log('Quoted amount:', response.value.quoted_amount);
|
|
11762
11808
|
*/
|
|
11763
|
-
getQuote(payload:
|
|
11809
|
+
getQuote(payload: GetQuoteParams): Promise<Result<SolverIntentQuoteResponse, SolverErrorResponse>>;
|
|
11764
11810
|
/**
|
|
11765
11811
|
* Calculates the partner fee that will be deducted from the given input amount.
|
|
11766
11812
|
*
|
|
@@ -12040,6 +12086,11 @@ declare class SwapService {
|
|
|
12040
12086
|
* Use this after `getStatus` returns `SolverIntentStatusCode.SOLVED (3)` to obtain the
|
|
12041
12087
|
* destination-chain transaction hash from `packet.dst_tx_hash`.
|
|
12042
12088
|
*
|
|
12089
|
+
* A single solver fill tx emits multiple relay packets sharing the same `src_tx_hash`. The
|
|
12090
|
+
* user-facing `IntentFilled` delivery is the packet whose payload targets the hub intents
|
|
12091
|
+
* contract; `selectSolvedIntentPacket` disambiguates so the returned `dst_tx_hash` is the
|
|
12092
|
+
* destination delivery tx rather than an internal hop.
|
|
12093
|
+
*
|
|
12043
12094
|
* @param chainId - The destination spoke chain key (where output tokens are delivered).
|
|
12044
12095
|
* @param fillTxHash - The solver's fill transaction hash, obtained from `getStatus.fill_tx_hash`.
|
|
12045
12096
|
* @param timeout - Poll timeout in milliseconds. Defaults to `DEFAULT_RELAY_TX_TIMEOUT` (120 s).
|
|
@@ -16011,6 +16062,481 @@ declare class RecoveryService {
|
|
|
16011
16062
|
withdrawHubAsset<K extends SpokeChainKey, Raw extends boolean>(_params: WithdrawHubAssetAction<K, Raw>): Promise<Result<TxReturnType<K, Raw>>>;
|
|
16012
16063
|
}
|
|
16013
16064
|
|
|
16065
|
+
/**
|
|
16066
|
+
* leverageYield module narrow error types.
|
|
16067
|
+
*
|
|
16068
|
+
* The service owns the full vault-swap lifecycle: `deposit` / `withdraw` build
|
|
16069
|
+
* `CreateIntentParams`, `createVaultIntent` submits the intent on the source spoke chain,
|
|
16070
|
+
* and `vaultSwap` orchestrates the end-to-end flow (create → verify → relay → notify
|
|
16071
|
+
* solver). `approve` / `isAllowanceValid` manage the underlying-asset allowance on Sonic,
|
|
16072
|
+
* and the read methods query on-chain state.
|
|
16073
|
+
*
|
|
16074
|
+
* User-facing actions discriminated by `context.action`: `'deposit' | 'withdraw' |
|
|
16075
|
+
* 'approve' | 'vaultSwap'`. Read-only methods emit `LOOKUP_FAILED` partitioned by
|
|
16076
|
+
* `context.method`. Relay/verify codes appear only on `vaultSwap` — `createVaultIntent`
|
|
16077
|
+
* alone emits the create-intent subset.
|
|
16078
|
+
*/
|
|
16079
|
+
|
|
16080
|
+
declare const leverageYieldInvariant: FeatureInvariant;
|
|
16081
|
+
type LeverageYieldAction = 'deposit' | 'withdraw' | 'approve' | 'allowanceCheck' | 'vaultSwap';
|
|
16082
|
+
type LeverageYieldCreateIntentErrorCode = CreateIntentErrorCode;
|
|
16083
|
+
type LeverageYieldApproveErrorCode = ApproveErrorCode;
|
|
16084
|
+
type LeverageYieldAllowanceCheckErrorCode = AllowanceCheckErrorCode;
|
|
16085
|
+
type LeverageYieldLookupErrorCode = LookupErrorCode;
|
|
16086
|
+
/**
|
|
16087
|
+
* Codes returnable by the solver-notify step inside `vaultSwap`. Mirrors the swap
|
|
16088
|
+
* domain's `PostExecutionErrorCode` — duplicated deliberately so the leverage-yield
|
|
16089
|
+
* error surface stands alone (see `vaultSwap`).
|
|
16090
|
+
*/
|
|
16091
|
+
type LeverageYieldPostExecutionErrorCode = Extract<SodaxErrorCode, 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
|
|
16092
|
+
/**
|
|
16093
|
+
* Codes returnable by the end-to-end `vaultSwap` orchestrator: the create-intent subset
|
|
16094
|
+
* plus verify, relay and solver-notify codes. Mirrors the swap domain's `SwapErrorCode`.
|
|
16095
|
+
*/
|
|
16096
|
+
type LeverageYieldSwapErrorCode = Extract<SodaxErrorCode, 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
|
|
16097
|
+
type LeverageYieldErrorCode = Extract<SodaxErrorCode, 'VALIDATION_FAILED' | 'INTENT_CREATION_FAILED' | 'APPROVE_FAILED' | 'ALLOWANCE_CHECK_FAILED' | 'LOOKUP_FAILED' | 'TX_VERIFICATION_FAILED' | 'TX_SUBMIT_FAILED' | 'RELAY_TIMEOUT' | 'RELAY_FAILED' | 'EXECUTION_FAILED' | 'EXTERNAL_API_ERROR' | 'UNKNOWN'>;
|
|
16098
|
+
type LeverageYieldCreateIntentError = SodaxError<LeverageYieldCreateIntentErrorCode>;
|
|
16099
|
+
type LeverageYieldApproveError = SodaxError<LeverageYieldApproveErrorCode>;
|
|
16100
|
+
type LeverageYieldAllowanceCheckError = SodaxError<LeverageYieldAllowanceCheckErrorCode>;
|
|
16101
|
+
type LeverageYieldLookupError = SodaxError<LeverageYieldLookupErrorCode>;
|
|
16102
|
+
type LeverageYieldPostExecutionError = SodaxError<LeverageYieldPostExecutionErrorCode>;
|
|
16103
|
+
type LeverageYieldSwapError = SodaxError<LeverageYieldSwapErrorCode>;
|
|
16104
|
+
type LeverageYieldError = SodaxError<LeverageYieldErrorCode>;
|
|
16105
|
+
declare const isLeverageYieldCreateIntentError: (e: unknown) => e is SodaxError<CreateIntentErrorCode>;
|
|
16106
|
+
declare const isLeverageYieldApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
|
|
16107
|
+
declare const isLeverageYieldAllowanceCheckError: (e: unknown) => e is SodaxError<AllowanceCheckErrorCode>;
|
|
16108
|
+
declare const isLeverageYieldLookupError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
16109
|
+
declare const isLeverageYieldPostExecutionError: (e: unknown) => e is SodaxError<LeverageYieldPostExecutionErrorCode>;
|
|
16110
|
+
declare const isLeverageYieldSwapError: (e: unknown) => e is SodaxError<LeverageYieldSwapErrorCode>;
|
|
16111
|
+
declare const isLeverageYieldError: (e: unknown) => e is SodaxError<LeverageYieldErrorCode>;
|
|
16112
|
+
|
|
16113
|
+
/**
|
|
16114
|
+
* Leveraged-position snapshot from the vault's non-standard `getPositionDetails()`.
|
|
16115
|
+
* Field scales (mirroring the AAVE conventions the vault inherits):
|
|
16116
|
+
*/
|
|
16117
|
+
type LeverageYieldPosition = {
|
|
16118
|
+
/** Collateral supplied to the AAVE pool, in vault-asset units (18 decimals). */
|
|
16119
|
+
collateral: bigint;
|
|
16120
|
+
/** Variable debt borrowed against the collateral, in vault-asset units (18 decimals). */
|
|
16121
|
+
debt: bigint;
|
|
16122
|
+
/** Current loan-to-value in basis points (out of `10_000`; e.g. `8_500` = 85%). */
|
|
16123
|
+
ltv: bigint;
|
|
16124
|
+
/** AAVE health factor in WAD (1e18); below `1e18` implies liquidation risk, `type(uint256).max` = no debt. */
|
|
16125
|
+
healthFactor: bigint;
|
|
16126
|
+
/** Asset held by the vault but not yet supplied to the pool, in vault-asset units (18 decimals). */
|
|
16127
|
+
idleAsset: bigint;
|
|
16128
|
+
};
|
|
16129
|
+
/**
|
|
16130
|
+
* Output of {@link LeverageYieldService.getApr}. All rate fields are in RAY (1e27 = 100%)
|
|
16131
|
+
* matching the AAVE convention — divide by `RAY = 10n ** 27n` for the decimal form.
|
|
16132
|
+
*
|
|
16133
|
+
* `netAprRay` is the headline number a UI shows: net APR earned by a depositor at the
|
|
16134
|
+
* vault's `targetLTV`. It's a STEADY-STATE APR, not realised APY — assumes the AAVE rates
|
|
16135
|
+
* stay constant and the vault holds at `targetLTV` continuously. Realised APY in practice
|
|
16136
|
+
* depends on tick cadence, rate volatility, and the spread between supplyApr and borrowApr.
|
|
16137
|
+
*
|
|
16138
|
+
* The math:
|
|
16139
|
+
* ```
|
|
16140
|
+
* leverageMultiplier = targetLTV / (1 - targetLTV) // e.g. 0.85 / 0.15 = 5.667x
|
|
16141
|
+
* netAprRay = supplyAprRay + leverageMultiplier × (supplyAprRay - borrowAprRay)
|
|
16142
|
+
* ```
|
|
16143
|
+
* Equivalent to the geometric-series limit of recursive borrow → swap → supply at the
|
|
16144
|
+
* vault's target LTV. When `supplyApr > borrowApr` the leverage adds yield; when the
|
|
16145
|
+
* spread inverts the loop is a net cost and `netAprRay` goes negative.
|
|
16146
|
+
*/
|
|
16147
|
+
type LeverageYieldApr = {
|
|
16148
|
+
/** AAVE supply rate of the vault's `asset` (sodaWEETH-style), in RAY. */
|
|
16149
|
+
supplyAprRay: bigint;
|
|
16150
|
+
/** AAVE variable borrow rate of the vault's `borrowToken` (sodaETH-style), in RAY. */
|
|
16151
|
+
borrowAprRay: bigint;
|
|
16152
|
+
/** Target LTV in basis points, as read from `vault.targetLTV()`. */
|
|
16153
|
+
targetLtvBps: bigint;
|
|
16154
|
+
/**
|
|
16155
|
+
* Leverage multiplier ×1e18 (e.g. 5.667x is `5_666_666_666_666_666_667n`). Caller can
|
|
16156
|
+
* divide by `10n ** 18n` for the decimal form.
|
|
16157
|
+
*/
|
|
16158
|
+
leverageMultiplierWad: bigint;
|
|
16159
|
+
/** Net APR earned by a depositor at `targetLtvBps`, in RAY. Can be negative. */
|
|
16160
|
+
netAprRay: bigint;
|
|
16161
|
+
};
|
|
16162
|
+
/**
|
|
16163
|
+
* Off-chain LSD staking-APR snapshot for a leverage-yield vault's underlying asset.
|
|
16164
|
+
* Returned by {@link LeverageYieldService.getLsdApr} and embedded in
|
|
16165
|
+
* {@link LeverageYieldEffectiveApr}.
|
|
16166
|
+
*/
|
|
16167
|
+
type LeverageYieldLsdApr = {
|
|
16168
|
+
/** LSD staking APR in RAY (1e27 = 100%). Zero when the vault has no configured LSD source. */
|
|
16169
|
+
aprRay: bigint;
|
|
16170
|
+
/** Human-readable provider label, e.g. `'Lido (stETH)'` (suffixed with `(fallback)` on error). */
|
|
16171
|
+
label: string;
|
|
16172
|
+
/**
|
|
16173
|
+
* `true` when this value came from the hardcoded `fallbackAprPct` rather than a live
|
|
16174
|
+
* fetch — either because the provider has no live endpoint (`manual`), the network
|
|
16175
|
+
* call failed, or the vault has no LSD source configured. UIs should label the value
|
|
16176
|
+
* as an estimate in this state.
|
|
16177
|
+
*/
|
|
16178
|
+
stale: boolean;
|
|
16179
|
+
};
|
|
16180
|
+
/**
|
|
16181
|
+
* Combined AAVE + LSD APR view — extends {@link LeverageYieldApr} with the LSD staking
|
|
16182
|
+
* yield folded into the supply side. Returned by {@link LeverageYieldService.getEffectiveApr}.
|
|
16183
|
+
*
|
|
16184
|
+
* The `netAprRay` inherited from {@link LeverageYieldApr} is the **AAVE-only** number —
|
|
16185
|
+
* the negative-spread case the SDK historically reported. `effectiveNetAprRay` is the
|
|
16186
|
+
* honest one for LSD-backed strategies because it includes the LSD's native staking yield,
|
|
16187
|
+
* which is the dominant component for these vaults.
|
|
16188
|
+
*/
|
|
16189
|
+
type LeverageYieldEffectiveApr = LeverageYieldApr & {
|
|
16190
|
+
/** LSD staking APR snapshot used to compute the effective rates. */
|
|
16191
|
+
lsdApr: LeverageYieldLsdApr;
|
|
16192
|
+
/** `supplyAprRay + lsdApr.aprRay`, in RAY — the yield the supply side actually earns. */
|
|
16193
|
+
effectiveSupplyAprRay: bigint;
|
|
16194
|
+
/**
|
|
16195
|
+
* `effectiveSupplyAprRay + leverage × (effectiveSupplyAprRay − borrowAprRay)`, in RAY.
|
|
16196
|
+
* The headline number a UI should display.
|
|
16197
|
+
*/
|
|
16198
|
+
effectiveNetAprRay: bigint;
|
|
16199
|
+
};
|
|
16200
|
+
/**
|
|
16201
|
+
* Builds the swap payload for a swap-style leverage-yield deposit — swapping any
|
|
16202
|
+
* solver-supported `inputToken` on `srcChainKey` into the vault's lsoda* share token,
|
|
16203
|
+
* delivered to the user's hub wallet on Sonic. Spread the result into `swaps.swap()`.
|
|
16204
|
+
*/
|
|
16205
|
+
type LeverageYieldSwapDepositParams = {
|
|
16206
|
+
/** Hub-side LeverageYieldVault proxy address — its address doubles as the lsoda* token. */
|
|
16207
|
+
vault: Address;
|
|
16208
|
+
/** Spoke chain the user holds `inputToken` on and signs from. */
|
|
16209
|
+
srcChainKey: SpokeChainKey;
|
|
16210
|
+
/** User's EOA on `srcChainKey`. */
|
|
16211
|
+
srcAddress: string;
|
|
16212
|
+
/** Spoke-side token the user pays in. */
|
|
16213
|
+
inputToken: string;
|
|
16214
|
+
/** Amount of `inputToken` to swap (input-token decimals). */
|
|
16215
|
+
inputAmount: bigint;
|
|
16216
|
+
/** Minimum acceptable lsoda* output (18 decimals). Slippage already applied. */
|
|
16217
|
+
minOutputAmount: bigint;
|
|
16218
|
+
/** Deadline (unix seconds). Defaults to the hub block timestamp + 5 min. */
|
|
16219
|
+
deadline?: bigint;
|
|
16220
|
+
/** Optional specific solver. `0x0` = any solver. */
|
|
16221
|
+
solver?: Address;
|
|
16222
|
+
/**
|
|
16223
|
+
* Partner fee for this deposit, carried on the payload as the swap layer's per-intent
|
|
16224
|
+
* fee override. Defaults to the effective swap fee (`config.swapPartnerFee` = the `swaps`
|
|
16225
|
+
* override if set, else the global `fee`).
|
|
16226
|
+
*/
|
|
16227
|
+
partnerFee?: PartnerFee;
|
|
16228
|
+
};
|
|
16229
|
+
/**
|
|
16230
|
+
* Builds the swap payload for a swap-style leverage-yield withdraw — swapping the vault's
|
|
16231
|
+
* lsoda* shares (held in the user's hub wallet) back into any solver-supported token on
|
|
16232
|
+
* any chain. The payload carries `hubWalletSwap: true`; spread it into `swaps.swap()`,
|
|
16233
|
+
* which authorises the hub wallet via `Connection.sendMessage`.
|
|
16234
|
+
*/
|
|
16235
|
+
type LeverageYieldSwapWithdrawParams = {
|
|
16236
|
+
/** Hub-side LeverageYieldVault proxy address — its address doubles as the lsoda* token. */
|
|
16237
|
+
vault: Address;
|
|
16238
|
+
/** Spoke chain the user signs the `sendMessage` from (drives hub-wallet derivation). */
|
|
16239
|
+
srcChainKey: SpokeChainKey;
|
|
16240
|
+
/** User's EOA on `srcChainKey`. */
|
|
16241
|
+
srcAddress: string;
|
|
16242
|
+
/** Output chain — where the solver delivers the swapped-back token. */
|
|
16243
|
+
dstChainKey: SpokeChainKey;
|
|
16244
|
+
/** Output spoke-side token address. */
|
|
16245
|
+
outputToken: string;
|
|
16246
|
+
/** Amount of lsoda* shares to swap (18 decimals). */
|
|
16247
|
+
inputAmount: bigint;
|
|
16248
|
+
/** Minimum acceptable output (output-token decimals). Slippage already applied. */
|
|
16249
|
+
minOutputAmount: bigint;
|
|
16250
|
+
/** Recipient on `dstChainKey`. Defaults to `srcAddress`. */
|
|
16251
|
+
recipient?: string;
|
|
16252
|
+
/** Deadline (unix seconds). Defaults to the hub block timestamp + 5 min. */
|
|
16253
|
+
deadline?: bigint;
|
|
16254
|
+
/** Optional specific solver. `0x0` = any solver. */
|
|
16255
|
+
solver?: Address;
|
|
16256
|
+
};
|
|
16257
|
+
/**
|
|
16258
|
+
* Action-shaped swap payload built by {@link LeverageYieldService.deposit} /
|
|
16259
|
+
* {@link LeverageYieldService.withdraw}. Spread it into
|
|
16260
|
+
* {@link LeverageYieldService.vaultSwap} (or {@link LeverageYieldService.createVaultIntent})
|
|
16261
|
+
* alongside the wallet provider: `vaultSwap({ ...payload, walletProvider })`.
|
|
16262
|
+
* `withdraw` sets `hubWalletSwap: true` so the swap spends the lsoda* held in the
|
|
16263
|
+
* user's hub wallet.
|
|
16264
|
+
*/
|
|
16265
|
+
type LeverageYieldSwapPayload = {
|
|
16266
|
+
params: CreateIntentParams;
|
|
16267
|
+
hubWalletSwap?: true;
|
|
16268
|
+
/** Per-intent partner-fee override (deposit only). */
|
|
16269
|
+
partnerFee?: PartnerFee;
|
|
16270
|
+
};
|
|
16271
|
+
/**
|
|
16272
|
+
* Exec-mode params for {@link LeverageYieldService.createVaultIntent} /
|
|
16273
|
+
* {@link LeverageYieldService.vaultSwap}: `walletProvider` is required and K-narrowed
|
|
16274
|
+
* (`raw: true` returns unsigned tx data instead). The two vault-specific execution
|
|
16275
|
+
* modifiers live HERE — on the leverage-yield action wrapper, never on the generic swap
|
|
16276
|
+
* surface:
|
|
16277
|
+
* - `hubWalletSwap` marks `params.inputToken` as a hub-chain token already sitting in the
|
|
16278
|
+
* user's hub wallet — `srcChainKey` is then the chain the user *signs* on, and the
|
|
16279
|
+
* intent is created by authorising the hub wallet via a `Connection.sendMessage`
|
|
16280
|
+
* instead of a spoke-side AssetManager deposit.
|
|
16281
|
+
* - `partnerFee` overrides the effective swap fee (`config.swapPartnerFee`) for this
|
|
16282
|
+
* intent only.
|
|
16283
|
+
*/
|
|
16284
|
+
type VaultSwapActionParams<K extends SpokeChainKey, Raw extends boolean = false> = SpokeExecActionParams<K, Raw, CreateIntentParams<K>> & {
|
|
16285
|
+
hubWalletSwap?: boolean;
|
|
16286
|
+
partnerFee?: PartnerFee;
|
|
16287
|
+
};
|
|
16288
|
+
/**
|
|
16289
|
+
* Success value of {@link LeverageYieldService.createVaultIntent}. Mirrors the swap
|
|
16290
|
+
* domain's `CreateIntentResult` — duplicated deliberately so the leverage-yield surface
|
|
16291
|
+
* stands alone.
|
|
16292
|
+
*/
|
|
16293
|
+
type CreateVaultIntentResult<K extends SpokeChainKey, Raw extends boolean> = {
|
|
16294
|
+
tx: TxReturnType<K, Raw>;
|
|
16295
|
+
intent: Intent & FeeAmount;
|
|
16296
|
+
relayData: RelayExtraData;
|
|
16297
|
+
};
|
|
16298
|
+
/**
|
|
16299
|
+
* Success value of {@link LeverageYieldService.vaultSwap}. Mirrors the swap domain's
|
|
16300
|
+
* `SwapResponse` — duplicated deliberately so the leverage-yield surface stands alone.
|
|
16301
|
+
*/
|
|
16302
|
+
type VaultSwapResponse = {
|
|
16303
|
+
solverExecutionResponse: SolverExecutionResponse;
|
|
16304
|
+
intent: Intent;
|
|
16305
|
+
intentDeliveryInfo: IntentDeliveryInfo;
|
|
16306
|
+
};
|
|
16307
|
+
type LeverageYieldApproveParams<R extends boolean> = {
|
|
16308
|
+
vault: Address;
|
|
16309
|
+
/** Amount of the vault's underlying asset to approve. */
|
|
16310
|
+
amount: bigint;
|
|
16311
|
+
walletProvider: IEvmWalletProvider;
|
|
16312
|
+
raw?: R;
|
|
16313
|
+
};
|
|
16314
|
+
type LeverageYieldAllowanceParams = {
|
|
16315
|
+
vault: Address;
|
|
16316
|
+
amount: bigint;
|
|
16317
|
+
owner: Address;
|
|
16318
|
+
};
|
|
16319
|
+
type LeverageYieldServiceConstructorParams = {
|
|
16320
|
+
hubProvider: HubProvider;
|
|
16321
|
+
config: ConfigService;
|
|
16322
|
+
spoke: SpokeService;
|
|
16323
|
+
};
|
|
16324
|
+
/**
|
|
16325
|
+
* Treats leverage-yield ERC-4626 vault shares (lsoda* tokens) as solver-tradeable tokens:
|
|
16326
|
+
* deposits and withdrawals are intent-based swaps the service executes itself via
|
|
16327
|
+
* `vaultSwap()` — the generic swap surface stays untouched by vault concerns.
|
|
16328
|
+
*
|
|
16329
|
+
* Methods:
|
|
16330
|
+
* - `deposit` / `withdraw` — build a {@link LeverageYieldSwapPayload} for a swap-style deposit
|
|
16331
|
+
* (any token → lsoda*) and withdraw (lsoda* → any token); spread the result into
|
|
16332
|
+
* `vaultSwap()`. `withdraw` sets `hubWalletSwap: true` so the vault swap spends the lsoda*
|
|
16333
|
+
* held in the user's hub wallet via a `Connection.sendMessage`.
|
|
16334
|
+
* - `createVaultIntent` / `vaultSwap` / `notifySolver` — leverage-yield copies of the swap
|
|
16335
|
+
* domain's `createIntent` / `swap()` / `postExecution` (duplicated deliberately — the vault
|
|
16336
|
+
* execution modifiers `hubWalletSwap` and per-intent `partnerFee` live here, not on the swap
|
|
16337
|
+
* domain). `createVaultIntent` submits the intent tx on the source spoke chain; `vaultSwap`
|
|
16338
|
+
* orchestrates the full create → verify → relay → notify-solver lifecycle; `notifySolver` is
|
|
16339
|
+
* the standalone notify step, public so callers driving the relay themselves (after a
|
|
16340
|
+
* `createVaultIntent`) can complete the flow.
|
|
16341
|
+
* - `approve` / `isAllowanceValid` — Sonic-direct allowance management for the vault's
|
|
16342
|
+
* underlying asset (sodaWEETH-style).
|
|
16343
|
+
* - `getPosition` / `getApr` / `getEffectiveApr` / `getLsdApr` / `getMaxWithdraw` /
|
|
16344
|
+
* `getMaxWithdrawForUser` / `getShareBalance` / `getShareBalanceForUser` /
|
|
16345
|
+
* `getTotalAssets` / `previewDeposit` / `previewWithdraw` / `previewRedeem` — reads.
|
|
16346
|
+
* Use `getEffectiveApr` for the honest LSD-aware APR; `getApr` reports the AAVE-only
|
|
16347
|
+
* spread and goes negative when the LSD's native staking yield is the alpha source.
|
|
16348
|
+
* - `listVaults` / `getVault` / `getVaultByAddress` — registry lookups.
|
|
16349
|
+
*/
|
|
16350
|
+
declare class LeverageYieldService {
|
|
16351
|
+
private readonly hubProvider;
|
|
16352
|
+
private readonly config;
|
|
16353
|
+
private readonly spoke;
|
|
16354
|
+
constructor({ hubProvider, config, spoke }: LeverageYieldServiceConstructorParams);
|
|
16355
|
+
/** Returns the static registry of known leverage-yield vaults. */
|
|
16356
|
+
listVaults(): readonly LeverageYieldVault[];
|
|
16357
|
+
/** Looks up a vault by its `name` field. Returns `undefined` when not registered. */
|
|
16358
|
+
getVault(name: string): LeverageYieldVault | undefined;
|
|
16359
|
+
/**
|
|
16360
|
+
* Looks up a registered vault by its on-chain proxy address (case-insensitive).
|
|
16361
|
+
* Returns `undefined` when the address isn't in the registry.
|
|
16362
|
+
*/
|
|
16363
|
+
getVaultByAddress(address: Address): LeverageYieldVault | undefined;
|
|
16364
|
+
/**
|
|
16365
|
+
* Resolves the intent `deadline`: returns the caller-supplied value verbatim, otherwise
|
|
16366
|
+
* derives a default from the hub-chain (Sonic) block timestamp plus
|
|
16367
|
+
* {@link INTENT_DEADLINE_BUFFER_SECONDS}. The deadline is enforced on-chain against the hub
|
|
16368
|
+
* block time, so the default is anchored to that block — never the client clock, which can
|
|
16369
|
+
* drift and produce an already-expired or over-extended deadline.
|
|
16370
|
+
*
|
|
16371
|
+
* Returns a {@link Result}: a `getBlock` RPC outage is a read failure, surfaced as
|
|
16372
|
+
* `LOOKUP_FAILED` (`method: 'resolveDeadline'`) rather than masquerading as an intent-build
|
|
16373
|
+
* failure. The `deposit` / `withdraw` callers forward it verbatim.
|
|
16374
|
+
*/
|
|
16375
|
+
private resolveDeadline;
|
|
16376
|
+
/**
|
|
16377
|
+
* Builds the {@link LeverageYieldSwapPayload} for a leverage-yield deposit (any token → lsoda*).
|
|
16378
|
+
* The lsoda* output is delivered to the user's hub wallet on Sonic so a later
|
|
16379
|
+
* {@link LeverageYieldService.withdraw} can swap it back. Spread the result into
|
|
16380
|
+
* {@link LeverageYieldService.vaultSwap}: `vaultSwap({ ...payload, walletProvider })`.
|
|
16381
|
+
* An optional `partnerFee` is forwarded on the payload as the per-intent fee override.
|
|
16382
|
+
*
|
|
16383
|
+
* For `minOutputAmount`, quote via `sodax.swaps.getQuote` with the vault address as the
|
|
16384
|
+
* destination token (`token_dst`) — vault shares are solver-tradeable, so the generic swap
|
|
16385
|
+
* quote applies; then subtract your slippage tolerance.
|
|
16386
|
+
*/
|
|
16387
|
+
deposit(params: LeverageYieldSwapDepositParams): Promise<Result<LeverageYieldSwapPayload, LeverageYieldCreateIntentError | LeverageYieldLookupError>>;
|
|
16388
|
+
/**
|
|
16389
|
+
* Builds the {@link LeverageYieldSwapPayload} for a leverage-yield withdraw (lsoda* → any
|
|
16390
|
+
* token). The payload carries `hubWalletSwap: true` — {@link LeverageYieldService.vaultSwap}
|
|
16391
|
+
* then spends the lsoda* held in the user's hub wallet by authorising it via a
|
|
16392
|
+
* `Connection.sendMessage` the user signs on `srcChainKey`. Wrapped in a {@link Result} for
|
|
16393
|
+
* a call shape uniform with {@link LeverageYieldService.deposit}; async because the default
|
|
16394
|
+
* `deadline` is read from the hub block timestamp.
|
|
16395
|
+
*
|
|
16396
|
+
* For `minOutputAmount`, quote via `sodax.swaps.getQuote` with the vault address as the
|
|
16397
|
+
* source token (`token_src`) — vault shares are solver-tradeable, so the generic swap quote
|
|
16398
|
+
* applies; then subtract your slippage tolerance.
|
|
16399
|
+
*/
|
|
16400
|
+
withdraw(params: LeverageYieldSwapWithdrawParams): Promise<Result<LeverageYieldSwapPayload, LeverageYieldCreateIntentError | LeverageYieldLookupError>>;
|
|
16401
|
+
/**
|
|
16402
|
+
* Creates a vault swap intent on the user's source spoke chain without submitting it to
|
|
16403
|
+
* the solver. Leverage-yield copy of the swap domain's `createIntent`, specialised for
|
|
16404
|
+
* vault flows — duplicated deliberately so the vault-specific execution modifiers
|
|
16405
|
+
* (`hubWalletSwap`, per-intent `partnerFee`) stay off the generic swap surface.
|
|
16406
|
+
*
|
|
16407
|
+
* Use {@link LeverageYieldService.vaultSwap} for the full end-to-end flow
|
|
16408
|
+
* (create → relay → notify solver); use this directly when you need the raw transaction
|
|
16409
|
+
* or drive the relay yourself (e.g. the backend submit-tx path). To complete a manual flow,
|
|
16410
|
+
* relay the returned `relayData` (the shared `relayTxAndWaitPacket` helper) and then call
|
|
16411
|
+
* {@link LeverageYieldService.notifySolver} with the hub-side intent tx hash.
|
|
16412
|
+
*
|
|
16413
|
+
* @param _params - Intent parameters, source chain key, wallet provider (when `raw: false`),
|
|
16414
|
+
* and optional `skipSimulation` / `hubWalletSwap` / `partnerFee`.
|
|
16415
|
+
* @returns A `Result<CreateVaultIntentResult<K, Raw>, LeverageYieldCreateIntentError>`.
|
|
16416
|
+
* On success contains:
|
|
16417
|
+
* - `tx` — chain-specific tx hash (executed) or raw tx data (raw mode).
|
|
16418
|
+
* - `intent` — the fully constructed `Intent` object augmented with `feeAmount`.
|
|
16419
|
+
* - `relayData` — `{ address, payload }` needed to submit the intent to the relayer.
|
|
16420
|
+
*
|
|
16421
|
+
* On failure `result.error` is a SodaxError with `VALIDATION_FAILED` (invariant
|
|
16422
|
+
* precondition), `INTENT_CREATION_FAILED` (spoke-side creation/deposit failed) or
|
|
16423
|
+
* `UNKNOWN` (defensive fallback).
|
|
16424
|
+
*/
|
|
16425
|
+
createVaultIntent<K extends SpokeChainKey, Raw extends boolean>(_params: VaultSwapActionParams<K, Raw>): Promise<Result<CreateVaultIntentResult<K, Raw>, LeverageYieldCreateIntentError>>;
|
|
16426
|
+
/**
|
|
16427
|
+
* Executes a full end-to-end leverage-yield vault swap (deposit or withdraw).
|
|
16428
|
+
* Leverage-yield copy of the swap domain's `swap()` orchestrator:
|
|
16429
|
+
* 1. Calls {@link LeverageYieldService.createVaultIntent} to submit the intent
|
|
16430
|
+
* transaction on the source spoke chain.
|
|
16431
|
+
* 2. Verifies the spoke transaction landed on-chain.
|
|
16432
|
+
* 3. For non-hub source chains: submits the spoke tx to the relayer and waits for the
|
|
16433
|
+
* relay packet to land on the hub (Sonic). Skipped when `srcChainKey` is the hub.
|
|
16434
|
+
* 4. Notifies the solver, triggering it to fill the intent.
|
|
16435
|
+
*
|
|
16436
|
+
* Spread a {@link LeverageYieldSwapPayload} from `deposit` / `withdraw` into this method
|
|
16437
|
+
* alongside the wallet provider: `vaultSwap({ ...payload, walletProvider })`.
|
|
16438
|
+
*
|
|
16439
|
+
* @returns A `Result<VaultSwapResponse, LeverageYieldSwapError>`. On success:
|
|
16440
|
+
* - `solverExecutionResponse` — solver acknowledgement (`{ answer: 'OK', intent_hash }`).
|
|
16441
|
+
* - `intent` — the on-chain intent object that was created.
|
|
16442
|
+
* - `intentDeliveryInfo` — source/destination chain keys, tx hashes, and user addresses.
|
|
16443
|
+
*
|
|
16444
|
+
* On failure `result.error` carries one of the create-intent codes plus
|
|
16445
|
+
* `TX_VERIFICATION_FAILED`, `TX_SUBMIT_FAILED`, `RELAY_TIMEOUT`, `RELAY_FAILED`,
|
|
16446
|
+
* `EXECUTION_FAILED`, `EXTERNAL_API_ERROR` or `UNKNOWN`.
|
|
16447
|
+
*/
|
|
16448
|
+
vaultSwap<K extends SpokeChainKey>(_params: VaultSwapActionParams<K, false>): Promise<Result<VaultSwapResponse, LeverageYieldSwapError>>;
|
|
16449
|
+
/**
|
|
16450
|
+
* Notifies the solver that the vault intent landed on the hub, triggering it to fill.
|
|
16451
|
+
* Leverage-yield copy of the swap domain's `postExecution` — emits only
|
|
16452
|
+
* `EXECUTION_FAILED` / `EXTERNAL_API_ERROR` / `UNKNOWN` (relay/verify codes appear only
|
|
16453
|
+
* on {@link LeverageYieldService.vaultSwap}, which owns the verify + relay steps).
|
|
16454
|
+
*
|
|
16455
|
+
* Called automatically by {@link LeverageYieldService.vaultSwap} after the relay packet
|
|
16456
|
+
* lands on the hub. Public so callers who created the intent via
|
|
16457
|
+
* {@link LeverageYieldService.createVaultIntent} and relayed it themselves can finish the
|
|
16458
|
+
* flow manually.
|
|
16459
|
+
*
|
|
16460
|
+
* @param request - `{ intent_tx_hash }` — the hub-chain (Sonic) tx hash where the intent
|
|
16461
|
+
* was registered (the relay packet's `dst_tx_hash`, or the spoke tx hash for hub-sourced
|
|
16462
|
+
* intents).
|
|
16463
|
+
*/
|
|
16464
|
+
notifySolver(request: SolverExecutionRequest): Promise<Result<SolverExecutionResponse, LeverageYieldPostExecutionError>>;
|
|
16465
|
+
/**
|
|
16466
|
+
* Approves the vault's underlying asset to the leverage vault on Sonic. For callers
|
|
16467
|
+
* interacting with the vault directly on the hub — the swap-style {@link
|
|
16468
|
+
* LeverageYieldService.deposit} flow handles its own approvals.
|
|
16469
|
+
*/
|
|
16470
|
+
approve<R extends boolean = false>(params: LeverageYieldApproveParams<R>): Promise<Result<TxReturnType<HubChainKey, R>, LeverageYieldApproveError>>;
|
|
16471
|
+
/**
|
|
16472
|
+
* Reads on-chain allowance of the vault's underlying asset for `owner → vault`. Returns
|
|
16473
|
+
* `true` when the allowance covers `amount`. Use before a direct
|
|
16474
|
+
* {@link LeverageYieldService.deposit}.
|
|
16475
|
+
*/
|
|
16476
|
+
isAllowanceValid(params: LeverageYieldAllowanceParams): Promise<Result<boolean, LeverageYieldAllowanceCheckError>>;
|
|
16477
|
+
/** ERC-4626 `asset()` of the vault — the sodaWEETH-style underlying. */
|
|
16478
|
+
getAsset(vault: Address): Promise<Result<Address, LeverageYieldLookupError>>;
|
|
16479
|
+
/** Reads the vault's leveraged position snapshot via the non-standard `getPositionDetails`. */
|
|
16480
|
+
getPosition(vault: Address): Promise<Result<LeverageYieldPosition, LeverageYieldLookupError>>;
|
|
16481
|
+
/**
|
|
16482
|
+
* Computes the steady-state APR of a leverage-yield vault from the AAVE supply/borrow
|
|
16483
|
+
* rates of its asset and borrowToken, scaled by the vault's target leverage. Matches the
|
|
16484
|
+
* convention used by leveraged-LSD vaults (Origami, Gearbox, etc.) — assumes constant
|
|
16485
|
+
* LTV at `targetLTV` and constant AAVE rates.
|
|
16486
|
+
*
|
|
16487
|
+
* Returns raw fields in RAY (1e27, AAVE's native rate scale) plus the leverage multiplier
|
|
16488
|
+
* in WAD (1e18). See {@link LeverageYieldApr} for the formula and caveats.
|
|
16489
|
+
*/
|
|
16490
|
+
getApr(vault: Address): Promise<Result<LeverageYieldApr, LeverageYieldLookupError>>;
|
|
16491
|
+
/**
|
|
16492
|
+
* Off-chain LSD staking-APR for the vault's underlying asset. Looks the vault up in the
|
|
16493
|
+
* registry, hits DefiLlama's per-pool chart endpoint for the configured `poolId`, and on
|
|
16494
|
+
* any fetch failure returns the registry's hardcoded `fallbackAprPct` with `stale: true`.
|
|
16495
|
+
*
|
|
16496
|
+
* Always resolves to `{ ok: true, ... }` for a known vault — the fallback path replaces
|
|
16497
|
+
* the error, since a missing LSD APR shouldn't break the parent call. Returns
|
|
16498
|
+
* `{ aprRay: 0n, stale: true, label: 'no LSD source' }` for vaults without an
|
|
16499
|
+
* `lsdSource` configured (non-LSD strategies); callers can treat that as "skip LSD".
|
|
16500
|
+
*/
|
|
16501
|
+
getLsdApr(vault: Address): Promise<Result<LeverageYieldLsdApr, LeverageYieldLookupError>>;
|
|
16502
|
+
/**
|
|
16503
|
+
* Combined view of {@link getApr} + {@link getLsdApr}: re-applies the vault's leverage
|
|
16504
|
+
* formula with the LSD's native staking yield folded into the supply side, exposing the
|
|
16505
|
+
* **effective** net APR that LSD-backed strategies actually earn. The AAVE-only
|
|
16506
|
+
* `netAprRay` is preserved on the return value for callers who want to display both.
|
|
16507
|
+
*
|
|
16508
|
+
* effectiveSupply = supplyAprRay + lsdApr.aprRay
|
|
16509
|
+
* effectiveNet = effectiveSupply + leverage × (effectiveSupply − borrowAprRay)
|
|
16510
|
+
*
|
|
16511
|
+
* Fetches AAVE rates and the LSD APR in parallel for one round-trip's worth of latency.
|
|
16512
|
+
*/
|
|
16513
|
+
getEffectiveApr(vault: Address): Promise<Result<LeverageYieldEffectiveApr, LeverageYieldLookupError>>;
|
|
16514
|
+
/** Synchronously withdrawable assets for `owner` (clamped against leverage HF floor). */
|
|
16515
|
+
getMaxWithdraw(vault: Address, owner: Address): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16516
|
+
/** Total underlying assets currently held by the vault (vault-asset units, 18 decimals) — TVL. */
|
|
16517
|
+
getTotalAssets(vault: Address): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16518
|
+
/** Shares minted for a given asset deposit. */
|
|
16519
|
+
previewDeposit(vault: Address, assets: bigint): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16520
|
+
/** Shares burned for a given asset withdrawal. */
|
|
16521
|
+
previewWithdraw(vault: Address, assets: bigint): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16522
|
+
/** Assets received for a given share redemption. */
|
|
16523
|
+
previewRedeem(vault: Address, shares: bigint): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16524
|
+
/** Vault shares held by `owner`. */
|
|
16525
|
+
getShareBalance(vault: Address, owner: Address): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16526
|
+
/**
|
|
16527
|
+
* Convenience: resolves the user's hub wallet from `(srcChainKey, srcAddress)` and
|
|
16528
|
+
* returns its on-chain `maxWithdraw`, less {@link MAX_WITHDRAW_DUST_BUFFER}. The trim
|
|
16529
|
+
* keeps the value safe for an asset-denominated ERC-4626 `withdraw` — the raw
|
|
16530
|
+
* `maxWithdraw` can trip the round-up that asks for one more share than the user holds.
|
|
16531
|
+
*/
|
|
16532
|
+
getMaxWithdrawForUser<K extends SpokeChainKey>(vault: Address, srcChainKey: K, srcAddress: string): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16533
|
+
/**
|
|
16534
|
+
* Convenience: resolves the user's hub wallet from `(srcChainKey, srcAddress)` and
|
|
16535
|
+
* returns its on-chain share balance.
|
|
16536
|
+
*/
|
|
16537
|
+
getShareBalanceForUser<K extends SpokeChainKey>(vault: Address, srcChainKey: K, srcAddress: string): Promise<Result<bigint, LeverageYieldLookupError>>;
|
|
16538
|
+
}
|
|
16539
|
+
|
|
16014
16540
|
/**
|
|
16015
16541
|
* Sodax class is used to interact with the Sodax.
|
|
16016
16542
|
*
|
|
@@ -16027,10 +16553,11 @@ declare class Sodax {
|
|
|
16027
16553
|
readonly partners: PartnerService;
|
|
16028
16554
|
readonly recovery: RecoveryService;
|
|
16029
16555
|
readonly dex: DexService;
|
|
16556
|
+
readonly leverageYield: LeverageYieldService;
|
|
16030
16557
|
readonly config: ConfigService;
|
|
16031
16558
|
readonly hubProvider: HubProvider;
|
|
16032
16559
|
readonly spoke: SpokeService;
|
|
16033
|
-
constructor(
|
|
16560
|
+
constructor(options?: SodaxOptions);
|
|
16034
16561
|
/**
|
|
16035
16562
|
* Initializes the Sodax instance with dynamic configuration.
|
|
16036
16563
|
* You should use this option if you do not want to update package versions when new chains and tokens are added.
|
|
@@ -16587,4 +17114,4 @@ type DexErrorCode = LookupErrorCode;
|
|
|
16587
17114
|
type DexError = SodaxError<DexErrorCode>;
|
|
16588
17115
|
declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
16589
17116
|
|
|
16590
|
-
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 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 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 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, 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, 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 };
|
|
17117
|
+
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 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 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 };
|