@invisi-labs/sdk 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,22 +1,70 @@
1
+ import { O as OperationRuntime, a as OperationPlan, G as GasReference, T as TransactionProveOptions, b as OperationAggregateMember, C as CancelCreditPreparation, c as CreateCreditPreparation, D as DrawCreditPreparation, S as ShieldPreparation, d as TopUpCreditPreparation, e as TransferPreparation, W as WalletSessionOptions, f as WalletSessionInfrastructure } from './operation-types-D7I405FX.js';
2
+ export { g as CoinSelector, F as FundingAuthorizationVerifier, h as FundingSigner, i as FundingSource, j as FundingTypedData, k as GasBenchmarkCircuit, l as GasBenchmarkDeployment, m as GasBenchmarkProfile, n as GasBenchmarkSample, o as GasBenchmarkShape, P as PaymentOutput, p as TransactionExecution, q as defineGasBenchmarks } from './operation-types-D7I405FX.js';
1
3
  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, MAX_MEMO_BYTES, Memo, MissingCapabilityError, Note, NullifierCapability, ReceivingKeys, ViewingCapability, Wallet, WalletAuthorization, WalletAuthorizationProvider, decodeMemoText, encodeMemo } 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-v9OjKMsL.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-v9OjKMsL.js';
4
+ import { CreditDeliveryState, PublicWallet, Note, DisclosureOutput, Disclosure, DisclosureResult, ViewingCapability } from '@invisi-labs/core';
5
+ export { Address, CreditDataV1, CreditDeliveryState, CreditNote, CreditOpening, CreditPolicy, Detector, Disclosure, DisclosureExport, DisclosureOutput, DisclosureResult, FundsDataV1, Hex, MAX_MEMO_BYTES, Memo, MissingCapabilityError, Note, NullifierCapability, PublicWallet, ReceivingKeys, SigningRequest, ViewingCapability, Wallet, WalletAuthorization, WalletAuthorizationProvider, computeCreditNullifier, creditPeriods, creditV1, decodeDeliveryHeader, decodeMemoText, encodeMemo, fundsV1 } from '@invisi-labs/core';
6
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';
7
+ import { TransactionCall, Protocol, CanonicalBlock, ChainReader, TokenProtocol, RegistrationPreparation, RegistrationOperation, AddressRegistry as AddressRegistry$1, CanonicalReceipt } from '@invisi-labs/protocol';
8
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';
9
+ import { Prover, ProofBundle } from '@invisi-labs/prover';
10
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';
11
+ import { O as OperationStatus, B as BalanceSnapshot, R as ReceiptPosition, S as SpentState, C as Checkpoint, W as WalletScope, a as WalletState } from './state-AUnz7TG7.js';
12
+ export { b as WalletStore, w as walletBalance } from './state-AUnz7TG7.js';
13
+ import { Hex, Address } from '@invisi-labs/protocol/contracts';
14
+ import { Provider, TransactionRequest, TransactionResponse } from 'ethers';
15
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';
16
+ export { ProtocolDeployment, ProtocolOutput, ProtocolRpcChain, ProtocolRpcClientOptions, ProtocolRpcConnectionOptions, ProtocolRpcError, ProtocolRpcReader, RegisteredReceivingAddress } from '@invisi-labs/rpc';
17
+ import { W as WalletRecordCodec } from './store-BMN8kd0c.js';
18
18
 
19
- type Runtime = Omit<OperationRuntime, "store">;
19
+ /** Stable codes returned by public SDK prepare* methods; inspect details instead of matching messages. */
20
+ type InvisiErrorCode =
21
+ /**
22
+ * Other preparation failure, such as invalid amounts, expired deadlines,
23
+ * or conflicting registration state. Inspect message and cause.
24
+ */
25
+ "PREPARATION_FAILED"
26
+ /**
27
+ * Required infrastructure or permissions were not supplied.
28
+ * The capability field identifies what is missing.
29
+ */
30
+ | "MISSING_CAPABILITY"
31
+ /**
32
+ * The recipient string is not a valid full 0i address or nonzero EVM owner address.
33
+ * No registration lookup is attempted for this invalid string.
34
+ */
35
+ | "INVALID_RECIPIENT"
36
+ /**
37
+ * A successful lookup found no receiving keys for this short 0x owner
38
+ * at the queried state. Indexed data may lag behind the latest chain state.
39
+ * Full 0i addresses contain receiving keys and do not require registration.
40
+ */
41
+ | "EVM_ADDRESS_NOT_REGISTERED"
42
+ /**
43
+ * Recipient lookup failed or returned invalid keys. Inspect cause.
44
+ * Registration status is unknown; this does not mean the owner is unregistered.
45
+ */
46
+ | "RECIPIENT_LOOKUP_FAILED";
47
+ interface InvisiErrorDetails {
48
+ operation?: string;
49
+ address?: string;
50
+ /** Zero-based index into the caller's outputs array, excluding automatic change. */
51
+ outputIndex?: number;
52
+ field?: string;
53
+ capability?: string;
54
+ cause?: unknown;
55
+ }
56
+ /** Stable application-facing preparation failure with the original cause. */
57
+ declare class InvisiError extends Error {
58
+ readonly code: InvisiErrorCode;
59
+ readonly operation: string | undefined;
60
+ readonly address: string | undefined;
61
+ readonly outputIndex: number | undefined;
62
+ readonly field: string | undefined;
63
+ readonly capability: string | undefined;
64
+ constructor(code: InvisiErrorCode, message: string, details?: InvisiErrorDetails);
65
+ }
66
+
67
+ type Runtime = Omit<OperationRuntime, "store" | "authorization">;
20
68
  /** An immutable, local transaction handle. No wallet inventory, reservations or persistence. */
21
69
  declare class PreparedTransaction {
22
70
  #private;
@@ -24,15 +72,16 @@ declare class PreparedTransaction {
24
72
  private constructor();
25
73
  static prepare(runtime: Runtime, plan: OperationPlan): PreparedTransaction;
26
74
  get id(): string;
27
- get kind(): "transfer" | "withdraw" | "sweep" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
75
+ get kind(): "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
28
76
  estimateGas(): GasReference;
29
77
  preview(): {
30
78
  id: string;
31
- kind: "transfer" | "withdraw" | "sweep" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
79
+ kind: "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
32
80
  status: OperationStatus;
33
81
  context: {
34
82
  tokenAddress: _invisi_labs_core.Address;
35
83
  now?: bigint;
84
+ timestamp?: bigint;
36
85
  chainId: bigint;
37
86
  protocolAddress: _invisi_labs_core.Address;
38
87
  };
@@ -64,21 +113,25 @@ declare class PreparedTransaction {
64
113
  };
65
114
  private current;
66
115
  private stage;
67
- authorize(options?: {
116
+ /** Public EIP-712 request; signing transport and key custody belong to the caller. */
117
+ exportWalletAuthorization(options?: {
68
118
  signal?: AbortSignal;
69
- }): Promise<PreparedTransaction>;
70
- authorize(provider: WalletAuthorizationProvider, options?: {
119
+ }): Promise<_invisi_labs_core.SigningRequest>;
120
+ /** Attach an external EOA signature, retaining its witness only at the private proving boundary. */
121
+ withWalletSignature(signature: string, options?: {
71
122
  signal?: AbortSignal;
72
123
  }): Promise<PreparedTransaction>;
73
- prove(options?: ProverOptions): Promise<PreparedTransaction>;
74
- prove(backend: Prover, options?: ProverOptions): Promise<PreparedTransaction>;
75
- private encode;
76
- authorizeFunding(options?: {
124
+ /** Export only after proving when the funding authorization binds an actual proof hash. */
125
+ exportFundingAuthorization(options?: {
77
126
  signal?: AbortSignal;
78
- }): Promise<PreparedTransaction>;
79
- authorizeFunding(signer: FundingSigner, options?: {
127
+ }): Promise<_invisi_labs_core.SigningRequest>;
128
+ /** Verify an external signature against this handle's own frozen operation. */
129
+ withFundingSignature(signature: string, options?: {
80
130
  signal?: AbortSignal;
81
131
  }): Promise<PreparedTransaction>;
132
+ prove(options?: TransactionProveOptions): Promise<PreparedTransaction>;
133
+ prove(backend: Prover, options?: TransactionProveOptions): Promise<PreparedTransaction>;
134
+ private encode;
82
135
  /** Shield caller funding needs no wallet signing or proof; this step only encodes its frozen request. */
83
136
  ready(): Promise<PreparedTransaction>;
84
137
  exportTransaction(): Promise<TransactionCall>;
@@ -87,7 +140,7 @@ declare class PreparedTransaction {
87
140
  toJSON(): {
88
141
  transaction: boolean;
89
142
  id: string;
90
- kind: "transfer" | "withdraw" | "sweep" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
143
+ kind: "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
91
144
  status: OperationStatus;
92
145
  };
93
146
  }
@@ -106,7 +159,11 @@ interface CreditInput {
106
159
  role: "owner" | "spender";
107
160
  }
108
161
  interface TransactionIdentity {
109
- wallet: Wallet;
162
+ wallet: PublicWallet & {
163
+ getViewer?: never;
164
+ getDetector?: never;
165
+ exportAuthorization?: never;
166
+ };
110
167
  protocol: Protocol;
111
168
  }
112
169
  interface ExplicitFunds {
@@ -114,8 +171,6 @@ interface ExplicitFunds {
114
171
  changeAddress?: string;
115
172
  }
116
173
  type ExplicitTransferPreparation = TransactionIdentity & TransferPreparation & ExplicitFunds;
117
- type ExplicitWithdrawalPreparation = TransactionIdentity & WithdrawalPreparation & ExplicitFunds;
118
- type ExplicitSweepPreparation = TransactionIdentity & SweepPreparation & ExplicitFunds;
119
174
  type ExplicitShieldPreparation = TransactionIdentity & ShieldPreparation;
120
175
  type ExplicitCreateCreditPreparation = TransactionIdentity & CreateCreditPreparation & ExplicitFunds;
121
176
  type ExplicitDrawCreditPreparation = TransactionIdentity & DrawCreditPreparation & {
@@ -185,11 +240,12 @@ declare class Operation {
185
240
  estimateGas(): GasReference;
186
241
  preview(): {
187
242
  id: string;
188
- kind: "transfer" | "withdraw" | "sweep" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
243
+ kind: "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
189
244
  status: OperationStatus;
190
245
  context: {
191
246
  tokenAddress: _invisi_labs_core.Address;
192
247
  now?: bigint;
248
+ timestamp?: bigint;
193
249
  chainId: bigint;
194
250
  protocolAddress: _invisi_labs_core.Address;
195
251
  };
@@ -221,10 +277,27 @@ declare class Operation {
221
277
  };
222
278
  private current;
223
279
  private stage;
280
+ private signingCurrent;
281
+ /** Public EIP-712 request; signing transport and key custody belong to the caller. */
282
+ exportWalletAuthorization(options?: {
283
+ signal?: AbortSignal;
284
+ }): Promise<_invisi_labs_core.SigningRequest>;
285
+ /** Attach an external EOA signature, retaining its witness only at the private proving boundary. */
286
+ withWalletSignature(signature: string, options?: {
287
+ signal?: AbortSignal;
288
+ }): Promise<Operation>;
289
+ /** Export only after proving when the funding authorization binds an actual proof hash. */
290
+ exportFundingAuthorization(options?: {
291
+ signal?: AbortSignal;
292
+ }): Promise<_invisi_labs_core.SigningRequest>;
293
+ /** Verify an external signature against this handle's own frozen operation. */
294
+ withFundingSignature(signature: string, options?: {
295
+ signal?: AbortSignal;
296
+ }): Promise<Operation>;
224
297
  authorize(options?: {
225
298
  signal?: AbortSignal;
226
299
  }): Promise<Operation>;
227
- prove(options?: ProverOptions): Promise<Operation>;
300
+ prove(suppliedOptions?: TransactionProveOptions): Promise<Operation>;
228
301
  private encode;
229
302
  authorizeFunding(options?: {
230
303
  signal?: AbortSignal;
@@ -245,11 +318,57 @@ declare class Operation {
245
318
  }): Promise<Operation>;
246
319
  toJSON(): {
247
320
  id: string;
248
- kind: "transfer" | "withdraw" | "sweep" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
321
+ kind: "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
249
322
  status: OperationStatus;
250
323
  };
251
324
  }
252
325
 
326
+ interface DiscoveryContext {
327
+ chainId: bigint;
328
+ protocolAddress: Address;
329
+ }
330
+ /** Decoded logs from complete canonical transaction receipts, including insertion logs. */
331
+ interface DeliveryEventLog {
332
+ address: string;
333
+ eventName: string;
334
+ args?: Record<string, unknown>;
335
+ blockNumber?: bigint | null;
336
+ blockHash?: Hex | null;
337
+ transactionHash?: Hex | null;
338
+ logIndex?: number | null;
339
+ removed?: boolean;
340
+ }
341
+ interface DeliveryCandidate {
342
+ tokenAddress: Address;
343
+ treeId: bigint;
344
+ leafIndex: number;
345
+ commitment: Hex;
346
+ role: "funds" | "owner" | "spender";
347
+ delivery: {
348
+ ciphertext: Hex;
349
+ clue: Hex;
350
+ };
351
+ blockNumber: bigint;
352
+ blockHash: Hex;
353
+ transactionHash: Hex;
354
+ }
355
+ interface DiscoveredNote extends Omit<DeliveryCandidate, "delivery" | "role"> {
356
+ note: Note;
357
+ }
358
+ interface DiscoveredCredit extends Omit<DeliveryCandidate, "delivery"> {
359
+ role: "owner" | "spender";
360
+ state: CreditDeliveryState;
361
+ }
362
+ /** Authenticate private deliveries from a single batch of canonical receipts. */
363
+ declare function decryptCandidates(logs: readonly DeliveryEventLog[], options: {
364
+ context: DiscoveryContext;
365
+ viewing: Pick<ViewingCapability, "walletIdentity" | "decryptNote" | "decryptCredit">;
366
+ confirmedThrough: bigint;
367
+ }): Promise<{
368
+ notes: DiscoveredNote[];
369
+ credits: DiscoveredCredit[];
370
+ }>;
371
+
253
372
  interface RefreshResult {
254
373
  block: CanonicalBlock;
255
374
  notes: number;
@@ -270,6 +389,79 @@ interface RefreshOptions {
270
389
  reset?: boolean;
271
390
  }
272
391
 
392
+ declare function operationPreview(plan: OperationPlan, status: OperationStatus): {
393
+ id: string;
394
+ kind: "shield" | "create-credit" | "cancel-credit" | "top-up-credit" | "transfer" | "draw-credit";
395
+ status: OperationStatus;
396
+ context: {
397
+ tokenAddress: _invisi_labs_core.Address;
398
+ now?: bigint;
399
+ timestamp?: bigint;
400
+ chainId: bigint;
401
+ protocolAddress: _invisi_labs_core.Address;
402
+ };
403
+ inputs: number;
404
+ creditOutputs: {
405
+ amount: bigint;
406
+ expiry: bigint;
407
+ owner: `0x${string}`;
408
+ spender: `0x${string}`;
409
+ ownerPayout: bigint;
410
+ spenderPayout: bigint;
411
+ }[] | undefined;
412
+ outputs: {
413
+ to: string;
414
+ amount: bigint;
415
+ change: boolean;
416
+ }[];
417
+ capacity: number | undefined;
418
+ deadline: bigint;
419
+ fundingAmount: bigint;
420
+ fundingPayer: `0x${string}` | undefined;
421
+ withdrawalAmount: bigint;
422
+ withdrawalAddress: `0x${string}` | undefined;
423
+ permissions: {
424
+ walletAuthorization: boolean;
425
+ proof: boolean;
426
+ fundingAuthorization: boolean;
427
+ };
428
+ };
429
+
430
+ /** Private application data. Never send this view to public analytics. */
431
+ interface OutgoingHistoryEntry extends Omit<ReturnType<typeof operationPreview>, "outputs"> {
432
+ preparedAt: {
433
+ number: bigint;
434
+ hash: Hex;
435
+ timestamp: bigint;
436
+ };
437
+ transactionHash?: Hex;
438
+ outputs: {
439
+ to: string;
440
+ amount: bigint;
441
+ change: boolean;
442
+ commitment: Hex;
443
+ payload: Uint8Array;
444
+ }[];
445
+ }
446
+ interface IncomingHistoryEntry extends ReceiptPosition {
447
+ tokenAddress: Hex;
448
+ amount: bigint;
449
+ payload: Uint8Array;
450
+ spent: SpentState;
451
+ }
452
+ interface WalletHistory {
453
+ revision: number;
454
+ checkedThrough: Checkpoint | null;
455
+ invalidated: boolean;
456
+ /** Local construction records; not proof of a mined payment or funding identity. */
457
+ outgoing: OutgoingHistoryEntry[];
458
+ /** Authenticated incoming funds outputs, including already consumed ones. */
459
+ incoming: IncomingHistoryEntry[];
460
+ }
461
+ interface HistoryOptions {
462
+ tokenAddress?: Hex;
463
+ }
464
+
273
465
  /** Native ethers transaction options; the exported business call and session chain remain fixed. */
274
466
  type SessionTransactionOptions = Omit<TransactionRequest, "to" | "from" | "data" | "value" | "chainId">;
275
467
  /** Wallet state and operations, with infrastructure and permissions explicitly injected. */
@@ -282,13 +474,15 @@ declare class WalletSession {
282
474
  sendTransaction(operation: Operation, options?: SessionTransactionOptions): Promise<TransactionResponse>;
283
475
  private runtime;
284
476
  private updater;
477
+ /** Local session commits only. Host applications own cross-tab/store subscriptions. */
478
+ subscribe(listener: () => void): () => void;
479
+ /** Detached history for wallet UI; construction records do not imply chain success. */
480
+ getHistory(options?: HistoryOptions): Promise<WalletHistory>;
285
481
  balance(tokenAddress: `0x${string}`): Promise<BalanceSnapshot>;
286
482
  /** Pull explicitly selected indexed pages; no chain scanning or public tree reconstruction. */
287
483
  refresh(options: RefreshOptions): Promise<RefreshResult>;
288
484
  private preparation;
289
485
  prepareTransfer(options: TransferPreparation): Promise<Operation>;
290
- prepareWithdraw(options: WithdrawalPreparation): Promise<Operation>;
291
- prepareSweep(options: SweepPreparation): Promise<Operation>;
292
486
  prepareShield(options: ShieldPreparation): Promise<Operation>;
293
487
  prepareCreateCredit(options: CreateCreditPreparation): Promise<Operation>;
294
488
  prepareDrawCredit(options: DrawCreditPreparation): Promise<Operation>;
@@ -302,22 +496,28 @@ declare class WalletSession {
302
496
  }
303
497
 
304
498
  /** Compose independent Chain RPC and indexed Protocol RPC with local wallet capabilities. */
305
- type InvisiOptions = Omit<WalletSessionOptions, "wallet" | "protocol" | "namespace" | "viewing" | "authorization" | "chainReader"> & {
499
+ type InvisiInfrastructure = Omit<WalletSessionInfrastructure, "wallet" | "protocol" | "namespace" | "viewing" | "authorization" | "chainReader" | "signer" | "fundingSigner"> & {
500
+ /** Recipient discovery source; defaults to protocol-rpc. An explicit addressResolver takes precedence. */
501
+ addressLookup?: "chain" | "protocol-rpc";
306
502
  provider?: Provider;
307
- signer?: Signer;
308
503
  chainReader?: ChainReader;
309
504
  };
505
+ type InvisiOptions = InvisiInfrastructure;
506
+ /** Public wallet and registry-specific inputs; signing remains external. */
507
+ type RegistrationPreparationOptions = Pick<RegistrationPreparation, "update" | "deadline"> & Pick<TransactionIdentity, "wallet">;
310
508
  /** Wallet identity and session permissions; shared infrastructure belongs to InvisiOptions. */
311
- type ConnectionOptions = Pick<WalletSessionOptions, "wallet" | "protocol" | "namespace" | "viewing" | "authorization">;
509
+ type ConnectionOptions = Pick<WalletSessionOptions, "wallet" | "protocol" | "namespace" | "viewing" | "authorization" | "signer" | "fundingSigner">;
312
510
  /** A neutral composition entry point; every resolved instance owns an independent session. */
313
511
  declare class Invisi {
314
512
  #private;
315
513
  constructor(options?: InvisiOptions);
316
514
  connect(options: ConnectionOptions): Promise<WalletSession>;
317
515
  private resolve;
516
+ /** Discover the selected chain's registry and prepare an independent signing request. */
517
+ prepareRegistration(options: RegistrationPreparationOptions): Promise<RegistrationOperation>;
518
+ private assertPublicIdentity;
519
+ private resolveExplicit;
318
520
  prepareTransfer(options: ExplicitTransferPreparation): Promise<PreparedTransaction>;
319
- prepareWithdraw(options: ExplicitWithdrawalPreparation): Promise<PreparedTransaction>;
320
- prepareSweep(options: ExplicitSweepPreparation): Promise<PreparedTransaction>;
321
521
  prepareShield(options: ExplicitShieldPreparation): Promise<PreparedTransaction>;
322
522
  prepareCreateCredit(options: ExplicitCreateCreditPreparation): Promise<PreparedTransaction>;
323
523
  prepareDrawCredit(options: ExplicitDrawCreditPreparation): Promise<PreparedTransaction>;
@@ -360,4 +560,7 @@ declare class EncryptedWalletCodec implements WalletRecordCodec {
360
560
  };
361
561
  }
362
562
 
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 };
563
+ /** Decode independently fetched canonical receipt bytes, never normalized service events. */
564
+ declare function readProtocolLogs(receipt: CanonicalReceipt, protocolAddress: Address): DeliveryEventLog[];
565
+
566
+ export { AddressRegistry, BalanceSnapshot, CancelCreditPreparation, type ConnectionOptions, CreateCreditPreparation, type CreditInput, type DeliveryEventLog, type DisclosureEvidence, type DisclosureReader, type DisclosureReference, DisclosureVerifier, type DisclosureVerifierOptions, type DiscoveredCredit, type DiscoveredNote, DrawCreditPreparation, EncryptedWalletCodec, type ExplicitCancelCreditPreparation, type ExplicitCreateCreditPreparation, type ExplicitDrawCreditPreparation, type ExplicitShieldPreparation, type ExplicitTopUpCreditPreparation, type ExplicitTransferPreparation, GasReference, type HistoryOptions, type IncomingHistoryEntry, Invisi, InvisiError, type InvisiErrorCode, type InvisiErrorDetails, type InvisiOptions, type NoteInput, Operation, OperationAggregateMember, OperationStatus, type OutgoingHistoryEntry, PreparedTransaction, ProtocolRpcClient, type RefreshOptions, type RefreshResult, type RegistrationPreparationOptions, type SessionTransactionOptions, ShieldPreparation, TopUpCreditPreparation, type TransactionIdentity, TransactionProveOptions, TransferPreparation, type VerifiedDisclosure, type WalletHistory, WalletScope, WalletSession, WalletSessionOptions, WalletState, decryptCandidates, readProtocolLogs };