@sodax/sdk 2.0.0-rc.16 → 2.0.0-rc.17
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 +222 -31
- package/dist/index.d.cts +121 -8
- package/dist/index.d.ts +121 -8
- package/dist/index.mjs +215 -32
- package/package.json +3 -3
package/dist/index.d.cts
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, 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';
|
|
1
|
+
import { IConfigApi, ApiConfig, SodaxLogger, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, PartnerFee, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault } from '@sodax/types';
|
|
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';
|
|
@@ -8230,6 +8230,17 @@ type RawDestinationParams = {
|
|
|
8230
8230
|
dstAddress: string;
|
|
8231
8231
|
};
|
|
8232
8232
|
|
|
8233
|
+
/**
|
|
8234
|
+
* High-level request for routing an intent's output through a deployed delivery hook. Pick a hook by
|
|
8235
|
+
* its {@link HookKind}; the SDK resolves the hook's deployed address and encodes the payload it expects
|
|
8236
|
+
* (so address and codec can never drift). The recipient is taken from the intent's `dstAddress`.
|
|
8237
|
+
*
|
|
8238
|
+
* Prefer this over setting {@link CreateIntentParams.deliveryData} + `dstAddress` by hand — those remain
|
|
8239
|
+
* available as a low-level escape hatch for hooks not yet in the registry.
|
|
8240
|
+
*/
|
|
8241
|
+
type HookRequest = {
|
|
8242
|
+
kind: typeof HookKind.HYPERCORE_DEPOSIT;
|
|
8243
|
+
};
|
|
8233
8244
|
type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
8234
8245
|
inputToken: string;
|
|
8235
8246
|
outputToken: string;
|
|
@@ -8243,6 +8254,21 @@ type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
|
8243
8254
|
dstAddress: string;
|
|
8244
8255
|
solver?: Address;
|
|
8245
8256
|
data: Hex;
|
|
8257
|
+
/**
|
|
8258
|
+
* High-level delivery-hook selector. When set, the SDK routes the output through the chosen hook:
|
|
8259
|
+
* it overrides `dstAddress` with the hook's deployed address and encodes `deliveryData` from this
|
|
8260
|
+
* request (the recipient is the `dstAddress` you supply). This is the preferred way to use hooks —
|
|
8261
|
+
* the hook address and its payload codec come from the registry, so they can never drift.
|
|
8262
|
+
*/
|
|
8263
|
+
hook?: HookRequest;
|
|
8264
|
+
/**
|
|
8265
|
+
* Low-level delivery payload forwarded with the output transfer — an escape hatch for hooks not in
|
|
8266
|
+
* the registry. On arrival at the destination spoke, `SpokeAssetManager` calls
|
|
8267
|
+
* `ISpokeReceiver(dstAddress).hook(token, amount, deliveryData)`. Opaque bytes whose schema is
|
|
8268
|
+
* defined by the destination receiver; when set, you must also point `dstAddress` at that receiver.
|
|
8269
|
+
* Prefer {@link hook} when the target is a registered hook. Ignored when {@link hook} is set.
|
|
8270
|
+
*/
|
|
8271
|
+
deliveryData?: Hex;
|
|
8246
8272
|
};
|
|
8247
8273
|
/**
|
|
8248
8274
|
* Parameters for creating a limit order intent.
|
|
@@ -8291,7 +8317,10 @@ type Intent = {
|
|
|
8291
8317
|
data: Hex;
|
|
8292
8318
|
};
|
|
8293
8319
|
declare enum IntentDataType {
|
|
8294
|
-
|
|
8320
|
+
ARRAY = 0,
|
|
8321
|
+
FEE = 1,
|
|
8322
|
+
HOOK = 2,
|
|
8323
|
+
DELIVERY = 3
|
|
8295
8324
|
}
|
|
8296
8325
|
type FeeData = {
|
|
8297
8326
|
fee: bigint;
|
|
@@ -16784,15 +16813,16 @@ declare class EvmSolverService {
|
|
|
16784
16813
|
/**
|
|
16785
16814
|
* Recovers the partner fee amount embedded in an intent's `data` field.
|
|
16786
16815
|
*
|
|
16787
|
-
*
|
|
16788
|
-
*
|
|
16789
|
-
*
|
|
16816
|
+
* Inverse of {@link createIntentFeeData}: returns the encoded fee, regardless of whether the `data`
|
|
16817
|
+
* is a bare fee envelope or a multi-entry envelope that also carries delivery data. The envelope
|
|
16818
|
+
* parsing lives in {@link IntentDataService.extractFeePayload}; this method just decodes the fee struct.
|
|
16790
16819
|
*
|
|
16791
16820
|
* @param data - The intent's `data` field (`'0x'` when no fee was configured).
|
|
16792
|
-
* @returns The fee amount in the input token's smallest unit (`0n` when no fee
|
|
16793
|
-
* when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
|
|
16821
|
+
* @returns The fee amount in the input token's smallest unit (`0n` when no fee is present).
|
|
16794
16822
|
*/
|
|
16795
16823
|
static decodeIntentFeeAmount(data: Hex): bigint;
|
|
16824
|
+
/** Decodes a raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) to its fee amount. */
|
|
16825
|
+
private static decodeFeePayload;
|
|
16796
16826
|
/**
|
|
16797
16827
|
* Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
|
|
16798
16828
|
* fully-populated `Intent` alone.
|
|
@@ -16870,6 +16900,89 @@ declare class EvmSolverService {
|
|
|
16870
16900
|
static encodeCancelIntent(intent: Intent, intentsContract: Address$1): EvmContractCall;
|
|
16871
16901
|
}
|
|
16872
16902
|
|
|
16903
|
+
/**
|
|
16904
|
+
* Stateless utility for the SODAX solver's delivery hooks.
|
|
16905
|
+
*
|
|
16906
|
+
* A delivery hook lets an intent's output be handed to `ISpokeReceiver(dstAddress).hook(...)` on the
|
|
16907
|
+
* destination spoke instead of transferred straight to the recipient. Each hook is two coupled things:
|
|
16908
|
+
* its **deployed address** (the registry in `@sodax/types`) and its **`deliveryData` codec** (here).
|
|
16909
|
+
* This class fuses them so the address and payload can never drift, and exposes a single
|
|
16910
|
+
* type-differentiated {@link encodeDeliveryData} rather than one encoder per hook.
|
|
16911
|
+
*/
|
|
16912
|
+
declare class HookService {
|
|
16913
|
+
private constructor();
|
|
16914
|
+
/**
|
|
16915
|
+
* Encodes a hook's `deliveryData` payload. One common entry point for all hooks — the encoding is
|
|
16916
|
+
* selected by {@link HookRequest.kind} and uses that hook's schema from {@link HOOK_DELIVERY_ABI}.
|
|
16917
|
+
*
|
|
16918
|
+
* @param request - The hook selection (and any hook-specific params).
|
|
16919
|
+
* @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
|
|
16920
|
+
*/
|
|
16921
|
+
static encodeDeliveryData(request: HookRequest, recipient: string): Hex;
|
|
16922
|
+
/**
|
|
16923
|
+
* Resolves a high-level {@link HookRequest} to the on-chain delivery pair: the deployed hook address
|
|
16924
|
+
* (becomes the intent's `dstAddress`) and the encoded payload the hook expects (`deliveryData`).
|
|
16925
|
+
* Bundling lookup + codec here guarantees the address and its payload schema can never drift.
|
|
16926
|
+
*
|
|
16927
|
+
* @param chainKey - Destination spoke chain (must have the requested hook deployed).
|
|
16928
|
+
* @param request - The hook selection (and any hook-specific params).
|
|
16929
|
+
* @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
|
|
16930
|
+
*/
|
|
16931
|
+
static resolveDeliveryHook(chainKey: SpokeChainKey, request: HookRequest, recipient: string): {
|
|
16932
|
+
dstAddress: Address$1;
|
|
16933
|
+
deliveryData: Hex;
|
|
16934
|
+
};
|
|
16935
|
+
/**
|
|
16936
|
+
* Resolves the effective delivery target for an intent. When {@link CreateIntentParams.hook} is set,
|
|
16937
|
+
* routes the output through that registered hook (overriding `dstAddress` and deriving `deliveryData`);
|
|
16938
|
+
* otherwise returns the caller's `dstAddress` and low-level `deliveryData` unchanged. Centralised so
|
|
16939
|
+
* both the hub and Sonic intent constructors apply hooks identically.
|
|
16940
|
+
*
|
|
16941
|
+
* @returns `{ dstAddress, deliveryData }` — the address to deliver to and the payload to forward.
|
|
16942
|
+
*/
|
|
16943
|
+
static resolveDelivery(params: CreateIntentParams): {
|
|
16944
|
+
dstAddress: string;
|
|
16945
|
+
deliveryData: Hex | undefined;
|
|
16946
|
+
};
|
|
16947
|
+
}
|
|
16948
|
+
|
|
16949
|
+
/**
|
|
16950
|
+
* Stateless utility for the `Intent.data` envelope layer.
|
|
16951
|
+
*
|
|
16952
|
+
* `Intent.data` carries zero or more typed entries (a partner-fee payload, a delivery payload, …).
|
|
16953
|
+
* This class owns how those entries are packed into bytes the on-chain `IntentDataLib` decodes and
|
|
16954
|
+
* how they are recovered back out, keeping the `ArrayData` codec ({@link ARRAY_DATA_ABI}) in one
|
|
16955
|
+
* place. The delivery payloads themselves are produced by `HookService`; this layer is agnostic to
|
|
16956
|
+
* their contents and simply folds them in alongside the fee.
|
|
16957
|
+
*/
|
|
16958
|
+
declare class IntentDataService {
|
|
16959
|
+
private constructor();
|
|
16960
|
+
/**
|
|
16961
|
+
* Folds a partner-fee envelope and an optional delivery payload into the final `Intent.data`:
|
|
16962
|
+
* - Neither → `'0x'`.
|
|
16963
|
+
* - Exactly one → that single packed `[uint8 type, bytes payload]` envelope (byte-identical to a
|
|
16964
|
+
* bare fee envelope, so a fee-only intent's `data` is unchanged and stays decode-stable).
|
|
16965
|
+
* - Both → a `TYPE_ARRAY` envelope wrapping `[FEE, DELIVERY]` entries.
|
|
16966
|
+
*
|
|
16967
|
+
* @param feeEnvelope - The packed fee envelope from `EvmSolverService.createIntentFeeData` (`'0x'` if no fee).
|
|
16968
|
+
* @param deliveryData - Opaque delivery payload (e.g. from `HookService.encodeDeliveryData`), or `undefined`.
|
|
16969
|
+
*/
|
|
16970
|
+
static composeIntentData(feeEnvelope: Hex, deliveryData?: Hex): Hex;
|
|
16971
|
+
/**
|
|
16972
|
+
* Encodes a list of typed `IntentData` entries into the `Intent.data` bytes the contract decodes.
|
|
16973
|
+
* Empty → `'0x'`; single → a packed `[uint8 type, bytes payload]` envelope; multiple → a `TYPE_ARRAY`
|
|
16974
|
+
* envelope wrapping the entries as `ArrayData { DataEntry[] }`.
|
|
16975
|
+
*/
|
|
16976
|
+
static encodeIntentData(entries: IntentData[]): Hex;
|
|
16977
|
+
/**
|
|
16978
|
+
* Extracts the raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) from an intent's
|
|
16979
|
+
* `data`, unwrapping whichever envelope shape it uses. Returns `undefined` when there is no fee:
|
|
16980
|
+
* empty `data`, a delivery-only envelope, or an unknown type byte (logged). Used by
|
|
16981
|
+
* `EvmSolverService.decodeIntentFeeAmount` to recover fees regardless of delivery data.
|
|
16982
|
+
*/
|
|
16983
|
+
static extractFeePayload(data: Hex): Hex | undefined;
|
|
16984
|
+
}
|
|
16985
|
+
|
|
16873
16986
|
/**
|
|
16874
16987
|
* Stateless HTTP client for the SODAX solver API.
|
|
16875
16988
|
*
|
|
@@ -17153,4 +17266,4 @@ type DexErrorCode = LookupErrorCode;
|
|
|
17153
17266
|
type DexError = SodaxError<DexErrorCode>;
|
|
17154
17267
|
declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
17155
17268
|
|
|
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 };
|
|
17269
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
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, 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';
|
|
1
|
+
import { IConfigApi, ApiConfig, SodaxLogger, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, PartnerFee, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault } from '@sodax/types';
|
|
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';
|
|
@@ -8230,6 +8230,17 @@ type RawDestinationParams = {
|
|
|
8230
8230
|
dstAddress: string;
|
|
8231
8231
|
};
|
|
8232
8232
|
|
|
8233
|
+
/**
|
|
8234
|
+
* High-level request for routing an intent's output through a deployed delivery hook. Pick a hook by
|
|
8235
|
+
* its {@link HookKind}; the SDK resolves the hook's deployed address and encodes the payload it expects
|
|
8236
|
+
* (so address and codec can never drift). The recipient is taken from the intent's `dstAddress`.
|
|
8237
|
+
*
|
|
8238
|
+
* Prefer this over setting {@link CreateIntentParams.deliveryData} + `dstAddress` by hand — those remain
|
|
8239
|
+
* available as a low-level escape hatch for hooks not yet in the registry.
|
|
8240
|
+
*/
|
|
8241
|
+
type HookRequest = {
|
|
8242
|
+
kind: typeof HookKind.HYPERCORE_DEPOSIT;
|
|
8243
|
+
};
|
|
8233
8244
|
type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
8234
8245
|
inputToken: string;
|
|
8235
8246
|
outputToken: string;
|
|
@@ -8243,6 +8254,21 @@ type CreateIntentParams<K extends SpokeChainKey = SpokeChainKey> = {
|
|
|
8243
8254
|
dstAddress: string;
|
|
8244
8255
|
solver?: Address;
|
|
8245
8256
|
data: Hex;
|
|
8257
|
+
/**
|
|
8258
|
+
* High-level delivery-hook selector. When set, the SDK routes the output through the chosen hook:
|
|
8259
|
+
* it overrides `dstAddress` with the hook's deployed address and encodes `deliveryData` from this
|
|
8260
|
+
* request (the recipient is the `dstAddress` you supply). This is the preferred way to use hooks —
|
|
8261
|
+
* the hook address and its payload codec come from the registry, so they can never drift.
|
|
8262
|
+
*/
|
|
8263
|
+
hook?: HookRequest;
|
|
8264
|
+
/**
|
|
8265
|
+
* Low-level delivery payload forwarded with the output transfer — an escape hatch for hooks not in
|
|
8266
|
+
* the registry. On arrival at the destination spoke, `SpokeAssetManager` calls
|
|
8267
|
+
* `ISpokeReceiver(dstAddress).hook(token, amount, deliveryData)`. Opaque bytes whose schema is
|
|
8268
|
+
* defined by the destination receiver; when set, you must also point `dstAddress` at that receiver.
|
|
8269
|
+
* Prefer {@link hook} when the target is a registered hook. Ignored when {@link hook} is set.
|
|
8270
|
+
*/
|
|
8271
|
+
deliveryData?: Hex;
|
|
8246
8272
|
};
|
|
8247
8273
|
/**
|
|
8248
8274
|
* Parameters for creating a limit order intent.
|
|
@@ -8291,7 +8317,10 @@ type Intent = {
|
|
|
8291
8317
|
data: Hex;
|
|
8292
8318
|
};
|
|
8293
8319
|
declare enum IntentDataType {
|
|
8294
|
-
|
|
8320
|
+
ARRAY = 0,
|
|
8321
|
+
FEE = 1,
|
|
8322
|
+
HOOK = 2,
|
|
8323
|
+
DELIVERY = 3
|
|
8295
8324
|
}
|
|
8296
8325
|
type FeeData = {
|
|
8297
8326
|
fee: bigint;
|
|
@@ -16784,15 +16813,16 @@ declare class EvmSolverService {
|
|
|
16784
16813
|
/**
|
|
16785
16814
|
* Recovers the partner fee amount embedded in an intent's `data` field.
|
|
16786
16815
|
*
|
|
16787
|
-
*
|
|
16788
|
-
*
|
|
16789
|
-
*
|
|
16816
|
+
* Inverse of {@link createIntentFeeData}: returns the encoded fee, regardless of whether the `data`
|
|
16817
|
+
* is a bare fee envelope or a multi-entry envelope that also carries delivery data. The envelope
|
|
16818
|
+
* parsing lives in {@link IntentDataService.extractFeePayload}; this method just decodes the fee struct.
|
|
16790
16819
|
*
|
|
16791
16820
|
* @param data - The intent's `data` field (`'0x'` when no fee was configured).
|
|
16792
|
-
* @returns The fee amount in the input token's smallest unit (`0n` when no fee
|
|
16793
|
-
* when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
|
|
16821
|
+
* @returns The fee amount in the input token's smallest unit (`0n` when no fee is present).
|
|
16794
16822
|
*/
|
|
16795
16823
|
static decodeIntentFeeAmount(data: Hex): bigint;
|
|
16824
|
+
/** Decodes a raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) to its fee amount. */
|
|
16825
|
+
private static decodeFeePayload;
|
|
16796
16826
|
/**
|
|
16797
16827
|
* Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
|
|
16798
16828
|
* fully-populated `Intent` alone.
|
|
@@ -16870,6 +16900,89 @@ declare class EvmSolverService {
|
|
|
16870
16900
|
static encodeCancelIntent(intent: Intent, intentsContract: Address$1): EvmContractCall;
|
|
16871
16901
|
}
|
|
16872
16902
|
|
|
16903
|
+
/**
|
|
16904
|
+
* Stateless utility for the SODAX solver's delivery hooks.
|
|
16905
|
+
*
|
|
16906
|
+
* A delivery hook lets an intent's output be handed to `ISpokeReceiver(dstAddress).hook(...)` on the
|
|
16907
|
+
* destination spoke instead of transferred straight to the recipient. Each hook is two coupled things:
|
|
16908
|
+
* its **deployed address** (the registry in `@sodax/types`) and its **`deliveryData` codec** (here).
|
|
16909
|
+
* This class fuses them so the address and payload can never drift, and exposes a single
|
|
16910
|
+
* type-differentiated {@link encodeDeliveryData} rather than one encoder per hook.
|
|
16911
|
+
*/
|
|
16912
|
+
declare class HookService {
|
|
16913
|
+
private constructor();
|
|
16914
|
+
/**
|
|
16915
|
+
* Encodes a hook's `deliveryData` payload. One common entry point for all hooks — the encoding is
|
|
16916
|
+
* selected by {@link HookRequest.kind} and uses that hook's schema from {@link HOOK_DELIVERY_ABI}.
|
|
16917
|
+
*
|
|
16918
|
+
* @param request - The hook selection (and any hook-specific params).
|
|
16919
|
+
* @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
|
|
16920
|
+
*/
|
|
16921
|
+
static encodeDeliveryData(request: HookRequest, recipient: string): Hex;
|
|
16922
|
+
/**
|
|
16923
|
+
* Resolves a high-level {@link HookRequest} to the on-chain delivery pair: the deployed hook address
|
|
16924
|
+
* (becomes the intent's `dstAddress`) and the encoded payload the hook expects (`deliveryData`).
|
|
16925
|
+
* Bundling lookup + codec here guarantees the address and its payload schema can never drift.
|
|
16926
|
+
*
|
|
16927
|
+
* @param chainKey - Destination spoke chain (must have the requested hook deployed).
|
|
16928
|
+
* @param request - The hook selection (and any hook-specific params).
|
|
16929
|
+
* @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
|
|
16930
|
+
*/
|
|
16931
|
+
static resolveDeliveryHook(chainKey: SpokeChainKey, request: HookRequest, recipient: string): {
|
|
16932
|
+
dstAddress: Address$1;
|
|
16933
|
+
deliveryData: Hex;
|
|
16934
|
+
};
|
|
16935
|
+
/**
|
|
16936
|
+
* Resolves the effective delivery target for an intent. When {@link CreateIntentParams.hook} is set,
|
|
16937
|
+
* routes the output through that registered hook (overriding `dstAddress` and deriving `deliveryData`);
|
|
16938
|
+
* otherwise returns the caller's `dstAddress` and low-level `deliveryData` unchanged. Centralised so
|
|
16939
|
+
* both the hub and Sonic intent constructors apply hooks identically.
|
|
16940
|
+
*
|
|
16941
|
+
* @returns `{ dstAddress, deliveryData }` — the address to deliver to and the payload to forward.
|
|
16942
|
+
*/
|
|
16943
|
+
static resolveDelivery(params: CreateIntentParams): {
|
|
16944
|
+
dstAddress: string;
|
|
16945
|
+
deliveryData: Hex | undefined;
|
|
16946
|
+
};
|
|
16947
|
+
}
|
|
16948
|
+
|
|
16949
|
+
/**
|
|
16950
|
+
* Stateless utility for the `Intent.data` envelope layer.
|
|
16951
|
+
*
|
|
16952
|
+
* `Intent.data` carries zero or more typed entries (a partner-fee payload, a delivery payload, …).
|
|
16953
|
+
* This class owns how those entries are packed into bytes the on-chain `IntentDataLib` decodes and
|
|
16954
|
+
* how they are recovered back out, keeping the `ArrayData` codec ({@link ARRAY_DATA_ABI}) in one
|
|
16955
|
+
* place. The delivery payloads themselves are produced by `HookService`; this layer is agnostic to
|
|
16956
|
+
* their contents and simply folds them in alongside the fee.
|
|
16957
|
+
*/
|
|
16958
|
+
declare class IntentDataService {
|
|
16959
|
+
private constructor();
|
|
16960
|
+
/**
|
|
16961
|
+
* Folds a partner-fee envelope and an optional delivery payload into the final `Intent.data`:
|
|
16962
|
+
* - Neither → `'0x'`.
|
|
16963
|
+
* - Exactly one → that single packed `[uint8 type, bytes payload]` envelope (byte-identical to a
|
|
16964
|
+
* bare fee envelope, so a fee-only intent's `data` is unchanged and stays decode-stable).
|
|
16965
|
+
* - Both → a `TYPE_ARRAY` envelope wrapping `[FEE, DELIVERY]` entries.
|
|
16966
|
+
*
|
|
16967
|
+
* @param feeEnvelope - The packed fee envelope from `EvmSolverService.createIntentFeeData` (`'0x'` if no fee).
|
|
16968
|
+
* @param deliveryData - Opaque delivery payload (e.g. from `HookService.encodeDeliveryData`), or `undefined`.
|
|
16969
|
+
*/
|
|
16970
|
+
static composeIntentData(feeEnvelope: Hex, deliveryData?: Hex): Hex;
|
|
16971
|
+
/**
|
|
16972
|
+
* Encodes a list of typed `IntentData` entries into the `Intent.data` bytes the contract decodes.
|
|
16973
|
+
* Empty → `'0x'`; single → a packed `[uint8 type, bytes payload]` envelope; multiple → a `TYPE_ARRAY`
|
|
16974
|
+
* envelope wrapping the entries as `ArrayData { DataEntry[] }`.
|
|
16975
|
+
*/
|
|
16976
|
+
static encodeIntentData(entries: IntentData[]): Hex;
|
|
16977
|
+
/**
|
|
16978
|
+
* Extracts the raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) from an intent's
|
|
16979
|
+
* `data`, unwrapping whichever envelope shape it uses. Returns `undefined` when there is no fee:
|
|
16980
|
+
* empty `data`, a delivery-only envelope, or an unknown type byte (logged). Used by
|
|
16981
|
+
* `EvmSolverService.decodeIntentFeeAmount` to recover fees regardless of delivery data.
|
|
16982
|
+
*/
|
|
16983
|
+
static extractFeePayload(data: Hex): Hex | undefined;
|
|
16984
|
+
}
|
|
16985
|
+
|
|
16873
16986
|
/**
|
|
16874
16987
|
* Stateless HTTP client for the SODAX solver API.
|
|
16875
16988
|
*
|
|
@@ -17153,4 +17266,4 @@ type DexErrorCode = LookupErrorCode;
|
|
|
17153
17266
|
type DexError = SodaxError<DexErrorCode>;
|
|
17154
17267
|
declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
|
|
17155
17268
|
|
|
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 };
|
|
17269
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|