@triton-one/yellowstone-grpc 5.0.1-beta → 5.0.1-beta-2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triton-one/yellowstone-grpc",
3
- "version": "5.0.1-beta",
3
+ "version": "5.0.1-beta-2",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Triton One",
6
6
  "description": "Yellowstone gRPC Geyser Node.js Client",
@@ -1,616 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- export function encode_tx(data: Uint8Array, encoding: WasmUiTransactionEncoding, max_supported_transaction_version: number | null | undefined, show_rewards: boolean): string;
4
- export function decode_tx_error(err: Uint8Array): string;
5
- export enum WasmUiTransactionEncoding {
6
- Binary = 0,
7
- Base64 = 1,
8
- Base58 = 2,
9
- Json = 3,
10
- JsonParsed = 4,
11
- }
12
- /**
13
- * Authenticated encryption nonce and ciphertext
14
- */
15
- export class AeCiphertext {
16
- private constructor();
17
- free(): void;
18
- }
19
- export class AeKey {
20
- private constructor();
21
- free(): void;
22
- /**
23
- * Generates a random authenticated encryption key.
24
- *
25
- * This function is randomized. It internally samples a 128-bit key using `OsRng`.
26
- */
27
- static newRand(): AeKey;
28
- /**
29
- * Encrypts an amount under the authenticated encryption key.
30
- */
31
- encrypt(amount: bigint): AeCiphertext;
32
- decrypt(ciphertext: AeCiphertext): bigint | undefined;
33
- }
34
- /**
35
- * Batched grouped ciphertext validity proof with two handles.
36
- *
37
- * A batched grouped ciphertext validity proof certifies the validity of two instances of a
38
- * standard ciphertext validity proof. An instance of a standard validity proof consists of one
39
- * ciphertext and two decryption handles: `(commitment, first_handle, second_handle)`. An
40
- * instance of a batched ciphertext validity proof is a pair `(commitment_0,
41
- * first_handle_0, second_handle_0)` and `(commitment_1, first_handle_1,
42
- * second_handle_1)`. The proof certifies the analogous decryptable properties for each one of
43
- * these pairs of commitment and decryption handles.
44
- */
45
- export class BatchedGroupedCiphertext2HandlesValidityProof {
46
- private constructor();
47
- free(): void;
48
- }
49
- export class BatchedGroupedCiphertext2HandlesValidityProofContext {
50
- private constructor();
51
- free(): void;
52
- toBytes(): Uint8Array;
53
- static fromBytes(bytes: Uint8Array): BatchedGroupedCiphertext2HandlesValidityProofContext;
54
- first_pubkey: PodElGamalPubkey;
55
- second_pubkey: PodElGamalPubkey;
56
- grouped_ciphertext_lo: PodGroupedElGamalCiphertext2Handles;
57
- grouped_ciphertext_hi: PodGroupedElGamalCiphertext2Handles;
58
- }
59
- /**
60
- * The instruction data that is needed for the
61
- * `ProofInstruction::VerifyBatchedGroupedCiphertextValidity` instruction.
62
- *
63
- * It includes the cryptographic proof as well as the context data information needed to verify
64
- * the proof.
65
- */
66
- export class BatchedGroupedCiphertext2HandlesValidityProofData {
67
- private constructor();
68
- free(): void;
69
- static new(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, grouped_ciphertext_lo: GroupedElGamalCiphertext2Handles, grouped_ciphertext_hi: GroupedElGamalCiphertext2Handles, amount_lo: bigint, amount_hi: bigint, opening_lo: PedersenOpening, opening_hi: PedersenOpening): BatchedGroupedCiphertext2HandlesValidityProofData;
70
- toBytes(): Uint8Array;
71
- static fromBytes(bytes: Uint8Array): BatchedGroupedCiphertext2HandlesValidityProofData;
72
- context: BatchedGroupedCiphertext2HandlesValidityProofContext;
73
- proof: PodBatchedGroupedCiphertext2HandlesValidityProof;
74
- }
75
- /**
76
- * Batched grouped ciphertext validity proof with two handles.
77
- */
78
- export class BatchedGroupedCiphertext3HandlesValidityProof {
79
- private constructor();
80
- free(): void;
81
- }
82
- export class BatchedGroupedCiphertext3HandlesValidityProofContext {
83
- private constructor();
84
- free(): void;
85
- toBytes(): Uint8Array;
86
- static fromBytes(bytes: Uint8Array): BatchedGroupedCiphertext3HandlesValidityProofContext;
87
- first_pubkey: PodElGamalPubkey;
88
- second_pubkey: PodElGamalPubkey;
89
- third_pubkey: PodElGamalPubkey;
90
- grouped_ciphertext_lo: PodGroupedElGamalCiphertext3Handles;
91
- grouped_ciphertext_hi: PodGroupedElGamalCiphertext3Handles;
92
- }
93
- /**
94
- * The instruction data that is needed for the
95
- * `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity` instruction.
96
- *
97
- * It includes the cryptographic proof as well as the context data information needed to verify
98
- * the proof.
99
- */
100
- export class BatchedGroupedCiphertext3HandlesValidityProofData {
101
- private constructor();
102
- free(): void;
103
- static new(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, third_pubkey: ElGamalPubkey, grouped_ciphertext_lo: GroupedElGamalCiphertext3Handles, grouped_ciphertext_hi: GroupedElGamalCiphertext3Handles, amount_lo: bigint, amount_hi: bigint, opening_lo: PedersenOpening, opening_hi: PedersenOpening): BatchedGroupedCiphertext3HandlesValidityProofData;
104
- toBytes(): Uint8Array;
105
- static fromBytes(bytes: Uint8Array): BatchedGroupedCiphertext3HandlesValidityProofData;
106
- context: BatchedGroupedCiphertext3HandlesValidityProofContext;
107
- proof: PodBatchedGroupedCiphertext3HandlesValidityProof;
108
- }
109
- /**
110
- * The ciphertext-ciphertext equality proof.
111
- *
112
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
113
- */
114
- export class CiphertextCiphertextEqualityProof {
115
- private constructor();
116
- free(): void;
117
- }
118
- /**
119
- * The context data needed to verify a ciphertext-ciphertext equality proof.
120
- */
121
- export class CiphertextCiphertextEqualityProofContext {
122
- private constructor();
123
- free(): void;
124
- toBytes(): Uint8Array;
125
- static fromBytes(bytes: Uint8Array): CiphertextCiphertextEqualityProofContext;
126
- first_pubkey: PodElGamalPubkey;
127
- second_pubkey: PodElGamalPubkey;
128
- first_ciphertext: PodElGamalCiphertext;
129
- second_ciphertext: PodElGamalCiphertext;
130
- }
131
- /**
132
- * The instruction data that is needed for the
133
- * `ProofInstruction::VerifyCiphertextCiphertextEquality` instruction.
134
- *
135
- * It includes the cryptographic proof as well as the context data information needed to verify
136
- * the proof.
137
- */
138
- export class CiphertextCiphertextEqualityProofData {
139
- private constructor();
140
- free(): void;
141
- static new(first_keypair: ElGamalKeypair, second_pubkey: ElGamalPubkey, first_ciphertext: ElGamalCiphertext, second_ciphertext: ElGamalCiphertext, second_opening: PedersenOpening, amount: bigint): CiphertextCiphertextEqualityProofData;
142
- toBytes(): Uint8Array;
143
- static fromBytes(bytes: Uint8Array): CiphertextCiphertextEqualityProofData;
144
- context: CiphertextCiphertextEqualityProofContext;
145
- proof: PodCiphertextCiphertextEqualityProof;
146
- }
147
- /**
148
- * Equality proof.
149
- *
150
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
151
- */
152
- export class CiphertextCommitmentEqualityProof {
153
- private constructor();
154
- free(): void;
155
- }
156
- /**
157
- * The context data needed to verify a ciphertext-commitment equality proof.
158
- */
159
- export class CiphertextCommitmentEqualityProofContext {
160
- private constructor();
161
- free(): void;
162
- toBytes(): Uint8Array;
163
- static fromBytes(bytes: Uint8Array): CiphertextCommitmentEqualityProofContext;
164
- /**
165
- * The ElGamal pubkey
166
- */
167
- pubkey: PodElGamalPubkey;
168
- /**
169
- * The ciphertext encrypted under the ElGamal pubkey
170
- */
171
- ciphertext: PodElGamalCiphertext;
172
- /**
173
- * The Pedersen commitment
174
- */
175
- commitment: PodPedersenCommitment;
176
- }
177
- /**
178
- * The instruction data that is needed for the
179
- * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction.
180
- *
181
- * It includes the cryptographic proof as well as the context data information needed to verify
182
- * the proof.
183
- */
184
- export class CiphertextCommitmentEqualityProofData {
185
- private constructor();
186
- free(): void;
187
- static new(keypair: ElGamalKeypair, ciphertext: ElGamalCiphertext, commitment: PedersenCommitment, opening: PedersenOpening, amount: bigint): CiphertextCommitmentEqualityProofData;
188
- toBytes(): Uint8Array;
189
- static fromBytes(bytes: Uint8Array): CiphertextCommitmentEqualityProofData;
190
- context: CiphertextCommitmentEqualityProofContext;
191
- proof: PodCiphertextCommitmentEqualityProof;
192
- }
193
- /**
194
- * Decryption handle for Pedersen commitment.
195
- */
196
- export class DecryptHandle {
197
- private constructor();
198
- free(): void;
199
- }
200
- /**
201
- * Ciphertext for the ElGamal encryption scheme.
202
- */
203
- export class ElGamalCiphertext {
204
- private constructor();
205
- free(): void;
206
- commitment: PedersenCommitment;
207
- handle: DecryptHandle;
208
- }
209
- /**
210
- * A (twisted) ElGamal encryption keypair.
211
- *
212
- * The instances of the secret key are zeroized on drop.
213
- */
214
- export class ElGamalKeypair {
215
- private constructor();
216
- free(): void;
217
- /**
218
- * Generates the public and secret keys for ElGamal encryption.
219
- *
220
- * This function is randomized. It internally samples a scalar element using `OsRng`.
221
- */
222
- static newRand(): ElGamalKeypair;
223
- pubkeyOwned(): ElGamalPubkey;
224
- }
225
- /**
226
- * Public key for the ElGamal encryption scheme.
227
- */
228
- export class ElGamalPubkey {
229
- private constructor();
230
- free(): void;
231
- encryptU64(amount: bigint): ElGamalCiphertext;
232
- encryptWithU64(amount: bigint, opening: PedersenOpening): ElGamalCiphertext;
233
- }
234
- /**
235
- * The grouped ciphertext validity proof for 2 handles.
236
- *
237
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
238
- */
239
- export class GroupedCiphertext2HandlesValidityProof {
240
- private constructor();
241
- free(): void;
242
- }
243
- export class GroupedCiphertext2HandlesValidityProofContext {
244
- private constructor();
245
- free(): void;
246
- toBytes(): Uint8Array;
247
- static fromBytes(bytes: Uint8Array): GroupedCiphertext2HandlesValidityProofContext;
248
- first_pubkey: PodElGamalPubkey;
249
- second_pubkey: PodElGamalPubkey;
250
- grouped_ciphertext: PodGroupedElGamalCiphertext2Handles;
251
- }
252
- /**
253
- * The instruction data that is needed for the `ProofInstruction::VerifyGroupedCiphertextValidity`
254
- * instruction.
255
- *
256
- * It includes the cryptographic proof as well as the context data information needed to verify
257
- * the proof.
258
- */
259
- export class GroupedCiphertext2HandlesValidityProofData {
260
- private constructor();
261
- free(): void;
262
- static new(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, grouped_ciphertext: GroupedElGamalCiphertext2Handles, amount: bigint, opening: PedersenOpening): GroupedCiphertext2HandlesValidityProofData;
263
- toBytes(): Uint8Array;
264
- static fromBytes(bytes: Uint8Array): GroupedCiphertext2HandlesValidityProofData;
265
- context: GroupedCiphertext2HandlesValidityProofContext;
266
- proof: PodGroupedCiphertext2HandlesValidityProof;
267
- }
268
- /**
269
- * The grouped ciphertext validity proof for 3 handles.
270
- *
271
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
272
- */
273
- export class GroupedCiphertext3HandlesValidityProof {
274
- private constructor();
275
- free(): void;
276
- }
277
- export class GroupedCiphertext3HandlesValidityProofContext {
278
- private constructor();
279
- free(): void;
280
- toBytes(): Uint8Array;
281
- static fromBytes(bytes: Uint8Array): GroupedCiphertext3HandlesValidityProofContext;
282
- first_pubkey: PodElGamalPubkey;
283
- second_pubkey: PodElGamalPubkey;
284
- third_pubkey: PodElGamalPubkey;
285
- grouped_ciphertext: PodGroupedElGamalCiphertext3Handles;
286
- }
287
- /**
288
- * The instruction data that is needed for the
289
- * `ProofInstruction::VerifyGroupedCiphertext3HandlesValidity` instruction.
290
- *
291
- * It includes the cryptographic proof as well as the context data information needed to verify
292
- * the proof.
293
- */
294
- export class GroupedCiphertext3HandlesValidityProofData {
295
- private constructor();
296
- free(): void;
297
- static new(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, third_pubkey: ElGamalPubkey, grouped_ciphertext: GroupedElGamalCiphertext3Handles, amount: bigint, opening: PedersenOpening): GroupedCiphertext3HandlesValidityProofData;
298
- toBytes(): Uint8Array;
299
- static fromBytes(bytes: Uint8Array): GroupedCiphertext3HandlesValidityProofData;
300
- context: GroupedCiphertext3HandlesValidityProofContext;
301
- proof: PodGroupedCiphertext3HandlesValidityProof;
302
- }
303
- export class GroupedElGamalCiphertext2Handles {
304
- private constructor();
305
- free(): void;
306
- static encryptU64(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, amount: bigint): GroupedElGamalCiphertext2Handles;
307
- static encryptWithU64(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, amount: bigint, opening: PedersenOpening): GroupedElGamalCiphertext2Handles;
308
- }
309
- export class GroupedElGamalCiphertext3Handles {
310
- private constructor();
311
- free(): void;
312
- static encryptU64(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, third_pubkey: ElGamalPubkey, amount: bigint): GroupedElGamalCiphertext3Handles;
313
- static encryptWithU64(first_pubkey: ElGamalPubkey, second_pubkey: ElGamalPubkey, third_pubkey: ElGamalPubkey, amount: bigint, opening: PedersenOpening): GroupedElGamalCiphertext3Handles;
314
- }
315
- /**
316
- * Algorithm handle for the Pedersen commitment scheme.
317
- */
318
- export class Pedersen {
319
- private constructor();
320
- free(): void;
321
- static withU64(amount: bigint, opening: PedersenOpening): PedersenCommitment;
322
- }
323
- /**
324
- * Pedersen commitment type.
325
- */
326
- export class PedersenCommitment {
327
- private constructor();
328
- free(): void;
329
- }
330
- /**
331
- * Pedersen opening type.
332
- *
333
- * Instances of Pedersen openings are zeroized on drop.
334
- */
335
- export class PedersenOpening {
336
- private constructor();
337
- free(): void;
338
- static newRand(): PedersenOpening;
339
- }
340
- /**
341
- * Percentage-with-cap proof.
342
- *
343
- * The proof consists of two main components: `percentage_max_proof` and
344
- * `percentage_equality_proof`. If the committed amount is greater than the maximum cap value,
345
- * then the `percentage_max_proof` is properly generated and `percentage_equality_proof` is
346
- * simulated. If the committed amount is smaller than the maximum cap bound, the
347
- * `percentage_equality_proof` is properly generated and `percentage_max_proof` is simulated.
348
- */
349
- export class PercentageWithCapProof {
350
- private constructor();
351
- free(): void;
352
- }
353
- /**
354
- * The context data needed to verify a percentage-with-cap proof.
355
- *
356
- * We refer to [`ZK ElGamal proof`] for the formal details on how the percentage-with-cap proof is
357
- * computed.
358
- *
359
- * [`ZK ElGamal proof`]: https://docs.solanalabs.com/runtime/zk-token-proof
360
- */
361
- export class PercentageWithCapProofContext {
362
- private constructor();
363
- free(): void;
364
- toBytes(): Uint8Array;
365
- static fromBytes(bytes: Uint8Array): PercentageWithCapProofContext;
366
- /**
367
- * The Pedersen commitment to the percentage amount.
368
- */
369
- percentage_commitment: PodPedersenCommitment;
370
- /**
371
- * The Pedersen commitment to the delta amount.
372
- */
373
- delta_commitment: PodPedersenCommitment;
374
- /**
375
- * The Pedersen commitment to the claimed amount.
376
- */
377
- claimed_commitment: PodPedersenCommitment;
378
- /**
379
- * The maximum cap bound.
380
- */
381
- max_value: PodU64;
382
- }
383
- /**
384
- * The instruction data that is needed for the `ProofInstruction::VerifyPercentageWithCap`
385
- * instruction.
386
- *
387
- * It includes the cryptographic proof as well as the context data information needed to verify
388
- * the proof.
389
- */
390
- export class PercentageWithCapProofData {
391
- private constructor();
392
- free(): void;
393
- static new(percentage_commitment: PedersenCommitment, percentage_opening: PedersenOpening, percentage_amount: bigint, delta_commitment: PedersenCommitment, delta_opening: PedersenOpening, delta_amount: bigint, claimed_commitment: PedersenCommitment, claimed_opening: PedersenOpening, max_value: bigint): PercentageWithCapProofData;
394
- toBytes(): Uint8Array;
395
- static fromBytes(bytes: Uint8Array): PercentageWithCapProofData;
396
- context: PercentageWithCapProofContext;
397
- proof: PodPercentageWithCapProof;
398
- }
399
- /**
400
- * The `AeCiphertext` type as a `Pod`.
401
- */
402
- export class PodAeCiphertext {
403
- free(): void;
404
- constructor(value: any);
405
- toString(): string;
406
- equals(other: PodAeCiphertext): boolean;
407
- toBytes(): Uint8Array;
408
- static zeroed(): PodAeCiphertext;
409
- static encode(decoded: AeCiphertext): PodAeCiphertext;
410
- decode(): AeCiphertext;
411
- }
412
- /**
413
- * The `BatchedGroupedCiphertext2HandlesValidityProof` type as a `Pod`.
414
- */
415
- export class PodBatchedGroupedCiphertext2HandlesValidityProof {
416
- private constructor();
417
- free(): void;
418
- }
419
- /**
420
- * The `BatchedGroupedCiphertext3HandlesValidityProof` type as a `Pod`.
421
- */
422
- export class PodBatchedGroupedCiphertext3HandlesValidityProof {
423
- private constructor();
424
- free(): void;
425
- }
426
- /**
427
- * The `CiphertextCiphertextEqualityProof` type as a `Pod`.
428
- */
429
- export class PodCiphertextCiphertextEqualityProof {
430
- private constructor();
431
- free(): void;
432
- }
433
- /**
434
- * The `CiphertextCommitmentEqualityProof` type as a `Pod`.
435
- */
436
- export class PodCiphertextCommitmentEqualityProof {
437
- private constructor();
438
- free(): void;
439
- }
440
- /**
441
- * The `ElGamalCiphertext` type as a `Pod`.
442
- */
443
- export class PodElGamalCiphertext {
444
- free(): void;
445
- constructor(value: any);
446
- toString(): string;
447
- equals(other: PodElGamalCiphertext): boolean;
448
- toBytes(): Uint8Array;
449
- static zeroed(): PodElGamalCiphertext;
450
- static encode(decoded: ElGamalCiphertext): PodElGamalCiphertext;
451
- decode(): ElGamalCiphertext;
452
- }
453
- /**
454
- * The `ElGamalPubkey` type as a `Pod`.
455
- */
456
- export class PodElGamalPubkey {
457
- free(): void;
458
- constructor(value: any);
459
- toString(): string;
460
- equals(other: PodElGamalPubkey): boolean;
461
- toBytes(): Uint8Array;
462
- static zeroed(): PodElGamalPubkey;
463
- static encode(decoded: ElGamalPubkey): PodElGamalPubkey;
464
- decode(): ElGamalPubkey;
465
- }
466
- /**
467
- * The `GroupedCiphertext2HandlesValidityProof` type as a `Pod`.
468
- */
469
- export class PodGroupedCiphertext2HandlesValidityProof {
470
- private constructor();
471
- free(): void;
472
- }
473
- /**
474
- * The `GroupedCiphertext3HandlesValidityProof` type as a `Pod`.
475
- */
476
- export class PodGroupedCiphertext3HandlesValidityProof {
477
- private constructor();
478
- free(): void;
479
- }
480
- /**
481
- * The `GroupedElGamalCiphertext` type with two decryption handles as a `Pod`
482
- */
483
- export class PodGroupedElGamalCiphertext2Handles {
484
- private constructor();
485
- free(): void;
486
- }
487
- /**
488
- * The `GroupedElGamalCiphertext` type with three decryption handles as a `Pod`
489
- */
490
- export class PodGroupedElGamalCiphertext3Handles {
491
- private constructor();
492
- free(): void;
493
- }
494
- /**
495
- * The `PedersenCommitment` type as a `Pod`.
496
- */
497
- export class PodPedersenCommitment {
498
- private constructor();
499
- free(): void;
500
- }
501
- /**
502
- * The `PercentageWithCapProof` type as a `Pod`.
503
- */
504
- export class PodPercentageWithCapProof {
505
- private constructor();
506
- free(): void;
507
- }
508
- /**
509
- * The `PubkeyValidityProof` type as a `Pod`.
510
- */
511
- export class PodPubkeyValidityProof {
512
- private constructor();
513
- free(): void;
514
- }
515
- export class PodU64 {
516
- private constructor();
517
- free(): void;
518
- }
519
- /**
520
- * The `ZeroCiphertextProof` type as a `Pod`.
521
- */
522
- export class PodZeroCiphertextProof {
523
- private constructor();
524
- free(): void;
525
- }
526
- /**
527
- * Public-key proof.
528
- *
529
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
530
- */
531
- export class PubkeyValidityProof {
532
- private constructor();
533
- free(): void;
534
- }
535
- /**
536
- * The context data needed to verify a pubkey validity proof.
537
- */
538
- export class PubkeyValidityProofContext {
539
- private constructor();
540
- free(): void;
541
- toBytes(): Uint8Array;
542
- static fromBytes(bytes: Uint8Array): PubkeyValidityProofContext;
543
- /**
544
- * The public key to be proved
545
- */
546
- pubkey: PodElGamalPubkey;
547
- }
548
- /**
549
- * The instruction data that is needed for the `ProofInstruction::VerifyPubkeyValidity`
550
- * instruction.
551
- *
552
- * It includes the cryptographic proof as well as the context data information needed to verify
553
- * the proof.
554
- */
555
- export class PubkeyValidityProofData {
556
- private constructor();
557
- free(): void;
558
- static new(keypair: ElGamalKeypair): PubkeyValidityProofData;
559
- toBytes(): Uint8Array;
560
- static fromBytes(bytes: Uint8Array): PubkeyValidityProofData;
561
- /**
562
- * The context data for the public key validity proof
563
- */
564
- context: PubkeyValidityProofContext;
565
- /**
566
- * Proof that the public key is well-formed
567
- */
568
- proof: PodPubkeyValidityProof;
569
- }
570
- /**
571
- * Zero-ciphertext proof.
572
- *
573
- * Contains all the elliptic curve and scalar components that make up the sigma protocol.
574
- */
575
- export class ZeroCiphertextProof {
576
- private constructor();
577
- free(): void;
578
- }
579
- /**
580
- * The context data needed to verify a zero-ciphertext proof.
581
- */
582
- export class ZeroCiphertextProofContext {
583
- private constructor();
584
- free(): void;
585
- toBytes(): Uint8Array;
586
- static fromBytes(bytes: Uint8Array): ZeroCiphertextProofContext;
587
- /**
588
- * The ElGamal pubkey associated with the ElGamal ciphertext
589
- */
590
- pubkey: PodElGamalPubkey;
591
- /**
592
- * The ElGamal ciphertext that encrypts zero
593
- */
594
- ciphertext: PodElGamalCiphertext;
595
- }
596
- /**
597
- * The instruction data that is needed for the `ProofInstruction::VerifyZeroCiphertext` instruction.
598
- *
599
- * It includes the cryptographic proof as well as the context data information needed to verify
600
- * the proof.
601
- */
602
- export class ZeroCiphertextProofData {
603
- private constructor();
604
- free(): void;
605
- static new(keypair: ElGamalKeypair, ciphertext: ElGamalCiphertext): ZeroCiphertextProofData;
606
- toBytes(): Uint8Array;
607
- static fromBytes(bytes: Uint8Array): ZeroCiphertextProofData;
608
- /**
609
- * The context data for the zero-ciphertext proof
610
- */
611
- context: ZeroCiphertextProofContext;
612
- /**
613
- * Proof that the ciphertext is zero
614
- */
615
- proof: PodZeroCiphertextProof;
616
- }