@privy-io/js-sdk-core 0.75.0 → 0.76.1
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/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/index.d.mts +89 -4
- package/dist/dts/index.d.ts +89 -4
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +15 -13
package/dist/dts/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthenticatedUser, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, LinkedAccount, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, LinkedAccountEmbeddedWallet, LinkedAccountEmbeddedWalletWithID, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSmartWallet, LinkedAccountSolanaEmbeddedWallet, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, MoonpayOnRampSignInput, OAuthProviderID, OAuthProviderID as OAuthProviderID$1, OAuthTokens, PasskeyAuthenticatorVerifyResponse, RawSignResponse, SmartWalletConfiguration, SmartWalletType as SmartWalletType$1, TransferRequestBody, UnsignedEthereumTransaction, User, Wallet, WalletCreateParams, WalletRawSignParams, WalletRpcParams, WalletRpcResponse, WalletUpdateParams, Wallets } from "@privy-io/api-types";
|
|
2
2
|
import { Chain, RpcConfig } from "@privy-io/chains";
|
|
3
|
-
import { CreateCryptoDepositAccountResponse, CryptoDepositAccountQuoteResponse, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, Route } from "@privy-io/routes";
|
|
3
|
+
import { CreateCryptoDepositAccountResponse, CryptoDepositAccountConfig, CryptoDepositAccountQuoteResponse, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, Route } from "@privy-io/routes";
|
|
4
4
|
import "@metamask/eth-sig-util";
|
|
5
5
|
import "viem/account-abstraction";
|
|
6
6
|
import { StrictUnsignedTempoTransactionRequest, StrictUnsignedTransactionRequest } from "@privy-io/ethereum";
|
|
@@ -3111,6 +3111,14 @@ type CryptoDepositAccountQuoteInput = {
|
|
|
3111
3111
|
inputAmount?: string;
|
|
3112
3112
|
slippageBps?: number;
|
|
3113
3113
|
};
|
|
3114
|
+
type GetCryptoDepositAccountOrderInput = {
|
|
3115
|
+
walletId: string;
|
|
3116
|
+
orderId: string;
|
|
3117
|
+
};
|
|
3118
|
+
type GetCryptoDepositAccountNextOrderInput = {
|
|
3119
|
+
walletId: string;
|
|
3120
|
+
after: string;
|
|
3121
|
+
};
|
|
3114
3122
|
//#endregion
|
|
3115
3123
|
//#region src/wallet-api/sign-wallet-request.d.ts
|
|
3116
3124
|
interface SignWalletRequestInput {
|
|
@@ -3156,8 +3164,59 @@ declare function createCryptoDepositAccount(context: WalletApiActionContext & Pi
|
|
|
3156
3164
|
declare function getCryptoDepositAccountQuote(privy: Pick<Privy, 'fetchPrivyRoute' | 'track'>, input: CryptoDepositAccountQuoteInput): Promise<CryptoDepositAccountQuote>;
|
|
3157
3165
|
/** Conversion rate as dest-per-source, or undefined when the quote amounts are not usable. */
|
|
3158
3166
|
declare function indicativeRateFromQuote(quote: CryptoDepositAccountQuote): string | undefined;
|
|
3167
|
+
//#endregion
|
|
3168
|
+
//#region src/action/cryptoDepositAccount/orders.d.ts
|
|
3169
|
+
/** Fetches a crypto deposit-account sweep by wallet action ID. */
|
|
3170
|
+
declare function getCryptoDepositAccountOrder(privy: Pick<Privy, 'fetchPrivyRoute'>, input: GetCryptoDepositAccountOrderInput): Promise<GetCryptoDepositAccountOrderResponse>;
|
|
3171
|
+
/** Fetches the next crypto deposit-account sweep into the path wallet after `after`. */
|
|
3172
|
+
declare function getCryptoDepositAccountNextOrder(privy: Pick<Privy, 'fetchPrivyRoute'>, input: GetCryptoDepositAccountNextOrderInput): Promise<GetCryptoDepositAccountNextOrderResponse>;
|
|
3173
|
+
//#endregion
|
|
3174
|
+
//#region src/action/cryptoDepositAccount/filter-deposit-config.d.ts
|
|
3175
|
+
/**
|
|
3176
|
+
* Filters the deposit-account catalog by a source include/exclude.
|
|
3177
|
+
* `all` keeps every listed token/chain; include/exclude narrow that list.
|
|
3178
|
+
*/
|
|
3179
|
+
declare function filterDepositConfig(config: CryptoDepositAccountConfig, source: CryptoDepositAssetFilter): CryptoDepositAccountConfig;
|
|
3180
|
+
//#endregion
|
|
3181
|
+
//#region src/action/cryptoDepositAccount/pick-deposit-address.d.ts
|
|
3182
|
+
/**
|
|
3183
|
+
* Picks the deposit address that should be shown for a selected source chain.
|
|
3184
|
+
*
|
|
3185
|
+
* Create returns one address per source chain family. Prefer an account whose
|
|
3186
|
+
* source filter mentions that chain, then fall back to address format vs VM.
|
|
3187
|
+
*/
|
|
3188
|
+
declare function pickDepositAddressForChain({ accounts, selectedChain }: {
|
|
3189
|
+
accounts: CryptoDepositAddressRoute[];
|
|
3190
|
+
selectedChain: {
|
|
3191
|
+
caip2: string;
|
|
3192
|
+
vmType: string;
|
|
3193
|
+
};
|
|
3194
|
+
}): string | undefined;
|
|
3195
|
+
//#endregion
|
|
3196
|
+
//#region src/action/cryptoDepositAccount/aliases.d.ts
|
|
3197
|
+
/** Resolves an alias, CAIP-2, or numeric chain id to CAIP-2 when known. */
|
|
3198
|
+
declare function resolveChainAlias(chain: string): string;
|
|
3199
|
+
/** True when the asset alias refers to a chain's native token. */
|
|
3200
|
+
declare function isNativeAssetAlias(asset: string): boolean;
|
|
3201
|
+
/**
|
|
3202
|
+
* Quote asset for a selected catalog currency: canonical named id when the
|
|
3203
|
+
* symbol is on the shared asset list, otherwise the chain's token address.
|
|
3204
|
+
*/
|
|
3205
|
+
declare function quoteSourceAsset({ symbol, address }: {
|
|
3206
|
+
symbol: string;
|
|
3207
|
+
address: string;
|
|
3208
|
+
}): string;
|
|
3209
|
+
/**
|
|
3210
|
+
* Catalog display symbol for a dest asset/chain (aliases or raw ids).
|
|
3211
|
+
* Falls back to the uppercased param when the dest is not in the catalog.
|
|
3212
|
+
*/
|
|
3213
|
+
declare function findCatalogSymbol({ config, chain, asset }: {
|
|
3214
|
+
config: CryptoDepositAccountConfig;
|
|
3215
|
+
chain?: string;
|
|
3216
|
+
asset: string;
|
|
3217
|
+
}): string;
|
|
3159
3218
|
declare namespace index_d_exports$1 {
|
|
3160
|
-
export { CreateCryptoDepositAccountInput, CreateCryptoDepositAccountResponse, CreateCryptoDepositAccountWithConfigInput, CreateCryptoDepositAccountWithRouteInput, CryptoDepositAccountQuote, CryptoDepositAccountQuoteInput, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, createCryptoDepositAccount, getCryptoDepositAccountQuote, indicativeRateFromQuote };
|
|
3219
|
+
export { CreateCryptoDepositAccountInput, CreateCryptoDepositAccountResponse, CreateCryptoDepositAccountWithConfigInput, CreateCryptoDepositAccountWithRouteInput, CryptoDepositAccountConfig, CryptoDepositAccountQuote, CryptoDepositAccountQuoteInput, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, GetCryptoDepositAccountNextOrderInput, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderInput, GetCryptoDepositAccountOrderResponse, createCryptoDepositAccount, filterDepositConfig, findCatalogSymbol, getCryptoDepositAccountNextOrder, getCryptoDepositAccountOrder, getCryptoDepositAccountQuote, indicativeRateFromQuote, isNativeAssetAlias, pickDepositAddressForChain, quoteSourceAsset, resolveChainAlias };
|
|
3161
3220
|
}
|
|
3162
3221
|
//#endregion
|
|
3163
3222
|
//#region src/wallet-api/generate-authorization-signature.d.ts
|
|
@@ -3267,7 +3326,7 @@ declare function updateWallet(context: WalletApiActionContext, { wallet_id }: {
|
|
|
3267
3326
|
//#endregion
|
|
3268
3327
|
//#region src/wallet-api/unified-wallet.d.ts
|
|
3269
3328
|
/**
|
|
3270
|
-
* Determines if a given wallet account
|
|
3329
|
+
* Determines if a given wallet account executes in the TEE.
|
|
3271
3330
|
*
|
|
3272
3331
|
* @param account an embedded wallet account linked to the user
|
|
3273
3332
|
* @returns whether the wallet is a user-owned server wallet
|
|
@@ -3290,6 +3349,32 @@ type Input = TransferRequestBody & {
|
|
|
3290
3349
|
*/
|
|
3291
3350
|
declare function transfer(context: WalletApiActionContext, sign: SignWalletRequest, { wallet_id, ...request }: Input): Promise<Wallets.Actions.TransferActionResponse>;
|
|
3292
3351
|
//#endregion
|
|
3352
|
+
//#region src/wallet-api/wallet-actions.d.ts
|
|
3353
|
+
/**
|
|
3354
|
+
* Fetches the current status of a wallet action through the Wallet API.
|
|
3355
|
+
*
|
|
3356
|
+
* @param context The context needed to execute the action
|
|
3357
|
+
* @param wallet_id The ID of the wallet the action belongs to
|
|
3358
|
+
* @param action_id The ID of the action to fetch
|
|
3359
|
+
* @returns The wallet action with its current status
|
|
3360
|
+
*/
|
|
3361
|
+
declare function getWalletAction(context: WalletApiActionContext, { wallet_id, action_id }: {
|
|
3362
|
+
wallet_id: string;
|
|
3363
|
+
action_id: string;
|
|
3364
|
+
}): Promise<Wallets.Actions.WalletActionResponse>;
|
|
3365
|
+
/**
|
|
3366
|
+
* Lists wallet actions through the Wallet API, with optional filtering by type and
|
|
3367
|
+
* cursor-based pagination.
|
|
3368
|
+
*
|
|
3369
|
+
* @param context The context needed to execute the action
|
|
3370
|
+
* @param wallet_id The ID of the wallet to list actions for
|
|
3371
|
+
* @param query Optional filtering and pagination parameters
|
|
3372
|
+
* @returns A page of wallet actions
|
|
3373
|
+
*/
|
|
3374
|
+
declare function listWalletActions(context: WalletApiActionContext, { wallet_id, ...query }: {
|
|
3375
|
+
wallet_id: string;
|
|
3376
|
+
} & Wallets.Actions.ListWalletActionsQuery): Promise<Wallets.Actions.ListWalletActionsResponse>;
|
|
3377
|
+
//#endregion
|
|
3293
3378
|
//#region src/embedded/stack/session-signers.d.ts
|
|
3294
3379
|
interface SessionSigner {
|
|
3295
3380
|
signer_id: string;
|
|
@@ -3428,4 +3513,4 @@ declare const THIRDWEB: "thirdweb";
|
|
|
3428
3513
|
/** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
|
|
3429
3514
|
declare const NEXUS: "nexus";
|
|
3430
3515
|
//#endregion
|
|
3431
|
-
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateCryptoDepositAccountInput, type CreateCryptoDepositAccountResponse, type CreateSiwsMessageOpts, type CryptoDepositAccountQuote, type CryptoDepositAccountQuoteInput, type CryptoDepositAddressRoute, type CryptoDepositAsset, type CryptoDepositAssetFilter, DATA_SUFFIX_PLUGIN_ID, type DataSuffixPlugin, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, type PrivyPlugin, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SessionSignerInput, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createDataSuffixPlugin, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, index_d_exports$1 as cryptoDepositAccount, Privy as default, index_d_exports$2 as delegatedActions, index_d_exports$3 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateWallet, validatePhoneNumber };
|
|
3516
|
+
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateCryptoDepositAccountInput, type CreateCryptoDepositAccountResponse, type CreateSiwsMessageOpts, type CryptoDepositAccountConfig, type CryptoDepositAccountQuote, type CryptoDepositAccountQuoteInput, type CryptoDepositAddressRoute, type CryptoDepositAsset, type CryptoDepositAssetFilter, DATA_SUFFIX_PLUGIN_ID, type DataSuffixPlugin, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetCryptoDepositAccountNextOrderInput, type GetCryptoDepositAccountNextOrderResponse, type GetCryptoDepositAccountOrderInput, type GetCryptoDepositAccountOrderResponse, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, type PrivyPlugin, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SessionSignerInput, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createDataSuffixPlugin, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, index_d_exports$1 as cryptoDepositAccount, Privy as default, index_d_exports$2 as delegatedActions, index_d_exports$3 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, getWalletAction, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, listWalletActions, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateWallet, validatePhoneNumber };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthenticatedUser, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, LinkedAccount, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, LinkedAccountEmbeddedWallet, LinkedAccountEmbeddedWalletWithID, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSmartWallet, LinkedAccountSolanaEmbeddedWallet, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, MoonpayOnRampSignInput, OAuthProviderID, OAuthProviderID as OAuthProviderID$1, OAuthTokens, PasskeyAuthenticatorVerifyResponse, RawSignResponse, SmartWalletConfiguration, SmartWalletType as SmartWalletType$1, TransferRequestBody, UnsignedEthereumTransaction, User, Wallet, WalletCreateParams, WalletRawSignParams, WalletRpcParams, WalletRpcResponse, WalletUpdateParams, Wallets } from "@privy-io/api-types";
|
|
2
2
|
import { Chain, RpcConfig } from "@privy-io/chains";
|
|
3
|
-
import { CreateCryptoDepositAccountResponse, CryptoDepositAccountQuoteResponse, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, Route } from "@privy-io/routes";
|
|
3
|
+
import { CreateCryptoDepositAccountResponse, CryptoDepositAccountConfig, CryptoDepositAccountQuoteResponse, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, Route } from "@privy-io/routes";
|
|
4
4
|
import "@metamask/eth-sig-util";
|
|
5
5
|
import "viem/account-abstraction";
|
|
6
6
|
import { StrictUnsignedTempoTransactionRequest, StrictUnsignedTransactionRequest } from "@privy-io/ethereum";
|
|
@@ -3111,6 +3111,14 @@ type CryptoDepositAccountQuoteInput = {
|
|
|
3111
3111
|
inputAmount?: string;
|
|
3112
3112
|
slippageBps?: number;
|
|
3113
3113
|
};
|
|
3114
|
+
type GetCryptoDepositAccountOrderInput = {
|
|
3115
|
+
walletId: string;
|
|
3116
|
+
orderId: string;
|
|
3117
|
+
};
|
|
3118
|
+
type GetCryptoDepositAccountNextOrderInput = {
|
|
3119
|
+
walletId: string;
|
|
3120
|
+
after: string;
|
|
3121
|
+
};
|
|
3114
3122
|
//#endregion
|
|
3115
3123
|
//#region src/wallet-api/sign-wallet-request.d.ts
|
|
3116
3124
|
interface SignWalletRequestInput {
|
|
@@ -3156,8 +3164,59 @@ declare function createCryptoDepositAccount(context: WalletApiActionContext & Pi
|
|
|
3156
3164
|
declare function getCryptoDepositAccountQuote(privy: Pick<Privy, 'fetchPrivyRoute' | 'track'>, input: CryptoDepositAccountQuoteInput): Promise<CryptoDepositAccountQuote>;
|
|
3157
3165
|
/** Conversion rate as dest-per-source, or undefined when the quote amounts are not usable. */
|
|
3158
3166
|
declare function indicativeRateFromQuote(quote: CryptoDepositAccountQuote): string | undefined;
|
|
3167
|
+
//#endregion
|
|
3168
|
+
//#region src/action/cryptoDepositAccount/orders.d.ts
|
|
3169
|
+
/** Fetches a crypto deposit-account sweep by wallet action ID. */
|
|
3170
|
+
declare function getCryptoDepositAccountOrder(privy: Pick<Privy, 'fetchPrivyRoute'>, input: GetCryptoDepositAccountOrderInput): Promise<GetCryptoDepositAccountOrderResponse>;
|
|
3171
|
+
/** Fetches the next crypto deposit-account sweep into the path wallet after `after`. */
|
|
3172
|
+
declare function getCryptoDepositAccountNextOrder(privy: Pick<Privy, 'fetchPrivyRoute'>, input: GetCryptoDepositAccountNextOrderInput): Promise<GetCryptoDepositAccountNextOrderResponse>;
|
|
3173
|
+
//#endregion
|
|
3174
|
+
//#region src/action/cryptoDepositAccount/filter-deposit-config.d.ts
|
|
3175
|
+
/**
|
|
3176
|
+
* Filters the deposit-account catalog by a source include/exclude.
|
|
3177
|
+
* `all` keeps every listed token/chain; include/exclude narrow that list.
|
|
3178
|
+
*/
|
|
3179
|
+
declare function filterDepositConfig(config: CryptoDepositAccountConfig, source: CryptoDepositAssetFilter): CryptoDepositAccountConfig;
|
|
3180
|
+
//#endregion
|
|
3181
|
+
//#region src/action/cryptoDepositAccount/pick-deposit-address.d.ts
|
|
3182
|
+
/**
|
|
3183
|
+
* Picks the deposit address that should be shown for a selected source chain.
|
|
3184
|
+
*
|
|
3185
|
+
* Create returns one address per source chain family. Prefer an account whose
|
|
3186
|
+
* source filter mentions that chain, then fall back to address format vs VM.
|
|
3187
|
+
*/
|
|
3188
|
+
declare function pickDepositAddressForChain({ accounts, selectedChain }: {
|
|
3189
|
+
accounts: CryptoDepositAddressRoute[];
|
|
3190
|
+
selectedChain: {
|
|
3191
|
+
caip2: string;
|
|
3192
|
+
vmType: string;
|
|
3193
|
+
};
|
|
3194
|
+
}): string | undefined;
|
|
3195
|
+
//#endregion
|
|
3196
|
+
//#region src/action/cryptoDepositAccount/aliases.d.ts
|
|
3197
|
+
/** Resolves an alias, CAIP-2, or numeric chain id to CAIP-2 when known. */
|
|
3198
|
+
declare function resolveChainAlias(chain: string): string;
|
|
3199
|
+
/** True when the asset alias refers to a chain's native token. */
|
|
3200
|
+
declare function isNativeAssetAlias(asset: string): boolean;
|
|
3201
|
+
/**
|
|
3202
|
+
* Quote asset for a selected catalog currency: canonical named id when the
|
|
3203
|
+
* symbol is on the shared asset list, otherwise the chain's token address.
|
|
3204
|
+
*/
|
|
3205
|
+
declare function quoteSourceAsset({ symbol, address }: {
|
|
3206
|
+
symbol: string;
|
|
3207
|
+
address: string;
|
|
3208
|
+
}): string;
|
|
3209
|
+
/**
|
|
3210
|
+
* Catalog display symbol for a dest asset/chain (aliases or raw ids).
|
|
3211
|
+
* Falls back to the uppercased param when the dest is not in the catalog.
|
|
3212
|
+
*/
|
|
3213
|
+
declare function findCatalogSymbol({ config, chain, asset }: {
|
|
3214
|
+
config: CryptoDepositAccountConfig;
|
|
3215
|
+
chain?: string;
|
|
3216
|
+
asset: string;
|
|
3217
|
+
}): string;
|
|
3159
3218
|
declare namespace index_d_exports$1 {
|
|
3160
|
-
export { CreateCryptoDepositAccountInput, CreateCryptoDepositAccountResponse, CreateCryptoDepositAccountWithConfigInput, CreateCryptoDepositAccountWithRouteInput, CryptoDepositAccountQuote, CryptoDepositAccountQuoteInput, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, createCryptoDepositAccount, getCryptoDepositAccountQuote, indicativeRateFromQuote };
|
|
3219
|
+
export { CreateCryptoDepositAccountInput, CreateCryptoDepositAccountResponse, CreateCryptoDepositAccountWithConfigInput, CreateCryptoDepositAccountWithRouteInput, CryptoDepositAccountConfig, CryptoDepositAccountQuote, CryptoDepositAccountQuoteInput, CryptoDepositAddressRoute, CryptoDepositAsset, CryptoDepositAssetFilter, GetCryptoDepositAccountNextOrderInput, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderInput, GetCryptoDepositAccountOrderResponse, createCryptoDepositAccount, filterDepositConfig, findCatalogSymbol, getCryptoDepositAccountNextOrder, getCryptoDepositAccountOrder, getCryptoDepositAccountQuote, indicativeRateFromQuote, isNativeAssetAlias, pickDepositAddressForChain, quoteSourceAsset, resolveChainAlias };
|
|
3161
3220
|
}
|
|
3162
3221
|
//#endregion
|
|
3163
3222
|
//#region src/wallet-api/generate-authorization-signature.d.ts
|
|
@@ -3267,7 +3326,7 @@ declare function updateWallet(context: WalletApiActionContext, { wallet_id }: {
|
|
|
3267
3326
|
//#endregion
|
|
3268
3327
|
//#region src/wallet-api/unified-wallet.d.ts
|
|
3269
3328
|
/**
|
|
3270
|
-
* Determines if a given wallet account
|
|
3329
|
+
* Determines if a given wallet account executes in the TEE.
|
|
3271
3330
|
*
|
|
3272
3331
|
* @param account an embedded wallet account linked to the user
|
|
3273
3332
|
* @returns whether the wallet is a user-owned server wallet
|
|
@@ -3290,6 +3349,32 @@ type Input = TransferRequestBody & {
|
|
|
3290
3349
|
*/
|
|
3291
3350
|
declare function transfer(context: WalletApiActionContext, sign: SignWalletRequest, { wallet_id, ...request }: Input): Promise<Wallets.Actions.TransferActionResponse>;
|
|
3292
3351
|
//#endregion
|
|
3352
|
+
//#region src/wallet-api/wallet-actions.d.ts
|
|
3353
|
+
/**
|
|
3354
|
+
* Fetches the current status of a wallet action through the Wallet API.
|
|
3355
|
+
*
|
|
3356
|
+
* @param context The context needed to execute the action
|
|
3357
|
+
* @param wallet_id The ID of the wallet the action belongs to
|
|
3358
|
+
* @param action_id The ID of the action to fetch
|
|
3359
|
+
* @returns The wallet action with its current status
|
|
3360
|
+
*/
|
|
3361
|
+
declare function getWalletAction(context: WalletApiActionContext, { wallet_id, action_id }: {
|
|
3362
|
+
wallet_id: string;
|
|
3363
|
+
action_id: string;
|
|
3364
|
+
}): Promise<Wallets.Actions.WalletActionResponse>;
|
|
3365
|
+
/**
|
|
3366
|
+
* Lists wallet actions through the Wallet API, with optional filtering by type and
|
|
3367
|
+
* cursor-based pagination.
|
|
3368
|
+
*
|
|
3369
|
+
* @param context The context needed to execute the action
|
|
3370
|
+
* @param wallet_id The ID of the wallet to list actions for
|
|
3371
|
+
* @param query Optional filtering and pagination parameters
|
|
3372
|
+
* @returns A page of wallet actions
|
|
3373
|
+
*/
|
|
3374
|
+
declare function listWalletActions(context: WalletApiActionContext, { wallet_id, ...query }: {
|
|
3375
|
+
wallet_id: string;
|
|
3376
|
+
} & Wallets.Actions.ListWalletActionsQuery): Promise<Wallets.Actions.ListWalletActionsResponse>;
|
|
3377
|
+
//#endregion
|
|
3293
3378
|
//#region src/embedded/stack/session-signers.d.ts
|
|
3294
3379
|
interface SessionSigner {
|
|
3295
3380
|
signer_id: string;
|
|
@@ -3428,4 +3513,4 @@ declare const THIRDWEB: "thirdweb";
|
|
|
3428
3513
|
/** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
|
|
3429
3514
|
declare const NEXUS: "nexus";
|
|
3430
3515
|
//#endregion
|
|
3431
|
-
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateCryptoDepositAccountInput, type CreateCryptoDepositAccountResponse, type CreateSiwsMessageOpts, type CryptoDepositAccountQuote, type CryptoDepositAccountQuoteInput, type CryptoDepositAddressRoute, type CryptoDepositAsset, type CryptoDepositAssetFilter, DATA_SUFFIX_PLUGIN_ID, type DataSuffixPlugin, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, type PrivyPlugin, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SessionSignerInput, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createDataSuffixPlugin, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, index_d_exports$1 as cryptoDepositAccount, Privy as default, index_d_exports$2 as delegatedActions, index_d_exports$3 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateWallet, validatePhoneNumber };
|
|
3516
|
+
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateCryptoDepositAccountInput, type CreateCryptoDepositAccountResponse, type CreateSiwsMessageOpts, type CryptoDepositAccountConfig, type CryptoDepositAccountQuote, type CryptoDepositAccountQuoteInput, type CryptoDepositAddressRoute, type CryptoDepositAsset, type CryptoDepositAssetFilter, DATA_SUFFIX_PLUGIN_ID, type DataSuffixPlugin, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetCryptoDepositAccountNextOrderInput, type GetCryptoDepositAccountNextOrderResponse, type GetCryptoDepositAccountOrderInput, type GetCryptoDepositAccountOrderResponse, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, type PrivyPlugin, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SessionSignerInput, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createDataSuffixPlugin, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, index_d_exports$1 as cryptoDepositAccount, Privy as default, index_d_exports$2 as delegatedActions, index_d_exports$3 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, getWalletAction, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, listWalletActions, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateWallet, validatePhoneNumber };
|