@naculus/connect-appkit-vue 0.6.0 → 0.7.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.cjs +256 -112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +186 -38
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
2
2
|
import { JSX } from '@naculus/connect-appkit-wc';
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter, MaybeRef, ShallowRef, shallowRef, ref } from 'vue';
|
|
4
|
-
import { NotificationSettingsStorage, WalletChain, SimulationCallClient, SimulationTransaction, SiwxResultLike, PolicySignatureVerifier, PolicyExecutionPreview, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, SmartAccountType, RouteQuote, RouteQuoteInput, GetRouteQuotes, CostComparison, CompareCostsInput, CompareCosts, ExecutableQuote, ExecuteRouteOptions, ExecuteRouteResult, ExecuteRouteError, ExecuteRoute, DestinationValidation, PaymentFetch, PaymentRecord, SolanaSessionKeyFlowDeps, ChainInfo, ChainCapabilities, AtomicSupport, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, SolanaRolesSource } from '@naculus/connect-appkit-core';
|
|
4
|
+
import { NotificationSettingsStorage, WalletChain, SimulationCallClient, SimulationTransaction, SiwxResultLike, PolicySignatureVerifier, PolicyExecutionPreview, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, SmartAccountType, RouteQuote, RouteQuoteInput, GetRouteQuotes, CostComparison, CompareCostsInput, CompareCosts, ExecutableQuote, ExecuteRouteOptions, ExecuteRouteResult, ExecuteRouteError, ExecuteRoute, DestinationValidation, PaymentFetch, PaymentRecord, MppSessionRequest, MppSessionChannel, MppSessionReceipt, MppSessionFetchResult, MppSessionForceCloseResult, MppSessionFetch, SolanaSessionKeyFlowDeps, ChainInfo, ChainCapabilities, AtomicSupport, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, SolanaRolesSource } from '@naculus/connect-appkit-core';
|
|
5
5
|
export { AtomicSupport, ChainCapabilities, SolanaIdentity, SolanaPayer, SolanaRoles, SolanaRolesAbsence, SolanaRolesSource, SolanaSigner, SolanaWalletFeatures } from '@naculus/connect-appkit-core';
|
|
6
6
|
import { InAppChannel, NotificationItem, NotificationSettings, SimulationResult, ERC20_MIN_ABI, TokenConfig, ActiveSessionBundle, ChainSession, SessionManager, WalletError, SolanaConfirmationStatus, BatchCall, AtomicityRequirement, ExecutionPlan, CallsStatus, ExecutionStrategy, SessionKeyManagerConfig, SessionKeyManager, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, Address, SmartAccountManager, SmartAccountInfo, SmartAccountConfig, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ScopeCheckResult, TokenListSource, TokenListManager, TokenListEntry, TokenSearchResult, UniversalConnector, UniversalWalletSession, SentDelegation, SolanaSessionKeyInfo, SolanaSessionKeyScope, AddressResult, NameResolverConfig, NameResult, PassphraseGate } from '@naculus/connect-core';
|
|
7
7
|
|
|
@@ -984,6 +984,24 @@ interface UsePaymentFetchReturn {
|
|
|
984
984
|
*/
|
|
985
985
|
declare function usePaymentFetch(pay: MaybeRef<PaymentFetch>): UsePaymentFetchReturn;
|
|
986
986
|
|
|
987
|
+
interface UseMppSessionReturn {
|
|
988
|
+
fetch: MppSessionRequest;
|
|
989
|
+
meter: {
|
|
990
|
+
add(units: bigint): void;
|
|
991
|
+
};
|
|
992
|
+
pending: ShallowRef<bigint>;
|
|
993
|
+
channel: ShallowRef<MppSessionChannel | null>;
|
|
994
|
+
lastReceipt: ShallowRef<MppSessionReceipt | null>;
|
|
995
|
+
recoveryChannelId: ShallowRef<string | null>;
|
|
996
|
+
isPending: ShallowRef<boolean>;
|
|
997
|
+
error: ShallowRef<Error | null>;
|
|
998
|
+
close(): Promise<MppSessionFetchResult>;
|
|
999
|
+
forceClose(): Promise<MppSessionForceCloseResult>;
|
|
1000
|
+
reset(): void;
|
|
1001
|
+
}
|
|
1002
|
+
/** Reactive state around an MPP session fetch built and owned by the app. */
|
|
1003
|
+
declare function useMppSession(session: MaybeRef<MppSessionFetch>): UseMppSessionReturn;
|
|
1004
|
+
|
|
987
1005
|
interface UseSolanaSessionKeyReturn {
|
|
988
1006
|
/** The connected owner's keys, newest first. */
|
|
989
1007
|
keys: ShallowRef<SolanaSessionKeyInfo[]>;
|
|
@@ -1257,4 +1275,4 @@ declare function useSolanaRoles(connector: MaybeRefOrGetter<SolanaRolesSource |
|
|
|
1257
1275
|
walletType?: string;
|
|
1258
1276
|
} | null | undefined>): UseSolanaRolesReturn;
|
|
1259
1277
|
|
|
1260
|
-
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type CapabilityClient, type DelegationCodeReader, type DelegationNonceReader, type DeployTransactionSender, type ERC20Reader, type ERC20Sender, type ERC20Transaction, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteCallsAction, type ExecutionPreview, type ExecutionRoute, type GetCallsStatusAction, type GetSolanaTransactionStatusAction, type NativeBalanceReader, type PaymasterService, type PreviewExecutionAction, type SendCallsAction, type SendCallsOptions, type SendCallsStatus, type SendSolanaTransactionAction, type SendTransactionAction, type SendTransactionStatus, type SessionKeyComposableOptions, type ShowCallsStatusAction, type SignMessageAction, type SignSolanaTransactionAction, type SiwxResult, type SiwxSessionLike, type SiwxSignInAction, type SiwxSignInOptions, type SolanaTransaction, type TokenBalanceReader, type TokenBalanceResult, type TokenInfo, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseAccountReturn, type UseAccountsReturn, type UseBalanceOptions, type UseBalanceReturn, type UseCapabilitiesReturn, type UseChainReturn, type UseCompareCostsReturn, type UseConnectReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseDisconnectReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletOptions, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxReturn, type UseLookupAddressReturn, type UseNotificationOptions, type UseNotificationReturn, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameReturn, type UseRevokeSessionReturn, type UseRouteQuoteOptions, type UseRouteQuoteReturn, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendCallsOptions, type UseSendCallsReturn, type UseSendTransactionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXReturn, type UseSignMessageReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionOptions, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenBalanceReturn, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchOptions, type UseTokenSearchReturn, type UseTransactionSimulationOptions, type UseTransactionSimulationReturn, type UseTxHistoryReturn, type UseTxMonitorReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationReturn, type UserOpSigner, type UserOpStatus, useAccount, useAccounts, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, 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 };
|
|
1278
|
+
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type CapabilityClient, type DelegationCodeReader, type DelegationNonceReader, type DeployTransactionSender, type ERC20Reader, type ERC20Sender, type ERC20Transaction, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteCallsAction, type ExecutionPreview, type ExecutionRoute, type GetCallsStatusAction, type GetSolanaTransactionStatusAction, type NativeBalanceReader, type PaymasterService, type PreviewExecutionAction, type SendCallsAction, type SendCallsOptions, type SendCallsStatus, type SendSolanaTransactionAction, type SendTransactionAction, type SendTransactionStatus, type SessionKeyComposableOptions, type ShowCallsStatusAction, type SignMessageAction, type SignSolanaTransactionAction, type SiwxResult, type SiwxSessionLike, type SiwxSignInAction, type SiwxSignInOptions, type SolanaTransaction, type TokenBalanceReader, type TokenBalanceResult, type TokenInfo, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseAccountReturn, type UseAccountsReturn, type UseBalanceOptions, type UseBalanceReturn, type UseCapabilitiesReturn, type UseChainReturn, type UseCompareCostsReturn, type UseConnectReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseDisconnectReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletOptions, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxReturn, type UseLookupAddressReturn, type UseMppSessionReturn, type UseNotificationOptions, type UseNotificationReturn, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameReturn, type UseRevokeSessionReturn, type UseRouteQuoteOptions, type UseRouteQuoteReturn, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendCallsOptions, type UseSendCallsReturn, type UseSendTransactionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXReturn, type UseSignMessageReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionOptions, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenBalanceReturn, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchOptions, type UseTokenSearchReturn, type UseTransactionSimulationOptions, type UseTransactionSimulationReturn, type UseTxHistoryReturn, type UseTxMonitorReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationReturn, type UserOpSigner, type UserOpStatus, useAccount, useAccounts, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useMppSession, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
2
2
|
import { JSX } from '@naculus/connect-appkit-wc';
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter, MaybeRef, ShallowRef, shallowRef, ref } from 'vue';
|
|
4
|
-
import { NotificationSettingsStorage, WalletChain, SimulationCallClient, SimulationTransaction, SiwxResultLike, PolicySignatureVerifier, PolicyExecutionPreview, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, SmartAccountType, RouteQuote, RouteQuoteInput, GetRouteQuotes, CostComparison, CompareCostsInput, CompareCosts, ExecutableQuote, ExecuteRouteOptions, ExecuteRouteResult, ExecuteRouteError, ExecuteRoute, DestinationValidation, PaymentFetch, PaymentRecord, SolanaSessionKeyFlowDeps, ChainInfo, ChainCapabilities, AtomicSupport, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, SolanaRolesSource } from '@naculus/connect-appkit-core';
|
|
4
|
+
import { NotificationSettingsStorage, WalletChain, SimulationCallClient, SimulationTransaction, SiwxResultLike, PolicySignatureVerifier, PolicyExecutionPreview, PolicyExecutionAdapter, DelegationTypedData, DelegationPolicyPreview, PolicyExecutionSubmission, SmartAccountType, RouteQuote, RouteQuoteInput, GetRouteQuotes, CostComparison, CompareCostsInput, CompareCosts, ExecutableQuote, ExecuteRouteOptions, ExecuteRouteResult, ExecuteRouteError, ExecuteRoute, DestinationValidation, PaymentFetch, PaymentRecord, MppSessionRequest, MppSessionChannel, MppSessionReceipt, MppSessionFetchResult, MppSessionForceCloseResult, MppSessionFetch, SolanaSessionKeyFlowDeps, ChainInfo, ChainCapabilities, AtomicSupport, SolanaRoles, SolanaRolesAbsence, SolanaIdentity, SolanaSigner, SolanaPayer, SolanaRolesSource } from '@naculus/connect-appkit-core';
|
|
5
5
|
export { AtomicSupport, ChainCapabilities, SolanaIdentity, SolanaPayer, SolanaRoles, SolanaRolesAbsence, SolanaRolesSource, SolanaSigner, SolanaWalletFeatures } from '@naculus/connect-appkit-core';
|
|
6
6
|
import { InAppChannel, NotificationItem, NotificationSettings, SimulationResult, ERC20_MIN_ABI, TokenConfig, ActiveSessionBundle, ChainSession, SessionManager, WalletError, SolanaConfirmationStatus, BatchCall, AtomicityRequirement, ExecutionPlan, CallsStatus, ExecutionStrategy, SessionKeyManagerConfig, SessionKeyManager, SessionKeyInfo, SessionKeyScope, SessionKeyTransaction, Address, SmartAccountManager, SmartAccountInfo, SmartAccountConfig, Hex, Call, SendUserOpOptions, UserOperationResponse, UserOperationReceipt, ScopeCheckResult, TokenListSource, TokenListManager, TokenListEntry, TokenSearchResult, UniversalConnector, UniversalWalletSession, SentDelegation, SolanaSessionKeyInfo, SolanaSessionKeyScope, AddressResult, NameResolverConfig, NameResult, PassphraseGate } from '@naculus/connect-core';
|
|
7
7
|
|
|
@@ -984,6 +984,24 @@ interface UsePaymentFetchReturn {
|
|
|
984
984
|
*/
|
|
985
985
|
declare function usePaymentFetch(pay: MaybeRef<PaymentFetch>): UsePaymentFetchReturn;
|
|
986
986
|
|
|
987
|
+
interface UseMppSessionReturn {
|
|
988
|
+
fetch: MppSessionRequest;
|
|
989
|
+
meter: {
|
|
990
|
+
add(units: bigint): void;
|
|
991
|
+
};
|
|
992
|
+
pending: ShallowRef<bigint>;
|
|
993
|
+
channel: ShallowRef<MppSessionChannel | null>;
|
|
994
|
+
lastReceipt: ShallowRef<MppSessionReceipt | null>;
|
|
995
|
+
recoveryChannelId: ShallowRef<string | null>;
|
|
996
|
+
isPending: ShallowRef<boolean>;
|
|
997
|
+
error: ShallowRef<Error | null>;
|
|
998
|
+
close(): Promise<MppSessionFetchResult>;
|
|
999
|
+
forceClose(): Promise<MppSessionForceCloseResult>;
|
|
1000
|
+
reset(): void;
|
|
1001
|
+
}
|
|
1002
|
+
/** Reactive state around an MPP session fetch built and owned by the app. */
|
|
1003
|
+
declare function useMppSession(session: MaybeRef<MppSessionFetch>): UseMppSessionReturn;
|
|
1004
|
+
|
|
987
1005
|
interface UseSolanaSessionKeyReturn {
|
|
988
1006
|
/** The connected owner's keys, newest first. */
|
|
989
1007
|
keys: ShallowRef<SolanaSessionKeyInfo[]>;
|
|
@@ -1257,4 +1275,4 @@ declare function useSolanaRoles(connector: MaybeRefOrGetter<SolanaRolesSource |
|
|
|
1257
1275
|
walletType?: string;
|
|
1258
1276
|
} | null | undefined>): UseSolanaRolesReturn;
|
|
1259
1277
|
|
|
1260
|
-
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type CapabilityClient, type DelegationCodeReader, type DelegationNonceReader, type DeployTransactionSender, type ERC20Reader, type ERC20Sender, type ERC20Transaction, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteCallsAction, type ExecutionPreview, type ExecutionRoute, type GetCallsStatusAction, type GetSolanaTransactionStatusAction, type NativeBalanceReader, type PaymasterService, type PreviewExecutionAction, type SendCallsAction, type SendCallsOptions, type SendCallsStatus, type SendSolanaTransactionAction, type SendTransactionAction, type SendTransactionStatus, type SessionKeyComposableOptions, type ShowCallsStatusAction, type SignMessageAction, type SignSolanaTransactionAction, type SiwxResult, type SiwxSessionLike, type SiwxSignInAction, type SiwxSignInOptions, type SolanaTransaction, type TokenBalanceReader, type TokenBalanceResult, type TokenInfo, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseAccountReturn, type UseAccountsReturn, type UseBalanceOptions, type UseBalanceReturn, type UseCapabilitiesReturn, type UseChainReturn, type UseCompareCostsReturn, type UseConnectReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseDisconnectReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletOptions, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxReturn, type UseLookupAddressReturn, type UseNotificationOptions, type UseNotificationReturn, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameReturn, type UseRevokeSessionReturn, type UseRouteQuoteOptions, type UseRouteQuoteReturn, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendCallsOptions, type UseSendCallsReturn, type UseSendTransactionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXReturn, type UseSignMessageReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionOptions, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenBalanceReturn, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchOptions, type UseTokenSearchReturn, type UseTransactionSimulationOptions, type UseTransactionSimulationReturn, type UseTxHistoryReturn, type UseTxMonitorReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationReturn, type UserOpSigner, type UserOpStatus, useAccount, useAccounts, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, 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 };
|
|
1278
|
+
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type CapabilityClient, type DelegationCodeReader, type DelegationNonceReader, type DeployTransactionSender, type ERC20Reader, type ERC20Sender, type ERC20Transaction, type EmbeddedWalletAccountView, type EmbeddedWalletView, type EvmTransaction, type ExecuteCallsAction, type ExecutionPreview, type ExecutionRoute, type GetCallsStatusAction, type GetSolanaTransactionStatusAction, type NativeBalanceReader, type PaymasterService, type PreviewExecutionAction, type SendCallsAction, type SendCallsOptions, type SendCallsStatus, type SendSolanaTransactionAction, type SendTransactionAction, type SendTransactionStatus, type SessionKeyComposableOptions, type ShowCallsStatusAction, type SignMessageAction, type SignSolanaTransactionAction, type SiwxResult, type SiwxSessionLike, type SiwxSignInAction, type SiwxSignInOptions, type SolanaTransaction, type TokenBalanceReader, type TokenBalanceResult, type TokenInfo, type TxMonitorLike, type TxStatus, type TxStatusEntry, type UseAccountReturn, type UseAccountsReturn, type UseBalanceOptions, type UseBalanceReturn, type UseCapabilitiesReturn, type UseChainReturn, type UseCompareCostsReturn, type UseConnectReturn, type UseCreateSessionKeyReturn, type UseDelegateOptions, type UseDelegateReturn, type UseDelegationPolicyOptions, type UseDelegationPolicyReturn, type UseDelegationReturn, type UseDisconnectReturn, type UseERC20ApproveOptions, type UseERC20ApproveReturn, type UseERC20TransferOptions, type UseERC20TransferReturn, type UseERC20TransferSimulationOptions, type UseERC20TransferSimulationReturn, type UseEmbeddedWalletOptions, type UseEmbeddedWalletReturn, type UseExecuteCallsOptions, type UseExecuteCallsReturn, type UseExecuteRouteReturn, type UseLastTxReturn, type UseLookupAddressReturn, type UseMppSessionReturn, type UseNotificationOptions, type UseNotificationReturn, type UsePassphraseGateReturn, type UsePaymentFetchReturn, type UseResolveNameReturn, type UseRevokeSessionReturn, type UseRouteQuoteOptions, type UseRouteQuoteReturn, type UseSIWxLoginReturn, type UseSIWxSessionOptions, type UseSIWxSessionReturn, type UseSendCallsOptions, type UseSendCallsReturn, type UseSendTransactionReturn, type UseSendUserOperationOptions, type UseSendUserOperationReturn, type UseSendWithSessionReturn, type UseSessionKeysReturn, type UseSessionReturn, type UseSignInWithEthereumOptions, type UseSignInWithEthereumReturn, type UseSignInWithXReturn, type UseSignMessageReturn, type UseSimulateTransferOptions, type UseSimulateTransferReturn, type UseSiwxAuthSessionOptions, type UseSiwxAuthSessionReturn, type UseSmartAccountOptions, type UseSmartAccountReturn, type UseSolanaAccountReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, type UseSolanaRolesReturn, type UseSolanaSessionKeyReturn, type UseSolanaTransactionOptions, type UseSolanaTransactionReturn, type UseSwitchChainReturn, type UseTokenBalanceOptions, type UseTokenBalanceReturn, type UseTokenListOptions, type UseTokenListReturn, type UseTokenSearchOptions, type UseTokenSearchReturn, type UseTransactionSimulationOptions, type UseTransactionSimulationReturn, type UseTxHistoryReturn, type UseTxMonitorReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseValidateDestinationReturn, type UserOpSigner, type UserOpStatus, useAccount, useAccounts, useBalance, useCapabilities, useChain, useCompareCosts, useConnect, useCreateSessionKey, useDelegate, useDelegation, useDelegationPolicy, useDisconnect, useERC20Approve, useERC20Transfer, useERC20TransferSimulation, useEmbeddedWallet, useExecuteCalls, useExecuteRoute, useLastTx, useLookupAddress, useMppSession, 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 };
|
package/dist/index.js
CHANGED
|
@@ -219,6 +219,7 @@ import {
|
|
|
219
219
|
loadNotificationSettings,
|
|
220
220
|
mutedChainSettings,
|
|
221
221
|
saveNotificationSettings,
|
|
222
|
+
replayNotificationSettings,
|
|
222
223
|
updateNotificationSettings
|
|
223
224
|
} from "@naculus/connect-appkit-core";
|
|
224
225
|
import {
|
|
@@ -236,9 +237,19 @@ function useNotification(options = {}) {
|
|
|
236
237
|
() => notifications.value.filter((item) => !item.read).length
|
|
237
238
|
);
|
|
238
239
|
let disposed = false;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
let pending = [];
|
|
241
|
+
const settle = (saved) => {
|
|
242
|
+
const queued = pending ?? [];
|
|
243
|
+
pending = null;
|
|
244
|
+
if (disposed) return;
|
|
245
|
+
if (queued.length === 0) {
|
|
246
|
+
if (saved) settings.value = saved;
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
settings.value = replayNotificationSettings(saved, queued);
|
|
250
|
+
saveNotificationSettings(storage, settings.value);
|
|
251
|
+
};
|
|
252
|
+
void loadNotificationSettings(storage).then(settle, () => settle(null));
|
|
242
253
|
channel.onNotification = (item) => {
|
|
243
254
|
if (!disposed) notifications.value = [...notifications.value, item];
|
|
244
255
|
};
|
|
@@ -249,10 +260,15 @@ function useNotification(options = {}) {
|
|
|
249
260
|
disposed = true;
|
|
250
261
|
channel.onNotification = void 0;
|
|
251
262
|
});
|
|
252
|
-
const
|
|
253
|
-
|
|
263
|
+
const applySettings = (compute) => {
|
|
264
|
+
pending?.push(compute);
|
|
265
|
+
settings.value = updateNotificationSettings(
|
|
266
|
+
settings.value,
|
|
267
|
+
compute(settings.value)
|
|
268
|
+
);
|
|
254
269
|
saveNotificationSettings(storage, settings.value);
|
|
255
270
|
};
|
|
271
|
+
const updateSettings = (update) => applySettings(() => update);
|
|
256
272
|
return {
|
|
257
273
|
notifications,
|
|
258
274
|
unreadCount,
|
|
@@ -282,8 +298,8 @@ function useNotification(options = {}) {
|
|
|
282
298
|
},
|
|
283
299
|
updateSettings,
|
|
284
300
|
setChannels: (channels) => updateSettings(channelsUpdate(channels)),
|
|
285
|
-
muteChain: (chainId) =>
|
|
286
|
-
unmuteChain: (chainId) =>
|
|
301
|
+
muteChain: (chainId) => applySettings((current) => mutedChainSettings(current, chainId, true)),
|
|
302
|
+
unmuteChain: (chainId) => applySettings((current) => mutedChainSettings(current, chainId, false))
|
|
287
303
|
};
|
|
288
304
|
}
|
|
289
305
|
|
|
@@ -2598,18 +2614,149 @@ function usePaymentFetch(pay) {
|
|
|
2598
2614
|
};
|
|
2599
2615
|
}
|
|
2600
2616
|
|
|
2617
|
+
// src/useMppSession.ts
|
|
2618
|
+
import {
|
|
2619
|
+
readCurrentMppSessionChannel,
|
|
2620
|
+
readMppRecoveryChannelId,
|
|
2621
|
+
readMppSessionReceipt
|
|
2622
|
+
} from "@naculus/connect-appkit-core";
|
|
2623
|
+
import { onScopeDispose as onScopeDispose19, shallowRef as shallowRef27, unref as unref25, watch as watch16 } from "vue";
|
|
2624
|
+
function useMppSession(session) {
|
|
2625
|
+
const current = () => unref25(session);
|
|
2626
|
+
const pending = shallowRef27(current().meter.pending);
|
|
2627
|
+
const channel = shallowRef27(
|
|
2628
|
+
readCurrentMppSessionChannel(current())
|
|
2629
|
+
);
|
|
2630
|
+
const lastReceipt = shallowRef27(null);
|
|
2631
|
+
const recoveryChannelId = shallowRef27(null);
|
|
2632
|
+
const isPending = shallowRef27(false);
|
|
2633
|
+
const error = shallowRef27(null);
|
|
2634
|
+
let active = 0;
|
|
2635
|
+
let generation = 0;
|
|
2636
|
+
let epoch = 0;
|
|
2637
|
+
let disposed = false;
|
|
2638
|
+
watch16(
|
|
2639
|
+
() => unref25(session),
|
|
2640
|
+
(value) => {
|
|
2641
|
+
generation++;
|
|
2642
|
+
epoch++;
|
|
2643
|
+
active = 0;
|
|
2644
|
+
isPending.value = false;
|
|
2645
|
+
pending.value = value.meter.pending;
|
|
2646
|
+
channel.value = readCurrentMppSessionChannel(value);
|
|
2647
|
+
lastReceipt.value = null;
|
|
2648
|
+
recoveryChannelId.value = null;
|
|
2649
|
+
error.value = null;
|
|
2650
|
+
},
|
|
2651
|
+
{ flush: "sync" }
|
|
2652
|
+
);
|
|
2653
|
+
onScopeDispose19(() => {
|
|
2654
|
+
disposed = true;
|
|
2655
|
+
generation++;
|
|
2656
|
+
epoch++;
|
|
2657
|
+
});
|
|
2658
|
+
const run = (operation, publish, clearsRecovery = false) => {
|
|
2659
|
+
const own = ++generation;
|
|
2660
|
+
const ownEpoch = epoch;
|
|
2661
|
+
const invokedSession = current();
|
|
2662
|
+
active++;
|
|
2663
|
+
isPending.value = true;
|
|
2664
|
+
error.value = null;
|
|
2665
|
+
return operation(invokedSession).then((result) => {
|
|
2666
|
+
if (!disposed && ownEpoch === epoch) {
|
|
2667
|
+
publish?.(result);
|
|
2668
|
+
const currentChannel = readCurrentMppSessionChannel(invokedSession);
|
|
2669
|
+
channel.value = currentChannel;
|
|
2670
|
+
pending.value = invokedSession.meter.pending;
|
|
2671
|
+
if (clearsRecovery || !currentChannel) {
|
|
2672
|
+
recoveryChannelId.value = null;
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
return result;
|
|
2676
|
+
}).catch((cause) => {
|
|
2677
|
+
const normalized = cause instanceof Error ? cause : new Error("MPP session operation failed");
|
|
2678
|
+
if (!disposed && ownEpoch === epoch) {
|
|
2679
|
+
const currentChannel = readCurrentMppSessionChannel(invokedSession);
|
|
2680
|
+
channel.value = currentChannel;
|
|
2681
|
+
pending.value = invokedSession.meter.pending;
|
|
2682
|
+
const recovery = readMppRecoveryChannelId(cause);
|
|
2683
|
+
if (recovery) recoveryChannelId.value = recovery;
|
|
2684
|
+
else if (!currentChannel) recoveryChannelId.value = null;
|
|
2685
|
+
if (own === generation) error.value = normalized;
|
|
2686
|
+
}
|
|
2687
|
+
throw normalized;
|
|
2688
|
+
}).finally(() => {
|
|
2689
|
+
if (ownEpoch === epoch) {
|
|
2690
|
+
active--;
|
|
2691
|
+
if (!disposed) isPending.value = active > 0;
|
|
2692
|
+
}
|
|
2693
|
+
});
|
|
2694
|
+
};
|
|
2695
|
+
const fetch = (input, init) => run(
|
|
2696
|
+
(value) => value(input, init),
|
|
2697
|
+
(result) => {
|
|
2698
|
+
const receipt = readMppSessionReceipt(result.receipt);
|
|
2699
|
+
if (receipt) lastReceipt.value = receipt;
|
|
2700
|
+
}
|
|
2701
|
+
);
|
|
2702
|
+
const close = () => run(
|
|
2703
|
+
(value) => value.close(),
|
|
2704
|
+
(result) => {
|
|
2705
|
+
const receipt = readMppSessionReceipt(result.receipt);
|
|
2706
|
+
if (receipt) lastReceipt.value = receipt;
|
|
2707
|
+
},
|
|
2708
|
+
true
|
|
2709
|
+
);
|
|
2710
|
+
const forceClose = () => run((value) => value.forceClose(), void 0, true);
|
|
2711
|
+
const add = (units) => {
|
|
2712
|
+
try {
|
|
2713
|
+
current().meter.add(units);
|
|
2714
|
+
pending.value = current().meter.pending;
|
|
2715
|
+
error.value = null;
|
|
2716
|
+
} catch (cause) {
|
|
2717
|
+
const normalized = cause instanceof Error ? cause : new Error("MPP session operation failed");
|
|
2718
|
+
error.value = normalized;
|
|
2719
|
+
recoveryChannelId.value = readMppRecoveryChannelId(cause);
|
|
2720
|
+
throw normalized;
|
|
2721
|
+
}
|
|
2722
|
+
};
|
|
2723
|
+
return {
|
|
2724
|
+
fetch,
|
|
2725
|
+
meter: { add },
|
|
2726
|
+
pending,
|
|
2727
|
+
channel,
|
|
2728
|
+
lastReceipt,
|
|
2729
|
+
recoveryChannelId,
|
|
2730
|
+
isPending,
|
|
2731
|
+
error,
|
|
2732
|
+
close,
|
|
2733
|
+
forceClose,
|
|
2734
|
+
reset: () => {
|
|
2735
|
+
generation++;
|
|
2736
|
+
epoch++;
|
|
2737
|
+
active = 0;
|
|
2738
|
+
isPending.value = false;
|
|
2739
|
+
pending.value = current().meter.pending;
|
|
2740
|
+
channel.value = readCurrentMppSessionChannel(current());
|
|
2741
|
+
lastReceipt.value = null;
|
|
2742
|
+
recoveryChannelId.value = null;
|
|
2743
|
+
error.value = null;
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2601
2748
|
// src/useSolanaSessionKey.ts
|
|
2602
2749
|
import {
|
|
2603
2750
|
createSolanaSessionKeyFlow
|
|
2604
2751
|
} from "@naculus/connect-appkit-core";
|
|
2605
|
-
import { onScopeDispose as
|
|
2752
|
+
import { onScopeDispose as onScopeDispose20, shallowRef as shallowRef28, unref as unref26, watch as watch17 } from "vue";
|
|
2606
2753
|
function useSolanaSessionKey(deps) {
|
|
2607
2754
|
const guard = useActionGuard();
|
|
2608
|
-
const keys =
|
|
2755
|
+
const keys = shallowRef28([]);
|
|
2609
2756
|
let flow = null;
|
|
2610
2757
|
let generation = 0;
|
|
2611
2758
|
let disposed = false;
|
|
2612
|
-
|
|
2759
|
+
onScopeDispose20(() => {
|
|
2613
2760
|
disposed = true;
|
|
2614
2761
|
});
|
|
2615
2762
|
const refresh = async () => {
|
|
@@ -2617,8 +2764,8 @@ function useSolanaSessionKey(deps) {
|
|
|
2617
2764
|
const next = flow ? await flow.list() : [];
|
|
2618
2765
|
if (!disposed && own === generation) keys.value = next;
|
|
2619
2766
|
};
|
|
2620
|
-
|
|
2621
|
-
() =>
|
|
2767
|
+
watch17(
|
|
2768
|
+
() => unref26(deps),
|
|
2622
2769
|
(next) => {
|
|
2623
2770
|
flow = next ? createSolanaSessionKeyFlow(next) : null;
|
|
2624
2771
|
guard.invalidate();
|
|
@@ -2652,11 +2799,11 @@ function useSolanaSessionKey(deps) {
|
|
|
2652
2799
|
|
|
2653
2800
|
// src/name-lookup.ts
|
|
2654
2801
|
import { getResolver } from "@naculus/connect-appkit-core";
|
|
2655
|
-
import { computed as computed21, shallowRef as
|
|
2802
|
+
import { computed as computed21, shallowRef as shallowRef29, toValue as toValue30, watch as watch18 } from "vue";
|
|
2656
2803
|
function useNameLookup(options) {
|
|
2657
2804
|
const guard = useActionGuard();
|
|
2658
|
-
const data =
|
|
2659
|
-
const loading =
|
|
2805
|
+
const data = shallowRef29(null);
|
|
2806
|
+
const loading = shallowRef29(false);
|
|
2660
2807
|
const run = () => {
|
|
2661
2808
|
const input = toValue30(options.input).trim();
|
|
2662
2809
|
const skip = toValue30(options.skip) ?? false;
|
|
@@ -2696,7 +2843,7 @@ function useNameLookup(options) {
|
|
|
2696
2843
|
).catch(() => {
|
|
2697
2844
|
});
|
|
2698
2845
|
};
|
|
2699
|
-
|
|
2846
|
+
watch18(
|
|
2700
2847
|
() => [
|
|
2701
2848
|
toValue30(options.input),
|
|
2702
2849
|
toValue30(options.skip),
|
|
@@ -2784,13 +2931,13 @@ function useChain(chains, chainId) {
|
|
|
2784
2931
|
}
|
|
2785
2932
|
|
|
2786
2933
|
// src/usePassphraseGate.ts
|
|
2787
|
-
import { onScopeDispose as
|
|
2934
|
+
import { onScopeDispose as onScopeDispose21, readonly, shallowRef as shallowRef30 } from "vue";
|
|
2788
2935
|
function usePassphraseGate(gate) {
|
|
2789
|
-
const request =
|
|
2936
|
+
const request = shallowRef30(gate.getSnapshot());
|
|
2790
2937
|
const unsubscribe = gate.subscribe(() => {
|
|
2791
2938
|
request.value = gate.getSnapshot();
|
|
2792
2939
|
});
|
|
2793
|
-
|
|
2940
|
+
onScopeDispose21(unsubscribe);
|
|
2794
2941
|
return {
|
|
2795
2942
|
request: readonly(request),
|
|
2796
2943
|
submit: (passphrase) => gate.submit(passphrase),
|
|
@@ -2801,10 +2948,10 @@ function usePassphraseGate(gate) {
|
|
|
2801
2948
|
|
|
2802
2949
|
// src/useSolanaBalance.ts
|
|
2803
2950
|
import { getSolanaBalance } from "@naculus/connect-core";
|
|
2804
|
-
import { ref, shallowRef as
|
|
2951
|
+
import { ref, shallowRef as shallowRef31, toValue as toValue33, watchEffect } from "vue";
|
|
2805
2952
|
function useSolanaBalance(address, rpcUrl) {
|
|
2806
2953
|
const guard = useActionGuard();
|
|
2807
|
-
const balance =
|
|
2954
|
+
const balance = shallowRef31(null);
|
|
2808
2955
|
const isFetching = ref(false);
|
|
2809
2956
|
const refetch = async () => {
|
|
2810
2957
|
const addr = toValue33(address);
|
|
@@ -2849,12 +2996,12 @@ function useSolanaBalance(address, rpcUrl) {
|
|
|
2849
2996
|
}
|
|
2850
2997
|
|
|
2851
2998
|
// src/useLastTx.ts
|
|
2852
|
-
import { shallowRef as
|
|
2999
|
+
import { shallowRef as shallowRef32, toValue as toValue34, watch as watch19 } from "vue";
|
|
2853
3000
|
function useLastTx(monitor) {
|
|
2854
|
-
const lastTx =
|
|
2855
|
-
const lastConfirmedTx =
|
|
2856
|
-
const lastFailedTx =
|
|
2857
|
-
|
|
3001
|
+
const lastTx = shallowRef32(null);
|
|
3002
|
+
const lastConfirmedTx = shallowRef32(null);
|
|
3003
|
+
const lastFailedTx = shallowRef32(null);
|
|
3004
|
+
watch19(
|
|
2858
3005
|
() => toValue34(monitor),
|
|
2859
3006
|
(activeMonitor, _previous, onCleanup) => {
|
|
2860
3007
|
if (!activeMonitor) return;
|
|
@@ -2893,11 +3040,11 @@ function useLastTx(monitor) {
|
|
|
2893
3040
|
}
|
|
2894
3041
|
|
|
2895
3042
|
// src/useTxHistory.ts
|
|
2896
|
-
import { computed as computed24, shallowRef as
|
|
3043
|
+
import { computed as computed24, shallowRef as shallowRef33, toValue as toValue35, watch as watch20 } from "vue";
|
|
2897
3044
|
function useTxHistory(address, chainId, monitor) {
|
|
2898
3045
|
const guard = useActionGuard();
|
|
2899
|
-
const entries =
|
|
2900
|
-
const isLoading =
|
|
3046
|
+
const entries = shallowRef33([]);
|
|
3047
|
+
const isLoading = shallowRef33(false);
|
|
2901
3048
|
const refresh = async () => {
|
|
2902
3049
|
const activeMonitor = toValue35(monitor);
|
|
2903
3050
|
if (!activeMonitor) {
|
|
@@ -2927,7 +3074,7 @@ function useTxHistory(address, chainId, monitor) {
|
|
|
2927
3074
|
).catch(() => {
|
|
2928
3075
|
});
|
|
2929
3076
|
};
|
|
2930
|
-
|
|
3077
|
+
watch20(
|
|
2931
3078
|
[() => toValue35(monitor), () => toValue35(address), () => toValue35(chainId)],
|
|
2932
3079
|
([activeMonitor], _previous, onCleanup) => {
|
|
2933
3080
|
if (!activeMonitor) {
|
|
@@ -2957,11 +3104,11 @@ function useTxHistory(address, chainId, monitor) {
|
|
|
2957
3104
|
}
|
|
2958
3105
|
|
|
2959
3106
|
// src/useTxMonitor.ts
|
|
2960
|
-
import { computed as computed25, shallowRef as
|
|
3107
|
+
import { computed as computed25, shallowRef as shallowRef34, toValue as toValue36, watch as watch21 } from "vue";
|
|
2961
3108
|
function useTxMonitor(hash, chainId, monitor) {
|
|
2962
|
-
const entry =
|
|
2963
|
-
const isLoading =
|
|
2964
|
-
const isWatching =
|
|
3109
|
+
const entry = shallowRef34(null);
|
|
3110
|
+
const isLoading = shallowRef34(false);
|
|
3111
|
+
const isWatching = shallowRef34(false);
|
|
2965
3112
|
const guard = useActionGuard();
|
|
2966
3113
|
const error = guard.error;
|
|
2967
3114
|
let generation = 0;
|
|
@@ -3018,7 +3165,7 @@ function useTxMonitor(hash, chainId, monitor) {
|
|
|
3018
3165
|
activeMonitor.stopWatching(activeHash, activeChainId ?? void 0);
|
|
3019
3166
|
isWatching.value = false;
|
|
3020
3167
|
};
|
|
3021
|
-
|
|
3168
|
+
watch21(
|
|
3022
3169
|
[() => toValue36(monitor), () => toValue36(hash), () => toValue36(chainId)],
|
|
3023
3170
|
([activeMonitor, activeHash, activeChainId], _previous, onCleanup) => {
|
|
3024
3171
|
const mine = ++generation;
|
|
@@ -3076,13 +3223,13 @@ import {
|
|
|
3076
3223
|
normalizeCapabilities,
|
|
3077
3224
|
selectChainCapabilities
|
|
3078
3225
|
} from "@naculus/connect-appkit-core";
|
|
3079
|
-
import { computed as computed26, shallowRef as
|
|
3226
|
+
import { computed as computed26, shallowRef as shallowRef35, toValue as toValue37, watchEffect as watchEffect2 } from "vue";
|
|
3080
3227
|
function useCapabilities(client, session, chainId) {
|
|
3081
3228
|
const guard = useActionGuard();
|
|
3082
|
-
const capabilities =
|
|
3229
|
+
const capabilities = shallowRef35(
|
|
3083
3230
|
null
|
|
3084
3231
|
);
|
|
3085
|
-
const isFetching =
|
|
3232
|
+
const isFetching = shallowRef35(false);
|
|
3086
3233
|
const refetch = async () => {
|
|
3087
3234
|
const activeClient = toValue37(client);
|
|
3088
3235
|
const activeSession = toValue37(session);
|
|
@@ -3202,6 +3349,7 @@ export {
|
|
|
3202
3349
|
useExecuteRoute,
|
|
3203
3350
|
useLastTx,
|
|
3204
3351
|
useLookupAddress,
|
|
3352
|
+
useMppSession,
|
|
3205
3353
|
useNotification,
|
|
3206
3354
|
usePassphraseGate,
|
|
3207
3355
|
usePaymentFetch,
|