@triadxyz/poseidons-protocol 0.0.1

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,893 @@
1
+ /**
2
+ * Program IDL in camelCase format in order to be used in JS/TS.
3
+ *
4
+ * Note that this is only a type helper and is not the actual IDL. The original
5
+ * IDL can be found at `target/idl/poseidons_protocol.json`.
6
+ */
7
+ export type PoseidonsProtocol = {
8
+ address: 'E65MHJjJT2ihTLgMfHdWtsNYMA6iJsCjraf7UrxU2sDP';
9
+ metadata: {
10
+ name: 'poseidonsProtocol';
11
+ version: '0.1.0';
12
+ spec: '0.1.0';
13
+ description: 'Created with Anchor';
14
+ };
15
+ instructions: [
16
+ {
17
+ name: 'addPoseidonPower';
18
+ discriminator: [38, 32, 48, 65, 104, 150, 57, 10];
19
+ accounts: [
20
+ {
21
+ name: 'owner';
22
+ writable: true;
23
+ signer: true;
24
+ },
25
+ {
26
+ name: 'poseidon';
27
+ writable: true;
28
+ pda: {
29
+ seeds: [
30
+ {
31
+ kind: 'const';
32
+ value: [112, 111, 115, 101, 105, 100, 111, 110];
33
+ },
34
+ {
35
+ kind: 'account';
36
+ path: 'poseidonAsset';
37
+ }
38
+ ];
39
+ };
40
+ },
41
+ {
42
+ name: 'poseidonAsset';
43
+ writable: true;
44
+ },
45
+ {
46
+ name: 'corePoseidonCollection';
47
+ writable: true;
48
+ },
49
+ {
50
+ name: 'mint';
51
+ writable: true;
52
+ address: 't3DohmswhKk94PPbPYwA6ZKACyY3y5kbcqeQerAJjmV';
53
+ },
54
+ {
55
+ name: 'ownerAta';
56
+ writable: true;
57
+ pda: {
58
+ seeds: [
59
+ {
60
+ kind: 'account';
61
+ path: 'owner';
62
+ },
63
+ {
64
+ kind: 'account';
65
+ path: 'tokenProgram';
66
+ },
67
+ {
68
+ kind: 'account';
69
+ path: 'mint';
70
+ }
71
+ ];
72
+ program: {
73
+ kind: 'const';
74
+ value: [
75
+ 140,
76
+ 151,
77
+ 37,
78
+ 143,
79
+ 78,
80
+ 36,
81
+ 137,
82
+ 241,
83
+ 187,
84
+ 61,
85
+ 16,
86
+ 41,
87
+ 20,
88
+ 142,
89
+ 13,
90
+ 131,
91
+ 11,
92
+ 90,
93
+ 19,
94
+ 153,
95
+ 218,
96
+ 255,
97
+ 16,
98
+ 132,
99
+ 4,
100
+ 142,
101
+ 123,
102
+ 216,
103
+ 219,
104
+ 233,
105
+ 248,
106
+ 89
107
+ ];
108
+ };
109
+ };
110
+ },
111
+ {
112
+ name: 'metaplexProgram';
113
+ address: 'CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d';
114
+ },
115
+ {
116
+ name: 'tokenProgram';
117
+ address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
118
+ },
119
+ {
120
+ name: 'associatedTokenProgram';
121
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
122
+ },
123
+ {
124
+ name: 'systemProgram';
125
+ address: '11111111111111111111111111111111';
126
+ }
127
+ ];
128
+ args: [
129
+ {
130
+ name: 'trdToBurn';
131
+ type: 'u64';
132
+ }
133
+ ];
134
+ },
135
+ {
136
+ name: 'addPoseidonRewards';
137
+ discriminator: [84, 16, 124, 247, 51, 159, 148, 92];
138
+ accounts: [
139
+ {
140
+ name: 'signer';
141
+ writable: true;
142
+ signer: true;
143
+ },
144
+ {
145
+ name: 'poseidon';
146
+ writable: true;
147
+ },
148
+ {
149
+ name: 'systemProgram';
150
+ address: '11111111111111111111111111111111';
151
+ }
152
+ ];
153
+ args: [
154
+ {
155
+ name: 'rewards';
156
+ type: 'u64';
157
+ }
158
+ ];
159
+ },
160
+ {
161
+ name: 'addPoseidonVaultRewards';
162
+ discriminator: [73, 180, 247, 5, 208, 97, 242, 165];
163
+ accounts: [
164
+ {
165
+ name: 'signer';
166
+ writable: true;
167
+ signer: true;
168
+ },
169
+ {
170
+ name: 'poseidonVault';
171
+ writable: true;
172
+ pda: {
173
+ seeds: [
174
+ {
175
+ kind: 'const';
176
+ value: [
177
+ 112,
178
+ 111,
179
+ 115,
180
+ 101,
181
+ 105,
182
+ 100,
183
+ 111,
184
+ 110,
185
+ 95,
186
+ 118,
187
+ 97,
188
+ 117,
189
+ 108,
190
+ 116
191
+ ];
192
+ }
193
+ ];
194
+ };
195
+ },
196
+ {
197
+ name: 'mint';
198
+ writable: true;
199
+ address: 't3DohmswhKk94PPbPYwA6ZKACyY3y5kbcqeQerAJjmV';
200
+ },
201
+ {
202
+ name: 'userAta';
203
+ writable: true;
204
+ pda: {
205
+ seeds: [
206
+ {
207
+ kind: 'account';
208
+ path: 'signer';
209
+ },
210
+ {
211
+ kind: 'account';
212
+ path: 'tokenProgram';
213
+ },
214
+ {
215
+ kind: 'account';
216
+ path: 'mint';
217
+ }
218
+ ];
219
+ program: {
220
+ kind: 'const';
221
+ value: [
222
+ 140,
223
+ 151,
224
+ 37,
225
+ 143,
226
+ 78,
227
+ 36,
228
+ 137,
229
+ 241,
230
+ 187,
231
+ 61,
232
+ 16,
233
+ 41,
234
+ 20,
235
+ 142,
236
+ 13,
237
+ 131,
238
+ 11,
239
+ 90,
240
+ 19,
241
+ 153,
242
+ 218,
243
+ 255,
244
+ 16,
245
+ 132,
246
+ 4,
247
+ 142,
248
+ 123,
249
+ 216,
250
+ 219,
251
+ 233,
252
+ 248,
253
+ 89
254
+ ];
255
+ };
256
+ };
257
+ },
258
+ {
259
+ name: 'poseidonVaultAta';
260
+ writable: true;
261
+ pda: {
262
+ seeds: [
263
+ {
264
+ kind: 'account';
265
+ path: 'poseidonVault';
266
+ },
267
+ {
268
+ kind: 'account';
269
+ path: 'tokenProgram';
270
+ },
271
+ {
272
+ kind: 'account';
273
+ path: 'mint';
274
+ }
275
+ ];
276
+ program: {
277
+ kind: 'const';
278
+ value: [
279
+ 140,
280
+ 151,
281
+ 37,
282
+ 143,
283
+ 78,
284
+ 36,
285
+ 137,
286
+ 241,
287
+ 187,
288
+ 61,
289
+ 16,
290
+ 41,
291
+ 20,
292
+ 142,
293
+ 13,
294
+ 131,
295
+ 11,
296
+ 90,
297
+ 19,
298
+ 153,
299
+ 218,
300
+ 255,
301
+ 16,
302
+ 132,
303
+ 4,
304
+ 142,
305
+ 123,
306
+ 216,
307
+ 219,
308
+ 233,
309
+ 248,
310
+ 89
311
+ ];
312
+ };
313
+ };
314
+ },
315
+ {
316
+ name: 'tokenProgram';
317
+ address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
318
+ },
319
+ {
320
+ name: 'associatedTokenProgram';
321
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
322
+ },
323
+ {
324
+ name: 'systemProgram';
325
+ address: '11111111111111111111111111111111';
326
+ }
327
+ ];
328
+ args: [
329
+ {
330
+ name: 'amount';
331
+ type: 'u64';
332
+ }
333
+ ];
334
+ },
335
+ {
336
+ name: 'claimPoseidonRewards';
337
+ discriminator: [33, 115, 129, 128, 105, 140, 63, 92];
338
+ accounts: [
339
+ {
340
+ name: 'owner';
341
+ writable: true;
342
+ signer: true;
343
+ relations: ['poseidonAsset'];
344
+ },
345
+ {
346
+ name: 'squads';
347
+ writable: true;
348
+ address: 'FfL6Un8E1BZRskhG8gVG5XWbpvBX1RjAJ7FEWpA78ysz';
349
+ },
350
+ {
351
+ name: 'poseidonVault';
352
+ writable: true;
353
+ pda: {
354
+ seeds: [
355
+ {
356
+ kind: 'const';
357
+ value: [
358
+ 112,
359
+ 111,
360
+ 115,
361
+ 101,
362
+ 105,
363
+ 100,
364
+ 111,
365
+ 110,
366
+ 95,
367
+ 118,
368
+ 97,
369
+ 117,
370
+ 108,
371
+ 116
372
+ ];
373
+ }
374
+ ];
375
+ };
376
+ },
377
+ {
378
+ name: 'poseidon';
379
+ writable: true;
380
+ pda: {
381
+ seeds: [
382
+ {
383
+ kind: 'const';
384
+ value: [112, 111, 115, 101, 105, 100, 111, 110];
385
+ },
386
+ {
387
+ kind: 'account';
388
+ path: 'poseidonAsset';
389
+ }
390
+ ];
391
+ };
392
+ },
393
+ {
394
+ name: 'poseidonAsset';
395
+ writable: true;
396
+ },
397
+ {
398
+ name: 'corePoseidonCollection';
399
+ writable: true;
400
+ },
401
+ {
402
+ name: 'mint';
403
+ writable: true;
404
+ address: 't3DohmswhKk94PPbPYwA6ZKACyY3y5kbcqeQerAJjmV';
405
+ },
406
+ {
407
+ name: 'poseidonVaultAta';
408
+ writable: true;
409
+ pda: {
410
+ seeds: [
411
+ {
412
+ kind: 'account';
413
+ path: 'poseidonVault';
414
+ },
415
+ {
416
+ kind: 'account';
417
+ path: 'tokenProgram';
418
+ },
419
+ {
420
+ kind: 'account';
421
+ path: 'mint';
422
+ }
423
+ ];
424
+ program: {
425
+ kind: 'const';
426
+ value: [
427
+ 140,
428
+ 151,
429
+ 37,
430
+ 143,
431
+ 78,
432
+ 36,
433
+ 137,
434
+ 241,
435
+ 187,
436
+ 61,
437
+ 16,
438
+ 41,
439
+ 20,
440
+ 142,
441
+ 13,
442
+ 131,
443
+ 11,
444
+ 90,
445
+ 19,
446
+ 153,
447
+ 218,
448
+ 255,
449
+ 16,
450
+ 132,
451
+ 4,
452
+ 142,
453
+ 123,
454
+ 216,
455
+ 219,
456
+ 233,
457
+ 248,
458
+ 89
459
+ ];
460
+ };
461
+ };
462
+ },
463
+ {
464
+ name: 'ownerAta';
465
+ writable: true;
466
+ pda: {
467
+ seeds: [
468
+ {
469
+ kind: 'account';
470
+ path: 'owner';
471
+ },
472
+ {
473
+ kind: 'account';
474
+ path: 'tokenProgram';
475
+ },
476
+ {
477
+ kind: 'account';
478
+ path: 'mint';
479
+ }
480
+ ];
481
+ program: {
482
+ kind: 'const';
483
+ value: [
484
+ 140,
485
+ 151,
486
+ 37,
487
+ 143,
488
+ 78,
489
+ 36,
490
+ 137,
491
+ 241,
492
+ 187,
493
+ 61,
494
+ 16,
495
+ 41,
496
+ 20,
497
+ 142,
498
+ 13,
499
+ 131,
500
+ 11,
501
+ 90,
502
+ 19,
503
+ 153,
504
+ 218,
505
+ 255,
506
+ 16,
507
+ 132,
508
+ 4,
509
+ 142,
510
+ 123,
511
+ 216,
512
+ 219,
513
+ 233,
514
+ 248,
515
+ 89
516
+ ];
517
+ };
518
+ };
519
+ },
520
+ {
521
+ name: 'metaplexProgram';
522
+ address: 'CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d';
523
+ },
524
+ {
525
+ name: 'tokenProgram';
526
+ address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
527
+ },
528
+ {
529
+ name: 'associatedTokenProgram';
530
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
531
+ },
532
+ {
533
+ name: 'systemProgram';
534
+ address: '11111111111111111111111111111111';
535
+ }
536
+ ];
537
+ args: [];
538
+ },
539
+ {
540
+ name: 'createPoseidon';
541
+ discriminator: [59, 147, 154, 129, 146, 108, 228, 133];
542
+ accounts: [
543
+ {
544
+ name: 'signer';
545
+ writable: true;
546
+ signer: true;
547
+ },
548
+ {
549
+ name: 'poseidon';
550
+ writable: true;
551
+ pda: {
552
+ seeds: [
553
+ {
554
+ kind: 'const';
555
+ value: [112, 111, 115, 101, 105, 100, 111, 110];
556
+ },
557
+ {
558
+ kind: 'account';
559
+ path: 'poseidonAsset';
560
+ }
561
+ ];
562
+ };
563
+ },
564
+ {
565
+ name: 'poseidonAsset';
566
+ writable: true;
567
+ },
568
+ {
569
+ name: 'metaplexProgram';
570
+ address: 'CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d';
571
+ },
572
+ {
573
+ name: 'systemProgram';
574
+ address: '11111111111111111111111111111111';
575
+ }
576
+ ];
577
+ args: [
578
+ {
579
+ name: 'args';
580
+ type: {
581
+ defined: {
582
+ name: 'createPoseidonArgs';
583
+ };
584
+ };
585
+ }
586
+ ];
587
+ }
588
+ ];
589
+ accounts: [
590
+ {
591
+ name: 'baseAssetV1';
592
+ discriminator: [0, 0, 0, 0, 0, 0, 0, 0];
593
+ },
594
+ {
595
+ name: 'baseCollectionV1';
596
+ discriminator: [0, 0, 0, 0, 0, 0, 0, 0];
597
+ },
598
+ {
599
+ name: 'poseidon';
600
+ discriminator: [7, 171, 193, 108, 245, 231, 215, 197];
601
+ },
602
+ {
603
+ name: 'poseidonVault';
604
+ discriminator: [62, 239, 250, 136, 100, 214, 169, 128];
605
+ }
606
+ ];
607
+ events: [
608
+ {
609
+ name: 'poseidonPowerEvent';
610
+ discriminator: [152, 36, 126, 105, 151, 203, 242, 60];
611
+ },
612
+ {
613
+ name: 'poseidonRewardsEvent';
614
+ discriminator: [93, 26, 205, 192, 107, 244, 92, 119];
615
+ }
616
+ ];
617
+ errors: [
618
+ {
619
+ code: 6000;
620
+ name: 'invalidTrdToBurn';
621
+ msg: 'Invalid TRD to burn';
622
+ }
623
+ ];
624
+ types: [
625
+ {
626
+ name: 'baseAssetV1';
627
+ type: {
628
+ kind: 'struct';
629
+ fields: [
630
+ {
631
+ name: 'key';
632
+ type: {
633
+ defined: {
634
+ name: 'key';
635
+ };
636
+ };
637
+ },
638
+ {
639
+ name: 'owner';
640
+ type: 'pubkey';
641
+ },
642
+ {
643
+ name: 'updateAuthority';
644
+ type: {
645
+ defined: {
646
+ name: 'updateAuthority';
647
+ };
648
+ };
649
+ },
650
+ {
651
+ name: 'name';
652
+ type: 'string';
653
+ },
654
+ {
655
+ name: 'uri';
656
+ type: 'string';
657
+ },
658
+ {
659
+ name: 'seq';
660
+ type: {
661
+ option: 'u64';
662
+ };
663
+ }
664
+ ];
665
+ };
666
+ },
667
+ {
668
+ name: 'baseCollectionV1';
669
+ type: {
670
+ kind: 'struct';
671
+ fields: [
672
+ {
673
+ name: 'key';
674
+ type: {
675
+ defined: {
676
+ name: 'key';
677
+ };
678
+ };
679
+ },
680
+ {
681
+ name: 'updateAuthority';
682
+ type: 'pubkey';
683
+ },
684
+ {
685
+ name: 'name';
686
+ type: 'string';
687
+ },
688
+ {
689
+ name: 'uri';
690
+ type: 'string';
691
+ },
692
+ {
693
+ name: 'numMinted';
694
+ type: 'u32';
695
+ },
696
+ {
697
+ name: 'currentSize';
698
+ type: 'u32';
699
+ }
700
+ ];
701
+ };
702
+ },
703
+ {
704
+ name: 'createPoseidonArgs';
705
+ type: {
706
+ kind: 'struct';
707
+ fields: [
708
+ {
709
+ name: 'power';
710
+ type: 'u64';
711
+ },
712
+ {
713
+ name: 'number';
714
+ type: 'u16';
715
+ }
716
+ ];
717
+ };
718
+ },
719
+ {
720
+ name: 'key';
721
+ type: {
722
+ kind: 'enum';
723
+ variants: [
724
+ {
725
+ name: 'uninitialized';
726
+ },
727
+ {
728
+ name: 'assetV1';
729
+ },
730
+ {
731
+ name: 'hashedAssetV1';
732
+ },
733
+ {
734
+ name: 'pluginHeaderV1';
735
+ },
736
+ {
737
+ name: 'pluginRegistryV1';
738
+ },
739
+ {
740
+ name: 'collectionV1';
741
+ }
742
+ ];
743
+ };
744
+ },
745
+ {
746
+ name: 'poseidon';
747
+ type: {
748
+ kind: 'struct';
749
+ fields: [
750
+ {
751
+ name: 'bump';
752
+ type: 'u8';
753
+ },
754
+ {
755
+ name: 'nftMint';
756
+ type: 'pubkey';
757
+ },
758
+ {
759
+ name: 'rewardsClaimed';
760
+ type: 'u64';
761
+ },
762
+ {
763
+ name: 'rewardsAvailable';
764
+ type: 'u64';
765
+ },
766
+ {
767
+ name: 'power';
768
+ type: 'u64';
769
+ },
770
+ {
771
+ name: 'trdBurned';
772
+ type: 'u64';
773
+ },
774
+ {
775
+ name: 'number';
776
+ type: 'u16';
777
+ },
778
+ {
779
+ name: 'padding';
780
+ type: {
781
+ array: ['u8', 22];
782
+ };
783
+ }
784
+ ];
785
+ };
786
+ },
787
+ {
788
+ name: 'poseidonPowerEvent';
789
+ type: {
790
+ kind: 'struct';
791
+ fields: [
792
+ {
793
+ name: 'user';
794
+ type: 'pubkey';
795
+ },
796
+ {
797
+ name: 'nftMint';
798
+ type: 'pubkey';
799
+ },
800
+ {
801
+ name: 'power';
802
+ type: 'u64';
803
+ },
804
+ {
805
+ name: 'trdBurned';
806
+ type: 'u64';
807
+ },
808
+ {
809
+ name: 'timestamp';
810
+ type: 'i64';
811
+ }
812
+ ];
813
+ };
814
+ },
815
+ {
816
+ name: 'poseidonRewardsEvent';
817
+ type: {
818
+ kind: 'struct';
819
+ fields: [
820
+ {
821
+ name: 'user';
822
+ type: 'pubkey';
823
+ },
824
+ {
825
+ name: 'nftMint';
826
+ type: 'pubkey';
827
+ },
828
+ {
829
+ name: 'amount';
830
+ type: 'u64';
831
+ },
832
+ {
833
+ name: 'timestamp';
834
+ type: 'i64';
835
+ }
836
+ ];
837
+ };
838
+ },
839
+ {
840
+ name: 'poseidonVault';
841
+ type: {
842
+ kind: 'struct';
843
+ fields: [
844
+ {
845
+ name: 'bump';
846
+ type: 'u8';
847
+ },
848
+ {
849
+ name: 'authority';
850
+ type: 'pubkey';
851
+ },
852
+ {
853
+ name: 'amount';
854
+ type: 'u64';
855
+ },
856
+ {
857
+ name: 'amountPaid';
858
+ type: 'u64';
859
+ },
860
+ {
861
+ name: 'name';
862
+ type: 'string';
863
+ },
864
+ {
865
+ name: 'padding';
866
+ type: {
867
+ array: ['u8', 128];
868
+ };
869
+ }
870
+ ];
871
+ };
872
+ },
873
+ {
874
+ name: 'updateAuthority';
875
+ type: {
876
+ kind: 'enum';
877
+ variants: [
878
+ {
879
+ name: 'none';
880
+ },
881
+ {
882
+ name: 'address';
883
+ fields: ['pubkey'];
884
+ },
885
+ {
886
+ name: 'collection';
887
+ fields: ['pubkey'];
888
+ }
889
+ ];
890
+ };
891
+ }
892
+ ];
893
+ };