@dedot/chaintypes 0.53.0 → 0.55.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/moonbeam/errors.d.ts +45 -10
- package/moonbeam/index.d.ts +1 -1
- package/moonbeam/query.d.ts +16 -6
- package/moonbeam/tx.d.ts +79 -13
- package/moonbeam/types.d.ts +59 -13
- package/package.json +3 -3
- package/substrate/consts.d.ts +135 -38
- package/substrate/errors.d.ts +432 -11
- package/substrate/events.d.ts +510 -54
- package/substrate/json-rpc.d.ts +1 -0
- package/substrate/query.d.ts +330 -56
- package/substrate/runtime.d.ts +346 -44
- package/substrate/tx.d.ts +1439 -308
- package/substrate/types.d.ts +1973 -492
package/substrate/runtime.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ import type {
|
|
|
10
10
|
UncheckedExtrinsic,
|
|
11
11
|
H256,
|
|
12
12
|
AccountId32Like,
|
|
13
|
+
AccountId32,
|
|
13
14
|
BytesLike,
|
|
14
15
|
Bytes,
|
|
15
|
-
|
|
16
|
+
H160,
|
|
17
|
+
FixedBytes,
|
|
16
18
|
} from 'dedot/codecs';
|
|
17
19
|
import type {
|
|
18
20
|
SpRuntimeBlock,
|
|
@@ -29,7 +31,7 @@ import type {
|
|
|
29
31
|
SpStatementStoreStatement,
|
|
30
32
|
SpConsensusGrandpaAppPublic,
|
|
31
33
|
SpConsensusGrandpaEquivocationProof,
|
|
32
|
-
|
|
34
|
+
SpRuntimeOpaqueValue,
|
|
33
35
|
SpConsensusBabeBabeConfiguration,
|
|
34
36
|
SpConsensusSlotsSlot,
|
|
35
37
|
SpConsensusBabeEpoch,
|
|
@@ -44,17 +46,24 @@ import type {
|
|
|
44
46
|
PalletContractsPrimitivesCodeUploadReturnValue,
|
|
45
47
|
PalletContractsWasmDeterminism,
|
|
46
48
|
PalletContractsPrimitivesContractAccessError,
|
|
49
|
+
PalletRevivePrimitivesContractResult,
|
|
50
|
+
PalletRevivePrimitivesContractResultInstantiateReturnValue,
|
|
51
|
+
PalletRevivePrimitivesCode,
|
|
52
|
+
PalletRevivePrimitivesEthContractResult,
|
|
53
|
+
PalletRevivePrimitivesCodeUploadReturnValue,
|
|
54
|
+
PalletRevivePrimitivesContractAccessError,
|
|
47
55
|
PalletTransactionPaymentRuntimeDispatchInfo,
|
|
48
56
|
PalletTransactionPaymentFeeDetails,
|
|
49
57
|
FrameSupportTokensFungibleUnionOfNativeOrWithId,
|
|
50
58
|
KitchensinkRuntimeRuntimeCallLike,
|
|
51
59
|
SpConsensusBeefyValidatorSet,
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
SpConsensusBeefyDoubleVotingProof,
|
|
61
|
+
SpConsensusBeefyForkVotingProofOpaqueValue,
|
|
62
|
+
SpConsensusBeefyFutureBlockVotingProof,
|
|
54
63
|
SpConsensusBeefyEcdsaCryptoPublic,
|
|
55
64
|
SpMmrPrimitivesError,
|
|
56
65
|
SpMmrPrimitivesEncodableOpaqueLeaf,
|
|
57
|
-
|
|
66
|
+
SpMmrPrimitivesLeafProof,
|
|
58
67
|
SpMixnetSessionStatus,
|
|
59
68
|
SpMixnetMixnode,
|
|
60
69
|
SpMixnetMixnodesErr,
|
|
@@ -290,13 +299,13 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
290
299
|
*
|
|
291
300
|
* @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
|
|
292
301
|
* @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
|
|
293
|
-
* @param {
|
|
302
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
294
303
|
**/
|
|
295
304
|
submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
296
305
|
Rv,
|
|
297
306
|
(
|
|
298
307
|
equivocationProof: SpConsensusGrandpaEquivocationProof,
|
|
299
|
-
keyOwnerProof:
|
|
308
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
300
309
|
) => Promise<[] | undefined>
|
|
301
310
|
>;
|
|
302
311
|
|
|
@@ -319,10 +328,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
319
328
|
**/
|
|
320
329
|
generateKeyOwnershipProof: GenericRuntimeApiMethod<
|
|
321
330
|
Rv,
|
|
322
|
-
(
|
|
323
|
-
setId: bigint,
|
|
324
|
-
authorityId: SpConsensusGrandpaAppPublic,
|
|
325
|
-
) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>
|
|
331
|
+
(setId: bigint, authorityId: SpConsensusGrandpaAppPublic) => Promise<SpRuntimeOpaqueValue | undefined>
|
|
326
332
|
>;
|
|
327
333
|
|
|
328
334
|
/**
|
|
@@ -367,6 +373,75 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
367
373
|
**/
|
|
368
374
|
balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
|
|
369
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Returns the pending slash for a given pool.
|
|
378
|
+
*
|
|
379
|
+
* @callname: NominationPoolsApi_pool_pending_slash
|
|
380
|
+
* @param {number} pool_id
|
|
381
|
+
**/
|
|
382
|
+
poolPendingSlash: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Returns the pending slash for a given pool member.
|
|
386
|
+
*
|
|
387
|
+
* @callname: NominationPoolsApi_member_pending_slash
|
|
388
|
+
* @param {AccountId32Like} member
|
|
389
|
+
**/
|
|
390
|
+
memberPendingSlash: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<bigint>>;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Returns true if the pool with `pool_id` needs migration.
|
|
394
|
+
*
|
|
395
|
+
* This can happen when the `pallet-nomination-pools` has switched to using strategy
|
|
396
|
+
* [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool
|
|
397
|
+
* still has funds that were staked using the older strategy
|
|
398
|
+
* [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use
|
|
399
|
+
* [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake)
|
|
400
|
+
* to migrate the pool.
|
|
401
|
+
*
|
|
402
|
+
* @callname: NominationPoolsApi_pool_needs_delegate_migration
|
|
403
|
+
* @param {number} pool_id
|
|
404
|
+
**/
|
|
405
|
+
poolNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<boolean>>;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Returns true if the delegated funds of the pool `member` needs migration.
|
|
409
|
+
*
|
|
410
|
+
* Once a pool has successfully migrated to the strategy
|
|
411
|
+
* [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the
|
|
412
|
+
* member can be migrated from pool account to the member's account. Use
|
|
413
|
+
* [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation)
|
|
414
|
+
* to migrate the funds of the pool member.
|
|
415
|
+
*
|
|
416
|
+
* @callname: NominationPoolsApi_member_needs_delegate_migration
|
|
417
|
+
* @param {AccountId32Like} member
|
|
418
|
+
**/
|
|
419
|
+
memberNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<boolean>>;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Returns the total contribution of a pool member including any balance that is unbonding.
|
|
423
|
+
*
|
|
424
|
+
* @callname: NominationPoolsApi_member_total_balance
|
|
425
|
+
* @param {AccountId32Like} who
|
|
426
|
+
**/
|
|
427
|
+
memberTotalBalance: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Total balance contributed to the pool.
|
|
431
|
+
*
|
|
432
|
+
* @callname: NominationPoolsApi_pool_balance
|
|
433
|
+
* @param {number} pool_id
|
|
434
|
+
**/
|
|
435
|
+
poolBalance: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Returns the bonded account and reward account associated with the pool_id.
|
|
439
|
+
*
|
|
440
|
+
* @callname: NominationPoolsApi_pool_accounts
|
|
441
|
+
* @param {number} pool_id
|
|
442
|
+
**/
|
|
443
|
+
poolAccounts: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<[AccountId32, AccountId32]>>;
|
|
444
|
+
|
|
370
445
|
/**
|
|
371
446
|
* Generic runtime api call
|
|
372
447
|
**/
|
|
@@ -385,7 +460,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
385
460
|
nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
|
|
386
461
|
|
|
387
462
|
/**
|
|
388
|
-
* Returns the page count of exposures for a validator in a given era.
|
|
463
|
+
* Returns the page count of exposures for a validator `account` in a given era.
|
|
389
464
|
*
|
|
390
465
|
* @callname: StakingApi_eras_stakers_page_count
|
|
391
466
|
* @param {number} era
|
|
@@ -393,6 +468,15 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
393
468
|
**/
|
|
394
469
|
erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
|
|
395
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Returns true if validator `account` has pages to be claimed for the given era.
|
|
473
|
+
*
|
|
474
|
+
* @callname: StakingApi_pending_rewards
|
|
475
|
+
* @param {number} era
|
|
476
|
+
* @param {AccountId32Like} account
|
|
477
|
+
**/
|
|
478
|
+
pendingRewards: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<boolean>>;
|
|
479
|
+
|
|
396
480
|
/**
|
|
397
481
|
* Generic runtime api call
|
|
398
482
|
**/
|
|
@@ -634,6 +718,146 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
634
718
|
**/
|
|
635
719
|
[method: string]: GenericRuntimeApiMethod<Rv>;
|
|
636
720
|
};
|
|
721
|
+
/**
|
|
722
|
+
* @runtimeapi: ReviveApi - 0x8c403e5c4a9fd442
|
|
723
|
+
**/
|
|
724
|
+
reviveApi: {
|
|
725
|
+
/**
|
|
726
|
+
* Returns the free balance of the given `[H160]` address.
|
|
727
|
+
*
|
|
728
|
+
* @callname: ReviveApi_balance
|
|
729
|
+
* @param {H160} address
|
|
730
|
+
**/
|
|
731
|
+
balance: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<bigint>>;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Returns the nonce of the given `[H160]` address.
|
|
735
|
+
*
|
|
736
|
+
* @callname: ReviveApi_nonce
|
|
737
|
+
* @param {H160} address
|
|
738
|
+
**/
|
|
739
|
+
nonce: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<number>>;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Perform a call from a specified account to a given contract.
|
|
743
|
+
*
|
|
744
|
+
* See [`crate::Pallet::bare_call`].
|
|
745
|
+
*
|
|
746
|
+
* @callname: ReviveApi_call
|
|
747
|
+
* @param {AccountId32Like} origin
|
|
748
|
+
* @param {H160} dest
|
|
749
|
+
* @param {bigint} value
|
|
750
|
+
* @param {SpWeightsWeightV2Weight | undefined} gas_limit
|
|
751
|
+
* @param {bigint | undefined} storage_deposit_limit
|
|
752
|
+
* @param {BytesLike} input_data
|
|
753
|
+
**/
|
|
754
|
+
call: GenericRuntimeApiMethod<
|
|
755
|
+
Rv,
|
|
756
|
+
(
|
|
757
|
+
origin: AccountId32Like,
|
|
758
|
+
dest: H160,
|
|
759
|
+
value: bigint,
|
|
760
|
+
gasLimit: SpWeightsWeightV2Weight | undefined,
|
|
761
|
+
storageDepositLimit: bigint | undefined,
|
|
762
|
+
inputData: BytesLike,
|
|
763
|
+
) => Promise<PalletRevivePrimitivesContractResult>
|
|
764
|
+
>;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Instantiate a new contract.
|
|
768
|
+
*
|
|
769
|
+
* See `[crate::Pallet::bare_instantiate]`.
|
|
770
|
+
*
|
|
771
|
+
* @callname: ReviveApi_instantiate
|
|
772
|
+
* @param {AccountId32Like} origin
|
|
773
|
+
* @param {bigint} value
|
|
774
|
+
* @param {SpWeightsWeightV2Weight | undefined} gas_limit
|
|
775
|
+
* @param {bigint | undefined} storage_deposit_limit
|
|
776
|
+
* @param {PalletRevivePrimitivesCode} code
|
|
777
|
+
* @param {BytesLike} data
|
|
778
|
+
* @param {FixedBytes<32> | undefined} salt
|
|
779
|
+
**/
|
|
780
|
+
instantiate: GenericRuntimeApiMethod<
|
|
781
|
+
Rv,
|
|
782
|
+
(
|
|
783
|
+
origin: AccountId32Like,
|
|
784
|
+
value: bigint,
|
|
785
|
+
gasLimit: SpWeightsWeightV2Weight | undefined,
|
|
786
|
+
storageDepositLimit: bigint | undefined,
|
|
787
|
+
code: PalletRevivePrimitivesCode,
|
|
788
|
+
data: BytesLike,
|
|
789
|
+
salt?: FixedBytes<32> | undefined,
|
|
790
|
+
) => Promise<PalletRevivePrimitivesContractResultInstantiateReturnValue>
|
|
791
|
+
>;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Perform an Ethereum call.
|
|
795
|
+
*
|
|
796
|
+
* See [`crate::Pallet::bare_eth_transact`]
|
|
797
|
+
*
|
|
798
|
+
* @callname: ReviveApi_eth_transact
|
|
799
|
+
* @param {H160} origin
|
|
800
|
+
* @param {H160 | undefined} dest
|
|
801
|
+
* @param {bigint} value
|
|
802
|
+
* @param {BytesLike} input
|
|
803
|
+
* @param {SpWeightsWeightV2Weight | undefined} gas_limit
|
|
804
|
+
* @param {bigint | undefined} storage_deposit_limit
|
|
805
|
+
**/
|
|
806
|
+
ethTransact: GenericRuntimeApiMethod<
|
|
807
|
+
Rv,
|
|
808
|
+
(
|
|
809
|
+
origin: H160,
|
|
810
|
+
dest: H160 | undefined,
|
|
811
|
+
value: bigint,
|
|
812
|
+
input: BytesLike,
|
|
813
|
+
gasLimit?: SpWeightsWeightV2Weight | undefined,
|
|
814
|
+
storageDepositLimit?: bigint | undefined,
|
|
815
|
+
) => Promise<PalletRevivePrimitivesEthContractResult>
|
|
816
|
+
>;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Upload new code without instantiating a contract from it.
|
|
820
|
+
*
|
|
821
|
+
* See [`crate::Pallet::bare_upload_code`].
|
|
822
|
+
*
|
|
823
|
+
* @callname: ReviveApi_upload_code
|
|
824
|
+
* @param {AccountId32Like} origin
|
|
825
|
+
* @param {BytesLike} code
|
|
826
|
+
* @param {bigint | undefined} storage_deposit_limit
|
|
827
|
+
**/
|
|
828
|
+
uploadCode: GenericRuntimeApiMethod<
|
|
829
|
+
Rv,
|
|
830
|
+
(
|
|
831
|
+
origin: AccountId32Like,
|
|
832
|
+
code: BytesLike,
|
|
833
|
+
storageDepositLimit?: bigint | undefined,
|
|
834
|
+
) => Promise<Result<PalletRevivePrimitivesCodeUploadReturnValue, DispatchError>>
|
|
835
|
+
>;
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Query a given storage key in a given contract.
|
|
839
|
+
*
|
|
840
|
+
* Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
|
|
841
|
+
* specified account and `Ok(None)` if it doesn't. If the account specified by the address
|
|
842
|
+
* doesn't exist, or doesn't have a contract then `Err` is returned.
|
|
843
|
+
*
|
|
844
|
+
* @callname: ReviveApi_get_storage
|
|
845
|
+
* @param {H160} address
|
|
846
|
+
* @param {FixedBytes<32>} key
|
|
847
|
+
**/
|
|
848
|
+
getStorage: GenericRuntimeApiMethod<
|
|
849
|
+
Rv,
|
|
850
|
+
(
|
|
851
|
+
address: H160,
|
|
852
|
+
key: FixedBytes<32>,
|
|
853
|
+
) => Promise<Result<Bytes | undefined, PalletRevivePrimitivesContractAccessError>>
|
|
854
|
+
>;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Generic runtime api call
|
|
858
|
+
**/
|
|
859
|
+
[method: string]: GenericRuntimeApiMethod<Rv>;
|
|
860
|
+
};
|
|
637
861
|
/**
|
|
638
862
|
* @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
|
|
639
863
|
**/
|
|
@@ -887,8 +1111,8 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
887
1111
|
validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
|
|
888
1112
|
|
|
889
1113
|
/**
|
|
890
|
-
* Submits an unsigned extrinsic to report
|
|
891
|
-
* must provide the
|
|
1114
|
+
* Submits an unsigned extrinsic to report a double voting equivocation. The caller
|
|
1115
|
+
* must provide the double voting proof and a key ownership proof
|
|
892
1116
|
* (should be obtained using `generate_key_ownership_proof`). The
|
|
893
1117
|
* extrinsic will be unsigned and should only be accepted for local
|
|
894
1118
|
* authorship (not to be broadcast to the network). This method returns
|
|
@@ -896,15 +1120,59 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
896
1120
|
* reporting is disabled for the given runtime (i.e. this method is
|
|
897
1121
|
* hardcoded to return `None`). Only useful in an offchain context.
|
|
898
1122
|
*
|
|
899
|
-
* @callname:
|
|
900
|
-
* @param {
|
|
901
|
-
* @param {
|
|
1123
|
+
* @callname: BeefyApi_submit_report_double_voting_unsigned_extrinsic
|
|
1124
|
+
* @param {SpConsensusBeefyDoubleVotingProof} equivocation_proof
|
|
1125
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
902
1126
|
**/
|
|
903
|
-
|
|
1127
|
+
submitReportDoubleVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
904
1128
|
Rv,
|
|
905
1129
|
(
|
|
906
|
-
equivocationProof:
|
|
907
|
-
keyOwnerProof:
|
|
1130
|
+
equivocationProof: SpConsensusBeefyDoubleVotingProof,
|
|
1131
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
1132
|
+
) => Promise<[] | undefined>
|
|
1133
|
+
>;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Submits an unsigned extrinsic to report a fork voting equivocation. The caller
|
|
1137
|
+
* must provide the fork voting proof (the ancestry proof should be obtained using
|
|
1138
|
+
* `generate_ancestry_proof`) and a key ownership proof (should be obtained using
|
|
1139
|
+
* `generate_key_ownership_proof`). The extrinsic will be unsigned and should only
|
|
1140
|
+
* be accepted for local authorship (not to be broadcast to the network). This method
|
|
1141
|
+
* returns `None` when creation of the extrinsic fails, e.g. if equivocation
|
|
1142
|
+
* reporting is disabled for the given runtime (i.e. this method is
|
|
1143
|
+
* hardcoded to return `None`). Only useful in an offchain context.
|
|
1144
|
+
*
|
|
1145
|
+
* @callname: BeefyApi_submit_report_fork_voting_unsigned_extrinsic
|
|
1146
|
+
* @param {SpConsensusBeefyForkVotingProofOpaqueValue} equivocation_proof
|
|
1147
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
1148
|
+
**/
|
|
1149
|
+
submitReportForkVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
1150
|
+
Rv,
|
|
1151
|
+
(
|
|
1152
|
+
equivocationProof: SpConsensusBeefyForkVotingProofOpaqueValue,
|
|
1153
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
1154
|
+
) => Promise<[] | undefined>
|
|
1155
|
+
>;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Submits an unsigned extrinsic to report a future block voting equivocation. The caller
|
|
1159
|
+
* must provide the future block voting proof and a key ownership proof
|
|
1160
|
+
* (should be obtained using `generate_key_ownership_proof`).
|
|
1161
|
+
* The extrinsic will be unsigned and should only be accepted for local
|
|
1162
|
+
* authorship (not to be broadcast to the network). This method returns
|
|
1163
|
+
* `None` when creation of the extrinsic fails, e.g. if equivocation
|
|
1164
|
+
* reporting is disabled for the given runtime (i.e. this method is
|
|
1165
|
+
* hardcoded to return `None`). Only useful in an offchain context.
|
|
1166
|
+
*
|
|
1167
|
+
* @callname: BeefyApi_submit_report_future_block_voting_unsigned_extrinsic
|
|
1168
|
+
* @param {SpConsensusBeefyFutureBlockVotingProof} equivocation_proof
|
|
1169
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
1170
|
+
**/
|
|
1171
|
+
submitReportFutureBlockVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
1172
|
+
Rv,
|
|
1173
|
+
(
|
|
1174
|
+
equivocationProof: SpConsensusBeefyFutureBlockVotingProof,
|
|
1175
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
908
1176
|
) => Promise<[] | undefined>
|
|
909
1177
|
>;
|
|
910
1178
|
|
|
@@ -927,10 +1195,20 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
927
1195
|
**/
|
|
928
1196
|
generateKeyOwnershipProof: GenericRuntimeApiMethod<
|
|
929
1197
|
Rv,
|
|
930
|
-
(
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1198
|
+
(setId: bigint, authorityId: SpConsensusBeefyEcdsaCryptoPublic) => Promise<SpRuntimeOpaqueValue | undefined>
|
|
1199
|
+
>;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* Generates a proof that the `prev_block_number` is part of the canonical chain at
|
|
1203
|
+
* `best_known_block_number`.
|
|
1204
|
+
*
|
|
1205
|
+
* @callname: BeefyApi_generate_ancestry_proof
|
|
1206
|
+
* @param {number} prev_block_number
|
|
1207
|
+
* @param {number | undefined} best_known_block_number
|
|
1208
|
+
**/
|
|
1209
|
+
generateAncestryProof: GenericRuntimeApiMethod<
|
|
1210
|
+
Rv,
|
|
1211
|
+
(prevBlockNumber: number, bestKnownBlockNumber?: number | undefined) => Promise<SpRuntimeOpaqueValue | undefined>
|
|
934
1212
|
>;
|
|
935
1213
|
|
|
936
1214
|
/**
|
|
@@ -969,7 +1247,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
969
1247
|
(
|
|
970
1248
|
blockNumbers: Array<number>,
|
|
971
1249
|
bestKnownBlockNumber?: number | undefined,
|
|
972
|
-
) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
|
|
1250
|
+
) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesLeafProof], SpMmrPrimitivesError>>
|
|
973
1251
|
>;
|
|
974
1252
|
|
|
975
1253
|
/**
|
|
@@ -977,17 +1255,17 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
977
1255
|
*
|
|
978
1256
|
* Note this function will use on-chain MMR root hash and check if the proof matches the hash.
|
|
979
1257
|
* Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
|
|
980
|
-
* same position in both the `leaves` vector and the `leaf_indices` vector contained in the [
|
|
1258
|
+
* same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
|
981
1259
|
*
|
|
982
1260
|
* @callname: MmrApi_verify_proof
|
|
983
1261
|
* @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
|
|
984
|
-
* @param {
|
|
1262
|
+
* @param {SpMmrPrimitivesLeafProof} proof
|
|
985
1263
|
**/
|
|
986
1264
|
verifyProof: GenericRuntimeApiMethod<
|
|
987
1265
|
Rv,
|
|
988
1266
|
(
|
|
989
1267
|
leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
|
|
990
|
-
proof:
|
|
1268
|
+
proof: SpMmrPrimitivesLeafProof,
|
|
991
1269
|
) => Promise<Result<[], SpMmrPrimitivesError>>
|
|
992
1270
|
>;
|
|
993
1271
|
|
|
@@ -998,19 +1276,19 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
998
1276
|
* proof is verified against given MMR root hash.
|
|
999
1277
|
*
|
|
1000
1278
|
* Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
|
|
1001
|
-
* same position in both the `leaves` vector and the `leaf_indices` vector contained in the [
|
|
1279
|
+
* same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
|
1002
1280
|
*
|
|
1003
1281
|
* @callname: MmrApi_verify_proof_stateless
|
|
1004
1282
|
* @param {H256} root
|
|
1005
1283
|
* @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
|
|
1006
|
-
* @param {
|
|
1284
|
+
* @param {SpMmrPrimitivesLeafProof} proof
|
|
1007
1285
|
**/
|
|
1008
1286
|
verifyProofStateless: GenericRuntimeApiMethod<
|
|
1009
1287
|
Rv,
|
|
1010
1288
|
(
|
|
1011
1289
|
root: H256,
|
|
1012
1290
|
leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
|
|
1013
|
-
proof:
|
|
1291
|
+
proof: SpMmrPrimitivesLeafProof,
|
|
1014
1292
|
) => Promise<Result<[], SpMmrPrimitivesError>>
|
|
1015
1293
|
>;
|
|
1016
1294
|
|
|
@@ -1113,28 +1391,52 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
1113
1391
|
**/
|
|
1114
1392
|
genesisBuilder: {
|
|
1115
1393
|
/**
|
|
1116
|
-
*
|
|
1394
|
+
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
|
|
1395
|
+
* storage.
|
|
1117
1396
|
*
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1397
|
+
* In the case of a FRAME-based runtime, this function deserializes the full
|
|
1398
|
+
* `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the
|
|
1399
|
+
* provided JSON blob is incorrect or incomplete or the deserialization fails, an error
|
|
1400
|
+
* is returned.
|
|
1120
1401
|
*
|
|
1121
|
-
*
|
|
1402
|
+
* Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
|
|
1403
|
+
* defaults will be used.
|
|
1404
|
+
*
|
|
1405
|
+
* @callname: GenesisBuilder_build_state
|
|
1406
|
+
* @param {BytesLike} json
|
|
1122
1407
|
**/
|
|
1123
|
-
|
|
1408
|
+
buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
|
|
1124
1409
|
|
|
1125
1410
|
/**
|
|
1126
|
-
*
|
|
1411
|
+
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
|
|
1412
|
+
* `id`.
|
|
1127
1413
|
*
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1130
|
-
*
|
|
1414
|
+
* If `id` is `None` the function should return JSON blob representation of the default
|
|
1415
|
+
* `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
|
|
1416
|
+
* `RuntimeGenesisConfig`.
|
|
1131
1417
|
*
|
|
1132
|
-
*
|
|
1418
|
+
* Otherwise function returns a JSON representation of the built-in, named
|
|
1419
|
+
* `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
|
|
1420
|
+
* exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
|
|
1421
|
+
* (potentially nested) key-value pairs that are intended for customizing the default
|
|
1422
|
+
* runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
|
|
1423
|
+
* of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
|
|
1424
|
+
* be used in `build_state` method.
|
|
1133
1425
|
*
|
|
1134
|
-
* @callname:
|
|
1135
|
-
* @param {
|
|
1426
|
+
* @callname: GenesisBuilder_get_preset
|
|
1427
|
+
* @param {string | undefined} id
|
|
1428
|
+
**/
|
|
1429
|
+
getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
|
|
1433
|
+
*
|
|
1434
|
+
* The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
|
|
1435
|
+
* no named presets are provided by the runtime the list is empty.
|
|
1436
|
+
*
|
|
1437
|
+
* @callname: GenesisBuilder_preset_names
|
|
1136
1438
|
**/
|
|
1137
|
-
|
|
1439
|
+
presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
|
|
1138
1440
|
|
|
1139
1441
|
/**
|
|
1140
1442
|
* Generic runtime api call
|