@invisi-labs/protocol 1.1.6 → 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.
- package/README.md +5 -0
- package/dist/chunk-7SS2YSEF.js +199 -0
- package/dist/chunk-7SS2YSEF.js.map +1 -0
- package/dist/{chunk-BYJ4LXCJ.js → chunk-HHJLFLVJ.js} +616 -714
- package/dist/chunk-HHJLFLVJ.js.map +1 -0
- package/dist/chunk-MVQQD5W5.js +487 -0
- package/dist/chunk-MVQQD5W5.js.map +1 -0
- package/dist/chunk-Z2XPYNMC.js +446 -0
- package/dist/chunk-Z2XPYNMC.js.map +1 -0
- package/dist/contracts.cjs +615 -713
- package/dist/contracts.cjs.map +1 -1
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +5 -5
- package/dist/contracts.js +1 -1
- package/dist/credit.cjs +3367 -0
- package/dist/credit.cjs.map +1 -0
- package/dist/credit.d.cts +252 -0
- package/dist/credit.d.ts +252 -0
- package/dist/credit.js +53 -0
- package/dist/credit.js.map +1 -0
- package/dist/index.cjs +4294 -4223
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +128 -933
- package/dist/index.d.ts +128 -933
- package/dist/index.js +2853 -3584
- package/dist/index.js.map +1 -1
- package/dist/note.cjs +3456 -0
- package/dist/note.cjs.map +1 -0
- package/dist/note.d.cts +232 -0
- package/dist/note.d.ts +232 -0
- package/dist/note.js +43 -0
- package/dist/note.js.map +1 -0
- package/dist/provenance.cjs +558 -0
- package/dist/provenance.cjs.map +1 -0
- package/dist/provenance.d.cts +188 -0
- package/dist/provenance.d.ts +188 -0
- package/dist/provenance.js +499 -0
- package/dist/provenance.js.map +1 -0
- package/dist/{types-BmUlasOg.d.cts → types-CUnFzl5S.d.cts} +530 -590
- package/dist/{types-BmUlasOg.d.ts → types-CUnFzl5S.d.ts} +530 -590
- package/dist/validation-8g0SQVE5.d.ts +235 -0
- package/dist/validation-MgURYiNF.d.cts +235 -0
- package/package.json +20 -5
- package/dist/chunk-BYJ4LXCJ.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export { provenanceIntentHash } from '@invisi-labs/primitives';
|
|
2
|
+
|
|
3
|
+
interface RotationRecord {
|
|
4
|
+
version: "1";
|
|
5
|
+
providerId: string;
|
|
6
|
+
oldKeyId: string;
|
|
7
|
+
newKeyId: string;
|
|
8
|
+
newPublicKey: string;
|
|
9
|
+
activatedAt: string;
|
|
10
|
+
previousRotationHash: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
}
|
|
13
|
+
interface KeyValidity {
|
|
14
|
+
activatedAt: string;
|
|
15
|
+
retiredAt?: string;
|
|
16
|
+
}
|
|
17
|
+
interface TrustedKeyring {
|
|
18
|
+
providerId: string;
|
|
19
|
+
keys: Record<string, Uint8Array>;
|
|
20
|
+
validity: Record<string, KeyValidity>;
|
|
21
|
+
rotationHash: string;
|
|
22
|
+
lastActivatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
declare function rotationPayload(r: RotationRecord): Uint8Array;
|
|
25
|
+
declare const rotationMessage: (r: RotationRecord) => Uint8Array;
|
|
26
|
+
declare const rotationHash: (r: RotationRecord) => string;
|
|
27
|
+
declare function verifyRotationChain(initial: {
|
|
28
|
+
providerId: string;
|
|
29
|
+
keys: Readonly<Record<string, Uint8Array>>;
|
|
30
|
+
previousRotationHash: string;
|
|
31
|
+
lastActivatedAt: string;
|
|
32
|
+
now: string;
|
|
33
|
+
validity?: Readonly<Record<string, KeyValidity>>;
|
|
34
|
+
}, records: readonly RotationRecord[]): TrustedKeyring;
|
|
35
|
+
declare function withRotationHistory(trust: TrustContext, keyring: TrustedKeyring): TrustContext;
|
|
36
|
+
|
|
37
|
+
type TrackingStatus = "pending_confirmation" | "pending_source" | "recognized" | "expired" | "superseded" | "stale_generation";
|
|
38
|
+
interface Tracking {
|
|
39
|
+
id: string;
|
|
40
|
+
status: TrackingStatus;
|
|
41
|
+
expiresAt: string;
|
|
42
|
+
operationDigest: string;
|
|
43
|
+
matched?: {
|
|
44
|
+
txHash: string;
|
|
45
|
+
blockHash: string;
|
|
46
|
+
operationIndex: string;
|
|
47
|
+
};
|
|
48
|
+
reasonCode?: string;
|
|
49
|
+
checkpointSequence?: string;
|
|
50
|
+
}
|
|
51
|
+
type TrackingResult = PublicResult & {
|
|
52
|
+
tracking: Tracking;
|
|
53
|
+
};
|
|
54
|
+
declare class TrackingStaleGenerationError extends Error {
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
57
|
+
declare function validateTracking(value: unknown, expectedId?: string): Tracking;
|
|
58
|
+
/** Single evaluation results are flat; aggregate members carry their own tracking records. */
|
|
59
|
+
declare function preflightTracking(result: PublicResult, operationIndex: string, operationDigest: string): Tracking;
|
|
60
|
+
|
|
61
|
+
declare const PROVENANCE_MANIFEST_SHA256 = "6107789c5c0d24c4130bff05da6d389336feb5ccb247c4030eae5198ab05d762";
|
|
62
|
+
|
|
63
|
+
declare class RecognizedTree {
|
|
64
|
+
private readonly leaves;
|
|
65
|
+
get leafCount(): number;
|
|
66
|
+
append(value: Integer): number;
|
|
67
|
+
appendCommitment(scope: Scope, commitment: Integer): Promise<number>;
|
|
68
|
+
membershipForCommitment(scope: Scope, commitment: Integer): Promise<{
|
|
69
|
+
leafIndex: number;
|
|
70
|
+
path: bigint[];
|
|
71
|
+
root: bigint;
|
|
72
|
+
} | undefined>;
|
|
73
|
+
root(): Promise<bigint>;
|
|
74
|
+
path(index: number): Promise<{
|
|
75
|
+
path: bigint[];
|
|
76
|
+
root: bigint;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const DEFAULT_PROVENANCE_ENDPOINT = "https://provenance.invisipay.fi";
|
|
81
|
+
type Integer = bigint | string | number;
|
|
82
|
+
declare const FIELD_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
|
|
83
|
+
declare const CAPACITIES: readonly number[];
|
|
84
|
+
declare const PUBLIC_INPUTS: readonly ["chain_id", "protocol_address", "token_address", "chain_generation", "source_count", "sources_digest", "input_count", "operation_digest_hi", "operation_digest_lo", "input_digest", "binding"];
|
|
85
|
+
declare function uint(value: Integer, bits: number): bigint;
|
|
86
|
+
declare function field(value: Integer): bigint;
|
|
87
|
+
declare const word: (value: Integer) => string;
|
|
88
|
+
declare const DOMAINS: Readonly<Record<"SCOPE" | "NOTE" | "INPUTS" | "STEP" | "SOURCES" | "SOURCE_STEP" | "BIND", bigint>>;
|
|
89
|
+
declare const limbs: (value: Integer) => [bigint, bigint];
|
|
90
|
+
interface Scope {
|
|
91
|
+
chainId: Integer;
|
|
92
|
+
protocolAddress: Integer;
|
|
93
|
+
}
|
|
94
|
+
declare function scopeHash(s: Scope): Promise<bigint>;
|
|
95
|
+
declare const recognizedLeaf: (scope: Integer, commitment: Integer) => Promise<bigint>;
|
|
96
|
+
interface Opening {
|
|
97
|
+
owner: Integer;
|
|
98
|
+
nonce: Integer;
|
|
99
|
+
amount: Integer;
|
|
100
|
+
}
|
|
101
|
+
declare function noteOpening(s: Pick<Scope, "chainId" | "protocolAddress"> & Opening & {
|
|
102
|
+
tokenAddress: Integer;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
commitment: bigint;
|
|
105
|
+
nullifier: bigint;
|
|
106
|
+
}>;
|
|
107
|
+
declare function inputDigest(nullifiers: readonly Integer[]): Promise<bigint>;
|
|
108
|
+
interface Source {
|
|
109
|
+
treeId: Integer;
|
|
110
|
+
root: Integer;
|
|
111
|
+
leafCount: Integer;
|
|
112
|
+
}
|
|
113
|
+
declare function sourcesDigest(generation: Integer, sources: readonly Source[]): Promise<bigint>;
|
|
114
|
+
declare function bindingDigest(s: {
|
|
115
|
+
scope: Integer;
|
|
116
|
+
tokenAddress: Integer;
|
|
117
|
+
chainGeneration: Integer;
|
|
118
|
+
sourceCount: Integer;
|
|
119
|
+
sourcesDigest: Integer;
|
|
120
|
+
inputCount: Integer;
|
|
121
|
+
operationDigest: Integer;
|
|
122
|
+
inputDigest: Integer;
|
|
123
|
+
}): Promise<bigint>;
|
|
124
|
+
declare function operationDigest(s: {
|
|
125
|
+
chainId: Integer;
|
|
126
|
+
protocolAddress: Integer;
|
|
127
|
+
operationKind?: number;
|
|
128
|
+
mainCircuitCapacity: Integer;
|
|
129
|
+
publicInputs: readonly Integer[];
|
|
130
|
+
}): string;
|
|
131
|
+
declare const CERT_LAYOUT: readonly [readonly ["certificateVersion", 1], readonly ["providerId", 32], readonly ["signingKeyId", 32], readonly ["chainId", 8], readonly ["protocolAddress", 20], readonly ["chainGeneration", 8], readonly ["rootSequence", 8], readonly ["treeId", 8], readonly ["leafCount", 8], readonly ["root", 32], readonly ["confirmedBlockNumber", 8], readonly ["confirmedBlockHash", 32], readonly ["decisionLogHash", 32], readonly ["previousCheckpointHash", 32], readonly ["issuedAt", 8]];
|
|
132
|
+
type RootCertificate = Record<(typeof CERT_LAYOUT)[number][0], Integer> & {
|
|
133
|
+
signature: string;
|
|
134
|
+
};
|
|
135
|
+
declare function rootCertificatePayload(c: Omit<RootCertificate, "signature">): Uint8Array;
|
|
136
|
+
declare const checkpointHash: (c: Omit<RootCertificate, "signature">) => string;
|
|
137
|
+
declare const rootCertificateMessage: (c: Omit<RootCertificate, "signature">) => Uint8Array;
|
|
138
|
+
declare function verifyRootCertificate(c: RootCertificate, key: Uint8Array): boolean;
|
|
139
|
+
interface ProofBundle {
|
|
140
|
+
format: "invisi-provenance-proof-v1";
|
|
141
|
+
circuitId: string;
|
|
142
|
+
manifestSha256: string;
|
|
143
|
+
target: "evm";
|
|
144
|
+
publicInputs: string[];
|
|
145
|
+
proof: string;
|
|
146
|
+
rootCertificates: RootCertificate[];
|
|
147
|
+
}
|
|
148
|
+
interface ProofSidecar {
|
|
149
|
+
operationIndex: string;
|
|
150
|
+
proofBundle: ProofBundle;
|
|
151
|
+
}
|
|
152
|
+
interface TrustedManifest {
|
|
153
|
+
noirVersion: string;
|
|
154
|
+
bbVersion: string;
|
|
155
|
+
depth: number;
|
|
156
|
+
family: "provenance";
|
|
157
|
+
target: "evm";
|
|
158
|
+
publicInputs: readonly string[];
|
|
159
|
+
circuits: readonly {
|
|
160
|
+
capacity: number;
|
|
161
|
+
name?: string;
|
|
162
|
+
artifactSha256: string;
|
|
163
|
+
vkSha256: string;
|
|
164
|
+
}[];
|
|
165
|
+
}
|
|
166
|
+
interface ManifestIdentity {
|
|
167
|
+
manifest: TrustedManifest;
|
|
168
|
+
sha256: string;
|
|
169
|
+
}
|
|
170
|
+
interface TrustContext extends Scope {
|
|
171
|
+
chainGeneration: Integer;
|
|
172
|
+
providerId: Integer;
|
|
173
|
+
signingKeys: Readonly<Record<string, Uint8Array>>;
|
|
174
|
+
manifestSha256: string;
|
|
175
|
+
signingKeyValidity?: Readonly<Record<string, {
|
|
176
|
+
activatedAt: string;
|
|
177
|
+
retiredAt?: string;
|
|
178
|
+
}>>;
|
|
179
|
+
}
|
|
180
|
+
declare function assertCertificateTrust(c: RootCertificate, trust: TrustContext): void;
|
|
181
|
+
type PublicResult = Record<string, unknown> & {
|
|
182
|
+
scope: Scope;
|
|
183
|
+
};
|
|
184
|
+
declare function certificateToWire(c: RootCertificate): RootCertificate;
|
|
185
|
+
declare function validateProofBundle(b: ProofBundle, t: TrustContext): Promise<void>;
|
|
186
|
+
declare function proofSidecarToWire(sidecar: ProofSidecar): ProofSidecar;
|
|
187
|
+
|
|
188
|
+
export { CAPACITIES, DEFAULT_PROVENANCE_ENDPOINT, DOMAINS, FIELD_MODULUS, type Integer, type KeyValidity, type ManifestIdentity, type Opening, PROVENANCE_MANIFEST_SHA256, PUBLIC_INPUTS, type ProofBundle, type ProofSidecar, type PublicResult, RecognizedTree, type RootCertificate, type RotationRecord, type Scope, type Source, type Tracking, type TrackingResult, TrackingStaleGenerationError, type TrackingStatus, type TrustContext, type TrustedKeyring, type TrustedManifest, assertCertificateTrust, bindingDigest, certificateToWire, checkpointHash, field, inputDigest, limbs, noteOpening, operationDigest, preflightTracking, proofSidecarToWire, recognizedLeaf, rootCertificateMessage, rootCertificatePayload, rotationHash, rotationMessage, rotationPayload, scopeHash, sourcesDigest, uint, validateProofBundle, validateTracking, verifyRootCertificate, verifyRotationChain, withRotationHistory, word };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export { provenanceIntentHash } from '@invisi-labs/primitives';
|
|
2
|
+
|
|
3
|
+
interface RotationRecord {
|
|
4
|
+
version: "1";
|
|
5
|
+
providerId: string;
|
|
6
|
+
oldKeyId: string;
|
|
7
|
+
newKeyId: string;
|
|
8
|
+
newPublicKey: string;
|
|
9
|
+
activatedAt: string;
|
|
10
|
+
previousRotationHash: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
}
|
|
13
|
+
interface KeyValidity {
|
|
14
|
+
activatedAt: string;
|
|
15
|
+
retiredAt?: string;
|
|
16
|
+
}
|
|
17
|
+
interface TrustedKeyring {
|
|
18
|
+
providerId: string;
|
|
19
|
+
keys: Record<string, Uint8Array>;
|
|
20
|
+
validity: Record<string, KeyValidity>;
|
|
21
|
+
rotationHash: string;
|
|
22
|
+
lastActivatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
declare function rotationPayload(r: RotationRecord): Uint8Array;
|
|
25
|
+
declare const rotationMessage: (r: RotationRecord) => Uint8Array;
|
|
26
|
+
declare const rotationHash: (r: RotationRecord) => string;
|
|
27
|
+
declare function verifyRotationChain(initial: {
|
|
28
|
+
providerId: string;
|
|
29
|
+
keys: Readonly<Record<string, Uint8Array>>;
|
|
30
|
+
previousRotationHash: string;
|
|
31
|
+
lastActivatedAt: string;
|
|
32
|
+
now: string;
|
|
33
|
+
validity?: Readonly<Record<string, KeyValidity>>;
|
|
34
|
+
}, records: readonly RotationRecord[]): TrustedKeyring;
|
|
35
|
+
declare function withRotationHistory(trust: TrustContext, keyring: TrustedKeyring): TrustContext;
|
|
36
|
+
|
|
37
|
+
type TrackingStatus = "pending_confirmation" | "pending_source" | "recognized" | "expired" | "superseded" | "stale_generation";
|
|
38
|
+
interface Tracking {
|
|
39
|
+
id: string;
|
|
40
|
+
status: TrackingStatus;
|
|
41
|
+
expiresAt: string;
|
|
42
|
+
operationDigest: string;
|
|
43
|
+
matched?: {
|
|
44
|
+
txHash: string;
|
|
45
|
+
blockHash: string;
|
|
46
|
+
operationIndex: string;
|
|
47
|
+
};
|
|
48
|
+
reasonCode?: string;
|
|
49
|
+
checkpointSequence?: string;
|
|
50
|
+
}
|
|
51
|
+
type TrackingResult = PublicResult & {
|
|
52
|
+
tracking: Tracking;
|
|
53
|
+
};
|
|
54
|
+
declare class TrackingStaleGenerationError extends Error {
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
57
|
+
declare function validateTracking(value: unknown, expectedId?: string): Tracking;
|
|
58
|
+
/** Single evaluation results are flat; aggregate members carry their own tracking records. */
|
|
59
|
+
declare function preflightTracking(result: PublicResult, operationIndex: string, operationDigest: string): Tracking;
|
|
60
|
+
|
|
61
|
+
declare const PROVENANCE_MANIFEST_SHA256 = "6107789c5c0d24c4130bff05da6d389336feb5ccb247c4030eae5198ab05d762";
|
|
62
|
+
|
|
63
|
+
declare class RecognizedTree {
|
|
64
|
+
private readonly leaves;
|
|
65
|
+
get leafCount(): number;
|
|
66
|
+
append(value: Integer): number;
|
|
67
|
+
appendCommitment(scope: Scope, commitment: Integer): Promise<number>;
|
|
68
|
+
membershipForCommitment(scope: Scope, commitment: Integer): Promise<{
|
|
69
|
+
leafIndex: number;
|
|
70
|
+
path: bigint[];
|
|
71
|
+
root: bigint;
|
|
72
|
+
} | undefined>;
|
|
73
|
+
root(): Promise<bigint>;
|
|
74
|
+
path(index: number): Promise<{
|
|
75
|
+
path: bigint[];
|
|
76
|
+
root: bigint;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const DEFAULT_PROVENANCE_ENDPOINT = "https://provenance.invisipay.fi";
|
|
81
|
+
type Integer = bigint | string | number;
|
|
82
|
+
declare const FIELD_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
|
|
83
|
+
declare const CAPACITIES: readonly number[];
|
|
84
|
+
declare const PUBLIC_INPUTS: readonly ["chain_id", "protocol_address", "token_address", "chain_generation", "source_count", "sources_digest", "input_count", "operation_digest_hi", "operation_digest_lo", "input_digest", "binding"];
|
|
85
|
+
declare function uint(value: Integer, bits: number): bigint;
|
|
86
|
+
declare function field(value: Integer): bigint;
|
|
87
|
+
declare const word: (value: Integer) => string;
|
|
88
|
+
declare const DOMAINS: Readonly<Record<"SCOPE" | "NOTE" | "INPUTS" | "STEP" | "SOURCES" | "SOURCE_STEP" | "BIND", bigint>>;
|
|
89
|
+
declare const limbs: (value: Integer) => [bigint, bigint];
|
|
90
|
+
interface Scope {
|
|
91
|
+
chainId: Integer;
|
|
92
|
+
protocolAddress: Integer;
|
|
93
|
+
}
|
|
94
|
+
declare function scopeHash(s: Scope): Promise<bigint>;
|
|
95
|
+
declare const recognizedLeaf: (scope: Integer, commitment: Integer) => Promise<bigint>;
|
|
96
|
+
interface Opening {
|
|
97
|
+
owner: Integer;
|
|
98
|
+
nonce: Integer;
|
|
99
|
+
amount: Integer;
|
|
100
|
+
}
|
|
101
|
+
declare function noteOpening(s: Pick<Scope, "chainId" | "protocolAddress"> & Opening & {
|
|
102
|
+
tokenAddress: Integer;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
commitment: bigint;
|
|
105
|
+
nullifier: bigint;
|
|
106
|
+
}>;
|
|
107
|
+
declare function inputDigest(nullifiers: readonly Integer[]): Promise<bigint>;
|
|
108
|
+
interface Source {
|
|
109
|
+
treeId: Integer;
|
|
110
|
+
root: Integer;
|
|
111
|
+
leafCount: Integer;
|
|
112
|
+
}
|
|
113
|
+
declare function sourcesDigest(generation: Integer, sources: readonly Source[]): Promise<bigint>;
|
|
114
|
+
declare function bindingDigest(s: {
|
|
115
|
+
scope: Integer;
|
|
116
|
+
tokenAddress: Integer;
|
|
117
|
+
chainGeneration: Integer;
|
|
118
|
+
sourceCount: Integer;
|
|
119
|
+
sourcesDigest: Integer;
|
|
120
|
+
inputCount: Integer;
|
|
121
|
+
operationDigest: Integer;
|
|
122
|
+
inputDigest: Integer;
|
|
123
|
+
}): Promise<bigint>;
|
|
124
|
+
declare function operationDigest(s: {
|
|
125
|
+
chainId: Integer;
|
|
126
|
+
protocolAddress: Integer;
|
|
127
|
+
operationKind?: number;
|
|
128
|
+
mainCircuitCapacity: Integer;
|
|
129
|
+
publicInputs: readonly Integer[];
|
|
130
|
+
}): string;
|
|
131
|
+
declare const CERT_LAYOUT: readonly [readonly ["certificateVersion", 1], readonly ["providerId", 32], readonly ["signingKeyId", 32], readonly ["chainId", 8], readonly ["protocolAddress", 20], readonly ["chainGeneration", 8], readonly ["rootSequence", 8], readonly ["treeId", 8], readonly ["leafCount", 8], readonly ["root", 32], readonly ["confirmedBlockNumber", 8], readonly ["confirmedBlockHash", 32], readonly ["decisionLogHash", 32], readonly ["previousCheckpointHash", 32], readonly ["issuedAt", 8]];
|
|
132
|
+
type RootCertificate = Record<(typeof CERT_LAYOUT)[number][0], Integer> & {
|
|
133
|
+
signature: string;
|
|
134
|
+
};
|
|
135
|
+
declare function rootCertificatePayload(c: Omit<RootCertificate, "signature">): Uint8Array;
|
|
136
|
+
declare const checkpointHash: (c: Omit<RootCertificate, "signature">) => string;
|
|
137
|
+
declare const rootCertificateMessage: (c: Omit<RootCertificate, "signature">) => Uint8Array;
|
|
138
|
+
declare function verifyRootCertificate(c: RootCertificate, key: Uint8Array): boolean;
|
|
139
|
+
interface ProofBundle {
|
|
140
|
+
format: "invisi-provenance-proof-v1";
|
|
141
|
+
circuitId: string;
|
|
142
|
+
manifestSha256: string;
|
|
143
|
+
target: "evm";
|
|
144
|
+
publicInputs: string[];
|
|
145
|
+
proof: string;
|
|
146
|
+
rootCertificates: RootCertificate[];
|
|
147
|
+
}
|
|
148
|
+
interface ProofSidecar {
|
|
149
|
+
operationIndex: string;
|
|
150
|
+
proofBundle: ProofBundle;
|
|
151
|
+
}
|
|
152
|
+
interface TrustedManifest {
|
|
153
|
+
noirVersion: string;
|
|
154
|
+
bbVersion: string;
|
|
155
|
+
depth: number;
|
|
156
|
+
family: "provenance";
|
|
157
|
+
target: "evm";
|
|
158
|
+
publicInputs: readonly string[];
|
|
159
|
+
circuits: readonly {
|
|
160
|
+
capacity: number;
|
|
161
|
+
name?: string;
|
|
162
|
+
artifactSha256: string;
|
|
163
|
+
vkSha256: string;
|
|
164
|
+
}[];
|
|
165
|
+
}
|
|
166
|
+
interface ManifestIdentity {
|
|
167
|
+
manifest: TrustedManifest;
|
|
168
|
+
sha256: string;
|
|
169
|
+
}
|
|
170
|
+
interface TrustContext extends Scope {
|
|
171
|
+
chainGeneration: Integer;
|
|
172
|
+
providerId: Integer;
|
|
173
|
+
signingKeys: Readonly<Record<string, Uint8Array>>;
|
|
174
|
+
manifestSha256: string;
|
|
175
|
+
signingKeyValidity?: Readonly<Record<string, {
|
|
176
|
+
activatedAt: string;
|
|
177
|
+
retiredAt?: string;
|
|
178
|
+
}>>;
|
|
179
|
+
}
|
|
180
|
+
declare function assertCertificateTrust(c: RootCertificate, trust: TrustContext): void;
|
|
181
|
+
type PublicResult = Record<string, unknown> & {
|
|
182
|
+
scope: Scope;
|
|
183
|
+
};
|
|
184
|
+
declare function certificateToWire(c: RootCertificate): RootCertificate;
|
|
185
|
+
declare function validateProofBundle(b: ProofBundle, t: TrustContext): Promise<void>;
|
|
186
|
+
declare function proofSidecarToWire(sidecar: ProofSidecar): ProofSidecar;
|
|
187
|
+
|
|
188
|
+
export { CAPACITIES, DEFAULT_PROVENANCE_ENDPOINT, DOMAINS, FIELD_MODULUS, type Integer, type KeyValidity, type ManifestIdentity, type Opening, PROVENANCE_MANIFEST_SHA256, PUBLIC_INPUTS, type ProofBundle, type ProofSidecar, type PublicResult, RecognizedTree, type RootCertificate, type RotationRecord, type Scope, type Source, type Tracking, type TrackingResult, TrackingStaleGenerationError, type TrackingStatus, type TrustContext, type TrustedKeyring, type TrustedManifest, assertCertificateTrust, bindingDigest, certificateToWire, checkpointHash, field, inputDigest, limbs, noteOpening, operationDigest, preflightTracking, proofSidecarToWire, recognizedLeaf, rootCertificateMessage, rootCertificatePayload, rotationHash, rotationMessage, rotationPayload, scopeHash, sourcesDigest, uint, validateProofBundle, validateTracking, verifyRootCertificate, verifyRotationChain, withRotationHistory, word };
|