@privy-io/react-auth 2.24.0 → 2.25.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-zm0SWrLy.js +34 -0
- package/dist/cjs/{smart-wallets-TcsJ7a-J.js → smart-wallets-DO-QDpuC.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +2 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{useActiveWallet-CGbGRerk.js → useActiveWallet-DDZXLk7d.js} +1 -1
- package/dist/cjs/useFundWallet-C9bw6h3P.js +1 -0
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +27 -5
- package/dist/dts/index.d.ts +27 -5
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +12 -5
- package/dist/dts/solana.d.ts +12 -5
- package/dist/dts/{types-zpHmPFW8.d.mts → types-B_DvyjIb.d.mts} +34 -3
- package/dist/dts/{types-zpHmPFW8.d.ts → types-B_DvyjIb.d.ts} +34 -3
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/dts/{useSolanaWallets-Bnyf2wo3.d.mts → useSolanaWallets-EdHHRSMB.d.mts} +1 -1
- package/dist/dts/{useSolanaWallets-Bnyf2wo3.d.ts → useSolanaWallets-EdHHRSMB.d.ts} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/privy-provider-BG8GtKO6.mjs +31 -0
- package/dist/esm/{smart-wallets-Dyw1Yps1.mjs → smart-wallets-CYfnJBkN.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/useActiveWallet-BGo6de6R.mjs +1 -0
- package/dist/esm/useFundWallet-Dx-BELh-.mjs +1 -0
- package/package.json +16 -7
- package/dist/cjs/privy-provider-Cc-fBpNe.js +0 -34
- package/dist/cjs/useFundWallet-aHyY2NF8.js +0 -1
- package/dist/esm/privy-provider-C-OGn-Rn.mjs +0 -31
- package/dist/esm/useActiveWallet-Bj6Y6Ioo.mjs +0 -1
- package/dist/esm/useFundWallet-Co5a-0jh.mjs +0 -1
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 { c as UserRecoveryMethod,
|
|
4
|
-
export {
|
|
3
|
+
import { c as UserRecoveryMethod, p as PrivyFarcasterSignerInitResponse, q as MfaSubmitArgs, E as EthereumRpcRequestType, r as SolanaRpcRequestType, s as EthereumRpcResponseType, u as SolanaRpcResponseType, v as EIP1193Provider, w as EntropyIdVerifier$1, H as HDWalletWithMetadata, x as RequestArguments, y as WalletConnector, B as BaseConnectedEthereumWallet, z as PrivyProxyProvider, A as WalletClientType, D as ConnectedWalletMetadata, G as PrivyClientConfig, I as ConnectorType, J as SetBaseAccountSdkType, K as WalletListEntry, N as AppConfig, Q as BaseConnectedWallet, o as SolanaWalletConnector, U as User, T as ConnectWalletModalOptions, V as LoginModalOptions, f as CreateWalletOptions, W as Wallet, X as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Y as SignTypedDataParams, M as MfaMethod, Z as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, _ as FundWalletConfig, $ as ConnectedWallet, O as OAuthTokens, a0 as CrossAppProviderDetails, a1 as OAuthProviderType, a2 as MoonpaySignRequest, a3 as MoonpaySignResponse, a4 as SmartWalletConfig, a5 as SiwsMessageType, L as LoginMethod, a6 as ExternalWalletMetadata, a7 as TelegramAuthResult, a8 as TelegramWebAppData, a9 as OAuthUserInfo, aa as OAuthFlowState, ab as LoginWithCode, ac as OtpFlowState, ad as PasskeyFlowState, ae as SiweFlowState, a as LinkedAccountWithMetadata, af as BaseAccountSdkType, ag as UnsignedTransactionRequestWithChainId, ah as BaseConnectedWalletType, C as ConnectedSolanaWallet, ai as SessionSignerInput, aj as TelegramAuthFlowState } from './types-B_DvyjIb.js';
|
|
4
|
+
export { aC as Apple, aP as AppleOAuthWithMetadata, aX as ContractUIOptions, aG as CrossAppAccount, aS as CrossAppAccountWithMetadata, az as Discord, aK as DiscordOAuthWithMetadata, aU as Email, au as EmailWithMetadata, a$ as Farcaster, aQ as FarcasterWithMetadata, aA as Github, aL as GithubOAuthWithMetadata, ax as Google, aI as GoogleOAuthWithMetadata, aE as Line, aN as LineOAuthWithMetadata, aH as LinkedAccountType, aB as LinkedIn, aO as LinkedInOAuthWithMetadata, b1 as LoginMethodOrderOption, al as MessageTypes, an as MoonpayConfig, ao as MoonpayCurrencyCode, aZ as MoonpayFundingConfig, ap as MoonpayPaymentMethod, aY as NativeFundingConfig, at as NonEmptyArray, b0 as Passkey, aT as PasskeyWithMetadata, aV as Phone, av as PhoneWithMetadata, a_ as PriceDisplayOptions, P as PrivyErrorCode, aq as Quantity, b2 as SiwsFlowState, am as SmartWallet, e as SolanaCluster, m as SolanaFundingConfig, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, aF as Telegram, aR as TelegramWithMetadata, aD as Tiktok, aM as TiktokOAuthWithMetadata, ar as TransactionLog, as as TransactionReceipt, aW as TransactionUIOptions, ay as Twitter, aJ as TwitterOAuthWithMetadata, ak as TypedMessage, aw as WalletWithMetadata } from './types-B_DvyjIb.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import { AppKit } from '@reown/appkit';
|
|
@@ -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-EdHHRSMB.js';
|
|
20
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-EdHHRSMB.js';
|
|
21
21
|
import * as viem_accounts from 'viem/accounts';
|
|
22
22
|
import '@coinbase/wallet-sdk';
|
|
23
23
|
import '@solana/kit';
|
|
@@ -457,6 +457,7 @@ declare const getPublicClient: (chainId: number, chains: Chain[], rpcConfig: Rpc
|
|
|
457
457
|
cacheTime: number;
|
|
458
458
|
ccipRead?: viem.ClientConfig["ccipRead"] | undefined;
|
|
459
459
|
chain: Chain;
|
|
460
|
+
experimental_blockTag?: viem.BlockTag | undefined;
|
|
460
461
|
key: string;
|
|
461
462
|
name: string;
|
|
462
463
|
pollingInterval: number;
|
|
@@ -725,6 +726,7 @@ declare const getPublicClient: (chainId: number, chains: Chain[], rpcConfig: Rpc
|
|
|
725
726
|
simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
726
727
|
simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
|
|
727
728
|
simulateContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends viem.Chain | undefined, accountOverride extends viem.Account | Address | undefined = undefined>(args: viem.SimulateContractParameters<abi, functionName, args_1, Chain, chainOverride, accountOverride>) => Promise<viem.SimulateContractReturnType<abi, functionName, args_1, Chain, viem.Account | undefined, chainOverride, accountOverride>>;
|
|
729
|
+
verifyHash: (args: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>;
|
|
728
730
|
verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
|
|
729
731
|
verifySiweMessage: (args: {
|
|
730
732
|
blockNumber?: bigint | undefined;
|
|
@@ -752,6 +754,7 @@ declare const getPublicClient: (chainId: number, chains: Chain[], rpcConfig: Rpc
|
|
|
752
754
|
cacheTime?: undefined;
|
|
753
755
|
ccipRead?: undefined;
|
|
754
756
|
chain?: undefined;
|
|
757
|
+
experimental_blockTag?: undefined;
|
|
755
758
|
key?: undefined;
|
|
756
759
|
name?: undefined;
|
|
757
760
|
pollingInterval?: undefined;
|
|
@@ -1202,6 +1205,7 @@ declare const getPublicClient: (chainId: number, chains: Chain[], rpcConfig: Rpc
|
|
|
1202
1205
|
cacheTime?: undefined;
|
|
1203
1206
|
ccipRead?: undefined;
|
|
1204
1207
|
chain?: undefined;
|
|
1208
|
+
experimental_blockTag?: undefined;
|
|
1205
1209
|
key?: undefined;
|
|
1206
1210
|
name?: undefined;
|
|
1207
1211
|
pollingInterval?: undefined;
|
|
@@ -1975,6 +1979,7 @@ interface PrivyInterface {
|
|
|
1975
1979
|
* @returns Promise for the transaction's hash as a hexadecimal string
|
|
1976
1980
|
*/
|
|
1977
1981
|
sendTransaction: (input: UnsignedTransactionRequest, options?: {
|
|
1982
|
+
sponsor?: boolean;
|
|
1978
1983
|
uiOptions?: SendTransactionModalUIOptions;
|
|
1979
1984
|
fundWalletConfig?: FundWalletConfig;
|
|
1980
1985
|
address?: string;
|
|
@@ -2862,6 +2867,22 @@ declare function useLogout(callbacks?: PrivyEvents['logout']): {
|
|
|
2862
2867
|
logout: () => Promise<void>;
|
|
2863
2868
|
};
|
|
2864
2869
|
|
|
2870
|
+
type UseGetAccessTokenForProvider = {
|
|
2871
|
+
/**
|
|
2872
|
+
* Get a cross-app access token for this user.
|
|
2873
|
+
*
|
|
2874
|
+
* @param o input object
|
|
2875
|
+
* @param o.appId the Privy app ID of the cross-app provider
|
|
2876
|
+
* @returns an access token for this user if they are authenticated with the provider app, null otherwise
|
|
2877
|
+
*/
|
|
2878
|
+
getAccessTokenForProvider: (o: {
|
|
2879
|
+
appId: string;
|
|
2880
|
+
}) => {
|
|
2881
|
+
token: string | null;
|
|
2882
|
+
};
|
|
2883
|
+
};
|
|
2884
|
+
declare const useGetAccessTokenForProvider: () => UseGetAccessTokenForProvider;
|
|
2885
|
+
|
|
2865
2886
|
type UseLoginWithOAuth = {
|
|
2866
2887
|
/**
|
|
2867
2888
|
* Redirect to a login page for the given OAuth provider without using Privy's UI
|
|
@@ -3666,6 +3687,7 @@ declare function useSendTransaction(callbacks?: PrivyEvents['sendTransaction']):
|
|
|
3666
3687
|
* Prompts a user to send a transaction using their embedded wallet.
|
|
3667
3688
|
*/
|
|
3668
3689
|
sendTransaction: (input: UnsignedTransactionRequest, options?: {
|
|
3690
|
+
sponsor?: boolean;
|
|
3669
3691
|
uiOptions?: SendTransactionModalUIOptions;
|
|
3670
3692
|
fundWalletConfig?: FundWalletConfig;
|
|
3671
3693
|
address?: string;
|
|
@@ -4325,4 +4347,4 @@ declare const useMigrateWallets: () => {
|
|
|
4325
4347
|
}>;
|
|
4326
4348
|
};
|
|
4327
4349
|
|
|
4328
|
-
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LinkedAccountWithMetadata, 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 UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, 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, 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, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
|
|
4350
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LinkedAccountWithMetadata, 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 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, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-
|
|
3
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-B_DvyjIb.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } 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 { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-
|
|
3
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-B_DvyjIb.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet, j as SignMessageModalUIOptions, k as SolanaChain, l as SolanaStandardWallet, m as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, f as CreateWalletOptions } from './types-
|
|
2
|
-
export { C as ConnectedSolanaWallet,
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, j as SignMessageModalUIOptions, k as SolanaChain, l as SolanaStandardWallet, m as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, f as CreateWalletOptions, n as SolanaStandardFundingConfig } from './types-B_DvyjIb.js';
|
|
2
|
+
export { C as ConnectedSolanaWallet, o as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-B_DvyjIb.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-EdHHRSMB.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-EdHHRSMB.js';
|
|
5
5
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
6
6
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
7
7
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
@@ -456,4 +456,11 @@ type UseStandardSignAndSendTransaction = {
|
|
|
456
456
|
};
|
|
457
457
|
declare function useStandardSignAndSendTransaction(): UseStandardSignAndSendTransaction;
|
|
458
458
|
|
|
459
|
-
|
|
459
|
+
declare function useStandardFundWallet(): {
|
|
460
|
+
fundWallet: ({ address, options, }: {
|
|
461
|
+
address: string;
|
|
462
|
+
options?: SolanaStandardFundingConfig;
|
|
463
|
+
}) => Promise<void>;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
export { PrivyStandardWallet, SolanaStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseConnectedStandardWallets, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, type UseSolanaStandardWalletsInterface, useConnectedStandardWallets, useCreateWallet, useExportWallet, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaLedgerPlugin, useSolanaStandardWallets, useStandardFundWallet, useStandardSignAndSendTransaction, useStandardSignMessage, useStandardSignTransaction };
|
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet, j as SignMessageModalUIOptions, k as SolanaChain, l as SolanaStandardWallet, m as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, f as CreateWalletOptions } from './types-
|
|
2
|
-
export { C as ConnectedSolanaWallet,
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, j as SignMessageModalUIOptions, k as SolanaChain, l as SolanaStandardWallet, m as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, f as CreateWalletOptions, n as SolanaStandardFundingConfig } from './types-B_DvyjIb.js';
|
|
2
|
+
export { C as ConnectedSolanaWallet, o as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-B_DvyjIb.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-EdHHRSMB.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-EdHHRSMB.js';
|
|
5
5
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
6
6
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
7
7
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
@@ -456,4 +456,11 @@ type UseStandardSignAndSendTransaction = {
|
|
|
456
456
|
};
|
|
457
457
|
declare function useStandardSignAndSendTransaction(): UseStandardSignAndSendTransaction;
|
|
458
458
|
|
|
459
|
-
|
|
459
|
+
declare function useStandardFundWallet(): {
|
|
460
|
+
fundWallet: ({ address, options, }: {
|
|
461
|
+
address: string;
|
|
462
|
+
options?: SolanaStandardFundingConfig;
|
|
463
|
+
}) => Promise<void>;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
export { PrivyStandardWallet, SolanaStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseConnectedStandardWallets, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, type UseSolanaStandardWalletsInterface, useConnectedStandardWallets, useCreateWallet, useExportWallet, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaLedgerPlugin, useSolanaStandardWallets, useStandardFundWallet, useStandardSignAndSendTransaction, useStandardSignMessage, useStandardSignTransaction };
|
|
@@ -588,7 +588,7 @@ type LoginWithCode = {
|
|
|
588
588
|
};
|
|
589
589
|
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
|
|
590
590
|
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
591
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain", "binance"];
|
|
591
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain", "binance", "bitkeep"];
|
|
592
592
|
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
593
593
|
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet", "base_account"];
|
|
594
594
|
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
@@ -666,6 +666,25 @@ type SolanaFundingConfig = {
|
|
|
666
666
|
/** The asset to fund with */
|
|
667
667
|
asset?: 'USDC' | 'native-currency';
|
|
668
668
|
};
|
|
669
|
+
/**
|
|
670
|
+
* Configuration for Standard Solana funding
|
|
671
|
+
*/
|
|
672
|
+
type SolanaStandardFundingConfig = {
|
|
673
|
+
/** The chain used for connections */
|
|
674
|
+
chain?: SolanaChain;
|
|
675
|
+
/** The default amount in SOL */
|
|
676
|
+
amount?: string;
|
|
677
|
+
/** The default funding method */
|
|
678
|
+
defaultFundingMethod?: DefaultFundingMethod;
|
|
679
|
+
card?: {
|
|
680
|
+
/** The preferred card provider for funding */
|
|
681
|
+
preferredProvider?: PreferredCardProvider;
|
|
682
|
+
};
|
|
683
|
+
/** Customization for the funding UIs */
|
|
684
|
+
uiConfig?: FundingUiConfig;
|
|
685
|
+
/** The asset to fund with */
|
|
686
|
+
asset?: 'SOL' | 'USDC';
|
|
687
|
+
};
|
|
669
688
|
/**
|
|
670
689
|
* Configuration for native funding amount.
|
|
671
690
|
*/
|
|
@@ -1277,7 +1296,7 @@ type PriceDisplayOptions = {
|
|
|
1277
1296
|
};
|
|
1278
1297
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'base_account' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1279
1298
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1280
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus';
|
|
1299
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus' | 'bitkeep';
|
|
1281
1300
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1282
1301
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1283
1302
|
type ExternalWalletsConfig = {
|
|
@@ -1526,6 +1545,17 @@ interface PrivyClientConfig {
|
|
|
1526
1545
|
privacyPolicyUrl?: string | null;
|
|
1527
1546
|
};
|
|
1528
1547
|
walletConnectCloudProjectId?: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* Custom redirect URL for OAuth flows, useful for mobile applications.
|
|
1550
|
+
* If not provided, defaults to window.location.href.
|
|
1551
|
+
*
|
|
1552
|
+
* For Capacitor/mobile apps, use a custom URL scheme like:
|
|
1553
|
+
* 'com.yourapp.oauth://callback' or 'yourapp://oauth'
|
|
1554
|
+
*
|
|
1555
|
+
* Make sure to register this URL scheme in your app configuration
|
|
1556
|
+
* and add it to your app's allowed URL schemes in the Privy dashboard.
|
|
1557
|
+
*/
|
|
1558
|
+
customOAuthRedirectUrl?: string;
|
|
1529
1559
|
/**
|
|
1530
1560
|
* A list of supported chains, used to specify which chains should be used throughout the application.
|
|
1531
1561
|
*
|
|
@@ -1988,6 +2018,7 @@ type AppConfig = {
|
|
|
1988
2018
|
};
|
|
1989
2019
|
fundingMethodConfig: NonNullable<PrivyClientConfig['fundingMethodConfig']>;
|
|
1990
2020
|
whatsAppEnabled: boolean;
|
|
2021
|
+
customOAuthRedirectUrl?: string;
|
|
1991
2022
|
solanaRpcs: Record<SolanaChain, {
|
|
1992
2023
|
rpc: Rpc<SolanaRpcApi>;
|
|
1993
2024
|
rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
@@ -2425,4 +2456,4 @@ type SessionSignerInput = {
|
|
|
2425
2456
|
policyIds?: string[];
|
|
2426
2457
|
}[];
|
|
2427
2458
|
|
|
2428
|
-
export { type
|
|
2459
|
+
export { type ConnectedWallet as $, type WalletClientType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectedWalletMetadata as D, type EthereumRpcRequestType as E, type FundingMethod as F, type PrivyClientConfig as G, type HDWalletWithMetadata as H, type ConnectorType as I, type SetBaseAccountSdkType as J, type WalletListEntry as K, type LoginMethod as L, type MfaMethod as M, type AppConfig as N, type OAuthTokens as O, PrivyErrorCode as P, type BaseConnectedWallet as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type ConnectWalletModalOptions as T, type User as U, type LoginModalOptions as V, type Wallet as W, type SetWalletRecoveryOptions as X, type SignTypedDataParams as Y, type UnsignedTransactionRequest as Z, type FundWalletConfig as _, type LinkedAccountWithMetadata as a, type Farcaster as a$, type CrossAppProviderDetails as a0, type OAuthProviderType as a1, type MoonpaySignRequest as a2, type MoonpaySignResponse as a3, type SmartWalletConfig as a4, type SiwsMessageType as a5, type ExternalWalletMetadata as a6, type TelegramAuthResult as a7, type TelegramWebAppData as a8, type OAuthUserInfo as a9, type Github as aA, type LinkedIn as aB, type Apple as aC, type Tiktok as aD, type Line as aE, type Telegram as aF, type CrossAppAccount as aG, type LinkedAccountType as aH, type GoogleOAuthWithMetadata as aI, type TwitterOAuthWithMetadata as aJ, type DiscordOAuthWithMetadata as aK, type GithubOAuthWithMetadata as aL, type TiktokOAuthWithMetadata as aM, type LineOAuthWithMetadata as aN, type LinkedInOAuthWithMetadata as aO, type AppleOAuthWithMetadata as aP, type FarcasterWithMetadata as aQ, type TelegramWithMetadata as aR, type CrossAppAccountWithMetadata as aS, type PasskeyWithMetadata as aT, type Email as aU, type Phone as aV, type TransactionUIOptions as aW, type ContractUIOptions as aX, type NativeFundingConfig as aY, type MoonpayFundingConfig as aZ, type PriceDisplayOptions as a_, type OAuthFlowState as aa, type LoginWithCode as ab, type OtpFlowState as ac, type PasskeyFlowState as ad, type SiweFlowState as ae, type BaseAccountSdkType as af, type UnsignedTransactionRequestWithChainId as ag, type BaseConnectedWalletType as ah, type SessionSignerInput as ai, type TelegramAuthFlowState as aj, type TypedMessage as ak, type MessageTypes as al, type SmartWallet as am, type MoonpayConfig as an, type MoonpayCurrencyCode as ao, type MoonpayPaymentMethod as ap, type Quantity as aq, type TransactionLog as ar, type TransactionReceipt as as, type NonEmptyArray as at, type EmailWithMetadata as au, type PhoneWithMetadata as av, type WalletWithMetadata as aw, type Google as ax, type Twitter as ay, type Discord as az, type BaseConnectedSolanaWallet as b, type Passkey as b0, type LoginMethodOrderOption as b1, type SiwsFlowState as b2, type UserRecoveryMethod as c, type SupportedSolanaTransaction as d, type SolanaCluster as e, type CreateWalletOptions as f, type LoginToFrame as g, type LoginToMiniApp as h, type SendTransactionModalUIOptions as i, type SignMessageModalUIOptions as j, type SolanaChain as k, type SolanaStandardWallet as l, type SolanaFundingConfig as m, type SolanaStandardFundingConfig as n, SolanaWalletConnector as o, type PrivyFarcasterSignerInitResponse as p, type MfaSubmitArgs as q, type SolanaRpcRequestType as r, type EthereumRpcResponseType as s, toSolanaWalletConnectors as t, type SolanaRpcResponseType as u, type EIP1193Provider as v, type EntropyIdVerifier as w, type RequestArguments as x, WalletConnector as y, PrivyProxyProvider as z };
|
|
@@ -588,7 +588,7 @@ type LoginWithCode = {
|
|
|
588
588
|
};
|
|
589
589
|
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
|
|
590
590
|
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
591
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain", "binance"];
|
|
591
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain", "binance", "bitkeep"];
|
|
592
592
|
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
593
593
|
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet", "base_account"];
|
|
594
594
|
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
@@ -666,6 +666,25 @@ type SolanaFundingConfig = {
|
|
|
666
666
|
/** The asset to fund with */
|
|
667
667
|
asset?: 'USDC' | 'native-currency';
|
|
668
668
|
};
|
|
669
|
+
/**
|
|
670
|
+
* Configuration for Standard Solana funding
|
|
671
|
+
*/
|
|
672
|
+
type SolanaStandardFundingConfig = {
|
|
673
|
+
/** The chain used for connections */
|
|
674
|
+
chain?: SolanaChain;
|
|
675
|
+
/** The default amount in SOL */
|
|
676
|
+
amount?: string;
|
|
677
|
+
/** The default funding method */
|
|
678
|
+
defaultFundingMethod?: DefaultFundingMethod;
|
|
679
|
+
card?: {
|
|
680
|
+
/** The preferred card provider for funding */
|
|
681
|
+
preferredProvider?: PreferredCardProvider;
|
|
682
|
+
};
|
|
683
|
+
/** Customization for the funding UIs */
|
|
684
|
+
uiConfig?: FundingUiConfig;
|
|
685
|
+
/** The asset to fund with */
|
|
686
|
+
asset?: 'SOL' | 'USDC';
|
|
687
|
+
};
|
|
669
688
|
/**
|
|
670
689
|
* Configuration for native funding amount.
|
|
671
690
|
*/
|
|
@@ -1277,7 +1296,7 @@ type PriceDisplayOptions = {
|
|
|
1277
1296
|
};
|
|
1278
1297
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'base_account' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1279
1298
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1280
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus';
|
|
1299
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus' | 'bitkeep';
|
|
1281
1300
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1282
1301
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1283
1302
|
type ExternalWalletsConfig = {
|
|
@@ -1526,6 +1545,17 @@ interface PrivyClientConfig {
|
|
|
1526
1545
|
privacyPolicyUrl?: string | null;
|
|
1527
1546
|
};
|
|
1528
1547
|
walletConnectCloudProjectId?: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* Custom redirect URL for OAuth flows, useful for mobile applications.
|
|
1550
|
+
* If not provided, defaults to window.location.href.
|
|
1551
|
+
*
|
|
1552
|
+
* For Capacitor/mobile apps, use a custom URL scheme like:
|
|
1553
|
+
* 'com.yourapp.oauth://callback' or 'yourapp://oauth'
|
|
1554
|
+
*
|
|
1555
|
+
* Make sure to register this URL scheme in your app configuration
|
|
1556
|
+
* and add it to your app's allowed URL schemes in the Privy dashboard.
|
|
1557
|
+
*/
|
|
1558
|
+
customOAuthRedirectUrl?: string;
|
|
1529
1559
|
/**
|
|
1530
1560
|
* A list of supported chains, used to specify which chains should be used throughout the application.
|
|
1531
1561
|
*
|
|
@@ -1988,6 +2018,7 @@ type AppConfig = {
|
|
|
1988
2018
|
};
|
|
1989
2019
|
fundingMethodConfig: NonNullable<PrivyClientConfig['fundingMethodConfig']>;
|
|
1990
2020
|
whatsAppEnabled: boolean;
|
|
2021
|
+
customOAuthRedirectUrl?: string;
|
|
1991
2022
|
solanaRpcs: Record<SolanaChain, {
|
|
1992
2023
|
rpc: Rpc<SolanaRpcApi>;
|
|
1993
2024
|
rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
@@ -2425,4 +2456,4 @@ type SessionSignerInput = {
|
|
|
2425
2456
|
policyIds?: string[];
|
|
2426
2457
|
}[];
|
|
2427
2458
|
|
|
2428
|
-
export { type
|
|
2459
|
+
export { type ConnectedWallet as $, type WalletClientType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectedWalletMetadata as D, type EthereumRpcRequestType as E, type FundingMethod as F, type PrivyClientConfig as G, type HDWalletWithMetadata as H, type ConnectorType as I, type SetBaseAccountSdkType as J, type WalletListEntry as K, type LoginMethod as L, type MfaMethod as M, type AppConfig as N, type OAuthTokens as O, PrivyErrorCode as P, type BaseConnectedWallet as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type ConnectWalletModalOptions as T, type User as U, type LoginModalOptions as V, type Wallet as W, type SetWalletRecoveryOptions as X, type SignTypedDataParams as Y, type UnsignedTransactionRequest as Z, type FundWalletConfig as _, type LinkedAccountWithMetadata as a, type Farcaster as a$, type CrossAppProviderDetails as a0, type OAuthProviderType as a1, type MoonpaySignRequest as a2, type MoonpaySignResponse as a3, type SmartWalletConfig as a4, type SiwsMessageType as a5, type ExternalWalletMetadata as a6, type TelegramAuthResult as a7, type TelegramWebAppData as a8, type OAuthUserInfo as a9, type Github as aA, type LinkedIn as aB, type Apple as aC, type Tiktok as aD, type Line as aE, type Telegram as aF, type CrossAppAccount as aG, type LinkedAccountType as aH, type GoogleOAuthWithMetadata as aI, type TwitterOAuthWithMetadata as aJ, type DiscordOAuthWithMetadata as aK, type GithubOAuthWithMetadata as aL, type TiktokOAuthWithMetadata as aM, type LineOAuthWithMetadata as aN, type LinkedInOAuthWithMetadata as aO, type AppleOAuthWithMetadata as aP, type FarcasterWithMetadata as aQ, type TelegramWithMetadata as aR, type CrossAppAccountWithMetadata as aS, type PasskeyWithMetadata as aT, type Email as aU, type Phone as aV, type TransactionUIOptions as aW, type ContractUIOptions as aX, type NativeFundingConfig as aY, type MoonpayFundingConfig as aZ, type PriceDisplayOptions as a_, type OAuthFlowState as aa, type LoginWithCode as ab, type OtpFlowState as ac, type PasskeyFlowState as ad, type SiweFlowState as ae, type BaseAccountSdkType as af, type UnsignedTransactionRequestWithChainId as ag, type BaseConnectedWalletType as ah, type SessionSignerInput as ai, type TelegramAuthFlowState as aj, type TypedMessage as ak, type MessageTypes as al, type SmartWallet as am, type MoonpayConfig as an, type MoonpayCurrencyCode as ao, type MoonpayPaymentMethod as ap, type Quantity as aq, type TransactionLog as ar, type TransactionReceipt as as, type NonEmptyArray as at, type EmailWithMetadata as au, type PhoneWithMetadata as av, type WalletWithMetadata as aw, type Google as ax, type Twitter as ay, type Discord as az, type BaseConnectedSolanaWallet as b, type Passkey as b0, type LoginMethodOrderOption as b1, type SiwsFlowState as b2, type UserRecoveryMethod as c, type SupportedSolanaTransaction as d, type SolanaCluster as e, type CreateWalletOptions as f, type LoginToFrame as g, type LoginToMiniApp as h, type SendTransactionModalUIOptions as i, type SignMessageModalUIOptions as j, type SolanaChain as k, type SolanaStandardWallet as l, type SolanaFundingConfig as m, type SolanaStandardFundingConfig as n, SolanaWalletConnector as o, type PrivyFarcasterSignerInitResponse as p, type MfaSubmitArgs as q, type SolanaRpcRequestType as r, type EthereumRpcResponseType as s, toSolanaWalletConnectors as t, type SolanaRpcResponseType as u, type EIP1193Provider as v, type EntropyIdVerifier as w, type RequestArguments as x, WalletConnector as y, PrivyProxyProvider as z };
|
package/dist/dts/ui.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions } from './types-B_DvyjIb.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain, Cluster } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|
package/dist/dts/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions } from './types-B_DvyjIb.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain, Cluster } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
2
|
-
import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-
|
|
2
|
+
import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-B_DvyjIb.js';
|
|
3
3
|
import { MouseEvent } from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
2
|
-
import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-
|
|
2
|
+
import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-B_DvyjIb.js';
|
|
3
3
|
import { MouseEvent } from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as
|
|
1
|
+
import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as r}from"@abstract-foundation/agw-client/actions";import{hexToNumber as t,createWalletClient as o,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as s,zksync as c}from"viem/chains";import{u as l,g as p,c as d}from"./use-sign-with-user-signer-CpL9I6iB.mjs";import{w as m,F as u,i as h,a as y,bq as g,br as I,bA as f,H as v}from"./privy-provider-BG8GtKO6.mjs";import{u as w}from"./internal-context-qdNgTV5f.mjs";import{g as C}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as T}from"./smart-wallets-CYfnJBkN.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-DCwuPDUk.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"zustand";import"@headlessui/react";import"lucide-react";import"@walletconnect/ethereum-provider";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/24/outline/WalletIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"qrcode";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function P(){let{user:P}=l(),{hideWalletUIs:S,openPrivyModal:b,chains:A,appId:W,rpcConfig:M,client:F}=w(),k=m(),{wallets:q}=u(),{setModalData:x}=h(),E=p(P),_=!!E&&d(E),R=async(r=s.id)=>{let l=C(q);if(!l)throw Error("No connected wallet found");let p="string"==typeof r?t(r):r;if(![s.id,2741,c.id].includes(p))throw Error("Error, only Abstract and ZKSync Era chains are supported");let d=A.find((e=>e.id===p));if(!d)throw Error("Chain not configured");await l.switchChain(d.id);let m=await l.getEthereumProvider(),u=o({account:l.address,transport:n(m)}),h=a({address:l.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:d,transport:i(v(d,M,W)),publicTransport:i(v(d,M,W)),signer:h})};return{signMessage:async({message:e},r)=>{let t=await R(r);return new Promise((async(r,o)=>{let{entropyId:n,entropyIdVerifier:i}=y(P);S.current=!0,x({connectWallet:{recoveryMethod:E.recoveryMethod,connectingWalletAddress:E.address,isUnifiedWallet:_,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:g,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>t.signMessage({message:e}),onSuccess:e=>r(e),onFailure:o,uiOptions:{isCancellable:!0}}}),b(I)})).finally((()=>{S.current=!1}))},signTypedData:async(e,r)=>{let t=await R(r);return new Promise((async(r,o)=>{S.current=!0;let{entropyId:n,entropyIdVerifier:i}=y(P);x({connectWallet:{recoveryMethod:E.recoveryMethod,connectingWalletAddress:E.address,isUnifiedWallet:_,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:g,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>t.signTypedData(e),onSuccess:e=>r(e),onFailure:o,uiOptions:{isCancellable:!0}}}),b(I)})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let t=await R(e.chainId),o=[],n="calls"in e&&void 0!==e.calls;return o=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=y(P);x({connectWallet:{recoveryMethod:E.recoveryMethod,connectingWalletAddress:E.address,isUnifiedWallet:_,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:f,onFailure:()=>{}},sendTransaction:{transactionRequests:T({calls:o,chain:t.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:t.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let o=n?r(t.account.address,e):e;return await t.prepareAbstractTransactionRequest(o)},scanTransaction:async()=>{if(!F)throw Error("Privy client not found");let o=n?r(t.account.address,e):e,i=await t.prepareAbstractTransactionRequest(o);return await F.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?t.sendTransactionBatch(e):t.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),b(I)})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let t=await R(e.chainId),o=[],n="calls"in e&&void 0!==e.calls;return o=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=y(P);x({connectWallet:{recoveryMethod:E.recoveryMethod,connectingWalletAddress:E.address,isUnifiedWallet:_,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:f,onFailure:()=>{}},sendTransaction:{transactionRequests:T({calls:o,chain:t.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:t.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let o=n?r(t.account.address,e):e;return await t.prepareAbstractTransactionRequest(o)},scanTransaction:async()=>{if(!F)throw Error("Privy client not found");let o=n?r(t.account.address,e):e,i=await t.prepareAbstractTransactionRequest(o);return await F.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let o=n?r(t.account.address,e):e,i=await t.prepareAbstractTransactionRequest(o);return t.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),b(I)})).finally((()=>{S.current=!1}))}}}export{P as useAbstractSmartWallets};
|