@qntx/wallet-engine 0.13.0 → 0.14.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.
Files changed (80) hide show
  1. package/README.md +1057 -20
  2. package/dist/apps-fiat24.d.mts +202 -0
  3. package/dist/apps-fiat24.mjs +1378 -0
  4. package/dist/apps-fiat24.mjs.map +1 -0
  5. package/dist/apps-hyperliquid.d.mts +549 -0
  6. package/dist/apps-hyperliquid.mjs +2742 -0
  7. package/dist/apps-hyperliquid.mjs.map +1 -0
  8. package/dist/apps-polymarket.d.mts +729 -0
  9. package/dist/apps-polymarket.mjs +3786 -0
  10. package/dist/apps-polymarket.mjs.map +1 -0
  11. package/dist/apps.d.mts +136 -0
  12. package/dist/apps.mjs +535 -0
  13. package/dist/apps.mjs.map +1 -0
  14. package/dist/connect-BY1C5ZRI.mjs +210 -0
  15. package/dist/connect-BY1C5ZRI.mjs.map +1 -0
  16. package/dist/connect.d.mts +17 -9
  17. package/dist/connect.mjs +3 -185
  18. package/dist/{errors-CQnlTc1i.d.mts → controller-DpNVHVsj.d.mts} +1093 -758
  19. package/dist/controller-rMnaxKAH.mjs +46 -0
  20. package/dist/controller-rMnaxKAH.mjs.map +1 -0
  21. package/dist/decimal-COJ4g8qy.mjs +38 -0
  22. package/dist/decimal-COJ4g8qy.mjs.map +1 -0
  23. package/dist/eligibility-BfM9ybYZ.mjs +48 -0
  24. package/dist/eligibility-BfM9ybYZ.mjs.map +1 -0
  25. package/dist/engine-Dic_kkEr.d.mts +1829 -0
  26. package/dist/errors-B8W-hoYW.d.mts +7 -0
  27. package/dist/errors-horUy5k1.mjs +24 -0
  28. package/dist/errors-horUy5k1.mjs.map +1 -0
  29. package/dist/gateway-contract.d.mts +3 -608
  30. package/dist/gateway-contract.mjs +1467 -161
  31. package/dist/gateway-contract.mjs.map +1 -1
  32. package/dist/idb.d.mts +5 -0
  33. package/dist/idb.mjs +122 -46
  34. package/dist/idb.mjs.map +1 -1
  35. package/dist/index-vBgfOFIh.d.mts +2227 -0
  36. package/dist/index.d.mts +58 -618
  37. package/dist/index.mjs +21963 -6836
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/json-BDwV38cj.mjs +15 -0
  40. package/dist/json-BDwV38cj.mjs.map +1 -0
  41. package/dist/link-Ceq8Dggp.mjs +139 -0
  42. package/dist/link-Ceq8Dggp.mjs.map +1 -0
  43. package/dist/primitives-DbSHLZKq.mjs +31 -0
  44. package/dist/primitives-DbSHLZKq.mjs.map +1 -0
  45. package/dist/push-message-AQuzoNFY.d.mts +84 -0
  46. package/dist/push-message-kbnH1A5w.mjs +142 -0
  47. package/dist/push-message-kbnH1A5w.mjs.map +1 -0
  48. package/dist/push.d.mts +13 -0
  49. package/dist/push.mjs +70 -0
  50. package/dist/push.mjs.map +1 -0
  51. package/dist/qr.d.mts +292 -0
  52. package/dist/qr.mjs +1725 -0
  53. package/dist/qr.mjs.map +1 -0
  54. package/dist/registry-CbtwcxkX.mjs +374 -0
  55. package/dist/registry-CbtwcxkX.mjs.map +1 -0
  56. package/dist/risk-DyABgg4W.mjs +757 -0
  57. package/dist/risk-DyABgg4W.mjs.map +1 -0
  58. package/dist/session-CNJFLarP.mjs +18 -0
  59. package/dist/session-CNJFLarP.mjs.map +1 -0
  60. package/dist/socket-ChG9JRT_.mjs +110 -0
  61. package/dist/socket-ChG9JRT_.mjs.map +1 -0
  62. package/dist/spi-BrTw5s98.d.mts +3 -0
  63. package/dist/timer-Cdk5rGM2.mjs +43 -0
  64. package/dist/timer-Cdk5rGM2.mjs.map +1 -0
  65. package/dist/types-BpvioFGo.d.mts +258 -0
  66. package/dist/types-DbftVZ3I.mjs +90 -0
  67. package/dist/types-DbftVZ3I.mjs.map +1 -0
  68. package/dist/walletconnect.d.mts +86 -0
  69. package/dist/walletconnect.mjs +1507 -0
  70. package/dist/walletconnect.mjs.map +1 -0
  71. package/dist/webln-BgrtPXpG.mjs +2593 -0
  72. package/dist/webln-BgrtPXpG.mjs.map +1 -0
  73. package/dist/webln-Bllk_xJ2.d.mts +666 -0
  74. package/package.json +92 -19
  75. package/dist/connect.mjs.map +0 -1
  76. package/dist/registry-DwguKWvt.d.mts +0 -27
  77. package/dist/registry-oorLoGtz.mjs +0 -120
  78. package/dist/registry-oorLoGtz.mjs.map +0 -1
  79. package/dist/webln-DKqCnqx1.mjs +0 -3677
  80. package/dist/webln-DKqCnqx1.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,16 +1,25 @@
1
- import { $ as PHISHING_REFRESH_MS, A as PayInput, At as AddressBookController, B as SignLogEntry, Bt as createEventBus, C as ConnectionOrigin, Ct as SparkControllerState, Dt as RequestCheckCode, E as ConnectionState, Et as SparkActivity, F as RequestControllerState, Ft as EngineCollection, G as RiskFinding, H as BrowserOrigin, Ht as ControllerOptions, I as RequestInput, It as EngineStore, J as DelegationStatus, K as TransactionController, L as RequestStage, Lt as PublicStore, M as REQUEST_TTL_MS, Mt as AddressBookEntry, N as RESIMULATE_AFTER_MS, Nt as AddressBookRecord, O as PendingConnection, Ot as NetworkController, P as RequestController, Pt as AddressFamily, Q as AcrossBridgeStatus, R as SparkDepositInput, Rt as EngineLogger, S as ConnectionController, St as SparkControllerOptions, T as ConnectionSession, Tt as PaymentNote, U as RequestMethod, V as SignLogOutcome, Vt as Controller, W as RequestOrigin, X as SwapQuote, Y as SignatureResult, Z as AcrossBridgeQuote, _t as SparkDisplay, at as PrepareZapParams, b as BitcoinWalletHandler, bt as SparkClientFactory, ct as prepareZap, dt as ParseOptions, et as PhishingController, f as Eip1193Event, ft as PaymentOption, gt as PreparedSparkAction, ht as parsePayment, it as PrepareZapContext, j as PendingRequest, jt as AddressBookState, k as EvmSignInput, kt as Esplora, l as SolanaWalletHandler, lt as PayParams, m as Eip1193Request, mt as PaymentRequest, n as WeblnHandler, nt as PhishingState, ot as PreparedZap, p as Eip1193Handler, pt as PaymentParse, q as AccountRef, rt as PhishingStatus, st as ZapRecipient, t as ProviderError, tt as PhishingControllerOptions, u as Nip07Handler, ut as WithdrawLnurlParams, vt as SparkResult, w as ConnectionScope, wt as sparkStore, x as AccountGroup$1, xt as SparkController, yt as SparkAccountState, z as SparkExitInput, zt as EventBus } from "./errors-CQnlTc1i.mjs";
2
- import { BackupHeader, BackupInfo, InitialFactor, KeyInfo, KeysApi, UnlockFactor, Wallet, WalletInfo } from "@qntx/wallet";
3
- import { LightningInvoice, SparkExitChain, SparkNetwork } from "@qntx/spark";
4
- import { Event, Filter } from "@qntx/nostr";
5
- import { readContract } from "viem/actions";
6
- import { WalletSyncSigner } from "@qntx/wallet/nostr";
7
- import { getEnsAddress } from "viem/ens";
8
- type EngineErrorCode = "closed" | "integrity" | "invalid-input";
9
- /** Typed engine errors: store codes are `closed` and `integrity` (decrypt or bind failure). */
10
- export declare class EngineStoreError extends Error {
11
- readonly code: EngineErrorCode;
12
- constructor(code: EngineErrorCode, message: string);
13
- }
1
+ import { $ as TxBlock, $t as SparkControllerState, A as WatchAssetInput, An as Controller, At as PhishingController, B as AccountRef, Bn as createEventBus, Bt as WithdrawLnurlParams, C as SolanaSignInput, Cn as PublicStore, Ct as SignInOriginError, D as TokenWatchDisplay, Dn as NftTransferError, Dt as dappUrl, E as SparkExitInput, En as NftRefusal, Et as WalletConnectVerify, F as RequestStage, Fn as Esplora, Ft as PrepareZapParams, G as DisplayIntent, Gt as parsePayment, Ht as PaymentOption, I as SignLogEntry, In as SetTimer, It as PreparedZap, J as SendParams, Jt as SparkResult, K as EvmRevokeTarget, Kt as PreparedSparkAction, L as SignLogOutcome, Ln as timeoutSignal, Lt as ZapRecipient, M as WeblnInvoiceResult, Mt as PhishingState, N as ZapInput, Nn as TronFeeQuote, Nt as PhishingStatus, O as TokenWatchResult, On as GatewayConfig, Ot as walletConnectKey, P as requiredAcknowledgement, Pn as TronThrottledError, Pt as PrepareZapContext, Q as TrackedTransaction, Qt as SparkControllerOptions, R as TransactionController, Rn as EngineLogger, Rt as prepareZap, S as SolanaDisplay, Sn as EngineStore, St as RequestOrigin, T as SparkDepositInput, Tn as EngineStoreError, Tt as WalletConnectOrigin, U as ChainRequestInput, Ut as PaymentParse, Vt as ParseOptions, W as DelegationStatus, Wt as PaymentRequest, X as SignedTransactionResult, Xt as SparkClientFactory, Y as SignatureResult, Yt as SparkAccountState, Z as SparkDepositTag, Zt as SparkController, _ as RequestController, _n as AddressFamily, _t as NonceConflictError, a as BitcoinSignResult, an as PaymentNote, at as AcrossBridgeQuote, b as RequestResult, bn as SolanaRpc, bt as RequestEndedError, c as LightningInvoiceDisplay, cn as SolanaFeeTier, ct as AppOrigin, d as NostrSignResult, dn as SimulationOutcome, dt as BitcoinPsbtInput, en as SparkTokenBalance, et as TxState, f as PayInput, fn as SignInFields, ft as BitcoinSigHash, g as RequestAcknowledgement, gt as InvalidTokenError, h as RESIMULATE_AFTER_MS, hn as AddressBookEntry, ht as DappOrigin, i as BitcoinSignInput, in as SparkPaymentState, it as ZeroExSwapQuote, j as WeblnInvoiceInput, jn as ControllerOptions, jt as PhishingControllerOptions, kn as GatewayScope, kt as PHISHING_REFRESH_MS, l as NostrDisplay, ln as EvmFeeTier, lt as BitcoinAccount, m as REQUEST_TTL_MS, mn as AddressBookState, mt as ChainRequestMethod, n as ApproveOptions, nn as SparkPaymentKind, nt as JupiterSwapQuote, o as BlindSigningDisabledError, on as SparkActivity, ot as AcrossBridgeStatus, p as PendingRequest, pn as AddressBookController, pt as BrowserOrigin, q as PrepareParams, qt as SparkDisplay, r as BitcoinDisplay, rn as SparkPaymentRecord, rt as SwapQuote, s as EvmSignInput, sn as RequestCheckCode, st as RiskFinding, t as AcknowledgementRequiredError, tn as sparkStore, tt as JupiterInstruction, u as NostrSignInput, un as AssetChange, ut as BitcoinGroup, v as RequestControllerState, vn as NetworkController, vt as OriginBusyError, w as SolanaSignResult, wn as EngineErrorCode, wt as SolanaAccount, x as SimulationChangedError, xn as EngineCollection, xt as RequestMethod, y as RequestInput, yn as NetworkControllerState, yt as QrOrigin, z as TransactionControllerState, zn as EventBus, zt as PayParams } from "./controller-DpNVHVsj.mjs";
2
+ import { Rt as FIAT_CURRENCIES, cr as FeeModel, dr as NetworkInfo, lr as GasPricing, zt as FiatCurrency } from "./index-vBgfOFIh.mjs";
3
+ import { A as ConnectionScope, C as BitcoinRequest, D as ConnectionController, E as AccountGroup$1, F as PendingConnection, I as SessionAccounts, M as ConnectionState, N as LightningPolicy, O as ConnectionOrigin, P as NostrPolicy, T as BitcoinWalletHandler, _ as Eip1193Event, f as SolanaRequest, g as Nip07Request, h as Nip07Handler, j as ConnectionSession, k as ConnectionRequest, m as SolanaWalletHandler, n as WeblnRequest, p as SolanaWalletAccount, t as WeblnHandler, u as SolanaEvent, v as Eip1193Handler, w as BitcoinWalletAccount, x as BitcoinEvent, y as Eip1193Request } from "./webln-Bllk_xJ2.mjs";
4
+ import { t as ProviderError } from "./errors-B8W-hoYW.mjs";
5
+ import { $ as NFT_POLL_MS, A as BackupControllerState, At as APPROVALS_POLL_MS, B as AccountTreeController, Bt as SessionLink, C as MetaSyncErrorCategory, Ct as Holding, D as HistoryState, Dt as PricesControllerOptions, E as HistoryControllerOptions, Et as PricesController, F as checkCloudName, Ft as ApprovalRow, G as MetaDocWallet, Gt as TokenBalance, H as MetaDoc, Ht as AccountBalances, I as checkCloudText, It as ApprovalSource, J as StakeValidator, Jt as BitcoinSourceKey, K as WatchAccount, Kt as TronAccountView, L as BackupControllerError, Lt as ApprovalSourceState, M as CloudStore, Mt as ApprovalsControllerOptions, N as CloudStoreError, Nt as ApprovalKind, O as HistoryGroup, Ot as PricesFailure, P as CloudStoreErrorCode, Pt as ApprovalRisk, Q as NFT_INVENTORY_MAX_PAGES, R as BackupErrorCategory, Rt as ApprovalsState, S as MetaSyncError, St as ValuedHolding, T as HistoryController, Tt as PriceQuoteState, U as MetaDocGroup, Ut as AssetsController, V as AccountTreeState, Vt as TokenRef, W as MetaDocTree, Wt as AssetsControllerState, X as LidoWithdrawalRequest, Xt as BitcoinUtxoView, Y as LidoPosition, Yt as BitcoinTotals, Z as EnsResolution, _ as MetaSyncConfig, _t as HistoryFlag, a as WalletEngine, at as NftInventory, b as MetaSyncState, bt as PriceView, c as SignerFamily, ct as NftView, d as NotificationEvent, dt as NftCollectionView, et as NftController, f as NotificationStatus, ft as NftItemFacts, g as PushKeyStore, gt as HistoryEntry, h as NotificationsState, ht as HistoryChange, i as ReadonlyStore, it as NftFloorView, j as CLOUD_TEXT_MAX_BYTES, jt as ApprovalsController, k as BackupController, kt as PricesState, l as SignersController, lt as NftAcquisition, m as NotificationsControllerOptions, mt as NftTransferSupport, n as EngineOptions, nt as NftDetailView, o as createWalletEngine, ot as NftResult, p as NotificationsController, pt as NftMedia, q as StakePosition, qt as SpamReason, r as HostController, rt as NftFailure, s as SignerActivity, st as NftState, t as DeepReadonly, tt as NftControllerOptions, u as SignersState, ut as NftSpamReason, v as MetaSyncController, vt as HistoryStatus, w as GroupHistory, wt as PRICES_POLL_MS, x as MetaSyncWalletStatus, xt as Valuation, y as MetaSyncRelayPort, yt as PRICE_STALE_MS, z as AccountGroup, zt as ApprovalsView } from "./engine-Dic_kkEr.mjs";
6
+ import { ChainError } from "@qntx/wallet-chains";
7
+ import "@qntx/wallet-chains/solana";
8
+ import { SparkExitChain } from "@qntx/spark";
9
+ import { chains } from "@qntx/wallet/chains";
10
+ type Decimal = {
11
+ readonly units: bigint;
12
+ readonly scale: number;
13
+ };
14
+ /** The exact value of a decimal string such as a contract `fiatPrice`; throws on anything else. */
15
+ export declare function parseDecimal(text: string): Decimal;
16
+ /** The canonical decimal string: no trailing fractional zeros, no dangling point. */
17
+ export declare const formatDecimal: (value: Decimal) => string;
18
+ /**
19
+ * A stored row's JSON value, or `undefined` when its bytes are not JSON (a torn write, a format
20
+ * another build wrote). Callers treat `undefined` like any other malformed row and skip it.
21
+ */
22
+ export declare const readJson: (bytes: Uint8Array) => unknown;
14
23
  /** In-memory EngineStore: the Node/test implementation — same contract, no durability. */
15
24
  export declare function createMemoryEngineStore(backing?: {
16
25
  readonly collections?: Map<string, Map<string, Uint8Array>>;
@@ -19,628 +28,59 @@ export declare function createMemoryEngineStore(backing?: {
19
28
  export declare function createMemoryPublicStore(backing?: {
20
29
  readonly values?: Map<string, Uint8Array>;
21
30
  }): PublicStore;
22
- type TokenBalance = {
23
- readonly address: string;
24
- readonly symbol: string;
25
- readonly decimals: number;
26
- readonly balance: string;
27
- /** False for user-added tokens until they appear in the built-in table. */
28
- readonly verified: boolean;
29
- };
30
- type AccountBalances = {
31
- readonly native: string;
32
- readonly tokens: ReadonlyArray<TokenBalance>;
33
- /** Bitcoin only — confirmed + own unconfirmed change; frozen 546/330-sat UTXOs shown apart. */
34
- readonly unconfirmed?: string;
35
- readonly frozen?: string;
36
- };
37
- type AssetsControllerState = {
38
- readonly balances: Record<string, AccountBalances>;
39
- };
40
- type Options = {
41
- readonly networks: NetworkController;
42
- readonly openStore: () => Promise<EngineStore>;
43
- readonly setTimer: (ms: number, fn: () => unknown) => () => void;
44
- readonly logger: EngineLogger;
45
- };
46
- export declare class AssetsController extends Controller<AssetsControllerState> {
47
- private readonly options;
48
- private engineStore;
49
- private readonly bitcoinUtxos;
50
- private visible;
51
- private cancelPoll;
52
- private readonly customTokens;
53
- constructor(options: Options);
54
- init(): Promise<void>;
55
- lock(): void;
56
- destroy(): Promise<void>;
57
- setVisible(visible: boolean): void;
58
- private armPoll;
59
- private refreshAll;
60
- /** Reads the address's balances and returns exactly what it wrote under its state key. */
61
- refresh(address: string, network: string): Promise<AccountBalances>;
62
- /** SOL via getBalance; SPL via getTokenAccountsByOwner (jsonParsed) for known mints. */
63
- private refreshSolana;
64
- private readTokens;
65
- private balanceOfBatch;
66
- private balanceOf;
67
- private callToken;
68
- /** Whether `address` is in the built-in token table of `network` or among the custom tokens. */
69
- isTracked(network: string, address: string): boolean;
70
- /** The token's own `symbol` and `decimals` (EVM only); throws when either read fails. */
71
- tokenMetadata(network: string, address: string): Promise<{
72
- readonly symbol: string;
73
- readonly decimals: number;
74
- }>;
75
- /** Reads symbol/decimals on-chain, marks unverified, persists; throws when the calls fail. */
76
- addToken(network: string, address: string): Promise<void>;
77
- private persistToken;
78
- /** BTC balance = confirmed spendable + own unconfirmed change; frozen 546/330 shown separately. */
79
- refreshBitcoin(xpub: string, network: string): Promise<AccountBalances>;
80
- }
81
31
  type AddressBookErrorCategory = "invalid-input" | "duplicate" | "not-found" | "locked" | "limit";
82
32
  export declare class AddressBookError extends Error {
83
33
  readonly category: AddressBookErrorCategory;
84
34
  constructor(category: AddressBookErrorCategory, message: string);
85
35
  }
36
+ /** Why a message's lifetime could not be bound to the configured cluster. */
37
+ type SolanaBindingReason = "genesis-mismatch" | "blockhash-unknown" | "nonce-account-missing" | "nonce-mismatch" | "nonce-account-in-lookup-table" | "unconfirmed" | "testnet-gateway-only";
86
38
  /**
87
- * Wallet metadata document — the plaintext exchanged over kind-30078 events between this wallet's
88
- * own devices. One document per wallet; entry-level last-writer-wins on `updatedAt`.
89
- */
90
- type MetaDocWallet = {
91
- readonly name?: string;
92
- readonly updatedAt: number;
93
- };
94
- type MetaDocGroup = {
95
- readonly index: number;
96
- readonly name?: string;
97
- readonly hidden: boolean;
98
- readonly boundPubkey?: string;
99
- readonly updatedAt: number;
100
- };
101
- /** The per-wallet part of the document: this wallet's name and account groups. */
102
- type MetaDocTree = {
103
- readonly wallet: MetaDocWallet;
104
- readonly groups: ReadonlyArray<MetaDocGroup>;
105
- };
106
- /** Every wallet's document also carries the whole address book, which is shared across wallets. */
107
- type MetaDoc = MetaDocTree & {
108
- readonly v: 2;
109
- readonly contacts: ReadonlyArray<AddressBookRecord>;
110
- };
111
- type AccountGroup = {
112
- readonly walletId: string;
113
- readonly index: number;
114
- /** `discoverGroups` result — family key → used; a family error lives under `errors`. */
115
- readonly used?: Readonly<Record<string, boolean>>;
116
- readonly errors?: Readonly<Record<string, string>>;
117
- readonly name?: string;
118
- readonly hidden: boolean;
119
- /** A social identity (64 lowercase hex) bound to this group; one identity binds one group. */
120
- readonly boundPubkey?: string;
121
- /** Device-local opt-in to signing messages that cannot be shown as text; absent means off. */
122
- readonly blindSigning?: true;
123
- /** Last local modification time (ms); reconcile-created entries start at 0. */
124
- readonly updatedAt: number;
125
- };
126
- type AccountTreeState = {
127
- readonly status: "locked" | "ready";
128
- readonly wallets: ReadonlyArray<{
129
- readonly walletId: string;
130
- readonly name?: string;
131
- readonly updatedAt: number;
132
- }>;
133
- readonly groups: Readonly<Record<string, ReadonlyArray<AccountGroup>>>;
134
- readonly selected: {
135
- readonly walletId: string;
136
- readonly groupIndex: number;
137
- } | null;
138
- readonly totals: Readonly<Record<string, number>>;
139
- };
140
- type DiscoveryNetworks = {
141
- readonly client: (network: string) => {
142
- readonly getTransactionCount: (p: {
143
- readonly address: `0x${string}`;
144
- readonly blockTag: "latest";
145
- }) => Promise<number>;
146
- readonly getBalance: (p: {
147
- readonly address: `0x${string}`;
148
- }) => Promise<bigint>;
149
- };
150
- readonly solanaRpc: (network: string) => {
151
- readonly call: (method: string, params: unknown[]) => Promise<unknown>;
152
- };
153
- readonly esplora: (network: string) => Esplora;
154
- readonly enabled: (family: "evm" | "solana" | "bitcoin") => ReadonlyArray<string>;
155
- };
156
- type AccountTreeControllerOptions = {
157
- readonly wallet: Wallet;
158
- readonly setTimer: (ms: number, fn: () => void) => () => void;
159
- readonly spark: SparkController;
160
- readonly sparkNetwork: SparkNetwork;
161
- readonly networks?: DiscoveryNetworks;
162
- readonly chains?: {
163
- readonly account: (params: {
164
- readonly walletId: string;
165
- readonly groupIndex: number;
166
- readonly template: string;
167
- readonly network: string;
168
- }) => Promise<{
169
- readonly address?: string;
170
- readonly xpub?: string;
171
- }>;
172
- };
173
- readonly logger: EngineLogger;
174
- readonly now: () => number;
175
- };
176
- export declare class AccountTreeController extends Controller<AccountTreeState> {
177
- private readonly options;
178
- private col;
179
- private sparkUnsubscribe;
180
- private cancelTotals;
181
- private persistChain;
182
- /** Every imported private key in the vault — a separate list, never a group member. */
183
- imported: () => Promise<ReadonlyArray<KeyInfo>>;
184
- constructor(options: AccountTreeControllerOptions);
185
- setStore(store: EngineStore | undefined): void;
186
- /** Load persisted state, reconcile with the snapshot, start driving Spark. */
187
- init(): Promise<void>;
188
- destroy(): Promise<void>;
189
- /** Locked: stop every Spark client, flush pending persists, then drop to the empty state. */
190
- lock(): Promise<void>;
191
- /** Reconcile groups/names/selected with `wallet.getSnapshot().wallets`; persists on change. */
192
- reconcile(): void;
193
- addGroup(walletId: string): number;
194
- addGroups(walletId: string, indices: ReadonlyArray<number>): void;
195
- renameWallet(walletId: string, name: string): void;
196
- renameGroup(walletId: string, index: number, name: string): void;
197
- setHidden(walletId: string, index: number, hidden: boolean): void;
198
- /**
199
- * Device-local opt-in to blind signing: no factor, the setting lives in the main runtime —
200
- * per-request verification and the kernel's blind prompt are the real protection.
201
- */
202
- setBlindSigning(walletId: string, index: number, enabled: boolean): void;
203
- /** Whether the group opted in to signing messages that cannot be shown as text. */
204
- blindSigning(walletId: string, index: number): boolean;
205
- select(walletId: string, index: number): void;
206
- /**
207
- * Binds a social identity to one group. The identity is unique across the whole tree — every
208
- * group in every wallet carrying it loses the binding (each entry re-stamped).
209
- */
210
- bind(walletId: string, index: number, pubkey: string): void;
211
- unbind(walletId: string, index: number): void;
212
- /**
213
- * Which group currently holds a pubkey — merges can leave the same identity on groups in two
214
- * wallets; the newest `updatedAt` wins, ties resolve by snapshot wallet order then lower index.
215
- */
216
- bindingOf(pubkey: string): {
217
- walletId: string;
218
- groupIndex: number;
219
- } | undefined;
220
- /** The wallet's metadata document — every group, hidden included. */
221
- exportMeta(walletId: string): MetaDocTree;
222
- /**
223
- * Entry-level last-writer-wins merge: a newer remote `updatedAt` replaces the local entry, a tie
224
- * keeps local; remote-only groups are added. `selected`/hidden rules are re-validated — if the
225
- * merge hides the selected group it is re-selected, and a merge may never leave every group
226
- * hidden (the selected one stays visible and is re-stamped so the fix propagates).
227
- */
228
- mergeMeta(walletId: string, doc: MetaDocTree): {
229
- changed: boolean;
230
- localNewer: boolean;
231
- };
232
- /** Sequential inspect from 0 upward; index 0 always included; stop after 2 consecutive unused. */
233
- discoverSpark(walletId: string): Promise<number[]>;
234
- /**
235
- * Per-group chain-family discovery — same stop rule as `discoverSpark`: group 0 always, stop
236
- * after two consecutive fully-unused groups. A family error is reported on the group and does NOT
237
- * count as unused (the group stays in `found` — it can't be proven empty).
238
- */
239
- discoverGroups(walletId: string): Promise<number[]>;
240
- /** Refresh `totals` for every other visible group; per-group failures are logged and skipped. */
241
- refreshTotals(): Promise<void>;
242
- private onSparkState;
243
- private setTotal;
244
- private driveSpark;
245
- private visibleGroups;
246
- private validSelection;
247
- private selectFallback;
248
- private mutateGroups;
249
- private mustWallet;
250
- private mustGroup;
251
- private checkedName;
252
- private load;
253
- /** Queues a store write behind the previous one — the last queued write always lands last. */
254
- private persist;
255
- private scheduleTotalsPersist;
256
- private flushTotals;
257
- }
258
- /**
259
- * A watch-only account: an address the wallet tracks but can never sign for. Kept out of
260
- * `AccountRef` deliberately — a watch account can never reach a signing/request input.
39
+ * A `solana-sign` lifetime that cannot be proven to belong to the session's cluster. `code` is
40
+ * `invalid-request` like every other binding refusal; `reason` names which check failed.
261
41
  */
262
- type WatchAccount = {
263
- readonly id: string;
264
- readonly family: "evm" | "solana" | "bitcoin";
265
- readonly address: string;
266
- readonly name?: string;
267
- readonly createdAt: number;
268
- };
269
- /** BackupController error categories — never carry file contents, digests or secrets. */
270
- type BackupErrorCategory = "cloud" | "conflict" | "unavailable";
271
- export declare class BackupControllerError extends Error {
272
- readonly category: BackupErrorCategory;
273
- constructor(category: BackupErrorCategory, message: string);
42
+ export declare class SolanaClusterBindingError extends ChainError {
43
+ readonly reason: SolanaBindingReason;
44
+ constructor(reason: SolanaBindingReason, message: string);
274
45
  }
275
46
  /**
276
- * Cloud-file storage port (design/backup.mdx "存储"): the cloud is an opaque key-value namespace —
277
- * names are file names (`qntx-wallet-backup-<id>.json`), contents are envelope texts. The kernel
278
- * never sees it; only the engine transports ciphertext across it.
47
+ * How well a backup password resists guessing. The backup envelope leaves the device, so its
48
+ * password is attacked offline with no rate limit; Argon2id makes each guess expensive, and this
49
+ * estimate keeps the number of guesses an attacker needs out of reach. The estimator and its
50
+ * dictionaries load on first use and stay out of the engine's initial bundle.
279
51
  */
280
- type CloudStore = {
281
- /** Cloud account usable and the drive reachable. */
282
- readonly available: () => Promise<boolean>;
283
- /** Every file name in the namespace. */
284
- readonly list: () => Promise<ReadonlyArray<string>>;
285
- /** File contents, or undefined when the name does not exist. */
286
- readonly read: (name: string) => Promise<string | undefined>;
287
- /** Overwrites the whole file atomically from the caller's perspective. */
288
- readonly write: (name: string, text: string) => Promise<void>;
289
- /** Deleting a missing file succeeds. */
290
- readonly delete: (name: string) => Promise<void>;
52
+ type BackupPasswordStrength = {
53
+ /** 0 (trivially guessed) to 4 (at least 10^10 guesses). */
54
+ readonly score: 0 | 1 | 2 | 3 | 4;
55
+ /** Whether `backup.enable` accepts the password. */
56
+ readonly acceptable: boolean;
291
57
  };
292
- type BackupControllerState = {
293
- readonly status: "locked" | "unavailable" | "off" | "syncing" | "synced" | "conflict" | "error";
294
- /** The retained backup key's public summary from the wallet snapshot. */
295
- readonly backup: BackupInfo | null;
296
- readonly uploadedAt: number | undefined;
297
- readonly unprotected: {
298
- readonly walletIds: ReadonlyArray<string>;
299
- };
300
- readonly error: BackupErrorCategory | undefined;
301
- };
302
- type BackupControllerOptions = {
303
- readonly wallet: Wallet;
304
- readonly cloud: CloudStore | undefined;
305
- readonly now: () => number;
306
- readonly logger: EngineLogger;
307
- };
308
- export declare class BackupController extends Controller<BackupControllerState> {
309
- private readonly wallet;
310
- private readonly cloud;
311
- private readonly now;
312
- private readonly logger;
313
- private engineStore;
314
- private generation;
315
- private current;
316
- private rerun;
317
- /** Set by restore() before the store opens — written as a record on the first reconcile. */
318
- private pendingAdoption;
319
- constructor(options: BackupControllerOptions);
320
- init(): Promise<void>;
321
- destroy(): Promise<void>;
322
- /** The engine hands over the store on unlock and takes it back on lock. */
323
- setStore(store: EngineStore | undefined): void;
324
- /** Bumps the generation: an in-flight reconcile writes nothing after this point. */
325
- lock(): void;
326
- trigger(): void;
327
- private triggerAsync;
328
- /** Explicit sync — awaits the run so callers see its outcome. */
329
- sync(): Promise<void>;
330
- enable(options: {
331
- readonly verify: UnlockFactor;
332
- readonly factors: ReadonlyArray<UnlockFactor>;
333
- }): Promise<void>;
334
- disable(): Promise<void>;
335
- /** Files under our prefix with a parseable header. */
336
- list(): Promise<ReadonlyArray<{
337
- readonly name: string;
338
- readonly header: BackupHeader;
339
- }>>;
340
- /**
341
- * Merges a cloud backup into the vault. Wallets with a BIP-39 passphrase restore only when
342
- * `passphrases` carries theirs; the rest come back in `passphraseRequired`.
343
- */
344
- restore(options: {
345
- readonly name: string;
346
- readonly backupFactor: UnlockFactor;
347
- readonly passphrases?: ReadonlyArray<{
348
- readonly walletId: string;
349
- readonly passphrase: string;
350
- }>;
351
- readonly factor?: InitialFactor;
352
- }): Promise<{
353
- readonly wallets: ReadonlyArray<WalletInfo>;
354
- readonly passphraseRequired: ReadonlyArray<string>;
355
- }>;
356
- private reconcileOrThrow;
357
- private readRecord;
358
- private writeRecord;
359
- private deleteRecord;
360
- private snapshot;
361
- private unprotected;
362
- private coverage;
363
- private setStatus;
364
- /**
365
- * Single-flight: a trigger during a run flags exactly one rerun inside the same promise, so
366
- * `sync()`/`enable()` await real convergence instead of a mid-run snapshot.
367
- */
368
- private reconcile;
369
- private pass;
370
- }
371
- type LidoWithdrawalRequest = {
372
- readonly id: bigint;
373
- readonly amountOfStETH: bigint;
374
- readonly timestamp: number;
375
- readonly status: "pending" | "claimable" | "claimed";
376
- readonly claimableEther?: bigint;
377
- };
378
- type LidoPosition = {
379
- readonly stETH: bigint;
380
- readonly requests: ReadonlyArray<LidoWithdrawalRequest>;
381
- };
382
- /** Meta-sync error categories — messages never carry event or document content. */
383
- type MetaSyncErrorCategory = "network" | "internal" | "unsupported" | "corrupt";
384
- export declare class MetaSyncError extends Error {
385
- readonly category: MetaSyncErrorCategory;
386
- constructor(category: MetaSyncErrorCategory, message: string, cause?: unknown);
387
- }
388
- type MetaSyncRelayPort = {
389
- readonly fetch: (filter: Filter) => Promise<ReadonlyArray<Event>>;
390
- readonly publish: (event: Event) => Promise<void>;
391
- };
392
- type MetaSyncConfig = {
393
- /** The `d` tag that names this wallet's metadata document. */
394
- readonly tag: string;
395
- readonly relays: MetaSyncRelayPort;
396
- };
397
- type MetaSyncWalletStatus = {
398
- readonly status: "syncing" | "synced" | "error";
399
- readonly error?: MetaSyncErrorCategory;
400
- };
401
- type MetaSyncState = {
402
- readonly wallets: Readonly<Record<string, MetaSyncWalletStatus>>;
403
- };
404
- /** What the sync needs from the address book: its records, a merge, and a change subscription. */
405
- type AddressBookSync = {
406
- readonly syncEntries: () => ReadonlyArray<AddressBookRecord>;
407
- readonly merge: (remote: ReadonlyArray<AddressBookRecord>) => Promise<{
408
- readonly changed: boolean;
409
- readonly localNewer: boolean;
410
- }>;
411
- readonly store: {
412
- readonly subscribe: (listener: () => void) => () => void;
413
- };
414
- };
415
- type MetaSyncControllerOptions = {
416
- readonly wallet: Wallet;
417
- readonly accounts: AccountTreeController;
418
- readonly addressBook: AddressBookSync;
419
- /** `nostr(wallet).syncSigner` — each wallet signs metadata with its dedicated sync key. */
420
- readonly nostr: {
421
- readonly syncSigner: (walletId: string) => WalletSyncSigner;
422
- };
423
- readonly metaSync: MetaSyncConfig | undefined;
424
- readonly logger: EngineLogger;
425
- readonly now: () => number;
426
- readonly setTimer: (ms: number, fn: () => void) => () => void;
427
- readonly verifyEvent: (event: Event) => boolean;
428
- };
429
- /**
430
- * Wallet-metadata sync over kind-30078 addressable events: one NIP-44-encrypted document per
431
- * wallet, authored by its dedicated sync key (WD-070). Pull always precedes publish in an unlock
432
- * session — replaceable events would otherwise let a stale local tree overwrite a newer remote
433
- * document. Debounced publishes are per wallet; a generation counter cancels in-flight write-backs
434
- * on lock.
435
- */
436
- export declare class MetaSyncController extends Controller<MetaSyncState> {
437
- private readonly options;
438
- private generation;
439
- private readonly pulled;
440
- private readonly lastRemoteCreatedAt;
441
- private readonly lastExported;
442
- private readonly timers;
443
- private readonly inflight;
444
- private accountsUnsubscribe;
445
- private addressBookUnsubscribe;
446
- constructor(options: MetaSyncControllerOptions);
447
- /** Unlocked: pull every wallet whose group-0 identity exists, then watch the tree. */
448
- init(): Promise<void>;
449
- destroy(): Promise<void>;
450
- /** Locked: cancel debounces and in-flight write-backs, forget the pull/publish bookkeeping. */
451
- lock(): Promise<void>;
452
- /** Snapshot changed while unlocked: pull newly-seen wallets, drop removed ones. */
453
- reconcile(): void;
454
- /** Manual re-pull of every wallet that can sync. */
455
- sync(): Promise<void>;
456
- private pullAll;
457
- private setStatus;
458
- private pullOne;
459
- /** The wallet's tree plus the shared address book — every wallet's document carries both. */
460
- private exportDoc;
461
- private filterFor;
462
- private acceptableEvent;
463
- /** Snapshot the wallet's exported doc — the debounce publishes only on a real change. */
464
- private rememberExport;
465
- private onTreeChange;
466
- private publishNow;
467
- }
468
- type EnsResolution = {
469
- readonly name: string;
470
- readonly address: string;
471
- readonly checks: ReadonlyArray<RequestCheckCode>;
472
- };
473
- type StakePosition = {
474
- readonly address: string;
475
- readonly seed: string;
476
- readonly lamports: bigint;
477
- /**
478
- * Display approximation of the activation state — warmup and cooldown are rate-limited, so an
479
- * "active" account can still be partially activating and a "deactivating" one partly liquid.
480
- */
481
- readonly state: "initialized" | "activating" | "active" | "deactivating" | "inactive";
482
- readonly validator?: string;
483
- readonly activationEpoch?: bigint;
484
- readonly deactivationEpoch?: bigint;
485
- };
486
- type StakeValidator = {
487
- readonly vote: string;
488
- readonly node: string;
489
- readonly commission: number;
490
- readonly activatedStake: bigint;
491
- };
492
- type EngineOptions = {
493
- readonly wallet: Wallet;
494
- /**
495
- * Verifies events the engine checks itself (external-signer zap requests, relay metadata
496
- * documents). Required, with no default: `@qntx/nostr`'s own `verifyEvent` is bound to the
497
- * pure-JS noble backend — pass the host's native verifier, the same one given to the wallet.
498
- */
499
- readonly verifyEvent: (event: Event) => boolean;
500
- /** Every Spark account the engine touches lives on this network. */
501
- readonly sparkNetwork: SparkNetwork;
58
+ export declare function backupPasswordStrength(password: string): Promise<BackupPasswordStrength>;
59
+ /** In-memory CloudStore for tests and the playground; swap the Map for cross-engine sharing. */
60
+ export declare function createMemoryCloudStore(backing?: Map<string, string>): CloudStore;
61
+ type GoogleDriveCloudStoreOptions = {
502
62
  readonly fetch: typeof globalThis.fetch;
503
- readonly random: (length: number) => Uint8Array;
504
- readonly now: () => number;
505
- /** The WebLN node's display alias — `getInfo` never exposes a pubkey. */
506
- readonly weblnAlias: string;
507
- /** The host's lightning fee cap for WebLN sends — validated to a non-negative safe integer. */
508
- readonly lightningMaxFee: (amountSats: number) => number;
509
- readonly logger: EngineLogger;
510
- readonly openStore: () => Promise<EngineStore>;
511
- /** The host surfaces a call bundle's status page — `wallet_showCallsStatus` triggers it. */
512
- readonly showCallsStatus: (request: {
513
- readonly origin: string;
514
- readonly txIds: ReadonlyArray<string>;
515
- }) => void;
516
- /**
517
- * Non-secret device data (the phishing list, the origins the user trusts), available while the
518
- * wallet is locked: a page can be opened before the first unlock.
519
- */
520
- readonly publicStore: PublicStore;
521
- /** Cloud file transport for the backup controller; absent → `unavailable`. */
522
- readonly cloud?: CloudStore;
523
- /**
524
- * Host endpoints per network (CAIP-2), ordered by preference, for all three chain families: EVM
525
- * and Solana JSON-RPC URLs, and for Bitcoin the Esplora base URL.
526
- */
527
- readonly rpc?: Readonly<Record<string, ReadonlyArray<string>>>;
528
- /**
529
- * The wallet gateway: tried first for the networks it serves (read at each unlock) unless a
530
- * network has custom endpoints. The install id is sent only to the gateway's origin.
531
- */
532
- readonly gateway?: {
533
- readonly url: string;
534
- readonly installId: string;
535
- };
536
- /** Development builds: also accept `http://localhost` as a dApp origin. */
537
- readonly allowLocalhostOrigins?: boolean;
538
- /** Injected timer for polling and refresh loops; defaults to setTimeout. */
539
- readonly setTimer?: (ms: number, fn: () => void) => () => void;
540
- /** Kind-30078 wallet-metadata sync; absent → no wallet metadata is synced. */
541
- readonly metaSync?: MetaSyncConfig;
542
- /** Test seam — defaults to the wallet's real spark proxy. */
543
- readonly sparkApis?: SparkControllerOptions["spark"];
544
- };
545
- type WalletEngine = {
546
- readonly networks: NetworkController;
547
- readonly assets: AssetsController;
548
- readonly transactions: TransactionController;
549
- readonly requests: RequestController;
550
- readonly addressBook: AddressBookController;
551
- readonly connections: ConnectionController;
552
- readonly eip1193: Eip1193Handler;
553
- readonly nip07: Nip07Handler;
554
- readonly webln: WeblnHandler;
555
- readonly solanaWallet: SolanaWalletHandler;
556
- readonly bitcoinWallet: BitcoinWalletHandler;
557
- /** The phishing list: lifecycle is independent of the lock state. */
558
- readonly phishing: PhishingController;
559
- /** Read and receive surface; every payment goes through `requests`. */
560
- readonly spark: Omit<SparkController, "send" | "payInvoice" | "paySparkInvoice" | "withdraw">;
561
- readonly accounts: AccountTreeController;
562
- readonly watch: {
563
- readonly add: (input: {
564
- readonly family: "evm" | "solana" | "bitcoin";
565
- readonly address: string;
566
- readonly name?: string;
567
- }) => Promise<WatchAccount>;
568
- readonly rename: (id: string, name: string) => Promise<void>;
569
- readonly remove: (id: string) => Promise<void>;
570
- readonly list: () => ReadonlyArray<WatchAccount>;
571
- readonly assets: (id: string, network: string) => Promise<AccountBalances>;
572
- };
573
- readonly metaSync: MetaSyncController;
574
- readonly backup: BackupController;
575
- readonly zaps: {
576
- readonly prepare: (params: PrepareZapParams) => Promise<PreparedZap>;
577
- };
578
- readonly names: {
579
- /** Forward-resolves an ENS name for a send on `network`; throws when it cannot resolve. */
580
- readonly resolve: (name: string, network: string) => Promise<EnsResolution>;
581
- };
582
- /** The account's EIP-7702 delegation state on `network`. */
583
- readonly delegation: (account: AccountRef, network: string) => Promise<DelegationStatus>;
63
+ readonly setTimer: SetTimer;
584
64
  /**
585
- * A gateway Across bridge quote — display-only; `undefined` when the route has no liquidity.
586
- * `status` reads the Across deposit-status API; neither affects signing.
65
+ * A current `drive.appdata` access token; throws CloudStoreError("auth-required") without
66
+ * consent.
587
67
  */
588
- readonly bridges: {
589
- readonly quote: (params: {
590
- readonly account: AccountRef;
591
- readonly network: string;
592
- readonly destinationNetwork: string;
593
- readonly inputToken: string;
594
- readonly outputToken: string;
595
- readonly amount: bigint;
596
- }) => Promise<AcrossBridgeQuote | undefined>;
597
- readonly status: (params: {
598
- readonly network: string;
599
- readonly txHash: string;
600
- }) => Promise<AcrossBridgeStatus>;
601
- };
602
- /** A gateway 0x swap quote — display-only; `undefined` when the quote has no liquidity. */
603
- /** Imported single private keys held in the vault — passthrough to `wallet.keys`. */
604
- readonly keys: KeysApi;
605
- readonly swaps: {
606
- readonly quote: (params: {
607
- readonly account: AccountRef;
608
- readonly network: string;
609
- readonly sell: string;
610
- readonly buy: string;
611
- readonly amount: bigint;
612
- readonly slippageBps: number;
613
- }) => Promise<SwapQuote | undefined>;
614
- };
615
- /** Lido liquid staking on Ethereum mainnet — stETH balance and withdrawal requests. */
616
- readonly lido: {
617
- readonly position: (account: AccountRef) => Promise<LidoPosition>;
618
- };
619
- /** Solana staking reads — the account's stake positions and the current validator set. */
620
- readonly staking: {
621
- readonly positions: (account: AccountRef, network: string) => Promise<ReadonlyArray<StakePosition>>;
622
- readonly validators: (network: string) => Promise<ReadonlyArray<StakeValidator>>;
623
- };
624
- readonly payments: {
625
- readonly parse: (input: string, network: SparkNetwork) => PaymentParse;
626
- readonly resolve: (input: string, network: SparkNetwork) => Promise<PaymentParse>;
627
- /** Receives funds from an LNURL-withdraw service; needs no verification factor. */
628
- readonly withdrawLnurl: (params: WithdrawLnurlParams) => Promise<{
629
- readonly kind: "lnurl-withdraw";
630
- readonly invoice: LightningInvoice;
631
- }>;
632
- };
633
- /** Stops listening to the wallet and stops the phishing list refresh. */
634
- readonly unsubscribe: () => void;
68
+ readonly token: () => Promise<string>;
69
+ /** Drops a token Drive rejected with 401 so the next `token()` mints a fresh one. */
70
+ readonly invalidateToken: (token: string) => Promise<void>;
635
71
  };
636
- export declare function createWalletEngine(options: EngineOptions): WalletEngine;
637
- /** In-memory CloudStore for tests and the playground; swap the Map for cross-engine sharing. */
638
- export declare function createMemoryCloudStore(backing?: Map<string, string>): CloudStore;
72
+ export declare function createGoogleDriveCloudStore({ fetch: doFetch, setTimer, token, invalidateToken }: GoogleDriveCloudStoreOptions): CloudStore;
639
73
  /** SparkController error categories — never carry request bytes or secrets. */
640
- type SparkErrorCategory = "network" | "approval-required" | "insufficient-funds" | "rejected" | "internal";
74
+ type SparkErrorCategory = "network" | "approval-required" | "insufficient-funds" | "rejected" |
75
+ /** The payment may have committed; `payment` is its open record. */
76
+ "unknown" |
77
+ /** An open `unknown` record already holds this payment's intent — resending risks a double pay. */
78
+ "duplicate" | "internal";
641
79
  export declare class SparkControllerError extends Error {
642
80
  readonly category: SparkErrorCategory;
643
- constructor(category: SparkErrorCategory, message: string, cause?: unknown);
81
+ /** An "unknown" outcome's payment record — open until the Spark operator answers. */
82
+ readonly payment?: SparkPaymentRecord;
83
+ constructor(category: SparkErrorCategory, message: string, cause?: unknown, payment?: SparkPaymentRecord);
644
84
  }
645
85
  /** Account-tree error categories — messages never carry secrets. */
646
86
  type AccountTreeErrorCategory = "invalid-input" | "rejected" | "not-found" | "locked";
@@ -665,5 +105,5 @@ type ResolveOptions = ParseOptions & {
665
105
  export declare function resolvePayment(input: string, options: ResolveOptions): Promise<PaymentParse>;
666
106
  export declare function encodeExitChain(chain: SparkExitChain): Uint8Array;
667
107
  export declare function decodeExitChain(bytes: Uint8Array): SparkExitChain;
668
- export { type AccountBalances, type AccountGroup, type AccountTreeState, AddressBookController, type AddressBookEntry, type AddressBookErrorCategory, type AddressBookState, type AddressFamily, type BackupControllerState, type BackupErrorCategory, type BrowserOrigin, type CloudStore, type AccountGroup$1 as ConnectionAccountGroup, ConnectionController, type ConnectionOrigin, type ConnectionScope, type ConnectionSession, type ConnectionState, Controller, type ControllerOptions, type Eip1193Event, Eip1193Handler, type Eip1193Request, type EngineCollection, type EngineErrorCode, type EngineLogger, type EngineOptions, type EngineStore, type EventBus, type EvmSignInput, type MetaDoc, type MetaDocGroup, type MetaDocTree, type MetaDocWallet, type MetaSyncConfig, type MetaSyncRelayPort, type MetaSyncState, type MetaSyncWalletStatus, PHISHING_REFRESH_MS, type PayInput, type PayParams, type PaymentNote, type PaymentOption, type PaymentParse, type PaymentRequest, type PendingConnection, type PendingRequest, PhishingController, type PhishingControllerOptions, type PhishingState, type PhishingStatus, type PrepareZapContext, type PrepareZapParams, type PreparedSparkAction, type PreparedZap, ProviderError, type PublicStore, REQUEST_TTL_MS, RESIMULATE_AFTER_MS, type RequestCheckCode, RequestController, type RequestControllerState, type RequestInput, type RequestMethod, type RequestOrigin, type RequestStage, type RiskFinding, type SignLogEntry, type SignLogOutcome, type SignatureResult, type SparkAccountState, type SparkActivity, type SparkClientFactory, SparkController, type SparkControllerOptions, type SparkControllerState, type SparkDepositInput, type SparkDisplay, type SparkErrorCategory, type SparkExitInput, type SparkResult, type TokenBalance, type WalletEngine, type WithdrawLnurlParams, type ZapRecipient, createEventBus, parsePayment, prepareZap, sparkStore };
108
+ export { APPROVALS_POLL_MS, type AccountBalances, type AccountGroup, type AccountRef, AccountTreeController, type AccountTreeErrorCategory, type AccountTreeState, AcknowledgementRequiredError, type AcrossBridgeQuote, type AcrossBridgeStatus, AddressBookController, type AddressBookEntry, type AddressBookErrorCategory, type AddressBookState, type AddressFamily, type AppOrigin, type ApprovalKind, type ApprovalRisk, type ApprovalRow, type ApprovalSource, type ApprovalSourceState, ApprovalsController, type ApprovalsControllerOptions, type ApprovalsState, type ApprovalsView, type ApproveOptions, type AssetChange, AssetsController, type AssetsControllerState, BackupController, BackupControllerError, type BackupControllerState, type BackupErrorCategory, type BackupPasswordStrength, type BitcoinAccount, type BitcoinDisplay, type BitcoinEvent, type BitcoinGroup, type BitcoinPsbtInput, type BitcoinRequest, type BitcoinSigHash, type BitcoinSignInput, type BitcoinSignResult, type BitcoinSourceKey, type BitcoinTotals, type BitcoinUtxoView, type BitcoinWalletAccount, type BitcoinWalletHandler, BlindSigningDisabledError, type BrowserOrigin, CLOUD_TEXT_MAX_BYTES, type ChainRequestInput, type ChainRequestMethod, type CloudStore, CloudStoreError, type CloudStoreErrorCode, type AccountGroup$1 as ConnectionAccountGroup, ConnectionController, type ConnectionOrigin, type ConnectionRequest, type ConnectionScope, type ConnectionSession, type ConnectionState, Controller, type ControllerOptions, type DappOrigin, type Decimal, type DeepReadonly, type DelegationStatus, type DisplayIntent, type Eip1193Event, Eip1193Handler, type Eip1193Request, type EngineCollection, type EngineErrorCode, type EngineLogger, type EngineOptions, type EngineStore, EngineStoreError, type EnsResolution, type Esplora, type EventBus, type EvmFeeTier, type EvmRevokeTarget, type EvmSignInput, FIAT_CURRENCIES, type FeeModel, type FiatCurrency, type GasPricing, type GatewayConfig, type GatewayScope, type GoogleDriveCloudStoreOptions, type GroupHistory, type HistoryChange, HistoryController, type HistoryControllerOptions, type HistoryEntry, type HistoryFlag, type HistoryGroup, type HistoryState, type HistoryStatus, type Holding, type HostController, InvalidTokenError, type JupiterInstruction, type JupiterSwapQuote, type LidoPosition, type LidoWithdrawalRequest, type LightningInvoiceDisplay, type LightningPolicy, type MetaDoc, type MetaDocGroup, type MetaDocTree, type MetaDocWallet, type MetaSyncConfig, MetaSyncController, MetaSyncError, type MetaSyncErrorCategory, type MetaSyncRelayPort, type MetaSyncState, type MetaSyncWalletStatus, NFT_INVENTORY_MAX_PAGES, NFT_POLL_MS, type NetworkController, type NetworkControllerState, type NetworkInfo, type NftAcquisition, type NftCollectionView, NftController, type NftControllerOptions, type NftDetailView, type NftFailure, type NftFloorView, type NftInventory, type NftItemFacts, type NftMedia, type NftRefusal, type NftResult, type NftSpamReason, type NftState, NftTransferError, type NftTransferSupport, type NftView, type Nip07Handler, type Nip07Request, NonceConflictError, type NostrDisplay, type NostrPolicy, type NostrSignInput, type NostrSignResult, type NotificationEvent, type NotificationStatus, NotificationsController, type NotificationsControllerOptions, type NotificationsState, OriginBusyError, PHISHING_REFRESH_MS, PRICES_POLL_MS, PRICE_STALE_MS, type ParseOptions, type PayInput, type PayParams, type PaymentErrorCategory, type PaymentNote, type PaymentOption, type PaymentParse, type PaymentRequest, type PendingConnection, type PendingRequest, PhishingController, type PhishingControllerOptions, type PhishingState, type PhishingStatus, type PrepareParams, type PrepareZapContext, type PrepareZapParams, type PreparedSparkAction, type PreparedZap, type PriceQuoteState, type PriceView, PricesController, type PricesControllerOptions, type PricesFailure, type PricesState, ProviderError, type PublicStore, type PushKeyStore, type QrOrigin, REQUEST_TTL_MS, RESIMULATE_AFTER_MS, type ReadonlyStore, type RequestAcknowledgement, type RequestCheckCode, RequestController, type RequestControllerState, RequestEndedError, type RequestInput, type RequestMethod, type RequestOrigin, type RequestResult, type RequestStage, type ResolveOptions, type RiskFinding, type SendParams, type SessionAccounts, type SessionLink, type SetTimer, type SignInFields, SignInOriginError, type SignLogEntry, type SignLogOutcome, type SignatureResult, type SignedTransactionResult, type SignerActivity, type SignerFamily, SignersController, type SignersState, SimulationChangedError, type SimulationOutcome, type SolanaAccount, type SolanaBindingReason, type SolanaDisplay, type SolanaEvent, type SolanaFeeTier, type SolanaRequest, type SolanaRpc, type SolanaSignInput, type SolanaSignResult, type SolanaWalletAccount, type SolanaWalletHandler, type SpamReason, type SparkAccountState, type SparkActivity, type SparkClientFactory, SparkController, type SparkControllerOptions, type SparkControllerState, type SparkDepositInput, type SparkDepositTag, type SparkDisplay, type SparkErrorCategory, type SparkExitInput, type SparkPaymentKind, type SparkPaymentRecord, type SparkPaymentState, type SparkResult, type SparkTokenBalance, type StakePosition, type StakeValidator, type SwapQuote, type TokenBalance, type TokenRef, type TokenWatchDisplay, type TokenWatchResult, type TrackedTransaction, type TransactionController, type TransactionControllerState, type TronAccountView, type TronFeeQuote, TronThrottledError, type TxBlock, type TxState, type Valuation, type ValuedHolding, type WalletConnectOrigin, type WalletConnectVerify, type WalletEngine, type WatchAccount, type WatchAssetInput, type WeblnHandler, type WeblnInvoiceInput, type WeblnInvoiceResult, type WeblnRequest, type WithdrawLnurlParams, type ZapInput, type ZapRecipient, type ZeroExSwapQuote, checkCloudName, checkCloudText, createEventBus, createWalletEngine, dappUrl, parsePayment, prepareZap, requiredAcknowledgement, sparkStore, timeoutSignal, walletConnectKey };
669
109
  //# sourceMappingURL=index.d.mts.map