@invisi-labs/sdk 1.1.7 → 1.2.1
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 +5 -0
- package/dist/broadcaster-3KTB4JO2.cjs +21 -0
- package/dist/broadcaster-3KTB4JO2.cjs.map +1 -0
- package/dist/broadcaster-7ZKKSTZQ.js +21 -0
- package/dist/broadcaster-preparation-PJ263WBL.cjs +15 -0
- package/dist/broadcaster-preparation-PJ263WBL.cjs.map +1 -0
- package/dist/broadcaster-preparation-ZQAPZAUG.js +15 -0
- package/dist/broadcaster-preparation-ZQAPZAUG.js.map +1 -0
- package/dist/{chunk-LOU7AP2B.cjs → chunk-2URICDPW.cjs} +72 -33
- package/dist/chunk-2URICDPW.cjs.map +1 -0
- package/dist/chunk-3D24ABYR.js +86 -0
- package/dist/chunk-3D24ABYR.js.map +1 -0
- package/dist/chunk-3KTQQZOW.cjs +71 -0
- package/dist/chunk-3KTQQZOW.cjs.map +1 -0
- package/dist/chunk-4SDP53YQ.cjs +765 -0
- package/dist/chunk-4SDP53YQ.cjs.map +1 -0
- package/dist/{chunk-XHKQ2BO2.js → chunk-4VI6LYGH.js} +25 -2
- package/dist/chunk-4VI6LYGH.js.map +1 -0
- package/dist/chunk-BBSRP4MH.cjs +287 -0
- package/dist/chunk-BBSRP4MH.cjs.map +1 -0
- package/dist/chunk-DGMVGFKM.js +41 -0
- package/dist/chunk-DGMVGFKM.js.map +1 -0
- package/dist/chunk-DHQEB6JR.cjs +1616 -0
- package/dist/chunk-DHQEB6JR.cjs.map +1 -0
- package/dist/chunk-FKF67XE6.js +1616 -0
- package/dist/chunk-FKF67XE6.js.map +1 -0
- package/dist/chunk-GUD3LAUO.js +765 -0
- package/dist/chunk-GUD3LAUO.js.map +1 -0
- package/dist/chunk-HCB7RQ3S.cjs +79 -0
- package/dist/chunk-HCB7RQ3S.cjs.map +1 -0
- package/dist/{chunk-GTPUYPQL.js → chunk-HKGJXQVN.js} +69 -30
- package/dist/chunk-HKGJXQVN.js.map +1 -0
- package/dist/chunk-HLH5JZD4.js +287 -0
- package/dist/chunk-HLH5JZD4.js.map +1 -0
- package/dist/chunk-J6TZZVAM.cjs +230 -0
- package/dist/chunk-J6TZZVAM.cjs.map +1 -0
- package/dist/{chunk-7F7ZZW3L.cjs → chunk-LOR6PYH5.cjs} +25 -2
- package/dist/chunk-LOR6PYH5.cjs.map +1 -0
- package/dist/chunk-MA2QZEF5.cjs +399 -0
- package/dist/chunk-MA2QZEF5.cjs.map +1 -0
- package/dist/chunk-MI4IP4ZD.cjs +86 -0
- package/dist/chunk-MI4IP4ZD.cjs.map +1 -0
- package/dist/chunk-OCZLJKIA.cjs +41 -0
- package/dist/chunk-OCZLJKIA.cjs.map +1 -0
- package/dist/chunk-R5YAOJKB.js +71 -0
- package/dist/chunk-R5YAOJKB.js.map +1 -0
- package/dist/chunk-RY4M2CIQ.js +399 -0
- package/dist/chunk-RY4M2CIQ.js.map +1 -0
- package/dist/chunk-THMD5QO2.js +79 -0
- package/dist/chunk-THMD5QO2.js.map +1 -0
- package/dist/chunk-ZD2652WH.js +230 -0
- package/dist/chunk-ZD2652WH.js.map +1 -0
- package/dist/credit.cjs +1 -0
- package/dist/credit.cjs.map +1 -0
- package/dist/credit.d.cts +12 -0
- package/dist/credit.d.ts +12 -0
- package/dist/credit.js +1 -0
- package/dist/credit.js.map +1 -0
- package/dist/ethers.cjs +2 -2
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.d.cts +15 -4
- package/dist/ethers.d.ts +15 -4
- package/dist/ethers.js +1 -1
- package/dist/index-CLhGwLxZ.d.cts +42 -0
- package/dist/index-Crp-ZFiM.d.ts +42 -0
- package/dist/index.cjs +69 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -14
- package/dist/index.d.ts +21 -14
- package/dist/index.js +64 -33
- package/dist/index.js.map +1 -1
- package/dist/note.cjs +11 -0
- package/dist/note.cjs.map +1 -0
- package/dist/note.d.cts +29 -0
- package/dist/note.d.ts +29 -0
- package/dist/note.js +11 -0
- package/dist/note.js.map +1 -0
- package/dist/{broadcaster-preparation-DMxxZ_1Q.d.cts → operation-bridge-CoECSxfi.d.cts} +130 -245
- package/dist/{broadcaster-preparation-DMxxZ_1Q.d.ts → operation-bridge-CoECSxfi.d.ts} +130 -245
- package/dist/preparation-HUBTVCZE.js +404 -0
- package/dist/preparation-HUBTVCZE.js.map +1 -0
- package/dist/preparation-QD3ZSYV5.cjs +404 -0
- package/dist/preparation-QD3ZSYV5.cjs.map +1 -0
- package/dist/provenance-preparation-43DN2WK7.cjs +16 -0
- package/dist/provenance-preparation-43DN2WK7.cjs.map +1 -0
- package/dist/provenance-preparation-HEZE4L5H.js +16 -0
- package/dist/provenance-preparation-HEZE4L5H.js.map +1 -0
- package/dist/provenance.cjs +59 -0
- package/dist/provenance.cjs.map +1 -0
- package/dist/provenance.d.cts +34 -0
- package/dist/provenance.d.ts +34 -0
- package/dist/provenance.js +59 -0
- package/dist/provenance.js.map +1 -0
- package/dist/{receipt-logs-m0-bhaxW.d.ts → receipt-logs-DQRJK0l8.d.cts} +84 -78
- package/dist/{receipt-logs-CvC951p7.d.cts → receipt-logs-fMR6Bwql.d.ts} +84 -78
- package/dist/session-support.cjs +28 -7
- package/dist/session-support.cjs.map +1 -1
- package/dist/session-support.d.cts +71 -39
- package/dist/session-support.d.ts +71 -39
- package/dist/session-support.js +58 -37
- package/dist/session-support.js.map +1 -1
- package/package.json +22 -6
- package/dist/broadcaster-preparation-RMWQFYNL.js +0 -11
- package/dist/broadcaster-preparation-UGOTO4SX.cjs +0 -11
- package/dist/broadcaster-preparation-UGOTO4SX.cjs.map +0 -1
- package/dist/chunk-7F7ZZW3L.cjs.map +0 -1
- package/dist/chunk-EHP5TBC6.js +0 -3565
- package/dist/chunk-EHP5TBC6.js.map +0 -1
- package/dist/chunk-GTPUYPQL.js.map +0 -1
- package/dist/chunk-ITTGBIG2.js +0 -1877
- package/dist/chunk-ITTGBIG2.js.map +0 -1
- package/dist/chunk-J2JH6HIG.cjs +0 -1877
- package/dist/chunk-J2JH6HIG.cjs.map +0 -1
- package/dist/chunk-LOU7AP2B.cjs.map +0 -1
- package/dist/chunk-RHNIHI4P.cjs +0 -3565
- package/dist/chunk-RHNIHI4P.cjs.map +0 -1
- package/dist/chunk-XHKQ2BO2.js.map +0 -1
- /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 {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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(): "
|
|
40
|
-
estimateGas(
|
|
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: "
|
|
54
|
+
kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
|
|
46
55
|
status: OperationStatus;
|
|
47
56
|
context: {
|
|
48
|
-
tokenAddress:
|
|
57
|
+
tokenAddress: _invisi_labs_primitives.Address;
|
|
49
58
|
now?: bigint;
|
|
50
59
|
timestamp?: bigint;
|
|
51
60
|
chainId: bigint;
|
|
52
|
-
protocolAddress:
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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<
|
|
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<
|
|
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: "
|
|
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
|
-
|
|
209
|
-
|
|
212
|
+
prepareUpdateCredit(options: ExplicitUpdateCreditPreparation): Promise<PreparedTransaction>;
|
|
213
|
+
prepareRevokeCredit(options: ExplicitRevokeCreditPreparation): Promise<PreparedTransaction>;
|
|
210
214
|
toJSON(): {
|
|
211
215
|
invisi: boolean;
|
|
212
216
|
};
|
|
@@ -305,14 +309,16 @@ 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<
|
|
312
|
+
viewing: Pick<ReturnType<typeof authenticatedDecryptor>, "ownerAddress" | "decryptNote" | "decryptCredit"> & Partial<Pick<ReturnType<typeof authenticatedDecryptor>, "detectCandidates">>;
|
|
309
313
|
confirmedThrough: bigint;
|
|
314
|
+
roles?: readonly DeliveryCandidate["role"][];
|
|
310
315
|
}): Promise<{
|
|
311
316
|
notes: DiscoveredNote[];
|
|
312
317
|
credits: DiscoveredCredit[];
|
|
318
|
+
unresolved?: DeliveryCandidate[];
|
|
313
319
|
}>;
|
|
314
320
|
|
|
315
321
|
/** Decode independently fetched canonical receipt bytes, never normalized service events. */
|
|
316
322
|
declare function readProtocolLogs(receipt: CanonicalReceipt, protocolAddress: Address): DeliveryEventLog[];
|
|
317
323
|
|
|
318
|
-
export { type
|
|
324
|
+
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 {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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(): "
|
|
40
|
-
estimateGas(
|
|
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: "
|
|
54
|
+
kind: "create-credit" | "update-credit" | "transfer" | "shield" | "draw-credit" | "revoke-credit";
|
|
46
55
|
status: OperationStatus;
|
|
47
56
|
context: {
|
|
48
|
-
tokenAddress:
|
|
57
|
+
tokenAddress: _invisi_labs_primitives.Address;
|
|
49
58
|
now?: bigint;
|
|
50
59
|
timestamp?: bigint;
|
|
51
60
|
chainId: bigint;
|
|
52
|
-
protocolAddress:
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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<
|
|
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<
|
|
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: "
|
|
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
|
-
|
|
209
|
-
|
|
212
|
+
prepareUpdateCredit(options: ExplicitUpdateCreditPreparation): Promise<PreparedTransaction>;
|
|
213
|
+
prepareRevokeCredit(options: ExplicitRevokeCreditPreparation): Promise<PreparedTransaction>;
|
|
210
214
|
toJSON(): {
|
|
211
215
|
invisi: boolean;
|
|
212
216
|
};
|
|
@@ -305,14 +309,16 @@ 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<
|
|
312
|
+
viewing: Pick<ReturnType<typeof authenticatedDecryptor>, "ownerAddress" | "decryptNote" | "decryptCredit"> & Partial<Pick<ReturnType<typeof authenticatedDecryptor>, "detectCandidates">>;
|
|
309
313
|
confirmedThrough: bigint;
|
|
314
|
+
roles?: readonly DeliveryCandidate["role"][];
|
|
310
315
|
}): Promise<{
|
|
311
316
|
notes: DiscoveredNote[];
|
|
312
317
|
credits: DiscoveredCredit[];
|
|
318
|
+
unresolved?: DeliveryCandidate[];
|
|
313
319
|
}>;
|
|
314
320
|
|
|
315
321
|
/** Decode independently fetched canonical receipt bytes, never normalized service events. */
|
|
316
322
|
declare function readProtocolLogs(receipt: CanonicalReceipt, protocolAddress: Address): DeliveryEventLog[];
|
|
317
323
|
|
|
318
|
-
export { type
|
|
324
|
+
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 };
|