@invisi-labs/sdk 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-NAEEEZMH.js +351 -0
- package/dist/chunk-NAEEEZMH.js.map +1 -0
- package/dist/chunk-T246CYQ7.js +4330 -0
- package/dist/chunk-T246CYQ7.js.map +1 -0
- package/dist/ethers.cjs +365 -0
- package/dist/ethers.cjs.map +1 -0
- package/dist/ethers.d.cts +63 -0
- package/dist/ethers.d.ts +63 -0
- package/dist/ethers.js +13 -0
- package/dist/ethers.js.map +1 -0
- package/dist/gas-estimation-Byi278aa.d.cts +239 -0
- package/dist/gas-estimation-CUZXjsO7.d.ts +239 -0
- package/dist/index.cjs +5128 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +363 -0
- package/dist/index.d.ts +363 -0
- package/dist/index.js +572 -0
- package/dist/index.js.map +1 -0
- package/dist/indexeddb.cjs +4464 -0
- package/dist/indexeddb.cjs.map +1 -0
- package/dist/indexeddb.d.cts +20 -0
- package/dist/indexeddb.d.ts +20 -0
- package/dist/indexeddb.js +70 -0
- package/dist/indexeddb.js.map +1 -0
- package/dist/memory.cjs +4472 -0
- package/dist/memory.cjs.map +1 -0
- package/dist/memory.d.cts +12 -0
- package/dist/memory.d.ts +12 -0
- package/dist/memory.js +10 -0
- package/dist/memory.js.map +1 -0
- package/dist/sqlite.cjs +4448 -0
- package/dist/sqlite.cjs.map +1 -0
- package/dist/sqlite.d.cts +28 -0
- package/dist/sqlite.d.ts +28 -0
- package/dist/sqlite.js +54 -0
- package/dist/sqlite.js.map +1 -0
- package/dist/state-DHl6j33x.d.cts +76 -0
- package/dist/state-DHl6j33x.d.ts +76 -0
- package/dist/store-1zgwa--h.d.cts +42 -0
- package/dist/store-Dlol1q1s.d.ts +42 -0
- package/package.json +64 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import * as _invisi_labs_core from '@invisi-labs/core';
|
|
2
|
+
import { WalletAuthorizationProvider, CreditDeliveryState, Wallet, Note, DisclosureOutput, Disclosure, DisclosureResult } from '@invisi-labs/core';
|
|
3
|
+
export { Address, CreditDeliveryState, CreditNote, CreditOpening, Detector, Disclosure, DisclosureExport, DisclosureOutput, DisclosureResult, Hex, MissingCapabilityError, Note, NullifierCapability, ReceivingKeys, ViewingCapability, Wallet, WalletAuthorization, WalletAuthorizationProvider } from '@invisi-labs/core';
|
|
4
|
+
import { O as OperationRuntime, a as OperationPlan, G as GasReference, F as FundingSigner, b as OperationAggregateMember, C as CancelCreditPreparation, c as CreateCreditPreparation, D as DrawCreditPreparation, S as ShieldPreparation, d as SweepPreparation, T as TopUpCreditPreparation, e as TransferPreparation, W as WithdrawalPreparation, f as WalletSessionOptions } from './gas-estimation-CUZXjsO7.js';
|
|
5
|
+
export { g as CoinSelector, h as FundingAuthorizationVerifier, i as FundingSource, j as FundingTypedData, k as GasBenchmarkCircuit, l as GasBenchmarkDeployment, m as GasBenchmarkProfile, n as GasBenchmarkSample, o as GasBenchmarkShape, p as defineGasBenchmarks } from './gas-estimation-CUZXjsO7.js';
|
|
6
|
+
import * as _invisi_labs_protocol from '@invisi-labs/protocol';
|
|
7
|
+
import { TransactionCall, Protocol, CanonicalBlock, ChainReader, TokenProtocol, AddressRegistry as AddressRegistry$1, RegistrationPreparation } from '@invisi-labs/protocol';
|
|
8
|
+
export { AddressRegistryOptions, CanonicalBlock, CanonicalReceipt, ChainReader, FactoryReader, Membership, Protocol, ProtocolDataProvider, ProtocolDataStatus, ProtocolOptions, ProtocolUpdateRange, ProtocolUpdates, RegistrationOperation, RegistryContext, RegistryReader, TokenProtocol, TokenProtocolOptions, TransactionCall, TransactionContext } from '@invisi-labs/protocol';
|
|
9
|
+
import { ProverOptions, Prover, ProofBundle } from '@invisi-labs/prover';
|
|
10
|
+
export { AggregateMember, AggregatorCapability, ProofBundle, ProofStatement, Prover, ProverOptions } from '@invisi-labs/prover';
|
|
11
|
+
import { O as OperationStatus, B as BalanceSnapshot, W as WalletScope, a as WalletState } from './state-DHl6j33x.js';
|
|
12
|
+
export { b as WalletStore, w as walletBalance } from './state-DHl6j33x.js';
|
|
13
|
+
import { Hex } from '@invisi-labs/protocol/contracts';
|
|
14
|
+
import { Provider, TransactionRequest, TransactionResponse, Signer } from 'ethers';
|
|
15
|
+
import { ProtocolRpcClient as ProtocolRpcClient$1 } from '@invisi-labs/rpc';
|
|
16
|
+
export { ProtocolDeployment, ProtocolRpcChain, ProtocolRpcClientOptions, ProtocolRpcConnectionOptions, ProtocolRpcError, ProtocolRpcReader } from '@invisi-labs/rpc';
|
|
17
|
+
import { W as WalletRecordCodec } from './store-Dlol1q1s.js';
|
|
18
|
+
|
|
19
|
+
type Runtime = Omit<OperationRuntime, "store">;
|
|
20
|
+
/** An immutable, local transaction handle. No wallet inventory, reservations or persistence. */
|
|
21
|
+
declare class PreparedTransaction {
|
|
22
|
+
#private;
|
|
23
|
+
readonly status: OperationStatus;
|
|
24
|
+
private constructor();
|
|
25
|
+
static prepare(runtime: Runtime, plan: OperationPlan): PreparedTransaction;
|
|
26
|
+
get id(): string;
|
|
27
|
+
get kind(): "shield" | "transfer" | "withdraw" | "sweep" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
28
|
+
estimateGas(): GasReference;
|
|
29
|
+
preview(): {
|
|
30
|
+
id: string;
|
|
31
|
+
kind: "shield" | "transfer" | "withdraw" | "sweep" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
32
|
+
status: OperationStatus;
|
|
33
|
+
context: {
|
|
34
|
+
tokenAddress: _invisi_labs_core.Address;
|
|
35
|
+
now?: bigint;
|
|
36
|
+
chainId: bigint;
|
|
37
|
+
protocolAddress: _invisi_labs_core.Address;
|
|
38
|
+
};
|
|
39
|
+
inputs: number;
|
|
40
|
+
creditOutputs: {
|
|
41
|
+
amount: bigint;
|
|
42
|
+
expiry: bigint;
|
|
43
|
+
owner: `0x${string}`;
|
|
44
|
+
spender: `0x${string}`;
|
|
45
|
+
ownerPayout: bigint;
|
|
46
|
+
spenderPayout: bigint;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
outputs: {
|
|
49
|
+
to: string;
|
|
50
|
+
amount: bigint;
|
|
51
|
+
change: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
capacity: number | undefined;
|
|
54
|
+
deadline: bigint;
|
|
55
|
+
fundingAmount: bigint;
|
|
56
|
+
fundingPayer: `0x${string}` | undefined;
|
|
57
|
+
withdrawalAmount: bigint;
|
|
58
|
+
withdrawalAddress: `0x${string}` | undefined;
|
|
59
|
+
permissions: {
|
|
60
|
+
walletAuthorization: boolean;
|
|
61
|
+
proof: boolean;
|
|
62
|
+
fundingAuthorization: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
private current;
|
|
66
|
+
private stage;
|
|
67
|
+
authorize(options?: {
|
|
68
|
+
signal?: AbortSignal;
|
|
69
|
+
}): Promise<PreparedTransaction>;
|
|
70
|
+
authorize(provider: WalletAuthorizationProvider, options?: {
|
|
71
|
+
signal?: AbortSignal;
|
|
72
|
+
}): Promise<PreparedTransaction>;
|
|
73
|
+
prove(options?: ProverOptions): Promise<PreparedTransaction>;
|
|
74
|
+
prove(backend: Prover, options?: ProverOptions): Promise<PreparedTransaction>;
|
|
75
|
+
private encode;
|
|
76
|
+
authorizeFunding(options?: {
|
|
77
|
+
signal?: AbortSignal;
|
|
78
|
+
}): Promise<PreparedTransaction>;
|
|
79
|
+
authorizeFunding(signer: FundingSigner, options?: {
|
|
80
|
+
signal?: AbortSignal;
|
|
81
|
+
}): Promise<PreparedTransaction>;
|
|
82
|
+
/** Shield caller funding needs no wallet signing or proof; this step only encodes its frozen request. */
|
|
83
|
+
ready(): Promise<PreparedTransaction>;
|
|
84
|
+
exportTransaction(): Promise<TransactionCall>;
|
|
85
|
+
exportProof(): ProofBundle;
|
|
86
|
+
exportAggregateMember(): OperationAggregateMember;
|
|
87
|
+
toJSON(): {
|
|
88
|
+
transaction: boolean;
|
|
89
|
+
id: string;
|
|
90
|
+
kind: "shield" | "transfer" | "withdraw" | "sweep" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
91
|
+
status: OperationStatus;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface NoteInput {
|
|
96
|
+
note: Note;
|
|
97
|
+
commitment: Hex;
|
|
98
|
+
treeId: bigint;
|
|
99
|
+
leafIndex: number;
|
|
100
|
+
}
|
|
101
|
+
interface CreditInput {
|
|
102
|
+
state: CreditDeliveryState;
|
|
103
|
+
commitment: Hex;
|
|
104
|
+
treeId: bigint;
|
|
105
|
+
leafIndex: number;
|
|
106
|
+
role: "owner" | "spender";
|
|
107
|
+
}
|
|
108
|
+
interface TransactionIdentity {
|
|
109
|
+
wallet: Wallet;
|
|
110
|
+
protocol: Protocol;
|
|
111
|
+
}
|
|
112
|
+
interface ExplicitFunds {
|
|
113
|
+
inputs: readonly NoteInput[];
|
|
114
|
+
changeAddress?: string;
|
|
115
|
+
}
|
|
116
|
+
type ExplicitTransferPreparation = TransactionIdentity & TransferPreparation & ExplicitFunds;
|
|
117
|
+
type ExplicitWithdrawalPreparation = TransactionIdentity & WithdrawalPreparation & ExplicitFunds;
|
|
118
|
+
type ExplicitSweepPreparation = TransactionIdentity & SweepPreparation & ExplicitFunds;
|
|
119
|
+
type ExplicitShieldPreparation = TransactionIdentity & ShieldPreparation;
|
|
120
|
+
type ExplicitCreateCreditPreparation = TransactionIdentity & CreateCreditPreparation & ExplicitFunds;
|
|
121
|
+
type ExplicitDrawCreditPreparation = TransactionIdentity & DrawCreditPreparation & {
|
|
122
|
+
creditInputs: readonly CreditInput[];
|
|
123
|
+
};
|
|
124
|
+
type ExplicitTopUpCreditPreparation = TransactionIdentity & TopUpCreditPreparation & ExplicitFunds & {
|
|
125
|
+
creditInputs: readonly CreditInput[];
|
|
126
|
+
};
|
|
127
|
+
type ExplicitCancelCreditPreparation = TransactionIdentity & CancelCreditPreparation & {
|
|
128
|
+
creditInputs: readonly CreditInput[];
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
interface DisclosureReference {
|
|
132
|
+
transactionHash: Hex;
|
|
133
|
+
treeId: bigint;
|
|
134
|
+
leafIndex: number;
|
|
135
|
+
role: "funds" | "owner" | "spender";
|
|
136
|
+
}
|
|
137
|
+
type DisclosureReader = Pick<ChainReader, "getChainId" | "getCode" | "getReceipt" | "getBlock" | "getLatestBlockNumber">;
|
|
138
|
+
interface DisclosureVerifierOptions {
|
|
139
|
+
protocol: TokenProtocol;
|
|
140
|
+
reader: DisclosureReader;
|
|
141
|
+
/** Minimum confirmations including the inclusion block; defaults to one. */
|
|
142
|
+
confirmations?: number;
|
|
143
|
+
}
|
|
144
|
+
interface DisclosureEvidence {
|
|
145
|
+
reference: Readonly<DisclosureReference>;
|
|
146
|
+
block: Readonly<CanonicalBlock>;
|
|
147
|
+
confirmations: bigint;
|
|
148
|
+
output: Readonly<DisclosureOutput>;
|
|
149
|
+
}
|
|
150
|
+
interface VerifiedDisclosure {
|
|
151
|
+
result: DisclosureResult;
|
|
152
|
+
block: Readonly<CanonicalBlock>;
|
|
153
|
+
confirmations: bigint;
|
|
154
|
+
output: Readonly<DisclosureReference & {
|
|
155
|
+
commitment: Hex;
|
|
156
|
+
}>;
|
|
157
|
+
}
|
|
158
|
+
/** Read-only verification against a trusted RPC and authenticated protocol deployment.
|
|
159
|
+
* Results establish output content/inclusion at a block, not payer identity, spent state or wallet completeness.
|
|
160
|
+
*/
|
|
161
|
+
declare class DisclosureVerifier {
|
|
162
|
+
#private;
|
|
163
|
+
constructor(options: DisclosureVerifierOptions | (Omit<DisclosureVerifierOptions, "reader"> & {
|
|
164
|
+
provider: Provider;
|
|
165
|
+
}));
|
|
166
|
+
private barrier;
|
|
167
|
+
/** Resolve the exact inserted output and its delivery from a successful canonical receipt. */
|
|
168
|
+
readOutput(value: DisclosureReference): Promise<DisclosureEvidence>;
|
|
169
|
+
verify(disclosure: Disclosure, value: DisclosureReference): Promise<VerifiedDisclosure>;
|
|
170
|
+
toJSON(): {
|
|
171
|
+
disclosureVerifier: boolean;
|
|
172
|
+
confirmations: string;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** Immutable operation handle. No private plan, witness, or transaction is logged implicitly. */
|
|
177
|
+
declare class Operation {
|
|
178
|
+
#private;
|
|
179
|
+
readonly status: OperationStatus;
|
|
180
|
+
private constructor();
|
|
181
|
+
static prepare(runtime: OperationRuntime, plan: OperationPlan): Promise<Operation>;
|
|
182
|
+
static resume(runtime: OperationRuntime, id: string): Promise<Operation>;
|
|
183
|
+
get id(): string;
|
|
184
|
+
get kind(): OperationPlan["kind"];
|
|
185
|
+
estimateGas(): GasReference;
|
|
186
|
+
preview(): {
|
|
187
|
+
id: string;
|
|
188
|
+
kind: "shield" | "transfer" | "withdraw" | "sweep" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
189
|
+
status: OperationStatus;
|
|
190
|
+
context: {
|
|
191
|
+
tokenAddress: _invisi_labs_core.Address;
|
|
192
|
+
now?: bigint;
|
|
193
|
+
chainId: bigint;
|
|
194
|
+
protocolAddress: _invisi_labs_core.Address;
|
|
195
|
+
};
|
|
196
|
+
inputs: number;
|
|
197
|
+
creditOutputs: {
|
|
198
|
+
amount: bigint;
|
|
199
|
+
expiry: bigint;
|
|
200
|
+
owner: `0x${string}`;
|
|
201
|
+
spender: `0x${string}`;
|
|
202
|
+
ownerPayout: bigint;
|
|
203
|
+
spenderPayout: bigint;
|
|
204
|
+
}[] | undefined;
|
|
205
|
+
outputs: {
|
|
206
|
+
to: string;
|
|
207
|
+
amount: bigint;
|
|
208
|
+
change: boolean;
|
|
209
|
+
}[];
|
|
210
|
+
capacity: number | undefined;
|
|
211
|
+
deadline: bigint;
|
|
212
|
+
fundingAmount: bigint;
|
|
213
|
+
fundingPayer: `0x${string}` | undefined;
|
|
214
|
+
withdrawalAmount: bigint;
|
|
215
|
+
withdrawalAddress: `0x${string}` | undefined;
|
|
216
|
+
permissions: {
|
|
217
|
+
walletAuthorization: boolean;
|
|
218
|
+
proof: boolean;
|
|
219
|
+
fundingAuthorization: boolean;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
private current;
|
|
223
|
+
private stage;
|
|
224
|
+
authorize(options?: {
|
|
225
|
+
signal?: AbortSignal;
|
|
226
|
+
}): Promise<Operation>;
|
|
227
|
+
prove(options?: ProverOptions): Promise<Operation>;
|
|
228
|
+
private encode;
|
|
229
|
+
authorizeFunding(options?: {
|
|
230
|
+
signal?: AbortSignal;
|
|
231
|
+
}): Promise<Operation>;
|
|
232
|
+
/** Shield caller funding needs no wallet signing or proof; this step only encodes its frozen request. */
|
|
233
|
+
ready(): Promise<Operation>;
|
|
234
|
+
private validateExport;
|
|
235
|
+
exportTransaction(options?: {
|
|
236
|
+
signal?: AbortSignal;
|
|
237
|
+
}): Promise<TransactionCall>;
|
|
238
|
+
exportAggregateMember(): Promise<OperationAggregateMember>;
|
|
239
|
+
abandon(): Promise<Operation>;
|
|
240
|
+
/** Record an application-owned signed/broadcast transaction. This never sends or waits. */
|
|
241
|
+
trackTransaction(transactionHash: string): Promise<Operation>;
|
|
242
|
+
reconcile(options?: {
|
|
243
|
+
transactionHash?: Hex;
|
|
244
|
+
signal?: AbortSignal;
|
|
245
|
+
}): Promise<Operation>;
|
|
246
|
+
toJSON(): {
|
|
247
|
+
id: string;
|
|
248
|
+
kind: "shield" | "transfer" | "withdraw" | "sweep" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
249
|
+
status: OperationStatus;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface RefreshResult {
|
|
254
|
+
block: CanonicalBlock;
|
|
255
|
+
notes: number;
|
|
256
|
+
credits: number;
|
|
257
|
+
balances: BalanceSnapshot[];
|
|
258
|
+
}
|
|
259
|
+
interface RefreshOptions {
|
|
260
|
+
/** Explicit history range; retain the returned block to request the next page later. */
|
|
261
|
+
fromBlock: bigint;
|
|
262
|
+
/** Defaults to the Protocol RPC's indexed head, independently checked against Chain RPC. */
|
|
263
|
+
toBlock?: bigint;
|
|
264
|
+
/** Explicit permission to delegate detection; never provide a viewing or spending key. */
|
|
265
|
+
detectionKey?: Uint8Array;
|
|
266
|
+
/** At most 100 blocks per service request. Reduce this on high-volume deployments. */
|
|
267
|
+
pageSize?: number;
|
|
268
|
+
signal?: AbortSignal;
|
|
269
|
+
/** Rebuild private inventory from these pages while retaining uncertain operations. */
|
|
270
|
+
reset?: boolean;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Native ethers transaction options; the exported business call and session chain remain fixed. */
|
|
274
|
+
type SessionTransactionOptions = Omit<TransactionRequest, "to" | "from" | "data" | "value" | "chainId">;
|
|
275
|
+
/** Wallet state and operations, with infrastructure and permissions explicitly injected. */
|
|
276
|
+
declare class WalletSession {
|
|
277
|
+
#private;
|
|
278
|
+
readonly scope: WalletScope;
|
|
279
|
+
readonly protocol: Protocol;
|
|
280
|
+
constructor(options: WalletSessionOptions);
|
|
281
|
+
sendTransaction(call: TransactionCall, options?: SessionTransactionOptions): Promise<TransactionResponse>;
|
|
282
|
+
sendTransaction(operation: Operation, options?: SessionTransactionOptions): Promise<TransactionResponse>;
|
|
283
|
+
private runtime;
|
|
284
|
+
private updater;
|
|
285
|
+
balance(tokenAddress: `0x${string}`): Promise<BalanceSnapshot>;
|
|
286
|
+
/** Pull explicitly selected indexed pages; no chain scanning or public tree reconstruction. */
|
|
287
|
+
refresh(options: RefreshOptions): Promise<RefreshResult>;
|
|
288
|
+
private preparation;
|
|
289
|
+
prepareTransfer(options: TransferPreparation): Promise<Operation>;
|
|
290
|
+
prepareWithdraw(options: WithdrawalPreparation): Promise<Operation>;
|
|
291
|
+
prepareSweep(options: SweepPreparation): Promise<Operation>;
|
|
292
|
+
prepareShield(options: ShieldPreparation): Promise<Operation>;
|
|
293
|
+
prepareCreateCredit(options: CreateCreditPreparation): Promise<Operation>;
|
|
294
|
+
prepareDrawCredit(options: DrawCreditPreparation): Promise<Operation>;
|
|
295
|
+
prepareTopUpCredit(options: TopUpCreditPreparation): Promise<Operation>;
|
|
296
|
+
prepareCancelCredit(options: CancelCreditPreparation): Promise<Operation>;
|
|
297
|
+
resume(operationId: string): Promise<Operation>;
|
|
298
|
+
toJSON(): {
|
|
299
|
+
walletSession: boolean;
|
|
300
|
+
walletIdentity: `0x${string}`;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** Compose independent Chain RPC and indexed Protocol RPC with local wallet capabilities. */
|
|
305
|
+
type InvisiOptions = Omit<WalletSessionOptions, "wallet" | "protocol" | "namespace" | "viewing" | "authorization" | "chainReader"> & {
|
|
306
|
+
provider?: Provider;
|
|
307
|
+
signer?: Signer;
|
|
308
|
+
chainReader?: ChainReader;
|
|
309
|
+
};
|
|
310
|
+
/** Wallet identity and session permissions; shared infrastructure belongs to InvisiOptions. */
|
|
311
|
+
type ConnectionOptions = Pick<WalletSessionOptions, "wallet" | "protocol" | "namespace" | "viewing" | "authorization">;
|
|
312
|
+
/** A neutral composition entry point; every resolved instance owns an independent session. */
|
|
313
|
+
declare class Invisi {
|
|
314
|
+
#private;
|
|
315
|
+
constructor(options?: InvisiOptions);
|
|
316
|
+
connect(options: ConnectionOptions): Promise<WalletSession>;
|
|
317
|
+
private resolve;
|
|
318
|
+
prepareTransfer(options: ExplicitTransferPreparation): Promise<PreparedTransaction>;
|
|
319
|
+
prepareWithdraw(options: ExplicitWithdrawalPreparation): Promise<PreparedTransaction>;
|
|
320
|
+
prepareSweep(options: ExplicitSweepPreparation): Promise<PreparedTransaction>;
|
|
321
|
+
prepareShield(options: ExplicitShieldPreparation): Promise<PreparedTransaction>;
|
|
322
|
+
prepareCreateCredit(options: ExplicitCreateCreditPreparation): Promise<PreparedTransaction>;
|
|
323
|
+
prepareDrawCredit(options: ExplicitDrawCreditPreparation): Promise<PreparedTransaction>;
|
|
324
|
+
prepareTopUpCredit(options: ExplicitTopUpCreditPreparation): Promise<PreparedTransaction>;
|
|
325
|
+
prepareCancelCredit(options: ExplicitCancelCreditPreparation): Promise<PreparedTransaction>;
|
|
326
|
+
toJSON(): {
|
|
327
|
+
invisi: boolean;
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** Protocol RPC transport with ethers provider integration for independent chain checks. */
|
|
332
|
+
declare class ProtocolRpcClient extends ProtocolRpcClient$1 {
|
|
333
|
+
withProvider(provider: Provider): ProtocolRpcClient$1;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** Registry operations accept the application's existing ethers provider. */
|
|
337
|
+
declare class AddressRegistry extends AddressRegistry$1 {
|
|
338
|
+
prepareRegistration(options: RegistrationPreparation | (Omit<RegistrationPreparation, "reader"> & {
|
|
339
|
+
provider: Provider;
|
|
340
|
+
})): Promise<_invisi_labs_protocol.RegistrationOperation>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Caller-owned, nonextractable AES-GCM key. The SDK does not persist the key. */
|
|
344
|
+
declare class EncryptedWalletCodec implements WalletRecordCodec {
|
|
345
|
+
#private;
|
|
346
|
+
private constructor();
|
|
347
|
+
static fromKey(key: CryptoKey): EncryptedWalletCodec;
|
|
348
|
+
static fromBytes(key: Uint8Array): Promise<EncryptedWalletCodec>;
|
|
349
|
+
private aad;
|
|
350
|
+
encode(state: WalletState, context: {
|
|
351
|
+
key: string;
|
|
352
|
+
revision: number;
|
|
353
|
+
}): Promise<Uint8Array>;
|
|
354
|
+
decode(data: Uint8Array, context: {
|
|
355
|
+
key: string;
|
|
356
|
+
revision: number;
|
|
357
|
+
}): Promise<WalletState>;
|
|
358
|
+
toJSON(): {
|
|
359
|
+
walletRecordCodec: string;
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export { AddressRegistry, BalanceSnapshot, CancelCreditPreparation, type ConnectionOptions, CreateCreditPreparation, type CreditInput, type DisclosureEvidence, type DisclosureReader, type DisclosureReference, DisclosureVerifier, type DisclosureVerifierOptions, DrawCreditPreparation, EncryptedWalletCodec, type ExplicitCancelCreditPreparation, type ExplicitCreateCreditPreparation, type ExplicitDrawCreditPreparation, type ExplicitShieldPreparation, type ExplicitSweepPreparation, type ExplicitTopUpCreditPreparation, type ExplicitTransferPreparation, type ExplicitWithdrawalPreparation, FundingSigner, GasReference, Invisi, type InvisiOptions, type NoteInput, Operation, OperationAggregateMember, OperationStatus, PreparedTransaction, ProtocolRpcClient, type RefreshOptions, type RefreshResult, type SessionTransactionOptions, ShieldPreparation, SweepPreparation, TopUpCreditPreparation, type TransactionIdentity, TransferPreparation, type VerifiedDisclosure, WalletScope, WalletSession, WalletSessionOptions, WalletState, WithdrawalPreparation };
|