@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.
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
10
10
  import type { BTreeSet, Bytes, Null, Option, U256, U8aFixed, Vec, bool, i32, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
11
11
  import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
12
12
  import type { AccountId20, Call, H160, H256, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
13
- import type { EthereumBlock, EthereumReceiptReceiptV4, EthereumTransactionTransactionV3, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAttestationAttestationRecord, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletCollectiveVotes, PalletCtypeCtypeEntry, PalletDidDidRecord, PalletEvmCodeMetadata, PalletFractionalNftNftInfo, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletHandshakeHandshakeStatus, PalletIdentityAuthorityProperties, PalletIdentityProvider, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletIdentityUsernameInformation, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPotentialRewardSweepCursorState, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletReputationVotingProcessingState, PalletReputationVotingTally, PalletReputationVotingVoteDirection, PalletReputationVotingVoteRecord, PalletRuntimeParamsGovernanceParams, PalletRuntimeParamsRewardParams, PalletRuntimeParamsSafeModeParams, PalletRuntimeParamsTimingParams, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletTransactionPaymentReleases, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, TotochainRuntimeSessionKeys } from '@polkadot/types/lookup';
13
+ import type { EthereumBlock, EthereumReceiptReceiptV4, EthereumTransactionTransactionV3, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAttestationAttestationRecord, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletCollectiveVotes, PalletCtypeCtypeEntry, PalletDidDidRecord, PalletEvmCodeMetadata, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletHandshakeHandshakeStatus, PalletIdentityAuthorityProperties, PalletIdentityProvider, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletIdentityUsernameInformation, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPotentialRewardSweepCursorState, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletPuzzlePiecesOpenSet, PalletPuzzlePiecesPendingDraw, PalletReferendaReferendumInfo, PalletReputationVotingProcessingState, PalletReputationVotingTally, PalletReputationVotingVoteDirection, PalletReputationVotingVoteRecord, PalletRuntimeParamsGovernanceParams, PalletRuntimeParamsRewardParams, PalletRuntimeParamsSafeModeParams, PalletRuntimeParamsTimingParams, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletTransactionPaymentReleases, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, TotochainRuntimeSessionKeys } from '@polkadot/types/lookup';
14
14
  import type { Observable } from '@polkadot/types/types';
15
15
 
16
16
  export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -42,10 +42,13 @@ declare module '@polkadot/api-base/types/storage' {
42
42
  };
43
43
  attestation: {
44
44
  attestationProviderIds: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
45
- attestations: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletAttestationAttestationRecord>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
46
- claimsBySubject: AugmentedQuery<ApiType, (arg1: AccountId20 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<ITuple<[H256, bool]>>>, [AccountId20, H256]> & QueryableStorageEntry<ApiType, [AccountId20, H256]>;
45
+ attestations: AugmentedQuery<ApiType, (arg1: AccountId20 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PalletAttestationAttestationRecord>>, [AccountId20, H256]> & QueryableStorageEntry<ApiType, [AccountId20, H256]>;
47
46
  claimsCountBySubject: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<u32>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
48
47
  ctypeWeights: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<u32>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
48
+ /**
49
+ * The `issuance_id` the next `add` assigns. Only ever increases.
50
+ **/
51
+ nextIssuanceId: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
49
52
  /**
50
53
  * Generic query
51
54
  **/
@@ -318,76 +321,6 @@ declare module '@polkadot/api-base/types/storage' {
318
321
  **/
319
322
  [key: string]: QueryableStorageEntry<ApiType>;
320
323
  };
321
- fractionalNft: {
322
- collectionIdNftInfo: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletFractionalNftNftInfo>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
323
- currentCollectionId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
324
- currentItemId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
325
- /**
326
- * Per-collection presence index of valid (live) fractional-NFT items.
327
- *
328
- * Replaces the previous `ValidItems: StorageMap<CollectionId, BoundedBTreeSet<ItemId>>`.
329
- * Single-item insert/remove no longer decodes the whole per-collection set, so the
330
- * per-call proof estimate drops from `MaxValidItems`-sized to a single small row.
331
- * `ValidItemCount` is the source of truth for cardinality (the runtime-checked cap).
332
- **/
333
- isValidItem: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
334
- /**
335
- * Wildcards owed to the distribution queue but not yet minted or scheduled.
336
- *
337
- * `mint` credits this counter instead of inserting into `WildcardDistributionMap`
338
- * inline, so a deposit can never fail on the state of the shared queue — including
339
- * a queue filled by *other* accounts' deposits (BC-505).
340
- * `process_pending_wildcards` (called from `on_finalize`) drains it into free queue
341
- * slots, at most [`crate::MAX_WILDCARD_MINTS_PER_BLOCK`] per block.
342
- *
343
- * Effective wildcard throughput is bounded by the queue drain rate, not by this
344
- * counter or the per-block mint cap: an entry holds its slot for the whole
345
- * randomized 1–24 h delay while at most one leaves per block, so the queue sustains
346
- * `MaxWildcardEntries / mean_delay_in_blocks` wildcards per block. Size the cap above
347
- * the expected production rate or this counter grows without bound and wildcards
348
- * arrive ever later — the backlog is bonus rewards running late, never a failed
349
- * deposit, but it is unbounded. Monitor it via [`Event::WildcardMintDeferred`].
350
- **/
351
- pendingWildcards: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
352
- totalfNFTsMinted: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
353
- totalNonWildcardItems: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
354
- /**
355
- * Forward array of the unused-collections pool: `idx -> collection_id`.
356
- **/
357
- unusedCollectionAt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
358
- /**
359
- * Reverse index of the unused-collections pool: `collection_id -> idx`. Used for
360
- * O(1) arbitrary remove via swap-pop. `OptionQuery` because index `0` is valid.
361
- **/
362
- unusedCollectionIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
363
- /**
364
- * Number of collections currently in the unused pool.
365
- **/
366
- unusedCollectionsCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
367
- /**
368
- * Forward array of the per-collection unused-items pool: `(collection_id, idx) -> item_id`.
369
- **/
370
- unusedItemAt: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
371
- /**
372
- * Reverse index of the per-collection unused-items pool: `(collection_id, item_id) -> idx`.
373
- **/
374
- unusedItemIndex: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
375
- /**
376
- * Number of items currently in the unused pool for each collection.
377
- **/
378
- unusedItemsCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
379
- /**
380
- * Live count of valid items per collection. Source of truth for the
381
- * runtime-checked `MaxValidItems` cap.
382
- **/
383
- validItemCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
384
- wildcardDistributionMap: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
385
- wildcardThreshold: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
386
- /**
387
- * Generic query
388
- **/
389
- [key: string]: QueryableStorageEntry<ApiType>;
390
- };
391
324
  grandpa: {
392
325
  /**
393
326
  * The current list of authorities.
@@ -708,10 +641,11 @@ declare module '@polkadot/api-base/types/storage' {
708
641
  **/
709
642
  totalPotentialMinted: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
710
643
  /**
711
- * Total accounts processed (visited) in the current burn cycle. This is the
712
- * weight-charge counter — it counts every account considered by
713
- * `process_burn_batch`, including those with zero potential and those that
714
- * failed individually.
644
+ * Total live accounts processed in the current burn cycle — every account
645
+ * `burn_for_account` ran for, including those with zero potential and those
646
+ * that failed individually. Dead rows and the reward pool are skipped before
647
+ * this point and are not counted; `process_burn_batch` bounds the scan and
648
+ * charges weight on visited rows instead.
715
649
  **/
716
650
  totalProcessedInCycle: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
717
651
  /**
@@ -749,6 +683,111 @@ declare module '@polkadot/api-base/types/storage' {
749
683
  **/
750
684
  [key: string]: QueryableStorageEntry<ApiType>;
751
685
  };
686
+ puzzlePieces: {
687
+ currentCollectionId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
688
+ currentItemId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
689
+ /**
690
+ * Entropy every draw of the current block uses: a hash chain of the block entropy
691
+ * outputs ([`Config::BlockEntropy`]) of every block so far, extended at the end of each
692
+ * block's `on_finalize`, after its draws.
693
+ **/
694
+ drawEntropy: AugmentedQuery<ApiType, () => Observable<U8aFixed>, []> & QueryableStorageEntry<ApiType, []>;
695
+ /**
696
+ * [`DrawEntropy`] as it stood right after [`EntropyBlocks`] reached the key. An activation
697
+ * draw resolves with the checkpoint at its `ready_at`, so its seed is fixed when it matures,
698
+ * however long the budget defers it: outputs absorbed after that cannot re-roll it.
699
+ *
700
+ * Every key lies in `[EntropyCheckpointFloor, EntropyBlocks]`. Checkpoints below the floor
701
+ * are removed, at most [`crate::MAX_ENTROPY_CHECKPOINT_PRUNES_PER_BLOCK`] a block.
702
+ **/
703
+ entropyAt: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<U8aFixed>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
704
+ /**
705
+ * How many block entropy outputs [`DrawEntropy`] has absorbed. Activation draws wait on
706
+ * it, not on block numbers, so a block without a VRF output delays them instead of
707
+ * letting them resolve on entropy nobody added.
708
+ **/
709
+ entropyBlocks: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
710
+ /**
711
+ * The lowest [`EntropyAt`] key still kept; never above `EntropyBlocks + 1`. A draw resolves
712
+ * with the checkpoint at `max(ready_at, floor)`. `ready_at` never decreases from one draw to
713
+ * the next while `DrawEntropyDelay` does not, and the floor never passes a pending draw's
714
+ * `ready_at`, so that is the draw's own `ready_at`. The `max` only matters for draws an
715
+ * upgrade lowering the delay committed behind a later-maturing one: they resolve after it
716
+ * anyway, and use a checkpoint that still exists.
717
+ **/
718
+ entropyCheckpointFloor: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
719
+ /**
720
+ * Per-collection presence index of valid (live) puzzle pieces.
721
+ *
722
+ * Replaces the previous `ValidItems: StorageMap<CollectionId, BoundedBTreeSet<ItemId>>`.
723
+ * Single-item insert/remove no longer decodes the whole per-collection set, so the
724
+ * per-call proof estimate drops from `MaxValidItems`-sized to a single small row.
725
+ * `ValidItemCount` is the source of truth for cardinality (the runtime-checked cap).
726
+ **/
727
+ isValidItem: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
728
+ /**
729
+ * The id the next committed draw gets.
730
+ **/
731
+ nextDrawId: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
732
+ /**
733
+ * The oldest draw not resolved yet: the head of the queue.
734
+ **/
735
+ nextDrawToResolve: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
736
+ /**
737
+ * The reward sets still filling, one per slot; always `OpenSetCount` long once genesis
738
+ * has run. A piece that fills a set seals it and opens a fresh set in the same slot.
739
+ * A collection is open exactly while it is listed here, and only a sealed set can be
740
+ * unlocked.
741
+ **/
742
+ openSets: AugmentedQuery<ApiType, () => Observable<Vec<PalletPuzzlePiecesOpenSet>>, []> & QueryableStorageEntry<ApiType, []>;
743
+ /**
744
+ * Committed activation draws, keyed by [`DrawId`] and resolved in id order. Every id from
745
+ * [`NextDrawToResolve`] up to [`NextDrawId`] is present.
746
+ **/
747
+ pendingDraws: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletPuzzlePiecesPendingDraw>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
748
+ /**
749
+ * Wildcards owed to the distribution queue but not yet minted or scheduled.
750
+ *
751
+ * `mint` credits this counter instead of inserting into `WildcardDistributionMap`
752
+ * inline, so a deposit can never fail on the state of the shared queue — including
753
+ * a queue filled by *other* accounts' deposits (BC-505).
754
+ * `process_pending_wildcards` (called from `on_finalize`) drains it into free queue
755
+ * slots, at most [`crate::MAX_WILDCARD_MINTS_PER_BLOCK`] per block.
756
+ *
757
+ * Effective wildcard throughput is bounded by the queue drain rate, not by this
758
+ * counter or the per-block mint cap: an entry holds its slot for the whole
759
+ * randomized 1–24 h delay while at most one leaves per block, so the queue sustains
760
+ * `MaxWildcardEntries / mean_delay_in_blocks` wildcards per block. Size the cap above
761
+ * the expected production rate or this counter grows without bound and wildcards
762
+ * arrive ever later — the backlog is bonus rewards running late, never a failed
763
+ * deposit, but it is unbounded.
764
+ *
765
+ * It also stalls while the reward pool cannot fund one `ItemDeposit` reserve, which
766
+ * `process_pending_wildcards` detects up front and skips on silently (BC-527). Read the
767
+ * counter through the `pending_wildcards` runtime API to tell a stalled backlog from a
768
+ * draining one; [`Event::WildcardMintDeferred`] reports it only at increment time.
769
+ **/
770
+ pendingWildcards: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
771
+ /**
772
+ * Collections a partial unlock retired but could not destroy, because pieces it did
773
+ * not need are still on their holders. `reap_collection` destroys one once its last
774
+ * piece is gone, which releases its `CollectionDeposit` to the reward pool.
775
+ **/
776
+ retiredCollections: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
777
+ totalNonWildcardItems: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
778
+ totalPuzzlePiecesMinted: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
779
+ /**
780
+ * Live count of valid items per collection. Source of truth for the
781
+ * runtime-checked `MaxValidItems` cap.
782
+ **/
783
+ validItemCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
784
+ wildcardDistributionMap: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
785
+ wildcardThreshold: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
786
+ /**
787
+ * Generic query
788
+ **/
789
+ [key: string]: QueryableStorageEntry<ApiType>;
790
+ };
752
791
  referenda: {
753
792
  /**
754
793
  * The number of referenda being decided currently.
@@ -818,7 +857,7 @@ declare module '@polkadot/api-base/types/storage' {
818
857
  /**
819
858
  * `account -> referrer`, write-once and **never removed** — including by
820
859
  * `split_tree`. The full genealogy of who referred whom, preserved across
821
- * validator splits. Sole consumer: upward fNFT distribution.
860
+ * validator splits. Sole consumer: upward puzzle piece distribution.
822
861
  **/
823
862
  lineageParent: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<Option<AccountId20>>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
824
863
  /**
@@ -913,20 +952,6 @@ declare module '@polkadot/api-base/types/storage' {
913
952
  * survives the boundary.
914
953
  **/
915
954
  burnablePoolBalance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
916
- /**
917
- * Underlying ERC721 tokens currently claimed by a fractional-NFT collection, keyed by
918
- * `(contract address, token id)`.
919
- *
920
- * Exists so one real NFT can back at most one collection. Two collections claiming the
921
- * same `(address, token_id)` would let whoever unlocked first take both the payout **and**
922
- * the physical ERC721 via the unlock callback, while the second unlock failed on its EVM
923
- * call and rolled back — burning the loser's fractional NFTs for nothing (BC-493).
924
- *
925
- * Written by [`Pallet::record_nft_deposit`] and cleared by
926
- * [`unlock`](crate::unlock::RewardPoolUnlockHandler::unlock) once the token leaves the
927
- * pool, so a withdrawn NFT can be deposited again later.
928
- **/
929
- depositedNfts: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: U256 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [H160, U256]> & QueryableStorageEntry<ApiType, [H160, U256]>;
930
955
  /**
931
956
  * Share of each burnable inflow reserved for the cycle-boundary burn (recycle).
932
957
  *
@@ -936,7 +961,7 @@ declare module '@polkadot/api-base/types/storage' {
936
961
  **/
937
962
  recycleShare: AugmentedQuery<ApiType, () => Observable<Permill>, []> & QueryableStorageEntry<ApiType, []>;
938
963
  /**
939
- * The sub-bucket of [`BurnablePoolBalance`] available for fNFT unlock payouts.
964
+ * The sub-bucket of [`BurnablePoolBalance`] available for puzzle unlock payouts.
940
965
  *
941
966
  * Invariant: `UnlockFundBalance <= BurnablePoolBalance`. Each burnable inflow is
942
967
  * split by [`RecycleShare`]: the recycle portion (`ρ · x`) stays in the burnable
@@ -947,15 +972,7 @@ declare module '@polkadot/api-base/types/storage' {
947
972
  * unlock credit survives the boundary.
948
973
  **/
949
974
  unlockFundBalance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
950
- /**
951
- * Storage for tracking daily NFT submissions per account (account, day_index, count)
952
- **/
953
- userDailyNftSubmissions: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<ITuple<[u32, u32]>>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
954
- /**
955
- * Storage for tracking number of NFTs submitted to reward pool per account
956
- **/
957
- userSubmittedNftsCount: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<u32>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
958
- userUnlockedNfts: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<BTreeSet<u32>>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
975
+ userUnlockedPuzzles: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<BTreeSet<u32>>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
959
976
  /**
960
977
  * Generic query
961
978
  **/
@@ -1175,6 +1192,13 @@ declare module '@polkadot/api-base/types/storage' {
1175
1192
  [key: string]: QueryableStorageEntry<ApiType>;
1176
1193
  };
1177
1194
  techCommitteeManager: {
1195
+ /**
1196
+ * Accounts `force_unregister_candidate` removed. They cannot register again until
1197
+ * `unban_candidate` lifts the ban; without it a removed account that still clears
1198
+ * `MinCandidateReputation` would re-register in the next block and be seated again at the
1199
+ * next session. Only `ForceOrigin` writes it, so its size is bounded by governance.
1200
+ **/
1201
+ bannedCandidates: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<Option<Null>>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
1178
1202
  candidates: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
1179
1203
  selectedCandidates: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
1180
1204
  /**
@@ -1313,17 +1337,34 @@ declare module '@polkadot/api-base/types/storage' {
1313
1337
  * Counter for the related counted storage map
1314
1338
  **/
1315
1339
  counterForReputationPenalties: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
1340
+ /**
1341
+ * Offenders already charged the equivocation penalty, keyed by the session the
1342
+ * offence happened in.
1343
+ *
1344
+ * `pallet_offences` hands `on_offence` every concurrent offender of the same
1345
+ * kind and time slot each time a new one is reported, so an equivocator already
1346
+ * charged would be charged again for each accomplice reported after it. This
1347
+ * marker charges each offender at most once per offence session. Pruned in
1348
+ * `start_session` once the session falls outside the offence retention window.
1349
+ **/
1350
+ equivocationsPenalised: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId20 | string | Uint8Array) => Observable<Option<Null>>, [u32, AccountId20]> & QueryableStorageEntry<ApiType, [u32, AccountId20]>;
1316
1351
  offenceValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId20, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
1317
1352
  offlineValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId20, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
1318
1353
  /**
1319
- * Accumulated reputation penalties per validator account.
1354
+ * Evicted accounts that keep their session keys while they serve the current set.
1355
+ * Purged once they leave it, even if their blacklist entry has expired by then.
1356
+ **/
1357
+ pendingKeyPurges: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
1358
+ /**
1359
+ * Accumulated reputation penalties per validator account, as the share of the
1360
+ * account's reputation the penalty takes (see [`apply_reputation_penalty`]).
1320
1361
  * Incremented on each offence, decayed each session during maintenance.
1321
1362
  * Removed when penalty reaches 0 to avoid unbounded map growth.
1322
1363
  *
1323
1364
  * `CountedStorageMap` so `count()` is O(1) and can be used to charge the
1324
1365
  * actual decay weight on session boundaries instead of a fixed upper bound.
1325
1366
  **/
1326
- reputationPenalties: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<u32>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
1367
+ reputationPenalties: AugmentedQuery<ApiType, (arg: AccountId20 | string | Uint8Array) => Observable<Perbill>, [AccountId20]> & QueryableStorageEntry<ApiType, [AccountId20]>;
1327
1368
  selectedValidators: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
1328
1369
  validators: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> & QueryableStorageEntry<ApiType, []>;
1329
1370
  /**
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/submittable';
7
7
 
8
8
  import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
9
9
  import type { Data } from '@polkadot/types';
10
- import type { Bytes, Compact, Null, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
10
+ import type { Bytes, Compact, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
11
11
  import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
12
12
  import type { AccountId20, Call, H160, H256, Permill } from '@polkadot/types/interfaces/runtime';
13
13
  import type { EthereumTransactionEip7702AuthorizationListItem, EthereumTransactionTransactionV3, FpAccountEthereumSignature, FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletBalancesAdjustmentDirection, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletReputationVotingVoteDirection, PalletUniquesDestroyWitness, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpSessionMembershipProof, SpWeightsWeightV2Weight, TotochainRuntimeConfigsUtilityProxyType, TotochainRuntimeOriginCaller, TotochainRuntimeSessionKeys } from '@polkadot/types/lookup';
@@ -25,15 +25,15 @@ declare module '@polkadot/api-base/types/submittable' {
25
25
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
26
26
  };
27
27
  attestation: {
28
- add: AugmentedSubmittable<(claimHash: H256 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array, authorization: Option<Null> | null | Uint8Array | Null, account: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, H256, Option<Null>, AccountId20]>;
28
+ add: AugmentedSubmittable<(subject: AccountId20 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, H256]>;
29
29
  addAttester: AugmentedSubmittable<(attester: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20]>;
30
30
  addCtypeWithWeight: AugmentedSubmittable<(ctypeHash: H256 | string | Uint8Array, ctypeWeight: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u32]>;
31
- forceRemove: AugmentedSubmittable<(claimHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
32
- forceRevoke: AugmentedSubmittable<(claimHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
33
- remove: AugmentedSubmittable<(claimHash: H256 | string | Uint8Array, authorization: Option<Null> | null | Uint8Array | Null) => SubmittableExtrinsic<ApiType>, [H256, Option<Null>]>;
31
+ forceRemove: AugmentedSubmittable<(subject: AccountId20 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array, issuanceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, H256, u64]>;
32
+ forceRevoke: AugmentedSubmittable<(subject: AccountId20 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array, issuanceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, H256, u64]>;
33
+ remove: AugmentedSubmittable<(subject: AccountId20 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array, issuanceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, H256, u64]>;
34
34
  removeAttester: AugmentedSubmittable<(attester: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20]>;
35
35
  removeCtypeWithWeight: AugmentedSubmittable<(ctypeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
36
- revoke: AugmentedSubmittable<(claimHash: H256 | string | Uint8Array, authorization: Option<Null> | null | Uint8Array | Null) => SubmittableExtrinsic<ApiType>, [H256, Option<Null>]>;
36
+ revoke: AugmentedSubmittable<(subject: AccountId20 | string | Uint8Array, ctypeHash: H256 | string | Uint8Array, issuanceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, H256, u64]>;
37
37
  /**
38
38
  * Generic tx
39
39
  **/
@@ -215,16 +215,6 @@ declare module '@polkadot/api-base/types/submittable' {
215
215
  **/
216
216
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
217
217
  };
218
- fractionalNft: {
219
- /**
220
- * Transfer fractional NFT
221
- **/
222
- transfer: AugmentedSubmittable<(to: AccountId20 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, u32, u32]>;
223
- /**
224
- * Generic tx
225
- **/
226
- [key: string]: SubmittableExtrinsicFunction<ApiType>;
227
- };
228
218
  grandpa: {
229
219
  /**
230
220
  * Note that the current authority set of the GRANDPA finality gadget has stalled.
@@ -900,6 +890,22 @@ declare module '@polkadot/api-base/types/submittable' {
900
890
  **/
901
891
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
902
892
  };
893
+ puzzlePieces: {
894
+ /**
895
+ * Destroy a collection a partial unlock retired, once its last leftover piece is
896
+ * gone, releasing its deposit to the reward pool. Anyone may call it; a successful
897
+ * reap pays no fee.
898
+ **/
899
+ reapCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
900
+ /**
901
+ * Transfer puzzle piece
902
+ **/
903
+ transfer: AugmentedSubmittable<(to: AccountId20 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20, u32, u32]>;
904
+ /**
905
+ * Generic tx
906
+ **/
907
+ [key: string]: SubmittableExtrinsicFunction<ApiType>;
908
+ };
903
909
  referenda: {
904
910
  /**
905
911
  * Cancel an ongoing referendum.
@@ -998,31 +1004,33 @@ declare module '@polkadot/api-base/types/submittable' {
998
1004
  };
999
1005
  referral: {
1000
1006
  /**
1001
- * Activate the caller's pending referral, distribute fNFT rewards, and
1002
- * attach the caller to the active tree.
1007
+ * Activate the caller's pending referral, commit its puzzle piece rewards to a later
1008
+ * draw, and attach the caller to the active tree.
1003
1009
  *
1004
1010
  * Uses **two independent chains**:
1005
1011
  * - **Active chain** (`collect_active_chain_bounded`): feeds `add_child_with_chain` and
1006
1012
  * `DescendantCount`. Rejects with [`Error::MaxReferralDepthExceeded`] when the active
1007
1013
  * ancestor count exceeds `MAX_REFERRAL_DEPTH`.
1008
- * - **Lineage chain** (`collect_lineage_chain_truncated`): feeds fNFT reward distribution.
1014
+ * - **Lineage chain** (`collect_lineage_chain_truncated`): feeds puzzle piece reward distribution.
1009
1015
  * Walks `LineageParent` edges, filtering to reward-eligible ancestors. Truncates
1010
1016
  * silently at `MAX_LINEAGE_REWARD_DEPTH` instead of erroring, because lineage chains can
1011
1017
  * legitimately exceed 100 (splits shorten active chains but never lineage chains) — an
1012
1018
  * erroring variant would permanently brick activation for entire deep branches.
1013
1019
  *
1014
- * Rewards follow a **two-tier payout** (decision 4):
1015
- * - Tier 1: sender always paid unconditionally.
1016
- * - Tier 2: lineage ancestors paid all-or-nothing among themselves.
1017
- * A transfer failure or unused-pool integrity violation (`Err`) still
1018
- * aborts activation; only a pure supply shortfall is tolerated.
1020
+ * Rewards follow a **two-tier payout** (decision 4): the sender (tier 1) and its
1021
+ * lineage ancestors (tier 2). They are not minted here: they are committed to a draw
1022
+ * that `pallet_puzzle_pieces` resolves, all-or-nothing, a few blocks later from block
1023
+ * entropy produced after this one (BC-538), so the sender cannot learn the outcome
1024
+ * before signing. A refused commit, such as a full draw queue, aborts the activation.
1019
1025
  *
1020
1026
  * Fails with [`Error::BlockProducerCannotActivateReferral`] if the caller is
1021
1027
  * already a block producer — block producers must be active-tree roots.
1022
1028
  *
1023
1029
  * Weight scales linearly with both active depth (`a`) and lineage
1024
- * depth (`l`) via `WeightInfo::activate_referral_depth`. Pre-dispatch
1025
- * reserves worst case on both; post-dispatch refunds to actual.
1030
+ * depth (`l`) via `WeightInfo::activate_referral_depth`, plus the weight resolving
1031
+ * the draw will take (`PuzzlePieceRewardDistributor::reward_draw_weight`), so the
1032
+ * sender pays for its mints. Pre-dispatch reserves worst case on all of them;
1033
+ * post-dispatch refunds to actual.
1026
1034
  **/
1027
1035
  activateReferral: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1028
1036
  /**
@@ -1083,11 +1091,12 @@ declare module '@polkadot/api-base/types/submittable' {
1083
1091
  **/
1084
1092
  setRecycleShare: AugmentedSubmittable<(share: Permill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Permill]>;
1085
1093
  /**
1086
- * Unlock core asset for submitting all fractional NFTs.
1094
+ * Unlock core asset for submitting all puzzle pieces.
1087
1095
  *
1088
1096
  * `WeightInfo::unlock` scales linearly with the number of items in the
1089
- * collection at dispatch time: burning each fractional NFT and clearing
1090
- * each unused-pool entry is per-item work. The dispatch pre-charges the
1097
+ * collection at dispatch time: burning each puzzle piece and clearing
1098
+ * each valid-item entry is per-item work, and so is the wildcard lookup that
1099
+ * fills the caller's gaps (see [`MAX_UNLOCK_ITEMS`]). The dispatch pre-charges the
1091
1100
  * worst case `unlock(MAX_UNLOCK_ITEMS)` so the validator can admit the
1092
1101
  * extrinsic, then refunds the difference via `PostDispatchInfo`. Calls
1093
1102
  * against collections exceeding [`MAX_UNLOCK_ITEMS`] are rejected with
@@ -1383,7 +1392,21 @@ declare module '@polkadot/api-base/types/submittable' {
1383
1392
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
1384
1393
  };
1385
1394
  techCommitteeManager: {
1395
+ /**
1396
+ * Remove `who` from the candidates and, if it holds a seat, from the committee now
1397
+ * rather than at the next session, since the committee acts within a session. `who`
1398
+ * is banned from registering again until `unban_candidate`.
1399
+ *
1400
+ * The eviction may leave the committee below `MinMembers`, as blacklist eviction
1401
+ * does; it recovers once enough eligible candidates are registered.
1402
+ **/
1403
+ forceUnregisterCandidate: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20]>;
1386
1404
  registerTechCommitteeCandidate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1405
+ /**
1406
+ * Lift the ban `force_unregister_candidate` placed on `who`. It is not re-registered;
1407
+ * it may register itself again if it clears the floor.
1408
+ **/
1409
+ unbanCandidate: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId20]>;
1387
1410
  unregisterTechCommitteeCandidate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1388
1411
  /**
1389
1412
  * Generic tx