@privy-io/react-auth 1.91.0 → 1.92.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/getEmbeddedConnectedWallet.js +1 -1
- package/dist/cjs/index.js +315 -364
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/useFundWallet.js +66 -17
- package/dist/cjs/useWallets.js +1 -1
- package/dist/dts/index.d.mts +4 -4
- package/dist/dts/index.d.ts +4 -4
- package/dist/dts/solana.d.mts +2 -36
- package/dist/dts/solana.d.ts +2 -36
- package/dist/dts/{useSolanaWallets.d.mts → solana.d2.ts} +32 -2
- package/dist/dts/types.d.mts +5 -2
- package/dist/dts/types.d.ts +5 -2
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/getEmbeddedConnectedWallet.mjs +1 -1
- package/dist/esm/index.mjs +325 -374
- package/dist/esm/ui.mjs +22 -22
- package/dist/esm/useFundWallet.mjs +74 -25
- package/dist/esm/useWallets.mjs +1 -1
- package/package.json +2 -2
- package/dist/dts/useSolanaWallets.d.ts +0 -322
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { aG as PrivyErrorCode, U as User, L as LoginMethod, aH as LinkedAccountWithMetadata, O as OAuthTokens, g as BaseConnectedWallet, t as Wallet, x as MfaMethod, aI as UserRecoveryMethod, G as SolanaTransactionReceipt, C as Chain, aJ as FundingMethod, a6 as SolanaCluster, aF as ConnectedSolanaWallet, a0 as SolanaFundingConfig } from './types.js';
|
|
1
2
|
import { TransactionResponse } from '@ethersproject/providers';
|
|
2
|
-
import { aH as PrivyErrorCode, U as User, L as LoginMethod, aI as LinkedAccountWithMetadata, O as OAuthTokens, f as BaseConnectedWallet, s as Wallet, w as MfaMethod, aJ as UserRecoveryMethod, D as SolanaTransactionReceipt, C as Chain, aK as FundingMethod, a5 as SolanaCluster, aE as ConnectedSolanaWallet } from './types.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `CallbackError` optionally includes a second parameter with further error details.
|
|
@@ -319,4 +319,34 @@ interface UseSolanaWalletsInterface {
|
|
|
319
319
|
}
|
|
320
320
|
declare const useSolanaWallets: () => UseSolanaWalletsInterface;
|
|
321
321
|
|
|
322
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Method to fund a user's wallet via Privy's funding feature by inputting a valid wallet address.
|
|
324
|
+
* You can access the fields and methods documented here via the {@link useFundWallet} hook.
|
|
325
|
+
*/
|
|
326
|
+
interface UseFundSolanaWalletInterface {
|
|
327
|
+
/**
|
|
328
|
+
* Prompt the user to go through the funding flow and for a specified wallet.
|
|
329
|
+
*
|
|
330
|
+
* This will open the modal with a prompt for the user to select a funding method (if multiple are enabled).
|
|
331
|
+
*
|
|
332
|
+
* Once the user continues to the funding flow, Privy will display the funding status screen, and wait
|
|
333
|
+
* for the transaction to complete.
|
|
334
|
+
*
|
|
335
|
+
* Note: Even after a successful funding, funds can take a few minutes to arrive in the user's wallet.
|
|
336
|
+
*
|
|
337
|
+
* Privy currently supports funding via external wallets and Moonpay.
|
|
338
|
+
*
|
|
339
|
+
* @param address typed data payload to be signed
|
|
340
|
+
* @param fundWalletConfig {@link SolanaFundingConfig} Funding configuration to specify chain and funding amount (if enabled)
|
|
341
|
+
*/
|
|
342
|
+
fundWallet: (address: string, fundWalletConfig?: SolanaFundingConfig) => Promise<void>;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Hook to fund a wallet via Privy's fiat on-ramp integration given the wallet address.
|
|
346
|
+
*
|
|
347
|
+
* @param callbacks.onUserExited {@link PrivyEvents} Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
348
|
+
* @returns fundWallet - function to on-ramp funds to any given wallet
|
|
349
|
+
*/
|
|
350
|
+
declare const useFundWallet: (callbacks?: PrivyEvents["fundSolanaWallet"]) => UseFundSolanaWalletInterface;
|
|
351
|
+
|
|
352
|
+
export { type CallbackError as C, type PrivyEvents as P, type UseSolanaWalletsInterface as U, type UseFundSolanaWalletInterface as a, useFundWallet as b, useSolanaWallets as u };
|
package/dist/dts/types.d.mts
CHANGED
|
@@ -767,7 +767,10 @@ type SolanaTransactionReceipt = {
|
|
|
767
767
|
fees: bigint;
|
|
768
768
|
};
|
|
769
769
|
type SolanaCluster = {
|
|
770
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* The network name
|
|
772
|
+
* Refer to {@link https://solana-labs.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
|
|
773
|
+
* */
|
|
771
774
|
name: Cluster;
|
|
772
775
|
/** The RPC endpoint */
|
|
773
776
|
rpcUrl?: string;
|
|
@@ -2353,4 +2356,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
|
|
|
2353
2356
|
type SolanaRpcRequestType = solana_signMessage;
|
|
2354
2357
|
type SolanaRpcResponseType = solana_signMessageResponse;
|
|
2355
2358
|
|
|
2356
|
-
export { type
|
|
2359
|
+
export { type MessageTypes as $, type TransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type SupportedSolanaTransaction as D, Embedded1193Provider as E, type FundWalletConfig as F, type SolanaTransactionReceipt as G, type ConnectedWallet as H, type PrivyIframeErrorTypesType as I, type OAuthFlowState as J, type LoginWithCode as K, type LoginMethod as L, type MoonpaySignRequest as M, type OtpFlowState as N, type OAuthTokens as O, PrivyProxyProvider as P, type PasskeyFlowState as Q, type RuntimeLoginOverridableOptions as R, SolanaWalletConnector as S, type TelegramAuthResult as T, type User as U, type SiweFlowState as V, WalletConnector as W, type UnsignedTransactionRequestWithChainId as X, type CustomAuthFlowState as Y, AsExternalProvider as Z, type TypedMessage as _, type RpcConfig as a, type SolanaFundingConfig as a0, type MoonpayConfig as a1, type MoonpayCurrencyCode as a2, type MoonpayPaymentMethod as a3, type Quantity as a4, type TransactionLog as a5, type SolanaCluster as a6, type NonEmptyArray as a7, type EmailWithMetadata as a8, type PhoneWithMetadata as a9, type MoonpayFundingConfig as aA, type PriceDisplayOptions as aB, type Farcaster as aC, type Passkey as aD, type LoginMethodOrderOption as aE, type ConnectedSolanaWallet as aF, PrivyErrorCode as aG, type LinkedAccountWithMetadata as aH, type UserRecoveryMethod as aI, type FundingMethod as aJ, toSolanaWalletConnectors as aK, type WalletWithMetadata as aa, type Google as ab, type Twitter as ac, type Discord as ad, type Github as ae, type LinkedIn as af, type Apple as ag, type Tiktok as ah, type Telegram as ai, type CrossAppAccount as aj, type GoogleOAuthWithMetadata as ak, type TwitterOAuthWithMetadata as al, type DiscordOAuthWithMetadata as am, type GithubOAuthWithMetadata as an, type TiktokOAuthWithMetadata as ao, type LinkedInOAuthWithMetadata as ap, type AppleOAuthWithMetadata as aq, type FarcasterWithMetadata as ar, type TelegramWithMetadata as as, type CrossAppAccountWithMetadata as at, type PasskeyWithMetadata as au, type Email as av, type Phone as aw, type TransactionUIOptions as ax, type ContractUIOptions as ay, type NativeFundingConfig as az, type WalletClientType as b, type ConnectedWalletMetadata as c, type ConnectorType as d, type WalletListEntry as e, type ExternalWalletsConfig as f, type BaseConnectedWallet as g, type EIP1193Provider as h, type OAuthProviderType as i, type MoonpaySignResponse as j, type SmartWalletConfig as k, type PrivyServerConfig as l, type PrivyFarcasterSignerInitResponse as m, type SiweWalletMetadata as n, type OAuthUserInfo as o, type PrivyClientConfig as p, type ConnectWalletModalOptions as q, type LoginModalOptions as r, type CreateWalletOptions as s, type Wallet as t, type SetWalletRecoveryOptions as u, type SignMessageModalUIOptions as v, type SignTypedDataParams as w, type MfaMethod as x, type UnsignedTransactionRequest as y, type SendTransactionModalUIOptions as z };
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -767,7 +767,10 @@ type SolanaTransactionReceipt = {
|
|
|
767
767
|
fees: bigint;
|
|
768
768
|
};
|
|
769
769
|
type SolanaCluster = {
|
|
770
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* The network name
|
|
772
|
+
* Refer to {@link https://solana-labs.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
|
|
773
|
+
* */
|
|
771
774
|
name: Cluster;
|
|
772
775
|
/** The RPC endpoint */
|
|
773
776
|
rpcUrl?: string;
|
|
@@ -2353,4 +2356,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
|
|
|
2353
2356
|
type SolanaRpcRequestType = solana_signMessage;
|
|
2354
2357
|
type SolanaRpcResponseType = solana_signMessageResponse;
|
|
2355
2358
|
|
|
2356
|
-
export { type
|
|
2359
|
+
export { type MessageTypes as $, type TransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type SupportedSolanaTransaction as D, Embedded1193Provider as E, type FundWalletConfig as F, type SolanaTransactionReceipt as G, type ConnectedWallet as H, type PrivyIframeErrorTypesType as I, type OAuthFlowState as J, type LoginWithCode as K, type LoginMethod as L, type MoonpaySignRequest as M, type OtpFlowState as N, type OAuthTokens as O, PrivyProxyProvider as P, type PasskeyFlowState as Q, type RuntimeLoginOverridableOptions as R, SolanaWalletConnector as S, type TelegramAuthResult as T, type User as U, type SiweFlowState as V, WalletConnector as W, type UnsignedTransactionRequestWithChainId as X, type CustomAuthFlowState as Y, AsExternalProvider as Z, type TypedMessage as _, type RpcConfig as a, type SolanaFundingConfig as a0, type MoonpayConfig as a1, type MoonpayCurrencyCode as a2, type MoonpayPaymentMethod as a3, type Quantity as a4, type TransactionLog as a5, type SolanaCluster as a6, type NonEmptyArray as a7, type EmailWithMetadata as a8, type PhoneWithMetadata as a9, type MoonpayFundingConfig as aA, type PriceDisplayOptions as aB, type Farcaster as aC, type Passkey as aD, type LoginMethodOrderOption as aE, type ConnectedSolanaWallet as aF, PrivyErrorCode as aG, type LinkedAccountWithMetadata as aH, type UserRecoveryMethod as aI, type FundingMethod as aJ, toSolanaWalletConnectors as aK, type WalletWithMetadata as aa, type Google as ab, type Twitter as ac, type Discord as ad, type Github as ae, type LinkedIn as af, type Apple as ag, type Tiktok as ah, type Telegram as ai, type CrossAppAccount as aj, type GoogleOAuthWithMetadata as ak, type TwitterOAuthWithMetadata as al, type DiscordOAuthWithMetadata as am, type GithubOAuthWithMetadata as an, type TiktokOAuthWithMetadata as ao, type LinkedInOAuthWithMetadata as ap, type AppleOAuthWithMetadata as aq, type FarcasterWithMetadata as ar, type TelegramWithMetadata as as, type CrossAppAccountWithMetadata as at, type PasskeyWithMetadata as au, type Email as av, type Phone as aw, type TransactionUIOptions as ax, type ContractUIOptions as ay, type NativeFundingConfig as az, type WalletClientType as b, type ConnectedWalletMetadata as c, type ConnectorType as d, type WalletListEntry as e, type ExternalWalletsConfig as f, type BaseConnectedWallet as g, type EIP1193Provider as h, type OAuthProviderType as i, type MoonpaySignResponse as j, type SmartWalletConfig as k, type PrivyServerConfig as l, type PrivyFarcasterSignerInitResponse as m, type SiweWalletMetadata as n, type OAuthUserInfo as o, type PrivyClientConfig as p, type ConnectWalletModalOptions as q, type LoginModalOptions as r, type CreateWalletOptions as s, type Wallet as t, type SetWalletRecoveryOptions as u, type SignMessageModalUIOptions as v, type SignTypedDataParams as w, type MfaMethod as x, type UnsignedTransactionRequest as y, type SendTransactionModalUIOptions 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 {
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions } from './types.js';
|
|
3
3
|
import '@metamask/eth-sig-util';
|
|
4
4
|
import '@ethersproject/providers';
|
|
5
5
|
import 'eventemitter3';
|
package/dist/dts/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions } from './types.js';
|
|
3
3
|
import '@metamask/eth-sig-util';
|
|
4
4
|
import '@ethersproject/providers';
|
|
5
5
|
import 'eventemitter3';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isHex as E,numberToHex as _,encodeAbiParameters as N,parseAbiParameters as e,createPublicClient as A,http as S,pad as a}from"viem";import{sendRawTransaction as T}from"viem/actions";import{abstractTestnet as R}from"viem/chains";import{n as C,u as t,h as
|
|
1
|
+
import{isHex as E,numberToHex as _,encodeAbiParameters as N,parseAbiParameters as e,createPublicClient as A,http as S,pad as a}from"viem";import{sendRawTransaction as T}from"viem/actions";import{abstractTestnet as R}from"viem/chains";import{n as C,u as t,h as I}from"./privy-context.mjs";import{jsx as D,jsxs as n}from"react/jsx-runtime";import{useState as L,useEffect as O,useRef as s,useContext as r,createContext as i}from"react";import{z as o,ap as l,b as c}from"./useWallets.mjs";function M({src:E,..._}){return D("img",{src:E,..._,style:{display:"none"}})}var W,m;(W=m||(m={})).LANDING="LANDING",W.CONNECT_OR_CREATE="CONNECT_OR_CREATE",W.AWAITING_CONNECTION="AWAITING_CONNECTION",W.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",W.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",W.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",W.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",W.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",W.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",W.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",W.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",W.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",W.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",W.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",W.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",W.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",W.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",W.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",W.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",W.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",W.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",W.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",W.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",W.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",W.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",W.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",W.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",W.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",W.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",W.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",W.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",W.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",W.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",W.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",W.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",W.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",W.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",W.INSTALL_PHANTOM_SCREEN="INSTALL_PHANTOM_SCREEN",W.PHANTOM_INTERSTITIAL_SCREEN="PHANTOM_INTERSTITIAL_SCREEN",W.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",W.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",W.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",W.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",W.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",W.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",W.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",W.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",W.MOONPAY_PROMPT_SCREEN="MOONPAY_PROMPT_SCREEN",W.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",W.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",W.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",W.CAPTCHA_SCREEN="CAPTCHA_SCREEN",W.ERROR_SCREEN="ERROR_SCREEN",W.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",W.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",W.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN";const G=i({ready:!1,app:l,currentScreen:null,lastScreen:null,navigate:C,navigateBack:C,resetNavigation:C,setModalData:C,onUserCloseViaDialogOrKeybindRef:void 0});let P=[m.LANDING,m.CONNECT_ONLY_LANDING_SCREEN,null];const p=E=>{let _=o(),N=E.authenticated,[e,A]=L(E.initialScreen);O((()=>{N||P.includes(E.initialScreen)||E.setInitialScreen(null)}),[N]);let S=s(null);O((()=>{E.open||(S.current=null)}),[E.open]),O((()=>{S.current=null}),[E.initialScreen]);let a={ready:!!_.id,app:_,data:E.data,setModalData:E.setModalData,currentScreen:E.initialScreen,lastScreen:e,navigate:(_,N=!0)=>{E.setInitialScreen(_),N&&A(E.initialScreen)},navigateBack:()=>{E.setInitialScreen(e)},resetNavigation:()=>{E.setInitialScreen(null),A(null)},onUserCloseViaDialogOrKeybindRef:S};return n(G.Provider,{value:a,children:[("string"==typeof _.appearance.logo||"img"===_.appearance.logo?.type)&&D(M,{src:"string"==typeof _.appearance.logo?_.appearance.logo:_.appearance.logo.props.src}),E.children]})},g=()=>r(G);function d(E){return E?a(_(BigInt(E)),{dir:"left",size:20}):"0x"}function F(){let{noPromptOnSignature:a,openPrivyModal:C,chains:D}=t(),{signTypedData:n}=I(),{setModalData:L}=g(),O=D.find((E=>E.id===R.id));return{sendTransaction:(R,t,I,D,s)=>{t.to=d(t.to);let r=c(((E,_)=>{let N="string"==typeof E?JSON.parse(E):E,e=_.custom?.getEip712Domain?.({...N,chainId:_.id,from:N.from,type:"eip712"});return e.domain.name="zkSync",Object.entries(e.message).forEach((([E,_])=>{"bigint"==typeof _&&(e.message[E]=String(_))})),e})(t,O));return new Promise((async(i,o)=>{a.current=!0,L({connectWallet:{onCompleteNavigateTo:m.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:I.map((N=>({to:d(r.message.to),value:"string"==typeof N.value?E(N.value)?N.value:_(BigInt(N.value)):N.value,data:N.data??"0x",chainId:r.domain.chainId,maxPriorityFeePerGas:BigInt(r.message.maxPriorityFeePerGas),maxFeePerGas:BigInt(r.message.maxFeePerGas),gasLimit:BigInt(r.message.gasLimit),nonce:r.message.nonce}))),rootWallet:{address:R.address},transactingWallet:{address:R.address,walletIndex:null},getIsSponsored:async()=>Number(r.message.paymaster)>0,onConfirm:async()=>{let E=await n(r),a={to:BigInt(r.message.to),value:BigInt(r.message.value),data:r.message.data??void 0,chainId:r.domain.chainId,maxPriorityFeePerGas:BigInt(r.message.maxPriorityFeePerGas),maxFeePerGas:BigInt(r.message.maxFeePerGas),gas:BigInt(r.message.gasLimit),paymaster:d(r.message.paymaster),paymasterInput:r.message.paymasterInput},R=N(e(["bytes","address","bytes[]"]),[E,"0xC894DE2894e2F84C0C2944FDcce9490eC22A92b6",[]]),C={...a,factoryDeps:t.factoryDeps,to:d(r.message.to),chainId:O.id,from:_(BigInt(r.message.from)),customSignature:R,type:"eip712",data:r.message.data,nonce:Number(r.message.nonce)},I=O.serializers?.transaction(C,{r:"0x0",s:"0x0",v:0n}),L=A({chain:O,transport:S(`https://abs-testnet.rpc.privy.systems?privyAppId=${D}`)});return await T(L,{serializedTransaction:I})},onSuccess:E=>i(E.hash),onFailure:o,uiOptions:s}}),C(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{a.current=!1}))}}}function u(E){return E.find((E=>"privy"===E.walletClientType&&"embedded"===E.connectorType&&!E.imported))??null}export{m as M,p as a,F as b,u as g,g as u};
|