@naculus/connect-appkit-react 0.4.0 → 0.6.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/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as _naculus_connect_core from '@naculus/connect-core';
2
- import { UniversalWalletSession, SentDelegation, DelegationStatus, ExecutionPlan, AtomicityRequirement, BatchCall, SessionKeyManagerConfig, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, TokenConfig, NameResolverConfig, NameResult, InAppChannel, NotificationItem, NotificationSettings, PassphraseRequest, PassphraseGate, AddressResult, ExecutionStrategy, CallsStatus, Address as Address$1, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ActiveSessionBundle, ChainSession, SmartAccountInfo, SolanaBalance, SolanaConfirmationStatus, SessionManager, TokenListSource, TokenListEntry, TokenSearchResult } from '@naculus/connect-core';
2
+ import { UniversalWalletSession, SessionStorage, SentDelegation, SolanaSessionKeyInfo, SolanaSessionKeyScope, DelegationStatus, ExecutionPlan, AtomicityRequirement, BatchCall, SessionKeyManagerConfig, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, TokenConfig, NameResolverConfig, NameResult, InAppChannel, NotificationItem, NotificationSettings, PassphraseRequest, PassphraseGate, AddressResult, ExecutionStrategy, CallsStatus, Address as Address$1, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ActiveSessionBundle, ChainSession, SmartAccountInfo, SolanaBalance, SolanaConfirmationStatus, SessionManager, TokenListSource, TokenListEntry, TokenSearchResult } from '@naculus/connect-core';
3
3
  export { LAMPORTS_PER_SOL, PassphraseCancelledError, PassphraseGate, PassphraseIntent, PassphraseRequest, SolanaBalance, SolanaConfirmationStatus, SolanaRpcError, formatSol, getLatestBlockhash, getSignatureStatus, getSolanaBalance, parseSol } from '@naculus/connect-core';
4
4
  import { PocketConfig, WalletAccount, WalletNamespace, WalletData, StorageSecurityReport } from '@naculus/connector-embedded';
5
5
  export { StorageSecurityFinding, StorageSecurityReport, WalletAccount, WalletData, WalletNamespace } from '@naculus/connector-embedded';
6
6
  import * as _naculus_connect_appkit_core from '@naculus/connect-appkit-core';
7
- import { CompareCostsInput, CostComparison, CompareCosts, ExecuteRouteError, ExecuteRouteOptions, ExecutableQuote, ExecuteRouteResult, ExecuteRoute, RouteQuote, RouteQuoteOptions, RouteQuoteInput, GetRouteQuotes, Web3State, WalletChain, ChainCapabilities, AtomicSupport, ChainInfo, PaymentFetch, PaymentRecord, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, NotificationSettingsStorage, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, AddressValidationLevel } from '@naculus/connect-appkit-core';
7
+ import { CompareCostsInput, CostComparison, CompareCosts, ExecuteRouteError, ExecuteRouteOptions, ExecutableQuote, ExecuteRouteResult, ExecuteRoute, RouteQuote, RouteQuoteOptions, RouteQuoteInput, GetRouteQuotes, Web3State, WalletChain, ChainCapabilities, AtomicSupport, ChainInfo, PaymentFetch, PaymentRecord, SolanaSessionKeyFlowDeps, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, NotificationSettingsStorage, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, AddressValidationLevel } from '@naculus/connect-appkit-core';
8
8
  export { AddressValidationLevel, AtomicSupport, ChainCapabilities, ChainInfo, ConnectionStatus, CostComparison, CostComparisonOperation, CostComparisonOptions, DelegationPolicyPreview, ExecuteRouteResult, PolicyExecutionAdapter, PolicyExecutionCheck, PolicyExecutionRoute, PolicyExecutionSubmission, PreparedPolicyExecution, SolanaIdentity, SolanaPayer, SolanaRoles, SolanaRolesAbsence, SolanaSigner, SolanaWalletFeatures, WalletChain, Web3State, buildDelegationPolicyMessage } from '@naculus/connect-appkit-core';
9
- import { Web3Client } from './client.cjs';
9
+ import { NativeWalletConnectOptions, InjectedProviderRegistration, Web3Client } from './client.cjs';
10
10
  export { ClientConfig, clearClient, createClient, getClient } from './client.cjs';
11
11
  import { Address, PublicClient, WalletClient } from 'viem';
12
12
  import { SimulationResult } from '@naculus/wallet-engine';
@@ -193,6 +193,17 @@ interface Web3ConnectConfig {
193
193
  * When omitted, existing backward-compatible plaintext storage is used.
194
194
  */
195
195
  encryptionKey?: string;
196
+ /**
197
+ * Where the connected session persists. Defaults to localStorage; React
198
+ * Native supplies an AsyncStorage-backed one (`@naculus/connect-native`).
199
+ */
200
+ sessionStorage?: SessionStorage;
201
+ /** See `ClientConfig.walletConnect`. */
202
+ walletConnect?: NativeWalletConnectOptions;
203
+ /** See `ClientConfig.solanaWallets`. */
204
+ solanaWallets?: readonly unknown[];
205
+ /** See `ClientConfig.injectedProviders`. */
206
+ injectedProviders?: readonly InjectedProviderRegistration[];
196
207
  }
197
208
  interface Web3Actions {
198
209
  startPairing: () => Promise<string>;
@@ -363,6 +374,32 @@ interface UsePaymentFetchReturn {
363
374
  */
364
375
  declare function usePaymentFetch(pay: PaymentFetch): UsePaymentFetchReturn;
365
376
 
377
+ interface UseSolanaSessionKeyReturn {
378
+ /** The connected owner's keys, newest first. */
379
+ keys: SolanaSessionKeyInfo[];
380
+ /** Create a key; the owner's wallet approves it once. */
381
+ create: (scope: SolanaSessionKeyScope) => Promise<{
382
+ key: SolanaSessionKeyInfo;
383
+ signature: string;
384
+ }>;
385
+ /** Stop a key; the owner's wallet signs the on-chain Revoke. */
386
+ revoke: (id: string) => Promise<{
387
+ signature: string;
388
+ }>;
389
+ refresh: () => Promise<void>;
390
+ isPending: boolean;
391
+ error: Error | null;
392
+ }
393
+ /**
394
+ * Solana session keys that pay x402 / MPP without a prompt (pass
395
+ * `{ sessionKey: { manager, id }, rpc }` to the paying fetch). The app owns
396
+ * the `SolanaSessionKeyManager` and the RPC; `owner` is the connected
397
+ * wallet's Solana signer role. Keep `manager`, `rpc` and `owner` stable
398
+ * (module scope or `useMemo`): a new object each render rebuilds the flow
399
+ * and refetches the keys every render.
400
+ */
401
+ declare function useSolanaSessionKey(deps: SolanaSessionKeyFlowDeps | null): UseSolanaSessionKeyReturn;
402
+
366
403
  interface UseDelegationReturn extends DelegationStatus {
367
404
  isFetching: boolean;
368
405
  error: Error | null;
@@ -734,7 +771,7 @@ interface TxMonitorLike {
734
771
  on(event: "statusChange", listener: (entry: TxStatusEntry) => void): this;
735
772
  on(event: "confirmed", listener: (entry: TxStatusEntry) => void): this;
736
773
  on(event: "failed", listener: (entry: TxStatusEntry) => void): this;
737
- off(event: string, listener: Function): this;
774
+ off(event: string, listener: (entry: TxStatusEntry) => void): this;
738
775
  }
739
776
  declare const TxMonitorContext: React.Context<TxMonitorLike | null>;
740
777
  interface UseTxMonitorResult {
@@ -2076,4 +2113,4 @@ declare const AppkitToggleGroup: StencilReactComponent<AppkitToggleGroup$1, Appk
2076
2113
  type AppkitTooltipEvents = NonNullable<unknown>;
2077
2114
  declare const AppkitTooltip: StencilReactComponent<AppkitTooltip$1, AppkitTooltipEvents, Components.AppkitTooltip>;
2078
2115
 
2079
- export { type AddressValidationResult, AppkitAccordion, type AppkitAccordionEvents, AppkitAccountButton, type AppkitAccountButtonEvents, AppkitAlertDialog, type AppkitAlertDialogEvents, AppkitAvatar, type AppkitAvatarEvents, AppkitBadge, type AppkitBadgeEvents, AppkitButton, type AppkitButtonEvents, AppkitCard, AppkitCardContent, type AppkitCardContentEvents, AppkitCardDescription, type AppkitCardDescriptionEvents, type AppkitCardEvents, AppkitCardFooter, type AppkitCardFooterEvents, AppkitCardHeader, type AppkitCardHeaderEvents, AppkitCardTitle, type AppkitCardTitleEvents, AppkitCheckbox, type AppkitCheckboxEvents, AppkitCollapsible, type AppkitCollapsibleEvents, AppkitConnectButton, type AppkitConnectButtonEvents, AppkitDialog, type AppkitDialogEvents, AppkitDropdownMenu, type AppkitDropdownMenuEvents, AppkitInput, type AppkitInputEvents, AppkitPopover, type AppkitPopoverEvents, AppkitProgress, type AppkitProgressEvents, AppkitScrollArea, type AppkitScrollAreaEvents, AppkitSelect, type AppkitSelectEvents, AppkitSeparator, type AppkitSeparatorEvents, AppkitSkeleton, type AppkitSkeletonEvents, AppkitSwitch, type AppkitSwitchEvents, AppkitTabs, type AppkitTabsEvents, AppkitToggleGroup, type AppkitToggleGroupEvents, AppkitTooltip, type AppkitTooltipEvents, DEFAULT_EVM_CHAINS, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteError, type ExecuteOptions, type ExecutionPreview, type ExecutionRoute, type Locale, type Quote, type QuoteOptions, type SIWxConfig, type SendCallsStatus, type TokenBalanceResult, type TokenInfo, TokenSelector, type TokenSelectorProps, TxMonitorContext, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseCapabilitiesReturn, type UseCompareCostsInput, type UseCompareCostsReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseERC20AllowanceOptions, type UseERC20AllowanceReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxResult, type UseLookupAddressOptions, type UseLookupAddressResult, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameOptions, type UseResolveNameResult, type UseRevokeSessionReturn, type UseRouteQuoteInput, type UseRouteQuoteReturn, type UseSIWxLoginOptions, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXOptions, type UseSignInWithXReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceOptions, type UseSolanaBalanceReturn, type UseSolanaRolesReturn, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchReturn, type UseTransactionSimulationReturn, type UseTxHistoryResult, type UseTxMonitorResult, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationOptions, type UseValidateDestinationReturn, type UseWalletReturn, type UseWeb3ErrorHandlerReturn, type UserFriendlyError, type UserOpStatus, WALLET_ERROR_DESCRIPTIONS, WALLET_ERROR_TITLES, type Web3Actions, Web3Client, type Web3ConnectConfig, Web3ConnectProvider, type Web3ConnectProviderProps, Web3Context, getChainById, getDefaultChains, getLocale, getUserFriendlyError, isRetryableError, resetSessionKeyManager, setLocale, t, useAccount, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Allowance, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useNotification, usePassphraseGate, usePaymentFetch, useResolveName, useRevokeSession, useRouteQuote, useSIWxLogin, useSIWxSession, useSendCalls, useSendTransaction, useSendUserOperation, useSendWithSession, useSession, useSessionKeys, useSignInWithEthereum, useSignInWithX, useSignMessage, useSimulateTransfer, useSiwxAuthSession, useSmartAccount, useSolanaAccount, useSolanaBalance, useSolanaRoles, useSolanaTransaction, useSwitchChain, useTokenBalance, useTokenList, useTokenSearch, useTransactionSimulation, useTxHistory, useTxMonitor, useUserOpStatus, useValidateDestination, useViemClient, useWallet, useWeb3, useWeb3ErrorHandler, validateDestination };
2116
+ export { type AddressValidationResult, AppkitAccordion, type AppkitAccordionEvents, AppkitAccountButton, type AppkitAccountButtonEvents, AppkitAlertDialog, type AppkitAlertDialogEvents, AppkitAvatar, type AppkitAvatarEvents, AppkitBadge, type AppkitBadgeEvents, AppkitButton, type AppkitButtonEvents, AppkitCard, AppkitCardContent, type AppkitCardContentEvents, AppkitCardDescription, type AppkitCardDescriptionEvents, type AppkitCardEvents, AppkitCardFooter, type AppkitCardFooterEvents, AppkitCardHeader, type AppkitCardHeaderEvents, AppkitCardTitle, type AppkitCardTitleEvents, AppkitCheckbox, type AppkitCheckboxEvents, AppkitCollapsible, type AppkitCollapsibleEvents, AppkitConnectButton, type AppkitConnectButtonEvents, AppkitDialog, type AppkitDialogEvents, AppkitDropdownMenu, type AppkitDropdownMenuEvents, AppkitInput, type AppkitInputEvents, AppkitPopover, type AppkitPopoverEvents, AppkitProgress, type AppkitProgressEvents, AppkitScrollArea, type AppkitScrollAreaEvents, AppkitSelect, type AppkitSelectEvents, AppkitSeparator, type AppkitSeparatorEvents, AppkitSkeleton, type AppkitSkeletonEvents, AppkitSwitch, type AppkitSwitchEvents, AppkitTabs, type AppkitTabsEvents, AppkitToggleGroup, type AppkitToggleGroupEvents, AppkitTooltip, type AppkitTooltipEvents, DEFAULT_EVM_CHAINS, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteError, type ExecuteOptions, type ExecutionPreview, type ExecutionRoute, InjectedProviderRegistration, type Locale, NativeWalletConnectOptions, type Quote, type QuoteOptions, type SIWxConfig, type SendCallsStatus, type TokenBalanceResult, type TokenInfo, TokenSelector, type TokenSelectorProps, TxMonitorContext, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseCapabilitiesReturn, type UseCompareCostsInput, type UseCompareCostsReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseERC20AllowanceOptions, type UseERC20AllowanceReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxResult, type UseLookupAddressOptions, type UseLookupAddressResult, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameOptions, type UseResolveNameResult, type UseRevokeSessionReturn, type UseRouteQuoteInput, type UseRouteQuoteReturn, type UseSIWxLoginOptions, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXOptions, type UseSignInWithXReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceOptions, type UseSolanaBalanceReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchReturn, type UseTransactionSimulationReturn, type UseTxHistoryResult, type UseTxMonitorResult, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationOptions, type UseValidateDestinationReturn, type UseWalletReturn, type UseWeb3ErrorHandlerReturn, type UserFriendlyError, type UserOpStatus, WALLET_ERROR_DESCRIPTIONS, WALLET_ERROR_TITLES, type Web3Actions, Web3Client, type Web3ConnectConfig, Web3ConnectProvider, type Web3ConnectProviderProps, Web3Context, getChainById, getDefaultChains, getLocale, getUserFriendlyError, isRetryableError, resetSessionKeyManager, setLocale, t, useAccount, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Allowance, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useNotification, usePassphraseGate, usePaymentFetch, useResolveName, useRevokeSession, useRouteQuote, useSIWxLogin, useSIWxSession, useSendCalls, useSendTransaction, useSendUserOperation, useSendWithSession, useSession, useSessionKeys, useSignInWithEthereum, useSignInWithX, useSignMessage, useSimulateTransfer, useSiwxAuthSession, useSmartAccount, useSolanaAccount, useSolanaBalance, useSolanaRoles, useSolanaSessionKey, useSolanaTransaction, useSwitchChain, useTokenBalance, useTokenList, useTokenSearch, useTransactionSimulation, useTxHistory, useTxMonitor, useUserOpStatus, useValidateDestination, useViemClient, useWallet, useWeb3, useWeb3ErrorHandler, validateDestination };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as _naculus_connect_core from '@naculus/connect-core';
2
- import { UniversalWalletSession, SentDelegation, DelegationStatus, ExecutionPlan, AtomicityRequirement, BatchCall, SessionKeyManagerConfig, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, TokenConfig, NameResolverConfig, NameResult, InAppChannel, NotificationItem, NotificationSettings, PassphraseRequest, PassphraseGate, AddressResult, ExecutionStrategy, CallsStatus, Address as Address$1, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ActiveSessionBundle, ChainSession, SmartAccountInfo, SolanaBalance, SolanaConfirmationStatus, SessionManager, TokenListSource, TokenListEntry, TokenSearchResult } from '@naculus/connect-core';
2
+ import { UniversalWalletSession, SessionStorage, SentDelegation, SolanaSessionKeyInfo, SolanaSessionKeyScope, DelegationStatus, ExecutionPlan, AtomicityRequirement, BatchCall, SessionKeyManagerConfig, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, TokenConfig, NameResolverConfig, NameResult, InAppChannel, NotificationItem, NotificationSettings, PassphraseRequest, PassphraseGate, AddressResult, ExecutionStrategy, CallsStatus, Address as Address$1, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ActiveSessionBundle, ChainSession, SmartAccountInfo, SolanaBalance, SolanaConfirmationStatus, SessionManager, TokenListSource, TokenListEntry, TokenSearchResult } from '@naculus/connect-core';
3
3
  export { LAMPORTS_PER_SOL, PassphraseCancelledError, PassphraseGate, PassphraseIntent, PassphraseRequest, SolanaBalance, SolanaConfirmationStatus, SolanaRpcError, formatSol, getLatestBlockhash, getSignatureStatus, getSolanaBalance, parseSol } from '@naculus/connect-core';
4
4
  import { PocketConfig, WalletAccount, WalletNamespace, WalletData, StorageSecurityReport } from '@naculus/connector-embedded';
5
5
  export { StorageSecurityFinding, StorageSecurityReport, WalletAccount, WalletData, WalletNamespace } from '@naculus/connector-embedded';
6
6
  import * as _naculus_connect_appkit_core from '@naculus/connect-appkit-core';
7
- import { CompareCostsInput, CostComparison, CompareCosts, ExecuteRouteError, ExecuteRouteOptions, ExecutableQuote, ExecuteRouteResult, ExecuteRoute, RouteQuote, RouteQuoteOptions, RouteQuoteInput, GetRouteQuotes, Web3State, WalletChain, ChainCapabilities, AtomicSupport, ChainInfo, PaymentFetch, PaymentRecord, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, NotificationSettingsStorage, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, AddressValidationLevel } from '@naculus/connect-appkit-core';
7
+ import { CompareCostsInput, CostComparison, CompareCosts, ExecuteRouteError, ExecuteRouteOptions, ExecutableQuote, ExecuteRouteResult, ExecuteRoute, RouteQuote, RouteQuoteOptions, RouteQuoteInput, GetRouteQuotes, Web3State, WalletChain, ChainCapabilities, AtomicSupport, ChainInfo, PaymentFetch, PaymentRecord, SolanaSessionKeyFlowDeps, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, NotificationSettingsStorage, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, AddressValidationLevel } from '@naculus/connect-appkit-core';
8
8
  export { AddressValidationLevel, AtomicSupport, ChainCapabilities, ChainInfo, ConnectionStatus, CostComparison, CostComparisonOperation, CostComparisonOptions, DelegationPolicyPreview, ExecuteRouteResult, PolicyExecutionAdapter, PolicyExecutionCheck, PolicyExecutionRoute, PolicyExecutionSubmission, PreparedPolicyExecution, SolanaIdentity, SolanaPayer, SolanaRoles, SolanaRolesAbsence, SolanaSigner, SolanaWalletFeatures, WalletChain, Web3State, buildDelegationPolicyMessage } from '@naculus/connect-appkit-core';
9
- import { Web3Client } from './client.js';
9
+ import { NativeWalletConnectOptions, InjectedProviderRegistration, Web3Client } from './client.js';
10
10
  export { ClientConfig, clearClient, createClient, getClient } from './client.js';
11
11
  import { Address, PublicClient, WalletClient } from 'viem';
12
12
  import { SimulationResult } from '@naculus/wallet-engine';
@@ -193,6 +193,17 @@ interface Web3ConnectConfig {
193
193
  * When omitted, existing backward-compatible plaintext storage is used.
194
194
  */
195
195
  encryptionKey?: string;
196
+ /**
197
+ * Where the connected session persists. Defaults to localStorage; React
198
+ * Native supplies an AsyncStorage-backed one (`@naculus/connect-native`).
199
+ */
200
+ sessionStorage?: SessionStorage;
201
+ /** See `ClientConfig.walletConnect`. */
202
+ walletConnect?: NativeWalletConnectOptions;
203
+ /** See `ClientConfig.solanaWallets`. */
204
+ solanaWallets?: readonly unknown[];
205
+ /** See `ClientConfig.injectedProviders`. */
206
+ injectedProviders?: readonly InjectedProviderRegistration[];
196
207
  }
197
208
  interface Web3Actions {
198
209
  startPairing: () => Promise<string>;
@@ -363,6 +374,32 @@ interface UsePaymentFetchReturn {
363
374
  */
364
375
  declare function usePaymentFetch(pay: PaymentFetch): UsePaymentFetchReturn;
365
376
 
377
+ interface UseSolanaSessionKeyReturn {
378
+ /** The connected owner's keys, newest first. */
379
+ keys: SolanaSessionKeyInfo[];
380
+ /** Create a key; the owner's wallet approves it once. */
381
+ create: (scope: SolanaSessionKeyScope) => Promise<{
382
+ key: SolanaSessionKeyInfo;
383
+ signature: string;
384
+ }>;
385
+ /** Stop a key; the owner's wallet signs the on-chain Revoke. */
386
+ revoke: (id: string) => Promise<{
387
+ signature: string;
388
+ }>;
389
+ refresh: () => Promise<void>;
390
+ isPending: boolean;
391
+ error: Error | null;
392
+ }
393
+ /**
394
+ * Solana session keys that pay x402 / MPP without a prompt (pass
395
+ * `{ sessionKey: { manager, id }, rpc }` to the paying fetch). The app owns
396
+ * the `SolanaSessionKeyManager` and the RPC; `owner` is the connected
397
+ * wallet's Solana signer role. Keep `manager`, `rpc` and `owner` stable
398
+ * (module scope or `useMemo`): a new object each render rebuilds the flow
399
+ * and refetches the keys every render.
400
+ */
401
+ declare function useSolanaSessionKey(deps: SolanaSessionKeyFlowDeps | null): UseSolanaSessionKeyReturn;
402
+
366
403
  interface UseDelegationReturn extends DelegationStatus {
367
404
  isFetching: boolean;
368
405
  error: Error | null;
@@ -734,7 +771,7 @@ interface TxMonitorLike {
734
771
  on(event: "statusChange", listener: (entry: TxStatusEntry) => void): this;
735
772
  on(event: "confirmed", listener: (entry: TxStatusEntry) => void): this;
736
773
  on(event: "failed", listener: (entry: TxStatusEntry) => void): this;
737
- off(event: string, listener: Function): this;
774
+ off(event: string, listener: (entry: TxStatusEntry) => void): this;
738
775
  }
739
776
  declare const TxMonitorContext: React.Context<TxMonitorLike | null>;
740
777
  interface UseTxMonitorResult {
@@ -2076,4 +2113,4 @@ declare const AppkitToggleGroup: StencilReactComponent<AppkitToggleGroup$1, Appk
2076
2113
  type AppkitTooltipEvents = NonNullable<unknown>;
2077
2114
  declare const AppkitTooltip: StencilReactComponent<AppkitTooltip$1, AppkitTooltipEvents, Components.AppkitTooltip>;
2078
2115
 
2079
- export { type AddressValidationResult, AppkitAccordion, type AppkitAccordionEvents, AppkitAccountButton, type AppkitAccountButtonEvents, AppkitAlertDialog, type AppkitAlertDialogEvents, AppkitAvatar, type AppkitAvatarEvents, AppkitBadge, type AppkitBadgeEvents, AppkitButton, type AppkitButtonEvents, AppkitCard, AppkitCardContent, type AppkitCardContentEvents, AppkitCardDescription, type AppkitCardDescriptionEvents, type AppkitCardEvents, AppkitCardFooter, type AppkitCardFooterEvents, AppkitCardHeader, type AppkitCardHeaderEvents, AppkitCardTitle, type AppkitCardTitleEvents, AppkitCheckbox, type AppkitCheckboxEvents, AppkitCollapsible, type AppkitCollapsibleEvents, AppkitConnectButton, type AppkitConnectButtonEvents, AppkitDialog, type AppkitDialogEvents, AppkitDropdownMenu, type AppkitDropdownMenuEvents, AppkitInput, type AppkitInputEvents, AppkitPopover, type AppkitPopoverEvents, AppkitProgress, type AppkitProgressEvents, AppkitScrollArea, type AppkitScrollAreaEvents, AppkitSelect, type AppkitSelectEvents, AppkitSeparator, type AppkitSeparatorEvents, AppkitSkeleton, type AppkitSkeletonEvents, AppkitSwitch, type AppkitSwitchEvents, AppkitTabs, type AppkitTabsEvents, AppkitToggleGroup, type AppkitToggleGroupEvents, AppkitTooltip, type AppkitTooltipEvents, DEFAULT_EVM_CHAINS, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteError, type ExecuteOptions, type ExecutionPreview, type ExecutionRoute, type Locale, type Quote, type QuoteOptions, type SIWxConfig, type SendCallsStatus, type TokenBalanceResult, type TokenInfo, TokenSelector, type TokenSelectorProps, TxMonitorContext, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseCapabilitiesReturn, type UseCompareCostsInput, type UseCompareCostsReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseERC20AllowanceOptions, type UseERC20AllowanceReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxResult, type UseLookupAddressOptions, type UseLookupAddressResult, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameOptions, type UseResolveNameResult, type UseRevokeSessionReturn, type UseRouteQuoteInput, type UseRouteQuoteReturn, type UseSIWxLoginOptions, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXOptions, type UseSignInWithXReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceOptions, type UseSolanaBalanceReturn, type UseSolanaRolesReturn, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchReturn, type UseTransactionSimulationReturn, type UseTxHistoryResult, type UseTxMonitorResult, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationOptions, type UseValidateDestinationReturn, type UseWalletReturn, type UseWeb3ErrorHandlerReturn, type UserFriendlyError, type UserOpStatus, WALLET_ERROR_DESCRIPTIONS, WALLET_ERROR_TITLES, type Web3Actions, Web3Client, type Web3ConnectConfig, Web3ConnectProvider, type Web3ConnectProviderProps, Web3Context, getChainById, getDefaultChains, getLocale, getUserFriendlyError, isRetryableError, resetSessionKeyManager, setLocale, t, useAccount, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Allowance, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useNotification, usePassphraseGate, usePaymentFetch, useResolveName, useRevokeSession, useRouteQuote, useSIWxLogin, useSIWxSession, useSendCalls, useSendTransaction, useSendUserOperation, useSendWithSession, useSession, useSessionKeys, useSignInWithEthereum, useSignInWithX, useSignMessage, useSimulateTransfer, useSiwxAuthSession, useSmartAccount, useSolanaAccount, useSolanaBalance, useSolanaRoles, useSolanaTransaction, useSwitchChain, useTokenBalance, useTokenList, useTokenSearch, useTransactionSimulation, useTxHistory, useTxMonitor, useUserOpStatus, useValidateDestination, useViemClient, useWallet, useWeb3, useWeb3ErrorHandler, validateDestination };
2116
+ export { type AddressValidationResult, AppkitAccordion, type AppkitAccordionEvents, AppkitAccountButton, type AppkitAccountButtonEvents, AppkitAlertDialog, type AppkitAlertDialogEvents, AppkitAvatar, type AppkitAvatarEvents, AppkitBadge, type AppkitBadgeEvents, AppkitButton, type AppkitButtonEvents, AppkitCard, AppkitCardContent, type AppkitCardContentEvents, AppkitCardDescription, type AppkitCardDescriptionEvents, type AppkitCardEvents, AppkitCardFooter, type AppkitCardFooterEvents, AppkitCardHeader, type AppkitCardHeaderEvents, AppkitCardTitle, type AppkitCardTitleEvents, AppkitCheckbox, type AppkitCheckboxEvents, AppkitCollapsible, type AppkitCollapsibleEvents, AppkitConnectButton, type AppkitConnectButtonEvents, AppkitDialog, type AppkitDialogEvents, AppkitDropdownMenu, type AppkitDropdownMenuEvents, AppkitInput, type AppkitInputEvents, AppkitPopover, type AppkitPopoverEvents, AppkitProgress, type AppkitProgressEvents, AppkitScrollArea, type AppkitScrollAreaEvents, AppkitSelect, type AppkitSelectEvents, AppkitSeparator, type AppkitSeparatorEvents, AppkitSkeleton, type AppkitSkeletonEvents, AppkitSwitch, type AppkitSwitchEvents, AppkitTabs, type AppkitTabsEvents, AppkitToggleGroup, type AppkitToggleGroupEvents, AppkitTooltip, type AppkitTooltipEvents, DEFAULT_EVM_CHAINS, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteError, type ExecuteOptions, type ExecutionPreview, type ExecutionRoute, InjectedProviderRegistration, type Locale, NativeWalletConnectOptions, type Quote, type QuoteOptions, type SIWxConfig, type SendCallsStatus, type TokenBalanceResult, type TokenInfo, TokenSelector, type TokenSelectorProps, TxMonitorContext, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseCapabilitiesReturn, type UseCompareCostsInput, type UseCompareCostsReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseERC20AllowanceOptions, type UseERC20AllowanceReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxResult, type UseLookupAddressOptions, type UseLookupAddressResult, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameOptions, type UseResolveNameResult, type UseRevokeSessionReturn, type UseRouteQuoteInput, type UseRouteQuoteReturn, type UseSIWxLoginOptions, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXOptions, type UseSignInWithXReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceOptions, type UseSolanaBalanceReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchReturn, type UseTransactionSimulationReturn, type UseTxHistoryResult, type UseTxMonitorResult, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationOptions, type UseValidateDestinationReturn, type UseWalletReturn, type UseWeb3ErrorHandlerReturn, type UserFriendlyError, type UserOpStatus, WALLET_ERROR_DESCRIPTIONS, WALLET_ERROR_TITLES, type Web3Actions, Web3Client, type Web3ConnectConfig, Web3ConnectProvider, type Web3ConnectProviderProps, Web3Context, getChainById, getDefaultChains, getLocale, getUserFriendlyError, isRetryableError, resetSessionKeyManager, setLocale, t, useAccount, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Allowance, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useNotification, usePassphraseGate, usePaymentFetch, useResolveName, useRevokeSession, useRouteQuote, useSIWxLogin, useSIWxSession, useSendCalls, useSendTransaction, useSendUserOperation, useSendWithSession, useSession, useSessionKeys, useSignInWithEthereum, useSignInWithX, useSignMessage, useSimulateTransfer, useSiwxAuthSession, useSmartAccount, useSolanaAccount, useSolanaBalance, useSolanaRoles, useSolanaSessionKey, useSolanaTransaction, useSwitchChain, useTokenBalance, useTokenList, useTokenSearch, useTransactionSimulation, useTxHistory, useTxMonitor, useUserOpStatus, useValidateDestination, useViemClient, useWallet, useWeb3, useWeb3ErrorHandler, validateDestination };