veilix-sdk 0.0.10 → 0.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 +119 -145
- package/dist/VeilixSDK-CGbGpth9.d.cts +781 -0
- package/dist/VeilixSDK-D1hKisoi.d.ts +781 -0
- package/dist/circuits/paths.cjs +4 -4
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.d.cts +2 -2
- package/dist/circuits/paths.d.ts +2 -2
- package/dist/circuits/paths.js +4 -4
- package/dist/circuits/paths.js.map +1 -1
- package/dist/circuits/withdraw.wasm +0 -0
- package/dist/circuits/withdraw.zkey +0 -0
- package/dist/{constants-sO9UKB9l.d.cts → constants-C-u6nmCv.d.cts} +2 -2
- package/dist/{constants-sO9UKB9l.d.ts → constants-C-u6nmCv.d.ts} +2 -2
- package/dist/index.cjs +3207 -2494
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +3197 -2506
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +3190 -2496
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +4 -2
- package/dist/react/index.d.ts +4 -2
- package/dist/react/index.js +3187 -2494
- package/dist/react/index.js.map +1 -1
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/VeilixSDK-BmB790UK.d.ts +0 -386
- package/dist/VeilixSDK-DgXMu4lI.d.cts +0 -386
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
import { PublicKey, Keypair, Connection, TransactionInstruction, VersionedTransaction, Transaction } from '@solana/web3.js';
|
|
2
|
+
import { Buffer as Buffer$1 } from 'buffer';
|
|
3
|
+
import { MerkleTree } from 'fixed-merkle-tree';
|
|
4
|
+
import { OracleJob } from '@switchboard-xyz/common';
|
|
5
|
+
import { Program } from '@coral-xyz/anchor';
|
|
6
|
+
import { Wallet } from '@coral-xyz/anchor/dist/cjs/provider';
|
|
7
|
+
import { C as CircuitPaths } from './constants-C-u6nmCv.js';
|
|
8
|
+
|
|
9
|
+
type VeilixMerkleTree = MerkleTree;
|
|
10
|
+
/** Rebuild an asset tree from its leaves (commitments in index order). */
|
|
11
|
+
declare function buildMerkleTree(leaves: Array<bigint | string>): VeilixMerkleTree;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shielded (note-owning) keypair. Not a Solana keypair:
|
|
15
|
+
* privKey: random field element, pubKey = Poseidon(privKey)
|
|
16
|
+
* The private key is only needed to spend notes (it derives the nullifier inside the proof).
|
|
17
|
+
*/
|
|
18
|
+
declare class VeilixKeypair {
|
|
19
|
+
readonly privKey: bigint;
|
|
20
|
+
readonly pubKey: bigint;
|
|
21
|
+
private constructor();
|
|
22
|
+
static fromPrivateKey(privKey: bigint | string): VeilixKeypair;
|
|
23
|
+
static random(): VeilixKeypair;
|
|
24
|
+
/** Deterministic keypair from a wallet signature over a fixed message. */
|
|
25
|
+
static fromSignature(signature: Uint8Array): Promise<VeilixKeypair>;
|
|
26
|
+
sign(commitment: bigint, leafIndex: number): bigint;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Circuit encoding of a mint: 0 for SOL, first 31 bytes of the mint pubkey otherwise. */
|
|
30
|
+
declare function mintToField(mint: PublicKey | null): bigint;
|
|
31
|
+
/**
|
|
32
|
+
* A shielded note (UTXO).
|
|
33
|
+
* commitment = Poseidon(amount, pubKey, blinding, mint)
|
|
34
|
+
* nullifier = Poseidon(commitment, index, Poseidon(privKey, commitment, index))
|
|
35
|
+
* `index` is the leaf index in the asset tree, known once the note has been inserted.
|
|
36
|
+
* `mint` is `null` for SOL.
|
|
37
|
+
*/
|
|
38
|
+
declare class Utxo {
|
|
39
|
+
readonly amount: bigint;
|
|
40
|
+
readonly blinding: bigint;
|
|
41
|
+
readonly keypair: VeilixKeypair;
|
|
42
|
+
readonly mint: PublicKey | null;
|
|
43
|
+
index: number | null;
|
|
44
|
+
constructor({ amount, keypair, blinding, mint, index, }?: {
|
|
45
|
+
amount?: bigint | number | string;
|
|
46
|
+
keypair?: VeilixKeypair;
|
|
47
|
+
blinding?: bigint;
|
|
48
|
+
mint?: PublicKey | null;
|
|
49
|
+
index?: number | null;
|
|
50
|
+
});
|
|
51
|
+
/** Zero-amount note used to fill unused input/output slots. */
|
|
52
|
+
static zero(mint: PublicKey | null): Utxo;
|
|
53
|
+
commitment(): bigint;
|
|
54
|
+
/** Requires {@link index}; zero-amount padding inputs use index 0. */
|
|
55
|
+
nullifier(): bigint;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Matches `TransactionProof` in the program. */
|
|
59
|
+
type TransactionProof = {
|
|
60
|
+
proof: number[];
|
|
61
|
+
root: number[];
|
|
62
|
+
inputNullifiers: number[][];
|
|
63
|
+
outputCommitments: number[][];
|
|
64
|
+
};
|
|
65
|
+
/** Data bound to the proof through `extDataHash`; mirrors `ExtData` in the program. */
|
|
66
|
+
type ExtData = {
|
|
67
|
+
/** `null` for SOL. */
|
|
68
|
+
mint: PublicKey | null;
|
|
69
|
+
recipient: PublicKey;
|
|
70
|
+
relayer: PublicKey;
|
|
71
|
+
/** Positive for deposits, negative for withdrawals. */
|
|
72
|
+
extAmount: bigint;
|
|
73
|
+
fee: bigint;
|
|
74
|
+
encryptedOutput1: Uint8Array;
|
|
75
|
+
encryptedOutput2: Uint8Array;
|
|
76
|
+
};
|
|
77
|
+
type CircuitArtifactPaths = {
|
|
78
|
+
wasmPath: string;
|
|
79
|
+
zkeyPath: string;
|
|
80
|
+
};
|
|
81
|
+
type ProvedTransaction = {
|
|
82
|
+
proof: TransactionProof;
|
|
83
|
+
/** Padded to 2 inputs / 2 outputs; outputs carry their optimistic leaf index. */
|
|
84
|
+
inputs: Utxo[];
|
|
85
|
+
outputs: Utxo[];
|
|
86
|
+
/** Public signal values (decimal strings) in circuit order. */
|
|
87
|
+
publicSignals: string[];
|
|
88
|
+
};
|
|
89
|
+
/** sha256(borsh(ExtData)) with the first byte zeroed, as computed on-chain. */
|
|
90
|
+
declare function extDataHash(ext: ExtData): Promise<bigint>;
|
|
91
|
+
/**
|
|
92
|
+
* Build and prove a 2-in / 2-out transaction.
|
|
93
|
+
*
|
|
94
|
+
* Deposit: extAmount = +amount, fee = 0, recipient = relayer = depositor, zero-amount inputs.
|
|
95
|
+
* Withdraw: extAmount = -amount, recipient receives amount - fee, relayer = relayer rewardAccount.
|
|
96
|
+
*
|
|
97
|
+
* `tree` is required when spending notes; deposits only need a `root` from the
|
|
98
|
+
* on-chain root history.
|
|
99
|
+
*/
|
|
100
|
+
declare function proveTransaction({ tree, root, nextIndex, inputs, outputs, ext, circuit, }: {
|
|
101
|
+
tree?: VeilixMerkleTree;
|
|
102
|
+
root?: bigint;
|
|
103
|
+
/** Leaf index the first output will get (defaults to the tree size). */
|
|
104
|
+
nextIndex?: number;
|
|
105
|
+
inputs?: Utxo[];
|
|
106
|
+
outputs?: Utxo[];
|
|
107
|
+
ext: ExtData;
|
|
108
|
+
circuit: CircuitArtifactPaths;
|
|
109
|
+
}): Promise<ProvedTransaction>;
|
|
110
|
+
|
|
111
|
+
/** Prefix of secret notes for the UTXO pool. */
|
|
112
|
+
declare const NOTE_PREFIX = "vx2";
|
|
113
|
+
type ParsedNote = {
|
|
114
|
+
/** Base units (lamports / token smallest units), decimal string. */
|
|
115
|
+
amount: string;
|
|
116
|
+
/** Token mint, `null` for SOL. */
|
|
117
|
+
mint: string | null;
|
|
118
|
+
/** Poseidon commitment (decimal string); independent of the leaf index. */
|
|
119
|
+
commitment: string;
|
|
120
|
+
/** `0x`-prefixed 32-byte commitment (indexer format). */
|
|
121
|
+
commitmentHex: string;
|
|
122
|
+
privKey: string;
|
|
123
|
+
pubKey: string;
|
|
124
|
+
blinding: string;
|
|
125
|
+
};
|
|
126
|
+
/** Secret note: `vx2-<amountHex>-<privKeyHex>-<blindingHex>[-<mint>]`. */
|
|
127
|
+
declare function encodeNote(utxo: Utxo): string;
|
|
128
|
+
declare function isLegacyNote(note: string): boolean;
|
|
129
|
+
/** Note string → UTXO. The leaf index is unknown until looked up in the tree. */
|
|
130
|
+
declare function decodeNote(note: string): Utxo;
|
|
131
|
+
declare function parseSecretNote(note: string): ParsedNote;
|
|
132
|
+
/**
|
|
133
|
+
* `encryptedOutput` for the program: the note secret sealed with the wallet
|
|
134
|
+
* encryption key, so the owner can rediscover the note by scanning the tree.
|
|
135
|
+
* The mint is implied by the tree the output is appended to.
|
|
136
|
+
*/
|
|
137
|
+
declare function encryptNoteOutput(key: Uint8Array, utxo: Utxo): Uint8Array;
|
|
138
|
+
/** Returns the note if `encryptedOutput` was sealed with `key`, otherwise `null`. */
|
|
139
|
+
declare function decryptNoteOutput(key: Uint8Array, encryptedOutput: Uint8Array, mint: PublicKey | null, index: number): Utxo | null;
|
|
140
|
+
/** Truncate each note segment for display. */
|
|
141
|
+
declare function formatNoteForDisplay(note: string, segmentLen?: number): string;
|
|
142
|
+
|
|
143
|
+
type PreparedCircuitArtifacts = {
|
|
144
|
+
wasmPath: string;
|
|
145
|
+
zkeyPath: string;
|
|
146
|
+
/** Revokes the browser object URLs. `null` outside the browser. */
|
|
147
|
+
cleanup: (() => void) | null;
|
|
148
|
+
};
|
|
149
|
+
type GenerateDepositParamsResult = {
|
|
150
|
+
params: ParsedNote;
|
|
151
|
+
note: string;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Fetch and integrity-check the transaction circuit artifacts once so that
|
|
155
|
+
* several proofs can share them. Call `cleanup` after the last proof has settled.
|
|
156
|
+
*/
|
|
157
|
+
declare function prepareCircuitArtifacts(circuitWasmPath?: string, circuitZkeyPath?: string): Promise<PreparedCircuitArtifacts>;
|
|
158
|
+
|
|
159
|
+
type TreeAccountState = {
|
|
160
|
+
address: PublicKey;
|
|
161
|
+
/** `null` for SOL. */
|
|
162
|
+
mint: PublicKey | null;
|
|
163
|
+
nextIndex: number;
|
|
164
|
+
maxDepositAmount: bigint;
|
|
165
|
+
/** Current root (big-endian field element). */
|
|
166
|
+
root: bigint;
|
|
167
|
+
/** Root history accepted by the program (most recent first). */
|
|
168
|
+
roots: bigint[];
|
|
169
|
+
};
|
|
170
|
+
type PlatformFeeWallet = {
|
|
171
|
+
address: string;
|
|
172
|
+
/** Basis points of the withdrawn amount. */
|
|
173
|
+
feeSplit: number;
|
|
174
|
+
};
|
|
175
|
+
type BuildDepositTxParams = {
|
|
176
|
+
senderPublicKey: PublicKey | string;
|
|
177
|
+
/** Note from {@link generateDepositParams}. */
|
|
178
|
+
note: string;
|
|
179
|
+
/**
|
|
180
|
+
* Seal the note into the deposit's on-chain encrypted output with the wallet
|
|
181
|
+
* encryption key (see `getEncryptionKey`), so it can be recovered by scanning.
|
|
182
|
+
*/
|
|
183
|
+
onChainBackup?: boolean;
|
|
184
|
+
/** Priority fee in micro-lamports per compute unit. */
|
|
185
|
+
computeUnitPrice?: number;
|
|
186
|
+
computeUnitLimit?: number;
|
|
187
|
+
/** Shared, already verified circuit artifacts (see `prepareCircuitArtifacts`). */
|
|
188
|
+
circuitArtifacts?: PreparedCircuitArtifacts;
|
|
189
|
+
};
|
|
190
|
+
/** Body of the relayer `POST /relay` (also one item of indexer `POST /submit`). */
|
|
191
|
+
type RelayPayload = {
|
|
192
|
+
proof: string;
|
|
193
|
+
root: string;
|
|
194
|
+
inputNullifiers: [string, string];
|
|
195
|
+
outputCommitments: [string, string];
|
|
196
|
+
amount: string;
|
|
197
|
+
fee: string;
|
|
198
|
+
recipient: string;
|
|
199
|
+
relayer: string;
|
|
200
|
+
encryptedOutput1: string;
|
|
201
|
+
encryptedOutput2: string;
|
|
202
|
+
mint?: string;
|
|
203
|
+
};
|
|
204
|
+
type BuildRelayPayloadParams = {
|
|
205
|
+
proof: TransactionProof;
|
|
206
|
+
/** Withdrawn amount (base units), before fees. */
|
|
207
|
+
amount: bigint;
|
|
208
|
+
fee: bigint;
|
|
209
|
+
recipient: PublicKey | string;
|
|
210
|
+
/** Relayer `rewardAccount`. */
|
|
211
|
+
relayer: PublicKey | string;
|
|
212
|
+
encryptedOutput1: Uint8Array;
|
|
213
|
+
encryptedOutput2: Uint8Array;
|
|
214
|
+
mint?: PublicKey | string | null;
|
|
215
|
+
};
|
|
216
|
+
type RelayerJob = {
|
|
217
|
+
id: string;
|
|
218
|
+
status: "QUEUED" | "ACCEPTED" | "SENT" | "MINED" | "CONFIRMED" | "FAILED" | string;
|
|
219
|
+
txHash?: string;
|
|
220
|
+
failedReason?: string;
|
|
221
|
+
[key: string]: unknown;
|
|
222
|
+
};
|
|
223
|
+
/** Frontend wallet adapter or backend {@link Keypair}. */
|
|
224
|
+
type EncryptKeyWallet = Keypair | {
|
|
225
|
+
signMessage: (message: Uint8Array) => Promise<Uint8Array> | Uint8Array;
|
|
226
|
+
};
|
|
227
|
+
declare function encryptData(key: Uint8Array, plaintext: string): Buffer$1;
|
|
228
|
+
declare function decryptData(key: Uint8Array, combined: Uint8Array): string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Indexer asset selector: an asset label (`"SOL"`, `"VEILIX"`, ...), a mint
|
|
232
|
+
* address, or `{ mint }` / `{ asset }`. Defaults to SOL.
|
|
233
|
+
*/
|
|
234
|
+
type IndexerAsset = string | {
|
|
235
|
+
mint?: string | null;
|
|
236
|
+
asset?: string;
|
|
237
|
+
} | null;
|
|
238
|
+
|
|
239
|
+
type IndexedLeaf = {
|
|
240
|
+
index: number;
|
|
241
|
+
/** `0x`-prefixed 32-byte commitment. */
|
|
242
|
+
commitment: string;
|
|
243
|
+
/** `0x`-prefixed hex (may be `"0x"` when empty). Present when requested. */
|
|
244
|
+
encryptedOutput?: string;
|
|
245
|
+
};
|
|
246
|
+
type TreeState = {
|
|
247
|
+
asset: string;
|
|
248
|
+
mint: string | null;
|
|
249
|
+
address: string;
|
|
250
|
+
exists: boolean;
|
|
251
|
+
nextIndex: number;
|
|
252
|
+
root: string;
|
|
253
|
+
maxDepositAmountRaw: string;
|
|
254
|
+
maxDepositAmount: number;
|
|
255
|
+
decimals: number;
|
|
256
|
+
indexedLeafCount: number;
|
|
257
|
+
synced: boolean;
|
|
258
|
+
};
|
|
259
|
+
type SpentIn = {
|
|
260
|
+
kind: "Deposit" | "Withdraw";
|
|
261
|
+
signature: string;
|
|
262
|
+
asset?: string;
|
|
263
|
+
[key: string]: unknown;
|
|
264
|
+
};
|
|
265
|
+
type NullifierStatus = {
|
|
266
|
+
nullifier: string;
|
|
267
|
+
hexNullifier: string;
|
|
268
|
+
exists: boolean;
|
|
269
|
+
spentIn: SpentIn | null;
|
|
270
|
+
};
|
|
271
|
+
type CommitmentStatus = {
|
|
272
|
+
commitment: string;
|
|
273
|
+
hexCommitment: string;
|
|
274
|
+
asset: string;
|
|
275
|
+
exists: boolean;
|
|
276
|
+
valid: boolean;
|
|
277
|
+
index: number | null;
|
|
278
|
+
kind: "Deposit" | "Withdraw" | null;
|
|
279
|
+
signature: string | null;
|
|
280
|
+
};
|
|
281
|
+
type PoolTransaction = {
|
|
282
|
+
signature: string;
|
|
283
|
+
mint?: string | null;
|
|
284
|
+
amount?: string | number;
|
|
285
|
+
fee?: string | number;
|
|
286
|
+
recipient?: string;
|
|
287
|
+
signer?: string;
|
|
288
|
+
inputNullifiers: string[];
|
|
289
|
+
commitments: string[];
|
|
290
|
+
timestamp?: number | string;
|
|
291
|
+
[key: string]: unknown;
|
|
292
|
+
};
|
|
293
|
+
type TxStatus = {
|
|
294
|
+
asset: string;
|
|
295
|
+
commitment: string | null;
|
|
296
|
+
normalizedCommitment: string | null;
|
|
297
|
+
nullifier: string | null;
|
|
298
|
+
normalizedNullifier: string | null;
|
|
299
|
+
isDeposited: boolean;
|
|
300
|
+
leaf: {
|
|
301
|
+
index: number;
|
|
302
|
+
commitment: string;
|
|
303
|
+
kind?: string;
|
|
304
|
+
signature?: string;
|
|
305
|
+
[key: string]: unknown;
|
|
306
|
+
} | null;
|
|
307
|
+
isSpent: boolean;
|
|
308
|
+
spendingTransaction: PoolTransaction | null;
|
|
309
|
+
};
|
|
310
|
+
type SubmissionItem = {
|
|
311
|
+
index: number;
|
|
312
|
+
asset: string | null;
|
|
313
|
+
mint: string | null;
|
|
314
|
+
recipient: string;
|
|
315
|
+
amount: string;
|
|
316
|
+
fee: string;
|
|
317
|
+
inputNullifiers: string[];
|
|
318
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
319
|
+
relayerUrl: string | null;
|
|
320
|
+
relayer: string | null;
|
|
321
|
+
relayerJobId: string | null;
|
|
322
|
+
withdrawTxId: string | null;
|
|
323
|
+
error: string | null;
|
|
324
|
+
attempts: number;
|
|
325
|
+
};
|
|
326
|
+
type Submission = {
|
|
327
|
+
success: boolean;
|
|
328
|
+
partialSuccess: boolean;
|
|
329
|
+
submissionId: string;
|
|
330
|
+
requestId: string | null;
|
|
331
|
+
status: "queued" | "processing" | "completed" | "partial" | "failed";
|
|
332
|
+
asset: string;
|
|
333
|
+
network: string;
|
|
334
|
+
recipient: string;
|
|
335
|
+
proofCount: number;
|
|
336
|
+
items: SubmissionItem[];
|
|
337
|
+
message?: string;
|
|
338
|
+
};
|
|
339
|
+
type FetchWalletBalanceOptions = {
|
|
340
|
+
includeDeposits?: boolean;
|
|
341
|
+
indexerAsset?: IndexerAsset;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
type NoteStatus = {
|
|
345
|
+
note: string;
|
|
346
|
+
/** Base units, decimal string. */
|
|
347
|
+
amount: string;
|
|
348
|
+
/** `null` for SOL. */
|
|
349
|
+
mint: string | null;
|
|
350
|
+
/** Indexer asset of the note's tree. */
|
|
351
|
+
asset: string;
|
|
352
|
+
commitment: string;
|
|
353
|
+
/** Inserted in the tree (indexed). */
|
|
354
|
+
deposited: boolean;
|
|
355
|
+
index: number | null;
|
|
356
|
+
/** Known once the note is in the tree. */
|
|
357
|
+
nullifier: string | null;
|
|
358
|
+
spent: boolean;
|
|
359
|
+
spentIn: SpentIn | null;
|
|
360
|
+
/** Deposit / withdraw signature that inserted the note. */
|
|
361
|
+
signature: string | null;
|
|
362
|
+
};
|
|
363
|
+
type ScanOwnedNotesOptions = {
|
|
364
|
+
/** Tree mints to scan (`null` = SOL). Defaults to SOL and every configured token. */
|
|
365
|
+
mints?: Array<string | null>;
|
|
366
|
+
/** Include spent notes (default `false`). */
|
|
367
|
+
includeSpent?: boolean;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
type Network = "mainnet" | "devnet";
|
|
371
|
+
declare const MAINNET_TOKEN_MINTS: {
|
|
372
|
+
readonly Veilix: "GAFN64LvtCBoc5BHncVn3JEJGpq42rUzQjPmvMK2UhZH";
|
|
373
|
+
readonly Bitcoin: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh";
|
|
374
|
+
readonly Ethereum: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs";
|
|
375
|
+
readonly USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
376
|
+
};
|
|
377
|
+
type TokenSymbol = keyof typeof MAINNET_TOKEN_MINTS;
|
|
378
|
+
declare const TOKEN_DECIMALS: {
|
|
379
|
+
readonly Solana: 9;
|
|
380
|
+
readonly Veilix: 9;
|
|
381
|
+
readonly Ethereum: 8;
|
|
382
|
+
readonly Bitcoin: 8;
|
|
383
|
+
readonly USDC: 6;
|
|
384
|
+
};
|
|
385
|
+
type TokenDecimalsSymbol = keyof typeof TOKEN_DECIMALS;
|
|
386
|
+
|
|
387
|
+
type Relayer = {
|
|
388
|
+
isValid: true;
|
|
389
|
+
label: string;
|
|
390
|
+
url: string;
|
|
391
|
+
key: number;
|
|
392
|
+
value: string;
|
|
393
|
+
fee: unknown;
|
|
394
|
+
recentActivities: unknown;
|
|
395
|
+
userPubkey: unknown;
|
|
396
|
+
workers: unknown;
|
|
397
|
+
totalFeeEarningsSol: unknown;
|
|
398
|
+
totalWithdrawCount: unknown;
|
|
399
|
+
stakedAmount: unknown;
|
|
400
|
+
volume24hSol: unknown;
|
|
401
|
+
volume7dSol: unknown;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
interface VeilixSdkInitOptions {
|
|
405
|
+
/** Wallet for Anchor provider transactions. */
|
|
406
|
+
wallet: Wallet;
|
|
407
|
+
/**
|
|
408
|
+
* Solana JSON-RPC endpoint (Node/scripts). Omit when passing {@link connection}
|
|
409
|
+
* from `@solana/wallet-adapter-react` (`useConnection()`).
|
|
410
|
+
*/
|
|
411
|
+
rpcEndpoint?: string;
|
|
412
|
+
/** Existing connection (e.g. `useConnection()` in React). */
|
|
413
|
+
connection?: Connection;
|
|
414
|
+
/**
|
|
415
|
+
* Cluster override when the RPC URL does not contain `devnet` / `mainnet` hints
|
|
416
|
+
* (common with private RPC providers).
|
|
417
|
+
*/
|
|
418
|
+
network: Network;
|
|
419
|
+
/**
|
|
420
|
+
* Base URL/path for withdraw circuit artifacts in the browser.
|
|
421
|
+
* Defaults to `/node_modules/<pkg>/dist/circuits/` on localhost and the
|
|
422
|
+
* pinned, SHA-256-verified jsDelivr CDN in production (domain-independent).
|
|
423
|
+
* Set this to self-host instead, e.g. `"/circuits/"` (verified, with CDN fallback)
|
|
424
|
+
* or `"https://cdn.example.com/veilix/circuits/"`.
|
|
425
|
+
*/
|
|
426
|
+
circuitPathsBase?: string;
|
|
427
|
+
/** Indexer base URL override (defaults to the Veilix indexer of {@link network}). */
|
|
428
|
+
indexerUrl?: string;
|
|
429
|
+
/** Address-risk API base URL override. */
|
|
430
|
+
riskApiUrl?: string;
|
|
431
|
+
}
|
|
432
|
+
interface VeilixSdkRuntimeConfig {
|
|
433
|
+
rpcEndpoint: string;
|
|
434
|
+
/** Cluster inferred from {@link rpcEndpoint}. */
|
|
435
|
+
network: Network;
|
|
436
|
+
programId: string;
|
|
437
|
+
indexerUrl: string;
|
|
438
|
+
riskApiUrl: string;
|
|
439
|
+
/** Active relayers for {@link network}, loaded at SDK initialization. */
|
|
440
|
+
relayers: Relayer[];
|
|
441
|
+
connection: Connection;
|
|
442
|
+
wallet: Wallet;
|
|
443
|
+
program: Program;
|
|
444
|
+
/** Set by {@link VeilixSDK.getEncryptionKey}; required for on-chain note backup. */
|
|
445
|
+
encryptKey?: Uint8Array;
|
|
446
|
+
/** Resolved withdraw circuit wasm/zkey URLs for browser proof generation. */
|
|
447
|
+
circuitPaths?: CircuitPaths;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
type WithdrawParams = {
|
|
451
|
+
/** Secret note to spend. */
|
|
452
|
+
note: string;
|
|
453
|
+
/** Withdrawal recipient public key. */
|
|
454
|
+
recipient: PublicKey | string;
|
|
455
|
+
/**
|
|
456
|
+
* Amount to withdraw in base units (before fees). Defaults to the full note.
|
|
457
|
+
* A partial withdrawal returns the rest as {@link WithdrawResult.changeNote}.
|
|
458
|
+
*/
|
|
459
|
+
amount?: bigint | number | string;
|
|
460
|
+
/** Use this relayer instead of a random / indexed one. */
|
|
461
|
+
relayerUrl?: string;
|
|
462
|
+
/** Skip the recipient risk check (already done by the caller). */
|
|
463
|
+
skipRiskCheck?: boolean;
|
|
464
|
+
};
|
|
465
|
+
type WithdrawStatus = "success" | "failed";
|
|
466
|
+
type WithdrawResult = {
|
|
467
|
+
txHash: string;
|
|
468
|
+
status: WithdrawStatus;
|
|
469
|
+
/** Relayer failure reason when `status` is `"failed"`. */
|
|
470
|
+
error?: string;
|
|
471
|
+
/** Remaining balance of a partial withdrawal (save it like any other note). */
|
|
472
|
+
changeNote: string | null;
|
|
473
|
+
amount: string;
|
|
474
|
+
fee: string;
|
|
475
|
+
};
|
|
476
|
+
type WithdrawRelayBundle = {
|
|
477
|
+
payload: RelayPayload;
|
|
478
|
+
relayerUrl: string;
|
|
479
|
+
amount: bigint;
|
|
480
|
+
fee: bigint;
|
|
481
|
+
changeNote: string | null;
|
|
482
|
+
/** Input nullifiers (`0x` hex) spent by this withdrawal. */
|
|
483
|
+
nullifiers: string[];
|
|
484
|
+
};
|
|
485
|
+
type BuildWithdrawPayloadOptions = {
|
|
486
|
+
relayerIdx?: number;
|
|
487
|
+
circuitArtifacts?: PreparedCircuitArtifacts;
|
|
488
|
+
/** Reuse a tree already built for this asset (several withdrawals at once). */
|
|
489
|
+
tree?: VeilixMerkleTree;
|
|
490
|
+
platformWallets?: PlatformFeeWallet[];
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
type QuoteRelayer = {
|
|
494
|
+
url: string;
|
|
495
|
+
/** Pubkey to put in the proof's `relayer` field. */
|
|
496
|
+
rewardAccount: string;
|
|
497
|
+
userPubkey: string | null;
|
|
498
|
+
network: string | null;
|
|
499
|
+
currentQueue: number;
|
|
500
|
+
};
|
|
501
|
+
type QuoteTransaction = {
|
|
502
|
+
kind: "withdraw";
|
|
503
|
+
programId: string;
|
|
504
|
+
instruction: "withdraw" | "tokenWithdraw";
|
|
505
|
+
unsigned: boolean;
|
|
506
|
+
};
|
|
507
|
+
/** Fee quote for one withdrawal. `*Raw` fields are base-unit decimal strings. */
|
|
508
|
+
type Quote = {
|
|
509
|
+
asset: string;
|
|
510
|
+
mint: string | null;
|
|
511
|
+
decimals: number;
|
|
512
|
+
network: string | null;
|
|
513
|
+
recipient: string | null;
|
|
514
|
+
amount: string;
|
|
515
|
+
amountRaw: string;
|
|
516
|
+
fee: string;
|
|
517
|
+
feeRaw: string;
|
|
518
|
+
relayerFee: string;
|
|
519
|
+
relayerFeeRaw: string;
|
|
520
|
+
platformFee: string;
|
|
521
|
+
platformFeeRaw: string;
|
|
522
|
+
recipientAmount: string;
|
|
523
|
+
recipientAmountRaw: string;
|
|
524
|
+
relayerFeeBps: number;
|
|
525
|
+
platformFeeBps: number;
|
|
526
|
+
etaSeconds: number;
|
|
527
|
+
quotedAt: string;
|
|
528
|
+
expiresAt: string;
|
|
529
|
+
relayer: QuoteRelayer;
|
|
530
|
+
tree: {
|
|
531
|
+
address: string;
|
|
532
|
+
nextIndex: number;
|
|
533
|
+
root: string;
|
|
534
|
+
};
|
|
535
|
+
transaction: QuoteTransaction;
|
|
536
|
+
};
|
|
537
|
+
type GetQuoteResponse = {
|
|
538
|
+
success: boolean;
|
|
539
|
+
quote: Quote;
|
|
540
|
+
};
|
|
541
|
+
type GetQuoteParams = {
|
|
542
|
+
/** Human-readable amount (e.g. `"1.5"`). Ignored when {@link amountRaw} is set. */
|
|
543
|
+
amount?: number | string;
|
|
544
|
+
/** Amount in base units (lamports / token smallest units). */
|
|
545
|
+
amountRaw?: number | string | bigint;
|
|
546
|
+
recipient?: PublicKey | string;
|
|
547
|
+
/** Indexer asset label or mint (default `SOL`). */
|
|
548
|
+
asset?: IndexerAsset;
|
|
549
|
+
/** Cluster for the quote (default: active SDK network). */
|
|
550
|
+
network?: Network;
|
|
551
|
+
/** Quote a specific relayer. */
|
|
552
|
+
relayerUrl?: string;
|
|
553
|
+
};
|
|
554
|
+
/** Fetch a withdraw quote (relayer + platform fees) from the indexer. */
|
|
555
|
+
declare function getQuote(params: GetQuoteParams): Promise<GetQuoteResponse>;
|
|
556
|
+
|
|
557
|
+
type ResolvedNoteAsset = {
|
|
558
|
+
key: string;
|
|
559
|
+
tokenName: TokenDecimalsSymbol;
|
|
560
|
+
unit: string;
|
|
561
|
+
multiplier: bigint;
|
|
562
|
+
/** `null` for SOL. */
|
|
563
|
+
mint: string | null;
|
|
564
|
+
decimals: number;
|
|
565
|
+
/** Indexer `asset` parameter for this tree. */
|
|
566
|
+
indexerAsset: string;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
type VeilixTransferItem = {
|
|
570
|
+
/** Token mint (wrapped SOL mint for SOL). */
|
|
571
|
+
mint: PublicKey;
|
|
572
|
+
/** Human-readable token amount (e.g. `"1.5"` SOL). */
|
|
573
|
+
amount: string;
|
|
574
|
+
recipient: PublicKey;
|
|
575
|
+
};
|
|
576
|
+
type VeilixTransferDepositFailure = {
|
|
577
|
+
amount: string;
|
|
578
|
+
mint: string;
|
|
579
|
+
recipient: string;
|
|
580
|
+
error?: string;
|
|
581
|
+
};
|
|
582
|
+
type VeilixTransferWithdrawFailure = {
|
|
583
|
+
/** Deposited note that was not withdrawn; the funds stay spendable with it. */
|
|
584
|
+
note: string;
|
|
585
|
+
recipient: string;
|
|
586
|
+
error?: string;
|
|
587
|
+
};
|
|
588
|
+
type VeilixTransferResult = {
|
|
589
|
+
error: boolean;
|
|
590
|
+
depositFailed: VeilixTransferDepositFailure[];
|
|
591
|
+
withdrawFailed: VeilixTransferWithdrawFailure[];
|
|
592
|
+
/** Deposit transaction signatures. */
|
|
593
|
+
depositSuccess: string[];
|
|
594
|
+
/** Withdraw transaction signatures. */
|
|
595
|
+
withdrawSuccess: string[];
|
|
596
|
+
/** Every note created by this transfer. */
|
|
597
|
+
notes: string[];
|
|
598
|
+
};
|
|
599
|
+
type VeilixTransferOptions = {
|
|
600
|
+
/** When true, all withdraws use the same randomly selected relayer. */
|
|
601
|
+
uniqueRelayer?: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Seal each note into its deposit's encrypted output (requires
|
|
604
|
+
* `getEncryptionKey`). Defaults to `true` when an encryption key is set.
|
|
605
|
+
*/
|
|
606
|
+
onChainBackup?: boolean;
|
|
607
|
+
/** Download the notes as CSV before sending the deposits (default `true`). */
|
|
608
|
+
downloadNotes?: boolean;
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Veilix SDK client. Create one instance per configuration (network, RPC, wallet).
|
|
613
|
+
*
|
|
614
|
+
* @example
|
|
615
|
+
* ```ts
|
|
616
|
+
* import { VeilixSDK } from "veilix-sdk";
|
|
617
|
+
* const sdk = await VeilixSDK.create({ connection, wallet, network: "devnet" });
|
|
618
|
+
* await sdk.getEncryptionKey(wallet);
|
|
619
|
+
* const { note } = sdk.generateDepositParams(1_500_000_000n, null); // 1.5 SOL
|
|
620
|
+
* const tx = await sdk.buildDepositTx({ senderPublicKey: wallet.publicKey, note, onChainBackup: true });
|
|
621
|
+
* // sign + send `tx`, then later:
|
|
622
|
+
* const { txHash } = await sdk.withdraw({ note, recipient });
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
625
|
+
declare class VeilixSDK {
|
|
626
|
+
static readonly VERSION: string;
|
|
627
|
+
readonly config: VeilixSdkRuntimeConfig;
|
|
628
|
+
private constructor();
|
|
629
|
+
/** Create an SDK instance (loads relayers for the network). */
|
|
630
|
+
static create(options: VeilixSdkInitOptions): Promise<VeilixSDK>;
|
|
631
|
+
private run;
|
|
632
|
+
private runAsync;
|
|
633
|
+
getConfig(): VeilixSdkRuntimeConfig;
|
|
634
|
+
getRpcEndpoint(): string;
|
|
635
|
+
getNetwork(): Network;
|
|
636
|
+
getProgramIdString(): string;
|
|
637
|
+
/** Encryption key derived by {@link getEncryptionKey}; undefined until set. */
|
|
638
|
+
get encryptKey(): Uint8Array | undefined;
|
|
639
|
+
/** Relayers loaded at initialization; use {@link fetchRelayers} to refresh. */
|
|
640
|
+
get relayers(): Relayer[];
|
|
641
|
+
getIndexerUrl(): string;
|
|
642
|
+
getRiskApiUrl(): string;
|
|
643
|
+
getTokenMints(): {
|
|
644
|
+
Solana: string;
|
|
645
|
+
Veilix: "GAFN64LvtCBoc5BHncVn3JEJGpq42rUzQjPmvMK2UhZH";
|
|
646
|
+
Bitcoin: "" | "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh";
|
|
647
|
+
Ethereum: "" | "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs";
|
|
648
|
+
USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" | "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU";
|
|
649
|
+
};
|
|
650
|
+
getVeilixTokenMint(): string;
|
|
651
|
+
getTokenMint(symbol: TokenSymbol): string;
|
|
652
|
+
getTokenDecimals(symbol: TokenDecimalsSymbol): number;
|
|
653
|
+
resolveCircuitPaths(base?: string): Promise<CircuitPaths>;
|
|
654
|
+
getRangeRiskScoreJob(address: string): OracleJob;
|
|
655
|
+
getOracleQuote(payer: Keypair | PublicKey, addressToCheck: string): Promise<{
|
|
656
|
+
queueAccount: PublicKey;
|
|
657
|
+
sigVerifyIx: TransactionInstruction;
|
|
658
|
+
}>;
|
|
659
|
+
getProgramId(): PublicKey;
|
|
660
|
+
/** Asset tree PDA (`null` = SOL). */
|
|
661
|
+
getTreePDA(mint?: PublicKey | string | null): [PublicKey, number];
|
|
662
|
+
getTreasuryPDA(): [PublicKey, number];
|
|
663
|
+
getNullifierPDA(nullifier: bigint | number | string | Uint8Array | number[]): [PublicKey, number];
|
|
664
|
+
getNetworkStatePDA(): [PublicKey, number];
|
|
665
|
+
getNotesPDA(user: PublicKey | string): [PublicKey, number];
|
|
666
|
+
/** On-chain tree state (root, next leaf index, deposit limit); `null` if missing. */
|
|
667
|
+
fetchTreeAccount(mint?: PublicKey | string | null): Promise<TreeAccountState | null>;
|
|
668
|
+
/** Total platform fee in percent, e.g. `"0.3"`. */
|
|
669
|
+
fetchPlatformFee(): Promise<string>;
|
|
670
|
+
fetchPlatformFeeWallets(): Promise<PlatformFeeWallet[]>;
|
|
671
|
+
/** Withdraw fee as enforced on-chain for `amount` base units. */
|
|
672
|
+
computeWithdrawFee(amount: bigint, relayerFeePercent: number | string, platformWallets: PlatformFeeWallet[]): {
|
|
673
|
+
fee: bigint;
|
|
674
|
+
relayerFee: bigint;
|
|
675
|
+
platformFee: bigint;
|
|
676
|
+
};
|
|
677
|
+
/** New note for `amount` base units of `mint` (`null` = SOL). */
|
|
678
|
+
generateDepositParams(amount: bigint | number | string, mint?: string | null): GenerateDepositParamsResult;
|
|
679
|
+
/**
|
|
680
|
+
* Proves and builds the unsigned deposit transaction for `note`
|
|
681
|
+
* (sign with the sender wallet and send).
|
|
682
|
+
*/
|
|
683
|
+
buildDepositTx(params: BuildDepositTxParams): Promise<VersionedTransaction>;
|
|
684
|
+
/** Transaction storing encrypted notes in the wallet's `notes_v2` backup account. */
|
|
685
|
+
buildBackupNotesTx(senderPublicKey: PublicKey | string, notes: string[]): Promise<Transaction>;
|
|
686
|
+
/**
|
|
687
|
+
* Withdraw a note to `recipient` through a relayer (random, or `relayerIdx`
|
|
688
|
+
* into {@link relayers}). Fees are deducted from the withdrawn amount.
|
|
689
|
+
*/
|
|
690
|
+
withdraw(params: WithdrawParams, relayerIdx?: number): Promise<WithdrawResult>;
|
|
691
|
+
/** Prove a withdrawal without submitting it (see {@link submitWithdrawPayload}). */
|
|
692
|
+
buildWithdrawPayload(params: WithdrawParams, options?: BuildWithdrawPayloadOptions): Promise<WithdrawRelayBundle>;
|
|
693
|
+
submitWithdrawPayload(bundle: WithdrawRelayBundle): Promise<WithdrawResult>;
|
|
694
|
+
/**
|
|
695
|
+
* Private transfer: deposit one note per item, then withdraw each note in full
|
|
696
|
+
* to its recipient through the indexer submission queue.
|
|
697
|
+
*/
|
|
698
|
+
veilixTransfer(items: VeilixTransferItem[], options?: VeilixTransferOptions): Promise<VeilixTransferResult>;
|
|
699
|
+
/** Validate a withdraw recipient against the risk API. */
|
|
700
|
+
assertWithdrawRecipientAllowed(address: string): Promise<void>;
|
|
701
|
+
/** Fetch a withdraw quote from the indexer. */
|
|
702
|
+
getQuote(params: GetQuoteParams): Promise<GetQuoteResponse>;
|
|
703
|
+
parseSecretNote(note: string): ParsedNote;
|
|
704
|
+
/** `true` for notes of the retired fixed-denomination pools. */
|
|
705
|
+
isLegacyNote(note: string): boolean;
|
|
706
|
+
formatNoteForDisplay(note: string, segmentLen?: number): string;
|
|
707
|
+
/** Asset (token, decimals, indexer asset) of a note mint (`null` = SOL). */
|
|
708
|
+
resolveNoteAsset(mint?: string | null): ResolvedNoteAsset;
|
|
709
|
+
/** Deposit / spent status of a note. */
|
|
710
|
+
getNoteStatus(note: string): Promise<NoteStatus>;
|
|
711
|
+
getNotesStatus(notes: string[]): Promise<NoteStatus[]>;
|
|
712
|
+
/**
|
|
713
|
+
* Recover notes sealed with the wallet encryption key (deposits with
|
|
714
|
+
* `onChainBackup` and change notes). Requires {@link getEncryptionKey}.
|
|
715
|
+
*/
|
|
716
|
+
scanOwnedNotes(options?: ScanOwnedNotesOptions): Promise<NoteStatus[]>;
|
|
717
|
+
fetchCommitments(indexerAsset: IndexerAsset, options?: {
|
|
718
|
+
fromIndex?: number;
|
|
719
|
+
includeEncrypted?: boolean;
|
|
720
|
+
}): Promise<IndexedLeaf[]>;
|
|
721
|
+
fetchTreeState(indexerAsset: IndexerAsset): Promise<TreeState>;
|
|
722
|
+
validateNullifier(nullifier: string | bigint): Promise<NullifierStatus>;
|
|
723
|
+
validateNullifiers(nullifiers: Array<string | bigint>): Promise<NullifierStatus[]>;
|
|
724
|
+
validateCommitment(commitment: string | bigint, indexerAsset: IndexerAsset): Promise<CommitmentStatus>;
|
|
725
|
+
fetchTxStatus(params: {
|
|
726
|
+
commitment?: string | bigint;
|
|
727
|
+
nullifier?: string | bigint;
|
|
728
|
+
indexerAsset?: IndexerAsset;
|
|
729
|
+
}): Promise<TxStatus>;
|
|
730
|
+
fetchDepositCountByCommitment(commitment: string | bigint, indexerAsset: IndexerAsset): Promise<{
|
|
731
|
+
index: number | null;
|
|
732
|
+
leafCountAfterMine: number;
|
|
733
|
+
depositCountAfterMine: number;
|
|
734
|
+
}>;
|
|
735
|
+
fetchWalletBalance(wallet: string, options?: FetchWalletBalanceOptions): Promise<{
|
|
736
|
+
wallet: string;
|
|
737
|
+
asset: string;
|
|
738
|
+
totalDeposited: string | number;
|
|
739
|
+
totalDeposits: number;
|
|
740
|
+
deposits: PoolTransaction[];
|
|
741
|
+
}>;
|
|
742
|
+
/** Re-fetch relayers from the indexer and update {@link config.relayers}. */
|
|
743
|
+
fetchRelayers(): Promise<Relayer[]>;
|
|
744
|
+
fetchLatestTransactions(type?: "Deposit" | "Withdraw", indexerAsset?: IndexerAsset): Promise<PoolTransaction[]>;
|
|
745
|
+
fetchTxCounts(type?: "Deposit" | "Withdraw", indexerAsset?: IndexerAsset): Promise<{
|
|
746
|
+
count: number;
|
|
747
|
+
amount: string | number;
|
|
748
|
+
}>;
|
|
749
|
+
fetchPoolActivity(): Promise<{
|
|
750
|
+
data: unknown[];
|
|
751
|
+
updatedAt: string;
|
|
752
|
+
}>;
|
|
753
|
+
fetchSubmission(submissionId: string): Promise<Submission>;
|
|
754
|
+
normalizePubkeyString(value: unknown): string;
|
|
755
|
+
buildRelayPayload(params: BuildRelayPayloadParams): RelayPayload;
|
|
756
|
+
submitToRelayer(relayerUrl: string, payload: RelayPayload): Promise<{
|
|
757
|
+
id: string;
|
|
758
|
+
}>;
|
|
759
|
+
pollRelayerJob(relayerUrl: string, jobId: string, maxWaitMs?: number): Promise<RelayerJob>;
|
|
760
|
+
/**
|
|
761
|
+
* Derives the note encryption key from a wallet signature and stores it on
|
|
762
|
+
* {@link config.encryptKey}. Required for `onChainBackup`, change-note
|
|
763
|
+
* recovery and {@link scanOwnedNotes}.
|
|
764
|
+
*
|
|
765
|
+
* Accepts a frontend wallet adapter (`signMessage`) or a backend {@link Keypair}.
|
|
766
|
+
*/
|
|
767
|
+
getEncryptionKey(wallet: EncryptKeyWallet): Promise<Uint8Array>;
|
|
768
|
+
encryptData(key: Uint8Array, plaintext: string): Buffer<ArrayBufferLike>;
|
|
769
|
+
decryptData(key: Uint8Array, combined: Uint8Array): string;
|
|
770
|
+
parseAmountToBaseUnits(amount: string | number, decimals: number): bigint;
|
|
771
|
+
formatBaseUnits(value: bigint | string | number, decimals: number): string;
|
|
772
|
+
convertProofToBytes(proof: unknown): Promise<number[]>;
|
|
773
|
+
to32ByteBuffer(value: bigint | number | string): Uint8Array<ArrayBufferLike>;
|
|
774
|
+
toFixedHex(value: bigint | number | string, length?: number): string;
|
|
775
|
+
toFieldElementHex(value: bigint | number | string): string;
|
|
776
|
+
appendIndexerAsset(params: URLSearchParams, indexerAsset?: IndexerAsset): void;
|
|
777
|
+
/** Program ID for a cluster without an SDK instance. */
|
|
778
|
+
static getProgramIdForNetwork(network: Network): string;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export { decodeNote as $, VeilixSDK as A, type BuildDepositTxParams as B, type CommitmentStatus as C, type VeilixSdkInitOptions as D, type EncryptKeyWallet as E, type FetchWalletBalanceOptions as F, type GenerateDepositParamsResult as G, type VeilixSdkRuntimeConfig as H, type IndexedLeaf as I, type VeilixTransferDepositFailure as J, type VeilixTransferItem as K, type VeilixTransferOptions as L, type VeilixTransferResult as M, NOTE_PREFIX as N, type VeilixTransferWithdrawFailure as O, type ParsedNote as P, type Quote as Q, type RelayPayload as R, type ScanOwnedNotesOptions as S, type TokenDecimalsSymbol as T, Utxo as U, VeilixKeypair as V, type WithdrawParams as W, type WithdrawRelayBundle as X, type WithdrawResult as Y, type WithdrawStatus as Z, buildMerkleTree as _, type BuildRelayPayloadParams as a, decryptData as a0, decryptNoteOutput as a1, encodeNote as a2, encryptData as a3, encryptNoteOutput as a4, extDataHash as a5, formatNoteForDisplay as a6, getQuote as a7, isLegacyNote as a8, mintToField as a9, parseSecretNote as aa, prepareCircuitArtifacts as ab, proveTransaction as ac, type BuildWithdrawPayloadOptions as b, type ExtData as c, type GetQuoteParams as d, type GetQuoteResponse as e, type IndexerAsset as f, type Network as g, type NoteStatus as h, type NullifierStatus as i, type PlatformFeeWallet as j, type PoolTransaction as k, type PreparedCircuitArtifacts as l, type ProvedTransaction as m, type QuoteRelayer as n, type QuoteTransaction as o, type Relayer as p, type RelayerJob as q, type ResolvedNoteAsset as r, type Submission as s, type SubmissionItem as t, type TokenSymbol as u, type TransactionProof as v, type TreeAccountState as w, type TreeState as x, type TxStatus as y, type VeilixMerkleTree as z };
|