@metadaoproject/futarchy 0.6.0-alpha.2 → 0.6.0-alpha.20

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.
Files changed (41) hide show
  1. package/dist/v0.5/SharedLiquidityManagerClient.js.map +1 -1
  2. package/dist/v0.6/FutarchyClient.d.ts +249 -9
  3. package/dist/v0.6/FutarchyClient.js +96 -69
  4. package/dist/v0.6/FutarchyClient.js.map +1 -1
  5. package/dist/v0.6/LaunchpadClient.d.ts +168 -19
  6. package/dist/v0.6/LaunchpadClient.js +118 -50
  7. package/dist/v0.6/LaunchpadClient.js.map +1 -1
  8. package/dist/v0.6/PriceBasedPerformancePackageClient.d.ts +353 -0
  9. package/dist/v0.6/PriceBasedPerformancePackageClient.js +116 -0
  10. package/dist/v0.6/PriceBasedPerformancePackageClient.js.map +1 -0
  11. package/dist/v0.6/constants.d.ts +5 -1
  12. package/dist/v0.6/constants.js +6 -2
  13. package/dist/v0.6/constants.js.map +1 -1
  14. package/dist/v0.6/index.d.ts +1 -0
  15. package/dist/v0.6/index.js +1 -0
  16. package/dist/v0.6/index.js.map +1 -1
  17. package/dist/v0.6/types/futarchy.d.ts +754 -69
  18. package/dist/v0.6/types/futarchy.js +752 -67
  19. package/dist/v0.6/types/futarchy.js.map +1 -1
  20. package/dist/v0.6/types/index.d.ts +51 -6
  21. package/dist/v0.6/types/index.js +8 -2
  22. package/dist/v0.6/types/index.js.map +1 -1
  23. package/dist/v0.6/types/launchpad.d.ts +328 -26
  24. package/dist/v0.6/types/launchpad.js +328 -26
  25. package/dist/v0.6/types/launchpad.js.map +1 -1
  26. package/dist/v0.6/types/price_based_performance_package.d.ts +896 -0
  27. package/dist/v0.6/types/price_based_performance_package.js +896 -0
  28. package/dist/v0.6/types/price_based_performance_package.js.map +1 -0
  29. package/dist/v0.6/types/v0.6.0-futarchy.d.ts +2567 -0
  30. package/dist/v0.6/types/v0.6.0-futarchy.js +2567 -0
  31. package/dist/v0.6/types/v0.6.0-futarchy.js.map +1 -0
  32. package/dist/v0.6/types/v0.6.0-launchpad.d.ts +1277 -0
  33. package/dist/v0.6/types/v0.6.0-launchpad.js +1277 -0
  34. package/dist/v0.6/types/v0.6.0-launchpad.js.map +1 -0
  35. package/dist/v0.6/utils/pda.d.ts +18 -0
  36. package/dist/v0.6/utils/pda.js +23 -3
  37. package/dist/v0.6/utils/pda.js.map +1 -1
  38. package/package.json +25 -2
  39. package/dist/v0.6/types/shared_liquidity_manager.d.ts +0 -89
  40. package/dist/v0.6/types/shared_liquidity_manager.js +0 -89
  41. package/dist/v0.6/types/shared_liquidity_manager.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  export type Launchpad = {
2
- version: "0.6.0";
2
+ version: "0.6.1";
3
3
  name: "launchpad";
4
4
  instructions: [
5
5
  {
@@ -195,6 +195,12 @@ export type Launchpad = {
195
195
  isMut: true;
196
196
  isSigner: false;
197
197
  },
198
+ {
199
+ name: "launchAuthority";
200
+ isMut: false;
201
+ isSigner: true;
202
+ isOptional: true;
203
+ },
198
204
  {
199
205
  name: "tokenMetadata";
200
206
  isMut: true;
@@ -270,6 +276,16 @@ export type Launchpad = {
270
276
  isMut: true;
271
277
  isSigner: false;
272
278
  },
279
+ {
280
+ name: "performancePackage";
281
+ isMut: true;
282
+ isSigner: false;
283
+ },
284
+ {
285
+ name: "performancePackageTokenAccount";
286
+ isMut: true;
287
+ isSigner: false;
288
+ },
273
289
  {
274
290
  name: "systemProgram";
275
291
  isMut: false;
@@ -304,24 +320,104 @@ export type Launchpad = {
304
320
  isSigner: false;
305
321
  },
306
322
  {
307
- name: "rent";
323
+ name: "squadsProgram";
308
324
  isMut: false;
309
325
  isSigner: false;
310
326
  },
311
327
  {
312
- name: "squadsProgram";
328
+ name: "squadsProgramConfig";
313
329
  isMut: false;
314
330
  isSigner: false;
315
331
  },
316
332
  {
317
- name: "squadsProgramConfig";
333
+ name: "squadsProgramConfigTreasury";
334
+ isMut: true;
335
+ isSigner: false;
336
+ },
337
+ {
338
+ name: "priceBasedPerformancePackageProgram";
318
339
  isMut: false;
319
340
  isSigner: false;
320
341
  },
321
342
  {
322
- name: "squadsProgramConfigTreasury";
343
+ name: "priceBasedPerformancePackageEventAuthority";
344
+ isMut: false;
345
+ isSigner: false;
346
+ }
347
+ ];
348
+ },
349
+ {
350
+ name: "meteoraAccounts";
351
+ accounts: [
352
+ {
353
+ name: "dammV2Program";
354
+ isMut: false;
355
+ isSigner: false;
356
+ },
357
+ {
358
+ name: "config";
359
+ isMut: false;
360
+ isSigner: false;
361
+ },
362
+ {
363
+ name: "token2022Program";
364
+ isMut: false;
365
+ isSigner: false;
366
+ },
367
+ {
368
+ name: "positionNftAccount";
369
+ isMut: true;
370
+ isSigner: false;
371
+ },
372
+ {
373
+ name: "pool";
374
+ isMut: true;
375
+ isSigner: false;
376
+ },
377
+ {
378
+ name: "position";
379
+ isMut: true;
380
+ isSigner: false;
381
+ },
382
+ {
383
+ name: "positionNftMint";
323
384
  isMut: true;
324
385
  isSigner: false;
386
+ },
387
+ {
388
+ name: "baseMint";
389
+ isMut: false;
390
+ isSigner: false;
391
+ },
392
+ {
393
+ name: "quoteMint";
394
+ isMut: false;
395
+ isSigner: false;
396
+ },
397
+ {
398
+ name: "tokenAVault";
399
+ isMut: true;
400
+ isSigner: false;
401
+ },
402
+ {
403
+ name: "tokenBVault";
404
+ isMut: true;
405
+ isSigner: false;
406
+ },
407
+ {
408
+ name: "poolCreatorAuthority";
409
+ isMut: false;
410
+ isSigner: false;
411
+ },
412
+ {
413
+ name: "poolAuthority";
414
+ isMut: false;
415
+ isSigner: false;
416
+ },
417
+ {
418
+ name: "dammV2EventAuthority";
419
+ isMut: false;
420
+ isSigner: false;
325
421
  }
326
422
  ];
327
423
  },
@@ -336,7 +432,14 @@ export type Launchpad = {
336
432
  isSigner: false;
337
433
  }
338
434
  ];
339
- args: [];
435
+ args: [
436
+ {
437
+ name: "args";
438
+ type: {
439
+ defined: "CompleteLaunchArgs";
440
+ };
441
+ }
442
+ ];
340
443
  },
341
444
  {
342
445
  name: "refund";
@@ -363,8 +466,8 @@ export type Launchpad = {
363
466
  },
364
467
  {
365
468
  name: "funder";
366
- isMut: true;
367
- isSigner: true;
469
+ isMut: false;
470
+ isSigner: false;
368
471
  },
369
472
  {
370
473
  name: "funderQuoteAccount";
@@ -427,11 +530,6 @@ export type Launchpad = {
427
530
  isMut: false;
428
531
  isSigner: false;
429
532
  },
430
- {
431
- name: "payer";
432
- isMut: true;
433
- isSigner: true;
434
- },
435
533
  {
436
534
  name: "funderTokenAccount";
437
535
  isMut: true;
@@ -459,6 +557,27 @@ export type Launchpad = {
459
557
  }
460
558
  ];
461
559
  args: [];
560
+ },
561
+ {
562
+ name: "closeLaunch";
563
+ accounts: [
564
+ {
565
+ name: "launch";
566
+ isMut: true;
567
+ isSigner: false;
568
+ },
569
+ {
570
+ name: "eventAuthority";
571
+ isMut: false;
572
+ isSigner: false;
573
+ },
574
+ {
575
+ name: "program";
576
+ isMut: false;
577
+ isSigner: false;
578
+ }
579
+ ];
580
+ args: [];
462
581
  }
463
582
  ];
464
583
  accounts: [
@@ -488,11 +607,14 @@ export type Launchpad = {
488
607
  type: "u64";
489
608
  },
490
609
  {
491
- name: "seqNum";
492
- docs: [
493
- "The sequence number of this funding record. Useful for sorting events."
494
- ];
495
- type: "u64";
610
+ name: "isTokensClaimed";
611
+ docs: ["Whether the tokens have been claimed."];
612
+ type: "bool";
613
+ },
614
+ {
615
+ name: "isUsdcRefunded";
616
+ docs: ["Whether the USDC has been refunded."];
617
+ type: "bool";
496
618
  }
497
619
  ];
498
620
  };
@@ -576,13 +698,31 @@ export type Launchpad = {
576
698
  {
577
699
  name: "unixTimestampStarted";
578
700
  docs: ["The unix timestamp when the launch was started."];
579
- type: "i64";
701
+ type: {
702
+ option: "i64";
703
+ };
704
+ },
705
+ {
706
+ name: "unixTimestampClosed";
707
+ docs: [
708
+ "The unix timestamp when the launch stopped taking new contributions."
709
+ ];
710
+ type: {
711
+ option: "i64";
712
+ };
580
713
  },
581
714
  {
582
715
  name: "totalCommittedAmount";
583
716
  docs: ["The amount of USDC that has been committed by the users."];
584
717
  type: "u64";
585
718
  },
719
+ {
720
+ name: "finalRaiseAmount";
721
+ docs: ["The final raise amount."];
722
+ type: {
723
+ option: "u64";
724
+ };
725
+ },
586
726
  {
587
727
  name: "state";
588
728
  docs: ["The state of the launch."];
@@ -617,6 +757,32 @@ export type Launchpad = {
617
757
  type: {
618
758
  option: "publicKey";
619
759
  };
760
+ },
761
+ {
762
+ name: "performancePackageGrantee";
763
+ docs: [
764
+ "The address that will receive the performance package tokens."
765
+ ];
766
+ type: "publicKey";
767
+ },
768
+ {
769
+ name: "performancePackageTokenAmount";
770
+ docs: [
771
+ "The amount of tokens to be granted to the performance package grantee."
772
+ ];
773
+ type: "u64";
774
+ },
775
+ {
776
+ name: "monthsUntilInsidersCanUnlock";
777
+ docs: [
778
+ "The number of months that insiders must wait before unlocking their tokens."
779
+ ];
780
+ type: "u8";
781
+ },
782
+ {
783
+ name: "teamAddress";
784
+ docs: ["The initial address used to sponsor team proposals."];
785
+ type: "publicKey";
620
786
  }
621
787
  ];
622
788
  };
@@ -643,6 +809,20 @@ export type Launchpad = {
643
809
  ];
644
810
  };
645
811
  },
812
+ {
813
+ name: "CompleteLaunchArgs";
814
+ type: {
815
+ kind: "struct";
816
+ fields: [
817
+ {
818
+ name: "finalRaiseAmount";
819
+ type: {
820
+ option: "u64";
821
+ };
822
+ }
823
+ ];
824
+ };
825
+ },
646
826
  {
647
827
  name: "InitializeLaunchArgs";
648
828
  type: {
@@ -677,6 +857,22 @@ export type Launchpad = {
677
857
  {
678
858
  name: "tokenUri";
679
859
  type: "string";
860
+ },
861
+ {
862
+ name: "performancePackageGrantee";
863
+ type: "publicKey";
864
+ },
865
+ {
866
+ name: "performancePackageTokenAmount";
867
+ type: "u64";
868
+ },
869
+ {
870
+ name: "monthsUntilInsidersCanUnlock";
871
+ type: "u8";
872
+ },
873
+ {
874
+ name: "teamAddress";
875
+ type: "publicKey";
680
876
  }
681
877
  ];
682
878
  };
@@ -692,6 +888,9 @@ export type Launchpad = {
692
888
  {
693
889
  name: "Live";
694
890
  },
891
+ {
892
+ name: "Closed";
893
+ },
695
894
  {
696
895
  name: "Complete";
697
896
  },
@@ -748,6 +947,33 @@ export type Launchpad = {
748
947
  type: "publicKey";
749
948
  index: false;
750
949
  },
950
+ {
951
+ name: "performancePackageGrantee";
952
+ type: "publicKey";
953
+ index: false;
954
+ },
955
+ {
956
+ name: "performancePackageTokenAmount";
957
+ type: "u64";
958
+ index: false;
959
+ },
960
+ {
961
+ name: "monthsUntilInsidersCanUnlock";
962
+ type: "u8";
963
+ index: false;
964
+ },
965
+ {
966
+ name: "monthlySpendingLimitAmount";
967
+ type: "u64";
968
+ index: false;
969
+ },
970
+ {
971
+ name: "monthlySpendingLimitMembers";
972
+ type: {
973
+ vec: "publicKey";
974
+ };
975
+ index: false;
976
+ },
751
977
  {
752
978
  name: "baseMint";
753
979
  type: "publicKey";
@@ -836,11 +1062,6 @@ export type Launchpad = {
836
1062
  name: "totalCommitted";
837
1063
  type: "u64";
838
1064
  index: false;
839
- },
840
- {
841
- name: "fundingRecordSeqNum";
842
- type: "u64";
843
- index: false;
844
1065
  }
845
1066
  ];
846
1067
  },
@@ -884,6 +1105,13 @@ export type Launchpad = {
884
1105
  option: "publicKey";
885
1106
  };
886
1107
  index: false;
1108
+ },
1109
+ {
1110
+ name: "finalRaiseAmount";
1111
+ type: {
1112
+ option: "u64";
1113
+ };
1114
+ index: false;
887
1115
  }
888
1116
  ];
889
1117
  },
@@ -950,6 +1178,30 @@ export type Launchpad = {
950
1178
  index: false;
951
1179
  }
952
1180
  ];
1181
+ },
1182
+ {
1183
+ name: "LaunchCloseEvent";
1184
+ fields: [
1185
+ {
1186
+ name: "common";
1187
+ type: {
1188
+ defined: "CommonFields";
1189
+ };
1190
+ index: false;
1191
+ },
1192
+ {
1193
+ name: "launch";
1194
+ type: "publicKey";
1195
+ index: false;
1196
+ },
1197
+ {
1198
+ name: "newState";
1199
+ type: {
1200
+ defined: "LaunchState";
1201
+ };
1202
+ index: false;
1203
+ }
1204
+ ];
953
1205
  }
954
1206
  ];
955
1207
  errors: [
@@ -996,7 +1248,7 @@ export type Launchpad = {
996
1248
  {
997
1249
  code: 6008;
998
1250
  name: "LaunchNotRefunding";
999
- msg: "Launch needs to be in refunding state to get a refund";
1251
+ msg: "For you to get a refund, either the launch needs to be in a refunding state or the launch must have been over-committed";
1000
1252
  },
1001
1253
  {
1002
1254
  code: 6009;
@@ -1011,7 +1263,57 @@ export type Launchpad = {
1011
1263
  {
1012
1264
  code: 6011;
1013
1265
  name: "InvalidMonthlySpendingLimit";
1014
- msg: "Monthly spending limit must be less than 1/6th of the minimum raise amount";
1266
+ msg: "Monthly spending limit must be less than 1/6th of the minimum raise amount and cannot be 0";
1267
+ },
1268
+ {
1269
+ code: 6012;
1270
+ name: "InvalidMonthlySpendingLimitMembers";
1271
+ msg: "There can only be at most 10 monthly spending limit members";
1272
+ },
1273
+ {
1274
+ code: 6013;
1275
+ name: "InvalidPriceBasedPremineAmount";
1276
+ msg: "Cannot do more than a 50% premine, minimum is 10 atoms of token";
1277
+ },
1278
+ {
1279
+ code: 6014;
1280
+ name: "InvalidPerformancePackageMinUnlockTime";
1281
+ msg: "Insiders must be forced to wait at least 18 months before unlocking their tokens";
1282
+ },
1283
+ {
1284
+ code: 6015;
1285
+ name: "LaunchAuthorityNotSet";
1286
+ msg: "Launch authority must be set to complete the launch until 2 days after closing";
1287
+ },
1288
+ {
1289
+ code: 6016;
1290
+ name: "FinalRaiseAmountTooLow";
1291
+ msg: "The final amount raised must be greater than or equal to the minimum raise amount";
1292
+ },
1293
+ {
1294
+ code: 6017;
1295
+ name: "TokensAlreadyClaimed";
1296
+ msg: "Tokens already claimed";
1297
+ },
1298
+ {
1299
+ code: 6018;
1300
+ name: "MoneyAlreadyRefunded";
1301
+ msg: "Money already refunded";
1302
+ },
1303
+ {
1304
+ code: 6019;
1305
+ name: "InvariantViolated";
1306
+ msg: "An invariant was violated. You should get in contact with the MetaDAO team if you see this";
1307
+ },
1308
+ {
1309
+ code: 6020;
1310
+ name: "LaunchNotLive";
1311
+ msg: "Launch must be live to be closed";
1312
+ },
1313
+ {
1314
+ code: 6021;
1315
+ name: "InvalidMinimumRaiseAmount";
1316
+ msg: "Minimum raise amount must be greater than or equal to $0.5 so that there's enough liquidity for the launch";
1015
1317
  }
1016
1318
  ];
1017
1319
  };