@qntx/wallet-engine 0.12.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.
- package/README.md +1057 -20
- package/dist/apps-fiat24.d.mts +202 -0
- package/dist/apps-fiat24.mjs +1378 -0
- package/dist/apps-fiat24.mjs.map +1 -0
- package/dist/apps-hyperliquid.d.mts +549 -0
- package/dist/apps-hyperliquid.mjs +2742 -0
- package/dist/apps-hyperliquid.mjs.map +1 -0
- package/dist/apps-polymarket.d.mts +729 -0
- package/dist/apps-polymarket.mjs +3786 -0
- package/dist/apps-polymarket.mjs.map +1 -0
- package/dist/apps.d.mts +136 -0
- package/dist/apps.mjs +535 -0
- package/dist/apps.mjs.map +1 -0
- package/dist/connect-BY1C5ZRI.mjs +210 -0
- package/dist/connect-BY1C5ZRI.mjs.map +1 -0
- package/dist/connect.d.mts +17 -9
- package/dist/connect.mjs +3 -185
- package/dist/controller-DpNVHVsj.d.mts +2295 -0
- package/dist/controller-rMnaxKAH.mjs +46 -0
- package/dist/controller-rMnaxKAH.mjs.map +1 -0
- package/dist/decimal-COJ4g8qy.mjs +38 -0
- package/dist/decimal-COJ4g8qy.mjs.map +1 -0
- package/dist/eligibility-BfM9ybYZ.mjs +48 -0
- package/dist/eligibility-BfM9ybYZ.mjs.map +1 -0
- package/dist/engine-Dic_kkEr.d.mts +1829 -0
- package/dist/errors-B8W-hoYW.d.mts +7 -0
- package/dist/errors-horUy5k1.mjs +24 -0
- package/dist/errors-horUy5k1.mjs.map +1 -0
- package/dist/gateway-contract.d.mts +3 -362
- package/dist/gateway-contract.mjs +1531 -81
- package/dist/gateway-contract.mjs.map +1 -1
- package/dist/idb.d.mts +5 -0
- package/dist/idb.mjs +122 -46
- package/dist/idb.mjs.map +1 -1
- package/dist/index-vBgfOFIh.d.mts +2227 -0
- package/dist/index.d.mts +58 -515
- package/dist/index.mjs +22314 -4901
- package/dist/index.mjs.map +1 -1
- package/dist/json-BDwV38cj.mjs +15 -0
- package/dist/json-BDwV38cj.mjs.map +1 -0
- package/dist/link-Ceq8Dggp.mjs +139 -0
- package/dist/link-Ceq8Dggp.mjs.map +1 -0
- package/dist/primitives-DbSHLZKq.mjs +31 -0
- package/dist/primitives-DbSHLZKq.mjs.map +1 -0
- package/dist/push-message-AQuzoNFY.d.mts +84 -0
- package/dist/push-message-kbnH1A5w.mjs +142 -0
- package/dist/push-message-kbnH1A5w.mjs.map +1 -0
- package/dist/push.d.mts +13 -0
- package/dist/push.mjs +70 -0
- package/dist/push.mjs.map +1 -0
- package/dist/qr.d.mts +292 -0
- package/dist/qr.mjs +1725 -0
- package/dist/qr.mjs.map +1 -0
- package/dist/registry-CbtwcxkX.mjs +374 -0
- package/dist/registry-CbtwcxkX.mjs.map +1 -0
- package/dist/risk-DyABgg4W.mjs +757 -0
- package/dist/risk-DyABgg4W.mjs.map +1 -0
- package/dist/session-CNJFLarP.mjs +18 -0
- package/dist/session-CNJFLarP.mjs.map +1 -0
- package/dist/socket-ChG9JRT_.mjs +110 -0
- package/dist/socket-ChG9JRT_.mjs.map +1 -0
- package/dist/spi-BrTw5s98.d.mts +3 -0
- package/dist/timer-Cdk5rGM2.mjs +43 -0
- package/dist/timer-Cdk5rGM2.mjs.map +1 -0
- package/dist/types-BpvioFGo.d.mts +258 -0
- package/dist/types-DbftVZ3I.mjs +90 -0
- package/dist/types-DbftVZ3I.mjs.map +1 -0
- package/dist/walletconnect.d.mts +86 -0
- package/dist/walletconnect.mjs +1507 -0
- package/dist/walletconnect.mjs.map +1 -0
- package/dist/webln-BgrtPXpG.mjs +2593 -0
- package/dist/webln-BgrtPXpG.mjs.map +1 -0
- package/dist/webln-Bllk_xJ2.d.mts +666 -0
- package/package.json +94 -19
- package/dist/connect.mjs.map +0 -1
- package/dist/errors-DpkJneDe.d.mts +0 -1696
- package/dist/registry-Deo5WQe1.d.mts +0 -25
- package/dist/registry-wYrcuFNc.mjs +0 -99
- package/dist/registry-wYrcuFNc.mjs.map +0 -1
- package/dist/webln-DzsI7jVb.mjs +0 -3629
- package/dist/webln-DzsI7jVb.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|
|
13
23
|
/** In-memory EngineStore: the Node/test implementation — same contract, no durability. */
|
|
14
24
|
export declare function createMemoryEngineStore(backing?: {
|
|
15
25
|
readonly collections?: Map<string, Map<string, Uint8Array>>;
|
|
@@ -23,521 +33,54 @@ export declare class AddressBookError extends Error {
|
|
|
23
33
|
readonly category: AddressBookErrorCategory;
|
|
24
34
|
constructor(category: AddressBookErrorCategory, message: string);
|
|
25
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";
|
|
26
38
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
type MetaDocWallet = {
|
|
31
|
-
readonly name?: string;
|
|
32
|
-
readonly updatedAt: number;
|
|
33
|
-
};
|
|
34
|
-
type MetaDocGroup = {
|
|
35
|
-
readonly index: number;
|
|
36
|
-
readonly name?: string;
|
|
37
|
-
readonly hidden: boolean;
|
|
38
|
-
readonly boundPubkey?: string;
|
|
39
|
-
readonly updatedAt: number;
|
|
40
|
-
};
|
|
41
|
-
/** The per-wallet part of the document: this wallet's name and account groups. */
|
|
42
|
-
type MetaDocTree = {
|
|
43
|
-
readonly wallet: MetaDocWallet;
|
|
44
|
-
readonly groups: ReadonlyArray<MetaDocGroup>;
|
|
45
|
-
};
|
|
46
|
-
/** Every wallet's document also carries the whole address book, which is shared across wallets. */
|
|
47
|
-
type MetaDoc = MetaDocTree & {
|
|
48
|
-
readonly v: 2;
|
|
49
|
-
readonly contacts: ReadonlyArray<AddressBookRecord>;
|
|
50
|
-
};
|
|
51
|
-
type AccountGroup = {
|
|
52
|
-
readonly walletId: string;
|
|
53
|
-
readonly index: number;
|
|
54
|
-
/** `discoverGroups` result — family key → used; a family error lives under `errors`. */
|
|
55
|
-
readonly used?: Readonly<Record<string, boolean>>;
|
|
56
|
-
readonly errors?: Readonly<Record<string, string>>;
|
|
57
|
-
readonly name?: string;
|
|
58
|
-
readonly hidden: boolean;
|
|
59
|
-
/** A social identity (64 lowercase hex) bound to this group; one identity binds one group. */
|
|
60
|
-
readonly boundPubkey?: string;
|
|
61
|
-
/** Device-local opt-in to signing messages that cannot be shown as text; absent means off. */
|
|
62
|
-
readonly blindSigning?: true;
|
|
63
|
-
/** Last local modification time (ms); reconcile-created entries start at 0. */
|
|
64
|
-
readonly updatedAt: number;
|
|
65
|
-
};
|
|
66
|
-
type AccountTreeState = {
|
|
67
|
-
readonly status: "locked" | "ready";
|
|
68
|
-
readonly wallets: ReadonlyArray<{
|
|
69
|
-
readonly walletId: string;
|
|
70
|
-
readonly name?: string;
|
|
71
|
-
readonly updatedAt: number;
|
|
72
|
-
}>;
|
|
73
|
-
readonly groups: Readonly<Record<string, ReadonlyArray<AccountGroup>>>;
|
|
74
|
-
readonly selected: {
|
|
75
|
-
readonly walletId: string;
|
|
76
|
-
readonly groupIndex: number;
|
|
77
|
-
} | null;
|
|
78
|
-
readonly totals: Readonly<Record<string, number>>;
|
|
79
|
-
};
|
|
80
|
-
type DiscoveryNetworks = {
|
|
81
|
-
readonly client: (network: string) => {
|
|
82
|
-
readonly getTransactionCount: (p: {
|
|
83
|
-
readonly address: `0x${string}`;
|
|
84
|
-
readonly blockTag: "latest";
|
|
85
|
-
}) => Promise<number>;
|
|
86
|
-
readonly getBalance: (p: {
|
|
87
|
-
readonly address: `0x${string}`;
|
|
88
|
-
}) => Promise<bigint>;
|
|
89
|
-
};
|
|
90
|
-
readonly solanaRpc: (network: string) => {
|
|
91
|
-
readonly call: (method: string, params: unknown[]) => Promise<unknown>;
|
|
92
|
-
};
|
|
93
|
-
readonly esplora: (network: string) => Esplora;
|
|
94
|
-
readonly enabled: (family: "evm" | "solana" | "bitcoin") => ReadonlyArray<string>;
|
|
95
|
-
};
|
|
96
|
-
type AccountTreeControllerOptions = {
|
|
97
|
-
readonly wallet: Wallet;
|
|
98
|
-
readonly setTimer: (ms: number, fn: () => void) => () => void;
|
|
99
|
-
readonly spark: SparkController;
|
|
100
|
-
readonly sparkNetwork: SparkNetwork;
|
|
101
|
-
readonly networks?: DiscoveryNetworks;
|
|
102
|
-
readonly chains?: {
|
|
103
|
-
readonly account: (params: {
|
|
104
|
-
readonly walletId: string;
|
|
105
|
-
readonly groupIndex: number;
|
|
106
|
-
readonly template: string;
|
|
107
|
-
readonly network: string;
|
|
108
|
-
}) => Promise<{
|
|
109
|
-
readonly address?: string;
|
|
110
|
-
readonly xpub?: string;
|
|
111
|
-
}>;
|
|
112
|
-
};
|
|
113
|
-
readonly logger: EngineLogger;
|
|
114
|
-
readonly now: () => number;
|
|
115
|
-
};
|
|
116
|
-
export declare class AccountTreeController extends Controller<AccountTreeState> {
|
|
117
|
-
private readonly options;
|
|
118
|
-
private col;
|
|
119
|
-
private sparkUnsubscribe;
|
|
120
|
-
private cancelTotals;
|
|
121
|
-
private persistChain;
|
|
122
|
-
constructor(options: AccountTreeControllerOptions);
|
|
123
|
-
setStore(store: EngineStore | undefined): void;
|
|
124
|
-
/** Load persisted state, reconcile with the snapshot, start driving Spark. */
|
|
125
|
-
init(): Promise<void>;
|
|
126
|
-
destroy(): Promise<void>;
|
|
127
|
-
/** Locked: stop every Spark client, flush pending persists, then drop to the empty state. */
|
|
128
|
-
lock(): Promise<void>;
|
|
129
|
-
/** Reconcile groups/names/selected with `wallet.getSnapshot().wallets`; persists on change. */
|
|
130
|
-
reconcile(): void;
|
|
131
|
-
addGroup(walletId: string): number;
|
|
132
|
-
addGroups(walletId: string, indices: ReadonlyArray<number>): void;
|
|
133
|
-
renameWallet(walletId: string, name: string): void;
|
|
134
|
-
renameGroup(walletId: string, index: number, name: string): void;
|
|
135
|
-
setHidden(walletId: string, index: number, hidden: boolean): void;
|
|
136
|
-
/**
|
|
137
|
-
* Device-local opt-in to blind signing: no factor, the setting lives in the main runtime —
|
|
138
|
-
* per-request verification and the kernel's blind prompt are the real protection.
|
|
139
|
-
*/
|
|
140
|
-
setBlindSigning(walletId: string, index: number, enabled: boolean): void;
|
|
141
|
-
/** Whether the group opted in to signing messages that cannot be shown as text. */
|
|
142
|
-
blindSigning(walletId: string, index: number): boolean;
|
|
143
|
-
select(walletId: string, index: number): void;
|
|
144
|
-
/**
|
|
145
|
-
* Binds a social identity to one group. The identity is unique across the whole tree — every
|
|
146
|
-
* group in every wallet carrying it loses the binding (each entry re-stamped).
|
|
147
|
-
*/
|
|
148
|
-
bind(walletId: string, index: number, pubkey: string): void;
|
|
149
|
-
unbind(walletId: string, index: number): void;
|
|
150
|
-
/**
|
|
151
|
-
* Which group currently holds a pubkey — merges can leave the same identity on groups in two
|
|
152
|
-
* wallets; the newest `updatedAt` wins, ties resolve by snapshot wallet order then lower index.
|
|
153
|
-
*/
|
|
154
|
-
bindingOf(pubkey: string): {
|
|
155
|
-
walletId: string;
|
|
156
|
-
groupIndex: number;
|
|
157
|
-
} | undefined;
|
|
158
|
-
/** The wallet's metadata document — every group, hidden included. */
|
|
159
|
-
exportMeta(walletId: string): MetaDocTree;
|
|
160
|
-
/**
|
|
161
|
-
* Entry-level last-writer-wins merge: a newer remote `updatedAt` replaces the local entry, a tie
|
|
162
|
-
* keeps local; remote-only groups are added. `selected`/hidden rules are re-validated — if the
|
|
163
|
-
* merge hides the selected group it is re-selected, and a merge may never leave every group
|
|
164
|
-
* hidden (the selected one stays visible and is re-stamped so the fix propagates).
|
|
165
|
-
*/
|
|
166
|
-
mergeMeta(walletId: string, doc: MetaDocTree): {
|
|
167
|
-
changed: boolean;
|
|
168
|
-
localNewer: boolean;
|
|
169
|
-
};
|
|
170
|
-
/** Sequential inspect from 0 upward; index 0 always included; stop after 2 consecutive unused. */
|
|
171
|
-
discoverSpark(walletId: string): Promise<number[]>;
|
|
172
|
-
/**
|
|
173
|
-
* Per-group chain-family discovery — same stop rule as `discoverSpark`: group 0 always, stop
|
|
174
|
-
* after two consecutive fully-unused groups. A family error is reported on the group and does NOT
|
|
175
|
-
* count as unused (the group stays in `found` — it can't be proven empty).
|
|
176
|
-
*/
|
|
177
|
-
discoverGroups(walletId: string): Promise<number[]>;
|
|
178
|
-
/** Refresh `totals` for every other visible group; per-group failures are logged and skipped. */
|
|
179
|
-
refreshTotals(): Promise<void>;
|
|
180
|
-
private onSparkState;
|
|
181
|
-
private setTotal;
|
|
182
|
-
private driveSpark;
|
|
183
|
-
private visibleGroups;
|
|
184
|
-
private validSelection;
|
|
185
|
-
private selectFallback;
|
|
186
|
-
private mutateGroups;
|
|
187
|
-
private mustWallet;
|
|
188
|
-
private mustGroup;
|
|
189
|
-
private checkedName;
|
|
190
|
-
private load;
|
|
191
|
-
/** Queues a store write behind the previous one — the last queued write always lands last. */
|
|
192
|
-
private persist;
|
|
193
|
-
private scheduleTotalsPersist;
|
|
194
|
-
private flushTotals;
|
|
195
|
-
}
|
|
196
|
-
type TokenBalance = {
|
|
197
|
-
readonly address: string;
|
|
198
|
-
readonly symbol: string;
|
|
199
|
-
readonly decimals: number;
|
|
200
|
-
readonly balance: string;
|
|
201
|
-
/** False for user-added tokens until they appear in the built-in table. */
|
|
202
|
-
readonly verified: boolean;
|
|
203
|
-
};
|
|
204
|
-
type AccountBalances = {
|
|
205
|
-
readonly native: string;
|
|
206
|
-
readonly tokens: ReadonlyArray<TokenBalance>;
|
|
207
|
-
/** Bitcoin only — confirmed + own unconfirmed change; frozen 546/330-sat UTXOs shown apart. */
|
|
208
|
-
readonly unconfirmed?: string;
|
|
209
|
-
readonly frozen?: string;
|
|
210
|
-
};
|
|
211
|
-
type AssetsControllerState = {
|
|
212
|
-
readonly balances: Record<string, AccountBalances>;
|
|
213
|
-
};
|
|
214
|
-
type Options = {
|
|
215
|
-
readonly networks: NetworkController;
|
|
216
|
-
readonly openStore: () => Promise<EngineStore>;
|
|
217
|
-
readonly setTimer: (ms: number, fn: () => unknown) => () => void;
|
|
218
|
-
readonly logger: EngineLogger;
|
|
219
|
-
};
|
|
220
|
-
declare class AssetsController extends Controller<AssetsControllerState> {
|
|
221
|
-
private readonly options;
|
|
222
|
-
private engineStore;
|
|
223
|
-
private readonly bitcoinUtxos;
|
|
224
|
-
private visible;
|
|
225
|
-
private cancelPoll;
|
|
226
|
-
private readonly customTokens;
|
|
227
|
-
constructor(options: Options);
|
|
228
|
-
init(): Promise<void>;
|
|
229
|
-
lock(): void;
|
|
230
|
-
destroy(): Promise<void>;
|
|
231
|
-
setVisible(visible: boolean): void;
|
|
232
|
-
private armPoll;
|
|
233
|
-
private refreshAll;
|
|
234
|
-
refresh(address: string, network: string): Promise<void>;
|
|
235
|
-
/** SOL via getBalance; SPL via getTokenAccountsByOwner (jsonParsed) for known mints. */
|
|
236
|
-
private refreshSolana;
|
|
237
|
-
private readTokens;
|
|
238
|
-
private balanceOfBatch;
|
|
239
|
-
private balanceOf;
|
|
240
|
-
private callToken;
|
|
241
|
-
/** Whether `address` is in the built-in token table of `network` or among the custom tokens. */
|
|
242
|
-
isTracked(network: string, address: string): boolean;
|
|
243
|
-
/** The token's own `symbol` and `decimals` (EVM only); throws when either read fails. */
|
|
244
|
-
tokenMetadata(network: string, address: string): Promise<{
|
|
245
|
-
readonly symbol: string;
|
|
246
|
-
readonly decimals: number;
|
|
247
|
-
}>;
|
|
248
|
-
/** Reads symbol/decimals on-chain, marks unverified, persists; throws when the calls fail. */
|
|
249
|
-
addToken(network: string, address: string): Promise<void>;
|
|
250
|
-
private persistToken;
|
|
251
|
-
/** BTC balance = confirmed spendable + own unconfirmed change; frozen 546/330 shown separately. */
|
|
252
|
-
refreshBitcoin(xpub: string, network: string): Promise<void>;
|
|
253
|
-
}
|
|
254
|
-
/** BackupController error categories — never carry file contents, digests or secrets. */
|
|
255
|
-
type BackupErrorCategory = "cloud" | "conflict" | "unavailable";
|
|
256
|
-
export declare class BackupControllerError extends Error {
|
|
257
|
-
readonly category: BackupErrorCategory;
|
|
258
|
-
constructor(category: BackupErrorCategory, message: string);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Cloud-file storage port (design/backup.mdx "存储"): the cloud is an opaque key-value namespace —
|
|
262
|
-
* names are file names (`qntx-wallet-backup-<id>.json`), contents are envelope texts. The kernel
|
|
263
|
-
* never sees it; only the engine transports ciphertext across it.
|
|
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.
|
|
264
41
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
/** Every file name in the namespace. */
|
|
269
|
-
readonly list: () => Promise<ReadonlyArray<string>>;
|
|
270
|
-
/** File contents, or undefined when the name does not exist. */
|
|
271
|
-
readonly read: (name: string) => Promise<string | undefined>;
|
|
272
|
-
/** Overwrites the whole file atomically from the caller's perspective. */
|
|
273
|
-
readonly write: (name: string, text: string) => Promise<void>;
|
|
274
|
-
/** Deleting a missing file succeeds. */
|
|
275
|
-
readonly delete: (name: string) => Promise<void>;
|
|
276
|
-
};
|
|
277
|
-
type BackupControllerState = {
|
|
278
|
-
readonly status: "locked" | "unavailable" | "off" | "syncing" | "synced" | "conflict" | "error";
|
|
279
|
-
/** The retained backup key's public summary from the wallet snapshot. */
|
|
280
|
-
readonly backup: BackupInfo | null;
|
|
281
|
-
readonly uploadedAt: number | undefined;
|
|
282
|
-
readonly unprotected: {
|
|
283
|
-
readonly walletIds: ReadonlyArray<string>;
|
|
284
|
-
};
|
|
285
|
-
readonly error: BackupErrorCategory | undefined;
|
|
286
|
-
};
|
|
287
|
-
type BackupControllerOptions = {
|
|
288
|
-
readonly wallet: Wallet;
|
|
289
|
-
readonly cloud: CloudStore | undefined;
|
|
290
|
-
readonly now: () => number;
|
|
291
|
-
readonly logger: EngineLogger;
|
|
292
|
-
};
|
|
293
|
-
export declare class BackupController extends Controller<BackupControllerState> {
|
|
294
|
-
private readonly wallet;
|
|
295
|
-
private readonly cloud;
|
|
296
|
-
private readonly now;
|
|
297
|
-
private readonly logger;
|
|
298
|
-
private engineStore;
|
|
299
|
-
private generation;
|
|
300
|
-
private current;
|
|
301
|
-
private rerun;
|
|
302
|
-
/** Set by restore() before the store opens — written as a record on the first reconcile. */
|
|
303
|
-
private pendingAdoption;
|
|
304
|
-
constructor(options: BackupControllerOptions);
|
|
305
|
-
init(): Promise<void>;
|
|
306
|
-
destroy(): Promise<void>;
|
|
307
|
-
/** The engine hands over the store on unlock and takes it back on lock. */
|
|
308
|
-
setStore(store: EngineStore | undefined): void;
|
|
309
|
-
/** Bumps the generation: an in-flight reconcile writes nothing after this point. */
|
|
310
|
-
lock(): void;
|
|
311
|
-
trigger(): void;
|
|
312
|
-
private triggerAsync;
|
|
313
|
-
/** Explicit sync — awaits the run so callers see its outcome. */
|
|
314
|
-
sync(): Promise<void>;
|
|
315
|
-
enable(options: {
|
|
316
|
-
readonly verify: UnlockFactor;
|
|
317
|
-
readonly factors: ReadonlyArray<UnlockFactor>;
|
|
318
|
-
}): Promise<void>;
|
|
319
|
-
disable(): Promise<void>;
|
|
320
|
-
/** Files under our prefix with a parseable header. */
|
|
321
|
-
list(): Promise<ReadonlyArray<{
|
|
322
|
-
readonly name: string;
|
|
323
|
-
readonly header: BackupHeader;
|
|
324
|
-
}>>;
|
|
325
|
-
/**
|
|
326
|
-
* Merges a cloud backup into the vault. Wallets with a BIP-39 passphrase restore only when
|
|
327
|
-
* `passphrases` carries theirs; the rest come back in `passphraseRequired`.
|
|
328
|
-
*/
|
|
329
|
-
restore(options: {
|
|
330
|
-
readonly name: string;
|
|
331
|
-
readonly backupFactor: UnlockFactor;
|
|
332
|
-
readonly passphrases?: ReadonlyArray<{
|
|
333
|
-
readonly walletId: string;
|
|
334
|
-
readonly passphrase: string;
|
|
335
|
-
}>;
|
|
336
|
-
readonly factor?: InitialFactor;
|
|
337
|
-
}): Promise<{
|
|
338
|
-
readonly wallets: ReadonlyArray<WalletInfo>;
|
|
339
|
-
readonly passphraseRequired: ReadonlyArray<string>;
|
|
340
|
-
}>;
|
|
341
|
-
private reconcileOrThrow;
|
|
342
|
-
private readRecord;
|
|
343
|
-
private writeRecord;
|
|
344
|
-
private deleteRecord;
|
|
345
|
-
private snapshot;
|
|
346
|
-
private unprotected;
|
|
347
|
-
private coverage;
|
|
348
|
-
private setStatus;
|
|
349
|
-
/**
|
|
350
|
-
* Single-flight: a trigger during a run flags exactly one rerun inside the same promise, so
|
|
351
|
-
* `sync()`/`enable()` await real convergence instead of a mid-run snapshot.
|
|
352
|
-
*/
|
|
353
|
-
private reconcile;
|
|
354
|
-
private pass;
|
|
42
|
+
export declare class SolanaClusterBindingError extends ChainError {
|
|
43
|
+
readonly reason: SolanaBindingReason;
|
|
44
|
+
constructor(reason: SolanaBindingReason, message: string);
|
|
355
45
|
}
|
|
356
|
-
/** Meta-sync error categories — messages never carry event or document content. */
|
|
357
|
-
type MetaSyncErrorCategory = "network" | "internal" | "unsupported" | "corrupt";
|
|
358
|
-
export declare class MetaSyncError extends Error {
|
|
359
|
-
readonly category: MetaSyncErrorCategory;
|
|
360
|
-
constructor(category: MetaSyncErrorCategory, message: string, cause?: unknown);
|
|
361
|
-
}
|
|
362
|
-
type MetaSyncRelayPort = {
|
|
363
|
-
readonly fetch: (filter: Filter) => Promise<ReadonlyArray<Event>>;
|
|
364
|
-
readonly publish: (event: Event) => Promise<void>;
|
|
365
|
-
};
|
|
366
|
-
type MetaSyncConfig = {
|
|
367
|
-
/** The `d` tag that names this wallet's metadata document. */
|
|
368
|
-
readonly tag: string;
|
|
369
|
-
readonly relays: MetaSyncRelayPort;
|
|
370
|
-
};
|
|
371
|
-
type MetaSyncWalletStatus = {
|
|
372
|
-
readonly status: "syncing" | "synced" | "error";
|
|
373
|
-
readonly error?: MetaSyncErrorCategory;
|
|
374
|
-
};
|
|
375
|
-
type MetaSyncState = {
|
|
376
|
-
readonly wallets: Readonly<Record<string, MetaSyncWalletStatus>>;
|
|
377
|
-
};
|
|
378
|
-
/** What the sync needs from the address book: its records, a merge, and a change subscription. */
|
|
379
|
-
type AddressBookSync = {
|
|
380
|
-
readonly syncEntries: () => ReadonlyArray<AddressBookRecord>;
|
|
381
|
-
readonly merge: (remote: ReadonlyArray<AddressBookRecord>) => Promise<{
|
|
382
|
-
readonly changed: boolean;
|
|
383
|
-
readonly localNewer: boolean;
|
|
384
|
-
}>;
|
|
385
|
-
readonly store: {
|
|
386
|
-
readonly subscribe: (listener: () => void) => () => void;
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
type MetaSyncControllerOptions = {
|
|
390
|
-
readonly wallet: Wallet;
|
|
391
|
-
readonly accounts: AccountTreeController;
|
|
392
|
-
readonly addressBook: AddressBookSync;
|
|
393
|
-
/** `nostr(wallet).syncSigner` — each wallet signs metadata with its dedicated sync key. */
|
|
394
|
-
readonly nostr: {
|
|
395
|
-
readonly syncSigner: (walletId: string) => WalletSyncSigner;
|
|
396
|
-
};
|
|
397
|
-
readonly metaSync: MetaSyncConfig | undefined;
|
|
398
|
-
readonly logger: EngineLogger;
|
|
399
|
-
readonly now: () => number;
|
|
400
|
-
readonly setTimer: (ms: number, fn: () => void) => () => void;
|
|
401
|
-
readonly verifyEvent: (event: Event) => boolean;
|
|
402
|
-
};
|
|
403
46
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
* on lock.
|
|
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.
|
|
409
51
|
*/
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
private readonly lastExported;
|
|
416
|
-
private readonly timers;
|
|
417
|
-
private readonly inflight;
|
|
418
|
-
private accountsUnsubscribe;
|
|
419
|
-
private addressBookUnsubscribe;
|
|
420
|
-
constructor(options: MetaSyncControllerOptions);
|
|
421
|
-
/** Unlocked: pull every wallet whose group-0 identity exists, then watch the tree. */
|
|
422
|
-
init(): Promise<void>;
|
|
423
|
-
destroy(): Promise<void>;
|
|
424
|
-
/** Locked: cancel debounces and in-flight write-backs, forget the pull/publish bookkeeping. */
|
|
425
|
-
lock(): Promise<void>;
|
|
426
|
-
/** Snapshot changed while unlocked: pull newly-seen wallets, drop removed ones. */
|
|
427
|
-
reconcile(): void;
|
|
428
|
-
/** Manual re-pull of every wallet that can sync. */
|
|
429
|
-
sync(): Promise<void>;
|
|
430
|
-
private pullAll;
|
|
431
|
-
private setStatus;
|
|
432
|
-
private pullOne;
|
|
433
|
-
/** The wallet's tree plus the shared address book — every wallet's document carries both. */
|
|
434
|
-
private exportDoc;
|
|
435
|
-
private filterFor;
|
|
436
|
-
private acceptableEvent;
|
|
437
|
-
/** Snapshot the wallet's exported doc — the debounce publishes only on a real change. */
|
|
438
|
-
private rememberExport;
|
|
439
|
-
private onTreeChange;
|
|
440
|
-
private publishNow;
|
|
441
|
-
}
|
|
442
|
-
type EnsResolution = {
|
|
443
|
-
readonly name: string;
|
|
444
|
-
readonly address: string;
|
|
445
|
-
readonly checks: ReadonlyArray<RequestCheckCode>;
|
|
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;
|
|
446
57
|
};
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
* documents). Required, with no default: `@qntx/nostr`'s own `verifyEvent` is bound to the
|
|
452
|
-
* pure-JS noble backend — pass the host's native verifier, the same one given to the wallet.
|
|
453
|
-
*/
|
|
454
|
-
readonly verifyEvent: (event: Event) => boolean;
|
|
455
|
-
/** Every Spark account the engine touches lives on this network. */
|
|
456
|
-
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 = {
|
|
457
62
|
readonly fetch: typeof globalThis.fetch;
|
|
458
|
-
readonly
|
|
459
|
-
readonly now: () => number;
|
|
460
|
-
/** The WebLN node's display alias — `getInfo` never exposes a pubkey. */
|
|
461
|
-
readonly weblnAlias: string;
|
|
462
|
-
/** The host's lightning fee cap for WebLN sends — validated to a non-negative safe integer. */
|
|
463
|
-
readonly lightningMaxFee: (amountSats: number) => number;
|
|
464
|
-
readonly logger: EngineLogger;
|
|
465
|
-
readonly openStore: () => Promise<EngineStore>;
|
|
63
|
+
readonly setTimer: SetTimer;
|
|
466
64
|
/**
|
|
467
|
-
*
|
|
468
|
-
*
|
|
65
|
+
* A current `drive.appdata` access token; throws CloudStoreError("auth-required") without
|
|
66
|
+
* consent.
|
|
469
67
|
*/
|
|
470
|
-
readonly
|
|
471
|
-
/**
|
|
472
|
-
readonly
|
|
473
|
-
/**
|
|
474
|
-
* Host endpoints per network (CAIP-2), ordered by preference, for all three chain families: EVM
|
|
475
|
-
* and Solana JSON-RPC URLs, and for Bitcoin the Esplora base URL.
|
|
476
|
-
*/
|
|
477
|
-
readonly rpc?: Readonly<Record<string, ReadonlyArray<string>>>;
|
|
478
|
-
/**
|
|
479
|
-
* The wallet gateway: tried first for the networks it serves (read at each unlock) unless a
|
|
480
|
-
* network has custom endpoints. The install id is sent only to the gateway's origin.
|
|
481
|
-
*/
|
|
482
|
-
readonly gateway?: {
|
|
483
|
-
readonly url: string;
|
|
484
|
-
readonly installId: string;
|
|
485
|
-
};
|
|
486
|
-
/** Development builds: also accept `http://localhost` as a dApp origin. */
|
|
487
|
-
readonly allowLocalhostOrigins?: boolean;
|
|
488
|
-
/** Injected timer for polling and refresh loops; defaults to setTimeout. */
|
|
489
|
-
readonly setTimer?: (ms: number, fn: () => void) => () => void;
|
|
490
|
-
/** Kind-30078 wallet-metadata sync; absent → no wallet metadata is synced. */
|
|
491
|
-
readonly metaSync?: MetaSyncConfig;
|
|
492
|
-
/** Test seam — defaults to the wallet's real spark proxy. */
|
|
493
|
-
readonly sparkApis?: SparkControllerOptions["spark"];
|
|
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>;
|
|
494
71
|
};
|
|
495
|
-
|
|
496
|
-
readonly networks: NetworkController;
|
|
497
|
-
readonly assets: AssetsController;
|
|
498
|
-
readonly transactions: TransactionController;
|
|
499
|
-
readonly requests: RequestController;
|
|
500
|
-
readonly addressBook: AddressBookController;
|
|
501
|
-
readonly connections: ConnectionController;
|
|
502
|
-
readonly eip1193: Eip1193Handler;
|
|
503
|
-
readonly nip07: Nip07Handler;
|
|
504
|
-
readonly webln: WeblnHandler;
|
|
505
|
-
readonly solanaWallet: SolanaWalletHandler;
|
|
506
|
-
readonly bitcoinWallet: BitcoinWalletHandler;
|
|
507
|
-
/** The phishing list: lifecycle is independent of the lock state. */
|
|
508
|
-
readonly phishing: PhishingController;
|
|
509
|
-
/** Read and receive surface; every payment goes through `requests`. */
|
|
510
|
-
readonly spark: Omit<SparkController, "send" | "payInvoice" | "paySparkInvoice" | "withdraw">;
|
|
511
|
-
readonly accounts: AccountTreeController;
|
|
512
|
-
readonly metaSync: MetaSyncController;
|
|
513
|
-
readonly backup: BackupController;
|
|
514
|
-
readonly zaps: {
|
|
515
|
-
readonly prepare: (params: PrepareZapParams) => Promise<PreparedZap>;
|
|
516
|
-
};
|
|
517
|
-
readonly names: {
|
|
518
|
-
/** Forward-resolves an ENS name for a send on `network`; throws when it cannot resolve. */
|
|
519
|
-
readonly resolve: (name: string, network: string) => Promise<EnsResolution>;
|
|
520
|
-
};
|
|
521
|
-
readonly payments: {
|
|
522
|
-
readonly parse: (input: string, network: SparkNetwork) => PaymentParse;
|
|
523
|
-
readonly resolve: (input: string, network: SparkNetwork) => Promise<PaymentParse>;
|
|
524
|
-
/** Receives funds from an LNURL-withdraw service; needs no verification factor. */
|
|
525
|
-
readonly withdrawLnurl: (params: WithdrawLnurlParams) => Promise<{
|
|
526
|
-
readonly kind: "lnurl-withdraw";
|
|
527
|
-
readonly invoice: LightningInvoice;
|
|
528
|
-
}>;
|
|
529
|
-
};
|
|
530
|
-
/** Stops listening to the wallet and stops the phishing list refresh. */
|
|
531
|
-
readonly unsubscribe: () => void;
|
|
532
|
-
};
|
|
533
|
-
export declare function createWalletEngine(options: EngineOptions): WalletEngine;
|
|
534
|
-
/** In-memory CloudStore for tests and the playground; swap the Map for cross-engine sharing. */
|
|
535
|
-
export declare function createMemoryCloudStore(backing?: Map<string, string>): CloudStore;
|
|
72
|
+
export declare function createGoogleDriveCloudStore({ fetch: doFetch, setTimer, token, invalidateToken }: GoogleDriveCloudStoreOptions): CloudStore;
|
|
536
73
|
/** SparkController error categories — never carry request bytes or secrets. */
|
|
537
|
-
type SparkErrorCategory = "network" | "approval-required" | "insufficient-funds" | "rejected" |
|
|
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";
|
|
538
79
|
export declare class SparkControllerError extends Error {
|
|
539
80
|
readonly category: SparkErrorCategory;
|
|
540
|
-
|
|
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);
|
|
541
84
|
}
|
|
542
85
|
/** Account-tree error categories — messages never carry secrets. */
|
|
543
86
|
type AccountTreeErrorCategory = "invalid-input" | "rejected" | "not-found" | "locked";
|
|
@@ -562,5 +105,5 @@ type ResolveOptions = ParseOptions & {
|
|
|
562
105
|
export declare function resolvePayment(input: string, options: ResolveOptions): Promise<PaymentParse>;
|
|
563
106
|
export declare function encodeExitChain(chain: SparkExitChain): Uint8Array;
|
|
564
107
|
export declare function decodeExitChain(bytes: Uint8Array): SparkExitChain;
|
|
565
|
-
export { 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 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 };
|
|
566
109
|
//# sourceMappingURL=index.d.mts.map
|