@sodax/sdk 1.2.2-beta → 1.2.4-beta
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 +123 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -3
- package/dist/index.d.ts +46 -3
- package/dist/index.mjs +123 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, Address, Erc20Token, HttpUrl, SpokeChainId, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID,
|
|
1
|
+
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, Address, Erc20Token, HttpUrl, SpokeChainId, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, EvmRawTransactionReceipt, ChainType, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID, BaseSpokeChainConfig, IConfigApi, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, GetSwapTokensByChainIdApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetHubAssetsApiResponse, GetHubAssetsByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, HubAssetInfo, HubChainId, IconEoaAddress, HubChainConfig, BridgeLimit } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
import * as viem from 'viem';
|
|
4
4
|
import { Hex, Address as Address$1, PublicClient, HttpTransport, WalletClient, CustomTransport, Chain, Account as Account$1, Hash, GetLogsReturnType, TransactionReceipt } from 'viem';
|
|
@@ -7864,6 +7864,7 @@ declare class EvmSpokeService {
|
|
|
7864
7864
|
* @returns {Promise<TxReturnType<EvmSpokeProviderType, R>>} A promise that resolves to the transaction hash.
|
|
7865
7865
|
*/
|
|
7866
7866
|
private static call;
|
|
7867
|
+
static waitForTransactionReceipt(params: VerifyTxHashRawEvmConfig): Promise<Result<EvmRawTransactionReceipt, Error>>;
|
|
7867
7868
|
}
|
|
7868
7869
|
|
|
7869
7870
|
/**
|
|
@@ -7944,6 +7945,12 @@ declare class SpokeService {
|
|
|
7944
7945
|
* @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
|
|
7945
7946
|
*/
|
|
7946
7947
|
static verifyTxHash(txHash: string, spokeProvider: SpokeProvider): Promise<Result<boolean>>;
|
|
7948
|
+
/**
|
|
7949
|
+
* Verifies the transaction hash for the spoke chain to exist on chain.
|
|
7950
|
+
* @param {VerifyTxHashRawConfig} params - The parameters for the verification.
|
|
7951
|
+
* @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
|
|
7952
|
+
*/
|
|
7953
|
+
static verifyTxHashRaw<T extends ChainType>(params: VerifyTxHashRawConfig<T>): Promise<Result<boolean>>;
|
|
7947
7954
|
}
|
|
7948
7955
|
|
|
7949
7956
|
type IconSpokeDepositParams = {
|
|
@@ -8145,7 +8152,9 @@ declare class SolanaSpokeService {
|
|
|
8145
8152
|
* @returns The transaction result.
|
|
8146
8153
|
*/
|
|
8147
8154
|
private static call;
|
|
8148
|
-
static
|
|
8155
|
+
static waitForConfirmationRaw(params: VerifyTxHashRawSolanaConfig): Promise<Result<boolean>>;
|
|
8156
|
+
static waitForConfirmation(spokeProvider: SolanaSpokeProvider, signature: string, commitment?: Finality, timeoutMs?: number, // total time to wait
|
|
8157
|
+
pollingTimeout?: number): Promise<Result<boolean>>;
|
|
8149
8158
|
}
|
|
8150
8159
|
|
|
8151
8160
|
declare const IntentCreatedEventAbi: {
|
|
@@ -9337,6 +9346,7 @@ declare class StellarSpokeService {
|
|
|
9337
9346
|
static callWallet<R extends boolean = false>(from: HubAddress, payload: Hex, spokeProvider: StellarSpokeProviderType, hubProvider: EvmHubProvider, raw?: R): Promise<TxReturnType<StellarSpokeProviderType, R>>;
|
|
9338
9347
|
private static transfer;
|
|
9339
9348
|
private static call;
|
|
9349
|
+
static waitForTransactionRaw(params: VerifyTxHashRawStellarConfig): Promise<Result<boolean, Error>>;
|
|
9340
9350
|
static waitForTransaction(spokeProvider: StellarSpokeProvider, txHash: string, pollingTimeout?: number, maxAttempts?: number): Promise<Result<boolean, Error>>;
|
|
9341
9351
|
}
|
|
9342
9352
|
|
|
@@ -9756,6 +9766,39 @@ type SonicAddressOrSpokeType = {
|
|
|
9756
9766
|
} | {
|
|
9757
9767
|
spokeProvider: SonicSpokeProviderType;
|
|
9758
9768
|
};
|
|
9769
|
+
type VerifyTxHashRawSolanaConfig = {
|
|
9770
|
+
chainType: 'SOLANA';
|
|
9771
|
+
rpcUrl: HttpUrl;
|
|
9772
|
+
signature: string;
|
|
9773
|
+
commitment?: Finality;
|
|
9774
|
+
timeoutMs?: number;
|
|
9775
|
+
pollingTimeout?: number;
|
|
9776
|
+
};
|
|
9777
|
+
type VerifyTxHashRawStellarConfig = {
|
|
9778
|
+
txHash: string;
|
|
9779
|
+
chainType: 'STELLAR';
|
|
9780
|
+
sorobanRpcConfig: {
|
|
9781
|
+
sorobanRpcUrl: HttpUrl;
|
|
9782
|
+
customHeaders: Record<string, string>;
|
|
9783
|
+
};
|
|
9784
|
+
pollingTimeout?: number;
|
|
9785
|
+
maxAttempts?: number;
|
|
9786
|
+
};
|
|
9787
|
+
type VerifyTxHashRawEvmConfig = {
|
|
9788
|
+
txHash: Hash;
|
|
9789
|
+
chainType: 'EVM';
|
|
9790
|
+
chainId: EvmChainId;
|
|
9791
|
+
rpcUrl: HttpUrl | undefined;
|
|
9792
|
+
confirmations?: number;
|
|
9793
|
+
pollingInterval?: number;
|
|
9794
|
+
retryCount?: number;
|
|
9795
|
+
retryDelay?: number;
|
|
9796
|
+
timeout?: number;
|
|
9797
|
+
};
|
|
9798
|
+
type VerifyTxHashRawConfigType = Prettify<(VerifyTxHashRawSolanaConfig | VerifyTxHashRawStellarConfig | VerifyTxHashRawEvmConfig) & {
|
|
9799
|
+
chainType: ChainType;
|
|
9800
|
+
}>;
|
|
9801
|
+
type VerifyTxHashRawConfig<T extends ChainType> = T extends 'SOLANA' ? VerifyTxHashRawSolanaConfig : T extends 'STELLAR' ? VerifyTxHashRawStellarConfig : T extends 'EVM' ? VerifyTxHashRawEvmConfig : VerifyTxHashRawConfigType;
|
|
9759
9802
|
|
|
9760
9803
|
/**
|
|
9761
9804
|
* BackendApiService - Proxy service for Sodax Backend API
|
|
@@ -11640,4 +11683,4 @@ declare class MigrationService {
|
|
|
11640
11683
|
createRevertSodaToIcxMigrationIntent<S extends SonicSpokeProviderType = SonicSpokeProviderType, R extends boolean = false>(params: Omit<IcxCreateRevertMigrationParams, 'wICX'>, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>, MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'>>>;
|
|
11641
11684
|
}
|
|
11642
11685
|
|
|
11643
|
-
export { type AggregatedReserveData, type AllowanceResponse, type ApiResponse, type AssetEntry, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CancelUnstakeParams, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetChainConfigType, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QuoteType, RAY, RAY_DECIMALS, type RawSpokeProvider, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, convertTransactionInstructionToRaw, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarSpokeProvider, isStellarSpokeProviderType, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, submitTransaction, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
11686
|
+
export { type AggregatedReserveData, type AllowanceResponse, type ApiResponse, type AssetEntry, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CancelUnstakeParams, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetChainConfigType, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QuoteType, RAY, RAY_DECIMALS, type RawSpokeProvider, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, type VerifyTxHashRawConfig, type VerifyTxHashRawConfigType, type VerifyTxHashRawEvmConfig, type VerifyTxHashRawSolanaConfig, type VerifyTxHashRawStellarConfig, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, convertTransactionInstructionToRaw, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarSpokeProvider, isStellarSpokeProviderType, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, submitTransaction, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, Address, Erc20Token, HttpUrl, SpokeChainId, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID,
|
|
1
|
+
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, Address, Erc20Token, HttpUrl, SpokeChainId, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, EvmRawTransactionReceipt, ChainType, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID, BaseSpokeChainConfig, IConfigApi, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, GetSwapTokensByChainIdApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetHubAssetsApiResponse, GetHubAssetsByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, HubAssetInfo, HubChainId, IconEoaAddress, HubChainConfig, BridgeLimit } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
import * as viem from 'viem';
|
|
4
4
|
import { Hex, Address as Address$1, PublicClient, HttpTransport, WalletClient, CustomTransport, Chain, Account as Account$1, Hash, GetLogsReturnType, TransactionReceipt } from 'viem';
|
|
@@ -7864,6 +7864,7 @@ declare class EvmSpokeService {
|
|
|
7864
7864
|
* @returns {Promise<TxReturnType<EvmSpokeProviderType, R>>} A promise that resolves to the transaction hash.
|
|
7865
7865
|
*/
|
|
7866
7866
|
private static call;
|
|
7867
|
+
static waitForTransactionReceipt(params: VerifyTxHashRawEvmConfig): Promise<Result<EvmRawTransactionReceipt, Error>>;
|
|
7867
7868
|
}
|
|
7868
7869
|
|
|
7869
7870
|
/**
|
|
@@ -7944,6 +7945,12 @@ declare class SpokeService {
|
|
|
7944
7945
|
* @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
|
|
7945
7946
|
*/
|
|
7946
7947
|
static verifyTxHash(txHash: string, spokeProvider: SpokeProvider): Promise<Result<boolean>>;
|
|
7948
|
+
/**
|
|
7949
|
+
* Verifies the transaction hash for the spoke chain to exist on chain.
|
|
7950
|
+
* @param {VerifyTxHashRawConfig} params - The parameters for the verification.
|
|
7951
|
+
* @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
|
|
7952
|
+
*/
|
|
7953
|
+
static verifyTxHashRaw<T extends ChainType>(params: VerifyTxHashRawConfig<T>): Promise<Result<boolean>>;
|
|
7947
7954
|
}
|
|
7948
7955
|
|
|
7949
7956
|
type IconSpokeDepositParams = {
|
|
@@ -8145,7 +8152,9 @@ declare class SolanaSpokeService {
|
|
|
8145
8152
|
* @returns The transaction result.
|
|
8146
8153
|
*/
|
|
8147
8154
|
private static call;
|
|
8148
|
-
static
|
|
8155
|
+
static waitForConfirmationRaw(params: VerifyTxHashRawSolanaConfig): Promise<Result<boolean>>;
|
|
8156
|
+
static waitForConfirmation(spokeProvider: SolanaSpokeProvider, signature: string, commitment?: Finality, timeoutMs?: number, // total time to wait
|
|
8157
|
+
pollingTimeout?: number): Promise<Result<boolean>>;
|
|
8149
8158
|
}
|
|
8150
8159
|
|
|
8151
8160
|
declare const IntentCreatedEventAbi: {
|
|
@@ -9337,6 +9346,7 @@ declare class StellarSpokeService {
|
|
|
9337
9346
|
static callWallet<R extends boolean = false>(from: HubAddress, payload: Hex, spokeProvider: StellarSpokeProviderType, hubProvider: EvmHubProvider, raw?: R): Promise<TxReturnType<StellarSpokeProviderType, R>>;
|
|
9338
9347
|
private static transfer;
|
|
9339
9348
|
private static call;
|
|
9349
|
+
static waitForTransactionRaw(params: VerifyTxHashRawStellarConfig): Promise<Result<boolean, Error>>;
|
|
9340
9350
|
static waitForTransaction(spokeProvider: StellarSpokeProvider, txHash: string, pollingTimeout?: number, maxAttempts?: number): Promise<Result<boolean, Error>>;
|
|
9341
9351
|
}
|
|
9342
9352
|
|
|
@@ -9756,6 +9766,39 @@ type SonicAddressOrSpokeType = {
|
|
|
9756
9766
|
} | {
|
|
9757
9767
|
spokeProvider: SonicSpokeProviderType;
|
|
9758
9768
|
};
|
|
9769
|
+
type VerifyTxHashRawSolanaConfig = {
|
|
9770
|
+
chainType: 'SOLANA';
|
|
9771
|
+
rpcUrl: HttpUrl;
|
|
9772
|
+
signature: string;
|
|
9773
|
+
commitment?: Finality;
|
|
9774
|
+
timeoutMs?: number;
|
|
9775
|
+
pollingTimeout?: number;
|
|
9776
|
+
};
|
|
9777
|
+
type VerifyTxHashRawStellarConfig = {
|
|
9778
|
+
txHash: string;
|
|
9779
|
+
chainType: 'STELLAR';
|
|
9780
|
+
sorobanRpcConfig: {
|
|
9781
|
+
sorobanRpcUrl: HttpUrl;
|
|
9782
|
+
customHeaders: Record<string, string>;
|
|
9783
|
+
};
|
|
9784
|
+
pollingTimeout?: number;
|
|
9785
|
+
maxAttempts?: number;
|
|
9786
|
+
};
|
|
9787
|
+
type VerifyTxHashRawEvmConfig = {
|
|
9788
|
+
txHash: Hash;
|
|
9789
|
+
chainType: 'EVM';
|
|
9790
|
+
chainId: EvmChainId;
|
|
9791
|
+
rpcUrl: HttpUrl | undefined;
|
|
9792
|
+
confirmations?: number;
|
|
9793
|
+
pollingInterval?: number;
|
|
9794
|
+
retryCount?: number;
|
|
9795
|
+
retryDelay?: number;
|
|
9796
|
+
timeout?: number;
|
|
9797
|
+
};
|
|
9798
|
+
type VerifyTxHashRawConfigType = Prettify<(VerifyTxHashRawSolanaConfig | VerifyTxHashRawStellarConfig | VerifyTxHashRawEvmConfig) & {
|
|
9799
|
+
chainType: ChainType;
|
|
9800
|
+
}>;
|
|
9801
|
+
type VerifyTxHashRawConfig<T extends ChainType> = T extends 'SOLANA' ? VerifyTxHashRawSolanaConfig : T extends 'STELLAR' ? VerifyTxHashRawStellarConfig : T extends 'EVM' ? VerifyTxHashRawEvmConfig : VerifyTxHashRawConfigType;
|
|
9759
9802
|
|
|
9760
9803
|
/**
|
|
9761
9804
|
* BackendApiService - Proxy service for Sodax Backend API
|
|
@@ -11640,4 +11683,4 @@ declare class MigrationService {
|
|
|
11640
11683
|
createRevertSodaToIcxMigrationIntent<S extends SonicSpokeProviderType = SonicSpokeProviderType, R extends boolean = false>(params: Omit<IcxCreateRevertMigrationParams, 'wICX'>, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>, MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'>>>;
|
|
11641
11684
|
}
|
|
11642
11685
|
|
|
11643
|
-
export { type AggregatedReserveData, type AllowanceResponse, type ApiResponse, type AssetEntry, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CancelUnstakeParams, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetChainConfigType, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QuoteType, RAY, RAY_DECIMALS, type RawSpokeProvider, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, convertTransactionInstructionToRaw, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarSpokeProvider, isStellarSpokeProviderType, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, submitTransaction, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
11686
|
+
export { type AggregatedReserveData, type AllowanceResponse, type ApiResponse, type AssetEntry, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CancelUnstakeParams, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetChainConfigType, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, type NewbnUSDChainId, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QuoteType, RAY, RAY_DECIMALS, type RawSpokeProvider, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, type VerifyTxHashRawConfig, type VerifyTxHashRawConfigType, type VerifyTxHashRawEvmConfig, type VerifyTxHashRawSolanaConfig, type VerifyTxHashRawStellarConfig, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, convertTransactionInstructionToRaw, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarSpokeProvider, isStellarSpokeProviderType, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, submitTransaction, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
package/dist/index.mjs
CHANGED
|
@@ -10739,6 +10739,33 @@ var StellarSpokeService = class _StellarSpokeService {
|
|
|
10739
10739
|
raw
|
|
10740
10740
|
);
|
|
10741
10741
|
}
|
|
10742
|
+
static async waitForTransactionRaw(params) {
|
|
10743
|
+
const defaultParams = {
|
|
10744
|
+
pollingTimeout: 750,
|
|
10745
|
+
maxAttempts: 40
|
|
10746
|
+
};
|
|
10747
|
+
const { pollingTimeout, maxAttempts, sorobanRpcConfig, txHash } = { ...defaultParams, ...params };
|
|
10748
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
10749
|
+
try {
|
|
10750
|
+
const sorobanServer = new CustomSorobanServer(sorobanRpcConfig.sorobanRpcUrl, sorobanRpcConfig.customHeaders);
|
|
10751
|
+
const tx = await sorobanServer.getTransaction(txHash);
|
|
10752
|
+
if (tx && tx.status === "SUCCESS") {
|
|
10753
|
+
return { ok: true, value: true };
|
|
10754
|
+
}
|
|
10755
|
+
if (tx && tx.status === "FAILED") {
|
|
10756
|
+
return { ok: false, error: new Error(`Transaction failed: ${JSON.stringify(tx)}`) };
|
|
10757
|
+
}
|
|
10758
|
+
if (tx && tx.status === "NOT_FOUND") {
|
|
10759
|
+
await sleep(pollingTimeout);
|
|
10760
|
+
continue;
|
|
10761
|
+
}
|
|
10762
|
+
await sleep(pollingTimeout);
|
|
10763
|
+
} catch (err) {
|
|
10764
|
+
await sleep(pollingTimeout);
|
|
10765
|
+
}
|
|
10766
|
+
}
|
|
10767
|
+
return { ok: false, error: new Error("Transaction was not confirmed within the max attempts") };
|
|
10768
|
+
}
|
|
10742
10769
|
static async waitForTransaction(spokeProvider, txHash, pollingTimeout = 750, maxAttempts = 40) {
|
|
10743
10770
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
10744
10771
|
try {
|
|
@@ -11548,6 +11575,42 @@ var EvmSpokeService = class _EvmSpokeService {
|
|
|
11548
11575
|
}
|
|
11549
11576
|
return spokeProvider.walletProvider.sendTransaction(rawTx);
|
|
11550
11577
|
}
|
|
11578
|
+
static async waitForTransactionReceipt(params) {
|
|
11579
|
+
try {
|
|
11580
|
+
const { txHash, chainId, rpcUrl, confirmations, pollingInterval, retryCount, retryDelay, timeout } = params;
|
|
11581
|
+
const evmChain = getEvmViemChain(chainId);
|
|
11582
|
+
const publicClient = createPublicClient({
|
|
11583
|
+
chain: evmChain,
|
|
11584
|
+
transport: http(rpcUrl ?? evmChain.rpcUrls.default.http[0])
|
|
11585
|
+
});
|
|
11586
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
11587
|
+
hash: txHash,
|
|
11588
|
+
confirmations,
|
|
11589
|
+
pollingInterval,
|
|
11590
|
+
retryCount,
|
|
11591
|
+
retryDelay,
|
|
11592
|
+
timeout
|
|
11593
|
+
});
|
|
11594
|
+
const response = {
|
|
11595
|
+
...receipt,
|
|
11596
|
+
transactionIndex: receipt.transactionIndex.toString(),
|
|
11597
|
+
blockNumber: receipt.blockNumber.toString(),
|
|
11598
|
+
cumulativeGasUsed: receipt.cumulativeGasUsed.toString(),
|
|
11599
|
+
gasUsed: receipt.gasUsed.toString(),
|
|
11600
|
+
contractAddress: receipt.contractAddress?.toString() ?? null,
|
|
11601
|
+
logs: receipt.logs.map((log) => ({
|
|
11602
|
+
...log,
|
|
11603
|
+
blockNumber: log.blockNumber.toString(),
|
|
11604
|
+
logIndex: log.logIndex.toString(),
|
|
11605
|
+
transactionIndex: log.transactionIndex.toString()
|
|
11606
|
+
})),
|
|
11607
|
+
effectiveGasPrice: receipt.effectiveGasPrice?.toString()
|
|
11608
|
+
};
|
|
11609
|
+
return { ok: true, value: response };
|
|
11610
|
+
} catch (error) {
|
|
11611
|
+
return { ok: false, error: new Error(`Failed to get transaction receipt: ${JSON.stringify(error)}`) };
|
|
11612
|
+
}
|
|
11613
|
+
}
|
|
11551
11614
|
};
|
|
11552
11615
|
|
|
11553
11616
|
// src/shared/utils/icon-utils.ts
|
|
@@ -12009,7 +12072,40 @@ var SolanaSpokeService = class _SolanaSpokeService {
|
|
|
12009
12072
|
}
|
|
12010
12073
|
return spokeProvider.walletProvider.sendTransaction(serializedTransaction);
|
|
12011
12074
|
}
|
|
12012
|
-
static async
|
|
12075
|
+
static async waitForConfirmationRaw(params) {
|
|
12076
|
+
try {
|
|
12077
|
+
const defaultParams = {
|
|
12078
|
+
commitment: "finalized",
|
|
12079
|
+
timeoutMs: 6e4,
|
|
12080
|
+
// total time to wait
|
|
12081
|
+
pollingTimeout: 750
|
|
12082
|
+
// 750ms retry interval
|
|
12083
|
+
};
|
|
12084
|
+
const { rpcUrl, signature, commitment, timeoutMs, pollingTimeout } = { ...defaultParams, ...params };
|
|
12085
|
+
const connection = new Connection(rpcUrl, commitment);
|
|
12086
|
+
const deadline = Date.now() + timeoutMs;
|
|
12087
|
+
while (Date.now() < deadline) {
|
|
12088
|
+
try {
|
|
12089
|
+
const tx = await connection.getTransaction(signature, { commitment, maxSupportedTransactionVersion: 0 });
|
|
12090
|
+
if (tx) {
|
|
12091
|
+
if (tx.meta?.err) {
|
|
12092
|
+
return { ok: false, error: new Error(JSON.stringify(tx.meta.err)) };
|
|
12093
|
+
}
|
|
12094
|
+
return { ok: true, value: true };
|
|
12095
|
+
}
|
|
12096
|
+
} catch {
|
|
12097
|
+
}
|
|
12098
|
+
await new Promise((r) => setTimeout(r, pollingTimeout));
|
|
12099
|
+
}
|
|
12100
|
+
return {
|
|
12101
|
+
ok: false,
|
|
12102
|
+
error: new Error(`Timed out after ${timeoutMs}ms waiting for ${commitment} confirmation for ${signature}`)
|
|
12103
|
+
};
|
|
12104
|
+
} catch (error) {
|
|
12105
|
+
return { ok: false, error: new Error(`Failed to get transaction confirmation: ${JSON.stringify(error)}`) };
|
|
12106
|
+
}
|
|
12107
|
+
}
|
|
12108
|
+
static async waitForConfirmation(spokeProvider, signature, commitment = "finalized", timeoutMs = 6e4, pollingTimeout = 750) {
|
|
12013
12109
|
try {
|
|
12014
12110
|
const connection = new Connection(spokeProvider.chainConfig.rpcUrl, commitment);
|
|
12015
12111
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -12024,7 +12120,7 @@ var SolanaSpokeService = class _SolanaSpokeService {
|
|
|
12024
12120
|
}
|
|
12025
12121
|
} catch {
|
|
12026
12122
|
}
|
|
12027
|
-
await new Promise((r) => setTimeout(r,
|
|
12123
|
+
await new Promise((r) => setTimeout(r, pollingTimeout));
|
|
12028
12124
|
}
|
|
12029
12125
|
return {
|
|
12030
12126
|
ok: false,
|
|
@@ -12446,6 +12542,31 @@ var SpokeService = class _SpokeService {
|
|
|
12446
12542
|
value: true
|
|
12447
12543
|
};
|
|
12448
12544
|
}
|
|
12545
|
+
/**
|
|
12546
|
+
* Verifies the transaction hash for the spoke chain to exist on chain.
|
|
12547
|
+
* @param {VerifyTxHashRawConfig} params - The parameters for the verification.
|
|
12548
|
+
* @returns {Promise<Result<boolean>>} A promise that resolves to the result of the verification.
|
|
12549
|
+
*/
|
|
12550
|
+
static async verifyTxHashRaw(params) {
|
|
12551
|
+
switch (params.chainType) {
|
|
12552
|
+
case "SOLANA":
|
|
12553
|
+
return SolanaSpokeService.waitForConfirmationRaw(params);
|
|
12554
|
+
case "STELLAR":
|
|
12555
|
+
return StellarSpokeService.waitForTransactionRaw(params);
|
|
12556
|
+
case "EVM": {
|
|
12557
|
+
const result = await EvmSpokeService.waitForTransactionReceipt(params);
|
|
12558
|
+
if (!result.ok) {
|
|
12559
|
+
return result;
|
|
12560
|
+
}
|
|
12561
|
+
if (result.value.status && result.value.status !== "0x1") {
|
|
12562
|
+
return { ok: false, error: new Error("Transaction reverted") };
|
|
12563
|
+
}
|
|
12564
|
+
return { ok: true, value: true };
|
|
12565
|
+
}
|
|
12566
|
+
default:
|
|
12567
|
+
return { ok: true, value: true };
|
|
12568
|
+
}
|
|
12569
|
+
}
|
|
12449
12570
|
};
|
|
12450
12571
|
var IntentDataType = /* @__PURE__ */ ((IntentDataType2) => {
|
|
12451
12572
|
IntentDataType2[IntentDataType2["FEE"] = 1] = "FEE";
|