@privy-io/react-auth 2.11.1 → 2.12.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/abstract-smart-wallets.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/privy-provider-WROKgGLv.js +28 -0
- package/dist/cjs/smart-wallets-BOO4AAyW.js +1 -0
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{useActiveWallet-BJPtwRwN.js → useActiveWallet-jRYT06Mr.js} +1 -1
- package/dist/cjs/{useFundWallet-CHZEiRO4.js → useFundWallet-Cgo-Ct91.js} +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +67 -39
- package/dist/dts/index.d.ts +67 -39
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +113 -7
- package/dist/dts/solana.d.ts +113 -7
- package/dist/dts/{types-B6jqW_Bc.d.mts → types-Nqh9YCV3.d.mts} +6 -12
- package/dist/dts/{types-B6jqW_Bc.d.ts → types-Nqh9YCV3.d.ts} +6 -12
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/dts/{useSolanaWallets-DtHAHWtA.d.mts → useSolanaWallets-BSVQS05e.d.mts} +1 -1
- package/dist/dts/{useSolanaWallets-DtHAHWtA.d.ts → useSolanaWallets-BSVQS05e.d.ts} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-BeG8p5X6.mjs → frame-B1kjU0LI.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{internal-context-eu0bC04Q.mjs → internal-context-lAHxpYRu.mjs} +1 -1
- package/dist/esm/privy-provider-CE4-s2JH.mjs +28 -0
- package/dist/esm/smart-wallets-C2dDEs0t.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/useActiveWallet-B62Sy0KW.mjs +1 -0
- package/dist/esm/{useFundWallet-CCbN4yzN.mjs → useFundWallet-D2_dle4r.mjs} +1 -1
- package/package.json +6 -5
- package/dist/cjs/privy-provider-Cddj6OMJ.js +0 -28
- package/dist/cjs/smart-wallets-CyVw0HIK.js +0 -1
- package/dist/esm/privy-provider-B9IzlOpv.mjs +0 -28
- package/dist/esm/smart-wallets-D0LqwcPM.mjs +0 -1
- package/dist/esm/useActiveWallet-Cvm0O_EX.mjs +0 -1
package/dist/dts/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-
|
|
3
|
+
import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-Nqh9YCV3.js';
|
|
4
|
+
export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-Nqh9YCV3.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';
|
|
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
17
17
|
import { Cluster } from '@solana/web3.js';
|
|
18
18
|
import { FetchOptions } from 'ofetch';
|
|
19
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
20
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
19
|
+
import { P as PrivyEvents } from './useSolanaWallets-BSVQS05e.js';
|
|
20
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
|
|
21
21
|
import '@solana/wallet-adapter-base';
|
|
22
22
|
import '@metamask/eth-sig-util';
|
|
23
23
|
|
|
@@ -37,9 +37,9 @@ type MobileWalletConfig = {
|
|
|
37
37
|
type BaseProxyRequest = {
|
|
38
38
|
accessToken: string;
|
|
39
39
|
} & Partial<MfaSubmitArgs>;
|
|
40
|
-
type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier'
|
|
40
|
+
type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier';
|
|
41
41
|
type BaseWalletsRequestData = BaseProxyRequest & {
|
|
42
|
-
chainType: 'ethereum' | 'solana' | 'bitcoin-taproot' | 'bitcoin-segwit'
|
|
42
|
+
chainType: 'ethereum' | 'solana' | 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
43
43
|
};
|
|
44
44
|
type CreateSignerRequestDataType = BaseProxyRequest & {
|
|
45
45
|
/** Optional: the user-specified recovery password, replaces recoveryPin */
|
|
@@ -71,6 +71,16 @@ type WalletsCreateRequestDataType = BaseWalletsRequestData & {
|
|
|
71
71
|
type WalletsCreateResponseDataType = {
|
|
72
72
|
address: string;
|
|
73
73
|
};
|
|
74
|
+
type UserSignerSignRequestDataType = BaseProxyRequest & {
|
|
75
|
+
/** The message to be signed */
|
|
76
|
+
message: string;
|
|
77
|
+
/** For cross-app requests, the app ID of the requester app */
|
|
78
|
+
requesterAppId?: string | null;
|
|
79
|
+
};
|
|
80
|
+
type UserSignerSignResponseDataType = {
|
|
81
|
+
/** The signature */
|
|
82
|
+
signature: string;
|
|
83
|
+
};
|
|
74
84
|
type WalletsAddRequestDataType = BaseWalletsRequestData & {
|
|
75
85
|
/**
|
|
76
86
|
* Key with which to look up the existing entropy
|
|
@@ -204,15 +214,6 @@ type WalletsRpcBitcoinRequestDataType = {
|
|
|
204
214
|
chainType: 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
205
215
|
request: unknown;
|
|
206
216
|
};
|
|
207
|
-
type WalletsRpcP256RequestDataType = {
|
|
208
|
-
chainType: 'p256';
|
|
209
|
-
request: {
|
|
210
|
-
method: 'sign';
|
|
211
|
-
params: {
|
|
212
|
-
message: string;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
217
|
type WalletsRpcRequestDataType = BaseWalletsRequestData & {
|
|
217
218
|
/**
|
|
218
219
|
* Key with which to look up the existing entropy
|
|
@@ -236,7 +237,7 @@ type WalletsRpcRequestDataType = BaseWalletsRequestData & {
|
|
|
236
237
|
hdWalletIndex: number;
|
|
237
238
|
/** For cross-app requests, the app ID of the requester app */
|
|
238
239
|
requesterAppId?: string | null;
|
|
239
|
-
} & (WalletsRpcEthereumRequestDataType | WalletsRpcSolanaRequestDataType | WalletsRpcBitcoinRequestDataType
|
|
240
|
+
} & (WalletsRpcEthereumRequestDataType | WalletsRpcSolanaRequestDataType | WalletsRpcBitcoinRequestDataType);
|
|
240
241
|
type WalletsRpcEthereumResponseDataType = {
|
|
241
242
|
chainType: 'ethereum';
|
|
242
243
|
response: EthereumRpcResponseType;
|
|
@@ -249,17 +250,9 @@ type WalletsRpcBitcoinResponseDataType = {
|
|
|
249
250
|
chainType: 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
250
251
|
response: unknown;
|
|
251
252
|
};
|
|
252
|
-
type WalletsRpcP256ResponseDataType = {
|
|
253
|
-
chainType: 'p256';
|
|
254
|
-
response: {
|
|
255
|
-
data: {
|
|
256
|
-
signature: string;
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
253
|
type WalletsRpcResponseDataType = {
|
|
261
254
|
address: string;
|
|
262
|
-
} & (WalletsRpcEthereumResponseDataType | WalletsRpcSolanaResponseDataType | WalletsRpcBitcoinResponseDataType
|
|
255
|
+
} & (WalletsRpcEthereumResponseDataType | WalletsRpcSolanaResponseDataType | WalletsRpcBitcoinResponseDataType);
|
|
263
256
|
type BaseWalletCreateRequestDataType = {
|
|
264
257
|
accessToken: string;
|
|
265
258
|
};
|
|
@@ -412,6 +405,7 @@ declare const PrivyIframeErrorTypes: readonly ["error", "invalid_request_argumen
|
|
|
412
405
|
type PrivyIframeErrorTypesType = (typeof PrivyIframeErrorTypes)[number];
|
|
413
406
|
interface EmbeddedWalletProxy {
|
|
414
407
|
createSigner: (data: CreateSignerRequestDataType) => Promise<CreateSignerResponseDataType>;
|
|
408
|
+
signWithUserSigner: (data: UserSignerSignRequestDataType) => Promise<UserSignerSignResponseDataType>;
|
|
415
409
|
createWallet: (data: WalletsCreateRequestDataType) => Promise<WalletsCreateResponseDataType>;
|
|
416
410
|
addWallet: (data: WalletsAddRequestDataType) => Promise<WalletsAddResponseDataType>;
|
|
417
411
|
importWallet: (data: WalletsImportRequestDataType) => Promise<WalletsImportResponseDataType>;
|
|
@@ -438,11 +432,6 @@ interface EmbeddedWalletProxy {
|
|
|
438
432
|
}): Promise<WalletsRpcResponseDataType & {
|
|
439
433
|
chainType: 'bitcoin-segwit';
|
|
440
434
|
}>;
|
|
441
|
-
rpc(data: WalletsRpcRequestDataType & {
|
|
442
|
-
chainType: 'p256';
|
|
443
|
-
}): Promise<WalletsRpcResponseDataType & {
|
|
444
|
-
chainType: 'p256';
|
|
445
|
-
}>;
|
|
446
435
|
/** @deprecated */
|
|
447
436
|
create: (data: EthereumWalletCreateRequestDataType) => Promise<WalletCreateResponseDataType>;
|
|
448
437
|
/** @deprecated */
|
|
@@ -2413,14 +2402,7 @@ interface ResponseCrossAppAccount {
|
|
|
2413
2402
|
first_verified_at: number | null;
|
|
2414
2403
|
latest_verified_at: number | null;
|
|
2415
2404
|
}
|
|
2416
|
-
|
|
2417
|
-
type: 'authorization_key';
|
|
2418
|
-
public_key: string;
|
|
2419
|
-
verified_at: number;
|
|
2420
|
-
first_verified_at: number | null;
|
|
2421
|
-
latest_verified_at: number | null;
|
|
2422
|
-
}
|
|
2423
|
-
type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseAuthorizationKeyAccount>;
|
|
2405
|
+
type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
|
|
2424
2406
|
interface ResponseSmsMfaMethod {
|
|
2425
2407
|
type: 'sms';
|
|
2426
2408
|
verified_at: number;
|
|
@@ -3832,11 +3814,14 @@ declare function useFarcasterSigner(): {
|
|
|
3832
3814
|
};
|
|
3833
3815
|
|
|
3834
3816
|
/**
|
|
3817
|
+
* @deprecated use useSessionSigners instead
|
|
3835
3818
|
* Hook to delegate permissions to execute certain transactions to the wallet API.
|
|
3836
3819
|
*
|
|
3837
3820
|
*/
|
|
3838
3821
|
interface UseDelegatedActionsInterface {
|
|
3839
3822
|
/**
|
|
3823
|
+
* @deprecated use useSessionSigners instead
|
|
3824
|
+
*
|
|
3840
3825
|
* Prompts the user to delegate access to their wallet to allow an app to transact on behalf of a user
|
|
3841
3826
|
* within a set of pre-defined permissions. Users can always decline or revoke delegation.
|
|
3842
3827
|
*
|
|
@@ -3849,6 +3834,9 @@ interface UseDelegatedActionsInterface {
|
|
|
3849
3834
|
chainType: 'solana' | 'ethereum';
|
|
3850
3835
|
}) => Promise<void>;
|
|
3851
3836
|
/**
|
|
3837
|
+
*
|
|
3838
|
+
* @deprecated use useSessionSigners instead
|
|
3839
|
+
*
|
|
3852
3840
|
* Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
|
|
3853
3841
|
* ALL wallets that have been delegated by the user, in case the user has delegated multiple embedded
|
|
3854
3842
|
* wallets.
|
|
@@ -3860,6 +3848,40 @@ interface UseDelegatedActionsInterface {
|
|
|
3860
3848
|
}
|
|
3861
3849
|
declare const useDelegatedActions: () => UseDelegatedActionsInterface;
|
|
3862
3850
|
|
|
3851
|
+
/**
|
|
3852
|
+
* Hook to add session signers to a user wallet.
|
|
3853
|
+
*
|
|
3854
|
+
*/
|
|
3855
|
+
interface UseSessionSignersInterface {
|
|
3856
|
+
/**
|
|
3857
|
+
* Headlessly grants access of the user wallet to a specified key quorum.
|
|
3858
|
+
*
|
|
3859
|
+
* @param address address of the wallet to delegate
|
|
3860
|
+
* @param signers array of signers to add as session keys to the wallet
|
|
3861
|
+
* @returns Promise that resolves if adding signers was successful, and errors otherwise
|
|
3862
|
+
*/
|
|
3863
|
+
addSessionSigners: ({ address, signers, }: {
|
|
3864
|
+
address: string;
|
|
3865
|
+
signers: {
|
|
3866
|
+
signerId: string;
|
|
3867
|
+
}[];
|
|
3868
|
+
}) => Promise<{
|
|
3869
|
+
user: User;
|
|
3870
|
+
}>;
|
|
3871
|
+
/**
|
|
3872
|
+
* Removes all session keys from a user wallet.
|
|
3873
|
+
*
|
|
3874
|
+
* @param address address of the wallet to revoke access for
|
|
3875
|
+
* @returns Promise that resolves if the revocation was successful, and errors otherwise
|
|
3876
|
+
*/
|
|
3877
|
+
removeSessionSigners: ({ address }: {
|
|
3878
|
+
address: string;
|
|
3879
|
+
}) => Promise<{
|
|
3880
|
+
user: User;
|
|
3881
|
+
}>;
|
|
3882
|
+
}
|
|
3883
|
+
declare const useSessionSigners: () => UseSessionSignersInterface;
|
|
3884
|
+
|
|
3863
3885
|
/**
|
|
3864
3886
|
* Use this hook to programmatically update the user in response to any backend change
|
|
3865
3887
|
*
|
|
@@ -3898,11 +3920,15 @@ type UseLoginWithTelegram = {
|
|
|
3898
3920
|
declare const useLoginWithTelegram: (callbacks?: PrivyEvents["login"]) => UseLoginWithTelegram;
|
|
3899
3921
|
|
|
3900
3922
|
/**
|
|
3923
|
+
* @deprecated use useSessionSigners instead
|
|
3924
|
+
*
|
|
3901
3925
|
* Hook to headlessly permissions to execute certain transactions to the wallet API.
|
|
3902
3926
|
*
|
|
3903
3927
|
*/
|
|
3904
3928
|
interface UseHeadlessDelegatedActionsInterface {
|
|
3905
3929
|
/**
|
|
3930
|
+
* @deprecated use useSessionSigners instead
|
|
3931
|
+
*
|
|
3906
3932
|
* Prompts the user to headlessly delegate access to their wallet to allow an app to transact on behalf of a user
|
|
3907
3933
|
* within a set of pre-defined permissions. Users can always decline or revoke delegation.
|
|
3908
3934
|
*
|
|
@@ -3915,6 +3941,8 @@ interface UseHeadlessDelegatedActionsInterface {
|
|
|
3915
3941
|
chainType: 'solana' | 'ethereum';
|
|
3916
3942
|
}) => Promise<void>;
|
|
3917
3943
|
/**
|
|
3944
|
+
* @deprecated use useSessionSigners instead
|
|
3945
|
+
*
|
|
3918
3946
|
* Headlessly revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
|
|
3919
3947
|
* ALL wallets that have been delegated by the user, in case the user has delegated multiple embedded
|
|
3920
3948
|
* wallets.
|
|
@@ -3938,4 +3966,4 @@ declare const LoginModal: ({ open }: {
|
|
|
3938
3966
|
open: boolean;
|
|
3939
3967
|
}) => react_jsx_runtime.JSX.Element;
|
|
3940
3968
|
|
|
3941
|
-
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
|
|
3969
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, 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, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-
|
|
3
|
+
import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-Nqh9YCV3.js';
|
|
4
|
+
export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-Nqh9YCV3.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';
|
|
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
17
17
|
import { Cluster } from '@solana/web3.js';
|
|
18
18
|
import { FetchOptions } from 'ofetch';
|
|
19
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
20
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
19
|
+
import { P as PrivyEvents } from './useSolanaWallets-BSVQS05e.js';
|
|
20
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
|
|
21
21
|
import '@solana/wallet-adapter-base';
|
|
22
22
|
import '@metamask/eth-sig-util';
|
|
23
23
|
|
|
@@ -37,9 +37,9 @@ type MobileWalletConfig = {
|
|
|
37
37
|
type BaseProxyRequest = {
|
|
38
38
|
accessToken: string;
|
|
39
39
|
} & Partial<MfaSubmitArgs>;
|
|
40
|
-
type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier'
|
|
40
|
+
type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier';
|
|
41
41
|
type BaseWalletsRequestData = BaseProxyRequest & {
|
|
42
|
-
chainType: 'ethereum' | 'solana' | 'bitcoin-taproot' | 'bitcoin-segwit'
|
|
42
|
+
chainType: 'ethereum' | 'solana' | 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
43
43
|
};
|
|
44
44
|
type CreateSignerRequestDataType = BaseProxyRequest & {
|
|
45
45
|
/** Optional: the user-specified recovery password, replaces recoveryPin */
|
|
@@ -71,6 +71,16 @@ type WalletsCreateRequestDataType = BaseWalletsRequestData & {
|
|
|
71
71
|
type WalletsCreateResponseDataType = {
|
|
72
72
|
address: string;
|
|
73
73
|
};
|
|
74
|
+
type UserSignerSignRequestDataType = BaseProxyRequest & {
|
|
75
|
+
/** The message to be signed */
|
|
76
|
+
message: string;
|
|
77
|
+
/** For cross-app requests, the app ID of the requester app */
|
|
78
|
+
requesterAppId?: string | null;
|
|
79
|
+
};
|
|
80
|
+
type UserSignerSignResponseDataType = {
|
|
81
|
+
/** The signature */
|
|
82
|
+
signature: string;
|
|
83
|
+
};
|
|
74
84
|
type WalletsAddRequestDataType = BaseWalletsRequestData & {
|
|
75
85
|
/**
|
|
76
86
|
* Key with which to look up the existing entropy
|
|
@@ -204,15 +214,6 @@ type WalletsRpcBitcoinRequestDataType = {
|
|
|
204
214
|
chainType: 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
205
215
|
request: unknown;
|
|
206
216
|
};
|
|
207
|
-
type WalletsRpcP256RequestDataType = {
|
|
208
|
-
chainType: 'p256';
|
|
209
|
-
request: {
|
|
210
|
-
method: 'sign';
|
|
211
|
-
params: {
|
|
212
|
-
message: string;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
217
|
type WalletsRpcRequestDataType = BaseWalletsRequestData & {
|
|
217
218
|
/**
|
|
218
219
|
* Key with which to look up the existing entropy
|
|
@@ -236,7 +237,7 @@ type WalletsRpcRequestDataType = BaseWalletsRequestData & {
|
|
|
236
237
|
hdWalletIndex: number;
|
|
237
238
|
/** For cross-app requests, the app ID of the requester app */
|
|
238
239
|
requesterAppId?: string | null;
|
|
239
|
-
} & (WalletsRpcEthereumRequestDataType | WalletsRpcSolanaRequestDataType | WalletsRpcBitcoinRequestDataType
|
|
240
|
+
} & (WalletsRpcEthereumRequestDataType | WalletsRpcSolanaRequestDataType | WalletsRpcBitcoinRequestDataType);
|
|
240
241
|
type WalletsRpcEthereumResponseDataType = {
|
|
241
242
|
chainType: 'ethereum';
|
|
242
243
|
response: EthereumRpcResponseType;
|
|
@@ -249,17 +250,9 @@ type WalletsRpcBitcoinResponseDataType = {
|
|
|
249
250
|
chainType: 'bitcoin-taproot' | 'bitcoin-segwit';
|
|
250
251
|
response: unknown;
|
|
251
252
|
};
|
|
252
|
-
type WalletsRpcP256ResponseDataType = {
|
|
253
|
-
chainType: 'p256';
|
|
254
|
-
response: {
|
|
255
|
-
data: {
|
|
256
|
-
signature: string;
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
253
|
type WalletsRpcResponseDataType = {
|
|
261
254
|
address: string;
|
|
262
|
-
} & (WalletsRpcEthereumResponseDataType | WalletsRpcSolanaResponseDataType | WalletsRpcBitcoinResponseDataType
|
|
255
|
+
} & (WalletsRpcEthereumResponseDataType | WalletsRpcSolanaResponseDataType | WalletsRpcBitcoinResponseDataType);
|
|
263
256
|
type BaseWalletCreateRequestDataType = {
|
|
264
257
|
accessToken: string;
|
|
265
258
|
};
|
|
@@ -412,6 +405,7 @@ declare const PrivyIframeErrorTypes: readonly ["error", "invalid_request_argumen
|
|
|
412
405
|
type PrivyIframeErrorTypesType = (typeof PrivyIframeErrorTypes)[number];
|
|
413
406
|
interface EmbeddedWalletProxy {
|
|
414
407
|
createSigner: (data: CreateSignerRequestDataType) => Promise<CreateSignerResponseDataType>;
|
|
408
|
+
signWithUserSigner: (data: UserSignerSignRequestDataType) => Promise<UserSignerSignResponseDataType>;
|
|
415
409
|
createWallet: (data: WalletsCreateRequestDataType) => Promise<WalletsCreateResponseDataType>;
|
|
416
410
|
addWallet: (data: WalletsAddRequestDataType) => Promise<WalletsAddResponseDataType>;
|
|
417
411
|
importWallet: (data: WalletsImportRequestDataType) => Promise<WalletsImportResponseDataType>;
|
|
@@ -438,11 +432,6 @@ interface EmbeddedWalletProxy {
|
|
|
438
432
|
}): Promise<WalletsRpcResponseDataType & {
|
|
439
433
|
chainType: 'bitcoin-segwit';
|
|
440
434
|
}>;
|
|
441
|
-
rpc(data: WalletsRpcRequestDataType & {
|
|
442
|
-
chainType: 'p256';
|
|
443
|
-
}): Promise<WalletsRpcResponseDataType & {
|
|
444
|
-
chainType: 'p256';
|
|
445
|
-
}>;
|
|
446
435
|
/** @deprecated */
|
|
447
436
|
create: (data: EthereumWalletCreateRequestDataType) => Promise<WalletCreateResponseDataType>;
|
|
448
437
|
/** @deprecated */
|
|
@@ -2413,14 +2402,7 @@ interface ResponseCrossAppAccount {
|
|
|
2413
2402
|
first_verified_at: number | null;
|
|
2414
2403
|
latest_verified_at: number | null;
|
|
2415
2404
|
}
|
|
2416
|
-
|
|
2417
|
-
type: 'authorization_key';
|
|
2418
|
-
public_key: string;
|
|
2419
|
-
verified_at: number;
|
|
2420
|
-
first_verified_at: number | null;
|
|
2421
|
-
latest_verified_at: number | null;
|
|
2422
|
-
}
|
|
2423
|
-
type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseAuthorizationKeyAccount>;
|
|
2405
|
+
type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
|
|
2424
2406
|
interface ResponseSmsMfaMethod {
|
|
2425
2407
|
type: 'sms';
|
|
2426
2408
|
verified_at: number;
|
|
@@ -3832,11 +3814,14 @@ declare function useFarcasterSigner(): {
|
|
|
3832
3814
|
};
|
|
3833
3815
|
|
|
3834
3816
|
/**
|
|
3817
|
+
* @deprecated use useSessionSigners instead
|
|
3835
3818
|
* Hook to delegate permissions to execute certain transactions to the wallet API.
|
|
3836
3819
|
*
|
|
3837
3820
|
*/
|
|
3838
3821
|
interface UseDelegatedActionsInterface {
|
|
3839
3822
|
/**
|
|
3823
|
+
* @deprecated use useSessionSigners instead
|
|
3824
|
+
*
|
|
3840
3825
|
* Prompts the user to delegate access to their wallet to allow an app to transact on behalf of a user
|
|
3841
3826
|
* within a set of pre-defined permissions. Users can always decline or revoke delegation.
|
|
3842
3827
|
*
|
|
@@ -3849,6 +3834,9 @@ interface UseDelegatedActionsInterface {
|
|
|
3849
3834
|
chainType: 'solana' | 'ethereum';
|
|
3850
3835
|
}) => Promise<void>;
|
|
3851
3836
|
/**
|
|
3837
|
+
*
|
|
3838
|
+
* @deprecated use useSessionSigners instead
|
|
3839
|
+
*
|
|
3852
3840
|
* Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
|
|
3853
3841
|
* ALL wallets that have been delegated by the user, in case the user has delegated multiple embedded
|
|
3854
3842
|
* wallets.
|
|
@@ -3860,6 +3848,40 @@ interface UseDelegatedActionsInterface {
|
|
|
3860
3848
|
}
|
|
3861
3849
|
declare const useDelegatedActions: () => UseDelegatedActionsInterface;
|
|
3862
3850
|
|
|
3851
|
+
/**
|
|
3852
|
+
* Hook to add session signers to a user wallet.
|
|
3853
|
+
*
|
|
3854
|
+
*/
|
|
3855
|
+
interface UseSessionSignersInterface {
|
|
3856
|
+
/**
|
|
3857
|
+
* Headlessly grants access of the user wallet to a specified key quorum.
|
|
3858
|
+
*
|
|
3859
|
+
* @param address address of the wallet to delegate
|
|
3860
|
+
* @param signers array of signers to add as session keys to the wallet
|
|
3861
|
+
* @returns Promise that resolves if adding signers was successful, and errors otherwise
|
|
3862
|
+
*/
|
|
3863
|
+
addSessionSigners: ({ address, signers, }: {
|
|
3864
|
+
address: string;
|
|
3865
|
+
signers: {
|
|
3866
|
+
signerId: string;
|
|
3867
|
+
}[];
|
|
3868
|
+
}) => Promise<{
|
|
3869
|
+
user: User;
|
|
3870
|
+
}>;
|
|
3871
|
+
/**
|
|
3872
|
+
* Removes all session keys from a user wallet.
|
|
3873
|
+
*
|
|
3874
|
+
* @param address address of the wallet to revoke access for
|
|
3875
|
+
* @returns Promise that resolves if the revocation was successful, and errors otherwise
|
|
3876
|
+
*/
|
|
3877
|
+
removeSessionSigners: ({ address }: {
|
|
3878
|
+
address: string;
|
|
3879
|
+
}) => Promise<{
|
|
3880
|
+
user: User;
|
|
3881
|
+
}>;
|
|
3882
|
+
}
|
|
3883
|
+
declare const useSessionSigners: () => UseSessionSignersInterface;
|
|
3884
|
+
|
|
3863
3885
|
/**
|
|
3864
3886
|
* Use this hook to programmatically update the user in response to any backend change
|
|
3865
3887
|
*
|
|
@@ -3898,11 +3920,15 @@ type UseLoginWithTelegram = {
|
|
|
3898
3920
|
declare const useLoginWithTelegram: (callbacks?: PrivyEvents["login"]) => UseLoginWithTelegram;
|
|
3899
3921
|
|
|
3900
3922
|
/**
|
|
3923
|
+
* @deprecated use useSessionSigners instead
|
|
3924
|
+
*
|
|
3901
3925
|
* Hook to headlessly permissions to execute certain transactions to the wallet API.
|
|
3902
3926
|
*
|
|
3903
3927
|
*/
|
|
3904
3928
|
interface UseHeadlessDelegatedActionsInterface {
|
|
3905
3929
|
/**
|
|
3930
|
+
* @deprecated use useSessionSigners instead
|
|
3931
|
+
*
|
|
3906
3932
|
* Prompts the user to headlessly delegate access to their wallet to allow an app to transact on behalf of a user
|
|
3907
3933
|
* within a set of pre-defined permissions. Users can always decline or revoke delegation.
|
|
3908
3934
|
*
|
|
@@ -3915,6 +3941,8 @@ interface UseHeadlessDelegatedActionsInterface {
|
|
|
3915
3941
|
chainType: 'solana' | 'ethereum';
|
|
3916
3942
|
}) => Promise<void>;
|
|
3917
3943
|
/**
|
|
3944
|
+
* @deprecated use useSessionSigners instead
|
|
3945
|
+
*
|
|
3918
3946
|
* Headlessly revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
|
|
3919
3947
|
* ALL wallets that have been delegated by the user, in case the user has delegated multiple embedded
|
|
3920
3948
|
* wallets.
|
|
@@ -3938,4 +3966,4 @@ declare const LoginModal: ({ open }: {
|
|
|
3938
3966
|
open: boolean;
|
|
3939
3967
|
}) => react_jsx_runtime.JSX.Element;
|
|
3940
3968
|
|
|
3941
|
-
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
|
|
3969
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, 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, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
|
|
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
|
|
|
7
7
|
import * as viem from 'viem';
|
|
8
8
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
|
|
9
9
|
import { SmartWalletType } from '@privy-io/js-sdk-core';
|
|
10
|
-
import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-
|
|
10
|
+
import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
|
|
11
11
|
import '@solana/wallet-adapter-base';
|
|
12
12
|
import '@privy-io/public-api';
|
|
13
13
|
import '@metamask/eth-sig-util';
|
|
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
|
|
|
7
7
|
import * as viem from 'viem';
|
|
8
8
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
|
|
9
9
|
import { SmartWalletType } from '@privy-io/js-sdk-core';
|
|
10
|
-
import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-
|
|
10
|
+
import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
|
|
11
11
|
import '@solana/wallet-adapter-base';
|
|
12
12
|
import '@privy-io/public-api';
|
|
13
13
|
import '@metamask/eth-sig-util';
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { W as Wallet, j as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-
|
|
2
|
-
export { C as ConnectedSolanaWallet, k as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, j as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
|
|
2
|
+
export { C as ConnectedSolanaWallet, k as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Nqh9YCV3.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-BSVQS05e.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
|
|
5
|
+
import { WalletWithSolanaFeatures, SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
6
|
+
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
7
|
+
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
8
|
+
import { Transaction, VersionedTransaction, Cluster, SendOptions, TransactionSignature, Connection } from '@solana/web3.js';
|
|
9
|
+
import EventEmitter from 'eventemitter3';
|
|
5
10
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
6
|
-
import { Connection } from '@solana/web3.js';
|
|
7
11
|
import 'react';
|
|
8
12
|
import 'viem';
|
|
9
13
|
import '@privy-io/js-sdk-core';
|
|
10
14
|
import '@privy-io/public-api';
|
|
11
15
|
import '@metamask/eth-sig-util';
|
|
12
|
-
import 'eventemitter3';
|
|
13
16
|
|
|
14
17
|
interface UseImportWalletInterface {
|
|
15
18
|
/**
|
|
@@ -33,6 +36,109 @@ interface UseImportWalletInterface {
|
|
|
33
36
|
*/
|
|
34
37
|
declare const useImportWallet: () => UseImportWalletInterface;
|
|
35
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Object representation of a Privy Solana wallet account.
|
|
41
|
+
*/
|
|
42
|
+
declare class PrivyWalletAccount implements WalletAccount {
|
|
43
|
+
#private;
|
|
44
|
+
get address(): string;
|
|
45
|
+
get publicKey(): Uint8Array;
|
|
46
|
+
get chains(): `${string}:${string}`[];
|
|
47
|
+
get features(): `${string}:${string}`[];
|
|
48
|
+
get label(): string | undefined;
|
|
49
|
+
get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}` | undefined;
|
|
50
|
+
constructor({ address, publicKey, label, icon }: Omit<WalletAccount, 'chains' | 'features'>);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Standard wallet implementation interface
|
|
55
|
+
*/
|
|
56
|
+
interface StandardWalletImplementation {
|
|
57
|
+
/**
|
|
58
|
+
* Sign a message.
|
|
59
|
+
*/
|
|
60
|
+
signMessage(message: Uint8Array, address: string): Promise<{
|
|
61
|
+
signature: Uint8Array;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Sign and send a transaction.
|
|
65
|
+
*/
|
|
66
|
+
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, address: string, cluster: Cluster, options?: SendOptions): Promise<{
|
|
67
|
+
signature: TransactionSignature;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Sign a transaction without sending it to the network.
|
|
71
|
+
*/
|
|
72
|
+
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T, address: string, cluster: Cluster, options?: SendOptions): Promise<T>;
|
|
73
|
+
}
|
|
74
|
+
type StandardWalletInjectionEvents = {
|
|
75
|
+
accountChanged: (accounts?: Array<{
|
|
76
|
+
address: string;
|
|
77
|
+
}>) => void;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Event emitter for the provider solana injection.
|
|
81
|
+
* This provides all the methods to sign messages, transactions, etc.
|
|
82
|
+
* Implementation is updated everytime the references to the wallets change.
|
|
83
|
+
*/
|
|
84
|
+
declare class StandardWalletInjection extends EventEmitter<StandardWalletInjectionEvents> {
|
|
85
|
+
#private;
|
|
86
|
+
constructor(implementation: StandardWalletImplementation);
|
|
87
|
+
setImplementation(implementation: StandardWalletImplementation): void;
|
|
88
|
+
signMessage(message: Uint8Array, address: string): Promise<{
|
|
89
|
+
signature: Uint8Array;
|
|
90
|
+
}>;
|
|
91
|
+
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, address: string, cluster: Cluster, options?: SendOptions): Promise<{
|
|
92
|
+
signature: TransactionSignature;
|
|
93
|
+
}>;
|
|
94
|
+
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T, address: string, cluster: Cluster, options?: SendOptions): Promise<T>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
type PrivyFeature = {
|
|
98
|
+
'privy:': {
|
|
99
|
+
privy: StandardWalletImplementation;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Privy standard wallet implementation.
|
|
104
|
+
*/
|
|
105
|
+
declare class PrivyStandardWallet implements WalletWithSolanaFeatures {
|
|
106
|
+
#private;
|
|
107
|
+
get version(): "1.0.0";
|
|
108
|
+
get name(): string;
|
|
109
|
+
get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
|
|
110
|
+
get chains(): ("solana:mainnet" | "solana:devnet" | "solana:testnet")[];
|
|
111
|
+
get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignAndSendTransactionFeature & SolanaSignTransactionFeature & SolanaSignMessageFeature & PrivyFeature;
|
|
112
|
+
get accounts(): PrivyWalletAccount[];
|
|
113
|
+
constructor({ name, icon, version, injection, wallets, }: {
|
|
114
|
+
name: string;
|
|
115
|
+
icon: WalletIcon;
|
|
116
|
+
version: WalletVersion;
|
|
117
|
+
injection: StandardWalletInjection;
|
|
118
|
+
wallets: Array<{
|
|
119
|
+
address: string;
|
|
120
|
+
}>;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Use this hook to get Privy's implementation of the Standard Wallet interface.
|
|
126
|
+
*/
|
|
127
|
+
interface UsePrivyStandardWalletInterface {
|
|
128
|
+
/**
|
|
129
|
+
* Whether the wallet is ready to be used.
|
|
130
|
+
*/
|
|
131
|
+
ready: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* The wallet that implements the Standard Wallet interface.
|
|
134
|
+
*/
|
|
135
|
+
wallet: PrivyStandardWallet;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Use this hook to get Privy's implementation of the Standard Wallet interface.
|
|
139
|
+
*/
|
|
140
|
+
declare function usePrivyStandardWallet(): UsePrivyStandardWalletInterface;
|
|
141
|
+
|
|
36
142
|
/**
|
|
37
143
|
* Method to fund a user's Solana wallet via Privy's funding feature by inputting a valid wallet address.
|
|
38
144
|
* You can access the fields and methods documented here via the {@link useFundWallet} hook.
|
|
@@ -189,4 +295,4 @@ declare function useSignMessage(callbacks?: PrivyEvents['signSolanaMessage']): {
|
|
|
189
295
|
}) => Promise<Uint8Array>;
|
|
190
296
|
};
|
|
191
297
|
|
|
192
|
-
export { SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, useFundWallet, useImportWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin };
|
|
298
|
+
export { PrivyStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin };
|