@invisi-labs/sdk 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/broadcaster-preparation-DMxxZ_1Q.d.cts +587 -0
- package/dist/broadcaster-preparation-DMxxZ_1Q.d.ts +587 -0
- package/dist/broadcaster-preparation-RMWQFYNL.js +11 -0
- package/dist/broadcaster-preparation-UGOTO4SX.cjs +11 -0
- package/dist/broadcaster-preparation-UGOTO4SX.cjs.map +1 -0
- package/dist/chunk-7F7ZZW3L.cjs +374 -0
- package/dist/chunk-7F7ZZW3L.cjs.map +1 -0
- package/dist/chunk-EHP5TBC6.js +3565 -0
- package/dist/chunk-EHP5TBC6.js.map +1 -0
- package/dist/chunk-GTPUYPQL.js +128 -0
- package/dist/chunk-GTPUYPQL.js.map +1 -0
- package/dist/chunk-ITTGBIG2.js +1877 -0
- package/dist/chunk-ITTGBIG2.js.map +1 -0
- package/dist/chunk-J2JH6HIG.cjs +1877 -0
- package/dist/chunk-J2JH6HIG.cjs.map +1 -0
- package/dist/chunk-LOU7AP2B.cjs +128 -0
- package/dist/chunk-LOU7AP2B.cjs.map +1 -0
- package/dist/chunk-RHNIHI4P.cjs +3565 -0
- package/dist/chunk-RHNIHI4P.cjs.map +1 -0
- package/dist/{chunk-4HMM7ZKY.js → chunk-XHKQ2BO2.js} +19 -19
- package/dist/chunk-XHKQ2BO2.js.map +1 -0
- package/dist/ethers.cjs +11 -385
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.d.cts +4 -5
- package/dist/ethers.d.ts +4 -5
- package/dist/ethers.js +1 -1
- package/dist/index.cjs +441 -6217
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +109 -491
- package/dist/index.d.ts +109 -491
- package/dist/index.js +518 -599
- package/dist/index.js.map +1 -1
- package/dist/receipt-logs-CvC951p7.d.cts +318 -0
- package/dist/receipt-logs-m0-bhaxW.d.ts +318 -0
- package/dist/session-support.cjs +168 -0
- package/dist/session-support.cjs.map +1 -0
- package/dist/session-support.d.cts +252 -0
- package/dist/session-support.d.ts +252 -0
- package/dist/session-support.js +168 -0
- package/dist/session-support.js.map +1 -0
- package/package.json +10 -20
- package/dist/chunk-4HMM7ZKY.js.map +0 -1
- package/dist/chunk-BE52B32Z.js +0 -5490
- package/dist/chunk-BE52B32Z.js.map +0 -1
- package/dist/indexeddb.cjs +0 -5636
- package/dist/indexeddb.cjs.map +0 -1
- package/dist/indexeddb.d.cts +0 -20
- package/dist/indexeddb.d.ts +0 -20
- package/dist/indexeddb.js +0 -70
- package/dist/indexeddb.js.map +0 -1
- package/dist/memory.cjs +0 -5644
- package/dist/memory.cjs.map +0 -1
- package/dist/memory.d.cts +0 -12
- package/dist/memory.d.ts +0 -12
- package/dist/memory.js +0 -10
- package/dist/operation-types-D7I405FX.d.ts +0 -275
- package/dist/operation-types-DIazgS2d.d.cts +0 -275
- package/dist/sqlite.cjs +0 -5620
- package/dist/sqlite.cjs.map +0 -1
- package/dist/sqlite.d.cts +0 -28
- package/dist/sqlite.d.ts +0 -28
- package/dist/sqlite.js +0 -54
- package/dist/sqlite.js.map +0 -1
- package/dist/state-AUnz7TG7.d.cts +0 -78
- package/dist/state-AUnz7TG7.d.ts +0 -78
- package/dist/store-BMN8kd0c.d.ts +0 -42
- package/dist/store-Cz75STRl.d.cts +0 -42
- /package/dist/{memory.js.map → broadcaster-preparation-RMWQFYNL.js.map} +0 -0
package/dist/memory.d.cts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { T as TransactionalWalletStore } from './store-Cz75STRl.cjs';
|
|
2
|
-
export { M as MemoryAtomicRecords } from './store-Cz75STRl.cjs';
|
|
3
|
-
import './state-AUnz7TG7.cjs';
|
|
4
|
-
import '@invisi-labs/core';
|
|
5
|
-
import '@invisi-labs/prover';
|
|
6
|
-
|
|
7
|
-
/** Explicit ephemeral state for demos and applications that choose memory-only operation. */
|
|
8
|
-
declare class MemoryWalletStore extends TransactionalWalletStore {
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { MemoryWalletStore };
|
package/dist/memory.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { T as TransactionalWalletStore } from './store-BMN8kd0c.js';
|
|
2
|
-
export { M as MemoryAtomicRecords } from './store-BMN8kd0c.js';
|
|
3
|
-
import './state-AUnz7TG7.js';
|
|
4
|
-
import '@invisi-labs/core';
|
|
5
|
-
import '@invisi-labs/prover';
|
|
6
|
-
|
|
7
|
-
/** Explicit ephemeral state for demos and applications that choose memory-only operation. */
|
|
8
|
-
declare class MemoryWalletStore extends TransactionalWalletStore {
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { MemoryWalletStore };
|
package/dist/memory.js
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { c as StoredNote, W as WalletScope, b as WalletStore } from './state-AUnz7TG7.js';
|
|
2
|
-
import { TransactionContext, CanonicalBlock, NoteMembership, FundingInput, TransactRequestParams, CreditMembership, Protocol, ChainReader, ProtocolDataProvider, TokenProtocol } from '@invisi-labs/protocol';
|
|
3
|
-
import * as _invisi_labs_prover from '@invisi-labs/prover';
|
|
4
|
-
import { Prover, ProverOptions, AggregateMember } from '@invisi-labs/prover';
|
|
5
|
-
import { Hex, Note, CreditDeliveryState, ViewingCapability, Wallet, PublicWallet, WalletAuthorizationProvider, ReceivingKeyLookup } from '@invisi-labs/core';
|
|
6
|
-
import { Signer } from 'ethers';
|
|
7
|
-
import { Address, Hex as Hex$1, Delivery, ShieldParams, ShieldOutput, CreateCreditParams, CreditDrawParams, CancelCreditParams, TopUpCreditParams, TransactRequest } from '@invisi-labs/protocol/contracts';
|
|
8
|
-
|
|
9
|
-
interface GasBenchmarkShape {
|
|
10
|
-
kind: OperationPlan["kind"];
|
|
11
|
-
target: string;
|
|
12
|
-
capacity: number;
|
|
13
|
-
noteInputs: number;
|
|
14
|
-
noteOutputs: number;
|
|
15
|
-
sourceTrees: number;
|
|
16
|
-
creditInputs: number;
|
|
17
|
-
creditOutputs: number;
|
|
18
|
-
creditRemainders: number;
|
|
19
|
-
funding: "none" | "caller" | "signature";
|
|
20
|
-
permit: boolean;
|
|
21
|
-
deliveryBytes: number;
|
|
22
|
-
}
|
|
23
|
-
interface GasBenchmarkDeployment {
|
|
24
|
-
chainId: string;
|
|
25
|
-
protocolAddress: Hex;
|
|
26
|
-
runtimeCodeHash: Hex | null;
|
|
27
|
-
tokenAddress: Hex;
|
|
28
|
-
}
|
|
29
|
-
interface GasBenchmarkCircuit {
|
|
30
|
-
circuitName: string;
|
|
31
|
-
target: string;
|
|
32
|
-
artifactSha256: string;
|
|
33
|
-
vkSha256: string;
|
|
34
|
-
}
|
|
35
|
-
interface GasBenchmarkSample {
|
|
36
|
-
gasUsed: string;
|
|
37
|
-
transactionHash: Hex;
|
|
38
|
-
blockNumber: string;
|
|
39
|
-
blockHash: Hex;
|
|
40
|
-
calldataBytes: number;
|
|
41
|
-
}
|
|
42
|
-
interface GasBenchmarkProfile {
|
|
43
|
-
formatVersion: 1;
|
|
44
|
-
id: string;
|
|
45
|
-
deployment: GasBenchmarkDeployment;
|
|
46
|
-
source: {
|
|
47
|
-
protocolCommit: string;
|
|
48
|
-
fingerprints?: {
|
|
49
|
-
protocolSourceSha256: string;
|
|
50
|
-
dirtyDiffSha256: string;
|
|
51
|
-
compiledArtifactsSha256: string;
|
|
52
|
-
creditManifestSha256: string;
|
|
53
|
-
userManifestSha256: string;
|
|
54
|
-
sdkSourceSha256: string;
|
|
55
|
-
};
|
|
56
|
-
toolchain?: {
|
|
57
|
-
solidity: string;
|
|
58
|
-
barretenberg: string;
|
|
59
|
-
noir: string;
|
|
60
|
-
evmVersion: string;
|
|
61
|
-
optimizerRuns: number;
|
|
62
|
-
anvil: string;
|
|
63
|
-
};
|
|
64
|
-
blockGasLimit?: string;
|
|
65
|
-
runtimeContracts?: Record<string, {
|
|
66
|
-
address: Hex;
|
|
67
|
-
runtimeCodeHash: Hex;
|
|
68
|
-
}>;
|
|
69
|
-
measuredAt: string;
|
|
70
|
-
chain: string;
|
|
71
|
-
hardfork: string;
|
|
72
|
-
token: string;
|
|
73
|
-
verifier: "real";
|
|
74
|
-
assumptions: string[];
|
|
75
|
-
};
|
|
76
|
-
measurements: Array<{
|
|
77
|
-
id: string;
|
|
78
|
-
shape: GasBenchmarkShape;
|
|
79
|
-
circuit: GasBenchmarkCircuit | null;
|
|
80
|
-
samples: GasBenchmarkSample[];
|
|
81
|
-
}>;
|
|
82
|
-
}
|
|
83
|
-
/** Parse a trusted, JSON-compatible benchmark catalog. No network access or publisher authentication. */
|
|
84
|
-
declare function defineGasBenchmarks(input: unknown): GasBenchmarkProfile[];
|
|
85
|
-
/** Pre-proof reference only; ethers must estimate the final transaction independently. */
|
|
86
|
-
interface GasReference {
|
|
87
|
-
gasUnits: bigint;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
interface CoinSelector {
|
|
91
|
-
select(candidates: readonly StoredNote[], requiredAmount: bigint): readonly Hex$1[] | Promise<readonly Hex$1[]>;
|
|
92
|
-
}
|
|
93
|
-
interface FundingTypedData {
|
|
94
|
-
domain: Record<string, unknown>;
|
|
95
|
-
primaryType: string;
|
|
96
|
-
types: Record<string, readonly {
|
|
97
|
-
name: string;
|
|
98
|
-
type: string;
|
|
99
|
-
}[]>;
|
|
100
|
-
message: Record<string, unknown>;
|
|
101
|
-
}
|
|
102
|
-
interface FundingSigner {
|
|
103
|
-
readonly address: Address;
|
|
104
|
-
signTypedData(data: FundingTypedData): Promise<Hex$1>;
|
|
105
|
-
}
|
|
106
|
-
interface FundingAuthorizationVerifier {
|
|
107
|
-
verifyTypedData(data: FundingTypedData & {
|
|
108
|
-
address: Address;
|
|
109
|
-
signature: Hex$1;
|
|
110
|
-
}): Promise<boolean>;
|
|
111
|
-
}
|
|
112
|
-
interface FundingSource {
|
|
113
|
-
payer: Address;
|
|
114
|
-
amount: bigint;
|
|
115
|
-
authorization?: "signature" | "caller";
|
|
116
|
-
sigNonce?: bigint;
|
|
117
|
-
deadline?: bigint;
|
|
118
|
-
permit?: NonNullable<FundingInput["permit"]>;
|
|
119
|
-
}
|
|
120
|
-
interface PaymentOutput {
|
|
121
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
122
|
-
payload?: Uint8Array;
|
|
123
|
-
to: string;
|
|
124
|
-
amount: bigint;
|
|
125
|
-
}
|
|
126
|
-
/** Public submission mode; backend proof targets are selected internally. */
|
|
127
|
-
type TransactionExecution = "single" | "aggregate";
|
|
128
|
-
interface TransactionProveOptions extends ProverOptions {
|
|
129
|
-
/** Defaults to single. Aggregate produces a member for a separate aggregate submission. */
|
|
130
|
-
execution?: TransactionExecution;
|
|
131
|
-
}
|
|
132
|
-
interface TransferPreparation {
|
|
133
|
-
tokenAddress: Address;
|
|
134
|
-
/** Explicit subset for managed inventory; detached calls already supply inputs. */
|
|
135
|
-
commitments?: readonly Hex$1[];
|
|
136
|
-
/** Public ERC20 payout. Empty private outputs are allowed when a payout is present. */
|
|
137
|
-
withdrawal?: {
|
|
138
|
-
to: Address;
|
|
139
|
-
amount: bigint;
|
|
140
|
-
};
|
|
141
|
-
outputs: readonly PaymentOutput[];
|
|
142
|
-
funding?: FundingSource;
|
|
143
|
-
deadline?: bigint;
|
|
144
|
-
}
|
|
145
|
-
interface ShieldPreparation {
|
|
146
|
-
tokenAddress: Address;
|
|
147
|
-
outputs: readonly PaymentOutput[];
|
|
148
|
-
funding: FundingSource;
|
|
149
|
-
deadline?: bigint;
|
|
150
|
-
}
|
|
151
|
-
interface PreparedOutput {
|
|
152
|
-
note: Note;
|
|
153
|
-
commitment: Hex$1;
|
|
154
|
-
identity: Hex$1;
|
|
155
|
-
delivery: Delivery;
|
|
156
|
-
address: string;
|
|
157
|
-
change: boolean;
|
|
158
|
-
}
|
|
159
|
-
interface CreateCreditPreparation {
|
|
160
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
161
|
-
payload?: Uint8Array;
|
|
162
|
-
singleLimit?: bigint;
|
|
163
|
-
dailyLimit?: bigint;
|
|
164
|
-
monthlyLimit?: bigint;
|
|
165
|
-
tokenAddress: Address;
|
|
166
|
-
spender: string;
|
|
167
|
-
amount: bigint;
|
|
168
|
-
expiry: bigint;
|
|
169
|
-
funding?: FundingSource;
|
|
170
|
-
deadline?: bigint;
|
|
171
|
-
}
|
|
172
|
-
interface DrawCreditPreparation {
|
|
173
|
-
tokenAddress: Address;
|
|
174
|
-
credits: readonly {
|
|
175
|
-
credit: Hex$1;
|
|
176
|
-
amount: bigint;
|
|
177
|
-
payload?: Uint8Array;
|
|
178
|
-
}[];
|
|
179
|
-
deadline?: bigint;
|
|
180
|
-
}
|
|
181
|
-
interface TopUpCreditPreparation {
|
|
182
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
183
|
-
payload?: Uint8Array;
|
|
184
|
-
/** Omission inherits the previous limit; zero disables it without clearing usage. */
|
|
185
|
-
singleLimit?: bigint;
|
|
186
|
-
dailyLimit?: bigint;
|
|
187
|
-
monthlyLimit?: bigint;
|
|
188
|
-
tokenAddress: Address;
|
|
189
|
-
credit: Hex$1;
|
|
190
|
-
additionalAmount: bigint;
|
|
191
|
-
expiry?: bigint;
|
|
192
|
-
funding?: FundingSource;
|
|
193
|
-
deadline?: bigint;
|
|
194
|
-
}
|
|
195
|
-
interface CancelCreditPreparation {
|
|
196
|
-
tokenAddress: Address;
|
|
197
|
-
credit: Hex$1;
|
|
198
|
-
deadline?: bigint;
|
|
199
|
-
}
|
|
200
|
-
interface PreparedCreditOutput {
|
|
201
|
-
state: CreditDeliveryState;
|
|
202
|
-
commitment: Hex$1;
|
|
203
|
-
deliveries: [Delivery, Delivery];
|
|
204
|
-
}
|
|
205
|
-
interface PreparedCreditInput extends CreditMembership {
|
|
206
|
-
commitment: Hex$1;
|
|
207
|
-
role: "owner" | "spender";
|
|
208
|
-
}
|
|
209
|
-
interface CreditPlan {
|
|
210
|
-
inputs: PreparedCreditInput[];
|
|
211
|
-
outputs: PreparedCreditOutput[];
|
|
212
|
-
deliveries: Delivery[];
|
|
213
|
-
creation?: CreateCreditParams;
|
|
214
|
-
draw?: CreditDrawParams;
|
|
215
|
-
cancel?: CancelCreditParams;
|
|
216
|
-
topUp?: TopUpCreditParams;
|
|
217
|
-
amounts?: bigint[];
|
|
218
|
-
}
|
|
219
|
-
interface OperationPlan {
|
|
220
|
-
version: 1;
|
|
221
|
-
id: string;
|
|
222
|
-
kind: "transfer" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
223
|
-
context: TransactionContext;
|
|
224
|
-
scope: WalletScope;
|
|
225
|
-
preparedAt: CanonicalBlock;
|
|
226
|
-
deadline: bigint;
|
|
227
|
-
outputs: PreparedOutput[];
|
|
228
|
-
inputs: Array<NoteMembership & {
|
|
229
|
-
commitment: Hex$1;
|
|
230
|
-
}>;
|
|
231
|
-
funding: FundingInput;
|
|
232
|
-
fundingMode: "none" | "signature" | "caller";
|
|
233
|
-
params?: TransactRequestParams;
|
|
234
|
-
shieldParams?: ShieldParams;
|
|
235
|
-
shieldOutputs?: ShieldOutput[];
|
|
236
|
-
capacity?: number;
|
|
237
|
-
credit?: CreditPlan;
|
|
238
|
-
statement?: _invisi_labs_prover.ProofStatement;
|
|
239
|
-
}
|
|
240
|
-
type WalletSessionOptions = WalletSessionInfrastructure;
|
|
241
|
-
/** Shared runtime fields; public options separately enforce the custom registry requirement. */
|
|
242
|
-
interface WalletSessionInfrastructure {
|
|
243
|
-
gasBenchmarks?: readonly GasBenchmarkProfile[];
|
|
244
|
-
/** Optional ethers gas/funding signer; distinct from the Invisi wallet authority. */
|
|
245
|
-
signer?: Signer;
|
|
246
|
-
viewing?: Pick<ViewingCapability, "walletIdentity" | "decryptNote" | "decryptCredit">;
|
|
247
|
-
wallet: Wallet | PublicWallet;
|
|
248
|
-
protocol: Protocol;
|
|
249
|
-
namespace?: string;
|
|
250
|
-
store?: WalletStore;
|
|
251
|
-
chainReader?: ChainReader;
|
|
252
|
-
protocolRpc?: ProtocolDataProvider;
|
|
253
|
-
authorization?: WalletAuthorizationProvider;
|
|
254
|
-
prover?: Prover;
|
|
255
|
-
fundingSigner?: FundingSigner;
|
|
256
|
-
fundingVerifier?: FundingAuthorizationVerifier;
|
|
257
|
-
addressResolver?: ReceivingKeyLookup;
|
|
258
|
-
coinSelector?: CoinSelector;
|
|
259
|
-
transactionTTL?: bigint;
|
|
260
|
-
}
|
|
261
|
-
interface OperationRuntime {
|
|
262
|
-
options: Omit<WalletSessionOptions, "protocol"> & {
|
|
263
|
-
protocol: TokenProtocol;
|
|
264
|
-
};
|
|
265
|
-
scope: WalletScope;
|
|
266
|
-
store: WalletStore;
|
|
267
|
-
reader: ChainReader;
|
|
268
|
-
authorization: () => WalletAuthorizationProvider;
|
|
269
|
-
}
|
|
270
|
-
interface OperationAggregateMember extends AggregateMember {
|
|
271
|
-
context: TransactionContext;
|
|
272
|
-
request: TransactRequest;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export { type CancelCreditPreparation as C, type DrawCreditPreparation as D, type FundingAuthorizationVerifier as F, type GasReference as G, type OperationRuntime as O, type PaymentOutput as P, type ShieldPreparation as S, type TransactionProveOptions as T, type WalletSessionOptions as W, type OperationPlan as a, type OperationAggregateMember as b, type CreateCreditPreparation as c, type TopUpCreditPreparation as d, type TransferPreparation as e, type WalletSessionInfrastructure as f, type CoinSelector as g, type FundingSigner as h, type FundingSource as i, type FundingTypedData as j, type GasBenchmarkCircuit as k, type GasBenchmarkDeployment as l, type GasBenchmarkProfile as m, type GasBenchmarkSample as n, type GasBenchmarkShape as o, type TransactionExecution as p, defineGasBenchmarks as q };
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { c as StoredNote, W as WalletScope, b as WalletStore } from './state-AUnz7TG7.cjs';
|
|
2
|
-
import { TransactionContext, CanonicalBlock, NoteMembership, FundingInput, TransactRequestParams, CreditMembership, Protocol, ChainReader, ProtocolDataProvider, TokenProtocol } from '@invisi-labs/protocol';
|
|
3
|
-
import * as _invisi_labs_prover from '@invisi-labs/prover';
|
|
4
|
-
import { Prover, ProverOptions, AggregateMember } from '@invisi-labs/prover';
|
|
5
|
-
import { Hex, Note, CreditDeliveryState, ViewingCapability, Wallet, PublicWallet, WalletAuthorizationProvider, ReceivingKeyLookup } from '@invisi-labs/core';
|
|
6
|
-
import { Signer } from 'ethers';
|
|
7
|
-
import { Address, Hex as Hex$1, Delivery, ShieldParams, ShieldOutput, CreateCreditParams, CreditDrawParams, CancelCreditParams, TopUpCreditParams, TransactRequest } from '@invisi-labs/protocol/contracts';
|
|
8
|
-
|
|
9
|
-
interface GasBenchmarkShape {
|
|
10
|
-
kind: OperationPlan["kind"];
|
|
11
|
-
target: string;
|
|
12
|
-
capacity: number;
|
|
13
|
-
noteInputs: number;
|
|
14
|
-
noteOutputs: number;
|
|
15
|
-
sourceTrees: number;
|
|
16
|
-
creditInputs: number;
|
|
17
|
-
creditOutputs: number;
|
|
18
|
-
creditRemainders: number;
|
|
19
|
-
funding: "none" | "caller" | "signature";
|
|
20
|
-
permit: boolean;
|
|
21
|
-
deliveryBytes: number;
|
|
22
|
-
}
|
|
23
|
-
interface GasBenchmarkDeployment {
|
|
24
|
-
chainId: string;
|
|
25
|
-
protocolAddress: Hex;
|
|
26
|
-
runtimeCodeHash: Hex | null;
|
|
27
|
-
tokenAddress: Hex;
|
|
28
|
-
}
|
|
29
|
-
interface GasBenchmarkCircuit {
|
|
30
|
-
circuitName: string;
|
|
31
|
-
target: string;
|
|
32
|
-
artifactSha256: string;
|
|
33
|
-
vkSha256: string;
|
|
34
|
-
}
|
|
35
|
-
interface GasBenchmarkSample {
|
|
36
|
-
gasUsed: string;
|
|
37
|
-
transactionHash: Hex;
|
|
38
|
-
blockNumber: string;
|
|
39
|
-
blockHash: Hex;
|
|
40
|
-
calldataBytes: number;
|
|
41
|
-
}
|
|
42
|
-
interface GasBenchmarkProfile {
|
|
43
|
-
formatVersion: 1;
|
|
44
|
-
id: string;
|
|
45
|
-
deployment: GasBenchmarkDeployment;
|
|
46
|
-
source: {
|
|
47
|
-
protocolCommit: string;
|
|
48
|
-
fingerprints?: {
|
|
49
|
-
protocolSourceSha256: string;
|
|
50
|
-
dirtyDiffSha256: string;
|
|
51
|
-
compiledArtifactsSha256: string;
|
|
52
|
-
creditManifestSha256: string;
|
|
53
|
-
userManifestSha256: string;
|
|
54
|
-
sdkSourceSha256: string;
|
|
55
|
-
};
|
|
56
|
-
toolchain?: {
|
|
57
|
-
solidity: string;
|
|
58
|
-
barretenberg: string;
|
|
59
|
-
noir: string;
|
|
60
|
-
evmVersion: string;
|
|
61
|
-
optimizerRuns: number;
|
|
62
|
-
anvil: string;
|
|
63
|
-
};
|
|
64
|
-
blockGasLimit?: string;
|
|
65
|
-
runtimeContracts?: Record<string, {
|
|
66
|
-
address: Hex;
|
|
67
|
-
runtimeCodeHash: Hex;
|
|
68
|
-
}>;
|
|
69
|
-
measuredAt: string;
|
|
70
|
-
chain: string;
|
|
71
|
-
hardfork: string;
|
|
72
|
-
token: string;
|
|
73
|
-
verifier: "real";
|
|
74
|
-
assumptions: string[];
|
|
75
|
-
};
|
|
76
|
-
measurements: Array<{
|
|
77
|
-
id: string;
|
|
78
|
-
shape: GasBenchmarkShape;
|
|
79
|
-
circuit: GasBenchmarkCircuit | null;
|
|
80
|
-
samples: GasBenchmarkSample[];
|
|
81
|
-
}>;
|
|
82
|
-
}
|
|
83
|
-
/** Parse a trusted, JSON-compatible benchmark catalog. No network access or publisher authentication. */
|
|
84
|
-
declare function defineGasBenchmarks(input: unknown): GasBenchmarkProfile[];
|
|
85
|
-
/** Pre-proof reference only; ethers must estimate the final transaction independently. */
|
|
86
|
-
interface GasReference {
|
|
87
|
-
gasUnits: bigint;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
interface CoinSelector {
|
|
91
|
-
select(candidates: readonly StoredNote[], requiredAmount: bigint): readonly Hex$1[] | Promise<readonly Hex$1[]>;
|
|
92
|
-
}
|
|
93
|
-
interface FundingTypedData {
|
|
94
|
-
domain: Record<string, unknown>;
|
|
95
|
-
primaryType: string;
|
|
96
|
-
types: Record<string, readonly {
|
|
97
|
-
name: string;
|
|
98
|
-
type: string;
|
|
99
|
-
}[]>;
|
|
100
|
-
message: Record<string, unknown>;
|
|
101
|
-
}
|
|
102
|
-
interface FundingSigner {
|
|
103
|
-
readonly address: Address;
|
|
104
|
-
signTypedData(data: FundingTypedData): Promise<Hex$1>;
|
|
105
|
-
}
|
|
106
|
-
interface FundingAuthorizationVerifier {
|
|
107
|
-
verifyTypedData(data: FundingTypedData & {
|
|
108
|
-
address: Address;
|
|
109
|
-
signature: Hex$1;
|
|
110
|
-
}): Promise<boolean>;
|
|
111
|
-
}
|
|
112
|
-
interface FundingSource {
|
|
113
|
-
payer: Address;
|
|
114
|
-
amount: bigint;
|
|
115
|
-
authorization?: "signature" | "caller";
|
|
116
|
-
sigNonce?: bigint;
|
|
117
|
-
deadline?: bigint;
|
|
118
|
-
permit?: NonNullable<FundingInput["permit"]>;
|
|
119
|
-
}
|
|
120
|
-
interface PaymentOutput {
|
|
121
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
122
|
-
payload?: Uint8Array;
|
|
123
|
-
to: string;
|
|
124
|
-
amount: bigint;
|
|
125
|
-
}
|
|
126
|
-
/** Public submission mode; backend proof targets are selected internally. */
|
|
127
|
-
type TransactionExecution = "single" | "aggregate";
|
|
128
|
-
interface TransactionProveOptions extends ProverOptions {
|
|
129
|
-
/** Defaults to single. Aggregate produces a member for a separate aggregate submission. */
|
|
130
|
-
execution?: TransactionExecution;
|
|
131
|
-
}
|
|
132
|
-
interface TransferPreparation {
|
|
133
|
-
tokenAddress: Address;
|
|
134
|
-
/** Explicit subset for managed inventory; detached calls already supply inputs. */
|
|
135
|
-
commitments?: readonly Hex$1[];
|
|
136
|
-
/** Public ERC20 payout. Empty private outputs are allowed when a payout is present. */
|
|
137
|
-
withdrawal?: {
|
|
138
|
-
to: Address;
|
|
139
|
-
amount: bigint;
|
|
140
|
-
};
|
|
141
|
-
outputs: readonly PaymentOutput[];
|
|
142
|
-
funding?: FundingSource;
|
|
143
|
-
deadline?: bigint;
|
|
144
|
-
}
|
|
145
|
-
interface ShieldPreparation {
|
|
146
|
-
tokenAddress: Address;
|
|
147
|
-
outputs: readonly PaymentOutput[];
|
|
148
|
-
funding: FundingSource;
|
|
149
|
-
deadline?: bigint;
|
|
150
|
-
}
|
|
151
|
-
interface PreparedOutput {
|
|
152
|
-
note: Note;
|
|
153
|
-
commitment: Hex$1;
|
|
154
|
-
identity: Hex$1;
|
|
155
|
-
delivery: Delivery;
|
|
156
|
-
address: string;
|
|
157
|
-
change: boolean;
|
|
158
|
-
}
|
|
159
|
-
interface CreateCreditPreparation {
|
|
160
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
161
|
-
payload?: Uint8Array;
|
|
162
|
-
singleLimit?: bigint;
|
|
163
|
-
dailyLimit?: bigint;
|
|
164
|
-
monthlyLimit?: bigint;
|
|
165
|
-
tokenAddress: Address;
|
|
166
|
-
spender: string;
|
|
167
|
-
amount: bigint;
|
|
168
|
-
expiry: bigint;
|
|
169
|
-
funding?: FundingSource;
|
|
170
|
-
deadline?: bigint;
|
|
171
|
-
}
|
|
172
|
-
interface DrawCreditPreparation {
|
|
173
|
-
tokenAddress: Address;
|
|
174
|
-
credits: readonly {
|
|
175
|
-
credit: Hex$1;
|
|
176
|
-
amount: bigint;
|
|
177
|
-
payload?: Uint8Array;
|
|
178
|
-
}[];
|
|
179
|
-
deadline?: bigint;
|
|
180
|
-
}
|
|
181
|
-
interface TopUpCreditPreparation {
|
|
182
|
-
/** Version-specific application data. Omission uses built-in v1 with no data. */
|
|
183
|
-
payload?: Uint8Array;
|
|
184
|
-
/** Omission inherits the previous limit; zero disables it without clearing usage. */
|
|
185
|
-
singleLimit?: bigint;
|
|
186
|
-
dailyLimit?: bigint;
|
|
187
|
-
monthlyLimit?: bigint;
|
|
188
|
-
tokenAddress: Address;
|
|
189
|
-
credit: Hex$1;
|
|
190
|
-
additionalAmount: bigint;
|
|
191
|
-
expiry?: bigint;
|
|
192
|
-
funding?: FundingSource;
|
|
193
|
-
deadline?: bigint;
|
|
194
|
-
}
|
|
195
|
-
interface CancelCreditPreparation {
|
|
196
|
-
tokenAddress: Address;
|
|
197
|
-
credit: Hex$1;
|
|
198
|
-
deadline?: bigint;
|
|
199
|
-
}
|
|
200
|
-
interface PreparedCreditOutput {
|
|
201
|
-
state: CreditDeliveryState;
|
|
202
|
-
commitment: Hex$1;
|
|
203
|
-
deliveries: [Delivery, Delivery];
|
|
204
|
-
}
|
|
205
|
-
interface PreparedCreditInput extends CreditMembership {
|
|
206
|
-
commitment: Hex$1;
|
|
207
|
-
role: "owner" | "spender";
|
|
208
|
-
}
|
|
209
|
-
interface CreditPlan {
|
|
210
|
-
inputs: PreparedCreditInput[];
|
|
211
|
-
outputs: PreparedCreditOutput[];
|
|
212
|
-
deliveries: Delivery[];
|
|
213
|
-
creation?: CreateCreditParams;
|
|
214
|
-
draw?: CreditDrawParams;
|
|
215
|
-
cancel?: CancelCreditParams;
|
|
216
|
-
topUp?: TopUpCreditParams;
|
|
217
|
-
amounts?: bigint[];
|
|
218
|
-
}
|
|
219
|
-
interface OperationPlan {
|
|
220
|
-
version: 1;
|
|
221
|
-
id: string;
|
|
222
|
-
kind: "transfer" | "shield" | "create-credit" | "draw-credit" | "top-up-credit" | "cancel-credit";
|
|
223
|
-
context: TransactionContext;
|
|
224
|
-
scope: WalletScope;
|
|
225
|
-
preparedAt: CanonicalBlock;
|
|
226
|
-
deadline: bigint;
|
|
227
|
-
outputs: PreparedOutput[];
|
|
228
|
-
inputs: Array<NoteMembership & {
|
|
229
|
-
commitment: Hex$1;
|
|
230
|
-
}>;
|
|
231
|
-
funding: FundingInput;
|
|
232
|
-
fundingMode: "none" | "signature" | "caller";
|
|
233
|
-
params?: TransactRequestParams;
|
|
234
|
-
shieldParams?: ShieldParams;
|
|
235
|
-
shieldOutputs?: ShieldOutput[];
|
|
236
|
-
capacity?: number;
|
|
237
|
-
credit?: CreditPlan;
|
|
238
|
-
statement?: _invisi_labs_prover.ProofStatement;
|
|
239
|
-
}
|
|
240
|
-
type WalletSessionOptions = WalletSessionInfrastructure;
|
|
241
|
-
/** Shared runtime fields; public options separately enforce the custom registry requirement. */
|
|
242
|
-
interface WalletSessionInfrastructure {
|
|
243
|
-
gasBenchmarks?: readonly GasBenchmarkProfile[];
|
|
244
|
-
/** Optional ethers gas/funding signer; distinct from the Invisi wallet authority. */
|
|
245
|
-
signer?: Signer;
|
|
246
|
-
viewing?: Pick<ViewingCapability, "walletIdentity" | "decryptNote" | "decryptCredit">;
|
|
247
|
-
wallet: Wallet | PublicWallet;
|
|
248
|
-
protocol: Protocol;
|
|
249
|
-
namespace?: string;
|
|
250
|
-
store?: WalletStore;
|
|
251
|
-
chainReader?: ChainReader;
|
|
252
|
-
protocolRpc?: ProtocolDataProvider;
|
|
253
|
-
authorization?: WalletAuthorizationProvider;
|
|
254
|
-
prover?: Prover;
|
|
255
|
-
fundingSigner?: FundingSigner;
|
|
256
|
-
fundingVerifier?: FundingAuthorizationVerifier;
|
|
257
|
-
addressResolver?: ReceivingKeyLookup;
|
|
258
|
-
coinSelector?: CoinSelector;
|
|
259
|
-
transactionTTL?: bigint;
|
|
260
|
-
}
|
|
261
|
-
interface OperationRuntime {
|
|
262
|
-
options: Omit<WalletSessionOptions, "protocol"> & {
|
|
263
|
-
protocol: TokenProtocol;
|
|
264
|
-
};
|
|
265
|
-
scope: WalletScope;
|
|
266
|
-
store: WalletStore;
|
|
267
|
-
reader: ChainReader;
|
|
268
|
-
authorization: () => WalletAuthorizationProvider;
|
|
269
|
-
}
|
|
270
|
-
interface OperationAggregateMember extends AggregateMember {
|
|
271
|
-
context: TransactionContext;
|
|
272
|
-
request: TransactRequest;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export { type CancelCreditPreparation as C, type DrawCreditPreparation as D, type FundingAuthorizationVerifier as F, type GasReference as G, type OperationRuntime as O, type PaymentOutput as P, type ShieldPreparation as S, type TransactionProveOptions as T, type WalletSessionOptions as W, type OperationPlan as a, type OperationAggregateMember as b, type CreateCreditPreparation as c, type TopUpCreditPreparation as d, type TransferPreparation as e, type WalletSessionInfrastructure as f, type CoinSelector as g, type FundingSigner as h, type FundingSource as i, type FundingTypedData as j, type GasBenchmarkCircuit as k, type GasBenchmarkDeployment as l, type GasBenchmarkProfile as m, type GasBenchmarkSample as n, type GasBenchmarkShape as o, type TransactionExecution as p, defineGasBenchmarks as q };
|