@xgamesfun/solana 0.25.4 → 0.26.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.
Files changed (44) hide show
  1. package/README.md +8 -8
  2. package/js/approve/details.mjs +52 -2
  3. package/js/approve/live-check.mjs +0 -15
  4. package/js/approve/server.mjs +5 -4
  5. package/js/chain/token2022.js +3 -2
  6. package/js/client/accounts.js +67 -25
  7. package/js/client/grant.js +7 -2
  8. package/js/client/idl/loot.js +1 -1
  9. package/js/client/idl/loot.json +716 -183
  10. package/js/client/ix.js +617 -113
  11. package/js/client/sizes.js +210 -64
  12. package/js/economy/check.mjs +691 -261
  13. package/js/economy/cost.mjs +2 -4
  14. package/js/economy/explain.mjs +16 -2
  15. package/js/economy/guide.mjs +12 -12
  16. package/js/economy/model.mjs +133 -14
  17. package/js/economy/plan.mjs +68 -19
  18. package/js/economy/review.mjs +50 -8
  19. package/js/economy/schema.json +73 -29
  20. package/js/economy/simulate.mjs +116 -13
  21. package/js/mcp/tools.mjs +2 -2
  22. package/js/play/index.js +855 -296
  23. package/package.json +1 -1
  24. package/release.json +5 -5
  25. package/skills/xsolana-economy/SKILL.md +12 -4
  26. package/skills/xsolana-economy/references/after-launch.md +1 -1
  27. package/skills/xsolana-economy/references/apps.md +11 -2
  28. package/skills/xsolana-economy/references/sentence-to-spec.md +3 -3
  29. package/skills/xsolana-economy/references/telling-the-person.md +22 -4
  30. package/skills/xsolana-economy/references/trust-and-cheating.md +15 -5
  31. package/types/chain/token2022.d.ts +3 -2
  32. package/types/client/accounts.d.ts +34 -11
  33. package/types/client/idl/loot.d.ts +25 -4
  34. package/types/client/ix.d.ts +217 -45
  35. package/types/client/sizes.d.ts +42 -8
  36. package/types/economy/check.d.mts +11 -2
  37. package/types/economy/cost.d.mts +1 -0
  38. package/types/economy/live.d.mts +2 -0
  39. package/types/economy/model.d.mts +75 -12
  40. package/types/economy/plan.d.mts +31 -2
  41. package/types/economy/simulate.d.mts +12 -1
  42. package/types/mcp/server.d.mts +12 -1
  43. package/types/mcp/tools.d.mts +12 -1
  44. package/types/play/index.d.ts +210 -144
@@ -2,7 +2,7 @@
2
2
  "address": "9cwqM1TXytPnFZsLfmUyv2dg4uW6Ch9C6UJVPns7NFQ",
3
3
  "metadata": {
4
4
  "name": "loot",
5
- "version": "0.25.0",
5
+ "version": "0.26.1",
6
6
  "spec": "0.1.0",
7
7
  "description": "Economy for Anything: one program every coin of a project passes through",
8
8
  "repository": "https://github.com/gamesfun/loot"
@@ -1954,7 +1954,8 @@
1954
1954
  "name": "end_auction",
1955
1955
  "docs": [
1956
1956
  "Anyone ends an auction that is over: the lot to the winner and the bid through the",
1957
- "shares, or the lot home. Its seller calls off one with no bid."
1957
+ "shares (`ending`: together, or the lot first), or the lot home. Its seller calls off one with",
1958
+ "no bid; anyone a sale whose lot or bid is proven gone, the project's keys any sale not delivered."
1958
1959
  ],
1959
1960
  "discriminator": [
1960
1961
  33
@@ -1964,8 +1965,8 @@
1964
1965
  "name": "signer",
1965
1966
  "docs": [
1966
1967
  "Anyone once it is over; the seller, to call off one with no bid (the project's keys pay the",
1967
- "project fee for it). Pays the rent of a collectible minted for the winner, and opens the",
1968
- "accounts the end pays into."
1968
+ "project fee for it); the project's keys, to call off a sale whose lot is still there. Pays the",
1969
+ "rent of a collectible minted for the winner, and opens the accounts the end pays into."
1969
1970
  ],
1970
1971
  "writable": true,
1971
1972
  "signer": true
@@ -2001,7 +2002,8 @@
2001
2002
  {
2002
2003
  "name": "proceeds",
2003
2004
  "docs": [
2004
- "treasury wallet for its item (`rail::split_to`)."
2005
+ "NFT, or to the project's treasury wallet for its item (`rail::split_to`); the whole bid to the",
2006
+ "winner when the sale is called off."
2005
2007
  ]
2006
2008
  },
2007
2009
  {
@@ -2192,7 +2194,8 @@
2192
2194
  {
2193
2195
  "name": "order",
2194
2196
  "docs": [
2195
- "whoever it goes to, its hold, `[\"hold\", asset, 0]` (`hold::owe`)."
2197
+ "called off), passed to make it a hold for its seller, its hold, `[\"hold\", asset, 0]`",
2198
+ "(`hold::owe`). Never for a lot that sold."
2196
2199
  ],
2197
2200
  "writable": true,
2198
2201
  "optional": true
@@ -2211,6 +2214,14 @@
2211
2214
  {
2212
2215
  "name": "nonce",
2213
2216
  "type": "u64"
2217
+ },
2218
+ {
2219
+ "name": "ending",
2220
+ "type": {
2221
+ "defined": {
2222
+ "name": "Ending"
2223
+ }
2224
+ }
2214
2225
  }
2215
2226
  ]
2216
2227
  },
@@ -2845,7 +2856,7 @@
2845
2856
  {
2846
2857
  "name": "seller",
2847
2858
  "docs": [
2848
- "Puts the lot up, the only signer: an NFT's holder (a player's in one of the project's collections), or",
2859
+ "Puts the lot up, the only signer: an NFT's holder, or",
2849
2860
  "the project's owner or authority for a new unit of its item. Pays the rent and the fee."
2850
2861
  ],
2851
2862
  "writable": true,
@@ -5311,8 +5322,9 @@
5311
5322
  {
5312
5323
  "name": "repay",
5313
5324
  "docs": [
5314
- "Anyone repays a loan before it is due: the money goes to the lender and the hold becomes a",
5315
- "plain one that is over. The NFT goes home with `release`, whenever. `repay` is the amount the payer saw."
5325
+ "Anyone repays a loan before it is due, the project shown to hold its NFT still: the money goes",
5326
+ "to the lender and, with `home`, the NFT to the borrower, the hold closing; without, the hold",
5327
+ "becomes a plain one that is over, for `release`. `repay` is the amount the payer saw."
5316
5328
  ],
5317
5329
  "discriminator": [
5318
5330
  39
@@ -5362,9 +5374,153 @@
5362
5374
  {
5363
5375
  "name": "system_program",
5364
5376
  "address": "11111111111111111111111111111111"
5377
+ },
5378
+ {
5379
+ "name": "borrower",
5380
+ "docs": [
5381
+ "hold's rent and a Token Metadata NFT's emptied account's (a loan's hold names its borrower",
5382
+ "as its payer and rent wallet too, `borrow`)."
5383
+ ],
5384
+ "writable": true
5385
+ },
5386
+ {
5387
+ "name": "piece",
5388
+ "accounts": [
5389
+ {
5390
+ "name": "asset",
5391
+ "docs": [
5392
+ "Read by hand; Core, Token Metadata and Bubblegum check the rest."
5393
+ ],
5394
+ "writable": true
5395
+ },
5396
+ {
5397
+ "name": "sheet",
5398
+ "docs": [
5399
+ "its Sheet's address (`sheet.rs`): read, and written by a farm with growth."
5400
+ ],
5401
+ "writable": true,
5402
+ "optional": true
5403
+ },
5404
+ {
5405
+ "name": "collection",
5406
+ "docs": [
5407
+ "Core collection (left out for none). Not for a Token Metadata NFT. Writable where Core",
5408
+ "writes it: a burn, a mint."
5409
+ ],
5410
+ "optional": true
5411
+ },
5412
+ {
5413
+ "name": "mpl_core_program",
5414
+ "optional": true
5415
+ },
5416
+ {
5417
+ "name": "metadata",
5418
+ "writable": true,
5419
+ "optional": true
5420
+ },
5421
+ {
5422
+ "name": "edition",
5423
+ "optional": true
5424
+ },
5425
+ {
5426
+ "name": "token",
5427
+ "docs": [
5428
+ "receiver's (Token Metadata opens it). Any token account the receiver owns will do, not only",
5429
+ "the associated one, so a receiver who gives that one away can't turn a hand-out back."
5430
+ ],
5431
+ "writable": true,
5432
+ "optional": true
5433
+ },
5434
+ {
5435
+ "name": "token_record",
5436
+ "writable": true,
5437
+ "optional": true
5438
+ },
5439
+ {
5440
+ "name": "project_token",
5441
+ "docs": [
5442
+ "the project holds it."
5443
+ ],
5444
+ "writable": true,
5445
+ "optional": true
5446
+ },
5447
+ {
5448
+ "name": "project_record",
5449
+ "writable": true,
5450
+ "optional": true
5451
+ },
5452
+ {
5453
+ "name": "rule_set",
5454
+ "docs": [
5455
+ "none); Token Metadata checks them."
5456
+ ],
5457
+ "optional": true
5458
+ },
5459
+ {
5460
+ "name": "rules_program",
5461
+ "optional": true
5462
+ },
5463
+ {
5464
+ "name": "token_metadata_program",
5465
+ "optional": true
5466
+ },
5467
+ {
5468
+ "name": "instructions",
5469
+ "optional": true
5470
+ },
5471
+ {
5472
+ "name": "spl_token_program",
5473
+ "optional": true,
5474
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
5475
+ },
5476
+ {
5477
+ "name": "spl_ata_program",
5478
+ "optional": true,
5479
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
5480
+ },
5481
+ {
5482
+ "name": "leaf",
5483
+ "docs": [
5484
+ "tree's change log. Writable, with",
5485
+ "the tree and its config, where Bubblegum changes the leaf (a lock, a move)."
5486
+ ],
5487
+ "optional": true
5488
+ },
5489
+ {
5490
+ "name": "tree",
5491
+ "docs": [
5492
+ "checks it)."
5493
+ ],
5494
+ "optional": true
5495
+ },
5496
+ {
5497
+ "name": "tree_config",
5498
+ "optional": true
5499
+ },
5500
+ {
5501
+ "name": "leaf_delegate",
5502
+ "optional": true
5503
+ },
5504
+ {
5505
+ "name": "bubblegum_program",
5506
+ "optional": true
5507
+ },
5508
+ {
5509
+ "name": "compression_program",
5510
+ "optional": true
5511
+ },
5512
+ {
5513
+ "name": "log_wrapper",
5514
+ "optional": true
5515
+ }
5516
+ ]
5365
5517
  }
5366
5518
  ],
5367
5519
  "args": [
5520
+ {
5521
+ "name": "home",
5522
+ "type": "bool"
5523
+ },
5368
5524
  {
5369
5525
  "name": "repay",
5370
5526
  "type": "u64"
@@ -7376,6 +7532,10 @@
7376
7532
  {
7377
7533
  "name": "nonce",
7378
7534
  "type": "u64"
7535
+ },
7536
+ {
7537
+ "name": "need_prize",
7538
+ "type": "bool"
7379
7539
  }
7380
7540
  ]
7381
7541
  },
@@ -8070,6 +8230,19 @@
8070
8230
  145
8071
8231
  ]
8072
8232
  },
8233
+ {
8234
+ "name": "FeesCollected",
8235
+ "discriminator": [
8236
+ 233,
8237
+ 23,
8238
+ 117,
8239
+ 225,
8240
+ 107,
8241
+ 178,
8242
+ 254,
8243
+ 8
8244
+ ]
8245
+ },
8073
8246
  {
8074
8247
  "name": "GrantClaimed",
8075
8248
  "discriminator": [
@@ -8122,6 +8295,19 @@
8122
8295
  98
8123
8296
  ]
8124
8297
  },
8298
+ {
8299
+ "name": "LeftoverBurned",
8300
+ "discriminator": [
8301
+ 28,
8302
+ 216,
8303
+ 145,
8304
+ 193,
8305
+ 156,
8306
+ 135,
8307
+ 159,
8308
+ 255
8309
+ ]
8310
+ },
8125
8311
  {
8126
8312
  "name": "Listed",
8127
8313
  "discriminator": [
@@ -8343,6 +8529,19 @@
8343
8529
  97
8344
8530
  ]
8345
8531
  },
8532
+ {
8533
+ "name": "PrizeForgone",
8534
+ "discriminator": [
8535
+ 247,
8536
+ 186,
8537
+ 13,
8538
+ 149,
8539
+ 109,
8540
+ 113,
8541
+ 177,
8542
+ 223
8543
+ ]
8544
+ },
8346
8545
  {
8347
8546
  "name": "PrizeGiven",
8348
8547
  "discriminator": [
@@ -8382,6 +8581,19 @@
8382
8581
  159
8383
8582
  ]
8384
8583
  },
8584
+ {
8585
+ "name": "ProjectUpdated",
8586
+ "discriminator": [
8587
+ 16,
8588
+ 110,
8589
+ 74,
8590
+ 3,
8591
+ 76,
8592
+ 227,
8593
+ 179,
8594
+ 225
8595
+ ]
8596
+ },
8385
8597
  {
8386
8598
  "name": "RecordClosed",
8387
8599
  "discriminator": [
@@ -8486,6 +8698,19 @@
8486
8698
  226
8487
8699
  ]
8488
8700
  },
8701
+ {
8702
+ "name": "SaleCalledOff",
8703
+ "discriminator": [
8704
+ 19,
8705
+ 92,
8706
+ 244,
8707
+ 154,
8708
+ 127,
8709
+ 57,
8710
+ 87,
8711
+ 73
8712
+ ]
8713
+ },
8489
8714
  {
8490
8715
  "name": "ScheduleRan",
8491
8716
  "discriminator": [
@@ -8626,7 +8851,7 @@
8626
8851
  {
8627
8852
  "code": 6001,
8628
8853
  "name": "NotAuthority",
8629
- "msg": "Signer is not the project's authority"
8854
+ "msg": "Signer is not the project's authority, nor another key this takes: the owner, the player or key the record names, or a contest's decider"
8630
8855
  },
8631
8856
  {
8632
8857
  "code": 6002,
@@ -8636,7 +8861,7 @@
8636
8861
  {
8637
8862
  "code": 6003,
8638
8863
  "name": "BadCollection",
8639
- "msg": "Collection is not a Core collection this signer controls"
8864
+ "msg": "Not a collection the project can take: a Core collection its owner or the project controls, or where the project is an update delegate, each named once and 32 at most; a collectible's is one of them"
8640
8865
  },
8641
8866
  {
8642
8867
  "code": 6004,
@@ -8651,7 +8876,7 @@
8651
8876
  {
8652
8877
  "code": 6006,
8653
8878
  "name": "BadEntries",
8654
- "msg": "A box needs an entry or more, each of a weight above 0 and prizes above 0, and no roll among them in a box that rolls; its slots draw among its entries, each named once; and several draws an open, or several opens, need a box with no NFT it rolls on"
8879
+ "msg": "A box needs an entry or more, each of a weight above 0 with at most 255 prizes, and no roll among them in a box that rolls; its slots draw among its entries, each named once; and several draws an open, or several opens, need a box with no NFT it rolls on"
8655
8880
  },
8656
8881
  {
8657
8882
  "code": 6007,
@@ -8661,7 +8886,7 @@
8661
8886
  {
8662
8887
  "code": 6008,
8663
8888
  "name": "KindLocked",
8664
- "msg": "An item's kind, soulbound and burnable flags can't change once one is issued"
8889
+ "msg": "An item's kind, soulbound and burnable flags, collection and traits can't change once one is issued"
8665
8890
  },
8666
8891
  {
8667
8892
  "code": 6009,
@@ -8676,7 +8901,7 @@
8676
8901
  {
8677
8902
  "code": 6011,
8678
8903
  "name": "ZeroAmount",
8679
- "msg": "Amount must be above zero"
8904
+ "msg": "Amount must be above zero, and a grant gives a prize it can give at once: not a stash's NFT at random, nor tokens from a sealed schedule's or a farm's vault"
8680
8905
  },
8681
8906
  {
8682
8907
  "code": 6012,
@@ -8701,7 +8926,7 @@
8701
8926
  {
8702
8927
  "code": 6016,
8703
8928
  "name": "NotTheirAccount",
8704
- "msg": "Money owed to a wallet goes to that wallet's associated token account of the mint"
8929
+ "msg": "Money owed to a wallet goes to that wallet's associated token account of the mint, and a Token Metadata NFT moves through the associated token account of the project (on a pass, of its receiver)"
8705
8930
  },
8706
8931
  {
8707
8932
  "code": 6017,
@@ -8736,7 +8961,7 @@
8736
8961
  {
8737
8962
  "code": 6023,
8738
8963
  "name": "BadSchedule",
8739
- "msg": "A schedule needs a period above zero; a sealed one, a mint that moves, a last run within 10 years and at most 10,000 runs, and a destination every run can pay"
8964
+ "msg": "A schedule needs a period above zero; a sealed one is switched on, with 1 run or more, its last at a time the clock can hold, each paying at most all its vault holds"
8740
8965
  },
8741
8966
  {
8742
8967
  "code": 6024,
@@ -8751,12 +8976,12 @@
8751
8976
  {
8752
8977
  "code": 6026,
8753
8978
  "name": "BadLottery",
8754
- "msg": "A lottery this program can't keep: its mints must move freely, an NFT ticket takes no price, shares or ticket mint, one that gives tickets back takes no shares, places that each take something and together 100% or less, runs of places alike, a header that one instruction makes, and a held prize or a raffle in its own stash, on a lottery that draws once"
8979
+ "msg": "A lottery this program can't keep: an NFT ticket takes no price, shares or ticket mint, one that gives tickets back takes no shares and alone may weigh tickets by time, sales close less than a rhythm before the draw, places that each take something and together 100% or less, runs of places alike, runs on one pool that say the same when it is short, a header that one instruction makes, and held prizes or a raffle, 256 at most, in its own stash, on a lottery that draws once"
8755
8980
  },
8756
8981
  {
8757
8982
  "code": 6027,
8758
8983
  "name": "RoundRunning",
8759
- "msg": "A lottery can't be closed or made again while its current round has a record"
8984
+ "msg": "A lottery can't be closed, made again or switched to repeating while its current round has a record, its last round still owes NFTs of its stash, or an earlier round still owes its pot"
8760
8985
  },
8761
8986
  {
8762
8987
  "code": 6028,
@@ -8776,12 +9001,12 @@
8776
9001
  {
8777
9002
  "code": 6031,
8778
9003
  "name": "BadRecipe",
8779
- "msg": "A recipe takes up to 255 collectibles (a place is a byte), no line of it is zero, and its needs and keeps name collectibles it has"
9004
+ "msg": "A recipe takes up to 255 collectibles (a place is a byte), no payment of it is zero, and its needs and keeps name collectibles it has"
8780
9005
  },
8781
9006
  {
8782
9007
  "code": 6032,
8783
9008
  "name": "OnceAtATime",
8784
- "msg": "A recipe that takes or makes a collectible is crafted once at a time"
9009
+ "msg": "A recipe that takes or makes a collectible, gives anything but a fixed amount of tokens, or reads the player's profile is crafted once at a time"
8785
9010
  },
8786
9011
  {
8787
9012
  "code": 6033,
@@ -8816,12 +9041,12 @@
8816
9041
  {
8817
9042
  "code": 6039,
8818
9043
  "name": "StillHeld",
8819
- "msg": "This collectible is held until its time is up"
9044
+ "msg": "This NFT is held until its time is up: only the project's authority releases a running hold, and nobody a running loan"
8820
9045
  },
8821
9046
  {
8822
9047
  "code": 6040,
8823
9048
  "name": "HoldOver",
8824
- "msg": "The hold on this collectible is over: it can only go back to its player"
9049
+ "msg": "The hold on this NFT is over: it can only go back to its player"
8825
9050
  },
8826
9051
  {
8827
9052
  "code": 6041,
@@ -8876,7 +9101,7 @@
8876
9101
  {
8877
9102
  "code": 6051,
8878
9103
  "name": "SameAccount",
8879
- "msg": "The project can't pay into the account it pays from"
9104
+ "msg": "A payment can't go into the account it comes from unless that account's owner signs it (never the project or a delegate), and an NFT moves between two different token accounts"
8880
9105
  },
8881
9106
  {
8882
9107
  "code": 6052,
@@ -8886,7 +9111,7 @@
8886
9111
  {
8887
9112
  "code": 6053,
8888
9113
  "name": "ToTheProject",
8889
- "msg": "The project's own address, or an account of this program, can't be given an NFT or a grant's prize: no record holds it, so nothing could move it again"
9114
+ "msg": "The project's own address, or an account of this program, can't be given an NFT (no record holds it, so nothing could move it again), nor a hold's rent"
8890
9115
  },
8891
9116
  {
8892
9117
  "code": 6054,
@@ -8921,7 +9146,7 @@
8921
9146
  {
8922
9147
  "code": 6060,
8923
9148
  "name": "OverWallet",
8924
- "msg": "This wallet has claimed this grant as often as it may"
9149
+ "msg": "This wallet, or the NFT it shows, has bought, crafted or claimed this as often as it may"
8925
9150
  },
8926
9151
  {
8927
9152
  "code": 6061,
@@ -8946,12 +9171,12 @@
8946
9171
  {
8947
9172
  "code": 6065,
8948
9173
  "name": "GateNotMet",
8949
- "msg": "This needs an NFT that passes its gate, held by the player and shown after the instruction's own accounts"
9174
+ "msg": "This needs what its gate asks of the player, shown after the instruction's own accounts: an NFT that passes it, held by the player; a place on its list; a locked stake; or a profile that passes"
8950
9175
  },
8951
9176
  {
8952
9177
  "code": 6066,
8953
9178
  "name": "BadRule",
8954
- "msg": "A rule or a boost the program can't keep: a number test with no key, or a boost over +10,000%"
9179
+ "msg": "A rule the program can't keep: a test with no key, a one-of test with no texts, a profile where only an NFT is read, or a stake gate of 0 tokens"
8955
9180
  },
8956
9181
  {
8957
9182
  "code": 6067,
@@ -8961,7 +9186,7 @@
8961
9186
  {
8962
9187
  "code": 6068,
8963
9188
  "name": "BadFarm",
8964
- "msg": "A farm this program can't keep: 1 to 256 lock tiers each above x0 and at most x11, boosts of at most +10,000% in all, and exits and missions only where its kind takes them"
9189
+ "msg": "A farm this program can't keep: 1 to 256 lock tiers each above x0 and at most x100, boosts of at most +100,000% each and in all, and exits and missions only where its kind takes them"
8965
9190
  },
8966
9191
  {
8967
9192
  "code": 6069,
@@ -8991,7 +9216,7 @@
8991
9216
  {
8992
9217
  "code": 6074,
8993
9218
  "name": "NotTheNft",
8994
- "msg": "That is not the NFT this needs: not the one its record or stash names, not the project's, a compressed NFT where none is taken, or a tree that is not Bubblegum v2"
9219
+ "msg": "That is not the NFT this needs: not the one its record or stash names, not the project's, one proven gone, one a move did not deliver, or a tree that is not Bubblegum v2"
8995
9220
  },
8996
9221
  {
8997
9222
  "code": 6075,
@@ -9001,7 +9226,7 @@
9001
9226
  {
9002
9227
  "code": 6076,
9003
9228
  "name": "NotProven",
9004
- "msg": "Prove the compressed NFT in this transaction first (prove_leaf): its record no longer reads (its leaf changed, or its root left the tree's change log)"
9229
+ "msg": "Prove the compressed NFT in this transaction first (prove_leaf): its record no longer reads (its leaf changed, or its root left the tree's change log); or pass an account that shows who holds the NFT"
9005
9230
  },
9006
9231
  {
9007
9232
  "code": 6077,
@@ -9046,7 +9271,7 @@
9046
9271
  {
9047
9272
  "code": 6085,
9048
9273
  "name": "BadMove",
9049
- "msg": "A move this program can't make: new tokens move as a fixed amount and are never burned; a pool pays at most all it holds, never into itself; a sealed schedule's vault pays only its runs"
9274
+ "msg": "A move this program can't make: new tokens move as a fixed amount and are never burned; a pool pays at most all it holds, never into itself; nothing pays into the project's vault; a sealed schedule's vault pays only its runs, and never a wallet this program owns"
9050
9275
  },
9051
9276
  {
9052
9277
  "code": 6086,
@@ -9061,17 +9286,17 @@
9061
9286
  {
9062
9287
  "code": 6088,
9063
9288
  "name": "CannotClose",
9064
- "msg": "Still needed: an item with units out, or a lottery with tickets sold this round. A box, a recipe or a sealed schedule is never closed, so its version or its terms never repeat"
9289
+ "msg": "Still needed: an item with units out. A box, a recipe or a sealed schedule is never closed, so its version or its terms never repeat"
9065
9290
  },
9066
9291
  {
9067
9292
  "code": 6089,
9068
9293
  "name": "BadAuction",
9069
- "msg": "An auction needs an end after its start and after now but within five years, an extension of at most five years, and a mint whose new accounts do not start frozen and can't be switched to"
9294
+ "msg": "An auction needs an end after its start and after now; one taking NFT bids takes a rule it can keep, no shares, a reserve of at most 3 NFTs, and no roll as its lot"
9070
9295
  },
9071
9296
  {
9072
9297
  "code": 6090,
9073
9298
  "name": "LotRefused",
9074
- "msg": "Not a lot an auction takes: a unit of an item on sale with one left, or an NFT its seller holds (a player's: a Core NFT in one of the project's collections)"
9299
+ "msg": "Not a lot an auction takes: a unit of an item with one left (not one whose traits a roll draws), a roll of a written box, or an NFT its seller holds; only an NFT lot goes first, and a sold one moves to its winner, never into a hold"
9075
9300
  },
9076
9301
  {
9077
9302
  "code": 6091,
@@ -9095,243 +9320,243 @@
9095
9320
  },
9096
9321
  {
9097
9322
  "code": 6095,
9323
+ "name": "CantCallOff",
9324
+ "msg": "Only the sale of an NFT its seller handed in is called off, and only before the lot moves to its winner"
9325
+ },
9326
+ {
9327
+ "code": 6096,
9098
9328
  "name": "NotOpenYet",
9099
9329
  "msg": "Not open yet: its window opens later"
9100
9330
  },
9101
9331
  {
9102
- "code": 6096,
9332
+ "code": 6097,
9103
9333
  "name": "WindowClosed",
9104
9334
  "msg": "Its window has closed"
9105
9335
  },
9106
9336
  {
9107
- "code": 6097,
9337
+ "code": 6098,
9108
9338
  "name": "PrizeNotCovered",
9109
9339
  "msg": "A prize this can't give whole: a pool short of it (or a share of it that comes to nothing), a mint the project can no longer mint, a contest's split not set aside, or the project has no vault for a prize's mint yet: open it first"
9110
9340
  },
9111
9341
  {
9112
- "code": 6098,
9342
+ "code": 6099,
9113
9343
  "name": "BadChoice",
9114
- "msg": "The choice a share needs: a wallet other than the buyer's own or the project's, or a collectible of the share's item that a player holds, passed as the chosen account; a contest's recipient only for its chosen share"
9344
+ "msg": "The choice a share needs: a wallet other than the project's, or a collectible of the share's item that a player holds, passed as the chosen account; a contest's recipient only for its chosen share"
9115
9345
  },
9116
9346
  {
9117
- "code": 6099,
9347
+ "code": 6100,
9118
9348
  "name": "BadStake",
9119
9349
  "msg": "This contest takes one entry per player, of exactly its stake"
9120
9350
  },
9121
9351
  {
9122
- "code": 6100,
9352
+ "code": 6101,
9123
9353
  "name": "OverWindow",
9124
9354
  "msg": "Over this record's limit for one wallet in this window"
9125
9355
  },
9126
9356
  {
9127
- "code": 6101,
9357
+ "code": 6102,
9128
9358
  "name": "WrongCounts",
9129
9359
  "msg": "This is not the list of counts, claims or rounds at the address its record, incarnation and subject name"
9130
9360
  },
9131
9361
  {
9132
- "code": 6102,
9362
+ "code": 6103,
9133
9363
  "name": "BadLimits",
9134
9364
  "msg": "A grant's window needs times that are not before 1970"
9135
9365
  },
9136
9366
  {
9137
- "code": 6103,
9367
+ "code": 6104,
9138
9368
  "name": "OverKey",
9139
9369
  "msg": "This voucher key has signed all the claims the grant allows one key"
9140
9370
  },
9141
9371
  {
9142
- "code": 6104,
9372
+ "code": 6105,
9143
9373
  "name": "TooManyAccounts",
9144
9374
  "msg": "A box's roll would hand the oracle more accounts than its answer can carry: fewer entries, or fewer mints its prizes are in"
9145
9375
  },
9146
9376
  {
9147
- "code": 6105,
9377
+ "code": 6106,
9148
9378
  "name": "NothingOwed",
9149
9379
  "msg": "This entry is owed nothing of this part: paid already, not owed, or not yet"
9150
9380
  },
9151
9381
  {
9152
- "code": 6106,
9382
+ "code": 6107,
9153
9383
  "name": "BadPrize",
9154
- "msg": "A prize this route can't give: a stash's NFT at random is a box's entry only"
9384
+ "msg": "A prize this route can't give: a stash's NFT at random is a box's entry only, and no prize comes from a sealed schedule's or a farm's vault"
9155
9385
  },
9156
9386
  {
9157
- "code": 6107,
9387
+ "code": 6108,
9158
9388
  "name": "Rolls",
9159
- "msg": "This box rolls (more than one entry, an NFT at random, a fresh item, several draws an open, or an NFT it rolls on): open it with open_box"
9389
+ "msg": "This box rolls (more than one entry, an NFT at random, or an NFT it rolls on): open it with open_box"
9160
9390
  },
9161
9391
  {
9162
- "code": 6108,
9392
+ "code": 6109,
9163
9393
  "name": "OneTicket",
9164
9394
  "msg": "An NFT pays for one ticket at a time"
9165
9395
  },
9166
9396
  {
9167
- "code": 6109,
9397
+ "code": 6110,
9168
9398
  "name": "CompressedBid",
9169
9399
  "msg": "A bid can't be a compressed NFT: bid Core or Token Metadata NFTs"
9170
9400
  },
9171
9401
  {
9172
- "code": 6110,
9402
+ "code": 6111,
9173
9403
  "name": "OverPrize",
9174
9404
  "msg": "A claim's own amount is of a grant of a fixed amount of tokens, at most that amount, and named by a voucher or a list"
9175
9405
  },
9176
9406
  {
9177
- "code": 6111,
9407
+ "code": 6112,
9178
9408
  "name": "NoSolForFee",
9179
9409
  "msg": "The signer holds too little SOL for the fee"
9180
9410
  },
9181
9411
  {
9182
- "code": 6112,
9412
+ "code": 6113,
9183
9413
  "name": "BadOffer",
9184
- "msg": "An offer takes a rule it can keep, at least one taker, a price or a loan above 0 (repaid with at least as much, within 5 years), shares only on a price, all its money as it arrives, and a mint whose accounts can't turn a payment away"
9414
+ "msg": "An offer takes a rule it can keep, at least one taker, a loan above 0 for a time above 0 (borrowed until a date within it), shares only on a price, and all its money as it arrives"
9185
9415
  },
9186
9416
  {
9187
- "code": 6113,
9417
+ "code": 6114,
9188
9418
  "name": "WinnerPicks",
9189
9419
  "msg": "While losers' NFTs are left, only the winner claims, and picks which one they take"
9190
9420
  },
9191
9421
  {
9192
- "code": 6114,
9422
+ "code": 6115,
9193
9423
  "name": "SubjectNonce",
9194
9424
  "msg": "A roll that moves an NFT's numbers is at the NFT's own nonce (its address's first 8 bytes): one at a time"
9195
9425
  },
9196
9426
  {
9197
- "code": 6115,
9427
+ "code": 6116,
9198
9428
  "name": "NotALoan",
9199
9429
  "msg": "This hold is no loan, or it is repaid"
9200
9430
  },
9201
9431
  {
9202
- "code": 6116,
9432
+ "code": 6117,
9203
9433
  "name": "LoanDue",
9204
9434
  "msg": "This loan is due: it can't be repaid, and its NFT goes to its lender"
9205
9435
  },
9206
9436
  {
9207
- "code": 6117,
9437
+ "code": 6118,
9208
9438
  "name": "OwedToLender",
9209
9439
  "msg": "A loan that is due goes to its lender"
9210
9440
  },
9211
9441
  {
9212
- "code": 6118,
9442
+ "code": 6119,
9213
9443
  "name": "Rented",
9214
9444
  "msg": "This NFT is rented: a rental runs until its end, and nobody takes the listing before (its maker may stop it)"
9215
9445
  },
9216
9446
  {
9217
- "code": 6119,
9447
+ "code": 6120,
9218
9448
  "name": "BadListing",
9219
- "msg": "A listing asks for a price above 0, and a rental for 1 period or more of a length above 0, all of them within 5 years"
9449
+ "msg": "A rental asks for a length above 0 and 1 period or more, and is taken for 1 period or more, up to its most"
9220
9450
  },
9221
9451
  {
9222
- "code": 6120,
9452
+ "code": 6121,
9223
9453
  "name": "NotCompoundable",
9224
9454
  "msg": "Only a farm of tokens whose rewards are the staked token compounds"
9225
9455
  },
9226
9456
  {
9227
- "code": 6121,
9457
+ "code": 6122,
9228
9458
  "name": "Sealed",
9229
9459
  "msg": "A sealed schedule is written once: nobody edits, switches off or re-seals it"
9230
9460
  },
9231
9461
  {
9232
- "code": 6122,
9462
+ "code": 6123,
9233
9463
  "name": "NotInStash",
9234
- "msg": "A lottery's held prize must be in its own stash when the lottery is written"
9464
+ "msg": "A lottery's held prizes, and as many NFTs as it raffles, must be in its own stash when the lottery is written"
9235
9465
  },
9236
9466
  {
9237
- "code": 6123,
9467
+ "code": 6124,
9238
9468
  "name": "Promised",
9239
9469
  "msg": "A lottery's place promises this NFT: it leaves its stash only as that prize, or once the lottery has ended and its places have taken theirs"
9240
9470
  },
9241
9471
  {
9242
- "code": 6124,
9472
+ "code": 6125,
9243
9473
  "name": "ListingStopped",
9244
9474
  "msg": "Its maker stopped this listing: it takes no more renters, and closes once the rental runs out"
9245
9475
  },
9246
9476
  {
9247
- "code": 6125,
9477
+ "code": 6126,
9248
9478
  "name": "NotAnNft",
9249
9479
  "msg": "Only an NFT is taken: one token of a mint that can never mint another, not a unit of a semi-fungible item"
9250
9480
  },
9251
9481
  {
9252
- "code": 6126,
9482
+ "code": 6127,
9253
9483
  "name": "OtherSide",
9254
9484
  "msg": "A wallet backs one side of a contest: it already has an entry on another side"
9255
9485
  },
9256
9486
  {
9257
- "code": 6127,
9487
+ "code": 6128,
9258
9488
  "name": "ExitWhileLocked",
9259
- "msg": "While its lock runs, a seat can't move to a tier with a larger early-exit fee"
9489
+ "msg": "While its lock runs, a seat can't move to a tier it could leave early from more cheaply"
9260
9490
  },
9261
9491
  {
9262
- "code": 6128,
9492
+ "code": 6129,
9263
9493
  "name": "WalletMustSign",
9264
9494
  "msg": "A grant's claim needs its wallet's signature"
9265
9495
  },
9266
9496
  {
9267
- "code": 6129,
9497
+ "code": 6130,
9268
9498
  "name": "BurnLocked",
9269
9499
  "msg": "This Token-2022 mint's issuer keeps a burn authority (permissioned burn), so the program could never burn it later: it is refused before any money comes in"
9270
9500
  },
9271
9501
  {
9272
- "code": 6130,
9502
+ "code": 6131,
9273
9503
  "name": "WrongProfile",
9274
9504
  "msg": "This needs the player's own profile in this project: it is missing, or another wallet's or another project's"
9275
9505
  },
9276
9506
  {
9277
- "code": 6131,
9507
+ "code": 6132,
9278
9508
  "name": "WrongTable",
9279
9509
  "msg": "This is not the project's table at the address its id names"
9280
9510
  },
9281
9511
  {
9282
- "code": 6132,
9512
+ "code": 6133,
9283
9513
  "name": "BadTable",
9284
- "msg": "A table takes rows of a weight and a stock above 0 (labels of 32 bytes at most, a table of labels only) until it is sealed, and is drawn from only once it is"
9514
+ "msg": "A table takes rows (labels of 32 bytes at most, a table of labels only) until it is sealed, and is drawn from only once it is"
9285
9515
  },
9286
9516
  {
9287
- "code": 6133,
9517
+ "code": 6134,
9288
9518
  "name": "BadItem",
9289
9519
  "msg": "A trait's key is the project's own (not item_id, rarity, serial or made), each item names each key once and draws each table by one trait, and a range runs from its least to its most"
9290
9520
  },
9291
9521
  {
9292
- "code": 6134,
9522
+ "code": 6135,
9293
9523
  "name": "BadList",
9294
9524
  "msg": "This is not a list of records of this width, or no record is at this place"
9295
9525
  },
9296
9526
  {
9297
- "code": 6135,
9527
+ "code": 6136,
9298
9528
  "name": "GrantLive",
9299
9529
  "msg": "A grant's shards close only once the grant is closed or made again"
9300
9530
  },
9301
9531
  {
9302
- "code": 6136,
9532
+ "code": 6137,
9303
9533
  "name": "ShardsFixed",
9304
9534
  "msg": "A grant keeps its shard bits (0 to 8) for its incarnation: an edit can't change them"
9305
9535
  },
9306
9536
  {
9307
- "code": 6137,
9537
+ "code": 6138,
9308
9538
  "name": "BadRounds",
9309
9539
  "msg": "A claim by voucher or list names one round or more; an open claim names none"
9310
9540
  },
9311
9541
  {
9312
- "code": 6138,
9542
+ "code": 6139,
9313
9543
  "name": "NotBurned",
9314
9544
  "msg": "This NFT is not burned: a Sheet closes once its Core asset is burned, its mint holds none, or a record proves its leaf burned"
9315
9545
  },
9316
9546
  {
9317
- "code": 6139,
9547
+ "code": 6140,
9318
9548
  "name": "OutOfOrder",
9319
9549
  "msg": "Several NFTs, seats or holds in one call come in ascending order of their addresses, each once"
9320
9550
  },
9321
9551
  {
9322
- "code": 6140,
9552
+ "code": 6141,
9323
9553
  "name": "PackTooLarge",
9324
- "msg": "A pack's draws (each open's, times the opens bought together) must all fit one answer of the oracle's: fewer entries, prizes an entry or draws"
9554
+ "msg": "A box's draws (one, or each open's times the opens bought together) must all fit one answer of the oracle's, and the sales one buy adds up one transaction: fewer entries, prizes an entry, draws or opens"
9325
9555
  },
9326
9556
  {
9327
- "code": 6141,
9557
+ "code": 6142,
9328
9558
  "name": "WrongEnds",
9329
9559
  "msg": "A farm whose seats can stop earning takes its record of ends, and no other farm does"
9330
- },
9331
- {
9332
- "code": 6142,
9333
- "name": "TooManyEnds",
9334
- "msg": "This farm is waiting on as many different end times as it can keep"
9335
9560
  }
9336
9561
  ],
9337
9562
  "types": [
@@ -9501,15 +9726,14 @@
9501
9726
  {
9502
9727
  "name": "ends_at",
9503
9728
  "docs": [
9504
- "Unix time bids close, unless a late bid moved it (`ends`). Within `MAX_CONTEST_SECONDS` of",
9505
- "the opening (a time written in milliseconds is a mistake)."
9729
+ "Unix time bids close, unless a late bid moved it (`ends`): any time the seller chooses."
9506
9730
  ],
9507
9731
  "type": "i64"
9508
9732
  },
9509
9733
  {
9510
9734
  "name": "extend",
9511
9735
  "docs": [
9512
- "A bid moves the end to at least this many seconds after it. At most `MAX_CONTEST_SECONDS`."
9736
+ "A bid moves the end to at least this many seconds after it."
9513
9737
  ],
9514
9738
  "type": "u32"
9515
9739
  },
@@ -9517,7 +9741,7 @@
9517
9741
  "name": "shares",
9518
9742
  "docs": [
9519
9743
  "The parts of the winning bid taken at the end; the rest goes to the seller of an NFT, or",
9520
- "the treasury for the project's item."
9744
+ "the treasury for the project's item. Emptied once they are paid and the seller is still owed."
9521
9745
  ],
9522
9746
  "type": {
9523
9747
  "vec": {
@@ -9580,8 +9804,9 @@
9580
9804
  {
9581
9805
  "name": "proceeds_owed",
9582
9806
  "docs": [
9583
- "Once the lot was delivered: what is still owed its seller, whose account couldn't take it then.",
9584
- "The next `end_auction` pays it, and closes the auction."
9807
+ "Once the lot was delivered: what the winning bid still owes, the next `end_auction` paying it",
9808
+ "and closing the auction. The whole bid (tokens, or its NFTs' count) when the lot went first",
9809
+ "(`Ending::LotFirst`), its shares still to pay; or what its seller's account couldn't take."
9585
9810
  ],
9586
9811
  "type": "u64"
9587
9812
  },
@@ -9672,9 +9897,11 @@
9672
9897
  {
9673
9898
  "name": "AuctionEnded",
9674
9899
  "docs": [
9675
- "An auction ended and closed: sold to `winner` for `price` (the shares took it, less what",
9676
- "went to the lot's owner), or with no winner, its lot home. `asset` is the collectible that",
9677
- "moved or was minted (the default address for an item's serial voided, or a normal item)."
9900
+ "An auction ended: sold to `winner` for `price` (the shares took it, less what went to the lot's",
9901
+ "owner), or with no winner, its lot home. `asset` is the collectible that moved or was minted (the",
9902
+ "default address for an item's serial voided, a normal item, an unsold lot proven gone, or an end",
9903
+ "that paid what the bid still owed once the lot had moved). It closes unless something is still",
9904
+ "owed (`Auction::proceeds_owed`): a lot sent first is paid by the next end, `remainder` 0 now."
9678
9905
  ],
9679
9906
  "type": {
9680
9907
  "kind": "struct",
@@ -9947,7 +10174,7 @@
9947
10174
  {
9948
10175
  "name": "shares",
9949
10176
  "docs": [
9950
- "Where the shares went, as the buyer's choice wrote them."
10177
+ "The shares that were sent, as the buyer's choice wrote them (`Paid`'s rule)."
9951
10178
  ],
9952
10179
  "type": {
9953
10180
  "vec": {
@@ -10204,6 +10431,10 @@
10204
10431
  },
10205
10432
  {
10206
10433
  "name": "asset",
10434
+ "docs": [
10435
+ "The collectible rewritten or burned, or the wallet whose profile was written. The default",
10436
+ "address for a `Make`: each one made, its owner and its serial are in its own `PrizeGiven`."
10437
+ ],
10207
10438
  "type": "pubkey"
10208
10439
  },
10209
10440
  {
@@ -10214,17 +10445,6 @@
10214
10445
  }
10215
10446
  }
10216
10447
  },
10217
- {
10218
- "name": "owner",
10219
- "docs": [
10220
- "For one made: who got it, and its serial number. The default address and 0 otherwise."
10221
- ],
10222
- "type": "pubkey"
10223
- },
10224
- {
10225
- "name": "serial",
10226
- "type": "u32"
10227
- },
10228
10448
  {
10229
10449
  "name": "reference",
10230
10450
  "type": {
@@ -10641,7 +10861,8 @@
10641
10861
  {
10642
10862
  "name": "cap",
10643
10863
  "docs": [
10644
- "In a contest of NFTs, the most losers' NFTs one winner takes (`None`: no cap; never 0)."
10864
+ "In a contest of NFTs, the most losers' NFTs one winner takes (`None`: no cap; 0: every",
10865
+ "loser's NFT goes to the opener)."
10645
10866
  ],
10646
10867
  "type": {
10647
10868
  "option": "u32"
@@ -10685,7 +10906,8 @@
10685
10906
  {
10686
10907
  "name": "Crafted",
10687
10908
  "docs": [
10688
- "A player crafted a recipe. The tokens it took and gave are the recipe's own lines."
10909
+ "A player crafted a recipe. The tokens it took and gave are the recipe's own lines, but for",
10910
+ "`to_treasury`."
10689
10911
  ],
10690
10912
  "type": {
10691
10913
  "kind": "struct",
@@ -10736,6 +10958,17 @@
10736
10958
  "type": {
10737
10959
  "vec": "pubkey"
10738
10960
  }
10961
+ },
10962
+ {
10963
+ "name": "to_treasury",
10964
+ "docs": [
10965
+ "The payment lines (by their place among the recipe's inputs, the first 0) that nobody could",
10966
+ "take where they say (a collectible nobody holds, an account of this program): the treasury got",
10967
+ "them."
10968
+ ],
10969
+ "type": {
10970
+ "vec": "u32"
10971
+ }
10739
10972
  }
10740
10973
  ]
10741
10974
  }
@@ -11069,6 +11302,27 @@
11069
11302
  ]
11070
11303
  }
11071
11304
  },
11305
+ {
11306
+ "name": "Ending",
11307
+ "docs": [
11308
+ "Which end `end_auction` makes of an auction with a bid in. With no bid, each is the same: the lot",
11309
+ "goes home."
11310
+ ],
11311
+ "type": {
11312
+ "kind": "enum",
11313
+ "variants": [
11314
+ {
11315
+ "name": "Deliver"
11316
+ },
11317
+ {
11318
+ "name": "LotFirst"
11319
+ },
11320
+ {
11321
+ "name": "CallOff"
11322
+ }
11323
+ ]
11324
+ }
11325
+ },
11072
11326
  {
11073
11327
  "name": "Entered",
11074
11328
  "docs": [
@@ -11321,7 +11575,8 @@
11321
11575
  "docs": [
11322
11576
  "The carry: rounding of a share over the total weight, times `PRECISION`. The next move before",
11323
11577
  "the farm's end credits it to the seats there once it adds up to a share; a move that leaves no",
11324
- "weight, or any move once the farm is over, frees its whole tokens (`FarmSide::settle`)."
11578
+ "weight, or any move once the farm is over, frees its whole tokens (`FarmSide::settle`), and so",
11579
+ "does a walk that begins with no weight or where the weight reaches 0 (`Farm::walk`)."
11325
11580
  ],
11326
11581
  "type": "u128"
11327
11582
  },
@@ -11613,6 +11868,25 @@
11613
11868
  ]
11614
11869
  }
11615
11870
  },
11871
+ {
11872
+ "name": "FeesCollected",
11873
+ "docs": [
11874
+ "The platform took `amount` lamports of fees out of the fee boxes passed, to `to`."
11875
+ ],
11876
+ "type": {
11877
+ "kind": "struct",
11878
+ "fields": [
11879
+ {
11880
+ "name": "to",
11881
+ "type": "pubkey"
11882
+ },
11883
+ {
11884
+ "name": "amount",
11885
+ "type": "u64"
11886
+ }
11887
+ ]
11888
+ }
11889
+ },
11616
11890
  {
11617
11891
  "name": "Gate",
11618
11892
  "docs": [
@@ -12021,8 +12295,8 @@
12021
12295
  {
12022
12296
  "name": "at_least",
12023
12297
  "docs": [
12024
- "In a farm of tokens, a seat grows only while it stakes at least this much (base units), so a",
12025
- "dust stake earns no XP. 0 in a farm of collectibles (`BadFarm`)."
12298
+ "A seat grows only while it stakes at least this much (base units), so a dust stake earns no",
12299
+ "XP. A collectible stakes 1: in a farm of collectibles, more than 1 grows nothing."
12026
12300
  ],
12027
12301
  "type": "u64"
12028
12302
  }
@@ -12558,6 +12832,30 @@
12558
12832
  ]
12559
12833
  }
12560
12834
  },
12835
+ {
12836
+ "name": "LeftoverBurned",
12837
+ "docs": [
12838
+ "A contest's or a lottery round's token account closed, and `amount` of `mint` it still held,",
12839
+ "which was nobody's (`Tokens::retire`), was burned out of it."
12840
+ ],
12841
+ "type": {
12842
+ "kind": "struct",
12843
+ "fields": [
12844
+ {
12845
+ "name": "account",
12846
+ "type": "pubkey"
12847
+ },
12848
+ {
12849
+ "name": "mint",
12850
+ "type": "pubkey"
12851
+ },
12852
+ {
12853
+ "name": "amount",
12854
+ "type": "u64"
12855
+ }
12856
+ ]
12857
+ }
12858
+ },
12561
12859
  {
12562
12860
  "name": "Limits",
12563
12861
  "docs": [
@@ -13048,7 +13346,7 @@
13048
13346
  "docs": [
13049
13347
  "The NFT the box rolls on, when it rolls on one: one the player brings that passes this",
13050
13348
  "rule (an enchant, a forge, a mission's return), which its entries' `fates` act on. It is",
13051
- "also the NFT its gate and odds read."
13349
+ "also the NFT its gate's and odds' rules on an NFT read."
13052
13350
  ],
13053
13351
  "type": {
13054
13352
  "option": {
@@ -13146,7 +13444,7 @@
13146
13444
  {
13147
13445
  "name": "every",
13148
13446
  "docs": [
13149
- "Seconds from one draw to the next. 0: it draws once, then ends."
13447
+ "Seconds from one draw to the next. 0: it draws once more, round `last`, then ends."
13150
13448
  ],
13151
13449
  "type": "i64"
13152
13450
  },
@@ -13154,7 +13452,15 @@
13154
13452
  "name": "round",
13155
13453
  "docs": [
13156
13454
  "Counts the rounds: up by one as a round's draw is first asked, or it is cancelled short, or",
13157
- "nobody bought into it. A lottery that draws once has ended past round 0."
13455
+ "nobody bought into it. A lottery that draws once has ended past round `last`."
13456
+ ],
13457
+ "type": "u32"
13458
+ },
13459
+ {
13460
+ "name": "last",
13461
+ "docs": [
13462
+ "The round it was at when last written: for one that draws once, its last round. A repeating",
13463
+ "lottery edited to draw once ends after the round it is at, whoever buys into it."
13158
13464
  ],
13159
13465
  "type": "u32"
13160
13466
  },
@@ -13302,10 +13608,11 @@
13302
13608
  {
13303
13609
  "name": "winning_ticket",
13304
13610
  "docs": [
13305
- "First place's ticket. The others follow at even steps (`LotteryRound::ticket_of_place`); each",
13306
- "place's winner is the buyer of the entry that holds its ticket."
13611
+ "First place's ticket (in a weighted round, a point of its weight). The others follow at even",
13612
+ "steps (`LotteryRound::ticket_of_place`); each place's winner is the buyer of the entry that",
13613
+ "holds its ticket."
13307
13614
  ],
13308
- "type": "u64"
13615
+ "type": "u128"
13309
13616
  },
13310
13617
  {
13311
13618
  "name": "randomness",
@@ -13463,7 +13770,8 @@
13463
13770
  "name": "returns",
13464
13771
  "docs": [
13465
13772
  "No loss: every ticket goes back to its buyer once the round is drawn, and the winners take",
13466
- "only the pot (what is paid into it: yield, a sponsor). No shares, no ticket mint; paid from a pot."
13773
+ "only the pot (what is paid into it: yield, a sponsor) and their prizes. No shares, no ticket",
13774
+ "mint. Paid from its own money, its places take no money: they give their prizes."
13467
13775
  ],
13468
13776
  "type": "bool"
13469
13777
  },
@@ -13474,6 +13782,23 @@
13474
13782
  "draw. 0: no least."
13475
13783
  ],
13476
13784
  "type": "u64"
13785
+ },
13786
+ {
13787
+ "name": "closes_before",
13788
+ "docs": [
13789
+ "Sales close this many seconds before the draw, so every ticket is held at least that long",
13790
+ "(in a no-loss lottery, a pot goes to money that stayed in). 0: they sell until the draw."
13791
+ ],
13792
+ "type": "i64"
13793
+ },
13794
+ {
13795
+ "name": "time_weighted",
13796
+ "docs": [
13797
+ "Each ticket counts in the draw for the seconds from its purchase to the close of sales (the",
13798
+ "round's own `draws_at` less its `closes_before`), so money held longer is likelier to win.",
13799
+ "Only for a lottery that `returns` its tickets. Off: every ticket counts one."
13800
+ ],
13801
+ "type": "bool"
13477
13802
  }
13478
13803
  ]
13479
13804
  }
@@ -13626,8 +13951,10 @@
13626
13951
  {
13627
13952
  "name": "OddsRaised",
13628
13953
  "docs": [
13629
- "A purchase fixed the odds boosts from the collectible its player showed (`rules.rs`):",
13630
- "`raised` has the basis points added to each entry's weight, in entry order."
13954
+ "A roll's odds boosts were fixed (`rules.rs`): at a purchase, from the collectible its player showed",
13955
+ "and their profile; at a roll made on an NFT, from that NFT; at another roll's first ask (`ask_roll`),",
13956
+ "from the profile and an NFT its player showed then, added to what the NFT it is on raised. `raised` has",
13957
+ "all the basis points the order now adds to each entry's weight, in entry order."
13631
13958
  ],
13632
13959
  "type": {
13633
13960
  "kind": "struct",
@@ -13639,14 +13966,24 @@
13639
13966
  {
13640
13967
  "name": "requested_slot",
13641
13968
  "docs": [
13642
- "The purchase identity at this reusable order address. For a mission's or a recipe's roll,",
13643
- "the slot it was made in: `ask_roll` moves the order's to the slot it asks in, which its",
13644
- "`OrderRolled` and `OrderSettled` carry."
13969
+ "The purchase identity at this reusable order address. For a roll made on an NFT, the slot it",
13970
+ "was made in; at an ask, the slot it asks in, which its `OrderRolled` and `OrderSettled` carry."
13645
13971
  ],
13646
13972
  "type": "u64"
13647
13973
  },
13648
13974
  {
13649
13975
  "name": "asset",
13976
+ "docs": [
13977
+ "The NFT read (the default address for none): at an ask, the NFT shown, or the one the roll is on",
13978
+ "when what it raised is in `raised`."
13979
+ ],
13980
+ "type": "pubkey"
13981
+ },
13982
+ {
13983
+ "name": "profile",
13984
+ "docs": [
13985
+ "The player's profile read (the default address for none)."
13986
+ ],
13650
13987
  "type": "pubkey"
13651
13988
  },
13652
13989
  {
@@ -13903,8 +14240,8 @@
13903
14240
  {
13904
14241
  "name": "odds_bps",
13905
14242
  "docs": [
13906
- "What each of the box's odds rules added at purchase, in basis points. `box_version`",
13907
- "binds each position to its rule; unused positions are zero. The roll still checks stock."
14243
+ "What each of the box's odds rules added at purchase, or by the roll's first ask, in basis points.",
14244
+ "`box_version` binds each position to its rule; unused positions are zero. The roll still checks stock."
13908
14245
  ],
13909
14246
  "type": {
13910
14247
  "vec": "u32"
@@ -14251,6 +14588,22 @@
14251
14588
  "vec": "u16"
14252
14589
  }
14253
14590
  },
14591
+ {
14592
+ "name": "gave",
14593
+ "docs": [
14594
+ "How many of `won` each of `entries` set aside, in the same order: fewer than the entry names",
14595
+ "when a prize of it turned out short."
14596
+ ],
14597
+ "type": "bytes"
14598
+ },
14599
+ {
14600
+ "name": "missed",
14601
+ "docs": [
14602
+ "The draws made that landed on an entry that couldn't be given, and gave nothing",
14603
+ "(`WhenOut::GiveNothing`): they are not in `entries`."
14604
+ ],
14605
+ "type": "u32"
14606
+ },
14254
14607
  {
14255
14608
  "name": "won",
14256
14609
  "docs": [
@@ -14318,8 +14671,9 @@
14318
14671
  {
14319
14672
  "name": "won",
14320
14673
  "docs": [
14321
- "What the player got, as the roll set it aside. What each became follows from it: a",
14322
- "collectible at `[\"asset\", item, serial]`, the NFT itself."
14674
+ "What the roll set aside for the player: this call gave those from `from` on, but for any a",
14675
+ "`PrizeForgone` names. What each became follows from it: a collectible at `[\"asset\", item,",
14676
+ "serial]`, the NFT itself."
14323
14677
  ],
14324
14678
  "type": {
14325
14679
  "vec": {
@@ -14341,7 +14695,8 @@
14341
14695
  {
14342
14696
  "name": "shares",
14343
14697
  "docs": [
14344
- "The split fixed at purchase."
14698
+ "The shares of the split fixed at purchase that this call sent (`Paid`'s rule): none when an",
14699
+ "earlier part made the split."
14345
14700
  ],
14346
14701
  "type": {
14347
14702
  "vec": {
@@ -14358,6 +14713,14 @@
14358
14713
  "by this call's split."
14359
14714
  ],
14360
14715
  "type": "u64"
14716
+ },
14717
+ {
14718
+ "name": "back",
14719
+ "docs": [
14720
+ "What this call gave back to the player of what they paid: the worth of the draws the roll",
14721
+ "didn't make (`Order::back`)."
14722
+ ],
14723
+ "type": "u64"
14361
14724
  }
14362
14725
  ]
14363
14726
  }
@@ -14450,7 +14813,8 @@
14450
14813
  {
14451
14814
  "name": "shares",
14452
14815
  "docs": [
14453
- "Where the shares went. Each was sent `amount * bps / 10,000`, rounded down."
14816
+ "The shares that were sent, each `amount * bps / 10,000`, rounded down. One nobody could take",
14817
+ "(`rail.rs`) is left out, and its part is in `treasury_remainder`."
14454
14818
  ],
14455
14819
  "type": {
14456
14820
  "vec": {
@@ -14658,6 +15022,18 @@
14658
15022
  }
14659
15023
  }
14660
15024
  },
15025
+ {
15026
+ "name": "when_short",
15027
+ "docs": [
15028
+ "For tokens from a pool: what its places get when the pool holds less than they win",
15029
+ "(`WhenShort`). Every run of one pool says the same."
15030
+ ],
15031
+ "type": {
15032
+ "defined": {
15033
+ "name": "WhenShort"
15034
+ }
15035
+ }
15036
+ },
14661
15037
  {
14662
15038
  "name": "times",
14663
15039
  "type": "u32"
@@ -14795,6 +15171,40 @@
14795
15171
  ]
14796
15172
  }
14797
15173
  },
15174
+ {
15175
+ "name": "PrizeForgone",
15176
+ "docs": [
15177
+ "A prize an order's settle did not give (`OrderSettled` lists it, an `OrderPartSettled` spans it): the one at",
15178
+ "`at` of the order's `won`. Its player, settling their own order, gave it up (tokens or a",
15179
+ "collectible they can't receive, a stash's NFT put back), or a compressed one's collection can't",
15180
+ "hold it (its serial voided)."
15181
+ ],
15182
+ "type": {
15183
+ "kind": "struct",
15184
+ "fields": [
15185
+ {
15186
+ "name": "order",
15187
+ "type": "pubkey"
15188
+ },
15189
+ {
15190
+ "name": "requested_slot",
15191
+ "type": "u64"
15192
+ },
15193
+ {
15194
+ "name": "at",
15195
+ "type": "u32"
15196
+ },
15197
+ {
15198
+ "name": "won",
15199
+ "type": {
15200
+ "defined": {
15201
+ "name": "Won"
15202
+ }
15203
+ }
15204
+ }
15205
+ ]
15206
+ }
15207
+ },
14798
15208
  {
14799
15209
  "name": "PrizeGiven",
14800
15210
  "docs": [
@@ -15037,6 +15447,38 @@
15037
15447
  ]
15038
15448
  }
15039
15449
  },
15450
+ {
15451
+ "name": "ProjectUpdated",
15452
+ "docs": [
15453
+ "The owner changed the project's settings (`update_project`): these are its keys and its pause",
15454
+ "now."
15455
+ ],
15456
+ "type": {
15457
+ "kind": "struct",
15458
+ "fields": [
15459
+ {
15460
+ "name": "project",
15461
+ "type": "pubkey"
15462
+ },
15463
+ {
15464
+ "name": "owner",
15465
+ "type": "pubkey"
15466
+ },
15467
+ {
15468
+ "name": "authority",
15469
+ "type": "pubkey"
15470
+ },
15471
+ {
15472
+ "name": "treasury",
15473
+ "type": "pubkey"
15474
+ },
15475
+ {
15476
+ "name": "paused",
15477
+ "type": "bool"
15478
+ }
15479
+ ]
15480
+ }
15481
+ },
15040
15482
  {
15041
15483
  "name": "Raise",
15042
15484
  "docs": [
@@ -15087,9 +15529,9 @@
15087
15529
  {
15088
15530
  "name": "mints",
15089
15531
  "docs": [
15090
- "Minted when a seat is paid (the project must be the rewards' mint authority), or paid from",
15091
- "what is free in the rewards vault while it lasts: what it can't cover, or the mint has no room",
15092
- "for, is not owed later."
15532
+ "Minted when a seat is paid, while the project is the rewards' mint authority, or paid from what",
15533
+ "is free in the rewards vault while it lasts: what it can't cover, or the mint has no room for",
15534
+ "(none while the project is not its authority), is not owed later."
15093
15535
  ],
15094
15536
  "type": "bool"
15095
15537
  },
@@ -15399,8 +15841,8 @@
15399
15841
  {
15400
15842
  "name": "Released",
15401
15843
  "docs": [
15402
- "A held collectible left the project for `to`: given by the authority while its hold ran, or",
15403
- "sent home to its player by anyone once it was over."
15844
+ "A held collectible left the project for `to`: given by the authority while its hold ran, sent",
15845
+ "home to its player by anyone once it was over, or brought home by a loan's repayment (`Repaid`)."
15404
15846
  ],
15405
15847
  "type": {
15406
15848
  "kind": "struct",
@@ -15447,7 +15889,9 @@
15447
15889
  {
15448
15890
  "name": "Repaid",
15449
15891
  "docs": [
15450
- "A loan was repaid before it was due, by `by` (the borrower or anyone), and its NFT went home."
15892
+ "A loan was repaid before it was due, by `by` (the borrower or anyone). `home`: its NFT went home",
15893
+ "to the borrower in the same call (a `Released` beside it); otherwise it waits in a hold that is",
15894
+ "over, for anyone to send home (`release`)."
15451
15895
  ],
15452
15896
  "type": {
15453
15897
  "kind": "struct",
@@ -15475,6 +15919,10 @@
15475
15919
  {
15476
15920
  "name": "repay",
15477
15921
  "type": "u64"
15922
+ },
15923
+ {
15924
+ "name": "home",
15925
+ "type": "bool"
15478
15926
  }
15479
15927
  ]
15480
15928
  }
@@ -15540,10 +15988,11 @@
15540
15988
  {
15541
15989
  "name": "RollMade",
15542
15990
  "docs": [
15543
- "A mission's return or a recipe made a roll (`waiting_order`): it waits for anyone to ask the",
15544
- "oracle (`ask_roll`). On `subject` (the default address for none), which the project holds until",
15545
- "it is settled when `held`. It names no slot: the order's `requested_slot` is set when it is",
15546
- "asked, and its `OrderRolled` and `OrderSettled` carry that one."
15991
+ "A purchase (`open_box`), or a mission's return, a recipe or a prize, made a roll (`waiting_order`:",
15992
+ "it waits for its player or the project's keys to ask the oracle, `ask_roll`). On `subject` (the",
15993
+ "default address for none), which the project holds until it is settled when `held`. It names no",
15994
+ "slot: a purchase's `requested_slot` is the slot of this receipt, a waiting roll's is set when it",
15995
+ "is asked, and its `OrderRolled` and `OrderSettled` carry that one."
15547
15996
  ],
15548
15997
  "type": {
15549
15998
  "kind": "struct",
@@ -15571,6 +16020,25 @@
15571
16020
  {
15572
16021
  "name": "held",
15573
16022
  "type": "bool"
16023
+ },
16024
+ {
16025
+ "name": "mint",
16026
+ "docs": [
16027
+ "What the order holds of what was paid for it (`paid` of `mint`, in the project's vault): a",
16028
+ "purchase's price as it arrived, an auction's winning bid, 0 for a free roll."
16029
+ ],
16030
+ "type": "pubkey"
16031
+ },
16032
+ {
16033
+ "name": "paid",
16034
+ "type": "u64"
16035
+ },
16036
+ {
16037
+ "name": "opens",
16038
+ "docs": [
16039
+ "The opens it is of (`open_box`'s `count`)."
16040
+ ],
16041
+ "type": "u32"
15574
16042
  }
15575
16043
  ]
15576
16044
  }
@@ -15669,6 +16137,62 @@
15669
16137
  ]
15670
16138
  }
15671
16139
  },
16140
+ {
16141
+ "name": "SaleCalledOff",
16142
+ "docs": [
16143
+ "A sale of an NFT lot called off after its end, the lot never having moved to `bidder`, and the",
16144
+ "auction closed: `back` of the winning bid went back to them (tokens, or how many of its NFTs: one",
16145
+ "proven gone stays gone); the `lot` went home to its seller (`home`: moved, or a hold for them), or",
16146
+ "was proven gone. `gone`: called off on that evidence, by anyone (`by`); otherwise by the",
16147
+ "project's keys."
16148
+ ],
16149
+ "type": {
16150
+ "kind": "struct",
16151
+ "fields": [
16152
+ {
16153
+ "name": "project",
16154
+ "type": "pubkey"
16155
+ },
16156
+ {
16157
+ "name": "auction",
16158
+ "type": "pubkey"
16159
+ },
16160
+ {
16161
+ "name": "bidder",
16162
+ "type": "pubkey"
16163
+ },
16164
+ {
16165
+ "name": "back",
16166
+ "type": "u64"
16167
+ },
16168
+ {
16169
+ "name": "lot",
16170
+ "type": "pubkey"
16171
+ },
16172
+ {
16173
+ "name": "home",
16174
+ "type": "bool"
16175
+ },
16176
+ {
16177
+ "name": "gone",
16178
+ "type": "bool"
16179
+ },
16180
+ {
16181
+ "name": "by",
16182
+ "type": "pubkey"
16183
+ },
16184
+ {
16185
+ "name": "reference",
16186
+ "type": {
16187
+ "array": [
16188
+ "u8",
16189
+ 32
16190
+ ]
16191
+ }
16192
+ }
16193
+ ]
16194
+ }
16195
+ },
15672
16196
  {
15673
16197
  "name": "Schedule",
15674
16198
  "docs": [
@@ -16368,6 +16892,14 @@
16368
16892
  "name": "count",
16369
16893
  "type": "u32"
16370
16894
  },
16895
+ {
16896
+ "name": "weight",
16897
+ "docs": [
16898
+ "What they weigh in the draw: `count`, or in a weighted round (`time_weighted`) `count` times",
16899
+ "the seconds from the purchase to the close of sales."
16900
+ ],
16901
+ "type": "u128"
16902
+ },
16371
16903
  {
16372
16904
  "name": "entry",
16373
16905
  "docs": [
@@ -16730,6 +17262,14 @@
16730
17262
  "What leaving early left behind (`Tier::exit_bps`)."
16731
17263
  ],
16732
17264
  "type": "u64"
17265
+ },
17266
+ {
17267
+ "name": "prize_missed",
17268
+ "docs": [
17269
+ "The mission's prize was won but could not be given (a pool short of it, an item sold out),",
17270
+ "and the NFT went home without it: no `PrizeGiven`, and nothing keeps it owed."
17271
+ ],
17272
+ "type": "bool"
16733
17273
  }
16734
17274
  ]
16735
17275
  }
@@ -16795,6 +17335,31 @@
16795
17335
  },
16796
17336
  {
16797
17337
  "name": "DrawLeft"
17338
+ },
17339
+ {
17340
+ "name": "GiveNothing"
17341
+ }
17342
+ ]
17343
+ }
17344
+ },
17345
+ {
17346
+ "name": "WhenShort",
17347
+ "docs": [
17348
+ "What a pool's places get when the pool holds less, as the round's draw is first asked, than",
17349
+ "every place of it with a winner wins: written down then, and paid from what was written. A",
17350
+ "minted prize is never short."
17351
+ ],
17352
+ "type": {
17353
+ "kind": "enum",
17354
+ "variants": [
17355
+ {
17356
+ "name": "InOrder"
17357
+ },
17358
+ {
17359
+ "name": "InProportion"
17360
+ },
17361
+ {
17362
+ "name": "Nothing"
16798
17363
  }
16799
17364
  ]
16800
17365
  }
@@ -17066,15 +17631,6 @@
17066
17631
  "type": "i64",
17067
17632
  "value": "604800"
17068
17633
  },
17069
- {
17070
- "name": "MAX_CONTEST_SECONDS",
17071
- "docs": [
17072
- "The furthest off a contest's result may be due (5 years): a time written in milliseconds is",
17073
- "refused, as it would keep the contest from ever being off by itself."
17074
- ],
17075
- "type": "i64",
17076
- "value": "157680000"
17077
- },
17078
17634
  {
17079
17635
  "name": "MAX_FEE_LAMPORTS",
17080
17636
  "docs": [
@@ -17083,14 +17639,6 @@
17083
17639
  "type": "u64",
17084
17640
  "value": "10000000"
17085
17641
  },
17086
- {
17087
- "name": "MAX_ONE_OF",
17088
- "docs": [
17089
- "The most texts a rule's `Test::OneOf` matches."
17090
- ],
17091
- "type": "u32",
17092
- "value": "16"
17093
- },
17094
17642
  {
17095
17643
  "name": "MAX_POTS",
17096
17644
  "docs": [
@@ -17101,27 +17649,12 @@
17101
17649
  },
17102
17650
  {
17103
17651
  "name": "MAX_RUN_PLACES",
17104
- "type": "u32",
17105
- "value": "4096"
17106
- },
17107
- {
17108
- "name": "MAX_SCHEDULE_SECONDS",
17109
- "docs": [
17110
- "The latest a sealed schedule's last run may fall, from when it is written: 10 years (a cliff of a",
17111
- "year and years of vesting fit; a time written in milliseconds doesn't)."
17112
- ],
17113
- "type": "i64",
17114
- "value": "315360000"
17115
- },
17116
- {
17117
- "name": "MAX_SEALED_RUNS",
17118
17652
  "docs": [
17119
- "The most runs a sealed schedule may have, so its last run comes within a few calls of being due",
17120
- "(`MAX_SCHEDULE_STEPS`) and its vault never keeps what is left: 100,000 runs is one an hour for",
17121
- "over 11 years."
17653
+ "The most places one run of a lottery's places holds when they are given one by one (an NFT, a",
17654
+ "compressed NFT, a raffled one): a pull walks the run from its first place, and so fits."
17122
17655
  ],
17123
17656
  "type": "u32",
17124
- "value": "100000"
17657
+ "value": "4096"
17125
17658
  },
17126
17659
  {
17127
17660
  "name": "NOTICE_SECONDS",