@invisi-labs/sdk 1.1.7 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +5 -0
  2. package/dist/broadcaster-3KTB4JO2.cjs +21 -0
  3. package/dist/broadcaster-3KTB4JO2.cjs.map +1 -0
  4. package/dist/broadcaster-7ZKKSTZQ.js +21 -0
  5. package/dist/broadcaster-preparation-PJ263WBL.cjs +15 -0
  6. package/dist/broadcaster-preparation-PJ263WBL.cjs.map +1 -0
  7. package/dist/broadcaster-preparation-ZQAPZAUG.js +15 -0
  8. package/dist/broadcaster-preparation-ZQAPZAUG.js.map +1 -0
  9. package/dist/{chunk-LOU7AP2B.cjs → chunk-2URICDPW.cjs} +72 -33
  10. package/dist/chunk-2URICDPW.cjs.map +1 -0
  11. package/dist/chunk-3D24ABYR.js +86 -0
  12. package/dist/chunk-3D24ABYR.js.map +1 -0
  13. package/dist/chunk-3KTQQZOW.cjs +71 -0
  14. package/dist/chunk-3KTQQZOW.cjs.map +1 -0
  15. package/dist/chunk-4H4FARQK.js +1582 -0
  16. package/dist/chunk-4H4FARQK.js.map +1 -0
  17. package/dist/chunk-4SDP53YQ.cjs +765 -0
  18. package/dist/chunk-4SDP53YQ.cjs.map +1 -0
  19. package/dist/{chunk-XHKQ2BO2.js → chunk-4VI6LYGH.js} +25 -2
  20. package/dist/chunk-4VI6LYGH.js.map +1 -0
  21. package/dist/chunk-BBSRP4MH.cjs +287 -0
  22. package/dist/chunk-BBSRP4MH.cjs.map +1 -0
  23. package/dist/chunk-DGMVGFKM.js +41 -0
  24. package/dist/chunk-DGMVGFKM.js.map +1 -0
  25. package/dist/chunk-GUD3LAUO.js +765 -0
  26. package/dist/chunk-GUD3LAUO.js.map +1 -0
  27. package/dist/chunk-HCB7RQ3S.cjs +79 -0
  28. package/dist/chunk-HCB7RQ3S.cjs.map +1 -0
  29. package/dist/{chunk-GTPUYPQL.js → chunk-HKGJXQVN.js} +69 -30
  30. package/dist/chunk-HKGJXQVN.js.map +1 -0
  31. package/dist/chunk-HLH5JZD4.js +287 -0
  32. package/dist/chunk-HLH5JZD4.js.map +1 -0
  33. package/dist/chunk-J6TZZVAM.cjs +230 -0
  34. package/dist/chunk-J6TZZVAM.cjs.map +1 -0
  35. package/dist/{chunk-7F7ZZW3L.cjs → chunk-LOR6PYH5.cjs} +25 -2
  36. package/dist/chunk-LOR6PYH5.cjs.map +1 -0
  37. package/dist/chunk-MA2QZEF5.cjs +399 -0
  38. package/dist/chunk-MA2QZEF5.cjs.map +1 -0
  39. package/dist/chunk-MI4IP4ZD.cjs +86 -0
  40. package/dist/chunk-MI4IP4ZD.cjs.map +1 -0
  41. package/dist/chunk-NKYHYIRP.cjs +1582 -0
  42. package/dist/chunk-NKYHYIRP.cjs.map +1 -0
  43. package/dist/chunk-OCZLJKIA.cjs +41 -0
  44. package/dist/chunk-OCZLJKIA.cjs.map +1 -0
  45. package/dist/chunk-R5YAOJKB.js +71 -0
  46. package/dist/chunk-R5YAOJKB.js.map +1 -0
  47. package/dist/chunk-RY4M2CIQ.js +399 -0
  48. package/dist/chunk-RY4M2CIQ.js.map +1 -0
  49. package/dist/chunk-THMD5QO2.js +79 -0
  50. package/dist/chunk-THMD5QO2.js.map +1 -0
  51. package/dist/chunk-ZD2652WH.js +230 -0
  52. package/dist/chunk-ZD2652WH.js.map +1 -0
  53. package/dist/credit.cjs +1 -0
  54. package/dist/credit.cjs.map +1 -0
  55. package/dist/credit.d.cts +12 -0
  56. package/dist/credit.d.ts +12 -0
  57. package/dist/credit.js +1 -0
  58. package/dist/credit.js.map +1 -0
  59. package/dist/ethers.cjs +2 -2
  60. package/dist/ethers.cjs.map +1 -1
  61. package/dist/ethers.d.cts +15 -4
  62. package/dist/ethers.d.ts +15 -4
  63. package/dist/ethers.js +1 -1
  64. package/dist/index-CLhGwLxZ.d.cts +42 -0
  65. package/dist/index-Crp-ZFiM.d.ts +42 -0
  66. package/dist/index.cjs +64 -38
  67. package/dist/index.cjs.map +1 -1
  68. package/dist/index.d.cts +21 -14
  69. package/dist/index.d.ts +21 -14
  70. package/dist/index.js +59 -33
  71. package/dist/index.js.map +1 -1
  72. package/dist/note.cjs +11 -0
  73. package/dist/note.cjs.map +1 -0
  74. package/dist/note.d.cts +29 -0
  75. package/dist/note.d.ts +29 -0
  76. package/dist/note.js +11 -0
  77. package/dist/note.js.map +1 -0
  78. package/dist/{broadcaster-preparation-DMxxZ_1Q.d.cts → operation-bridge-CoECSxfi.d.cts} +130 -245
  79. package/dist/{broadcaster-preparation-DMxxZ_1Q.d.ts → operation-bridge-CoECSxfi.d.ts} +130 -245
  80. package/dist/preparation-HUBTVCZE.js +404 -0
  81. package/dist/preparation-HUBTVCZE.js.map +1 -0
  82. package/dist/preparation-QD3ZSYV5.cjs +404 -0
  83. package/dist/preparation-QD3ZSYV5.cjs.map +1 -0
  84. package/dist/provenance-preparation-43DN2WK7.cjs +16 -0
  85. package/dist/provenance-preparation-43DN2WK7.cjs.map +1 -0
  86. package/dist/provenance-preparation-HEZE4L5H.js +16 -0
  87. package/dist/provenance-preparation-HEZE4L5H.js.map +1 -0
  88. package/dist/provenance.cjs +59 -0
  89. package/dist/provenance.cjs.map +1 -0
  90. package/dist/provenance.d.cts +34 -0
  91. package/dist/provenance.d.ts +34 -0
  92. package/dist/provenance.js +59 -0
  93. package/dist/provenance.js.map +1 -0
  94. package/dist/{receipt-logs-m0-bhaxW.d.ts → receipt-logs-8Msm_HZS.d.ts} +82 -78
  95. package/dist/{receipt-logs-CvC951p7.d.cts → receipt-logs-DWG4In8N.d.cts} +82 -78
  96. package/dist/session-support.cjs +28 -7
  97. package/dist/session-support.cjs.map +1 -1
  98. package/dist/session-support.d.cts +71 -39
  99. package/dist/session-support.d.ts +71 -39
  100. package/dist/session-support.js +58 -37
  101. package/dist/session-support.js.map +1 -1
  102. package/package.json +22 -6
  103. package/dist/broadcaster-preparation-RMWQFYNL.js +0 -11
  104. package/dist/broadcaster-preparation-UGOTO4SX.cjs +0 -11
  105. package/dist/broadcaster-preparation-UGOTO4SX.cjs.map +0 -1
  106. package/dist/chunk-7F7ZZW3L.cjs.map +0 -1
  107. package/dist/chunk-EHP5TBC6.js +0 -3565
  108. package/dist/chunk-EHP5TBC6.js.map +0 -1
  109. package/dist/chunk-GTPUYPQL.js.map +0 -1
  110. package/dist/chunk-ITTGBIG2.js +0 -1877
  111. package/dist/chunk-ITTGBIG2.js.map +0 -1
  112. package/dist/chunk-J2JH6HIG.cjs +0 -1877
  113. package/dist/chunk-J2JH6HIG.cjs.map +0 -1
  114. package/dist/chunk-LOU7AP2B.cjs.map +0 -1
  115. package/dist/chunk-RHNIHI4P.cjs +0 -3565
  116. package/dist/chunk-RHNIHI4P.cjs.map +0 -1
  117. package/dist/chunk-XHKQ2BO2.js.map +0 -1
  118. /package/dist/{broadcaster-preparation-RMWQFYNL.js.map → broadcaster-7ZKKSTZQ.js.map} +0 -0
@@ -0,0 +1,34 @@
1
+ import { PublicResult } from '@invisi-labs/protocol/provenance';
2
+ export * from '@invisi-labs/protocol/provenance';
3
+ import { ProvenanceClient } from '@invisi-labs/rpc/provenance';
4
+ export * from '@invisi-labs/rpc/provenance';
5
+ import { ProvenanceProvider } from '@invisi-labs/prover/provenance-witness';
6
+ export * from '@invisi-labs/prover/provenance-witness';
7
+ import { B as BroadcasterTransaction, P as ProvenanceProof } from './operation-bridge-CoECSxfi.js';
8
+ export { a as PreparedProvenanceCapability } from './operation-bridge-CoECSxfi.js';
9
+ import '@invisi-labs/primitives';
10
+ import '@invisi-labs/prover';
11
+ import '@invisi-labs/protocol';
12
+ import '@invisi-labs/rpc/broadcaster';
13
+ import '@invisi-labs/protocol/contracts';
14
+ import 'ethers';
15
+ import '@invisi-labs/rpc';
16
+
17
+ interface ProvenanceOptions {
18
+ prover?: ProvenanceProvider;
19
+ client?: ProvenanceClient;
20
+ maxRootPages?: number;
21
+ maxLeaves?: number;
22
+ }
23
+ declare class Provenance {
24
+ #private;
25
+ private readonly options;
26
+ constructor(options?: ProvenanceOptions);
27
+ private client;
28
+ prove(ready: BroadcasterTransaction, options?: {
29
+ reprove?: boolean;
30
+ }): Promise<ProvenanceProof>;
31
+ submit(proof: ProvenanceProof): Promise<PublicResult>;
32
+ }
33
+
34
+ export { Provenance, type ProvenanceOptions, ProvenanceProof };
@@ -0,0 +1,59 @@
1
+ import {
2
+ validateProvenanceProof
3
+ } from "./chunk-3D24ABYR.js";
4
+ import {
5
+ operationProvenanceContext,
6
+ proveOperationProvenance,
7
+ readOperationProvenance
8
+ } from "./chunk-R5YAOJKB.js";
9
+
10
+ // src/provenance.ts
11
+ export * from "@invisi-labs/protocol/provenance";
12
+ export * from "@invisi-labs/rpc/provenance";
13
+ export * from "@invisi-labs/prover/provenance-witness";
14
+
15
+ // src/provenance/Provenance.ts
16
+ import { OfficialProvenanceClients } from "@invisi-labs/rpc/provenance";
17
+ var Provenance = class {
18
+ constructor(options = {}) {
19
+ this.options = options;
20
+ }
21
+ #official = new OfficialProvenanceClients();
22
+ async client(scope) {
23
+ const client = this.options.client ?? await this.#official.get(scope);
24
+ if (BigInt(client.trust.chainId) !== BigInt(scope.chainId) || BigInt(client.trust.protocolAddress) !== BigInt(scope.protocolAddress))
25
+ throw Error("Provenance client deployment mismatch");
26
+ return client;
27
+ }
28
+ async prove(ready, options = {}) {
29
+ const cached = options.reprove ? void 0 : await readOperationProvenance(ready);
30
+ if (cached)
31
+ return validateProvenanceProof(cached, (await this.client(cached.context)).trust);
32
+ const prover = this.options.prover;
33
+ if (!prover) throw Error("NativeProver required to generate Provenance proof");
34
+ const scope = await operationProvenanceContext(ready);
35
+ const capability = await prover.getProvenanceCapability();
36
+ const client = await this.client(scope);
37
+ const proof = await proveOperationProvenance(
38
+ ready,
39
+ {
40
+ ...capability,
41
+ client,
42
+ ...this.options.maxRootPages === void 0 ? {} : { maxRootPages: this.options.maxRootPages },
43
+ ...this.options.maxLeaves === void 0 ? {} : { maxLeaves: this.options.maxLeaves }
44
+ },
45
+ options.reprove === true
46
+ );
47
+ return validateProvenanceProof(proof, client.trust);
48
+ }
49
+ async submit(proof) {
50
+ const copy = structuredClone(proof);
51
+ const client = await this.client(copy.context);
52
+ const packet = await validateProvenanceProof(copy, client.trust);
53
+ return client.submitSourceProof(packet.data, packet.sidecars);
54
+ }
55
+ };
56
+ export {
57
+ Provenance
58
+ };
59
+ //# sourceMappingURL=provenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/provenance.ts","../src/provenance/Provenance.ts"],"sourcesContent":["export * from \"@invisi-labs/protocol/provenance\";\nexport * from \"@invisi-labs/rpc/provenance\";\nexport * from \"@invisi-labs/prover/provenance-witness\";\nexport { Provenance, type ProvenanceOptions } from \"./provenance/Provenance\";\nexport type { ProvenanceProof } from \"./provenance/proof-record\";\n\nexport type { PreparedProvenanceCapability } from \"./broadcaster/provenance-preparation\";\n","import { OfficialProvenanceClients, type ProvenanceClient } from \"@invisi-labs/rpc/provenance\";\nimport { type PublicResult, type Scope } from \"@invisi-labs/protocol/provenance\";\nimport { type ProvenanceProvider } from \"@invisi-labs/prover/provenance-witness\";\nimport {\n proveOperationProvenance,\n readOperationProvenance,\n operationProvenanceContext,\n type BroadcasterTransaction,\n} from \"../broadcaster/operation-bridge\";\nimport { validateProvenanceProof, type ProvenanceProof } from \"./proof-record\";\n\nexport interface ProvenanceOptions {\n prover?: ProvenanceProvider;\n client?: ProvenanceClient;\n maxRootPages?: number;\n maxLeaves?: number;\n}\n\nexport class Provenance {\n readonly #official = new OfficialProvenanceClients();\n constructor(private readonly options: ProvenanceOptions = {}) {}\n\n private async client(scope: Scope): Promise<ProvenanceClient> {\n const client = this.options.client ?? (await this.#official.get(scope));\n if (\n BigInt(client.trust.chainId) !== BigInt(scope.chainId) ||\n BigInt(client.trust.protocolAddress) !== BigInt(scope.protocolAddress)\n )\n throw Error(\"Provenance client deployment mismatch\");\n return client;\n }\n\n async prove(\n ready: BroadcasterTransaction,\n options: { reprove?: boolean } = {}\n ): Promise<ProvenanceProof> {\n const cached = options.reprove ? undefined : await readOperationProvenance(ready);\n if (cached)\n return validateProvenanceProof(cached, (await this.client(cached.context)).trust);\n const prover = this.options.prover;\n if (!prover) throw Error(\"NativeProver required to generate Provenance proof\");\n const scope = await operationProvenanceContext(ready);\n const capability = await prover.getProvenanceCapability();\n const client = await this.client(scope);\n const proof = await proveOperationProvenance(\n ready,\n {\n ...capability,\n client,\n ...(this.options.maxRootPages === undefined\n ? {}\n : { maxRootPages: this.options.maxRootPages }),\n ...(this.options.maxLeaves === undefined\n ? {}\n : { maxLeaves: this.options.maxLeaves }),\n },\n options.reprove === true\n );\n return validateProvenanceProof(proof, client.trust);\n }\n\n async submit(proof: ProvenanceProof): Promise<PublicResult> {\n const copy = structuredClone(proof);\n const client = await this.client(copy.context);\n const packet = await validateProvenanceProof(copy, client.trust);\n return client.submitSourceProof(packet.data, packet.sidecars);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,cAAc;AACd,cAAc;AACd,cAAc;;;ACFd,SAAS,iCAAwD;AAkB1D,IAAM,aAAN,MAAiB;AAAA,EAEpB,YAA6B,UAA6B,CAAC,GAAG;AAAjC;AAAA,EAAkC;AAAA,EADtD,YAAY,IAAI,0BAA0B;AAAA,EAGnD,MAAc,OAAO,OAAyC;AAC1D,UAAM,SAAS,KAAK,QAAQ,UAAW,MAAM,KAAK,UAAU,IAAI,KAAK;AACrE,QACI,OAAO,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,KACrD,OAAO,OAAO,MAAM,eAAe,MAAM,OAAO,MAAM,eAAe;AAErE,YAAM,MAAM,uCAAuC;AACvD,WAAO;AAAA,EACX;AAAA,EAEA,MAAM,MACF,OACA,UAAiC,CAAC,GACV;AACxB,UAAM,SAAS,QAAQ,UAAU,SAAY,MAAM,wBAAwB,KAAK;AAChF,QAAI;AACA,aAAO,wBAAwB,SAAS,MAAM,KAAK,OAAO,OAAO,OAAO,GAAG,KAAK;AACpF,UAAM,SAAS,KAAK,QAAQ;AAC5B,QAAI,CAAC,OAAQ,OAAM,MAAM,oDAAoD;AAC7E,UAAM,QAAQ,MAAM,2BAA2B,KAAK;AACpD,UAAM,aAAa,MAAM,OAAO,wBAAwB;AACxD,UAAM,SAAS,MAAM,KAAK,OAAO,KAAK;AACtC,UAAM,QAAQ,MAAM;AAAA,MAChB;AAAA,MACA;AAAA,QACI,GAAG;AAAA,QACH;AAAA,QACA,GAAI,KAAK,QAAQ,iBAAiB,SAC5B,CAAC,IACD,EAAE,cAAc,KAAK,QAAQ,aAAa;AAAA,QAChD,GAAI,KAAK,QAAQ,cAAc,SACzB,CAAC,IACD,EAAE,WAAW,KAAK,QAAQ,UAAU;AAAA,MAC9C;AAAA,MACA,QAAQ,YAAY;AAAA,IACxB;AACA,WAAO,wBAAwB,OAAO,OAAO,KAAK;AAAA,EACtD;AAAA,EAEA,MAAM,OAAO,OAA+C;AACxD,UAAM,OAAO,gBAAgB,KAAK;AAClC,UAAM,SAAS,MAAM,KAAK,OAAO,KAAK,OAAO;AAC7C,UAAM,SAAS,MAAM,wBAAwB,MAAM,OAAO,KAAK;AAC/D,WAAO,OAAO,kBAAkB,OAAO,MAAM,OAAO,QAAQ;AAAA,EAChE;AACJ;","names":[]}
@@ -1,27 +1,31 @@
1
- import { m as GasBenchmarkProfile, a5 as PreparedOutput, q as NoteOutputContext, s as NoteOutputRecipient, Q as OperationStatus, M as TransactionRuntime, a1 as PreparationIntent, J as OperationPlan, t as SignedBroadcasterQuote, B as BroadcasterClient, W as WithBroadcasterOptions, p as GasReference, v as TransactionProveOptions, O as OperationAggregateMember, C as CancelCreditPreparation, h as CreateCreditPreparation, D as DrawCreditPreparation, S as ShieldPreparation, T as TopUpCreditPreparation, w as TransferPreparation, U as TransactionInfrastructure } from './broadcaster-preparation-DMxxZ_1Q.js';
2
- import { TransactionCall, Protocol, RegistrationPreparation, RegistrationOperation, CanonicalReceipt } from '@invisi-labs/protocol';
3
- import * as _invisi_labs_core from '@invisi-labs/core';
4
- import { CreditDeliveryState, PublicWallet, Note, ViewingCapability } from '@invisi-labs/core';
5
- import { Prover, ProofBundle } from '@invisi-labs/prover';
1
+ import { RegistrationPreparation, RegistrationOperation } from '@invisi-labs/rpc';
2
+ import * as _invisi_labs_primitives from '@invisi-labs/primitives';
3
+ import { WalletResponse, CreditDeliveryState, Note, authenticatedDecryptor } from '@invisi-labs/primitives';
4
+ import * as _invisi_labs_protocol from '@invisi-labs/protocol';
5
+ import { TransactionCall, CanonicalReceipt } from '@invisi-labs/protocol';
6
+ import { O as OperationStatus, T as TransactionRuntime, d as PreparationIntent, e as OperationPlan, f as TransactionProveOptions, g as OperationAggregateMember, h as TransactionInfrastructure } from './operation-bridge-CoECSxfi.js';
6
7
  import { Hex, Address } from '@invisi-labs/protocol/contracts';
8
+ import { TransactionOutput } from './note.js';
9
+ import { Prover, ProofBundle } from '@invisi-labs/prover';
10
+ import { T as TransactionIdentity, E as ExplicitTransferPreparation, a as ExplicitShieldPreparation, b as ExplicitCreateCreditPreparation, c as ExplicitDrawCreditPreparation, d as ExplicitUpdateCreditPreparation, e as ExplicitRevokeCreditPreparation } from './index-Crp-ZFiM.js';
7
11
 
8
- /** Copy trusted benchmark records; validation checks format, not their publisher's honesty. */
9
- declare function copyGasBenchmarks(profiles: readonly GasBenchmarkProfile[]): GasBenchmarkProfile[];
10
- /** Parse a trusted, JSON-compatible benchmark catalog. No network access or publisher authentication. */
11
- declare function defineGasBenchmarks(input: unknown): GasBenchmarkProfile[];
12
-
13
- /** Detached final output snapshot, including any generated change. Contains private Note data. */
14
- declare class TransactionOutput {
15
- #private;
16
- constructor(output: PreparedOutput);
17
- get context(): NoteOutputContext;
18
- get recipient(): NoteOutputRecipient;
19
- get amount(): bigint;
20
- get commitment(): `0x${string}`;
21
- get identity(): `0x${string}`;
22
- get nonce(): bigint | undefined;
23
- get change(): boolean;
24
- exportPaymentNote(): string;
12
+ interface BroadcasterQuote {
13
+ token: string;
14
+ feeRecipient: string;
15
+ feeAmount: string;
16
+ deadline: string;
17
+ maxGas: string;
18
+ requestHash: string;
19
+ }
20
+ interface SignedBroadcasterQuote {
21
+ quote: BroadcasterQuote;
22
+ signature: string;
23
+ provenanceRequired?: boolean;
24
+ requestHashFormat?: string;
25
+ context?: {
26
+ chainId: bigint;
27
+ protocol: string;
28
+ };
25
29
  }
26
30
 
27
31
  type Runtime = TransactionRuntime & {
@@ -34,22 +38,27 @@ declare class PreparedTransaction {
34
38
  private constructor();
35
39
  static prepare(runtime: Runtime, plan: OperationPlan): PreparedTransaction;
36
40
  broadcasterQuote(): SignedBroadcasterQuote | undefined;
37
- withBroadcaster(client: BroadcasterClient, options: WithBroadcasterOptions): Promise<PreparedTransaction>;
38
41
  get id(): string;
39
- get kind(): "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
40
- estimateGas(): GasReference;
42
+ get kind(): "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
43
+ estimateGas(options?: {
44
+ from?: `0x${string}`;
45
+ }): Promise<{
46
+ source: "rpc";
47
+ gasUnits: bigint;
48
+ }>;
49
+ getGasReference(): _invisi_labs_protocol.DocumentedGasReference;
41
50
  /** Final Note outputs, including change; Credit outputs are not exported as IPN. */
42
51
  getOutputs(): readonly TransactionOutput[];
43
52
  preview(): {
44
53
  id: string;
45
- kind: "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
54
+ kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
46
55
  status: OperationStatus;
47
56
  context: {
48
- tokenAddress: _invisi_labs_core.Address;
57
+ tokenAddress: _invisi_labs_primitives.Address;
49
58
  now?: bigint;
50
59
  timestamp?: bigint;
51
60
  chainId: bigint;
52
- protocolAddress: _invisi_labs_core.Address;
61
+ protocolAddress: _invisi_labs_primitives.Address;
53
62
  };
54
63
  inputs: number;
55
64
  inputDetails: ({
@@ -62,10 +71,13 @@ declare class PreparedTransaction {
62
71
  } | {
63
72
  kind: "credits";
64
73
  commitment: `0x${string}`;
65
- amount: bigint;
74
+ revocationShard: bigint;
75
+ revocationSlot: bigint;
66
76
  owner: `0x${string}`;
67
77
  spender: `0x${string}`;
68
78
  expiry: bigint;
79
+ availableCredit: bigint;
80
+ unlimited: boolean;
69
81
  role: "owner" | "spender";
70
82
  treeId: bigint;
71
83
  leafIndex: number;
@@ -81,14 +93,34 @@ declare class PreparedTransaction {
81
93
  };
82
94
  };
83
95
  creditOutputs: {
96
+ lastDay: bigint;
97
+ dailySpent: bigint;
98
+ lastMonth: bigint;
99
+ monthlySpent: bigint;
100
+ totalSpent: bigint;
101
+ availableCredit: bigint;
102
+ unlimited: boolean;
103
+ singleLimit: bigint;
104
+ dailyLimit: bigint;
105
+ monthlyLimit: bigint;
84
106
  commitment: `0x${string}`;
85
- amount: bigint;
107
+ revocationShard: bigint;
108
+ revocationSlot: bigint;
86
109
  expiry: bigint;
87
110
  owner: `0x${string}`;
88
111
  spender: `0x${string}`;
89
- ownerPayout: bigint;
90
- spenderPayout: bigint;
91
112
  }[] | undefined;
113
+ creditUpdate: _invisi_labs_primitives.CreditUpdateChanges | undefined;
114
+ creditDraw: {
115
+ grossAmount: bigint;
116
+ feeAmount: bigint;
117
+ netAmount: bigint;
118
+ payers: {
119
+ payer: _invisi_labs_primitives.Address;
120
+ amount: bigint;
121
+ }[];
122
+ } | undefined;
123
+ creditFeePayer: `0x${string}` | undefined;
92
124
  outputs: {
93
125
  commitment: `0x${string}`;
94
126
  to: string;
@@ -112,14 +144,24 @@ declare class PreparedTransaction {
112
144
  /** Obtain a firm quote before signing. This intent contains no private inputs or witness. */
113
145
  exportBroadcasterIntent(): Promise<{
114
146
  sendable: false;
115
- data: _invisi_labs_core.Hex;
147
+ data: Hex;
116
148
  }>;
117
149
  private current;
118
150
  private stage;
151
+ exportRevocationAuthorization(): Promise<_invisi_labs_primitives.SigningRequest>;
152
+ withRevocationSignature(signature: Hex): Promise<PreparedTransaction>;
153
+ /** Export the same portable request used by managed native wallet transports. */
154
+ exportWalletRequest(id: string, options?: {
155
+ signal?: AbortSignal;
156
+ }): Promise<_invisi_labs_primitives.WalletRequest<"wallet.authorize">>;
157
+ /** Independently validate host authorization against the retained request and frozen plan. */
158
+ withWalletResponse(response: WalletResponse, options?: {
159
+ signal?: AbortSignal;
160
+ }): Promise<PreparedTransaction>;
119
161
  /** Public EIP-712 request; signing transport and key custody belong to the caller. */
120
162
  exportWalletAuthorization(options?: {
121
163
  signal?: AbortSignal;
122
- }): Promise<_invisi_labs_core.SigningRequest>;
164
+ }): Promise<_invisi_labs_primitives.SigningRequest>;
123
165
  /** Attach an external EOA signature, retaining its witness only at the private proving boundary. */
124
166
  withWalletSignature(signature: string, options?: {
125
167
  signal?: AbortSignal;
@@ -127,7 +169,7 @@ declare class PreparedTransaction {
127
169
  /** Export only after proving when the funding authorization binds an actual proof hash. */
128
170
  exportFundingAuthorization(options?: {
129
171
  signal?: AbortSignal;
130
- }): Promise<_invisi_labs_core.SigningRequest>;
172
+ }): Promise<_invisi_labs_primitives.SigningRequest>;
131
173
  /** Verify an external signature against this handle's own frozen operation. */
132
174
  withFundingSignature(signature: string, options?: {
133
175
  signal?: AbortSignal;
@@ -143,49 +185,11 @@ declare class PreparedTransaction {
143
185
  toJSON(): {
144
186
  transaction: boolean;
145
187
  id: string;
146
- kind: "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
188
+ kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
147
189
  status: OperationStatus;
148
190
  };
149
191
  }
150
192
 
151
- interface NoteInput {
152
- note: Note;
153
- commitment: Hex;
154
- treeId: bigint;
155
- leafIndex: number;
156
- }
157
- interface CreditInput {
158
- state: CreditDeliveryState;
159
- commitment: Hex;
160
- treeId: bigint;
161
- leafIndex: number;
162
- role: "owner" | "spender";
163
- }
164
- interface TransactionIdentity {
165
- wallet: PublicWallet & {
166
- getViewer?: never;
167
- getDetector?: never;
168
- exportAuthorization?: never;
169
- };
170
- protocol: Protocol;
171
- }
172
- interface ExplicitFunds {
173
- inputs: readonly NoteInput[];
174
- changeAddress?: string;
175
- }
176
- type ExplicitTransferPreparation = TransactionIdentity & TransferPreparation & ExplicitFunds;
177
- type ExplicitShieldPreparation = TransactionIdentity & ShieldPreparation;
178
- type ExplicitCreateCreditPreparation = TransactionIdentity & CreateCreditPreparation & ExplicitFunds;
179
- type ExplicitDrawCreditPreparation = TransactionIdentity & DrawCreditPreparation & {
180
- creditInputs: readonly CreditInput[];
181
- };
182
- type ExplicitTopUpCreditPreparation = TransactionIdentity & TopUpCreditPreparation & ExplicitFunds & {
183
- creditInputs: readonly CreditInput[];
184
- };
185
- type ExplicitCancelCreditPreparation = TransactionIdentity & CancelCreditPreparation & {
186
- creditInputs: readonly CreditInput[];
187
- };
188
-
189
193
  /** Compose independent Chain RPC and indexed Protocol RPC with local wallet capabilities. */
190
194
  type InvisiOptions = Omit<TransactionInfrastructure, "wallet" | "protocol" | "coinSelector">;
191
195
  /** Public wallet and registry-specific inputs; signing remains external. */
@@ -205,8 +209,8 @@ declare class Invisi {
205
209
  prepareShield(options: ExplicitShieldPreparation): Promise<PreparedTransaction>;
206
210
  prepareCreateCredit(options: ExplicitCreateCreditPreparation): Promise<PreparedTransaction>;
207
211
  prepareDrawCredit(options: ExplicitDrawCreditPreparation): Promise<PreparedTransaction>;
208
- prepareTopUpCredit(options: ExplicitTopUpCreditPreparation): Promise<PreparedTransaction>;
209
- prepareCancelCredit(options: ExplicitCancelCreditPreparation): Promise<PreparedTransaction>;
212
+ prepareUpdateCredit(options: ExplicitUpdateCreditPreparation): Promise<PreparedTransaction>;
213
+ prepareRevokeCredit(options: ExplicitRevokeCreditPreparation): Promise<PreparedTransaction>;
210
214
  toJSON(): {
211
215
  invisi: boolean;
212
216
  };
@@ -305,7 +309,7 @@ interface DiscoveredCredit extends Omit<DeliveryCandidate, "delivery"> {
305
309
  /** Authenticate private deliveries from a single batch of canonical receipts. */
306
310
  declare function decryptCandidates(logs: readonly DeliveryEventLog[], options: {
307
311
  context: DiscoveryContext;
308
- viewing: Pick<ViewingCapability, "ownerAddress" | "decryptNote" | "decryptCredit">;
312
+ viewing: ReturnType<typeof authenticatedDecryptor>;
309
313
  confirmedThrough: bigint;
310
314
  }): Promise<{
311
315
  notes: DiscoveredNote[];
@@ -315,4 +319,4 @@ declare function decryptCandidates(logs: readonly DeliveryEventLog[], options: {
315
319
  /** Decode independently fetched canonical receipt bytes, never normalized service events. */
316
320
  declare function readProtocolLogs(receipt: CanonicalReceipt, protocolAddress: Address): DeliveryEventLog[];
317
321
 
318
- export { type CreditInput as C, type DeliveryEventLog as D, type ExplicitCancelCreditPreparation as E, Invisi as I, type NoteInput as N, PreparedTransaction as P, type RegistrationPreparationOptions as R, type TransactionIdentity as T, type DiscoveredCredit as a, type DiscoveredNote as b, type ExplicitCreateCreditPreparation as c, type ExplicitDrawCreditPreparation as d, type ExplicitShieldPreparation as e, type ExplicitTopUpCreditPreparation as f, type ExplicitTransferPreparation as g, InvisiError as h, type InvisiErrorCode as i, type InvisiErrorDetails as j, type InvisiOptions as k, TransactionOutput as l, decryptCandidates as m, defineGasBenchmarks as n, type DeliveryCandidate as o, type DiscoveryContext as p, copyGasBenchmarks as q, readProtocolLogs as r, extractDeliveryCandidates as s, prepareWithErrors as t };
322
+ export { type DeliveryEventLog as D, Invisi as I, PreparedTransaction as P, type RegistrationPreparationOptions as R, type DiscoveredCredit as a, type DiscoveredNote as b, InvisiError as c, type InvisiErrorCode as d, type InvisiErrorDetails as e, type InvisiOptions as f, decryptCandidates as g, type DeliveryCandidate as h, type DiscoveryContext as i, extractDeliveryCandidates as j, prepareWithErrors as p, readProtocolLogs as r };
@@ -1,27 +1,31 @@
1
- import { m as GasBenchmarkProfile, a5 as PreparedOutput, q as NoteOutputContext, s as NoteOutputRecipient, Q as OperationStatus, M as TransactionRuntime, a1 as PreparationIntent, J as OperationPlan, t as SignedBroadcasterQuote, B as BroadcasterClient, W as WithBroadcasterOptions, p as GasReference, v as TransactionProveOptions, O as OperationAggregateMember, C as CancelCreditPreparation, h as CreateCreditPreparation, D as DrawCreditPreparation, S as ShieldPreparation, T as TopUpCreditPreparation, w as TransferPreparation, U as TransactionInfrastructure } from './broadcaster-preparation-DMxxZ_1Q.cjs';
2
- import { TransactionCall, Protocol, RegistrationPreparation, RegistrationOperation, CanonicalReceipt } from '@invisi-labs/protocol';
3
- import * as _invisi_labs_core from '@invisi-labs/core';
4
- import { CreditDeliveryState, PublicWallet, Note, ViewingCapability } from '@invisi-labs/core';
5
- import { Prover, ProofBundle } from '@invisi-labs/prover';
1
+ import { RegistrationPreparation, RegistrationOperation } from '@invisi-labs/rpc';
2
+ import * as _invisi_labs_primitives from '@invisi-labs/primitives';
3
+ import { WalletResponse, CreditDeliveryState, Note, authenticatedDecryptor } from '@invisi-labs/primitives';
4
+ import * as _invisi_labs_protocol from '@invisi-labs/protocol';
5
+ import { TransactionCall, CanonicalReceipt } from '@invisi-labs/protocol';
6
+ import { O as OperationStatus, T as TransactionRuntime, d as PreparationIntent, e as OperationPlan, f as TransactionProveOptions, g as OperationAggregateMember, h as TransactionInfrastructure } from './operation-bridge-CoECSxfi.cjs';
6
7
  import { Hex, Address } from '@invisi-labs/protocol/contracts';
8
+ import { TransactionOutput } from './note.cjs';
9
+ import { Prover, ProofBundle } from '@invisi-labs/prover';
10
+ import { T as TransactionIdentity, E as ExplicitTransferPreparation, a as ExplicitShieldPreparation, b as ExplicitCreateCreditPreparation, c as ExplicitDrawCreditPreparation, d as ExplicitUpdateCreditPreparation, e as ExplicitRevokeCreditPreparation } from './index-CLhGwLxZ.cjs';
7
11
 
8
- /** Copy trusted benchmark records; validation checks format, not their publisher's honesty. */
9
- declare function copyGasBenchmarks(profiles: readonly GasBenchmarkProfile[]): GasBenchmarkProfile[];
10
- /** Parse a trusted, JSON-compatible benchmark catalog. No network access or publisher authentication. */
11
- declare function defineGasBenchmarks(input: unknown): GasBenchmarkProfile[];
12
-
13
- /** Detached final output snapshot, including any generated change. Contains private Note data. */
14
- declare class TransactionOutput {
15
- #private;
16
- constructor(output: PreparedOutput);
17
- get context(): NoteOutputContext;
18
- get recipient(): NoteOutputRecipient;
19
- get amount(): bigint;
20
- get commitment(): `0x${string}`;
21
- get identity(): `0x${string}`;
22
- get nonce(): bigint | undefined;
23
- get change(): boolean;
24
- exportPaymentNote(): string;
12
+ interface BroadcasterQuote {
13
+ token: string;
14
+ feeRecipient: string;
15
+ feeAmount: string;
16
+ deadline: string;
17
+ maxGas: string;
18
+ requestHash: string;
19
+ }
20
+ interface SignedBroadcasterQuote {
21
+ quote: BroadcasterQuote;
22
+ signature: string;
23
+ provenanceRequired?: boolean;
24
+ requestHashFormat?: string;
25
+ context?: {
26
+ chainId: bigint;
27
+ protocol: string;
28
+ };
25
29
  }
26
30
 
27
31
  type Runtime = TransactionRuntime & {
@@ -34,22 +38,27 @@ declare class PreparedTransaction {
34
38
  private constructor();
35
39
  static prepare(runtime: Runtime, plan: OperationPlan): PreparedTransaction;
36
40
  broadcasterQuote(): SignedBroadcasterQuote | undefined;
37
- withBroadcaster(client: BroadcasterClient, options: WithBroadcasterOptions): Promise<PreparedTransaction>;
38
41
  get id(): string;
39
- get kind(): "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
40
- estimateGas(): GasReference;
42
+ get kind(): "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
43
+ estimateGas(options?: {
44
+ from?: `0x${string}`;
45
+ }): Promise<{
46
+ source: "rpc";
47
+ gasUnits: bigint;
48
+ }>;
49
+ getGasReference(): _invisi_labs_protocol.DocumentedGasReference;
41
50
  /** Final Note outputs, including change; Credit outputs are not exported as IPN. */
42
51
  getOutputs(): readonly TransactionOutput[];
43
52
  preview(): {
44
53
  id: string;
45
- kind: "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
54
+ kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
46
55
  status: OperationStatus;
47
56
  context: {
48
- tokenAddress: _invisi_labs_core.Address;
57
+ tokenAddress: _invisi_labs_primitives.Address;
49
58
  now?: bigint;
50
59
  timestamp?: bigint;
51
60
  chainId: bigint;
52
- protocolAddress: _invisi_labs_core.Address;
61
+ protocolAddress: _invisi_labs_primitives.Address;
53
62
  };
54
63
  inputs: number;
55
64
  inputDetails: ({
@@ -62,10 +71,13 @@ declare class PreparedTransaction {
62
71
  } | {
63
72
  kind: "credits";
64
73
  commitment: `0x${string}`;
65
- amount: bigint;
74
+ revocationShard: bigint;
75
+ revocationSlot: bigint;
66
76
  owner: `0x${string}`;
67
77
  spender: `0x${string}`;
68
78
  expiry: bigint;
79
+ availableCredit: bigint;
80
+ unlimited: boolean;
69
81
  role: "owner" | "spender";
70
82
  treeId: bigint;
71
83
  leafIndex: number;
@@ -81,14 +93,34 @@ declare class PreparedTransaction {
81
93
  };
82
94
  };
83
95
  creditOutputs: {
96
+ lastDay: bigint;
97
+ dailySpent: bigint;
98
+ lastMonth: bigint;
99
+ monthlySpent: bigint;
100
+ totalSpent: bigint;
101
+ availableCredit: bigint;
102
+ unlimited: boolean;
103
+ singleLimit: bigint;
104
+ dailyLimit: bigint;
105
+ monthlyLimit: bigint;
84
106
  commitment: `0x${string}`;
85
- amount: bigint;
107
+ revocationShard: bigint;
108
+ revocationSlot: bigint;
86
109
  expiry: bigint;
87
110
  owner: `0x${string}`;
88
111
  spender: `0x${string}`;
89
- ownerPayout: bigint;
90
- spenderPayout: bigint;
91
112
  }[] | undefined;
113
+ creditUpdate: _invisi_labs_primitives.CreditUpdateChanges | undefined;
114
+ creditDraw: {
115
+ grossAmount: bigint;
116
+ feeAmount: bigint;
117
+ netAmount: bigint;
118
+ payers: {
119
+ payer: _invisi_labs_primitives.Address;
120
+ amount: bigint;
121
+ }[];
122
+ } | undefined;
123
+ creditFeePayer: `0x${string}` | undefined;
92
124
  outputs: {
93
125
  commitment: `0x${string}`;
94
126
  to: string;
@@ -112,14 +144,24 @@ declare class PreparedTransaction {
112
144
  /** Obtain a firm quote before signing. This intent contains no private inputs or witness. */
113
145
  exportBroadcasterIntent(): Promise<{
114
146
  sendable: false;
115
- data: _invisi_labs_core.Hex;
147
+ data: Hex;
116
148
  }>;
117
149
  private current;
118
150
  private stage;
151
+ exportRevocationAuthorization(): Promise<_invisi_labs_primitives.SigningRequest>;
152
+ withRevocationSignature(signature: Hex): Promise<PreparedTransaction>;
153
+ /** Export the same portable request used by managed native wallet transports. */
154
+ exportWalletRequest(id: string, options?: {
155
+ signal?: AbortSignal;
156
+ }): Promise<_invisi_labs_primitives.WalletRequest<"wallet.authorize">>;
157
+ /** Independently validate host authorization against the retained request and frozen plan. */
158
+ withWalletResponse(response: WalletResponse, options?: {
159
+ signal?: AbortSignal;
160
+ }): Promise<PreparedTransaction>;
119
161
  /** Public EIP-712 request; signing transport and key custody belong to the caller. */
120
162
  exportWalletAuthorization(options?: {
121
163
  signal?: AbortSignal;
122
- }): Promise<_invisi_labs_core.SigningRequest>;
164
+ }): Promise<_invisi_labs_primitives.SigningRequest>;
123
165
  /** Attach an external EOA signature, retaining its witness only at the private proving boundary. */
124
166
  withWalletSignature(signature: string, options?: {
125
167
  signal?: AbortSignal;
@@ -127,7 +169,7 @@ declare class PreparedTransaction {
127
169
  /** Export only after proving when the funding authorization binds an actual proof hash. */
128
170
  exportFundingAuthorization(options?: {
129
171
  signal?: AbortSignal;
130
- }): Promise<_invisi_labs_core.SigningRequest>;
172
+ }): Promise<_invisi_labs_primitives.SigningRequest>;
131
173
  /** Verify an external signature against this handle's own frozen operation. */
132
174
  withFundingSignature(signature: string, options?: {
133
175
  signal?: AbortSignal;
@@ -143,49 +185,11 @@ declare class PreparedTransaction {
143
185
  toJSON(): {
144
186
  transaction: boolean;
145
187
  id: string;
146
- kind: "shield" | "transfer" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
188
+ kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
147
189
  status: OperationStatus;
148
190
  };
149
191
  }
150
192
 
151
- interface NoteInput {
152
- note: Note;
153
- commitment: Hex;
154
- treeId: bigint;
155
- leafIndex: number;
156
- }
157
- interface CreditInput {
158
- state: CreditDeliveryState;
159
- commitment: Hex;
160
- treeId: bigint;
161
- leafIndex: number;
162
- role: "owner" | "spender";
163
- }
164
- interface TransactionIdentity {
165
- wallet: PublicWallet & {
166
- getViewer?: never;
167
- getDetector?: never;
168
- exportAuthorization?: never;
169
- };
170
- protocol: Protocol;
171
- }
172
- interface ExplicitFunds {
173
- inputs: readonly NoteInput[];
174
- changeAddress?: string;
175
- }
176
- type ExplicitTransferPreparation = TransactionIdentity & TransferPreparation & ExplicitFunds;
177
- type ExplicitShieldPreparation = TransactionIdentity & ShieldPreparation;
178
- type ExplicitCreateCreditPreparation = TransactionIdentity & CreateCreditPreparation & ExplicitFunds;
179
- type ExplicitDrawCreditPreparation = TransactionIdentity & DrawCreditPreparation & {
180
- creditInputs: readonly CreditInput[];
181
- };
182
- type ExplicitTopUpCreditPreparation = TransactionIdentity & TopUpCreditPreparation & ExplicitFunds & {
183
- creditInputs: readonly CreditInput[];
184
- };
185
- type ExplicitCancelCreditPreparation = TransactionIdentity & CancelCreditPreparation & {
186
- creditInputs: readonly CreditInput[];
187
- };
188
-
189
193
  /** Compose independent Chain RPC and indexed Protocol RPC with local wallet capabilities. */
190
194
  type InvisiOptions = Omit<TransactionInfrastructure, "wallet" | "protocol" | "coinSelector">;
191
195
  /** Public wallet and registry-specific inputs; signing remains external. */
@@ -205,8 +209,8 @@ declare class Invisi {
205
209
  prepareShield(options: ExplicitShieldPreparation): Promise<PreparedTransaction>;
206
210
  prepareCreateCredit(options: ExplicitCreateCreditPreparation): Promise<PreparedTransaction>;
207
211
  prepareDrawCredit(options: ExplicitDrawCreditPreparation): Promise<PreparedTransaction>;
208
- prepareTopUpCredit(options: ExplicitTopUpCreditPreparation): Promise<PreparedTransaction>;
209
- prepareCancelCredit(options: ExplicitCancelCreditPreparation): Promise<PreparedTransaction>;
212
+ prepareUpdateCredit(options: ExplicitUpdateCreditPreparation): Promise<PreparedTransaction>;
213
+ prepareRevokeCredit(options: ExplicitRevokeCreditPreparation): Promise<PreparedTransaction>;
210
214
  toJSON(): {
211
215
  invisi: boolean;
212
216
  };
@@ -305,7 +309,7 @@ interface DiscoveredCredit extends Omit<DeliveryCandidate, "delivery"> {
305
309
  /** Authenticate private deliveries from a single batch of canonical receipts. */
306
310
  declare function decryptCandidates(logs: readonly DeliveryEventLog[], options: {
307
311
  context: DiscoveryContext;
308
- viewing: Pick<ViewingCapability, "ownerAddress" | "decryptNote" | "decryptCredit">;
312
+ viewing: ReturnType<typeof authenticatedDecryptor>;
309
313
  confirmedThrough: bigint;
310
314
  }): Promise<{
311
315
  notes: DiscoveredNote[];
@@ -315,4 +319,4 @@ declare function decryptCandidates(logs: readonly DeliveryEventLog[], options: {
315
319
  /** Decode independently fetched canonical receipt bytes, never normalized service events. */
316
320
  declare function readProtocolLogs(receipt: CanonicalReceipt, protocolAddress: Address): DeliveryEventLog[];
317
321
 
318
- export { type CreditInput as C, type DeliveryEventLog as D, type ExplicitCancelCreditPreparation as E, Invisi as I, type NoteInput as N, PreparedTransaction as P, type RegistrationPreparationOptions as R, type TransactionIdentity as T, type DiscoveredCredit as a, type DiscoveredNote as b, type ExplicitCreateCreditPreparation as c, type ExplicitDrawCreditPreparation as d, type ExplicitShieldPreparation as e, type ExplicitTopUpCreditPreparation as f, type ExplicitTransferPreparation as g, InvisiError as h, type InvisiErrorCode as i, type InvisiErrorDetails as j, type InvisiOptions as k, TransactionOutput as l, decryptCandidates as m, defineGasBenchmarks as n, type DeliveryCandidate as o, type DiscoveryContext as p, copyGasBenchmarks as q, readProtocolLogs as r, extractDeliveryCandidates as s, prepareWithErrors as t };
322
+ export { type DeliveryEventLog as D, Invisi as I, PreparedTransaction as P, type RegistrationPreparationOptions as R, type DiscoveredCredit as a, type DiscoveredNote as b, InvisiError as c, type InvisiErrorCode as d, type InvisiErrorDetails as e, type InvisiOptions as f, decryptCandidates as g, type DeliveryCandidate as h, type DiscoveryContext as i, extractDeliveryCandidates as j, prepareWithErrors as p, readProtocolLogs as r };