@privy-io/react-auth 3.4.1 → 3.5.0
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/EmbeddedWalletConnectingScreen-D_YsihzO.js +27 -0
- package/dist/cjs/SignRequestScreen-MGUrxay9.js +1 -0
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/events-context-Dn0fJZ2h.js +1 -0
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/frame-B2orQ_lK.js +1 -0
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/internal-context-CeWKmK5u.js +1 -0
- package/dist/cjs/internal.js +1 -0
- package/dist/cjs/smart-wallets-5q-XiLac.js +1 -0
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +2 -2
- package/dist/cjs/use-export-wallet-C7R1A29C.js +2 -0
- package/dist/cjs/use-sign-with-user-signer-BtJVKMQr.js +1 -0
- package/dist/cjs/useActiveWallet-E94x91YD.js +1 -0
- package/dist/cjs/usePrivy-BEZb4Uky.js +1 -0
- package/dist/dts/events-context-DB3Pn5Hg.d.mts +328 -0
- package/dist/dts/events-context-DB3Pn5Hg.d.ts +328 -0
- package/dist/dts/extended-chains.d.mts +24 -2
- package/dist/dts/extended-chains.d.ts +24 -2
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +20 -332
- package/dist/dts/index.d.ts +20 -332
- package/dist/dts/internal.d.mts +44 -0
- package/dist/dts/internal.d.ts +44 -0
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +31 -7
- package/dist/dts/solana.d.ts +31 -7
- package/dist/dts/{types-BF33BYgd.d.mts → types-C4KyGxEF.d.mts} +3 -3
- package/dist/dts/{types-BF33BYgd.d.ts → types-C4KyGxEF.d.ts} +3 -3
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-ilL_GaJO.mjs +25 -0
- package/dist/esm/SignRequestScreen-B3UhThlp.mjs +1 -0
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/events-context-CB7CF-OC.mjs +1 -0
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/frame-Dj70FEYB.mjs +1 -0
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/internal-context-eGSwROSk.mjs +1 -0
- package/dist/esm/internal.mjs +1 -0
- package/dist/esm/smart-wallets-DINPJbZr.mjs +1 -0
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +2 -2
- package/dist/esm/use-export-wallet-CED1-6Km.mjs +1 -0
- package/dist/esm/use-sign-with-user-signer-DaTvrd5T.mjs +1 -0
- package/dist/esm/useActiveWallet-2NxrDpZU.mjs +1 -0
- package/dist/esm/usePrivy-DhsfOIjx.mjs +1 -0
- package/package.json +21 -7
- package/dist/cjs/SignRequestScreen-cAAtS6nl.js +0 -27
- package/dist/cjs/frame-8JZCzmCf.js +0 -1
- package/dist/cjs/internal-context-DNWjSiYq.js +0 -1
- package/dist/cjs/paths-B00ZrFQm.js +0 -1
- package/dist/cjs/privy-context-NMR-GjnL.js +0 -1
- package/dist/cjs/smart-wallets-65yy6DGK.js +0 -1
- package/dist/cjs/use-export-wallet-9ypqLaaB.js +0 -2
- package/dist/cjs/use-sign-with-user-signer-Q0_LRVtz.js +0 -1
- package/dist/cjs/useActiveWallet-CtNcsjJH.js +0 -1
- package/dist/cjs/usePrivy-dGz-b0SX.js +0 -1
- package/dist/esm/SignRequestScreen-cNZ56bAg.mjs +0 -25
- package/dist/esm/frame-Dh-xhHMG.mjs +0 -1
- package/dist/esm/internal-context-CfE_S5P-.mjs +0 -1
- package/dist/esm/paths-B891YjWw.mjs +0 -1
- package/dist/esm/privy-context-DDSW3jEM.mjs +0 -1
- package/dist/esm/smart-wallets-_lFo8N6W.mjs +0 -1
- package/dist/esm/use-export-wallet-E2KvvjYq.mjs +0 -1
- package/dist/esm/use-sign-with-user-signer-DVcbjNtZ.mjs +0 -1
- package/dist/esm/useActiveWallet-BLu2tB4S.mjs +0 -1
- package/dist/esm/usePrivy-DmWciddF.mjs +0 -1
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-
|
|
3
|
+
import { k as MfaSubmitArgs, c as UserRecoveryMethod, g as SessionSignerInput, E as EthereumRpcRequestType, l as SolanaRpcRequestType, m as EthereumRpcResponseType, n as SolanaRpcResponseType, o as PrivyFarcasterSignerInitResponse, p as EIP1193Provider, q as EntropyIdVerifier$1, H as HDWalletWithMetadata, r as RequestArguments, s as WalletConnector, B as BaseConnectedEthereumWallet, u as PrivyProxyProvider, v as WalletClientType, w as ConnectedWalletMetadata, x as PrivyClientConfig, y as ConnectorType, z as SetBaseAccountSdkType, A as WalletListEntry, D as AppConfig, G as BaseConnectedWallet, j as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, C as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, f as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, e as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, $ as SiwsMessageType, L as LoginMethod, a0 as ExternalWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a as LinkedAccountWithMetadata, a9 as BaseAccountSdkType, aa as UnsignedTransactionRequestWithChainId, ab as BaseConnectedWalletType, b as BaseConnectedSolanaWallet, ac as TelegramAuthFlowState } from './types-C4KyGxEF.js';
|
|
4
|
+
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, P as PrivyErrorCode, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-C4KyGxEF.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import EventEmitter from 'eventemitter3';
|
|
8
8
|
import { Store, EIP6963ProviderDetail } from 'mipd';
|
|
9
9
|
import Privy, { Chain, RpcConfig, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput } from '@privy-io/js-sdk-core';
|
|
10
10
|
export { DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, addPrivyRpcToChain, addRpcUrlOverrideToChain } from '@privy-io/js-sdk-core';
|
|
11
|
-
import { PasskeyAuthenticateInputType, SmartWalletType, CustomOAuthProvider, CustomMetadataType, OAuthProviderType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
|
|
11
|
+
import { FirstClassChainType, PasskeyAuthenticateInputType, SmartWalletType, CustomOAuthProvider, CustomMetadataType, OAuthProviderType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
|
|
12
12
|
export { OAuthProviderType } from '@privy-io/public-api';
|
|
13
13
|
import * as viem from 'viem';
|
|
14
14
|
import { Address, HttpTransport, Hex } from 'viem';
|
|
15
15
|
import * as _simplewebauthn_browser from '@simplewebauthn/browser';
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/browser';
|
|
17
17
|
import { FetchOptions } from 'ofetch';
|
|
18
|
+
import { P as PrivyEvents } from './events-context-DB3Pn5Hg.js';
|
|
19
|
+
export { C as CallbackError } from './events-context-DB3Pn5Hg.js';
|
|
18
20
|
import * as viem_accounts from 'viem/accounts';
|
|
19
21
|
import '@coinbase/wallet-sdk';
|
|
20
22
|
import '@solana/kit';
|
|
@@ -364,7 +366,7 @@ type RootWalletForDelegation = {
|
|
|
364
366
|
/** Address of the root wallet for the entropy being delegated. */
|
|
365
367
|
address: string;
|
|
366
368
|
/** Chain type of the root wallet for the entropy being delegated. */
|
|
367
|
-
chainType:
|
|
369
|
+
chainType: FirstClassChainType;
|
|
368
370
|
/** Whether or not the root wallet for the entropy being delegated is imported. */
|
|
369
371
|
imported: boolean;
|
|
370
372
|
};
|
|
@@ -372,7 +374,7 @@ type DelegatedWallet = {
|
|
|
372
374
|
/** Address for a wallet to delegate. */
|
|
373
375
|
address: string;
|
|
374
376
|
/** Chain type for a wallet to delegate. */
|
|
375
|
-
chainType:
|
|
377
|
+
chainType: FirstClassChainType;
|
|
376
378
|
/** HD index for the wallet to delegate. */
|
|
377
379
|
walletIndex: number;
|
|
378
380
|
};
|
|
@@ -2805,330 +2807,6 @@ declare class PrivyClient {
|
|
|
2805
2807
|
scanTransaction(request: PrivyTransactionScanningInputType): Promise<PrivyTransactionScanningResponseType>;
|
|
2806
2808
|
}
|
|
2807
2809
|
|
|
2808
|
-
/**
|
|
2809
|
-
* `CallbackError` optionally includes a second parameter with further error details.
|
|
2810
|
-
*/
|
|
2811
|
-
type CallbackError<Details extends Record<string, any> | undefined = undefined> = Details extends Record<string, any> ? (error: PrivyErrorCode, details: Details) => void : (error: PrivyErrorCode) => void;
|
|
2812
|
-
interface PrivyEvents {
|
|
2813
|
-
login: {
|
|
2814
|
-
/**
|
|
2815
|
-
* Callback that will execute once a `login` flow successfully completes.
|
|
2816
|
-
* - If `config.embeddedWallets.createOnLogin` is set to 'off' or a wallet creation flow is not applicable,
|
|
2817
|
-
* this will run after the user successfully authenticates.
|
|
2818
|
-
* - If `config.embeddedWallets.createOnLogin` is set to 'users-without-wallets' or 'all-users',
|
|
2819
|
-
* this will run after the user successfully authenticates _and_ creates their wallet (if applicable).
|
|
2820
|
-
* - If a user is already authenticated, this will run immediately and the `wasAlreadyAuthenticated` flag will be set to `true`.
|
|
2821
|
-
*
|
|
2822
|
-
* @param params.user {@link User} the `user` oject corresponding to the authenticated user
|
|
2823
|
-
* @param params.isNewUser {boolean} boolean flag indicating if this is the user's first time logging in to your app
|
|
2824
|
-
* @param params.wasAlreadyAuthenticated {boolean} - boolean flag indicating whether the user entered the application already authenticated
|
|
2825
|
-
* @param params.loginMethod {string} - the method used by the user to login
|
|
2826
|
-
* @param params.loginAccount - the account corresponding to the loginMethod used
|
|
2827
|
-
*/
|
|
2828
|
-
onComplete?: (params: {
|
|
2829
|
-
user: User;
|
|
2830
|
-
isNewUser: boolean;
|
|
2831
|
-
wasAlreadyAuthenticated: boolean;
|
|
2832
|
-
loginMethod: LoginMethod | null;
|
|
2833
|
-
loginAccount: LinkedAccountWithMetadata | null;
|
|
2834
|
-
}) => void;
|
|
2835
|
-
/**
|
|
2836
|
-
* Callback that will execute in the case of a non-successful login.
|
|
2837
|
-
*
|
|
2838
|
-
* @param error {@link PrivyErrorCode} - the corresponding error code
|
|
2839
|
-
*/
|
|
2840
|
-
onError?: CallbackError;
|
|
2841
|
-
};
|
|
2842
|
-
logout: {
|
|
2843
|
-
/**
|
|
2844
|
-
* Callback that will execute when a user successfully logs out.
|
|
2845
|
-
*/
|
|
2846
|
-
onSuccess?: () => void;
|
|
2847
|
-
};
|
|
2848
|
-
connectWallet: {
|
|
2849
|
-
/**
|
|
2850
|
-
* Callback that will execute once a successful `connectWallet` completes.
|
|
2851
|
-
* This will not run in the case of a wallet-based authentication or link flow.
|
|
2852
|
-
*
|
|
2853
|
-
* @param params.wallet {@link BaseConnectedEthereumWallet | BaseConnectedSolanaWallet} the `wallet` object correspending to the connection
|
|
2854
|
-
*/
|
|
2855
|
-
onSuccess?: (params: {
|
|
2856
|
-
wallet: BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
|
|
2857
|
-
}) => void;
|
|
2858
|
-
/**
|
|
2859
|
-
* Callback that will execute in the case of a non-successful wallet connection.
|
|
2860
|
-
*
|
|
2861
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
2862
|
-
*/
|
|
2863
|
-
onError?: CallbackError;
|
|
2864
|
-
};
|
|
2865
|
-
connectOrCreateWallet: {
|
|
2866
|
-
/**
|
|
2867
|
-
* Callback that will execute once a successful `connectWallet` completes.
|
|
2868
|
-
* This will not run in the case of a wallet-based authentication or link flow.
|
|
2869
|
-
*
|
|
2870
|
-
* @param params.wallet {@link BaseConnectedEthereumWallet | BaseConnectedSolanaWallet} the `wallet` object correspending to the connection
|
|
2871
|
-
*/
|
|
2872
|
-
onSuccess?: (params: {
|
|
2873
|
-
wallet: BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
|
|
2874
|
-
}) => void;
|
|
2875
|
-
/**
|
|
2876
|
-
* Callback that will execute in the case of a non-successful wallet connection.
|
|
2877
|
-
*
|
|
2878
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
2879
|
-
*/
|
|
2880
|
-
onError?: CallbackError;
|
|
2881
|
-
};
|
|
2882
|
-
createWallet: {
|
|
2883
|
-
/**
|
|
2884
|
-
* Callback that will execute once on a successful embedded wallet creation.
|
|
2885
|
-
* This will run when `createWallet` is called manually, or when `config.embeddedWallets.createOnLogin` triggers
|
|
2886
|
-
* an automatic wallet creation.
|
|
2887
|
-
*
|
|
2888
|
-
* @param params.wallet {@link BaseConnectedWallet}- the created `wallet` object
|
|
2889
|
-
*/
|
|
2890
|
-
onSuccess?: (params: {
|
|
2891
|
-
wallet: Wallet;
|
|
2892
|
-
}) => void;
|
|
2893
|
-
/**
|
|
2894
|
-
* Callback that will execute in the case of a non-successful wallet creation.
|
|
2895
|
-
*
|
|
2896
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
2897
|
-
*/
|
|
2898
|
-
onError?: CallbackError;
|
|
2899
|
-
};
|
|
2900
|
-
linkAccount: {
|
|
2901
|
-
/**
|
|
2902
|
-
* Callback that will execute once on a successful linking of a new account/login method.
|
|
2903
|
-
* This will run when any of the 'link' methods are called manually.
|
|
2904
|
-
* @param params.user {@link User}- the user the account was linked to
|
|
2905
|
-
* @param params.linkMethod {@link LoginMethod}- the type of linked account
|
|
2906
|
-
* @param params.linkedAccount - the newly linked account
|
|
2907
|
-
*/
|
|
2908
|
-
onSuccess?: (params: {
|
|
2909
|
-
user: User;
|
|
2910
|
-
linkMethod: LoginMethod;
|
|
2911
|
-
linkedAccount: LinkedAccountWithMetadata;
|
|
2912
|
-
}) => void;
|
|
2913
|
-
/**
|
|
2914
|
-
* Callback that will execute in the case of a non-successful account linking.
|
|
2915
|
-
*
|
|
2916
|
-
* @param error {PrivyErrorCode} - the corresponding error code
|
|
2917
|
-
* @param details.linkMethod {LoginMethod} - the type of (attempted) linked account
|
|
2918
|
-
*/
|
|
2919
|
-
onError?: CallbackError<{
|
|
2920
|
-
linkMethod: LoginMethod;
|
|
2921
|
-
}>;
|
|
2922
|
-
};
|
|
2923
|
-
update: {
|
|
2924
|
-
/**
|
|
2925
|
-
* Callback that will execute once on a successful updating of an account.
|
|
2926
|
-
* This will run when any of the 'updateAccount' methods are called manually.
|
|
2927
|
-
* @param params.user {@link User}- the user the account was linked to
|
|
2928
|
-
* @param params.updateMethod {@link LoginMethod}- the type of updated account
|
|
2929
|
-
* @param params.updatedAccount - the newly updated account
|
|
2930
|
-
*/
|
|
2931
|
-
onSuccess?: (params: {
|
|
2932
|
-
user: User;
|
|
2933
|
-
updateMethod: LoginMethod;
|
|
2934
|
-
updatedAccount: LinkedAccountWithMetadata;
|
|
2935
|
-
}) => void;
|
|
2936
|
-
/**
|
|
2937
|
-
* Callback that will execute in the case of a non-successful account linking.
|
|
2938
|
-
*
|
|
2939
|
-
* @param error {PrivyErrorCode} - the corresponding error code
|
|
2940
|
-
* @param details.linkMethod {LoginMethod} - the type of (attempted) linked account
|
|
2941
|
-
*/
|
|
2942
|
-
onError?: CallbackError<{
|
|
2943
|
-
linkMethod: LoginMethod;
|
|
2944
|
-
}>;
|
|
2945
|
-
};
|
|
2946
|
-
configureMfa: {
|
|
2947
|
-
/**
|
|
2948
|
-
* Callback that will execute when MFA is required to complete a given action.
|
|
2949
|
-
* @param params.mfaMethods {@link MfaMethod[]} - List of MFA methods that the user can choose from
|
|
2950
|
-
*/
|
|
2951
|
-
onMfaRequired: (params: {
|
|
2952
|
-
mfaMethods: MfaMethod[];
|
|
2953
|
-
}) => void;
|
|
2954
|
-
};
|
|
2955
|
-
setWalletPassword: {
|
|
2956
|
-
/**
|
|
2957
|
-
* Callback that will execute once a successful `setWalletPassword` completes.
|
|
2958
|
-
* @param params.wallet {@link Wallet}- the `wallet` object that the password was set for
|
|
2959
|
-
*/
|
|
2960
|
-
onSuccess?: (params: {
|
|
2961
|
-
wallet: Wallet;
|
|
2962
|
-
}) => void;
|
|
2963
|
-
/**
|
|
2964
|
-
* Callback that will execute in the case of a non-successful setWalletPassword.
|
|
2965
|
-
*
|
|
2966
|
-
* @param params.error {PrivyErrorCode} - the corresponding error code
|
|
2967
|
-
*/
|
|
2968
|
-
onError?: CallbackError;
|
|
2969
|
-
};
|
|
2970
|
-
setWalletRecovery: {
|
|
2971
|
-
/**
|
|
2972
|
-
* Callback that will execute once a successful `setWalletRecovery` completes.
|
|
2973
|
-
* @param params.method {@link UserRecoveryMethod} - the recovery method that was set
|
|
2974
|
-
* @param params.wallet {@link Wallet}- the wallet object that the recovery was set for
|
|
2975
|
-
*/
|
|
2976
|
-
onSuccess?: (params: {
|
|
2977
|
-
method: UserRecoveryMethod;
|
|
2978
|
-
wallet: Wallet;
|
|
2979
|
-
}) => void;
|
|
2980
|
-
/**
|
|
2981
|
-
* Callback that will execute in the case of a non-successful setWalletRecovery.
|
|
2982
|
-
*
|
|
2983
|
-
* @param params.error {PrivyErrorCode} - the corresponding error code
|
|
2984
|
-
*/
|
|
2985
|
-
onError?: CallbackError;
|
|
2986
|
-
};
|
|
2987
|
-
signMessage: {
|
|
2988
|
-
/**
|
|
2989
|
-
* Callback that will execute once a successful `signMessage` completes.
|
|
2990
|
-
* This will not run in the case of a wallet-based authentication or link flow.
|
|
2991
|
-
* @param params.signature - the signature (type string) of the embedded wallet used to sign message
|
|
2992
|
-
*/
|
|
2993
|
-
onSuccess?: (params: {
|
|
2994
|
-
signature: string;
|
|
2995
|
-
}) => void;
|
|
2996
|
-
/**
|
|
2997
|
-
* Callback that will execute in the case of a non-successful signMessage.
|
|
2998
|
-
*
|
|
2999
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
3000
|
-
*/
|
|
3001
|
-
onError?: CallbackError;
|
|
3002
|
-
};
|
|
3003
|
-
signTypedData: {
|
|
3004
|
-
/**
|
|
3005
|
-
* Callback that will execute once a successful `signTypedData` completes.
|
|
3006
|
-
* @param params.signature - the signature (type string) of the embedded wallet used to sign
|
|
3007
|
-
*/
|
|
3008
|
-
onSuccess?: (params: {
|
|
3009
|
-
signature: string;
|
|
3010
|
-
}) => void;
|
|
3011
|
-
/**
|
|
3012
|
-
* Callback that will execute in the case of a non-successful signTypedData.
|
|
3013
|
-
*
|
|
3014
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
3015
|
-
*/
|
|
3016
|
-
onError?: CallbackError;
|
|
3017
|
-
};
|
|
3018
|
-
sendTransaction: {
|
|
3019
|
-
/**
|
|
3020
|
-
* Callback that will execute once a successful `sendTransaction` completes.
|
|
3021
|
-
* This will not run for transactions with external wallets.
|
|
3022
|
-
* @param an object with the transaction hash
|
|
3023
|
-
*/
|
|
3024
|
-
onSuccess?: (params: {
|
|
3025
|
-
hash: `0x${string}`;
|
|
3026
|
-
}) => void;
|
|
3027
|
-
/**
|
|
3028
|
-
* Callback that will execute in the case of a non-successful sendTransaction.
|
|
3029
|
-
*
|
|
3030
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
3031
|
-
*/
|
|
3032
|
-
onError?: CallbackError;
|
|
3033
|
-
};
|
|
3034
|
-
signTransaction: {
|
|
3035
|
-
/**
|
|
3036
|
-
* Callback that will execute once a successful `signTransaction` completes.
|
|
3037
|
-
* This will not run for transactions with external wallets.
|
|
3038
|
-
* @param an object with the transaction signature
|
|
3039
|
-
*/
|
|
3040
|
-
onSuccess?: (params: {
|
|
3041
|
-
signature: `0x${string}`;
|
|
3042
|
-
}) => void;
|
|
3043
|
-
/**
|
|
3044
|
-
* Callback that will execute in the case of a non-successful signTransaction.
|
|
3045
|
-
*
|
|
3046
|
-
* @param params.error {@link PrivyErrorCode} - the corresponding error code
|
|
3047
|
-
*/
|
|
3048
|
-
onError?: CallbackError;
|
|
3049
|
-
};
|
|
3050
|
-
accessToken: {
|
|
3051
|
-
/**
|
|
3052
|
-
* Callback that will execute when a user's access token is granted.
|
|
3053
|
-
* @param params.accessToken - The user's access token
|
|
3054
|
-
*/
|
|
3055
|
-
onAccessTokenGranted: (params: {
|
|
3056
|
-
accessToken: string;
|
|
3057
|
-
}) => void;
|
|
3058
|
-
/**
|
|
3059
|
-
* Callback that will execute when a user's access token is removed.
|
|
3060
|
-
*/
|
|
3061
|
-
onAccessTokenRemoved: () => void;
|
|
3062
|
-
};
|
|
3063
|
-
oAuthAuthorization: {
|
|
3064
|
-
/**
|
|
3065
|
-
* Callback that will execute when a user successfully authorizes an OAuth flow.
|
|
3066
|
-
*
|
|
3067
|
-
* @param params.oAuthTokens {@link OAuthTokens} - the OAuth tokens returned from the OAuth provider:
|
|
3068
|
-
* @param params.oAuthTokens.provider - {string} The OAuth provider type.
|
|
3069
|
-
* @param params.oAuthTokens.accessToken - {string} The OAuth access token.
|
|
3070
|
-
* @param params.oAuthTokens.accessTokenExpiresInSeconds - {number} (optional) The number of seconds until the OAuth access token expires.
|
|
3071
|
-
* @param params.oAuthTokens.refreshToken - {string} (optional) The OAuth refresh token.
|
|
3072
|
-
* @param params.oAuthTokens.refreshTokenExpiresInSeconds - {number} (optional) The number of seconds until the OAuth refresh token expires.
|
|
3073
|
-
* if the refresh token is present and this field is undefined, it is assumed
|
|
3074
|
-
* that the refresh token does not have an expiration date.
|
|
3075
|
-
* @param params.oAuthTokens.scopes - {string[]} (optional) The list of OAuth scopes the access token is approved for.
|
|
3076
|
-
*
|
|
3077
|
-
* @param params.user {@link User} The authenticated user
|
|
3078
|
-
*/
|
|
3079
|
-
onOAuthTokenGrant: (params: {
|
|
3080
|
-
oAuthTokens: OAuthTokens;
|
|
3081
|
-
user: User;
|
|
3082
|
-
}) => void;
|
|
3083
|
-
};
|
|
3084
|
-
fundWallet: {
|
|
3085
|
-
/**
|
|
3086
|
-
* Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
3087
|
-
*
|
|
3088
|
-
* @param params.address {string} The address of the wallet being funded
|
|
3089
|
-
* @param params.chain {Chain} The chain of the wallet being funded
|
|
3090
|
-
* @param params.fundingMethod {@link FundingMethod} The funding method associated with the flow at time of exit. If the user had not yet selected
|
|
3091
|
-
* a recovery method, this will be null.
|
|
3092
|
-
* @param params.balance {bigint} The value for the funded wallet at the point of user exit.
|
|
3093
|
-
*/
|
|
3094
|
-
onUserExited?: (params: {
|
|
3095
|
-
address: string;
|
|
3096
|
-
chain: Chain;
|
|
3097
|
-
fundingMethod: FundingMethod | 'manual' | null;
|
|
3098
|
-
balance: bigint | undefined;
|
|
3099
|
-
}) => void;
|
|
3100
|
-
};
|
|
3101
|
-
fundSolanaWallet: {
|
|
3102
|
-
/**
|
|
3103
|
-
* Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
3104
|
-
*
|
|
3105
|
-
* @param params.address {string} The address of the wallet being funded
|
|
3106
|
-
* @param params.fundingMethod {@link FundingMethod} The funding method associated with the flow at time of exit. If the user had not yet selected
|
|
3107
|
-
* a recovery method, this will be null.
|
|
3108
|
-
* @param params.balance {bigint} The value for the funded wallet at the point of user exit.
|
|
3109
|
-
*/
|
|
3110
|
-
onUserExited?: (params: {
|
|
3111
|
-
address: string;
|
|
3112
|
-
fundingMethod: FundingMethod | 'manual' | null;
|
|
3113
|
-
chain: SolanaChain;
|
|
3114
|
-
balance: bigint | undefined;
|
|
3115
|
-
}) => void;
|
|
3116
|
-
};
|
|
3117
|
-
customAuth: {
|
|
3118
|
-
/**
|
|
3119
|
-
* Callback that will execute when Privy successfully exchanges a custom auth JWT for a Privy JWT
|
|
3120
|
-
* @param params.user - The Privy user
|
|
3121
|
-
*/
|
|
3122
|
-
onAuthenticated: (params: {
|
|
3123
|
-
user: User;
|
|
3124
|
-
}) => void;
|
|
3125
|
-
/**
|
|
3126
|
-
* Callback that will execute when Privy detects a user is logged out from the third-party auth system, and correspondingly logs the user out.
|
|
3127
|
-
*/
|
|
3128
|
-
onUnauthenticated: () => void;
|
|
3129
|
-
};
|
|
3130
|
-
}
|
|
3131
|
-
|
|
3132
2810
|
/**
|
|
3133
2811
|
* Use this hook to log the user in, and to attach callbacks
|
|
3134
2812
|
* for successful `login`s, already-`authenticated` users, and
|
|
@@ -3505,12 +3183,17 @@ type UseLoginWithSiwe = {
|
|
|
3505
3183
|
* @param opts options for verifying a signature for a SIWE message
|
|
3506
3184
|
* @param opts.signature {string} The EIP-191 signature corresponding to the message that the user had been given.
|
|
3507
3185
|
* @param opts.message {string} EIP-4361 message for signing. Returned from the generateSiweMessage call
|
|
3186
|
+
* @param opts.disableSignup {boolean} (optional) whether to disable signup for the user
|
|
3187
|
+
* @param opts.walletClientType {string} (optional) the wallet client of the external wallet (ie. 'metamask', 'coinbase_wallet'). Defaults to null if not specified.
|
|
3188
|
+
* @param opts.connectorType {string} (optional) the method used to connect the wallet to the application (ie. 'injected', 'wallet_connect_v2'). Defaults to null if not specified.
|
|
3508
3189
|
* @returns The user response object.
|
|
3509
3190
|
*/
|
|
3510
|
-
loginWithSiwe: ({ signature, message, disableSignup, }: {
|
|
3191
|
+
loginWithSiwe: ({ signature, message, disableSignup, walletClientType, connectorType, }: {
|
|
3511
3192
|
signature: string;
|
|
3512
3193
|
message: string;
|
|
3513
3194
|
disableSignup?: boolean;
|
|
3195
|
+
walletClientType?: string;
|
|
3196
|
+
connectorType?: string;
|
|
3514
3197
|
}) => Promise<User>;
|
|
3515
3198
|
/**
|
|
3516
3199
|
* The current state of the SIWE link operation
|
|
@@ -3537,12 +3220,17 @@ type UseLoginWithSiws = {
|
|
|
3537
3220
|
* @param opts options for verifying a signature for a SIWS message
|
|
3538
3221
|
* @param opts.signature {string} The signature corresponding to the message that the user had been given.
|
|
3539
3222
|
* @param opts.message {string} SIWS message for signing. Returned from the generateSiwsMessage call
|
|
3223
|
+
* @param opts.disableSignup {boolean} (optional) whether to disable signup for the user
|
|
3224
|
+
* @param opts.walletClientType {string} (optional) the wallet client of the external wallet (ie. 'phantom', 'solflare'). Defaults to null if not specified.
|
|
3225
|
+
* @param opts.connectorType {string} (optional) the method used to connect the wallet to the application (ie. 'injected', 'wallet_connect_v2'). Defaults to null if not specified.
|
|
3540
3226
|
* @returns The user response object.
|
|
3541
3227
|
*/
|
|
3542
|
-
loginWithSiws: ({ signature, message, disableSignup, }: {
|
|
3228
|
+
loginWithSiws: ({ signature, message, disableSignup, walletClientType, connectorType, }: {
|
|
3543
3229
|
signature: string;
|
|
3544
3230
|
message: string;
|
|
3545
3231
|
disableSignup?: boolean;
|
|
3232
|
+
walletClientType?: string;
|
|
3233
|
+
connectorType?: string;
|
|
3546
3234
|
}) => Promise<User>;
|
|
3547
3235
|
};
|
|
3548
3236
|
declare const useLoginWithSiws: () => UseLoginWithSiws;
|
|
@@ -4611,4 +4299,4 @@ declare const useMigrateWallets: () => {
|
|
|
4611
4299
|
}>;
|
|
4612
4300
|
};
|
|
4613
4301
|
|
|
4614
|
-
export { BaseConnectedWalletType,
|
|
4302
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LinkedAccountWithMetadata, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseGetAccessTokenForProvider, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLinkWithSiws, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSiws, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGetAccessTokenForProvider, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLinkWithSiws, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSiws, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useMigrateWallets, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletRecovery, useSign7702Authorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { U as User } from './types-C4KyGxEF.js';
|
|
2
|
+
import '@coinbase/wallet-sdk';
|
|
3
|
+
import '@simplewebauthn/browser';
|
|
4
|
+
import '@solana/kit';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'viem';
|
|
7
|
+
import '@privy-io/js-sdk-core';
|
|
8
|
+
import '@privy-io/public-api';
|
|
9
|
+
import '@base-org/account';
|
|
10
|
+
import '@wallet-standard/base';
|
|
11
|
+
import '@solana/wallet-standard-features';
|
|
12
|
+
import '@wallet-standard/features';
|
|
13
|
+
import 'eventemitter3';
|
|
14
|
+
|
|
15
|
+
type UseLoginWithSsoToken = {
|
|
16
|
+
/**
|
|
17
|
+
* Authenticates a user by exchanging an SSO token for a session.
|
|
18
|
+
*
|
|
19
|
+
* This hook implements a secure code exchange flow where the token
|
|
20
|
+
* is exchanged server-side for a session response. This prevents exposing
|
|
21
|
+
* access tokens in URLs.
|
|
22
|
+
*
|
|
23
|
+
* @returns Promise resolving to the authenticated User
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const {loginWithSsoToken} = useLoginWithSsoToken();
|
|
27
|
+
*
|
|
28
|
+
* // In your SSO callback page:
|
|
29
|
+
* await loginWithSsoToken();
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @experimental
|
|
33
|
+
*/
|
|
34
|
+
loginWithSsoToken: () => Promise<User>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* Hook to authenticate a user using an SSO token.
|
|
39
|
+
*
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
declare function useLoginWithSsoToken(): UseLoginWithSsoToken;
|
|
43
|
+
|
|
44
|
+
export { type UseLoginWithSsoToken, useLoginWithSsoToken };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { U as User } from './types-C4KyGxEF.js';
|
|
2
|
+
import '@coinbase/wallet-sdk';
|
|
3
|
+
import '@simplewebauthn/browser';
|
|
4
|
+
import '@solana/kit';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'viem';
|
|
7
|
+
import '@privy-io/js-sdk-core';
|
|
8
|
+
import '@privy-io/public-api';
|
|
9
|
+
import '@base-org/account';
|
|
10
|
+
import '@wallet-standard/base';
|
|
11
|
+
import '@solana/wallet-standard-features';
|
|
12
|
+
import '@wallet-standard/features';
|
|
13
|
+
import 'eventemitter3';
|
|
14
|
+
|
|
15
|
+
type UseLoginWithSsoToken = {
|
|
16
|
+
/**
|
|
17
|
+
* Authenticates a user by exchanging an SSO token for a session.
|
|
18
|
+
*
|
|
19
|
+
* This hook implements a secure code exchange flow where the token
|
|
20
|
+
* is exchanged server-side for a session response. This prevents exposing
|
|
21
|
+
* access tokens in URLs.
|
|
22
|
+
*
|
|
23
|
+
* @returns Promise resolving to the authenticated User
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const {loginWithSsoToken} = useLoginWithSsoToken();
|
|
27
|
+
*
|
|
28
|
+
* // In your SSO callback page:
|
|
29
|
+
* await loginWithSsoToken();
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @experimental
|
|
33
|
+
*/
|
|
34
|
+
loginWithSsoToken: () => Promise<User>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* Hook to authenticate a user using an SSO token.
|
|
39
|
+
*
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
declare function useLoginWithSsoToken(): UseLoginWithSsoToken;
|
|
43
|
+
|
|
44
|
+
export { type UseLoginWithSsoToken, useLoginWithSsoToken };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-C4KyGxEF.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { EIP1193Provider, Chain, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema, SendTransactionParameters, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-C4KyGxEF.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { EIP1193Provider, Chain, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema, SendTransactionParameters, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-C4KyGxEF.js';
|
|
2
|
+
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-C4KyGxEF.js';
|
|
3
3
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
4
4
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
5
5
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import { SolanaSignAndSendTransactionOptions, SolanaSignTransactionOptions, ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
8
8
|
export { ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
9
|
+
import { P as PrivyEvents } from './events-context-DB3Pn5Hg.js';
|
|
9
10
|
import '@coinbase/wallet-sdk';
|
|
10
11
|
import '@simplewebauthn/browser';
|
|
11
12
|
import '@solana/kit';
|
|
@@ -17,8 +18,7 @@ import '@base-org/account';
|
|
|
17
18
|
interface UseImportWalletInterface {
|
|
18
19
|
/**
|
|
19
20
|
* Imports a private key to be used as an embedded wallet for the user
|
|
20
|
-
* This method will error if the user
|
|
21
|
-
* exit in the middle of the flow.
|
|
21
|
+
* This method will error if the user exits in the middle of the flow.
|
|
22
22
|
*
|
|
23
23
|
* @param o Input object
|
|
24
24
|
* @param o.privateKey The base58 private key of the solana wallet to import
|
|
@@ -288,11 +288,35 @@ type UseSignAndSendTransaction = {
|
|
|
288
288
|
};
|
|
289
289
|
declare function useSignAndSendTransaction(): UseSignAndSendTransaction;
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Method to fund a user's Solana wallet via Privy's funding feature by inputting a valid wallet address.
|
|
293
|
+
* You can access the fields and methods documented here via the {@link useFundWallet} hook.
|
|
294
|
+
*/
|
|
295
|
+
interface UseFundWalletInterface {
|
|
296
|
+
/**
|
|
297
|
+
* Prompt the user to go through the funding flow and for a specified Solana wallet.
|
|
298
|
+
*
|
|
299
|
+
* This will open the modal with a prompt for the user to select a funding method (if multiple are enabled).
|
|
300
|
+
*
|
|
301
|
+
* Once the user continues to the funding flow, Privy will display the funding status screen, and wait
|
|
302
|
+
* for the transaction to complete.
|
|
303
|
+
*
|
|
304
|
+
* Note: Even after a successful funding, funds can take a few minutes to arrive in the user's wallet.
|
|
305
|
+
*
|
|
306
|
+
* @param address The wallet address to fund
|
|
307
|
+
* @param options {@link SolanaFundingConfig} Funding configuration to specify chain and funding amount
|
|
308
|
+
*/
|
|
292
309
|
fundWallet: ({ address, options, }: {
|
|
293
310
|
address: string;
|
|
294
311
|
options?: SolanaFundingConfig;
|
|
295
312
|
}) => Promise<void>;
|
|
296
|
-
}
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Hook to fund a Solana wallet via Privy's fiat on-ramp integration given the wallet address.
|
|
316
|
+
*
|
|
317
|
+
* @param callbacks.onUserExited {@link PrivyEvents} Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
318
|
+
* @returns fundWallet - function to on-ramp funds to any given Solana wallet
|
|
319
|
+
*/
|
|
320
|
+
declare function useFundWallet(callbacks?: PrivyEvents['fundSolanaWallet']): UseFundWalletInterface;
|
|
297
321
|
|
|
298
|
-
export { PrivyStandardWallet, SolanaFundingConfig, SolanaStandardWallet, type UseImportWalletInterface, type UseSignAndSendTransaction, type UseSignMessage, type UseSignTransaction, type UseSolanaStandardWalletsInterface as UseStandardWallets, type UseWallets, useCreateWallet, useExportWallet, useFundWallet, useImportWallet, useSignAndSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaLedgerPlugin, useSolanaStandardWallets as useStandardWallets, useWallets };
|
|
322
|
+
export { PrivyStandardWallet, SolanaFundingConfig, SolanaStandardWallet, type UseFundWalletInterface, type UseImportWalletInterface, type UseSignAndSendTransaction, type UseSignMessage, type UseSignTransaction, type UseSolanaStandardWalletsInterface as UseStandardWallets, type UseWallets, useCreateWallet, useExportWallet, useFundWallet, useImportWallet, useSignAndSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaLedgerPlugin, useSolanaStandardWallets as useStandardWallets, useWallets };
|