x402z-shared 0.0.15 → 0.1.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/dist/index.d.mts CHANGED
@@ -4,19 +4,652 @@ export * from '@x402/core/types';
4
4
 
5
5
  declare const confidentialTokenAbi: readonly [{
6
6
  readonly inputs: readonly [{
7
+ readonly internalType: "string";
8
+ readonly name: "name_";
9
+ readonly type: "string";
10
+ }, {
11
+ readonly internalType: "string";
12
+ readonly name: "symbol_";
13
+ readonly type: "string";
14
+ }, {
15
+ readonly internalType: "string";
16
+ readonly name: "contractURI_";
17
+ readonly type: "string";
18
+ }, {
19
+ readonly internalType: "contract IERC20";
20
+ readonly name: "underlying_";
21
+ readonly type: "address";
22
+ }];
23
+ readonly stateMutability: "nonpayable";
24
+ readonly type: "constructor";
25
+ }, {
26
+ readonly inputs: readonly [];
27
+ readonly name: "AuthorizationExpired";
28
+ readonly type: "error";
29
+ }, {
30
+ readonly inputs: readonly [];
31
+ readonly name: "ECDSAInvalidSignature";
32
+ readonly type: "error";
33
+ }, {
34
+ readonly inputs: readonly [{
35
+ readonly internalType: "uint256";
36
+ readonly name: "length";
37
+ readonly type: "uint256";
38
+ }];
39
+ readonly name: "ECDSAInvalidSignatureLength";
40
+ readonly type: "error";
41
+ }, {
42
+ readonly inputs: readonly [{
43
+ readonly internalType: "bytes32";
44
+ readonly name: "s";
45
+ readonly type: "bytes32";
46
+ }];
47
+ readonly name: "ECDSAInvalidSignatureS";
48
+ readonly type: "error";
49
+ }, {
50
+ readonly inputs: readonly [{
51
+ readonly internalType: "uint256";
52
+ readonly name: "requestId";
53
+ readonly type: "uint256";
54
+ }];
55
+ readonly name: "ERC7984InvalidGatewayRequest";
56
+ readonly type: "error";
57
+ }, {
58
+ readonly inputs: readonly [{
59
+ readonly internalType: "address";
60
+ readonly name: "receiver";
61
+ readonly type: "address";
62
+ }];
63
+ readonly name: "ERC7984InvalidReceiver";
64
+ readonly type: "error";
65
+ }, {
66
+ readonly inputs: readonly [{
67
+ readonly internalType: "address";
68
+ readonly name: "sender";
69
+ readonly type: "address";
70
+ }];
71
+ readonly name: "ERC7984InvalidSender";
72
+ readonly type: "error";
73
+ }, {
74
+ readonly inputs: readonly [];
75
+ readonly name: "ERC7984TotalSupplyOverflow";
76
+ readonly type: "error";
77
+ }, {
78
+ readonly inputs: readonly [{
79
+ readonly internalType: "address";
80
+ readonly name: "caller";
81
+ readonly type: "address";
82
+ }];
83
+ readonly name: "ERC7984UnauthorizedCaller";
84
+ readonly type: "error";
85
+ }, {
86
+ readonly inputs: readonly [{
87
+ readonly internalType: "address";
88
+ readonly name: "holder";
89
+ readonly type: "address";
90
+ }, {
91
+ readonly internalType: "address";
92
+ readonly name: "spender";
93
+ readonly type: "address";
94
+ }];
95
+ readonly name: "ERC7984UnauthorizedSpender";
96
+ readonly type: "error";
97
+ }, {
98
+ readonly inputs: readonly [{
99
+ readonly internalType: "euint64";
100
+ readonly name: "amount";
101
+ readonly type: "bytes32";
102
+ }, {
103
+ readonly internalType: "address";
104
+ readonly name: "user";
105
+ readonly type: "address";
106
+ }];
107
+ readonly name: "ERC7984UnauthorizedUseOfEncryptedAmount";
108
+ readonly type: "error";
109
+ }, {
110
+ readonly inputs: readonly [{
111
+ readonly internalType: "address";
112
+ readonly name: "holder";
113
+ readonly type: "address";
114
+ }];
115
+ readonly name: "ERC7984ZeroBalance";
116
+ readonly type: "error";
117
+ }, {
118
+ readonly inputs: readonly [];
119
+ readonly name: "EncryptedAmountMismatch";
120
+ readonly type: "error";
121
+ }, {
122
+ readonly inputs: readonly [];
123
+ readonly name: "InvalidHolder";
124
+ readonly type: "error";
125
+ }, {
126
+ readonly inputs: readonly [];
127
+ readonly name: "InvalidKMSSignatures";
128
+ readonly type: "error";
129
+ }, {
130
+ readonly inputs: readonly [];
131
+ readonly name: "InvalidPayee";
132
+ readonly type: "error";
133
+ }, {
134
+ readonly inputs: readonly [];
135
+ readonly name: "InvalidRecipient";
136
+ readonly type: "error";
137
+ }, {
138
+ readonly inputs: readonly [];
139
+ readonly name: "InvalidShortString";
140
+ readonly type: "error";
141
+ }, {
142
+ readonly inputs: readonly [];
143
+ readonly name: "InvalidSignature";
144
+ readonly type: "error";
145
+ }, {
146
+ readonly inputs: readonly [{
147
+ readonly internalType: "euint64";
148
+ readonly name: "amount";
149
+ readonly type: "bytes32";
150
+ }];
151
+ readonly name: "InvalidUnwrapRequest";
152
+ readonly type: "error";
153
+ }, {
154
+ readonly inputs: readonly [];
155
+ readonly name: "NonceAlreadyUsed";
156
+ readonly type: "error";
157
+ }, {
158
+ readonly inputs: readonly [];
159
+ readonly name: "NotYetValid";
160
+ readonly type: "error";
161
+ }, {
162
+ readonly inputs: readonly [{
163
+ readonly internalType: "uint8";
164
+ readonly name: "bits";
165
+ readonly type: "uint8";
166
+ }, {
167
+ readonly internalType: "uint256";
168
+ readonly name: "value";
169
+ readonly type: "uint256";
170
+ }];
171
+ readonly name: "SafeCastOverflowedUintDowncast";
172
+ readonly type: "error";
173
+ }, {
174
+ readonly inputs: readonly [{
175
+ readonly internalType: "address";
176
+ readonly name: "token";
177
+ readonly type: "address";
178
+ }];
179
+ readonly name: "SafeERC20FailedOperation";
180
+ readonly type: "error";
181
+ }, {
182
+ readonly inputs: readonly [{
183
+ readonly internalType: "bytes32";
184
+ readonly name: "handle";
185
+ readonly type: "bytes32";
186
+ }, {
187
+ readonly internalType: "address";
188
+ readonly name: "sender";
189
+ readonly type: "address";
190
+ }];
191
+ readonly name: "SenderNotAllowedToUseHandle";
192
+ readonly type: "error";
193
+ }, {
194
+ readonly inputs: readonly [{
195
+ readonly internalType: "string";
196
+ readonly name: "str";
197
+ readonly type: "string";
198
+ }];
199
+ readonly name: "StringTooLong";
200
+ readonly type: "error";
201
+ }, {
202
+ readonly inputs: readonly [];
203
+ readonly name: "Unauthorized";
204
+ readonly type: "error";
205
+ }, {
206
+ readonly inputs: readonly [];
207
+ readonly name: "ZamaProtocolUnsupported";
208
+ readonly type: "error";
209
+ }, {
210
+ readonly anonymous: false;
211
+ readonly inputs: readonly [{
212
+ readonly indexed: true;
213
+ readonly internalType: "euint64";
214
+ readonly name: "encryptedAmount";
215
+ readonly type: "bytes32";
216
+ }, {
217
+ readonly indexed: true;
218
+ readonly internalType: "address";
219
+ readonly name: "requester";
220
+ readonly type: "address";
221
+ }];
222
+ readonly name: "AmountDiscloseRequested";
223
+ readonly type: "event";
224
+ }, {
225
+ readonly anonymous: false;
226
+ readonly inputs: readonly [{
227
+ readonly indexed: true;
228
+ readonly internalType: "euint64";
229
+ readonly name: "encryptedAmount";
230
+ readonly type: "bytes32";
231
+ }, {
232
+ readonly indexed: false;
233
+ readonly internalType: "uint64";
234
+ readonly name: "amount";
235
+ readonly type: "uint64";
236
+ }];
237
+ readonly name: "AmountDisclosed";
238
+ readonly type: "event";
239
+ }, {
240
+ readonly anonymous: false;
241
+ readonly inputs: readonly [{
242
+ readonly indexed: true;
243
+ readonly internalType: "address";
244
+ readonly name: "holder";
245
+ readonly type: "address";
246
+ }, {
247
+ readonly indexed: true;
248
+ readonly internalType: "address";
249
+ readonly name: "payee";
250
+ readonly type: "address";
251
+ }, {
252
+ readonly indexed: false;
253
+ readonly internalType: "uint256";
254
+ readonly name: "maxClearAmount";
255
+ readonly type: "uint256";
256
+ }, {
257
+ readonly indexed: true;
258
+ readonly internalType: "bytes32";
259
+ readonly name: "resourceHash";
260
+ readonly type: "bytes32";
261
+ }, {
262
+ readonly indexed: false;
263
+ readonly internalType: "bytes32";
264
+ readonly name: "nonce";
265
+ readonly type: "bytes32";
266
+ }, {
267
+ readonly indexed: false;
268
+ readonly internalType: "euint64";
269
+ readonly name: "transferredAmount";
270
+ readonly type: "bytes32";
271
+ }];
272
+ readonly name: "ConfidentialPaymentExecuted";
273
+ readonly type: "event";
274
+ }, {
275
+ readonly anonymous: false;
276
+ readonly inputs: readonly [{
277
+ readonly indexed: true;
278
+ readonly internalType: "address";
279
+ readonly name: "from";
280
+ readonly type: "address";
281
+ }, {
282
+ readonly indexed: true;
283
+ readonly internalType: "address";
284
+ readonly name: "to";
285
+ readonly type: "address";
286
+ }, {
287
+ readonly indexed: true;
288
+ readonly internalType: "euint64";
289
+ readonly name: "amount";
290
+ readonly type: "bytes32";
291
+ }];
292
+ readonly name: "ConfidentialTransfer";
293
+ readonly type: "event";
294
+ }, {
295
+ readonly anonymous: false;
296
+ readonly inputs: readonly [];
297
+ readonly name: "EIP712DomainChanged";
298
+ readonly type: "event";
299
+ }, {
300
+ readonly anonymous: false;
301
+ readonly inputs: readonly [{
302
+ readonly indexed: false;
303
+ readonly internalType: "address";
304
+ readonly name: "account";
305
+ readonly type: "address";
306
+ }, {
307
+ readonly indexed: false;
308
+ readonly internalType: "address";
309
+ readonly name: "oldObserver";
310
+ readonly type: "address";
311
+ }, {
312
+ readonly indexed: false;
313
+ readonly internalType: "address";
314
+ readonly name: "newObserver";
315
+ readonly type: "address";
316
+ }];
317
+ readonly name: "ERC7984ObserverAccessObserverSet";
318
+ readonly type: "event";
319
+ }, {
320
+ readonly anonymous: false;
321
+ readonly inputs: readonly [{
322
+ readonly indexed: true;
323
+ readonly internalType: "address";
324
+ readonly name: "holder";
325
+ readonly type: "address";
326
+ }, {
327
+ readonly indexed: true;
328
+ readonly internalType: "address";
329
+ readonly name: "operator";
330
+ readonly type: "address";
331
+ }, {
332
+ readonly indexed: false;
333
+ readonly internalType: "uint48";
334
+ readonly name: "until";
335
+ readonly type: "uint48";
336
+ }];
337
+ readonly name: "OperatorSet";
338
+ readonly type: "event";
339
+ }, {
340
+ readonly anonymous: false;
341
+ readonly inputs: readonly [{
342
+ readonly indexed: false;
343
+ readonly internalType: "bytes32[]";
344
+ readonly name: "handlesList";
345
+ readonly type: "bytes32[]";
346
+ }, {
347
+ readonly indexed: false;
348
+ readonly internalType: "bytes";
349
+ readonly name: "abiEncodedCleartexts";
350
+ readonly type: "bytes";
351
+ }];
352
+ readonly name: "PublicDecryptionVerified";
353
+ readonly type: "event";
354
+ }, {
355
+ readonly anonymous: false;
356
+ readonly inputs: readonly [{
357
+ readonly indexed: true;
358
+ readonly internalType: "address";
359
+ readonly name: "receiver";
360
+ readonly type: "address";
361
+ }, {
362
+ readonly indexed: false;
363
+ readonly internalType: "euint64";
364
+ readonly name: "encryptedAmount";
365
+ readonly type: "bytes32";
366
+ }, {
367
+ readonly indexed: false;
368
+ readonly internalType: "uint64";
369
+ readonly name: "cleartextAmount";
370
+ readonly type: "uint64";
371
+ }];
372
+ readonly name: "UnwrapFinalized";
373
+ readonly type: "event";
374
+ }, {
375
+ readonly anonymous: false;
376
+ readonly inputs: readonly [{
377
+ readonly indexed: true;
378
+ readonly internalType: "address";
379
+ readonly name: "receiver";
380
+ readonly type: "address";
381
+ }, {
382
+ readonly indexed: false;
383
+ readonly internalType: "euint64";
384
+ readonly name: "amount";
385
+ readonly type: "bytes32";
386
+ }];
387
+ readonly name: "UnwrapRequested";
388
+ readonly type: "event";
389
+ }, {
390
+ readonly anonymous: false;
391
+ readonly inputs: readonly [{
392
+ readonly indexed: true;
393
+ readonly internalType: "address";
394
+ readonly name: "holder";
395
+ readonly type: "address";
396
+ }, {
397
+ readonly indexed: true;
398
+ readonly internalType: "address";
399
+ readonly name: "to";
400
+ readonly type: "address";
401
+ }, {
402
+ readonly indexed: false;
403
+ readonly internalType: "bytes32";
404
+ readonly name: "nonce";
405
+ readonly type: "bytes32";
406
+ }, {
407
+ readonly indexed: false;
408
+ readonly internalType: "bytes32";
409
+ readonly name: "encryptedAmountHandle";
410
+ readonly type: "bytes32";
411
+ }];
412
+ readonly name: "UnwrapWithAuthorizationExecuted";
413
+ readonly type: "event";
414
+ }, {
415
+ readonly inputs: readonly [];
416
+ readonly name: "CONFIDENTIAL_PAYMENT_TYPEHASH";
417
+ readonly outputs: readonly [{
418
+ readonly internalType: "bytes32";
419
+ readonly name: "";
420
+ readonly type: "bytes32";
421
+ }];
422
+ readonly stateMutability: "view";
423
+ readonly type: "function";
424
+ }, {
425
+ readonly inputs: readonly [];
426
+ readonly name: "UNWRAP_AUTHORIZATION_TYPEHASH";
427
+ readonly outputs: readonly [{
428
+ readonly internalType: "bytes32";
429
+ readonly name: "";
430
+ readonly type: "bytes32";
431
+ }];
432
+ readonly stateMutability: "view";
433
+ readonly type: "function";
434
+ }, {
435
+ readonly inputs: readonly [{
436
+ readonly internalType: "address";
437
+ readonly name: "account";
438
+ readonly type: "address";
439
+ }];
440
+ readonly name: "confidentialBalanceOf";
441
+ readonly outputs: readonly [{
442
+ readonly internalType: "euint64";
443
+ readonly name: "";
444
+ readonly type: "bytes32";
445
+ }];
446
+ readonly stateMutability: "view";
447
+ readonly type: "function";
448
+ }, {
449
+ readonly inputs: readonly [];
450
+ readonly name: "confidentialProtocolId";
451
+ readonly outputs: readonly [{
452
+ readonly internalType: "uint256";
453
+ readonly name: "";
454
+ readonly type: "uint256";
455
+ }];
456
+ readonly stateMutability: "view";
457
+ readonly type: "function";
458
+ }, {
459
+ readonly inputs: readonly [];
460
+ readonly name: "confidentialTotalSupply";
461
+ readonly outputs: readonly [{
462
+ readonly internalType: "euint64";
463
+ readonly name: "";
464
+ readonly type: "bytes32";
465
+ }];
466
+ readonly stateMutability: "view";
467
+ readonly type: "function";
468
+ }, {
469
+ readonly inputs: readonly [{
470
+ readonly internalType: "address";
471
+ readonly name: "to";
472
+ readonly type: "address";
473
+ }, {
474
+ readonly internalType: "externalEuint64";
475
+ readonly name: "encryptedAmount";
476
+ readonly type: "bytes32";
477
+ }, {
478
+ readonly internalType: "bytes";
479
+ readonly name: "inputProof";
480
+ readonly type: "bytes";
481
+ }];
482
+ readonly name: "confidentialTransfer";
483
+ readonly outputs: readonly [{
484
+ readonly internalType: "euint64";
485
+ readonly name: "";
486
+ readonly type: "bytes32";
487
+ }];
488
+ readonly stateMutability: "nonpayable";
489
+ readonly type: "function";
490
+ }, {
491
+ readonly inputs: readonly [{
492
+ readonly internalType: "address";
493
+ readonly name: "to";
494
+ readonly type: "address";
495
+ }, {
496
+ readonly internalType: "euint64";
497
+ readonly name: "amount";
498
+ readonly type: "bytes32";
499
+ }];
500
+ readonly name: "confidentialTransfer";
501
+ readonly outputs: readonly [{
502
+ readonly internalType: "euint64";
503
+ readonly name: "";
504
+ readonly type: "bytes32";
505
+ }];
506
+ readonly stateMutability: "nonpayable";
507
+ readonly type: "function";
508
+ }, {
509
+ readonly inputs: readonly [{
510
+ readonly internalType: "address";
511
+ readonly name: "to";
512
+ readonly type: "address";
513
+ }, {
514
+ readonly internalType: "euint64";
515
+ readonly name: "amount";
516
+ readonly type: "bytes32";
517
+ }, {
518
+ readonly internalType: "bytes";
519
+ readonly name: "data";
520
+ readonly type: "bytes";
521
+ }];
522
+ readonly name: "confidentialTransferAndCall";
523
+ readonly outputs: readonly [{
524
+ readonly internalType: "euint64";
525
+ readonly name: "transferred";
526
+ readonly type: "bytes32";
527
+ }];
528
+ readonly stateMutability: "nonpayable";
529
+ readonly type: "function";
530
+ }, {
531
+ readonly inputs: readonly [{
532
+ readonly internalType: "address";
533
+ readonly name: "to";
534
+ readonly type: "address";
535
+ }, {
536
+ readonly internalType: "externalEuint64";
537
+ readonly name: "encryptedAmount";
538
+ readonly type: "bytes32";
539
+ }, {
540
+ readonly internalType: "bytes";
541
+ readonly name: "inputProof";
542
+ readonly type: "bytes";
543
+ }, {
544
+ readonly internalType: "bytes";
545
+ readonly name: "data";
546
+ readonly type: "bytes";
547
+ }];
548
+ readonly name: "confidentialTransferAndCall";
549
+ readonly outputs: readonly [{
550
+ readonly internalType: "euint64";
551
+ readonly name: "transferred";
552
+ readonly type: "bytes32";
553
+ }];
554
+ readonly stateMutability: "nonpayable";
555
+ readonly type: "function";
556
+ }, {
557
+ readonly inputs: readonly [{
558
+ readonly internalType: "address";
559
+ readonly name: "from";
560
+ readonly type: "address";
561
+ }, {
7
562
  readonly internalType: "address";
8
563
  readonly name: "to";
9
564
  readonly type: "address";
10
565
  }, {
11
- readonly internalType: "bytes32";
12
- readonly name: "encryptedAmountInput";
566
+ readonly internalType: "externalEuint64";
567
+ readonly name: "encryptedAmount";
13
568
  readonly type: "bytes32";
14
569
  }, {
15
570
  readonly internalType: "bytes";
16
571
  readonly name: "inputProof";
17
572
  readonly type: "bytes";
18
573
  }];
19
- readonly name: "confidentialTransfer";
574
+ readonly name: "confidentialTransferFrom";
575
+ readonly outputs: readonly [{
576
+ readonly internalType: "euint64";
577
+ readonly name: "transferred";
578
+ readonly type: "bytes32";
579
+ }];
580
+ readonly stateMutability: "nonpayable";
581
+ readonly type: "function";
582
+ }, {
583
+ readonly inputs: readonly [{
584
+ readonly internalType: "address";
585
+ readonly name: "from";
586
+ readonly type: "address";
587
+ }, {
588
+ readonly internalType: "address";
589
+ readonly name: "to";
590
+ readonly type: "address";
591
+ }, {
592
+ readonly internalType: "euint64";
593
+ readonly name: "amount";
594
+ readonly type: "bytes32";
595
+ }];
596
+ readonly name: "confidentialTransferFrom";
597
+ readonly outputs: readonly [{
598
+ readonly internalType: "euint64";
599
+ readonly name: "transferred";
600
+ readonly type: "bytes32";
601
+ }];
602
+ readonly stateMutability: "nonpayable";
603
+ readonly type: "function";
604
+ }, {
605
+ readonly inputs: readonly [{
606
+ readonly internalType: "address";
607
+ readonly name: "from";
608
+ readonly type: "address";
609
+ }, {
610
+ readonly internalType: "address";
611
+ readonly name: "to";
612
+ readonly type: "address";
613
+ }, {
614
+ readonly internalType: "externalEuint64";
615
+ readonly name: "encryptedAmount";
616
+ readonly type: "bytes32";
617
+ }, {
618
+ readonly internalType: "bytes";
619
+ readonly name: "inputProof";
620
+ readonly type: "bytes";
621
+ }, {
622
+ readonly internalType: "bytes";
623
+ readonly name: "data";
624
+ readonly type: "bytes";
625
+ }];
626
+ readonly name: "confidentialTransferFromAndCall";
627
+ readonly outputs: readonly [{
628
+ readonly internalType: "euint64";
629
+ readonly name: "transferred";
630
+ readonly type: "bytes32";
631
+ }];
632
+ readonly stateMutability: "nonpayable";
633
+ readonly type: "function";
634
+ }, {
635
+ readonly inputs: readonly [{
636
+ readonly internalType: "address";
637
+ readonly name: "from";
638
+ readonly type: "address";
639
+ }, {
640
+ readonly internalType: "address";
641
+ readonly name: "to";
642
+ readonly type: "address";
643
+ }, {
644
+ readonly internalType: "euint64";
645
+ readonly name: "amount";
646
+ readonly type: "bytes32";
647
+ }, {
648
+ readonly internalType: "bytes";
649
+ readonly name: "data";
650
+ readonly type: "bytes";
651
+ }];
652
+ readonly name: "confidentialTransferFromAndCall";
20
653
  readonly outputs: readonly [{
21
654
  readonly internalType: "euint64";
22
655
  readonly name: "transferred";
@@ -78,25 +711,271 @@ declare const confidentialTokenAbi: readonly [{
78
711
  readonly name: "confidentialTransferWithAuthorization";
79
712
  readonly outputs: readonly [{
80
713
  readonly internalType: "euint64";
81
- readonly name: "transferred";
714
+ readonly name: "transferred";
715
+ readonly type: "bytes32";
716
+ }];
717
+ readonly stateMutability: "nonpayable";
718
+ readonly type: "function";
719
+ }, {
720
+ readonly inputs: readonly [];
721
+ readonly name: "contractURI";
722
+ readonly outputs: readonly [{
723
+ readonly internalType: "string";
724
+ readonly name: "";
725
+ readonly type: "string";
726
+ }];
727
+ readonly stateMutability: "view";
728
+ readonly type: "function";
729
+ }, {
730
+ readonly inputs: readonly [];
731
+ readonly name: "decimals";
732
+ readonly outputs: readonly [{
733
+ readonly internalType: "uint8";
734
+ readonly name: "";
735
+ readonly type: "uint8";
736
+ }];
737
+ readonly stateMutability: "view";
738
+ readonly type: "function";
739
+ }, {
740
+ readonly inputs: readonly [{
741
+ readonly internalType: "euint64";
742
+ readonly name: "encryptedAmount";
743
+ readonly type: "bytes32";
744
+ }, {
745
+ readonly internalType: "uint64";
746
+ readonly name: "cleartextAmount";
747
+ readonly type: "uint64";
748
+ }, {
749
+ readonly internalType: "bytes";
750
+ readonly name: "decryptionProof";
751
+ readonly type: "bytes";
752
+ }];
753
+ readonly name: "discloseEncryptedAmount";
754
+ readonly outputs: readonly [];
755
+ readonly stateMutability: "nonpayable";
756
+ readonly type: "function";
757
+ }, {
758
+ readonly inputs: readonly [];
759
+ readonly name: "eip712Domain";
760
+ readonly outputs: readonly [{
761
+ readonly internalType: "bytes1";
762
+ readonly name: "fields";
763
+ readonly type: "bytes1";
764
+ }, {
765
+ readonly internalType: "string";
766
+ readonly name: "name";
767
+ readonly type: "string";
768
+ }, {
769
+ readonly internalType: "string";
770
+ readonly name: "version";
771
+ readonly type: "string";
772
+ }, {
773
+ readonly internalType: "uint256";
774
+ readonly name: "chainId";
775
+ readonly type: "uint256";
776
+ }, {
777
+ readonly internalType: "address";
778
+ readonly name: "verifyingContract";
779
+ readonly type: "address";
780
+ }, {
781
+ readonly internalType: "bytes32";
782
+ readonly name: "salt";
783
+ readonly type: "bytes32";
784
+ }, {
785
+ readonly internalType: "uint256[]";
786
+ readonly name: "extensions";
787
+ readonly type: "uint256[]";
788
+ }];
789
+ readonly stateMutability: "view";
790
+ readonly type: "function";
791
+ }, {
792
+ readonly inputs: readonly [{
793
+ readonly internalType: "euint64";
794
+ readonly name: "burntAmount";
795
+ readonly type: "bytes32";
796
+ }, {
797
+ readonly internalType: "uint64";
798
+ readonly name: "burntAmountCleartext";
799
+ readonly type: "uint64";
800
+ }, {
801
+ readonly internalType: "bytes";
802
+ readonly name: "decryptionProof";
803
+ readonly type: "bytes";
804
+ }];
805
+ readonly name: "finalizeUnwrap";
806
+ readonly outputs: readonly [];
807
+ readonly stateMutability: "nonpayable";
808
+ readonly type: "function";
809
+ }, {
810
+ readonly inputs: readonly [];
811
+ readonly name: "inferredTotalSupply";
812
+ readonly outputs: readonly [{
813
+ readonly internalType: "uint256";
814
+ readonly name: "";
815
+ readonly type: "uint256";
816
+ }];
817
+ readonly stateMutability: "view";
818
+ readonly type: "function";
819
+ }, {
820
+ readonly inputs: readonly [{
821
+ readonly internalType: "address";
822
+ readonly name: "holder";
823
+ readonly type: "address";
824
+ }, {
825
+ readonly internalType: "address";
826
+ readonly name: "spender";
827
+ readonly type: "address";
828
+ }];
829
+ readonly name: "isOperator";
830
+ readonly outputs: readonly [{
831
+ readonly internalType: "bool";
832
+ readonly name: "";
833
+ readonly type: "bool";
834
+ }];
835
+ readonly stateMutability: "view";
836
+ readonly type: "function";
837
+ }, {
838
+ readonly inputs: readonly [];
839
+ readonly name: "maxTotalSupply";
840
+ readonly outputs: readonly [{
841
+ readonly internalType: "uint256";
842
+ readonly name: "";
843
+ readonly type: "uint256";
844
+ }];
845
+ readonly stateMutability: "view";
846
+ readonly type: "function";
847
+ }, {
848
+ readonly inputs: readonly [];
849
+ readonly name: "name";
850
+ readonly outputs: readonly [{
851
+ readonly internalType: "string";
852
+ readonly name: "";
853
+ readonly type: "string";
854
+ }];
855
+ readonly stateMutability: "view";
856
+ readonly type: "function";
857
+ }, {
858
+ readonly inputs: readonly [{
859
+ readonly internalType: "address";
860
+ readonly name: "account";
861
+ readonly type: "address";
862
+ }];
863
+ readonly name: "observer";
864
+ readonly outputs: readonly [{
865
+ readonly internalType: "address";
866
+ readonly name: "";
867
+ readonly type: "address";
868
+ }];
869
+ readonly stateMutability: "view";
870
+ readonly type: "function";
871
+ }, {
872
+ readonly inputs: readonly [{
873
+ readonly internalType: "address";
874
+ readonly name: "";
875
+ readonly type: "address";
876
+ }, {
877
+ readonly internalType: "address";
878
+ readonly name: "from";
879
+ readonly type: "address";
880
+ }, {
881
+ readonly internalType: "uint256";
882
+ readonly name: "amount";
883
+ readonly type: "uint256";
884
+ }, {
885
+ readonly internalType: "bytes";
886
+ readonly name: "data";
887
+ readonly type: "bytes";
888
+ }];
889
+ readonly name: "onTransferReceived";
890
+ readonly outputs: readonly [{
891
+ readonly internalType: "bytes4";
892
+ readonly name: "";
893
+ readonly type: "bytes4";
894
+ }];
895
+ readonly stateMutability: "nonpayable";
896
+ readonly type: "function";
897
+ }, {
898
+ readonly inputs: readonly [];
899
+ readonly name: "rate";
900
+ readonly outputs: readonly [{
901
+ readonly internalType: "uint256";
902
+ readonly name: "";
903
+ readonly type: "uint256";
904
+ }];
905
+ readonly stateMutability: "view";
906
+ readonly type: "function";
907
+ }, {
908
+ readonly inputs: readonly [{
909
+ readonly internalType: "euint64";
910
+ readonly name: "encryptedAmount";
82
911
  readonly type: "bytes32";
83
912
  }];
913
+ readonly name: "requestDiscloseEncryptedAmount";
914
+ readonly outputs: readonly [];
84
915
  readonly stateMutability: "nonpayable";
85
916
  readonly type: "function";
86
917
  }, {
87
918
  readonly inputs: readonly [{
88
919
  readonly internalType: "address";
89
- readonly name: "to";
920
+ readonly name: "account";
90
921
  readonly type: "address";
91
922
  }, {
92
- readonly internalType: "uint256";
93
- readonly name: "amount";
94
- readonly type: "uint256";
923
+ readonly internalType: "address";
924
+ readonly name: "newObserver";
925
+ readonly type: "address";
95
926
  }];
96
- readonly name: "wrap";
927
+ readonly name: "setObserver";
928
+ readonly outputs: readonly [];
929
+ readonly stateMutability: "nonpayable";
930
+ readonly type: "function";
931
+ }, {
932
+ readonly inputs: readonly [{
933
+ readonly internalType: "address";
934
+ readonly name: "operator";
935
+ readonly type: "address";
936
+ }, {
937
+ readonly internalType: "uint48";
938
+ readonly name: "until";
939
+ readonly type: "uint48";
940
+ }];
941
+ readonly name: "setOperator";
97
942
  readonly outputs: readonly [];
98
943
  readonly stateMutability: "nonpayable";
99
944
  readonly type: "function";
945
+ }, {
946
+ readonly inputs: readonly [{
947
+ readonly internalType: "bytes4";
948
+ readonly name: "interfaceId";
949
+ readonly type: "bytes4";
950
+ }];
951
+ readonly name: "supportsInterface";
952
+ readonly outputs: readonly [{
953
+ readonly internalType: "bool";
954
+ readonly name: "";
955
+ readonly type: "bool";
956
+ }];
957
+ readonly stateMutability: "view";
958
+ readonly type: "function";
959
+ }, {
960
+ readonly inputs: readonly [];
961
+ readonly name: "symbol";
962
+ readonly outputs: readonly [{
963
+ readonly internalType: "string";
964
+ readonly name: "";
965
+ readonly type: "string";
966
+ }];
967
+ readonly stateMutability: "view";
968
+ readonly type: "function";
969
+ }, {
970
+ readonly inputs: readonly [];
971
+ readonly name: "underlying";
972
+ readonly outputs: readonly [{
973
+ readonly internalType: "contract IERC20";
974
+ readonly name: "";
975
+ readonly type: "address";
976
+ }];
977
+ readonly stateMutability: "view";
978
+ readonly type: "function";
100
979
  }, {
101
980
  readonly inputs: readonly [{
102
981
  readonly internalType: "address";
@@ -107,8 +986,8 @@ declare const confidentialTokenAbi: readonly [{
107
986
  readonly name: "to";
108
987
  readonly type: "address";
109
988
  }, {
110
- readonly internalType: "bytes32";
111
- readonly name: "encryptedAmountInput";
989
+ readonly internalType: "externalEuint64";
990
+ readonly name: "encryptedAmount";
112
991
  readonly type: "bytes32";
113
992
  }, {
114
993
  readonly internalType: "bytes";
@@ -184,130 +1063,6 @@ declare const confidentialTokenAbi: readonly [{
184
1063
  readonly outputs: readonly [];
185
1064
  readonly stateMutability: "nonpayable";
186
1065
  readonly type: "function";
187
- }, {
188
- readonly inputs: readonly [{
189
- readonly internalType: "euint64";
190
- readonly name: "burntAmount";
191
- readonly type: "bytes32";
192
- }, {
193
- readonly internalType: "uint64";
194
- readonly name: "burntAmountCleartext";
195
- readonly type: "uint64";
196
- }, {
197
- readonly internalType: "bytes";
198
- readonly name: "decryptionProof";
199
- readonly type: "bytes";
200
- }];
201
- readonly name: "finalizeUnwrap";
202
- readonly outputs: readonly [];
203
- readonly stateMutability: "nonpayable";
204
- readonly type: "function";
205
- }, {
206
- readonly inputs: readonly [{
207
- readonly internalType: "address";
208
- readonly name: "account";
209
- readonly type: "address";
210
- }];
211
- readonly name: "confidentialBalanceOf";
212
- readonly outputs: readonly [{
213
- readonly internalType: "bytes32";
214
- readonly name: "";
215
- readonly type: "bytes32";
216
- }];
217
- readonly stateMutability: "view";
218
- readonly type: "function";
219
- }, {
220
- readonly anonymous: false;
221
- readonly inputs: readonly [{
222
- readonly indexed: true;
223
- readonly internalType: "address";
224
- readonly name: "holder";
225
- readonly type: "address";
226
- }, {
227
- readonly indexed: true;
228
- readonly internalType: "address";
229
- readonly name: "payee";
230
- readonly type: "address";
231
- }, {
232
- readonly indexed: false;
233
- readonly internalType: "uint256";
234
- readonly name: "maxClearAmount";
235
- readonly type: "uint256";
236
- }, {
237
- readonly indexed: true;
238
- readonly internalType: "bytes32";
239
- readonly name: "resourceHash";
240
- readonly type: "bytes32";
241
- }, {
242
- readonly indexed: false;
243
- readonly internalType: "bytes32";
244
- readonly name: "nonce";
245
- readonly type: "bytes32";
246
- }, {
247
- readonly indexed: false;
248
- readonly internalType: "bytes32";
249
- readonly name: "transferredAmount";
250
- readonly type: "bytes32";
251
- }];
252
- readonly name: "ConfidentialPaymentExecuted";
253
- readonly type: "event";
254
- }, {
255
- readonly inputs: readonly [{
256
- readonly indexed: true;
257
- readonly internalType: "address";
258
- readonly name: "receiver";
259
- readonly type: "address";
260
- }, {
261
- readonly indexed: false;
262
- readonly internalType: "bytes32";
263
- readonly name: "encryptedAmount";
264
- readonly type: "bytes32";
265
- }, {
266
- readonly indexed: false;
267
- readonly internalType: "uint64";
268
- readonly name: "cleartextAmount";
269
- readonly type: "uint64";
270
- }];
271
- readonly name: "UnwrapFinalized";
272
- readonly type: "event";
273
- }, {
274
- readonly inputs: readonly [{
275
- readonly indexed: true;
276
- readonly internalType: "address";
277
- readonly name: "receiver";
278
- readonly type: "address";
279
- }, {
280
- readonly indexed: false;
281
- readonly internalType: "bytes32";
282
- readonly name: "amount";
283
- readonly type: "bytes32";
284
- }];
285
- readonly name: "UnwrapRequested";
286
- readonly type: "event";
287
- }, {
288
- readonly inputs: readonly [{
289
- readonly indexed: true;
290
- readonly internalType: "address";
291
- readonly name: "holder";
292
- readonly type: "address";
293
- }, {
294
- readonly indexed: true;
295
- readonly internalType: "address";
296
- readonly name: "to";
297
- readonly type: "address";
298
- }, {
299
- readonly indexed: false;
300
- readonly internalType: "bytes32";
301
- readonly name: "nonce";
302
- readonly type: "bytes32";
303
- }, {
304
- readonly indexed: false;
305
- readonly internalType: "bytes32";
306
- readonly name: "encryptedAmountHandle";
307
- readonly type: "bytes32";
308
- }];
309
- readonly name: "UnwrapWithAuthorizationExecuted";
310
- readonly type: "event";
311
1066
  }, {
312
1067
  readonly inputs: readonly [{
313
1068
  readonly internalType: "address";
@@ -329,28 +1084,14 @@ declare const confidentialTokenAbi: readonly [{
329
1084
  }, {
330
1085
  readonly inputs: readonly [{
331
1086
  readonly internalType: "address";
332
- readonly name: "account";
333
- readonly type: "address";
334
- }];
335
- readonly name: "observer";
336
- readonly outputs: readonly [{
337
- readonly internalType: "address";
338
- readonly name: "";
339
- readonly type: "address";
340
- }];
341
- readonly stateMutability: "view";
342
- readonly type: "function";
343
- }, {
344
- readonly inputs: readonly [{
345
- readonly internalType: "address";
346
- readonly name: "account";
1087
+ readonly name: "to";
347
1088
  readonly type: "address";
348
1089
  }, {
349
- readonly internalType: "address";
350
- readonly name: "newObserver";
351
- readonly type: "address";
1090
+ readonly internalType: "uint256";
1091
+ readonly name: "amount";
1092
+ readonly type: "uint256";
352
1093
  }];
353
- readonly name: "setObserver";
1094
+ readonly name: "wrap";
354
1095
  readonly outputs: readonly [];
355
1096
  readonly stateMutability: "nonpayable";
356
1097
  readonly type: "function";
@@ -424,27 +1165,6 @@ declare function publicDecrypt(relayer: RelayerInstance, handles: string[]): Pro
424
1165
  decryptionProof: string;
425
1166
  }>;
426
1167
 
427
- type TransferAmount = {
428
- holder: `0x${string}`;
429
- payee: `0x${string}`;
430
- maxClearAmount: bigint;
431
- resourceHash: `0x${string}`;
432
- nonce: `0x${string}`;
433
- handle: `0x${string}`;
434
- amount?: bigint;
435
- };
436
- type TransferQueryOptions = {
437
- rpcUrl: string;
438
- tokenAddress: `0x${string}`;
439
- txHash: `0x${string}`;
440
- from?: `0x${string}`;
441
- to?: `0x${string}`;
442
- relayer: RelayerInstance;
443
- signer?: RelayerSigner;
444
- decrypt?: boolean;
445
- };
446
- declare function getTransferAmounts(options: TransferQueryOptions): Promise<TransferAmount[]>;
447
-
448
1168
  type ConfidentialPaymentAuthorization = {
449
1169
  holder: `0x${string}`;
450
1170
  payee: `0x${string}`;
@@ -490,6 +1210,90 @@ type ConfidentialPaymentInput = {
490
1210
  nonce?: `0x${string}`;
491
1211
  };
492
1212
 
1213
+ type Eip712DomainInfo = {
1214
+ name: string;
1215
+ version: string;
1216
+ chainId: number;
1217
+ verifyingContract: `0x${string}`;
1218
+ };
1219
+ declare function getTokenEip712Domain(params: {
1220
+ rpcUrl: string;
1221
+ tokenAddress: `0x${string}` | string;
1222
+ fallbackName?: string;
1223
+ fallbackVersion?: string;
1224
+ }): Promise<Eip712DomainInfo>;
1225
+ declare function prepareUnwrapAuthorization(params: {
1226
+ relayer: RelayerInstance;
1227
+ signer: RelayerSigner;
1228
+ tokenAddress: `0x${string}` | string;
1229
+ callerAddress: `0x${string}` | string;
1230
+ amount: bigint;
1231
+ domain: Eip712DomainInfo;
1232
+ validAfter?: number;
1233
+ validBefore?: number;
1234
+ nonce?: `0x${string}`;
1235
+ }): Promise<{
1236
+ authorization: UnwrapAuthorization;
1237
+ handle: `0x${string}`;
1238
+ inputProof: `0x${string}`;
1239
+ signature: `0x${string}`;
1240
+ }>;
1241
+ declare function getUnwrapHandleFromLogs(params: {
1242
+ logs: readonly {
1243
+ address?: string;
1244
+ data: `0x${string}`;
1245
+ topics: readonly `0x${string}`[];
1246
+ }[];
1247
+ tokenAddress: `0x${string}` | string;
1248
+ fallbackHandle?: `0x${string}`;
1249
+ }): `0x${string}` | null;
1250
+
1251
+ type WriteContractFn = (args: {
1252
+ address: `0x${string}`;
1253
+ abi: readonly unknown[];
1254
+ functionName: string;
1255
+ args: readonly unknown[];
1256
+ }) => Promise<`0x${string}`>;
1257
+ declare function getUnderlyingTokenAddress(params: {
1258
+ rpcUrl: string;
1259
+ tokenAddress: `0x${string}` | string;
1260
+ }): Promise<`0x${string}`>;
1261
+ declare function ensureUnderlyingAllowance(params: {
1262
+ rpcUrl: string;
1263
+ tokenAddress: `0x${string}` | string;
1264
+ owner: `0x${string}` | string;
1265
+ amount: bigint;
1266
+ spender?: `0x${string}` | string;
1267
+ writeContract: WriteContractFn;
1268
+ waitForReceipt?: (hash: `0x${string}`) => Promise<unknown>;
1269
+ }): Promise<{
1270
+ underlying: `0x${string}`;
1271
+ allowance: bigint;
1272
+ approved: boolean;
1273
+ txHash?: `0x${string}`;
1274
+ }>;
1275
+
1276
+ type TransferAmount = {
1277
+ holder: `0x${string}`;
1278
+ payee: `0x${string}`;
1279
+ maxClearAmount: bigint;
1280
+ resourceHash: `0x${string}`;
1281
+ nonce: `0x${string}`;
1282
+ handle: `0x${string}`;
1283
+ amount?: bigint;
1284
+ };
1285
+ type TransferQueryOptions = {
1286
+ rpcUrl: string;
1287
+ tokenAddress: `0x${string}`;
1288
+ txHash: `0x${string}`;
1289
+ from?: `0x${string}`;
1290
+ to?: `0x${string}`;
1291
+ relayer: RelayerInstance;
1292
+ signer?: RelayerSigner;
1293
+ decrypt?: boolean;
1294
+ };
1295
+ declare function getTransferAmounts(options: TransferQueryOptions): Promise<TransferAmount[]>;
1296
+
493
1297
  type TokenWriteSigner = RelayerSigner & {
494
1298
  writeContract?: (args: {
495
1299
  address: `0x${string}`;
@@ -519,4 +1323,4 @@ declare class ConfidentialToken {
519
1323
  finalizeUnwrap(burntAmount: `0x${string}`, burntAmountCleartext: string | number | bigint, decryptionProof: `0x${string}`): Promise<`0x${string}`>;
520
1324
  }
521
1325
 
522
- export { type ConfidentialErrorCode, type ConfidentialPaymentAuthorization, type ConfidentialPaymentInput, type ConfidentialPaymentPayload, type ConfidentialRequirementsExtra, ConfidentialToken, type ConfidentialTokenOptions, type RelayerInstance, type RelayerSigner, type TransferAmount, type TransferQueryOptions, type UnwrapAuthorization, confidentialErrorCodes, confidentialPaymentTypes, confidentialTokenAbi, createEncryptedAmountInput, createNonce, createRelayer, decryptEuint64, getTransferAmounts, hashEncryptedAmountInput, normalizeAmount, publicDecrypt };
1326
+ export { type ConfidentialErrorCode, type ConfidentialPaymentAuthorization, type ConfidentialPaymentInput, type ConfidentialPaymentPayload, type ConfidentialRequirementsExtra, ConfidentialToken, type ConfidentialTokenOptions, type RelayerInstance, type RelayerSigner, type TransferAmount, type TransferQueryOptions, type UnwrapAuthorization, confidentialErrorCodes, confidentialPaymentTypes, confidentialTokenAbi, createEncryptedAmountInput, createNonce, createRelayer, decryptEuint64, ensureUnderlyingAllowance, getTokenEip712Domain, getTransferAmounts, getUnderlyingTokenAddress, getUnwrapHandleFromLogs, hashEncryptedAmountInput, normalizeAmount, prepareUnwrapAuthorization, publicDecrypt };