@totochain/api-augment 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totochain/api-augment",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Polkadot API type augmentation for Totochain, generated from the chain's own metadata.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,6 +8,7 @@ import '@polkadot/api-base/types/consts';
8
8
  import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
9
9
  import type { Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
10
10
  import type { Codec, ITuple } from '@polkadot/types-codec/types';
11
+ import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
11
12
  import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackDetails, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
12
13
 
13
14
  export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -126,49 +127,6 @@ declare module '@polkadot/api-base/types/consts' {
126
127
  **/
127
128
  [key: string]: Codec;
128
129
  };
129
- fractionalNft: {
130
- /**
131
- * Block number at which the genesis boost period ends.
132
- * During the boost period, GenesisWildcardThreshold is used instead of WildcardThreshold.
133
- **/
134
- genesisBoostEndBlock: u32 & AugmentedConst<ApiType>;
135
- /**
136
- * Wildcard threshold during the genesis boost period.
137
- * After GenesisBoostEndBlock, the normal WildcardThreshold applies.
138
- **/
139
- genesisWildcardThreshold: u32 & AugmentedConst<ApiType>;
140
- /**
141
- * Maximum depth for lineage chain walking during block reward distribution.
142
- * Prevents unbounded iteration in `on_finalize` if a lineage chain is very deep.
143
- **/
144
- maxLineageRewardDepth: u32 & AugmentedConst<ApiType>;
145
- /**
146
- * Maximum unused collection/item IDs tracked for fNFT distribution.
147
- **/
148
- maxUnusedIds: u32 & AugmentedConst<ApiType>;
149
- /**
150
- * Maximum delay in blocks before wildcard distribution (e.g. 24 hours).
151
- **/
152
- maxWildcardDistributionDelay: u32 & AugmentedConst<ApiType>;
153
- /**
154
- * Minimum delay in blocks before wildcard distribution (e.g. 1 hour).
155
- **/
156
- minWildcardDistributionDelay: u32 & AugmentedConst<ApiType>;
157
- /**
158
- * Because this pallet emits events, it depends on the runtime's definition of an event.
159
- * The reward pool's pallet id, used for deriving its sovereign account ID.
160
- **/
161
- rewardPoolPalletId: FrameSupportPalletId & AugmentedConst<ApiType>;
162
- /**
163
- * The collection ID used for wildcard NFTs.
164
- * Set once at genesis; must match the ID assigned by `pallet_uniques::create`.
165
- **/
166
- wildcardCollectionId: u32 & AugmentedConst<ApiType>;
167
- /**
168
- * Generic const
169
- **/
170
- [key: string]: Codec;
171
- };
172
130
  grandpa: {
173
131
  /**
174
132
  * Max Authorities in use
@@ -393,6 +351,76 @@ declare module '@polkadot/api-base/types/consts' {
393
351
  **/
394
352
  [key: string]: Codec;
395
353
  };
354
+ puzzlePieces: {
355
+ /**
356
+ * Block-channel cadence: the block author (tier 1) and its lineage winners (tier 2)
357
+ * are paid only on blocks whose number is a multiple of this. The activation channel
358
+ * (`pallet_referral::activate_referral`) is an event, not a cadence, and is never
359
+ * throttled.
360
+ **/
361
+ blocksPerRewardPiece: u32 & AugmentedConst<ApiType>;
362
+ /**
363
+ * Block entropy outputs, produced after the commit block, that an activation draw
364
+ * waits for. The commit block's own output, which its author knows, adds one more.
365
+ **/
366
+ drawEntropyDelay: u32 & AugmentedConst<ApiType>;
367
+ /**
368
+ * Block number at which the genesis boost period ends.
369
+ * During the boost period, GenesisWildcardThreshold is used instead of WildcardThreshold.
370
+ **/
371
+ genesisBoostEndBlock: u32 & AugmentedConst<ApiType>;
372
+ /**
373
+ * Wildcard threshold during the genesis boost period.
374
+ * After GenesisBoostEndBlock, the normal WildcardThreshold applies.
375
+ **/
376
+ genesisWildcardThreshold: u32 & AugmentedConst<ApiType>;
377
+ /**
378
+ * Maximum depth for lineage chain walking during block reward distribution.
379
+ * Prevents unbounded iteration in `on_finalize` if a lineage chain is very deep.
380
+ **/
381
+ maxLineageRewardDepth: u32 & AugmentedConst<ApiType>;
382
+ /**
383
+ * Most activation draws waiting at once. An activation beyond it fails with
384
+ * [`Error::DrawQueueFull`] and its referral stays pending. An activation in a block
385
+ * whose weight, draw resolution included, already passed the Normal class's
386
+ * `max_total` fails with [`Error::DrawBlockFull`], which keeps the rest of the block for
387
+ * `on_idle`.
388
+ **/
389
+ maxPendingDraws: u32 & AugmentedConst<ApiType>;
390
+ /**
391
+ * Pieces in the largest reward set. A new set's size is drawn from
392
+ * [`SET_SIZE_TIERS`](crate::types::SET_SIZE_TIERS) scaled to this cap, so it must
393
+ * be a multiple of the ladder's largest divisor (16).
394
+ **/
395
+ maxSetSize: u32 & AugmentedConst<ApiType>;
396
+ /**
397
+ * Maximum delay in blocks before wildcard distribution (e.g. 24 hours).
398
+ **/
399
+ maxWildcardDistributionDelay: u32 & AugmentedConst<ApiType>;
400
+ /**
401
+ * Minimum delay in blocks before wildcard distribution (e.g. 1 hour).
402
+ **/
403
+ minWildcardDistributionDelay: u32 & AugmentedConst<ApiType>;
404
+ /**
405
+ * Reward sets filling at once. Every reward piece lands in one of them, picked at
406
+ * random, so the pieces of one set end up spread over many holders.
407
+ **/
408
+ openSetCount: u32 & AugmentedConst<ApiType>;
409
+ /**
410
+ * Because this pallet emits events, it depends on the runtime's definition of an event.
411
+ * The reward pool's pallet id, used for deriving its sovereign account ID.
412
+ **/
413
+ rewardPoolPalletId: FrameSupportPalletId & AugmentedConst<ApiType>;
414
+ /**
415
+ * The collection ID used for wildcard puzzle pieces.
416
+ * Set once at genesis; must match the ID assigned by `pallet_uniques::create`.
417
+ **/
418
+ wildcardCollectionId: u32 & AugmentedConst<ApiType>;
419
+ /**
420
+ * Generic const
421
+ **/
422
+ [key: string]: Codec;
423
+ };
396
424
  referenda: {
397
425
  /**
398
426
  * Quantization level for the referendum wakeup scheduler. A higher number will result in
@@ -488,21 +516,9 @@ declare module '@polkadot/api-base/types/consts' {
488
516
  };
489
517
  rewardPool: {
490
518
  /**
491
- * Number of blocks in a day (for daily limit calculation)
492
- **/
493
- blocksPerDay: u32 & AugmentedConst<ApiType>;
494
- /**
495
- * Maximum number of NFTs a user can submit per day
496
- **/
497
- maxDailyNftSubmissions: u32 & AugmentedConst<ApiType>;
498
- /**
499
- * Maximum number of fractional NFTs
519
+ * Maximum number of puzzle pieces
500
520
  **/
501
521
  maxVectorLength: u32 & AugmentedConst<ApiType>;
502
- /**
503
- * Minimum reputation a sender must hold to submit an NFT to the pool.
504
- **/
505
- minReputationForNftSubmission: u32 & AugmentedConst<ApiType>;
506
522
  /**
507
523
  * The reward pool's pallet id, used for deriving its sovereign account ID.
508
524
  **/
@@ -519,18 +535,10 @@ declare module '@polkadot/api-base/types/consts' {
519
535
  * Reward calculator Gamma parameter (Noisy-OR combination exponent)
520
536
  **/
521
537
  rewardGamma: u32 & AugmentedConst<ApiType>;
522
- /**
523
- * Reward calculator H_nft parameter (Hill function half-maximal for NFT count)
524
- **/
525
- rewardHNft: u128 & AugmentedConst<ApiType>;
526
538
  /**
527
539
  * Reward calculator H_ref parameter (Hill function half-maximal for referral count)
528
540
  **/
529
541
  rewardHRef: u128 & AugmentedConst<ApiType>;
530
- /**
531
- * Reward calculator K_nft parameter (Hill function exponent for NFT count)
532
- **/
533
- rewardKNft: u32 & AugmentedConst<ApiType>;
534
542
  /**
535
543
  * Reward calculator K_ref parameter (Hill function exponent for referral count)
536
544
  **/
@@ -539,6 +547,13 @@ declare module '@polkadot/api-base/types/consts' {
539
547
  * Reward calculator minimum percentage (floor) in Permill parts
540
548
  **/
541
549
  rewardMinParts: u32 & AugmentedConst<ApiType>;
550
+ /**
551
+ * Unlock score of a sealed reward set by its size tier, in the order of
552
+ * [`pallet_puzzle_pieces::types::SET_SIZE_TIERS`] (smallest set first). It is the
553
+ * set's side of the noisy-OR, in place of a curve over the piece count: a sealed set
554
+ * only ever has one of these sizes.
555
+ **/
556
+ rewardSetScores: Vec<Permill> & AugmentedConst<ApiType>;
542
557
  /**
543
558
  * Unlock coefficient
544
559
  **/
@@ -651,6 +666,17 @@ declare module '@polkadot/api-base/types/consts' {
651
666
  };
652
667
  techCommitteeManager: {
653
668
  maxCandidates: u32 & AugmentedConst<ApiType>;
669
+ /**
670
+ * Reputation an account needs to register as a candidate and to be seated.
671
+ *
672
+ * Checked on registration and again at every selection, because reputation also
673
+ * falls (activity ages out, offence penalties are subtracted). A candidate below it
674
+ * keeps its registration and is seated again once it recovers.
675
+ *
676
+ * Must be at least 1: zero would admit accounts that have done nothing on the
677
+ * chain, which is the hole this floor closes. Enforced in `integrity_test`.
678
+ **/
679
+ minCandidateReputation: u32 & AugmentedConst<ApiType>;
654
680
  /**
655
681
  * Smallest committee that may act.
656
682
  **/
@@ -778,9 +804,10 @@ declare module '@polkadot/api-base/types/consts' {
778
804
  };
779
805
  validatorManager: {
780
806
  /**
781
- * Base reputation penalty for equivocation offences (scaled by slash_fraction)
807
+ * Share of reputation taken per equivocation offence, whatever the slash
808
+ * fraction the offence reports
782
809
  **/
783
- equivocationBasePenalty: u32 & AugmentedConst<ApiType>;
810
+ equivocationPenalty: Perbill & AugmentedConst<ApiType>;
784
811
  /**
785
812
  * The maximal number of active validators
786
813
  **/
@@ -800,24 +827,39 @@ declare module '@polkadot/api-base/types/consts' {
800
827
  /**
801
828
  * Maximum cumulative reputation penalty
802
829
  **/
803
- maxReputationPenalty: u32 & AugmentedConst<ApiType>;
830
+ maxReputationPenalty: Perbill & AugmentedConst<ApiType>;
804
831
  /**
805
832
  * Maximum total reputation cap
806
833
  **/
807
834
  maxTotalReputation: u32 & AugmentedConst<ApiType>;
835
+ /**
836
+ * Reputation an account must hold to enter, and stay in, the pool the
837
+ * active validator set is drawn from.
838
+ *
839
+ * Checked twice on purpose: `register_validator` rejects an account
840
+ * below it, and `execute_maintenance` re-checks every session, because
841
+ * reputation moves — it decays with activity age and is reduced by
842
+ * offence penalties, so a candidate that qualified on registration need
843
+ * not still qualify at the draw.
844
+ *
845
+ * Must be at least 1: the draw weights a candidate by its reputation,
846
+ * and a zero-reputation candidate holds no tickets, so admitting one
847
+ * would quietly shrink the active set. Enforced in `integrity_test`.
848
+ **/
849
+ minValidatorReputation: u32 & AugmentedConst<ApiType>;
808
850
  /**
809
851
  * Minimum number of validators a new selection must contain; below it the
810
852
  * previous validator set and candidate registry are retained.
811
853
  **/
812
854
  minValidators: u32 & AugmentedConst<ApiType>;
813
855
  /**
814
- * Reputation penalty applied per offline offence
856
+ * Share of reputation taken per offline offence
815
857
  **/
816
- offlinePenalty: u32 & AugmentedConst<ApiType>;
858
+ offlinePenalty: Perbill & AugmentedConst<ApiType>;
817
859
  /**
818
- * Amount of penalty decayed (subtracted) each session during maintenance
860
+ * Share of penalty decayed (subtracted) each session during maintenance
819
861
  **/
820
- penaltyDecayPerSession: u32 & AugmentedConst<ApiType>;
862
+ penaltyDecayPerSession: Perbill & AugmentedConst<ApiType>;
821
863
  /**
822
864
  * Generic const
823
865
  **/
@@ -21,10 +21,13 @@ declare module '@polkadot/api-base/types/errors' {
21
21
  AlreadyAProvider: AugmentedError<ApiType>;
22
22
  AlreadyAttested: AugmentedError<ApiType>;
23
23
  AlreadyRevoked: AugmentedError<ApiType>;
24
- AuthorizationNotSupported: AugmentedError<ApiType>;
25
24
  CtypeNotFound: AugmentedError<ApiType>;
26
25
  CtypeWeightAlreadySet: AugmentedError<ApiType>;
27
26
  CtypeWeightNotFound: AugmentedError<ApiType>;
27
+ /**
28
+ * The `(subject, ctype_hash)` slot holds another issuance than the one the call names.
29
+ **/
30
+ IssuanceMismatch: AugmentedError<ApiType>;
28
31
  NotAProvider: AugmentedError<ApiType>;
29
32
  NotFound: AugmentedError<ApiType>;
30
33
  TooManyClaimsForSubject: AugmentedError<ApiType>;
@@ -209,34 +212,6 @@ declare module '@polkadot/api-base/types/errors' {
209
212
  **/
210
213
  [key: string]: AugmentedError<ApiType>;
211
214
  };
212
- fractionalNft: {
213
- ArithmeticOverflow: AugmentedError<ApiType>;
214
- ArithmeticUnderflow: AugmentedError<ApiType>;
215
- CollectionIdOverflow: AugmentedError<ApiType>;
216
- DistributeFractionalNftRewardFailed: AugmentedError<ApiType>;
217
- InvalidWildcardThreshold: AugmentedError<ApiType>;
218
- ItemIdOverflow: AugmentedError<ApiType>;
219
- /**
220
- * Maximum unused IDs exceeded.
221
- **/
222
- MaxUnusedIdsExceeded: AugmentedError<ApiType>;
223
- TotalFNFTsNotSet: AugmentedError<ApiType>;
224
- TransferFractionalNftFailed: AugmentedError<ApiType>;
225
- /**
226
- * The unused-NFT pool is internally inconsistent beyond what
227
- * `distribute_unused_nft` can self-heal, so a reward could not be picked.
228
- * Distinct from an empty pool (true scarcity): this signals storage
229
- * corruption that needs manual repair, and it aborts the surrounding
230
- * distribution as an error rather than a silent shortfall.
231
- **/
232
- UnusedNftPoolInconsistent: AugmentedError<ApiType>;
233
- WildcardCollectionNotSet: AugmentedError<ApiType>;
234
- WildcardThresholdNotSet: AugmentedError<ApiType>;
235
- /**
236
- * Generic error
237
- **/
238
- [key: string]: AugmentedError<ApiType>;
239
- };
240
215
  grandpa: {
241
216
  /**
242
217
  * Attempt to signal GRANDPA change with one already pending.
@@ -609,6 +584,52 @@ declare module '@polkadot/api-base/types/errors' {
609
584
  **/
610
585
  [key: string]: AugmentedError<ApiType>;
611
586
  };
587
+ puzzlePieces: {
588
+ ArithmeticOverflow: AugmentedError<ApiType>;
589
+ ArithmeticUnderflow: AugmentedError<ApiType>;
590
+ CollectionIdOverflow: AugmentedError<ApiType>;
591
+ /**
592
+ * A leftover piece of the retired collection still exists.
593
+ **/
594
+ CollectionNotEmpty: AugmentedError<ApiType>;
595
+ DistributePuzzlePieceRewardFailed: AugmentedError<ApiType>;
596
+ /**
597
+ * The block already holds the Normal class's `max_total` of weight, draw resolution
598
+ * included: a new draw waits for a later block, so `on_idle` keeps the rest.
599
+ **/
600
+ DrawBlockFull: AugmentedError<ApiType>;
601
+ /**
602
+ * `MaxPendingDraws` activation draws are already waiting.
603
+ **/
604
+ DrawQueueFull: AugmentedError<ApiType>;
605
+ InvalidWildcardThreshold: AugmentedError<ApiType>;
606
+ ItemIdOverflow: AugmentedError<ApiType>;
607
+ /**
608
+ * No reward set is open, so a reward piece has nowhere to go. Genesis opens every
609
+ * slot and a sealed set is replaced in the same mint, so this means corrupt storage.
610
+ **/
611
+ NoOpenSet: AugmentedError<ApiType>;
612
+ /**
613
+ * The collection was not retired by a partial unlock.
614
+ **/
615
+ NotRetiredCollection: AugmentedError<ApiType>;
616
+ /**
617
+ * Minting a reward piece failed inside the puzzle-piece layer.
618
+ **/
619
+ RewardMintFailed: AugmentedError<ApiType>;
620
+ /**
621
+ * A draw's upline is longer than the referrer plus `MaxLineageRewardDepth` ancestors.
622
+ **/
623
+ TooManyDrawRecipients: AugmentedError<ApiType>;
624
+ TotalPuzzlePiecesNotSet: AugmentedError<ApiType>;
625
+ TransferPuzzlePieceFailed: AugmentedError<ApiType>;
626
+ WildcardCollectionNotSet: AugmentedError<ApiType>;
627
+ WildcardThresholdNotSet: AugmentedError<ApiType>;
628
+ /**
629
+ * Generic error
630
+ **/
631
+ [key: string]: AugmentedError<ApiType>;
632
+ };
612
633
  referenda: {
613
634
  /**
614
635
  * The referendum index provided is invalid in this context.
@@ -673,8 +694,7 @@ declare module '@polkadot/api-base/types/errors' {
673
694
  };
674
695
  referral: {
675
696
  /**
676
- * No pending referral for the caller, or the `FractionalNftRewardDistributor`
677
- * rejected a reward — the whole activation rolls back.
697
+ * No pending referral for the caller.
678
698
  **/
679
699
  ActivateReferralFailed: AugmentedError<ApiType>;
680
700
  /**
@@ -766,19 +786,6 @@ declare module '@polkadot/api-base/types/errors' {
766
786
  * can safely handle within block weight limits. Bounded by [`MAX_UNLOCK_ITEMS`].
767
787
  **/
768
788
  CollectionTooLargeToUnlock: AugmentedError<ApiType>;
769
- DailyNftSubmissionLimitExceeded: AugmentedError<ApiType>;
770
- InsufficientReputationForNftSubmission: AugmentedError<ApiType>;
771
- /**
772
- * The `(contract address, token id)` pair is already backing a live collection.
773
- **/
774
- NftAlreadyDeposited: AugmentedError<ApiType>;
775
- /**
776
- * The submission would mint more fractional-NFT items than [`MAX_SUBMIT_ITEMS`],
777
- * which is both the benchmarked gas-pricing envelope and the largest collection
778
- * `unlock` can ever handle.
779
- **/
780
- SubmissionTooLarge: AugmentedError<ApiType>;
781
- SubmitNftFailed: AugmentedError<ApiType>;
782
789
  UnlockFailed: AugmentedError<ApiType>;
783
790
  /**
784
791
  * Generic error
@@ -918,10 +925,26 @@ declare module '@polkadot/api-base/types/errors' {
918
925
  [key: string]: AugmentedError<ApiType>;
919
926
  };
920
927
  techCommitteeManager: {
928
+ /**
929
+ * `force_unregister_candidate` banned the account from registering.
930
+ **/
931
+ CandidateBanned: AugmentedError<ApiType>;
932
+ /**
933
+ * The account's reputation is below `MinCandidateReputation`.
934
+ **/
935
+ InsufficientReputation: AugmentedError<ApiType>;
921
936
  /**
922
937
  * The maximum number of candidates has been reached.
923
938
  **/
924
939
  MaxCandidatesReached: AugmentedError<ApiType>;
940
+ /**
941
+ * The account is not banned.
942
+ **/
943
+ NotBanned: AugmentedError<ApiType>;
944
+ /**
945
+ * The account is neither a candidate nor a committee member.
946
+ **/
947
+ NotCandidate: AugmentedError<ApiType>;
925
948
  /**
926
949
  * The selection holds fewer members than `MinMembers`.
927
950
  **/
@@ -1113,6 +1136,10 @@ declare module '@polkadot/api-base/types/errors' {
1113
1136
  [key: string]: AugmentedError<ApiType>;
1114
1137
  };
1115
1138
  validatorManager: {
1139
+ /**
1140
+ * The account's reputation is below `MinValidatorReputation`.
1141
+ **/
1142
+ InsufficientReputation: AugmentedError<ApiType>;
1116
1143
  /**
1117
1144
  * The registered validators list is full.
1118
1145
  **/