flipmeme-sdk 1.1.6 → 1.1.7

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
@@ -1,9 +1,8 @@
1
1
  import * as bn_js from 'bn.js';
2
2
  import * as _solana_web3_js from '@solana/web3.js';
3
- import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature, VersionedTransactionResponse } from '@solana/web3.js';
4
- import { AnchorProvider, Program } from '@coral-xyz/anchor';
3
+ import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature } from '@solana/web3.js';
4
+ import { AnchorProvider } from '@coral-xyz/anchor';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
- import { Decimal } from 'decimal.js';
7
6
 
8
7
  declare enum BlockchainType {
9
8
  SOLANA = "solana",
@@ -118,7 +117,7 @@ declare class FlipmemeSDK {
118
117
  flipSell(params: SellParams): Promise<SellResponse[]>;
119
118
  profileSell(data: ProfileSellParams): Promise<SellResponse[]>;
120
119
  buyCredit(params: BuyCreditParams): Promise<string>;
121
- getTotalPrice(type: PurcahseTye, collectionId: string, amount: number, mint?: number): Promise<string>;
120
+ getTotalPrice(type: PurcahseTye, collectionId: string, amount: number): Promise<string>;
122
121
  /**For testing */
123
122
  getStateInfo(): Promise<{
124
123
  admin: _solana_web3_js.PublicKey;
@@ -141,6 +140,7 @@ declare class FlipmemeSDK {
141
140
  };
142
141
  creator: _solana_web3_js.PublicKey;
143
142
  totalSol: bn_js;
143
+ totalSupply: number;
144
144
  mintCount: number;
145
145
  id: number;
146
146
  sellerFeeBasisPoints: number;
@@ -155,1797 +155,4 @@ declare class FlipmemeSDK {
155
155
  getTransactionTest(signature: string): Promise<BuyResponse[]>;
156
156
  }
157
157
 
158
- /**
159
- * Program IDL in camelCase format in order to be used in JS/TS.
160
- *
161
- * Note that this is only a type helper and is not the actual IDL. The original
162
- * IDL can be found at `target/idl/flipmeme_program_new.json`.
163
- */
164
- type FlipmemeProgramNew = {
165
- "address": "2KHXGcVHjnuEqw7ZrwPBXdPzrG4bWY24QPAvhRmQ1s8c";
166
- "metadata": {
167
- "name": "flipmemeProgramNew";
168
- "version": "0.1.0";
169
- "spec": "0.1.0";
170
- "description": "Flipmeme main program";
171
- };
172
- "instructions": [
173
- {
174
- "name": "buy";
175
- "docs": [
176
- "Buy",
177
- "",
178
- "# Arguments",
179
- "",
180
- "* `ctx` - The Anchor context holding the accounts",
181
- "* `token_id` - The token_id of the NFT that will be purchased from the pool or if we're minting it'll be",
182
- "the token id of the new NFT"
183
- ];
184
- "discriminator": [
185
- 102,
186
- 6,
187
- 61,
188
- 18,
189
- 1,
190
- 218,
191
- 235,
192
- 234
193
- ];
194
- "accounts": [
195
- {
196
- "name": "state";
197
- },
198
- {
199
- "name": "collection";
200
- "writable": true;
201
- "pda": {
202
- "seeds": [
203
- {
204
- "kind": "const";
205
- "value": [
206
- 99,
207
- 111,
208
- 108,
209
- 108,
210
- 101,
211
- 99,
212
- 116,
213
- 105,
214
- 111,
215
- 110
216
- ];
217
- },
218
- {
219
- "kind": "account";
220
- "path": "state";
221
- },
222
- {
223
- "kind": "account";
224
- "path": "collection";
225
- }
226
- ];
227
- };
228
- },
229
- {
230
- "name": "collectionNft";
231
- "writable": true;
232
- "pda": {
233
- "seeds": [
234
- {
235
- "kind": "const";
236
- "value": [
237
- 99,
238
- 111,
239
- 108,
240
- 108,
241
- 101,
242
- 99,
243
- 116,
244
- 105,
245
- 111,
246
- 110,
247
- 95,
248
- 110,
249
- 102,
250
- 116
251
- ];
252
- },
253
- {
254
- "kind": "account";
255
- "path": "collection";
256
- }
257
- ];
258
- };
259
- },
260
- {
261
- "name": "treasury";
262
- "writable": true;
263
- },
264
- {
265
- "name": "nftHolder";
266
- "docs": [
267
- "directly but rather we store them in a PDA which they control (buyer is part of the seeds). When the curve",
268
- "is closed they can \"eject\" and transfer the NFT from this PDA to their final token account which they can use",
269
- "on other platforms"
270
- ];
271
- "writable": true;
272
- "pda": {
273
- "seeds": [
274
- {
275
- "kind": "const";
276
- "value": [
277
- 110,
278
- 102,
279
- 116,
280
- 95,
281
- 104,
282
- 111,
283
- 108,
284
- 100,
285
- 101,
286
- 114
287
- ];
288
- },
289
- {
290
- "kind": "account";
291
- "path": "state";
292
- },
293
- {
294
- "kind": "account";
295
- "path": "buyer";
296
- }
297
- ];
298
- };
299
- },
300
- {
301
- "name": "nft";
302
- "writable": true;
303
- "pda": {
304
- "seeds": [
305
- {
306
- "kind": "const";
307
- "value": [
308
- 110,
309
- 102,
310
- 116
311
- ];
312
- },
313
- {
314
- "kind": "account";
315
- "path": "state";
316
- },
317
- {
318
- "kind": "account";
319
- "path": "collection";
320
- },
321
- {
322
- "kind": "arg";
323
- "path": "tokenId";
324
- }
325
- ];
326
- };
327
- },
328
- {
329
- "name": "buyer";
330
- "docs": [
331
- "The user that is creating the token"
332
- ];
333
- "writable": true;
334
- "signer": true;
335
- },
336
- {
337
- "name": "mplCore";
338
- "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
339
- },
340
- {
341
- "name": "systemProgram";
342
- "address": "11111111111111111111111111111111";
343
- },
344
- {
345
- "name": "eventAuthority";
346
- "pda": {
347
- "seeds": [
348
- {
349
- "kind": "const";
350
- "value": [
351
- 95,
352
- 95,
353
- 101,
354
- 118,
355
- 101,
356
- 110,
357
- 116,
358
- 95,
359
- 97,
360
- 117,
361
- 116,
362
- 104,
363
- 111,
364
- 114,
365
- 105,
366
- 116,
367
- 121
368
- ];
369
- }
370
- ];
371
- };
372
- },
373
- {
374
- "name": "program";
375
- }
376
- ];
377
- "args": [
378
- {
379
- "name": "tokenId";
380
- "type": "u32";
381
- }
382
- ];
383
- },
384
- {
385
- "name": "createCollection";
386
- "docs": [
387
- "CreateCollection",
388
- "",
389
- "# Arguments",
390
- "",
391
- "* `ctx` - The Anchor context holding the accounts",
392
- "* `session_id` - The session id which exists in backend side",
393
- "* `name` - The name of the collection",
394
- "* `uri` - The uri of the collection metadata",
395
- "* `start_price` - The start price of the curve",
396
- "* `end_price` - The end price of the curve",
397
- "* `total_supply` - The total number of NFTs that will be minted in this collection"
398
- ];
399
- "discriminator": [
400
- 156,
401
- 251,
402
- 92,
403
- 54,
404
- 233,
405
- 2,
406
- 16,
407
- 82
408
- ];
409
- "accounts": [
410
- {
411
- "name": "state";
412
- "writable": true;
413
- },
414
- {
415
- "name": "collection";
416
- "writable": true;
417
- "pda": {
418
- "seeds": [
419
- {
420
- "kind": "const";
421
- "value": [
422
- 99,
423
- 111,
424
- 108,
425
- 108,
426
- 101,
427
- 99,
428
- 116,
429
- 105,
430
- 111,
431
- 110
432
- ];
433
- },
434
- {
435
- "kind": "account";
436
- "path": "state";
437
- },
438
- {
439
- "kind": "account";
440
- "path": "state";
441
- }
442
- ];
443
- };
444
- },
445
- {
446
- "name": "collectionNft";
447
- "writable": true;
448
- "pda": {
449
- "seeds": [
450
- {
451
- "kind": "const";
452
- "value": [
453
- 99,
454
- 111,
455
- 108,
456
- 108,
457
- 101,
458
- 99,
459
- 116,
460
- 105,
461
- 111,
462
- 110,
463
- 95,
464
- 110,
465
- 102,
466
- 116
467
- ];
468
- },
469
- {
470
- "kind": "account";
471
- "path": "collection";
472
- }
473
- ];
474
- };
475
- },
476
- {
477
- "name": "creator";
478
- "docs": [
479
- "The user that is creating the token"
480
- ];
481
- "writable": true;
482
- "signer": true;
483
- },
484
- {
485
- "name": "mplCore";
486
- "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
487
- },
488
- {
489
- "name": "systemProgram";
490
- "address": "11111111111111111111111111111111";
491
- },
492
- {
493
- "name": "eventAuthority";
494
- "pda": {
495
- "seeds": [
496
- {
497
- "kind": "const";
498
- "value": [
499
- 95,
500
- 95,
501
- 101,
502
- 118,
503
- 101,
504
- 110,
505
- 116,
506
- 95,
507
- 97,
508
- 117,
509
- 116,
510
- 104,
511
- 111,
512
- 114,
513
- 105,
514
- 116,
515
- 121
516
- ];
517
- }
518
- ];
519
- };
520
- },
521
- {
522
- "name": "program";
523
- }
524
- ];
525
- "args": [
526
- {
527
- "name": "sessionId";
528
- "type": "string";
529
- },
530
- {
531
- "name": "name";
532
- "type": "string";
533
- },
534
- {
535
- "name": "uri";
536
- "type": "string";
537
- },
538
- {
539
- "name": "totalSupply";
540
- "type": "u32";
541
- },
542
- {
543
- "name": "startPrice";
544
- "type": "u64";
545
- },
546
- {
547
- "name": "endPrice";
548
- "type": "u64";
549
- }
550
- ];
551
- },
552
- {
553
- "name": "ejectNft";
554
- "docs": [
555
- "EjectNft: Allows anyone to call it on behald of the nft_holder. It will transfer the NFT from the nft_holder PDA",
556
- "to the owner_pda token account.",
557
- "",
558
- "# Arguments",
559
- "",
560
- "* `ctx` - The Anchor context holding the accounts",
561
- "* `token_id` - The token_id of the NFT"
562
- ];
563
- "discriminator": [
564
- 156,
565
- 103,
566
- 48,
567
- 244,
568
- 1,
569
- 157,
570
- 43,
571
- 67
572
- ];
573
- "accounts": [
574
- {
575
- "name": "state";
576
- },
577
- {
578
- "name": "collection";
579
- "writable": true;
580
- "pda": {
581
- "seeds": [
582
- {
583
- "kind": "const";
584
- "value": [
585
- 99,
586
- 111,
587
- 108,
588
- 108,
589
- 101,
590
- 99,
591
- 116,
592
- 105,
593
- 111,
594
- 110
595
- ];
596
- },
597
- {
598
- "kind": "account";
599
- "path": "state";
600
- },
601
- {
602
- "kind": "account";
603
- "path": "collection";
604
- }
605
- ];
606
- };
607
- },
608
- {
609
- "name": "collectionNft";
610
- "writable": true;
611
- "pda": {
612
- "seeds": [
613
- {
614
- "kind": "const";
615
- "value": [
616
- 99,
617
- 111,
618
- 108,
619
- 108,
620
- 101,
621
- 99,
622
- 116,
623
- 105,
624
- 111,
625
- 110,
626
- 95,
627
- 110,
628
- 102,
629
- 116
630
- ];
631
- },
632
- {
633
- "kind": "account";
634
- "path": "collection";
635
- }
636
- ];
637
- };
638
- },
639
- {
640
- "name": "nftOwner";
641
- },
642
- {
643
- "name": "nftHolder";
644
- "writable": true;
645
- "pda": {
646
- "seeds": [
647
- {
648
- "kind": "const";
649
- "value": [
650
- 110,
651
- 102,
652
- 116,
653
- 95,
654
- 104,
655
- 111,
656
- 108,
657
- 100,
658
- 101,
659
- 114
660
- ];
661
- },
662
- {
663
- "kind": "account";
664
- "path": "state";
665
- },
666
- {
667
- "kind": "account";
668
- "path": "nftOwner";
669
- }
670
- ];
671
- };
672
- },
673
- {
674
- "name": "nft";
675
- "writable": true;
676
- "pda": {
677
- "seeds": [
678
- {
679
- "kind": "const";
680
- "value": [
681
- 110,
682
- 102,
683
- 116
684
- ];
685
- },
686
- {
687
- "kind": "account";
688
- "path": "state";
689
- },
690
- {
691
- "kind": "account";
692
- "path": "collection";
693
- },
694
- {
695
- "kind": "arg";
696
- "path": "tokenId";
697
- }
698
- ];
699
- };
700
- },
701
- {
702
- "name": "operator";
703
- "writable": true;
704
- "signer": true;
705
- },
706
- {
707
- "name": "mplCore";
708
- "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
709
- },
710
- {
711
- "name": "systemProgram";
712
- "address": "11111111111111111111111111111111";
713
- }
714
- ];
715
- "args": [
716
- {
717
- "name": "tokenId";
718
- "type": "u32";
719
- }
720
- ];
721
- },
722
- {
723
- "name": "initialize";
724
- "docs": [
725
- "Initialize",
726
- "",
727
- "# Arguments",
728
- "",
729
- "* `ctx` - The Anchor context holding the accounts",
730
- "* `admin` - The admin of the program",
731
- "* `treasury` - The treasury account that receives fees",
732
- "* `lp_provisioner` - The wallet that will be adding liquidity to the 3rd party NFT marketplace upon curve completion",
733
- "* `protocol_fee_bps` - Current protocol fees (BPS)",
734
- "* `seller_fee_basis_points` - How much in fees should owner receive after resale i.e. royalties"
735
- ];
736
- "discriminator": [
737
- 175,
738
- 175,
739
- 109,
740
- 31,
741
- 13,
742
- 152,
743
- 155,
744
- 237
745
- ];
746
- "accounts": [
747
- {
748
- "name": "state";
749
- "docs": [
750
- "The state account of each instance of this program"
751
- ];
752
- "writable": true;
753
- "signer": true;
754
- },
755
- {
756
- "name": "deployer";
757
- "writable": true;
758
- "signer": true;
759
- },
760
- {
761
- "name": "systemProgram";
762
- "address": "11111111111111111111111111111111";
763
- }
764
- ];
765
- "args": [
766
- {
767
- "name": "admin";
768
- "type": "pubkey";
769
- },
770
- {
771
- "name": "treasury";
772
- "type": "pubkey";
773
- },
774
- {
775
- "name": "lpProvisioner";
776
- "type": "pubkey";
777
- },
778
- {
779
- "name": "protocolFeeBps";
780
- "type": "u16";
781
- },
782
- {
783
- "name": "sellerFeeBasisPoints";
784
- "type": "u16";
785
- }
786
- ];
787
- },
788
- {
789
- "name": "mintAndBuy";
790
- "docs": [
791
- "MintAndBuy",
792
- "",
793
- "# Arguments",
794
- "",
795
- "* `ctx` - The Anchor context holding the accounts",
796
- "the token id of the new NFT",
797
- "* `name` - The name of the NFT",
798
- "* `uri` - The uri of the NFT metadata"
799
- ];
800
- "discriminator": [
801
- 90,
802
- 139,
803
- 38,
804
- 252,
805
- 14,
806
- 71,
807
- 249,
808
- 58
809
- ];
810
- "accounts": [
811
- {
812
- "name": "state";
813
- },
814
- {
815
- "name": "collection";
816
- "writable": true;
817
- "pda": {
818
- "seeds": [
819
- {
820
- "kind": "const";
821
- "value": [
822
- 99,
823
- 111,
824
- 108,
825
- 108,
826
- 101,
827
- 99,
828
- 116,
829
- 105,
830
- 111,
831
- 110
832
- ];
833
- },
834
- {
835
- "kind": "account";
836
- "path": "state";
837
- },
838
- {
839
- "kind": "account";
840
- "path": "collection";
841
- }
842
- ];
843
- };
844
- },
845
- {
846
- "name": "collectionNft";
847
- "writable": true;
848
- "pda": {
849
- "seeds": [
850
- {
851
- "kind": "const";
852
- "value": [
853
- 99,
854
- 111,
855
- 108,
856
- 108,
857
- 101,
858
- 99,
859
- 116,
860
- 105,
861
- 111,
862
- 110,
863
- 95,
864
- 110,
865
- 102,
866
- 116
867
- ];
868
- },
869
- {
870
- "kind": "account";
871
- "path": "collection";
872
- }
873
- ];
874
- };
875
- },
876
- {
877
- "name": "treasury";
878
- "writable": true;
879
- },
880
- {
881
- "name": "nftHolder";
882
- "docs": [
883
- "directly but rather we store them in a PDA which they control (buyer is part of the seeds). When the curve",
884
- "is closed they can \"eject\" and transfer the NFT from this PDA to their final token account which they can use",
885
- "on other platforms"
886
- ];
887
- "writable": true;
888
- "pda": {
889
- "seeds": [
890
- {
891
- "kind": "const";
892
- "value": [
893
- 110,
894
- 102,
895
- 116,
896
- 95,
897
- 104,
898
- 111,
899
- 108,
900
- 100,
901
- 101,
902
- 114
903
- ];
904
- },
905
- {
906
- "kind": "account";
907
- "path": "state";
908
- },
909
- {
910
- "kind": "account";
911
- "path": "buyer";
912
- }
913
- ];
914
- };
915
- },
916
- {
917
- "name": "nft";
918
- "docs": [
919
- "The nft that will be minted and purchased by the buyer"
920
- ];
921
- "writable": true;
922
- "pda": {
923
- "seeds": [
924
- {
925
- "kind": "const";
926
- "value": [
927
- 110,
928
- 102,
929
- 116
930
- ];
931
- },
932
- {
933
- "kind": "account";
934
- "path": "state";
935
- },
936
- {
937
- "kind": "account";
938
- "path": "collection";
939
- },
940
- {
941
- "kind": "account";
942
- "path": "collection";
943
- }
944
- ];
945
- };
946
- },
947
- {
948
- "name": "buyer";
949
- "docs": [
950
- "The user that is creating the token"
951
- ];
952
- "writable": true;
953
- "signer": true;
954
- },
955
- {
956
- "name": "mplCore";
957
- "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
958
- },
959
- {
960
- "name": "systemProgram";
961
- "address": "11111111111111111111111111111111";
962
- },
963
- {
964
- "name": "eventAuthority";
965
- "pda": {
966
- "seeds": [
967
- {
968
- "kind": "const";
969
- "value": [
970
- 95,
971
- 95,
972
- 101,
973
- 118,
974
- 101,
975
- 110,
976
- 116,
977
- 95,
978
- 97,
979
- 117,
980
- 116,
981
- 104,
982
- 111,
983
- 114,
984
- 105,
985
- 116,
986
- 121
987
- ];
988
- }
989
- ];
990
- };
991
- },
992
- {
993
- "name": "program";
994
- }
995
- ];
996
- "args": [
997
- {
998
- "name": "name";
999
- "type": "string";
1000
- },
1001
- {
1002
- "name": "uri";
1003
- "type": "string";
1004
- }
1005
- ];
1006
- },
1007
- {
1008
- "name": "moveLiquidity";
1009
- "docs": [
1010
- "MoveLiquidity",
1011
- "",
1012
- "# Arguments",
1013
- "",
1014
- "* `ctx` - The Anchor context holding the accounts"
1015
- ];
1016
- "discriminator": [
1017
- 20,
1018
- 32,
1019
- 95,
1020
- 239,
1021
- 213,
1022
- 242,
1023
- 237,
1024
- 45
1025
- ];
1026
- "accounts": [
1027
- {
1028
- "name": "state";
1029
- },
1030
- {
1031
- "name": "collection";
1032
- "writable": true;
1033
- "pda": {
1034
- "seeds": [
1035
- {
1036
- "kind": "const";
1037
- "value": [
1038
- 99,
1039
- 111,
1040
- 108,
1041
- 108,
1042
- 101,
1043
- 99,
1044
- 116,
1045
- 105,
1046
- 111,
1047
- 110
1048
- ];
1049
- },
1050
- {
1051
- "kind": "account";
1052
- "path": "state";
1053
- },
1054
- {
1055
- "kind": "account";
1056
- "path": "collection";
1057
- }
1058
- ];
1059
- };
1060
- },
1061
- {
1062
- "name": "treasury";
1063
- "writable": true;
1064
- },
1065
- {
1066
- "name": "collectionCreator";
1067
- "writable": true;
1068
- },
1069
- {
1070
- "name": "lpProvisioner";
1071
- "writable": true;
1072
- },
1073
- {
1074
- "name": "eventAuthority";
1075
- "pda": {
1076
- "seeds": [
1077
- {
1078
- "kind": "const";
1079
- "value": [
1080
- 95,
1081
- 95,
1082
- 101,
1083
- 118,
1084
- 101,
1085
- 110,
1086
- 116,
1087
- 95,
1088
- 97,
1089
- 117,
1090
- 116,
1091
- 104,
1092
- 111,
1093
- 114,
1094
- 105,
1095
- 116,
1096
- 121
1097
- ];
1098
- }
1099
- ];
1100
- };
1101
- },
1102
- {
1103
- "name": "program";
1104
- }
1105
- ];
1106
- "args": [];
1107
- },
1108
- {
1109
- "name": "sell";
1110
- "docs": [
1111
- "Sell",
1112
- "",
1113
- "# Arguments",
1114
- "",
1115
- "* `ctx` - The Anchor context holding the accounts",
1116
- "* `token_id` - The token_id of the NFT that will be purchased from the pool or if we're minting it'll be",
1117
- "the token id of the new NFT"
1118
- ];
1119
- "discriminator": [
1120
- 51,
1121
- 230,
1122
- 133,
1123
- 164,
1124
- 1,
1125
- 127,
1126
- 131,
1127
- 173
1128
- ];
1129
- "accounts": [
1130
- {
1131
- "name": "state";
1132
- },
1133
- {
1134
- "name": "collection";
1135
- "writable": true;
1136
- "pda": {
1137
- "seeds": [
1138
- {
1139
- "kind": "const";
1140
- "value": [
1141
- 99,
1142
- 111,
1143
- 108,
1144
- 108,
1145
- 101,
1146
- 99,
1147
- 116,
1148
- 105,
1149
- 111,
1150
- 110
1151
- ];
1152
- },
1153
- {
1154
- "kind": "account";
1155
- "path": "state";
1156
- },
1157
- {
1158
- "kind": "account";
1159
- "path": "collection";
1160
- }
1161
- ];
1162
- };
1163
- },
1164
- {
1165
- "name": "collectionNft";
1166
- "writable": true;
1167
- "pda": {
1168
- "seeds": [
1169
- {
1170
- "kind": "const";
1171
- "value": [
1172
- 99,
1173
- 111,
1174
- 108,
1175
- 108,
1176
- 101,
1177
- 99,
1178
- 116,
1179
- 105,
1180
- 111,
1181
- 110,
1182
- 95,
1183
- 110,
1184
- 102,
1185
- 116
1186
- ];
1187
- },
1188
- {
1189
- "kind": "account";
1190
- "path": "collection";
1191
- }
1192
- ];
1193
- };
1194
- },
1195
- {
1196
- "name": "treasury";
1197
- "writable": true;
1198
- },
1199
- {
1200
- "name": "nftHolder";
1201
- "writable": true;
1202
- "pda": {
1203
- "seeds": [
1204
- {
1205
- "kind": "const";
1206
- "value": [
1207
- 110,
1208
- 102,
1209
- 116,
1210
- 95,
1211
- 104,
1212
- 111,
1213
- 108,
1214
- 100,
1215
- 101,
1216
- 114
1217
- ];
1218
- },
1219
- {
1220
- "kind": "account";
1221
- "path": "state";
1222
- },
1223
- {
1224
- "kind": "account";
1225
- "path": "seller";
1226
- }
1227
- ];
1228
- };
1229
- },
1230
- {
1231
- "name": "nft";
1232
- "writable": true;
1233
- "pda": {
1234
- "seeds": [
1235
- {
1236
- "kind": "const";
1237
- "value": [
1238
- 110,
1239
- 102,
1240
- 116
1241
- ];
1242
- },
1243
- {
1244
- "kind": "account";
1245
- "path": "state";
1246
- },
1247
- {
1248
- "kind": "account";
1249
- "path": "collection";
1250
- },
1251
- {
1252
- "kind": "arg";
1253
- "path": "tokenId";
1254
- }
1255
- ];
1256
- };
1257
- },
1258
- {
1259
- "name": "seller";
1260
- "docs": [
1261
- "The user that is creating the token"
1262
- ];
1263
- "writable": true;
1264
- "signer": true;
1265
- },
1266
- {
1267
- "name": "mplCore";
1268
- "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
1269
- },
1270
- {
1271
- "name": "systemProgram";
1272
- "address": "11111111111111111111111111111111";
1273
- },
1274
- {
1275
- "name": "eventAuthority";
1276
- "pda": {
1277
- "seeds": [
1278
- {
1279
- "kind": "const";
1280
- "value": [
1281
- 95,
1282
- 95,
1283
- 101,
1284
- 118,
1285
- 101,
1286
- 110,
1287
- 116,
1288
- 95,
1289
- 97,
1290
- 117,
1291
- 116,
1292
- 104,
1293
- 111,
1294
- 114,
1295
- 105,
1296
- 116,
1297
- 121
1298
- ];
1299
- }
1300
- ];
1301
- };
1302
- },
1303
- {
1304
- "name": "program";
1305
- }
1306
- ];
1307
- "args": [
1308
- {
1309
- "name": "tokenId";
1310
- "type": "u32";
1311
- }
1312
- ];
1313
- },
1314
- {
1315
- "name": "updateState";
1316
- "docs": [
1317
- "UpdateState",
1318
- "",
1319
- "# Arguments",
1320
- "",
1321
- "* `ctx` - The Anchor context holding the accounts",
1322
- "* `admin` - The admin of the program",
1323
- "* `treasury` - The treasury account that receives fees",
1324
- "* `lp_provisioner` - The wallet that will be adding liquidity to the 3rd party NFT marketplace upon curve completion",
1325
- "* `protocol_fee_bps` - Current protocol fees (BPS)",
1326
- "* `seller_fee_basis_points` - How much in fees should owner receive after resale i.e. royalties"
1327
- ];
1328
- "discriminator": [
1329
- 135,
1330
- 112,
1331
- 215,
1332
- 75,
1333
- 247,
1334
- 185,
1335
- 53,
1336
- 176
1337
- ];
1338
- "accounts": [
1339
- {
1340
- "name": "state";
1341
- "docs": [
1342
- "The state account of each instance of this program"
1343
- ];
1344
- "writable": true;
1345
- },
1346
- {
1347
- "name": "admin";
1348
- "writable": true;
1349
- "signer": true;
1350
- }
1351
- ];
1352
- "args": [
1353
- {
1354
- "name": "admin";
1355
- "type": "pubkey";
1356
- },
1357
- {
1358
- "name": "treasury";
1359
- "type": "pubkey";
1360
- },
1361
- {
1362
- "name": "lpProvisioner";
1363
- "type": "pubkey";
1364
- },
1365
- {
1366
- "name": "protocolFeeBps";
1367
- "type": "u16";
1368
- },
1369
- {
1370
- "name": "sellerFeeBasisPoints";
1371
- "type": "u16";
1372
- }
1373
- ];
1374
- }
1375
- ];
1376
- "accounts": [
1377
- {
1378
- "name": "collection";
1379
- "discriminator": [
1380
- 48,
1381
- 160,
1382
- 232,
1383
- 205,
1384
- 191,
1385
- 207,
1386
- 26,
1387
- 141
1388
- ];
1389
- },
1390
- {
1391
- "name": "state";
1392
- "discriminator": [
1393
- 216,
1394
- 146,
1395
- 107,
1396
- 94,
1397
- 104,
1398
- 75,
1399
- 182,
1400
- 177
1401
- ];
1402
- }
1403
- ];
1404
- "events": [
1405
- {
1406
- "name": "buyEvent";
1407
- "discriminator": [
1408
- 103,
1409
- 244,
1410
- 82,
1411
- 31,
1412
- 44,
1413
- 245,
1414
- 119,
1415
- 119
1416
- ];
1417
- },
1418
- {
1419
- "name": "collectionCreatedEvent";
1420
- "discriminator": [
1421
- 146,
1422
- 244,
1423
- 148,
1424
- 65,
1425
- 159,
1426
- 214,
1427
- 113,
1428
- 185
1429
- ];
1430
- },
1431
- {
1432
- "name": "mintEvent";
1433
- "discriminator": [
1434
- 197,
1435
- 144,
1436
- 146,
1437
- 149,
1438
- 66,
1439
- 164,
1440
- 95,
1441
- 16
1442
- ];
1443
- },
1444
- {
1445
- "name": "moveLiquidityEvent";
1446
- "discriminator": [
1447
- 62,
1448
- 16,
1449
- 64,
1450
- 187,
1451
- 176,
1452
- 107,
1453
- 185,
1454
- 31
1455
- ];
1456
- },
1457
- {
1458
- "name": "sellEvent";
1459
- "discriminator": [
1460
- 62,
1461
- 47,
1462
- 55,
1463
- 10,
1464
- 165,
1465
- 3,
1466
- 220,
1467
- 42
1468
- ];
1469
- }
1470
- ];
1471
- "errors": [
1472
- {
1473
- "code": 6000;
1474
- "name": "onlyAdmin";
1475
- "msg": "Only admin";
1476
- },
1477
- {
1478
- "code": 6001;
1479
- "name": "wrongTreasury";
1480
- "msg": "Wrong treasury account";
1481
- },
1482
- {
1483
- "code": 6002;
1484
- "name": "wrongCreator";
1485
- "msg": "Wrong creator account";
1486
- },
1487
- {
1488
- "code": 6003;
1489
- "name": "wrongLpProvisioner";
1490
- "msg": "Wrong LP provisioner account";
1491
- },
1492
- {
1493
- "code": 6004;
1494
- "name": "wrongProgramId";
1495
- "msg": "Wrong program id";
1496
- },
1497
- {
1498
- "code": 6005;
1499
- "name": "wrongIxData";
1500
- "msg": "Wrong instruction data";
1501
- },
1502
- {
1503
- "code": 6006;
1504
- "name": "expectedMoveLiquidityIx";
1505
- "msg": "Expected MoveLiquidity ix";
1506
- },
1507
- {
1508
- "code": 6007;
1509
- "name": "createFeeNotSet";
1510
- "msg": "Create fee not set";
1511
- },
1512
- {
1513
- "code": 6008;
1514
- "name": "invalidSupply";
1515
- "msg": "Total supply must be greater than 0";
1516
- },
1517
- {
1518
- "code": 6009;
1519
- "name": "collectionSoldOut";
1520
- "msg": "Collection is sold out";
1521
- },
1522
- {
1523
- "code": 6010;
1524
- "name": "collectionNotSoldOut";
1525
- "msg": "Collection is not sold out";
1526
- },
1527
- {
1528
- "code": 6011;
1529
- "name": "mintPaused";
1530
- "msg": "Minting is currently paused";
1531
- },
1532
- {
1533
- "code": 6012;
1534
- "name": "wrongMetadataProgram";
1535
- "msg": "Wrong Metadata program";
1536
- }
1537
- ];
1538
- "types": [
1539
- {
1540
- "name": "buyEvent";
1541
- "type": {
1542
- "kind": "struct";
1543
- "fields": [
1544
- {
1545
- "name": "buyer";
1546
- "type": "pubkey";
1547
- },
1548
- {
1549
- "name": "tokenId";
1550
- "type": "u32";
1551
- },
1552
- {
1553
- "name": "collection";
1554
- "type": "pubkey";
1555
- },
1556
- {
1557
- "name": "nft";
1558
- "type": "pubkey";
1559
- },
1560
- {
1561
- "name": "price";
1562
- "type": "u64";
1563
- },
1564
- {
1565
- "name": "timestamp";
1566
- "type": "i64";
1567
- },
1568
- {
1569
- "name": "totalSol";
1570
- "type": "u64";
1571
- },
1572
- {
1573
- "name": "nextPrice";
1574
- "type": "u64";
1575
- }
1576
- ];
1577
- };
1578
- },
1579
- {
1580
- "name": "collection";
1581
- "serialization": "bytemuck";
1582
- "repr": {
1583
- "kind": "c";
1584
- };
1585
- "type": {
1586
- "kind": "struct";
1587
- "fields": [
1588
- {
1589
- "name": "pool";
1590
- "docs": [
1591
- "The liquidity pool"
1592
- ];
1593
- "type": {
1594
- "defined": {
1595
- "name": "liquidityPool";
1596
- };
1597
- };
1598
- },
1599
- {
1600
- "name": "creator";
1601
- "docs": [
1602
- "The account that created the collection"
1603
- ];
1604
- "type": "pubkey";
1605
- },
1606
- {
1607
- "name": "totalSol";
1608
- "docs": [
1609
- "Total SOL currently in the pool"
1610
- ];
1611
- "type": "u64";
1612
- },
1613
- {
1614
- "name": "totalSupply";
1615
- "docs": [
1616
- "The total number of NFTs that will be minted in this collection"
1617
- ];
1618
- "type": "u32";
1619
- },
1620
- {
1621
- "name": "mintCount";
1622
- "docs": [
1623
- "Total NFTs minted so far"
1624
- ];
1625
- "type": "u32";
1626
- },
1627
- {
1628
- "name": "id";
1629
- "docs": [
1630
- "The collection id"
1631
- ];
1632
- "type": "u32";
1633
- },
1634
- {
1635
- "name": "sellerFeeBasisPoints";
1636
- "docs": [
1637
- "How much in fees should owner receive after resale i.e. royalties"
1638
- ];
1639
- "type": "u16";
1640
- },
1641
- {
1642
- "name": "protocolFeeBps";
1643
- "docs": [
1644
- "Current protocol fees (BPS)"
1645
- ];
1646
- "type": "u16";
1647
- },
1648
- {
1649
- "name": "isSoldOut";
1650
- "docs": [
1651
- "Is the curve sold out"
1652
- ];
1653
- "type": "u8";
1654
- },
1655
- {
1656
- "name": "isPaused";
1657
- "docs": [
1658
- "Is it paused by the creator"
1659
- ];
1660
- "type": "u8";
1661
- },
1662
- {
1663
- "name": "bump";
1664
- "type": "u8";
1665
- },
1666
- {
1667
- "name": "collectionNftBump";
1668
- "type": "u8";
1669
- },
1670
- {
1671
- "name": "padding";
1672
- "type": {
1673
- "array": [
1674
- "u8",
1675
- 4
1676
- ];
1677
- };
1678
- }
1679
- ];
1680
- };
1681
- },
1682
- {
1683
- "name": "collectionCreatedEvent";
1684
- "type": {
1685
- "kind": "struct";
1686
- "fields": [
1687
- {
1688
- "name": "collectionId";
1689
- "type": "u32";
1690
- },
1691
- {
1692
- "name": "collection";
1693
- "type": "pubkey";
1694
- },
1695
- {
1696
- "name": "creator";
1697
- "type": "pubkey";
1698
- },
1699
- {
1700
- "name": "mint";
1701
- "type": "pubkey";
1702
- },
1703
- {
1704
- "name": "name";
1705
- "type": "string";
1706
- },
1707
- {
1708
- "name": "uri";
1709
- "type": "string";
1710
- },
1711
- {
1712
- "name": "sessionId";
1713
- "type": "string";
1714
- },
1715
- {
1716
- "name": "totalSupply";
1717
- "type": "u32";
1718
- },
1719
- {
1720
- "name": "timestamp";
1721
- "type": "i64";
1722
- }
1723
- ];
1724
- };
1725
- },
1726
- {
1727
- "name": "liquidityPool";
1728
- "repr": {
1729
- "kind": "c";
1730
- };
1731
- "type": {
1732
- "kind": "struct";
1733
- "fields": [
1734
- {
1735
- "name": "currentPrice";
1736
- "type": "u64";
1737
- },
1738
- {
1739
- "name": "startPrice";
1740
- "type": "u64";
1741
- },
1742
- {
1743
- "name": "endPrice";
1744
- "type": "u64";
1745
- },
1746
- {
1747
- "name": "nftCount";
1748
- "type": "u32";
1749
- },
1750
- {
1751
- "name": "steepness";
1752
- "type": "f32";
1753
- },
1754
- {
1755
- "name": "midPoint";
1756
- "type": "f32";
1757
- },
1758
- {
1759
- "name": "padding";
1760
- "type": {
1761
- "array": [
1762
- "u8",
1763
- 4
1764
- ];
1765
- };
1766
- }
1767
- ];
1768
- };
1769
- },
1770
- {
1771
- "name": "mintEvent";
1772
- "type": {
1773
- "kind": "struct";
1774
- "fields": [
1775
- {
1776
- "name": "buyer";
1777
- "type": "pubkey";
1778
- },
1779
- {
1780
- "name": "collection";
1781
- "type": "pubkey";
1782
- },
1783
- {
1784
- "name": "nft";
1785
- "type": "pubkey";
1786
- },
1787
- {
1788
- "name": "tokenId";
1789
- "type": "u32";
1790
- },
1791
- {
1792
- "name": "name";
1793
- "type": "string";
1794
- },
1795
- {
1796
- "name": "uri";
1797
- "type": "string";
1798
- },
1799
- {
1800
- "name": "mintCount";
1801
- "type": "u32";
1802
- },
1803
- {
1804
- "name": "price";
1805
- "type": "u64";
1806
- },
1807
- {
1808
- "name": "timestamp";
1809
- "type": "i64";
1810
- },
1811
- {
1812
- "name": "isSoldOut";
1813
- "type": "u8";
1814
- },
1815
- {
1816
- "name": "totalSol";
1817
- "type": "u64";
1818
- },
1819
- {
1820
- "name": "nextPrice";
1821
- "type": "u64";
1822
- }
1823
- ];
1824
- };
1825
- },
1826
- {
1827
- "name": "moveLiquidityEvent";
1828
- "type": {
1829
- "kind": "struct";
1830
- "fields": [
1831
- {
1832
- "name": "collectionNft";
1833
- "type": "pubkey";
1834
- },
1835
- {
1836
- "name": "migrationFee";
1837
- "type": "u64";
1838
- },
1839
- {
1840
- "name": "creatorFee";
1841
- "type": "u64";
1842
- },
1843
- {
1844
- "name": "liquidity";
1845
- "type": "u64";
1846
- }
1847
- ];
1848
- };
1849
- },
1850
- {
1851
- "name": "sellEvent";
1852
- "type": {
1853
- "kind": "struct";
1854
- "fields": [
1855
- {
1856
- "name": "seller";
1857
- "type": "pubkey";
1858
- },
1859
- {
1860
- "name": "tokenId";
1861
- "type": "u32";
1862
- },
1863
- {
1864
- "name": "collection";
1865
- "type": "pubkey";
1866
- },
1867
- {
1868
- "name": "nft";
1869
- "type": "pubkey";
1870
- },
1871
- {
1872
- "name": "price";
1873
- "type": "u64";
1874
- },
1875
- {
1876
- "name": "timestamp";
1877
- "type": "i64";
1878
- },
1879
- {
1880
- "name": "totalSol";
1881
- "type": "u64";
1882
- },
1883
- {
1884
- "name": "nextPrice";
1885
- "type": "u64";
1886
- }
1887
- ];
1888
- };
1889
- },
1890
- {
1891
- "name": "state";
1892
- "serialization": "bytemuck";
1893
- "repr": {
1894
- "kind": "c";
1895
- };
1896
- "type": {
1897
- "kind": "struct";
1898
- "fields": [
1899
- {
1900
- "name": "admin";
1901
- "docs": [
1902
- "The admin that can handle various admin related tasks"
1903
- ];
1904
- "type": "pubkey";
1905
- },
1906
- {
1907
- "name": "treasury";
1908
- "docs": [
1909
- "The treasury account that receives fees"
1910
- ];
1911
- "type": "pubkey";
1912
- },
1913
- {
1914
- "name": "lpProvisioner";
1915
- "docs": [
1916
- "The wallet that will be adding liquidity to the 3rd party NFT marketplace upon curve completion"
1917
- ];
1918
- "type": "pubkey";
1919
- },
1920
- {
1921
- "name": "collectionCount";
1922
- "docs": [
1923
- "count of total collections created"
1924
- ];
1925
- "type": "u32";
1926
- },
1927
- {
1928
- "name": "protocolFeeBps";
1929
- "docs": [
1930
- "Current protocol fees (BPS)"
1931
- ];
1932
- "type": "u16";
1933
- },
1934
- {
1935
- "name": "sellerFeeBasisPoints";
1936
- "docs": [
1937
- "How much in fees should creator receive after resale i.e. royalties"
1938
- ];
1939
- "type": "u16";
1940
- }
1941
- ];
1942
- };
1943
- }
1944
- ];
1945
- };
1946
-
1947
- declare function analyzeBuyTransaction(program: Program<FlipmemeProgramNew>, transactionData: VersionedTransactionResponse): BuyResponse[];
1948
- declare function analyzeSellTransaction(program: Program<FlipmemeProgramNew>, transactionData: VersionedTransactionResponse): SellResponse[];
1949
- declare function getPrice(_mintCount: number, _nftCount: number, _steepness: number, _midPoint: number, _startPrice: string, _endPrice: string): Decimal;
1950
-
1951
- export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type NFTMintData, type NFTTradingData, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, analyzeBuyTransaction, analyzeSellTransaction, getPrice, isEthereumConfig, isSolanaConfig };
158
+ export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type NFTMintData, type NFTTradingData, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, isEthereumConfig, isSolanaConfig };