@privy-io/js-sdk-core 0.78.0 → 0.78.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.
@@ -1,4 +1,4 @@
1
- import { AuthenticatedUser, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, CreateCryptoDepositAccountResponse, CryptoDepositAccountConfigResponse, CryptoDepositAddressRoute, CryptoDepositAddressStrategy, CryptoDepositAsset, CryptoDepositAssetFilter, DepositAccountCryptoQuoteResponse, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, 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";
1
+ import { AuthenticatedUser, CardIssuingCardResponse, CardIssuingCardStatus, CardIssuingCardsResponse, CardIssuingCustomerResponse, CardIssuingReplacementReason, CardIssuingTransactionsResponse, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, CreateCryptoDepositAccountResponse, CryptoDepositAccountConfigResponse, CryptoDepositAddressRoute, CryptoDepositAddressStrategy, CryptoDepositAsset, CryptoDepositAssetFilter, DepositAccountCryptoQuoteResponse, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, IntegrationEnvironment, 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
3
  import { Route } from "@privy-io/routes";
4
4
  import "@metamask/eth-sig-util";
@@ -3538,6 +3538,174 @@ type PollResult<T> = {
3538
3538
  };
3539
3539
  declare const poll: <T>({ operation, until, delay, interval, attempts: maxAttempts, signal }: PollOptions<T>) => Promise<PollResult<T>>;
3540
3540
  //#endregion
3541
+ //#region src/cards/accept-card-consents.d.ts
3542
+ /**
3543
+ * Records that the user accepted the agreements Privy tracks (the electronic disclosure and the
3544
+ * bank agreements), returning the customer at its advanced status. Acceptances are write-once, so
3545
+ * re-sending a field that is already recorded leaves the original timestamp unchanged.
3546
+ *
3547
+ * The cardholder must already exist. Accepting the bank terms before the electronic disclosure
3548
+ * is rejected by the backend.
3549
+ */
3550
+ declare const acceptCardConsents: (client: Privy, { environment, acceptElectronicDisclosure, acceptBankTerms }: {
3551
+ environment: IntegrationEnvironment;
3552
+ acceptElectronicDisclosure?: boolean;
3553
+ acceptBankTerms?: boolean;
3554
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3555
+ //#endregion
3556
+ //#region src/cards/cards-config.d.ts
3557
+ /** Browser-safe card-issuing configuration. */
3558
+ type CardsConfig = {
3559
+ publishableKey: string;
3560
+ /** Dedicated card-face logo. Distinct from login `appearance.logo`; null when none is set. */
3561
+ cardLogoUrl: string | null;
3562
+ /** Scope for platform keys; omitted when the key belongs to the issuing account. */
3563
+ stripeAccount?: string;
3564
+ };
3565
+ //#endregion
3566
+ //#region src/cards/create-card.d.ts
3567
+ /**
3568
+ * Creates the virtual card for a wallet, returning the new card. Only valid once the cards
3569
+ * customer has reached `ready`; there is one card per account.
3570
+ *
3571
+ * @param chainId CAIP-2 chain id, e.g. `'eip155:84532'`.
3572
+ */
3573
+ declare const createCard: (client: Privy, { environment, walletId, chainId, asset }: {
3574
+ environment: IntegrationEnvironment;
3575
+ walletId: string;
3576
+ chainId: string;
3577
+ asset: string;
3578
+ }) => Promise<CardIssuingCardResponse>;
3579
+ //#endregion
3580
+ //#region src/cards/download-card-statement.d.ts
3581
+ /**
3582
+ * Fetches one month's card statement as a PDF blob.
3583
+ *
3584
+ * Fetched through {@link Privy.fetchPrivyRouteRaw} because the body is a PDF, not JSON.
3585
+ * `statementPeriod` is `YYYY-MM`.
3586
+ */
3587
+ declare const downloadCardStatement: (client: Privy, { cardId, environment, statementPeriod }: {
3588
+ cardId: string;
3589
+ environment: IntegrationEnvironment;
3590
+ statementPeriod: string;
3591
+ }) => Promise<Blob>;
3592
+ //#endregion
3593
+ //#region src/cards/get-card-by-id.d.ts
3594
+ /**
3595
+ * One card by id, or null when it is not among the user's first {@link LIST_CARDS_MAX_LIMIT}.
3596
+ *
3597
+ * A single page of the list endpoint, filtered client-side, with `next_cursor` not followed.
3598
+ * The list endpoint does a live retrieve plus a balance lookup per card, so paging through it
3599
+ * to find one card grows with the user's card count. A card past the first page resolves to null.
3600
+ *
3601
+ * ##CardByIdListShim: replace this with one `GET /api/v1/cards/[card_id]` call when that endpoint
3602
+ * exists. Today the endpoint registers `PUT` only.
3603
+ */
3604
+ declare const getCardById: (client: Privy, { cardId, environment }: {
3605
+ cardId: string;
3606
+ environment: IntegrationEnvironment;
3607
+ }) => Promise<CardIssuingCardResponse | null>;
3608
+ //#endregion
3609
+ //#region src/cards/get-card-customer.d.ts
3610
+ /**
3611
+ * Cards customer onboarding state for the authenticated user.
3612
+ *
3613
+ * Returns `{status: 'not_created'}` rather than a 404 when no customer exists.
3614
+ */
3615
+ declare const getCardCustomer: (client: Privy, { environment }: {
3616
+ environment: IntegrationEnvironment;
3617
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3618
+ //#endregion
3619
+ //#region src/cards/get-card-ephemeral-key.d.ts
3620
+ /**
3621
+ * Mints a single-use Stripe ephemeral key for revealing one card's sensitive fields.
3622
+ *
3623
+ * The caller first creates an ephemeral-key nonce for the card's provider id. That `nonce` is
3624
+ * passed here, and the backend exchanges it with Stripe for the short-lived secret. The secret
3625
+ * is handed to the Stripe display elements, which fetch and render the number, expiry, and CVC
3626
+ * without those values touching this SDK.
3627
+ *
3628
+ * `cardId` is Privy's id. Its path scopes the key to the caller's card, which prevents IDOR
3629
+ * access. The `nonce` was minted against Stripe's provider id.
3630
+ */
3631
+ declare const getCardEphemeralKey: (client: Privy, { cardId, environment, nonce }: {
3632
+ cardId: string;
3633
+ environment: IntegrationEnvironment;
3634
+ nonce: string;
3635
+ }) => Promise<string>;
3636
+ //#endregion
3637
+ //#region src/cards/get-cards-config.d.ts
3638
+ /** Browser-safe card-issuing config for the app in `environment`. */
3639
+ declare const getCardsConfig: (client: Privy, { appId, environment }: {
3640
+ appId: string;
3641
+ environment: IntegrationEnvironment;
3642
+ }) => Promise<CardsConfig>;
3643
+ //#endregion
3644
+ //#region src/cards/get-or-create-card-customer.d.ts
3645
+ /**
3646
+ * Get-or-create the cardholder for the authenticated user, returning its onboarding state.
3647
+ * Requires a linked email on the account.
3648
+ */
3649
+ declare const getOrCreateCardCustomer: (client: Privy, { environment }: {
3650
+ environment: IntegrationEnvironment;
3651
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3652
+ //#endregion
3653
+ //#region src/cards/list-card-transactions.d.ts
3654
+ /**
3655
+ * A page of activity for one card, newest first.
3656
+ *
3657
+ * @param cursor opaque, from a previous page's `next_cursor`. Never construct one.
3658
+ * @param limit applies per activity source, so a page can carry up to twice this many rows.
3659
+ */
3660
+ declare const listCardTransactions: (client: Privy, { cardId, environment, limit, cursor }: {
3661
+ cardId: string;
3662
+ environment: IntegrationEnvironment;
3663
+ limit?: number;
3664
+ cursor?: string;
3665
+ }) => Promise<CardIssuingTransactionsResponse>;
3666
+ //#endregion
3667
+ //#region src/cards/list-cards-max-limit.d.ts
3668
+ /** Largest page accepted by the list-cards endpoint. */
3669
+ declare const LIST_CARDS_MAX_LIMIT = 20;
3670
+ //#endregion
3671
+ //#region src/cards/list-cards.d.ts
3672
+ /** The authenticated user's cards, newest page first. */
3673
+ declare const listCards: (client: Privy, { environment, limit, cursor }: {
3674
+ environment: IntegrationEnvironment;
3675
+ limit?: number;
3676
+ cursor?: string;
3677
+ }) => Promise<CardIssuingCardsResponse>;
3678
+ //#endregion
3679
+ //#region src/cards/replace-card.d.ts
3680
+ /**
3681
+ * Replaces one card in a single request: the current card is closed and a fresh card is issued
3682
+ * and returned.
3683
+ */
3684
+ declare const replaceCard: (client: Privy, { cardId, environment, reason }: {
3685
+ cardId: string;
3686
+ environment: IntegrationEnvironment;
3687
+ reason: CardIssuingReplacementReason;
3688
+ }) => Promise<CardIssuingCardResponse>;
3689
+ //#endregion
3690
+ //#region src/cards/update-card-pin.d.ts
3691
+ /** Sets one card's PIN from a Stripe-encrypted JWE. The plaintext PIN never enters this request. */
3692
+ declare const updateCardPin: (client: Privy, { cardId, environment, encryptedNumber }: {
3693
+ cardId: string;
3694
+ environment: IntegrationEnvironment;
3695
+ encryptedNumber: string;
3696
+ }) => Promise<CardIssuingCardResponse>;
3697
+ //#endregion
3698
+ //#region src/cards/update-card-status.d.ts
3699
+ /**
3700
+ * Moves one card to `status`, returning the updated card. `inactive` is a reversible freeze;
3701
+ * `canceled` is terminal.
3702
+ */
3703
+ declare const updateCardStatus: (client: Privy, { cardId, environment, status }: {
3704
+ cardId: string;
3705
+ environment: IntegrationEnvironment;
3706
+ status: CardIssuingCardStatus;
3707
+ }) => Promise<CardIssuingCardResponse>;
3708
+ //#endregion
3541
3709
  //#region src/index.d.ts
3542
3710
  /** @deprecated Use OAuthProviderID instead */
3543
3711
  type OAuthProviderType = OAuthProviderID$1;
@@ -3557,4 +3725,4 @@ declare const THIRDWEB: "thirdweb";
3557
3725
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
3558
3726
  declare const NEXUS: "nexus";
3559
3727
  //#endregion
3560
- 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 CryptoDepositAddressStrategy, 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, getFiatOnrampProviderBrand, getFiatOnrampProviderId, 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 };
3728
+ export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, type CardsConfig, 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 CryptoDepositAddressStrategy, 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, LIST_CARDS_MAX_LIMIT, 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, acceptCardConsents, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createCard, 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, downloadCardStatement, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCardById, getCardCustomer, getCardEphemeralKey, getCardsConfig, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getFiatOnrampProviderBrand, getFiatOnrampProviderId, getIsTokenUsdc, getJsonRpcEndpointFromChain, getOrCreateCardCustomer, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, getWalletAction, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, listCardTransactions, listCards, listWalletActions, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, replaceCard, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateCardPin, updateCardStatus, updateWallet, validatePhoneNumber };
@@ -1,4 +1,4 @@
1
- import { AuthenticatedUser, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, CreateCryptoDepositAccountResponse, CryptoDepositAccountConfigResponse, CryptoDepositAddressRoute, CryptoDepositAddressStrategy, CryptoDepositAsset, CryptoDepositAssetFilter, DepositAccountCryptoQuoteResponse, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, 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";
1
+ import { AuthenticatedUser, CardIssuingCardResponse, CardIssuingCardStatus, CardIssuingCardsResponse, CardIssuingCustomerResponse, CardIssuingReplacementReason, CardIssuingTransactionsResponse, CoinbaseOnRampInitInput, CoinbaseOnRampInitResponse, CreateCryptoDepositAccountResponse, CryptoDepositAccountConfigResponse, CryptoDepositAddressRoute, CryptoDepositAddressStrategy, CryptoDepositAsset, CryptoDepositAssetFilter, DepositAccountCryptoQuoteResponse, GetCryptoDepositAccountNextOrderResponse, GetCryptoDepositAccountOrderResponse, IntegrationEnvironment, 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
3
  import { Route } from "@privy-io/routes";
4
4
  import "@metamask/eth-sig-util";
@@ -3538,6 +3538,174 @@ type PollResult<T> = {
3538
3538
  };
3539
3539
  declare const poll: <T>({ operation, until, delay, interval, attempts: maxAttempts, signal }: PollOptions<T>) => Promise<PollResult<T>>;
3540
3540
  //#endregion
3541
+ //#region src/cards/accept-card-consents.d.ts
3542
+ /**
3543
+ * Records that the user accepted the agreements Privy tracks (the electronic disclosure and the
3544
+ * bank agreements), returning the customer at its advanced status. Acceptances are write-once, so
3545
+ * re-sending a field that is already recorded leaves the original timestamp unchanged.
3546
+ *
3547
+ * The cardholder must already exist. Accepting the bank terms before the electronic disclosure
3548
+ * is rejected by the backend.
3549
+ */
3550
+ declare const acceptCardConsents: (client: Privy, { environment, acceptElectronicDisclosure, acceptBankTerms }: {
3551
+ environment: IntegrationEnvironment;
3552
+ acceptElectronicDisclosure?: boolean;
3553
+ acceptBankTerms?: boolean;
3554
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3555
+ //#endregion
3556
+ //#region src/cards/cards-config.d.ts
3557
+ /** Browser-safe card-issuing configuration. */
3558
+ type CardsConfig = {
3559
+ publishableKey: string;
3560
+ /** Dedicated card-face logo. Distinct from login `appearance.logo`; null when none is set. */
3561
+ cardLogoUrl: string | null;
3562
+ /** Scope for platform keys; omitted when the key belongs to the issuing account. */
3563
+ stripeAccount?: string;
3564
+ };
3565
+ //#endregion
3566
+ //#region src/cards/create-card.d.ts
3567
+ /**
3568
+ * Creates the virtual card for a wallet, returning the new card. Only valid once the cards
3569
+ * customer has reached `ready`; there is one card per account.
3570
+ *
3571
+ * @param chainId CAIP-2 chain id, e.g. `'eip155:84532'`.
3572
+ */
3573
+ declare const createCard: (client: Privy, { environment, walletId, chainId, asset }: {
3574
+ environment: IntegrationEnvironment;
3575
+ walletId: string;
3576
+ chainId: string;
3577
+ asset: string;
3578
+ }) => Promise<CardIssuingCardResponse>;
3579
+ //#endregion
3580
+ //#region src/cards/download-card-statement.d.ts
3581
+ /**
3582
+ * Fetches one month's card statement as a PDF blob.
3583
+ *
3584
+ * Fetched through {@link Privy.fetchPrivyRouteRaw} because the body is a PDF, not JSON.
3585
+ * `statementPeriod` is `YYYY-MM`.
3586
+ */
3587
+ declare const downloadCardStatement: (client: Privy, { cardId, environment, statementPeriod }: {
3588
+ cardId: string;
3589
+ environment: IntegrationEnvironment;
3590
+ statementPeriod: string;
3591
+ }) => Promise<Blob>;
3592
+ //#endregion
3593
+ //#region src/cards/get-card-by-id.d.ts
3594
+ /**
3595
+ * One card by id, or null when it is not among the user's first {@link LIST_CARDS_MAX_LIMIT}.
3596
+ *
3597
+ * A single page of the list endpoint, filtered client-side, with `next_cursor` not followed.
3598
+ * The list endpoint does a live retrieve plus a balance lookup per card, so paging through it
3599
+ * to find one card grows with the user's card count. A card past the first page resolves to null.
3600
+ *
3601
+ * ##CardByIdListShim: replace this with one `GET /api/v1/cards/[card_id]` call when that endpoint
3602
+ * exists. Today the endpoint registers `PUT` only.
3603
+ */
3604
+ declare const getCardById: (client: Privy, { cardId, environment }: {
3605
+ cardId: string;
3606
+ environment: IntegrationEnvironment;
3607
+ }) => Promise<CardIssuingCardResponse | null>;
3608
+ //#endregion
3609
+ //#region src/cards/get-card-customer.d.ts
3610
+ /**
3611
+ * Cards customer onboarding state for the authenticated user.
3612
+ *
3613
+ * Returns `{status: 'not_created'}` rather than a 404 when no customer exists.
3614
+ */
3615
+ declare const getCardCustomer: (client: Privy, { environment }: {
3616
+ environment: IntegrationEnvironment;
3617
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3618
+ //#endregion
3619
+ //#region src/cards/get-card-ephemeral-key.d.ts
3620
+ /**
3621
+ * Mints a single-use Stripe ephemeral key for revealing one card's sensitive fields.
3622
+ *
3623
+ * The caller first creates an ephemeral-key nonce for the card's provider id. That `nonce` is
3624
+ * passed here, and the backend exchanges it with Stripe for the short-lived secret. The secret
3625
+ * is handed to the Stripe display elements, which fetch and render the number, expiry, and CVC
3626
+ * without those values touching this SDK.
3627
+ *
3628
+ * `cardId` is Privy's id. Its path scopes the key to the caller's card, which prevents IDOR
3629
+ * access. The `nonce` was minted against Stripe's provider id.
3630
+ */
3631
+ declare const getCardEphemeralKey: (client: Privy, { cardId, environment, nonce }: {
3632
+ cardId: string;
3633
+ environment: IntegrationEnvironment;
3634
+ nonce: string;
3635
+ }) => Promise<string>;
3636
+ //#endregion
3637
+ //#region src/cards/get-cards-config.d.ts
3638
+ /** Browser-safe card-issuing config for the app in `environment`. */
3639
+ declare const getCardsConfig: (client: Privy, { appId, environment }: {
3640
+ appId: string;
3641
+ environment: IntegrationEnvironment;
3642
+ }) => Promise<CardsConfig>;
3643
+ //#endregion
3644
+ //#region src/cards/get-or-create-card-customer.d.ts
3645
+ /**
3646
+ * Get-or-create the cardholder for the authenticated user, returning its onboarding state.
3647
+ * Requires a linked email on the account.
3648
+ */
3649
+ declare const getOrCreateCardCustomer: (client: Privy, { environment }: {
3650
+ environment: IntegrationEnvironment;
3651
+ }) => Promise<CardIssuingCustomerResponse['data']>;
3652
+ //#endregion
3653
+ //#region src/cards/list-card-transactions.d.ts
3654
+ /**
3655
+ * A page of activity for one card, newest first.
3656
+ *
3657
+ * @param cursor opaque, from a previous page's `next_cursor`. Never construct one.
3658
+ * @param limit applies per activity source, so a page can carry up to twice this many rows.
3659
+ */
3660
+ declare const listCardTransactions: (client: Privy, { cardId, environment, limit, cursor }: {
3661
+ cardId: string;
3662
+ environment: IntegrationEnvironment;
3663
+ limit?: number;
3664
+ cursor?: string;
3665
+ }) => Promise<CardIssuingTransactionsResponse>;
3666
+ //#endregion
3667
+ //#region src/cards/list-cards-max-limit.d.ts
3668
+ /** Largest page accepted by the list-cards endpoint. */
3669
+ declare const LIST_CARDS_MAX_LIMIT = 20;
3670
+ //#endregion
3671
+ //#region src/cards/list-cards.d.ts
3672
+ /** The authenticated user's cards, newest page first. */
3673
+ declare const listCards: (client: Privy, { environment, limit, cursor }: {
3674
+ environment: IntegrationEnvironment;
3675
+ limit?: number;
3676
+ cursor?: string;
3677
+ }) => Promise<CardIssuingCardsResponse>;
3678
+ //#endregion
3679
+ //#region src/cards/replace-card.d.ts
3680
+ /**
3681
+ * Replaces one card in a single request: the current card is closed and a fresh card is issued
3682
+ * and returned.
3683
+ */
3684
+ declare const replaceCard: (client: Privy, { cardId, environment, reason }: {
3685
+ cardId: string;
3686
+ environment: IntegrationEnvironment;
3687
+ reason: CardIssuingReplacementReason;
3688
+ }) => Promise<CardIssuingCardResponse>;
3689
+ //#endregion
3690
+ //#region src/cards/update-card-pin.d.ts
3691
+ /** Sets one card's PIN from a Stripe-encrypted JWE. The plaintext PIN never enters this request. */
3692
+ declare const updateCardPin: (client: Privy, { cardId, environment, encryptedNumber }: {
3693
+ cardId: string;
3694
+ environment: IntegrationEnvironment;
3695
+ encryptedNumber: string;
3696
+ }) => Promise<CardIssuingCardResponse>;
3697
+ //#endregion
3698
+ //#region src/cards/update-card-status.d.ts
3699
+ /**
3700
+ * Moves one card to `status`, returning the updated card. `inactive` is a reversible freeze;
3701
+ * `canceled` is terminal.
3702
+ */
3703
+ declare const updateCardStatus: (client: Privy, { cardId, environment, status }: {
3704
+ cardId: string;
3705
+ environment: IntegrationEnvironment;
3706
+ status: CardIssuingCardStatus;
3707
+ }) => Promise<CardIssuingCardResponse>;
3708
+ //#endregion
3541
3709
  //#region src/index.d.ts
3542
3710
  /** @deprecated Use OAuthProviderID instead */
3543
3711
  type OAuthProviderType = OAuthProviderID$1;
@@ -3557,4 +3725,4 @@ declare const THIRDWEB: "thirdweb";
3557
3725
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
3558
3726
  declare const NEXUS: "nexus";
3559
3727
  //#endregion
3560
- 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 CryptoDepositAddressStrategy, 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, getFiatOnrampProviderBrand, getFiatOnrampProviderId, 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 };
3728
+ export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, type CardsConfig, 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 CryptoDepositAddressStrategy, 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, LIST_CARDS_MAX_LIMIT, 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, acceptCardConsents, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createCard, 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, downloadCardStatement, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCardById, getCardCustomer, getCardEphemeralKey, getCardsConfig, getCoinbaseOnRampUrl, getCountryCallingCode, getDataSuffixPlugin, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getFiatOnrampProviderBrand, getFiatOnrampProviderId, getIsTokenUsdc, getJsonRpcEndpointFromChain, getOrCreateCardCustomer, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, getWalletAction, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, listCardTransactions, listCards, listWalletActions, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, replaceCard, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, transfer, updateCardPin, updateCardStatus, updateWallet, validatePhoneNumber };