@loyal-labs/private-transactions 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.
@@ -0,0 +1,1751 @@
1
+ /**
2
+ * Program IDL type helper in camelCase format for JS/TS usage.
3
+ *
4
+ * The bundled IDL constant below is sourced from
5
+ * `target/idl/telegram_private_transfer.json`.
6
+ */
7
+ export type TelegramPrivateTransfer = {
8
+ address: "97FzQdWi26mFNR21AbQNg4KqofiCLqQydQfAvRQMcXhV";
9
+ metadata: {
10
+ name: "telegramPrivateTransfer";
11
+ version: "0.1.0";
12
+ spec: "0.1.0";
13
+ description: "Created with Anchor";
14
+ };
15
+ instructions: [
16
+ {
17
+ name: "claimUsernameDeposit";
18
+ docs: [
19
+ "Claims tokens from a username-based deposit using a verified Telegram session."
20
+ ];
21
+ discriminator: [73, 62, 148, 70, 186, 247, 37, 80];
22
+ accounts: [
23
+ {
24
+ name: "recipientTokenAccount";
25
+ writable: true;
26
+ },
27
+ {
28
+ name: "vault";
29
+ writable: true;
30
+ pda: {
31
+ seeds: [
32
+ {
33
+ kind: "const";
34
+ value: [118, 97, 117, 108, 116];
35
+ },
36
+ {
37
+ kind: "account";
38
+ path: "tokenMint";
39
+ }
40
+ ];
41
+ };
42
+ },
43
+ {
44
+ name: "vaultTokenAccount";
45
+ writable: true;
46
+ pda: {
47
+ seeds: [
48
+ {
49
+ kind: "account";
50
+ path: "vault";
51
+ },
52
+ {
53
+ kind: "const";
54
+ value: [
55
+ 6,
56
+ 221,
57
+ 246,
58
+ 225,
59
+ 215,
60
+ 101,
61
+ 161,
62
+ 147,
63
+ 217,
64
+ 203,
65
+ 225,
66
+ 70,
67
+ 206,
68
+ 235,
69
+ 121,
70
+ 172,
71
+ 28,
72
+ 180,
73
+ 133,
74
+ 237,
75
+ 95,
76
+ 91,
77
+ 55,
78
+ 145,
79
+ 58,
80
+ 140,
81
+ 245,
82
+ 133,
83
+ 126,
84
+ 255,
85
+ 0,
86
+ 169
87
+ ];
88
+ },
89
+ {
90
+ kind: "account";
91
+ path: "tokenMint";
92
+ }
93
+ ];
94
+ program: {
95
+ kind: "const";
96
+ value: [
97
+ 140,
98
+ 151,
99
+ 37,
100
+ 143,
101
+ 78,
102
+ 36,
103
+ 137,
104
+ 241,
105
+ 187,
106
+ 61,
107
+ 16,
108
+ 41,
109
+ 20,
110
+ 142,
111
+ 13,
112
+ 131,
113
+ 11,
114
+ 90,
115
+ 19,
116
+ 153,
117
+ 218,
118
+ 255,
119
+ 16,
120
+ 132,
121
+ 4,
122
+ 142,
123
+ 123,
124
+ 216,
125
+ 219,
126
+ 233,
127
+ 248,
128
+ 89
129
+ ];
130
+ };
131
+ };
132
+ },
133
+ {
134
+ name: "deposit";
135
+ writable: true;
136
+ pda: {
137
+ seeds: [
138
+ {
139
+ kind: "const";
140
+ value: [
141
+ 117,
142
+ 115,
143
+ 101,
144
+ 114,
145
+ 110,
146
+ 97,
147
+ 109,
148
+ 101,
149
+ 95,
150
+ 100,
151
+ 101,
152
+ 112,
153
+ 111,
154
+ 115,
155
+ 105,
156
+ 116
157
+ ];
158
+ },
159
+ {
160
+ kind: "account";
161
+ path: "deposit.username";
162
+ account: "usernameDeposit";
163
+ },
164
+ {
165
+ kind: "account";
166
+ path: "deposit.tokenMint";
167
+ account: "usernameDeposit";
168
+ }
169
+ ];
170
+ };
171
+ },
172
+ {
173
+ name: "tokenMint";
174
+ relations: ["deposit"];
175
+ },
176
+ {
177
+ name: "session";
178
+ },
179
+ {
180
+ name: "tokenProgram";
181
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
182
+ }
183
+ ];
184
+ args: [
185
+ {
186
+ name: "amount";
187
+ type: "u64";
188
+ }
189
+ ];
190
+ },
191
+ {
192
+ name: "createPermission";
193
+ docs: [
194
+ "Creates a permission for a deposit account using the external permission program.",
195
+ "",
196
+ "Calls out to the permission program to create a permission for the deposit account."
197
+ ];
198
+ discriminator: [190, 182, 26, 164, 156, 221, 8, 0];
199
+ accounts: [
200
+ {
201
+ name: "payer";
202
+ writable: true;
203
+ signer: true;
204
+ },
205
+ {
206
+ name: "user";
207
+ signer: true;
208
+ },
209
+ {
210
+ name: "deposit";
211
+ pda: {
212
+ seeds: [
213
+ {
214
+ kind: "const";
215
+ value: [100, 101, 112, 111, 115, 105, 116];
216
+ },
217
+ {
218
+ kind: "account";
219
+ path: "user";
220
+ },
221
+ {
222
+ kind: "account";
223
+ path: "deposit.tokenMint";
224
+ account: "deposit";
225
+ }
226
+ ];
227
+ };
228
+ },
229
+ {
230
+ name: "permission";
231
+ writable: true;
232
+ },
233
+ {
234
+ name: "permissionProgram";
235
+ },
236
+ {
237
+ name: "systemProgram";
238
+ address: "11111111111111111111111111111111";
239
+ }
240
+ ];
241
+ args: [];
242
+ },
243
+ {
244
+ name: "createUsernamePermission";
245
+ docs: ["Creates a permission for a username-based deposit account."];
246
+ discriminator: [130, 137, 147, 121, 57, 217, 102, 40];
247
+ accounts: [
248
+ {
249
+ name: "payer";
250
+ writable: true;
251
+ signer: true;
252
+ },
253
+ {
254
+ name: "authority";
255
+ signer: true;
256
+ },
257
+ {
258
+ name: "deposit";
259
+ pda: {
260
+ seeds: [
261
+ {
262
+ kind: "const";
263
+ value: [
264
+ 117,
265
+ 115,
266
+ 101,
267
+ 114,
268
+ 110,
269
+ 97,
270
+ 109,
271
+ 101,
272
+ 95,
273
+ 100,
274
+ 101,
275
+ 112,
276
+ 111,
277
+ 115,
278
+ 105,
279
+ 116
280
+ ];
281
+ },
282
+ {
283
+ kind: "account";
284
+ path: "deposit.username";
285
+ account: "usernameDeposit";
286
+ },
287
+ {
288
+ kind: "account";
289
+ path: "deposit.tokenMint";
290
+ account: "usernameDeposit";
291
+ }
292
+ ];
293
+ };
294
+ },
295
+ {
296
+ name: "session";
297
+ },
298
+ {
299
+ name: "permission";
300
+ writable: true;
301
+ },
302
+ {
303
+ name: "permissionProgram";
304
+ },
305
+ {
306
+ name: "systemProgram";
307
+ address: "11111111111111111111111111111111";
308
+ }
309
+ ];
310
+ args: [];
311
+ },
312
+ {
313
+ name: "delegate";
314
+ docs: [
315
+ "Delegates the deposit account to the ephemeral rollups delegate program.",
316
+ "",
317
+ "Uses the ephemeral rollups delegate CPI to delegate the deposit account."
318
+ ];
319
+ discriminator: [90, 147, 75, 178, 85, 88, 4, 137];
320
+ accounts: [
321
+ {
322
+ name: "payer";
323
+ writable: true;
324
+ signer: true;
325
+ },
326
+ {
327
+ name: "validator";
328
+ optional: true;
329
+ },
330
+ {
331
+ name: "bufferDeposit";
332
+ writable: true;
333
+ pda: {
334
+ seeds: [
335
+ {
336
+ kind: "const";
337
+ value: [98, 117, 102, 102, 101, 114];
338
+ },
339
+ {
340
+ kind: "account";
341
+ path: "deposit";
342
+ }
343
+ ];
344
+ program: {
345
+ kind: "const";
346
+ value: [
347
+ 120,
348
+ 119,
349
+ 237,
350
+ 228,
351
+ 109,
352
+ 110,
353
+ 60,
354
+ 47,
355
+ 140,
356
+ 61,
357
+ 153,
358
+ 86,
359
+ 183,
360
+ 54,
361
+ 59,
362
+ 48,
363
+ 46,
364
+ 44,
365
+ 189,
366
+ 35,
367
+ 126,
368
+ 97,
369
+ 173,
370
+ 95,
371
+ 156,
372
+ 209,
373
+ 177,
374
+ 123,
375
+ 98,
376
+ 164,
377
+ 128,
378
+ 252
379
+ ];
380
+ };
381
+ };
382
+ },
383
+ {
384
+ name: "delegationRecordDeposit";
385
+ writable: true;
386
+ pda: {
387
+ seeds: [
388
+ {
389
+ kind: "const";
390
+ value: [100, 101, 108, 101, 103, 97, 116, 105, 111, 110];
391
+ },
392
+ {
393
+ kind: "account";
394
+ path: "deposit";
395
+ }
396
+ ];
397
+ program: {
398
+ kind: "account";
399
+ path: "delegationProgram";
400
+ };
401
+ };
402
+ },
403
+ {
404
+ name: "delegationMetadataDeposit";
405
+ writable: true;
406
+ pda: {
407
+ seeds: [
408
+ {
409
+ kind: "const";
410
+ value: [
411
+ 100,
412
+ 101,
413
+ 108,
414
+ 101,
415
+ 103,
416
+ 97,
417
+ 116,
418
+ 105,
419
+ 111,
420
+ 110,
421
+ 45,
422
+ 109,
423
+ 101,
424
+ 116,
425
+ 97,
426
+ 100,
427
+ 97,
428
+ 116,
429
+ 97
430
+ ];
431
+ },
432
+ {
433
+ kind: "account";
434
+ path: "deposit";
435
+ }
436
+ ];
437
+ program: {
438
+ kind: "account";
439
+ path: "delegationProgram";
440
+ };
441
+ };
442
+ },
443
+ {
444
+ name: "deposit";
445
+ writable: true;
446
+ pda: {
447
+ seeds: [
448
+ {
449
+ kind: "const";
450
+ value: [100, 101, 112, 111, 115, 105, 116];
451
+ },
452
+ {
453
+ kind: "arg";
454
+ path: "user";
455
+ },
456
+ {
457
+ kind: "arg";
458
+ path: "tokenMint";
459
+ }
460
+ ];
461
+ };
462
+ },
463
+ {
464
+ name: "ownerProgram";
465
+ address: "97FzQdWi26mFNR21AbQNg4KqofiCLqQydQfAvRQMcXhV";
466
+ },
467
+ {
468
+ name: "delegationProgram";
469
+ address: "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh";
470
+ },
471
+ {
472
+ name: "systemProgram";
473
+ address: "11111111111111111111111111111111";
474
+ }
475
+ ];
476
+ args: [
477
+ {
478
+ name: "user";
479
+ type: "pubkey";
480
+ },
481
+ {
482
+ name: "tokenMint";
483
+ type: "pubkey";
484
+ }
485
+ ];
486
+ },
487
+ {
488
+ name: "delegateUsernameDeposit";
489
+ docs: [
490
+ "Delegates the username-based deposit account to the ephemeral rollups delegate program."
491
+ ];
492
+ discriminator: [26, 82, 4, 176, 221, 64, 84, 178];
493
+ accounts: [
494
+ {
495
+ name: "payer";
496
+ writable: true;
497
+ signer: true;
498
+ },
499
+ {
500
+ name: "validator";
501
+ optional: true;
502
+ },
503
+ {
504
+ name: "session";
505
+ },
506
+ {
507
+ name: "bufferDeposit";
508
+ writable: true;
509
+ pda: {
510
+ seeds: [
511
+ {
512
+ kind: "const";
513
+ value: [98, 117, 102, 102, 101, 114];
514
+ },
515
+ {
516
+ kind: "account";
517
+ path: "deposit";
518
+ }
519
+ ];
520
+ program: {
521
+ kind: "const";
522
+ value: [
523
+ 120,
524
+ 119,
525
+ 237,
526
+ 228,
527
+ 109,
528
+ 110,
529
+ 60,
530
+ 47,
531
+ 140,
532
+ 61,
533
+ 153,
534
+ 86,
535
+ 183,
536
+ 54,
537
+ 59,
538
+ 48,
539
+ 46,
540
+ 44,
541
+ 189,
542
+ 35,
543
+ 126,
544
+ 97,
545
+ 173,
546
+ 95,
547
+ 156,
548
+ 209,
549
+ 177,
550
+ 123,
551
+ 98,
552
+ 164,
553
+ 128,
554
+ 252
555
+ ];
556
+ };
557
+ };
558
+ },
559
+ {
560
+ name: "delegationRecordDeposit";
561
+ writable: true;
562
+ pda: {
563
+ seeds: [
564
+ {
565
+ kind: "const";
566
+ value: [100, 101, 108, 101, 103, 97, 116, 105, 111, 110];
567
+ },
568
+ {
569
+ kind: "account";
570
+ path: "deposit";
571
+ }
572
+ ];
573
+ program: {
574
+ kind: "account";
575
+ path: "delegationProgram";
576
+ };
577
+ };
578
+ },
579
+ {
580
+ name: "delegationMetadataDeposit";
581
+ writable: true;
582
+ pda: {
583
+ seeds: [
584
+ {
585
+ kind: "const";
586
+ value: [
587
+ 100,
588
+ 101,
589
+ 108,
590
+ 101,
591
+ 103,
592
+ 97,
593
+ 116,
594
+ 105,
595
+ 111,
596
+ 110,
597
+ 45,
598
+ 109,
599
+ 101,
600
+ 116,
601
+ 97,
602
+ 100,
603
+ 97,
604
+ 116,
605
+ 97
606
+ ];
607
+ },
608
+ {
609
+ kind: "account";
610
+ path: "deposit";
611
+ }
612
+ ];
613
+ program: {
614
+ kind: "account";
615
+ path: "delegationProgram";
616
+ };
617
+ };
618
+ },
619
+ {
620
+ name: "deposit";
621
+ writable: true;
622
+ pda: {
623
+ seeds: [
624
+ {
625
+ kind: "const";
626
+ value: [
627
+ 117,
628
+ 115,
629
+ 101,
630
+ 114,
631
+ 110,
632
+ 97,
633
+ 109,
634
+ 101,
635
+ 95,
636
+ 100,
637
+ 101,
638
+ 112,
639
+ 111,
640
+ 115,
641
+ 105,
642
+ 116
643
+ ];
644
+ },
645
+ {
646
+ kind: "arg";
647
+ path: "username";
648
+ },
649
+ {
650
+ kind: "arg";
651
+ path: "tokenMint";
652
+ }
653
+ ];
654
+ };
655
+ },
656
+ {
657
+ name: "ownerProgram";
658
+ address: "97FzQdWi26mFNR21AbQNg4KqofiCLqQydQfAvRQMcXhV";
659
+ },
660
+ {
661
+ name: "delegationProgram";
662
+ address: "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh";
663
+ },
664
+ {
665
+ name: "systemProgram";
666
+ address: "11111111111111111111111111111111";
667
+ }
668
+ ];
669
+ args: [
670
+ {
671
+ name: "username";
672
+ type: "string";
673
+ },
674
+ {
675
+ name: "tokenMint";
676
+ type: "pubkey";
677
+ }
678
+ ];
679
+ },
680
+ {
681
+ name: "depositForUsername";
682
+ docs: [
683
+ "Deposits tokens into a username-based deposit.",
684
+ "",
685
+ "Anyone can deposit tokens for a Telegram username."
686
+ ];
687
+ discriminator: [85, 11, 120, 21, 51, 229, 125, 220];
688
+ accounts: [
689
+ {
690
+ name: "payer";
691
+ writable: true;
692
+ signer: true;
693
+ },
694
+ {
695
+ name: "depositor";
696
+ writable: true;
697
+ signer: true;
698
+ },
699
+ {
700
+ name: "deposit";
701
+ writable: true;
702
+ pda: {
703
+ seeds: [
704
+ {
705
+ kind: "const";
706
+ value: [
707
+ 117,
708
+ 115,
709
+ 101,
710
+ 114,
711
+ 110,
712
+ 97,
713
+ 109,
714
+ 101,
715
+ 95,
716
+ 100,
717
+ 101,
718
+ 112,
719
+ 111,
720
+ 115,
721
+ 105,
722
+ 116
723
+ ];
724
+ },
725
+ {
726
+ kind: "arg";
727
+ path: "username";
728
+ },
729
+ {
730
+ kind: "account";
731
+ path: "tokenMint";
732
+ }
733
+ ];
734
+ };
735
+ },
736
+ {
737
+ name: "vault";
738
+ writable: true;
739
+ pda: {
740
+ seeds: [
741
+ {
742
+ kind: "const";
743
+ value: [118, 97, 117, 108, 116];
744
+ },
745
+ {
746
+ kind: "account";
747
+ path: "tokenMint";
748
+ }
749
+ ];
750
+ };
751
+ },
752
+ {
753
+ name: "vaultTokenAccount";
754
+ writable: true;
755
+ pda: {
756
+ seeds: [
757
+ {
758
+ kind: "account";
759
+ path: "vault";
760
+ },
761
+ {
762
+ kind: "const";
763
+ value: [
764
+ 6,
765
+ 221,
766
+ 246,
767
+ 225,
768
+ 215,
769
+ 101,
770
+ 161,
771
+ 147,
772
+ 217,
773
+ 203,
774
+ 225,
775
+ 70,
776
+ 206,
777
+ 235,
778
+ 121,
779
+ 172,
780
+ 28,
781
+ 180,
782
+ 133,
783
+ 237,
784
+ 95,
785
+ 91,
786
+ 55,
787
+ 145,
788
+ 58,
789
+ 140,
790
+ 245,
791
+ 133,
792
+ 126,
793
+ 255,
794
+ 0,
795
+ 169
796
+ ];
797
+ },
798
+ {
799
+ kind: "account";
800
+ path: "tokenMint";
801
+ }
802
+ ];
803
+ program: {
804
+ kind: "const";
805
+ value: [
806
+ 140,
807
+ 151,
808
+ 37,
809
+ 143,
810
+ 78,
811
+ 36,
812
+ 137,
813
+ 241,
814
+ 187,
815
+ 61,
816
+ 16,
817
+ 41,
818
+ 20,
819
+ 142,
820
+ 13,
821
+ 131,
822
+ 11,
823
+ 90,
824
+ 19,
825
+ 153,
826
+ 218,
827
+ 255,
828
+ 16,
829
+ 132,
830
+ 4,
831
+ 142,
832
+ 123,
833
+ 216,
834
+ 219,
835
+ 233,
836
+ 248,
837
+ 89
838
+ ];
839
+ };
840
+ };
841
+ },
842
+ {
843
+ name: "depositorTokenAccount";
844
+ writable: true;
845
+ },
846
+ {
847
+ name: "tokenMint";
848
+ },
849
+ {
850
+ name: "tokenProgram";
851
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
852
+ },
853
+ {
854
+ name: "associatedTokenProgram";
855
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
856
+ },
857
+ {
858
+ name: "systemProgram";
859
+ address: "11111111111111111111111111111111";
860
+ }
861
+ ];
862
+ args: [
863
+ {
864
+ name: "username";
865
+ type: "string";
866
+ },
867
+ {
868
+ name: "amount";
869
+ type: "u64";
870
+ }
871
+ ];
872
+ },
873
+ {
874
+ name: "initializeDeposit";
875
+ docs: [
876
+ "Initializes a deposit account for a user and token mint if it does not exist.",
877
+ "",
878
+ "Sets up a new deposit account with zero balance for the user and token mint.",
879
+ "If the account is already initialized, this instruction is a no-op."
880
+ ];
881
+ discriminator: [171, 65, 93, 225, 61, 109, 31, 227];
882
+ accounts: [
883
+ {
884
+ name: "payer";
885
+ writable: true;
886
+ signer: true;
887
+ },
888
+ {
889
+ name: "user";
890
+ },
891
+ {
892
+ name: "deposit";
893
+ writable: true;
894
+ pda: {
895
+ seeds: [
896
+ {
897
+ kind: "const";
898
+ value: [100, 101, 112, 111, 115, 105, 116];
899
+ },
900
+ {
901
+ kind: "account";
902
+ path: "user";
903
+ },
904
+ {
905
+ kind: "account";
906
+ path: "tokenMint";
907
+ }
908
+ ];
909
+ };
910
+ },
911
+ {
912
+ name: "tokenMint";
913
+ },
914
+ {
915
+ name: "tokenProgram";
916
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
917
+ },
918
+ {
919
+ name: "systemProgram";
920
+ address: "11111111111111111111111111111111";
921
+ }
922
+ ];
923
+ args: [];
924
+ },
925
+ {
926
+ name: "modifyBalance";
927
+ docs: [
928
+ "Modifies the balance of a user's deposit account by transferring tokens in or out.",
929
+ "",
930
+ "If `args.increase` is true, tokens are transferred from the user's token account to the deposit account.",
931
+ "If false, tokens are transferred from the deposit account back to the user's token account."
932
+ ];
933
+ discriminator: [148, 232, 7, 240, 55, 51, 121, 115];
934
+ accounts: [
935
+ {
936
+ name: "payer";
937
+ writable: true;
938
+ signer: true;
939
+ },
940
+ {
941
+ name: "user";
942
+ signer: true;
943
+ relations: ["deposit"];
944
+ },
945
+ {
946
+ name: "vault";
947
+ writable: true;
948
+ pda: {
949
+ seeds: [
950
+ {
951
+ kind: "const";
952
+ value: [118, 97, 117, 108, 116];
953
+ },
954
+ {
955
+ kind: "account";
956
+ path: "deposit.tokenMint";
957
+ account: "deposit";
958
+ }
959
+ ];
960
+ };
961
+ },
962
+ {
963
+ name: "deposit";
964
+ writable: true;
965
+ pda: {
966
+ seeds: [
967
+ {
968
+ kind: "const";
969
+ value: [100, 101, 112, 111, 115, 105, 116];
970
+ },
971
+ {
972
+ kind: "account";
973
+ path: "deposit.user";
974
+ account: "deposit";
975
+ },
976
+ {
977
+ kind: "account";
978
+ path: "deposit.tokenMint";
979
+ account: "deposit";
980
+ }
981
+ ];
982
+ };
983
+ },
984
+ {
985
+ name: "userTokenAccount";
986
+ writable: true;
987
+ pda: {
988
+ seeds: [
989
+ {
990
+ kind: "account";
991
+ path: "user";
992
+ },
993
+ {
994
+ kind: "const";
995
+ value: [
996
+ 6,
997
+ 221,
998
+ 246,
999
+ 225,
1000
+ 215,
1001
+ 101,
1002
+ 161,
1003
+ 147,
1004
+ 217,
1005
+ 203,
1006
+ 225,
1007
+ 70,
1008
+ 206,
1009
+ 235,
1010
+ 121,
1011
+ 172,
1012
+ 28,
1013
+ 180,
1014
+ 133,
1015
+ 237,
1016
+ 95,
1017
+ 91,
1018
+ 55,
1019
+ 145,
1020
+ 58,
1021
+ 140,
1022
+ 245,
1023
+ 133,
1024
+ 126,
1025
+ 255,
1026
+ 0,
1027
+ 169
1028
+ ];
1029
+ },
1030
+ {
1031
+ kind: "account";
1032
+ path: "tokenMint";
1033
+ }
1034
+ ];
1035
+ program: {
1036
+ kind: "const";
1037
+ value: [
1038
+ 140,
1039
+ 151,
1040
+ 37,
1041
+ 143,
1042
+ 78,
1043
+ 36,
1044
+ 137,
1045
+ 241,
1046
+ 187,
1047
+ 61,
1048
+ 16,
1049
+ 41,
1050
+ 20,
1051
+ 142,
1052
+ 13,
1053
+ 131,
1054
+ 11,
1055
+ 90,
1056
+ 19,
1057
+ 153,
1058
+ 218,
1059
+ 255,
1060
+ 16,
1061
+ 132,
1062
+ 4,
1063
+ 142,
1064
+ 123,
1065
+ 216,
1066
+ 219,
1067
+ 233,
1068
+ 248,
1069
+ 89
1070
+ ];
1071
+ };
1072
+ };
1073
+ },
1074
+ {
1075
+ name: "vaultTokenAccount";
1076
+ writable: true;
1077
+ pda: {
1078
+ seeds: [
1079
+ {
1080
+ kind: "account";
1081
+ path: "vault";
1082
+ },
1083
+ {
1084
+ kind: "const";
1085
+ value: [
1086
+ 6,
1087
+ 221,
1088
+ 246,
1089
+ 225,
1090
+ 215,
1091
+ 101,
1092
+ 161,
1093
+ 147,
1094
+ 217,
1095
+ 203,
1096
+ 225,
1097
+ 70,
1098
+ 206,
1099
+ 235,
1100
+ 121,
1101
+ 172,
1102
+ 28,
1103
+ 180,
1104
+ 133,
1105
+ 237,
1106
+ 95,
1107
+ 91,
1108
+ 55,
1109
+ 145,
1110
+ 58,
1111
+ 140,
1112
+ 245,
1113
+ 133,
1114
+ 126,
1115
+ 255,
1116
+ 0,
1117
+ 169
1118
+ ];
1119
+ },
1120
+ {
1121
+ kind: "account";
1122
+ path: "tokenMint";
1123
+ }
1124
+ ];
1125
+ program: {
1126
+ kind: "const";
1127
+ value: [
1128
+ 140,
1129
+ 151,
1130
+ 37,
1131
+ 143,
1132
+ 78,
1133
+ 36,
1134
+ 137,
1135
+ 241,
1136
+ 187,
1137
+ 61,
1138
+ 16,
1139
+ 41,
1140
+ 20,
1141
+ 142,
1142
+ 13,
1143
+ 131,
1144
+ 11,
1145
+ 90,
1146
+ 19,
1147
+ 153,
1148
+ 218,
1149
+ 255,
1150
+ 16,
1151
+ 132,
1152
+ 4,
1153
+ 142,
1154
+ 123,
1155
+ 216,
1156
+ 219,
1157
+ 233,
1158
+ 248,
1159
+ 89
1160
+ ];
1161
+ };
1162
+ };
1163
+ },
1164
+ {
1165
+ name: "tokenMint";
1166
+ relations: ["deposit"];
1167
+ },
1168
+ {
1169
+ name: "tokenProgram";
1170
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1171
+ },
1172
+ {
1173
+ name: "associatedTokenProgram";
1174
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
1175
+ },
1176
+ {
1177
+ name: "systemProgram";
1178
+ address: "11111111111111111111111111111111";
1179
+ }
1180
+ ];
1181
+ args: [
1182
+ {
1183
+ name: "args";
1184
+ type: {
1185
+ defined: {
1186
+ name: "modifyDepositArgs";
1187
+ };
1188
+ };
1189
+ }
1190
+ ];
1191
+ },
1192
+ {
1193
+ name: "processUndelegation";
1194
+ discriminator: [196, 28, 41, 206, 48, 37, 51, 167];
1195
+ accounts: [
1196
+ {
1197
+ name: "baseAccount";
1198
+ writable: true;
1199
+ },
1200
+ {
1201
+ name: "buffer";
1202
+ },
1203
+ {
1204
+ name: "payer";
1205
+ writable: true;
1206
+ },
1207
+ {
1208
+ name: "systemProgram";
1209
+ }
1210
+ ];
1211
+ args: [
1212
+ {
1213
+ name: "accountSeeds";
1214
+ type: {
1215
+ vec: "bytes";
1216
+ };
1217
+ }
1218
+ ];
1219
+ },
1220
+ {
1221
+ name: "transferDeposit";
1222
+ docs: [
1223
+ "Transfers a specified amount from one user's deposit account to another's for the same token mint.",
1224
+ "",
1225
+ "Only updates the internal accounting; does not move actual tokens."
1226
+ ];
1227
+ discriminator: [20, 20, 147, 223, 41, 63, 204, 111];
1228
+ accounts: [
1229
+ {
1230
+ name: "user";
1231
+ relations: ["sourceDeposit"];
1232
+ },
1233
+ {
1234
+ name: "payer";
1235
+ writable: true;
1236
+ signer: true;
1237
+ },
1238
+ {
1239
+ name: "sessionToken";
1240
+ optional: true;
1241
+ },
1242
+ {
1243
+ name: "sourceDeposit";
1244
+ writable: true;
1245
+ pda: {
1246
+ seeds: [
1247
+ {
1248
+ kind: "const";
1249
+ value: [100, 101, 112, 111, 115, 105, 116];
1250
+ },
1251
+ {
1252
+ kind: "account";
1253
+ path: "sourceDeposit.user";
1254
+ account: "deposit";
1255
+ },
1256
+ {
1257
+ kind: "account";
1258
+ path: "sourceDeposit.tokenMint";
1259
+ account: "deposit";
1260
+ }
1261
+ ];
1262
+ };
1263
+ },
1264
+ {
1265
+ name: "destinationDeposit";
1266
+ writable: true;
1267
+ pda: {
1268
+ seeds: [
1269
+ {
1270
+ kind: "const";
1271
+ value: [100, 101, 112, 111, 115, 105, 116];
1272
+ },
1273
+ {
1274
+ kind: "account";
1275
+ path: "destinationDeposit.user";
1276
+ account: "deposit";
1277
+ },
1278
+ {
1279
+ kind: "account";
1280
+ path: "destinationDeposit.tokenMint";
1281
+ account: "deposit";
1282
+ }
1283
+ ];
1284
+ };
1285
+ },
1286
+ {
1287
+ name: "tokenMint";
1288
+ relations: ["sourceDeposit", "destinationDeposit"];
1289
+ },
1290
+ {
1291
+ name: "systemProgram";
1292
+ address: "11111111111111111111111111111111";
1293
+ }
1294
+ ];
1295
+ args: [
1296
+ {
1297
+ name: "amount";
1298
+ type: "u64";
1299
+ }
1300
+ ];
1301
+ },
1302
+ {
1303
+ name: "transferToUsernameDeposit";
1304
+ docs: [
1305
+ "Transfers a specified amount from a user's deposit account to a username-based deposit.",
1306
+ "",
1307
+ "Only updates the internal accounting; does not move actual tokens."
1308
+ ];
1309
+ discriminator: [224, 228, 188, 234, 232, 153, 75, 96];
1310
+ accounts: [
1311
+ {
1312
+ name: "user";
1313
+ relations: ["sourceDeposit"];
1314
+ },
1315
+ {
1316
+ name: "payer";
1317
+ writable: true;
1318
+ signer: true;
1319
+ },
1320
+ {
1321
+ name: "sessionToken";
1322
+ optional: true;
1323
+ },
1324
+ {
1325
+ name: "sourceDeposit";
1326
+ writable: true;
1327
+ pda: {
1328
+ seeds: [
1329
+ {
1330
+ kind: "const";
1331
+ value: [100, 101, 112, 111, 115, 105, 116];
1332
+ },
1333
+ {
1334
+ kind: "account";
1335
+ path: "sourceDeposit.user";
1336
+ account: "deposit";
1337
+ },
1338
+ {
1339
+ kind: "account";
1340
+ path: "sourceDeposit.tokenMint";
1341
+ account: "deposit";
1342
+ }
1343
+ ];
1344
+ };
1345
+ },
1346
+ {
1347
+ name: "destinationDeposit";
1348
+ writable: true;
1349
+ pda: {
1350
+ seeds: [
1351
+ {
1352
+ kind: "const";
1353
+ value: [
1354
+ 117,
1355
+ 115,
1356
+ 101,
1357
+ 114,
1358
+ 110,
1359
+ 97,
1360
+ 109,
1361
+ 101,
1362
+ 95,
1363
+ 100,
1364
+ 101,
1365
+ 112,
1366
+ 111,
1367
+ 115,
1368
+ 105,
1369
+ 116
1370
+ ];
1371
+ },
1372
+ {
1373
+ kind: "account";
1374
+ path: "destinationDeposit.username";
1375
+ account: "usernameDeposit";
1376
+ },
1377
+ {
1378
+ kind: "account";
1379
+ path: "destinationDeposit.tokenMint";
1380
+ account: "usernameDeposit";
1381
+ }
1382
+ ];
1383
+ };
1384
+ },
1385
+ {
1386
+ name: "tokenMint";
1387
+ relations: ["sourceDeposit", "destinationDeposit"];
1388
+ },
1389
+ {
1390
+ name: "systemProgram";
1391
+ address: "11111111111111111111111111111111";
1392
+ }
1393
+ ];
1394
+ args: [
1395
+ {
1396
+ name: "amount";
1397
+ type: "u64";
1398
+ }
1399
+ ];
1400
+ },
1401
+ {
1402
+ name: "undelegate";
1403
+ docs: [
1404
+ "Commits and undelegates the deposit account from the ephemeral rollups program.",
1405
+ "",
1406
+ "Uses the ephemeral rollups SDK to commit and undelegate the deposit account."
1407
+ ];
1408
+ discriminator: [131, 148, 180, 198, 91, 104, 42, 238];
1409
+ accounts: [
1410
+ {
1411
+ name: "user";
1412
+ },
1413
+ {
1414
+ name: "payer";
1415
+ writable: true;
1416
+ signer: true;
1417
+ },
1418
+ {
1419
+ name: "sessionToken";
1420
+ optional: true;
1421
+ },
1422
+ {
1423
+ name: "deposit";
1424
+ writable: true;
1425
+ pda: {
1426
+ seeds: [
1427
+ {
1428
+ kind: "const";
1429
+ value: [100, 101, 112, 111, 115, 105, 116];
1430
+ },
1431
+ {
1432
+ kind: "account";
1433
+ path: "user";
1434
+ },
1435
+ {
1436
+ kind: "account";
1437
+ path: "deposit.tokenMint";
1438
+ account: "deposit";
1439
+ }
1440
+ ];
1441
+ };
1442
+ },
1443
+ {
1444
+ name: "magicProgram";
1445
+ address: "Magic11111111111111111111111111111111111111";
1446
+ },
1447
+ {
1448
+ name: "magicContext";
1449
+ writable: true;
1450
+ address: "MagicContext1111111111111111111111111111111";
1451
+ }
1452
+ ];
1453
+ args: [];
1454
+ },
1455
+ {
1456
+ name: "undelegateUsernameDeposit";
1457
+ docs: [
1458
+ "Commits and undelegates the username-based deposit account from the ephemeral rollups program."
1459
+ ];
1460
+ discriminator: [169, 131, 184, 97, 218, 190, 134, 4];
1461
+ accounts: [
1462
+ {
1463
+ name: "payer";
1464
+ writable: true;
1465
+ signer: true;
1466
+ },
1467
+ {
1468
+ name: "session";
1469
+ },
1470
+ {
1471
+ name: "deposit";
1472
+ writable: true;
1473
+ pda: {
1474
+ seeds: [
1475
+ {
1476
+ kind: "const";
1477
+ value: [
1478
+ 117,
1479
+ 115,
1480
+ 101,
1481
+ 114,
1482
+ 110,
1483
+ 97,
1484
+ 109,
1485
+ 101,
1486
+ 95,
1487
+ 100,
1488
+ 101,
1489
+ 112,
1490
+ 111,
1491
+ 115,
1492
+ 105,
1493
+ 116
1494
+ ];
1495
+ },
1496
+ {
1497
+ kind: "arg";
1498
+ path: "username";
1499
+ },
1500
+ {
1501
+ kind: "arg";
1502
+ path: "tokenMint";
1503
+ }
1504
+ ];
1505
+ };
1506
+ },
1507
+ {
1508
+ name: "magicProgram";
1509
+ address: "Magic11111111111111111111111111111111111111";
1510
+ },
1511
+ {
1512
+ name: "magicContext";
1513
+ writable: true;
1514
+ address: "MagicContext1111111111111111111111111111111";
1515
+ }
1516
+ ];
1517
+ args: [
1518
+ {
1519
+ name: "username";
1520
+ type: "string";
1521
+ },
1522
+ {
1523
+ name: "tokenMint";
1524
+ type: "pubkey";
1525
+ }
1526
+ ];
1527
+ }
1528
+ ];
1529
+ accounts: [
1530
+ {
1531
+ name: "deposit";
1532
+ discriminator: [148, 146, 121, 66, 207, 173, 21, 227];
1533
+ },
1534
+ {
1535
+ name: "sessionToken";
1536
+ discriminator: [233, 4, 115, 14, 46, 21, 1, 15];
1537
+ },
1538
+ {
1539
+ name: "telegramSession";
1540
+ discriminator: [166, 166, 101, 241, 97, 253, 72, 138];
1541
+ },
1542
+ {
1543
+ name: "usernameDeposit";
1544
+ discriminator: [242, 23, 53, 35, 55, 192, 177, 246];
1545
+ },
1546
+ {
1547
+ name: "vault";
1548
+ discriminator: [211, 8, 232, 43, 2, 152, 117, 119];
1549
+ }
1550
+ ];
1551
+ errors: [
1552
+ {
1553
+ code: 6000;
1554
+ name: "unauthorized";
1555
+ msg: "Unauthorized";
1556
+ },
1557
+ {
1558
+ code: 6001;
1559
+ name: "overflow";
1560
+ msg: "Overflow";
1561
+ },
1562
+ {
1563
+ code: 6002;
1564
+ name: "invalidMint";
1565
+ msg: "Invalid Mint";
1566
+ },
1567
+ {
1568
+ code: 6003;
1569
+ name: "insufficientVault";
1570
+ msg: "Insufficient Vault";
1571
+ },
1572
+ {
1573
+ code: 6004;
1574
+ name: "insufficientDeposit";
1575
+ msg: "Insufficient Deposit";
1576
+ },
1577
+ {
1578
+ code: 6005;
1579
+ name: "notVerified";
1580
+ msg: "Not Verified";
1581
+ },
1582
+ {
1583
+ code: 6006;
1584
+ name: "expiredSignature";
1585
+ msg: "Expired Signature";
1586
+ },
1587
+ {
1588
+ code: 6007;
1589
+ name: "replay";
1590
+ msg: "Replay";
1591
+ },
1592
+ {
1593
+ code: 6008;
1594
+ name: "invalidEd25519";
1595
+ msg: "Invalid Ed25519";
1596
+ },
1597
+ {
1598
+ code: 6009;
1599
+ name: "invalidUsername";
1600
+ msg: "Invalid Username";
1601
+ },
1602
+ {
1603
+ code: 6010;
1604
+ name: "invalidRecipient";
1605
+ msg: "Invalid Recipient";
1606
+ },
1607
+ {
1608
+ code: 6011;
1609
+ name: "invalidDepositor";
1610
+ msg: "Invalid Depositor";
1611
+ }
1612
+ ];
1613
+ types: [
1614
+ {
1615
+ name: "deposit";
1616
+ docs: ["A deposit account for a user and token mint."];
1617
+ type: {
1618
+ kind: "struct";
1619
+ fields: [
1620
+ {
1621
+ name: "user";
1622
+ type: "pubkey";
1623
+ },
1624
+ {
1625
+ name: "tokenMint";
1626
+ type: "pubkey";
1627
+ },
1628
+ {
1629
+ name: "amount";
1630
+ type: "u64";
1631
+ }
1632
+ ];
1633
+ };
1634
+ },
1635
+ {
1636
+ name: "modifyDepositArgs";
1637
+ type: {
1638
+ kind: "struct";
1639
+ fields: [
1640
+ {
1641
+ name: "amount";
1642
+ type: "u64";
1643
+ },
1644
+ {
1645
+ name: "increase";
1646
+ type: "bool";
1647
+ }
1648
+ ];
1649
+ };
1650
+ },
1651
+ {
1652
+ name: "sessionToken";
1653
+ type: {
1654
+ kind: "struct";
1655
+ fields: [
1656
+ {
1657
+ name: "authority";
1658
+ type: "pubkey";
1659
+ },
1660
+ {
1661
+ name: "targetProgram";
1662
+ type: "pubkey";
1663
+ },
1664
+ {
1665
+ name: "sessionSigner";
1666
+ type: "pubkey";
1667
+ },
1668
+ {
1669
+ name: "validUntil";
1670
+ type: "i64";
1671
+ }
1672
+ ];
1673
+ };
1674
+ },
1675
+ {
1676
+ name: "telegramSession";
1677
+ type: {
1678
+ kind: "struct";
1679
+ fields: [
1680
+ {
1681
+ name: "userWallet";
1682
+ type: "pubkey";
1683
+ },
1684
+ {
1685
+ name: "username";
1686
+ type: "string";
1687
+ },
1688
+ {
1689
+ name: "validationBytes";
1690
+ type: "bytes";
1691
+ },
1692
+ {
1693
+ name: "verified";
1694
+ type: "bool";
1695
+ },
1696
+ {
1697
+ name: "authAt";
1698
+ type: "u64";
1699
+ },
1700
+ {
1701
+ name: "verifiedAt";
1702
+ type: {
1703
+ option: "u64";
1704
+ };
1705
+ }
1706
+ ];
1707
+ };
1708
+ },
1709
+ {
1710
+ name: "usernameDeposit";
1711
+ docs: ["A deposit account for a telegram username and token mint."];
1712
+ type: {
1713
+ kind: "struct";
1714
+ fields: [
1715
+ {
1716
+ name: "username";
1717
+ type: "string";
1718
+ },
1719
+ {
1720
+ name: "tokenMint";
1721
+ type: "pubkey";
1722
+ },
1723
+ {
1724
+ name: "amount";
1725
+ type: "u64";
1726
+ }
1727
+ ];
1728
+ };
1729
+ },
1730
+ {
1731
+ name: "vault";
1732
+ docs: [
1733
+ "A vault storing deposited tokens.",
1734
+ "Has a dummy field because Anchor requires it."
1735
+ ];
1736
+ type: {
1737
+ kind: "struct";
1738
+ fields: [
1739
+ {
1740
+ name: "dummy";
1741
+ type: "u8";
1742
+ }
1743
+ ];
1744
+ };
1745
+ }
1746
+ ];
1747
+ };
1748
+ /**
1749
+ * Bundled IDL constant for the Telegram Private Transfer program
1750
+ */
1751
+ export declare const IDL: TelegramPrivateTransfer;