@dedot/chaintypes 0.2.0 → 0.3.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": "@dedot/chaintypes",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@coongcrafts.io>",
6
6
  "main": "",
@@ -19,7 +19,7 @@
19
19
  "directory": "dist"
20
20
  },
21
21
  "license": "Apache-2.0",
22
- "gitHead": "e063b3f885b6fc3c6a19cbce65f854f635c8b527",
22
+ "gitHead": "c75d777910f611c2356b4ac5f6c091ea3182d301",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -2615,9 +2615,24 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2615
2615
  InvalidKeyOwnershipProof: GenericPalletError<Rv>;
2616
2616
 
2617
2617
  /**
2618
- * An equivocation proof provided as part of an equivocation report is invalid.
2618
+ * A double voting proof provided as part of an equivocation report is invalid.
2619
2619
  **/
2620
- InvalidEquivocationProof: GenericPalletError<Rv>;
2620
+ InvalidDoubleVotingProof: GenericPalletError<Rv>;
2621
+
2622
+ /**
2623
+ * A fork voting proof provided as part of an equivocation report is invalid.
2624
+ **/
2625
+ InvalidForkVotingProof: GenericPalletError<Rv>;
2626
+
2627
+ /**
2628
+ * A future block voting proof provided as part of an equivocation report is invalid.
2629
+ **/
2630
+ InvalidFutureBlockVotingProof: GenericPalletError<Rv>;
2631
+
2632
+ /**
2633
+ * The session of the equivocation proof is invalid
2634
+ **/
2635
+ InvalidEquivocationProofSession: GenericPalletError<Rv>;
2621
2636
 
2622
2637
  /**
2623
2638
  * A given equivocation report is valid but already previously reported.
@@ -791,8 +791,8 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
791
791
  validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
792
792
 
793
793
  /**
794
- * Submits an unsigned extrinsic to report an equivocation. The caller
795
- * must provide the equivocation proof and a key ownership proof
794
+ * Submits an unsigned extrinsic to report a double voting equivocation. The caller
795
+ * must provide the double voting proof and a key ownership proof
796
796
  * (should be obtained using `generate_key_ownership_proof`). The
797
797
  * extrinsic will be unsigned and should only be accepted for local
798
798
  * authorship (not to be broadcast to the network). This method returns
@@ -800,11 +800,11 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
800
800
  * reporting is disabled for the given runtime (i.e. this method is
801
801
  * hardcoded to return `None`). Only useful in an offchain context.
802
802
  *
803
- * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
803
+ * @callname: BeefyApi_submit_report_double_voting_unsigned_extrinsic
804
804
  * @param {SpConsensusBeefyDoubleVotingProof} equivocation_proof
805
805
  * @param {SpRuntimeOpaqueValue} key_owner_proof
806
806
  **/
807
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
807
+ submitReportDoubleVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
808
808
  Rv,
809
809
  (
810
810
  equivocationProof: SpConsensusBeefyDoubleVotingProof,
package/rococo/tx.d.ts CHANGED
@@ -73,6 +73,8 @@ import type {
73
73
  StagingXcmExecutorAssetTransferTransferType,
74
74
  XcmVersionedAssetId,
75
75
  SpConsensusBeefyDoubleVotingProof,
76
+ SpConsensusBeefyForkVotingProof,
77
+ SpConsensusBeefyFutureBlockVotingProof,
76
78
  PolkadotRuntimeParachainsParasParaGenesisArgs,
77
79
  PolkadotRuntimeCommonAssignedSlotsSlotLeasePeriodStart,
78
80
  PalletStateTrieMigrationMigrationLimits,
@@ -9836,7 +9838,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9836
9838
  * @param {SpConsensusBeefyDoubleVotingProof} equivocationProof
9837
9839
  * @param {SpSessionMembershipProof} keyOwnerProof
9838
9840
  **/
9839
- reportEquivocation: GenericTxCall<
9841
+ reportDoubleVoting: GenericTxCall<
9840
9842
  Rv,
9841
9843
  (
9842
9844
  equivocationProof: SpConsensusBeefyDoubleVotingProof,
@@ -9846,7 +9848,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9846
9848
  {
9847
9849
  pallet: 'Beefy';
9848
9850
  palletCall: {
9849
- name: 'ReportEquivocation';
9851
+ name: 'ReportDoubleVoting';
9850
9852
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9851
9853
  };
9852
9854
  }
@@ -9867,7 +9869,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9867
9869
  * @param {SpConsensusBeefyDoubleVotingProof} equivocationProof
9868
9870
  * @param {SpSessionMembershipProof} keyOwnerProof
9869
9871
  **/
9870
- reportEquivocationUnsigned: GenericTxCall<
9872
+ reportDoubleVotingUnsigned: GenericTxCall<
9871
9873
  Rv,
9872
9874
  (
9873
9875
  equivocationProof: SpConsensusBeefyDoubleVotingProof,
@@ -9877,7 +9879,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9877
9879
  {
9878
9880
  pallet: 'Beefy';
9879
9881
  palletCall: {
9880
- name: 'ReportEquivocationUnsigned';
9882
+ name: 'ReportDoubleVotingUnsigned';
9881
9883
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9882
9884
  };
9883
9885
  }
@@ -9906,6 +9908,122 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9906
9908
  >
9907
9909
  >;
9908
9910
 
9911
+ /**
9912
+ * Report fork voting equivocation. This method will verify the equivocation proof
9913
+ * and validate the given key ownership proof against the extracted offender.
9914
+ * If both are valid, the offence will be reported.
9915
+ *
9916
+ * @param {SpConsensusBeefyForkVotingProof} equivocationProof
9917
+ * @param {SpSessionMembershipProof} keyOwnerProof
9918
+ **/
9919
+ reportForkVoting: GenericTxCall<
9920
+ Rv,
9921
+ (
9922
+ equivocationProof: SpConsensusBeefyForkVotingProof,
9923
+ keyOwnerProof: SpSessionMembershipProof,
9924
+ ) => ChainSubmittableExtrinsic<
9925
+ Rv,
9926
+ {
9927
+ pallet: 'Beefy';
9928
+ palletCall: {
9929
+ name: 'ReportForkVoting';
9930
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9931
+ };
9932
+ }
9933
+ >
9934
+ >;
9935
+
9936
+ /**
9937
+ * Report fork voting equivocation. This method will verify the equivocation proof
9938
+ * and validate the given key ownership proof against the extracted offender.
9939
+ * If both are valid, the offence will be reported.
9940
+ *
9941
+ * This extrinsic must be called unsigned and it is expected that only
9942
+ * block authors will call it (validated in `ValidateUnsigned`), as such
9943
+ * if the block author is defined it will be defined as the equivocation
9944
+ * reporter.
9945
+ *
9946
+ * @param {SpConsensusBeefyForkVotingProof} equivocationProof
9947
+ * @param {SpSessionMembershipProof} keyOwnerProof
9948
+ **/
9949
+ reportForkVotingUnsigned: GenericTxCall<
9950
+ Rv,
9951
+ (
9952
+ equivocationProof: SpConsensusBeefyForkVotingProof,
9953
+ keyOwnerProof: SpSessionMembershipProof,
9954
+ ) => ChainSubmittableExtrinsic<
9955
+ Rv,
9956
+ {
9957
+ pallet: 'Beefy';
9958
+ palletCall: {
9959
+ name: 'ReportForkVotingUnsigned';
9960
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9961
+ };
9962
+ }
9963
+ >
9964
+ >;
9965
+
9966
+ /**
9967
+ * Report future block voting equivocation. This method will verify the equivocation proof
9968
+ * and validate the given key ownership proof against the extracted offender.
9969
+ * If both are valid, the offence will be reported.
9970
+ *
9971
+ * @param {SpConsensusBeefyFutureBlockVotingProof} equivocationProof
9972
+ * @param {SpSessionMembershipProof} keyOwnerProof
9973
+ **/
9974
+ reportFutureBlockVoting: GenericTxCall<
9975
+ Rv,
9976
+ (
9977
+ equivocationProof: SpConsensusBeefyFutureBlockVotingProof,
9978
+ keyOwnerProof: SpSessionMembershipProof,
9979
+ ) => ChainSubmittableExtrinsic<
9980
+ Rv,
9981
+ {
9982
+ pallet: 'Beefy';
9983
+ palletCall: {
9984
+ name: 'ReportFutureBlockVoting';
9985
+ params: {
9986
+ equivocationProof: SpConsensusBeefyFutureBlockVotingProof;
9987
+ keyOwnerProof: SpSessionMembershipProof;
9988
+ };
9989
+ };
9990
+ }
9991
+ >
9992
+ >;
9993
+
9994
+ /**
9995
+ * Report future block voting equivocation. This method will verify the equivocation proof
9996
+ * and validate the given key ownership proof against the extracted offender.
9997
+ * If both are valid, the offence will be reported.
9998
+ *
9999
+ * This extrinsic must be called unsigned and it is expected that only
10000
+ * block authors will call it (validated in `ValidateUnsigned`), as such
10001
+ * if the block author is defined it will be defined as the equivocation
10002
+ * reporter.
10003
+ *
10004
+ * @param {SpConsensusBeefyFutureBlockVotingProof} equivocationProof
10005
+ * @param {SpSessionMembershipProof} keyOwnerProof
10006
+ **/
10007
+ reportFutureBlockVotingUnsigned: GenericTxCall<
10008
+ Rv,
10009
+ (
10010
+ equivocationProof: SpConsensusBeefyFutureBlockVotingProof,
10011
+ keyOwnerProof: SpSessionMembershipProof,
10012
+ ) => ChainSubmittableExtrinsic<
10013
+ Rv,
10014
+ {
10015
+ pallet: 'Beefy';
10016
+ palletCall: {
10017
+ name: 'ReportFutureBlockVotingUnsigned';
10018
+ params: {
10019
+ equivocationProof: SpConsensusBeefyFutureBlockVotingProof;
10020
+ keyOwnerProof: SpSessionMembershipProof;
10021
+ };
10022
+ };
10023
+ }
10024
+ >
10025
+ >;
10026
+
9909
10027
  /**
9910
10028
  * Generic pallet tx call
9911
10029
  **/
package/rococo/types.d.ts CHANGED
@@ -9496,7 +9496,7 @@ export type PalletBeefyCall =
9496
9496
  * will be reported.
9497
9497
  **/
9498
9498
  | {
9499
- name: 'ReportEquivocation';
9499
+ name: 'ReportDoubleVoting';
9500
9500
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9501
9501
  }
9502
9502
  /**
@@ -9511,7 +9511,7 @@ export type PalletBeefyCall =
9511
9511
  * reporter.
9512
9512
  **/
9513
9513
  | {
9514
- name: 'ReportEquivocationUnsigned';
9514
+ name: 'ReportDoubleVotingUnsigned';
9515
9515
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9516
9516
  }
9517
9517
  /**
@@ -9520,7 +9520,53 @@ export type PalletBeefyCall =
9520
9520
  *
9521
9521
  * Note: `delay_in_blocks` has to be at least 1.
9522
9522
  **/
9523
- | { name: 'SetNewGenesis'; params: { delayInBlocks: number } };
9523
+ | { name: 'SetNewGenesis'; params: { delayInBlocks: number } }
9524
+ /**
9525
+ * Report fork voting equivocation. This method will verify the equivocation proof
9526
+ * and validate the given key ownership proof against the extracted offender.
9527
+ * If both are valid, the offence will be reported.
9528
+ **/
9529
+ | {
9530
+ name: 'ReportForkVoting';
9531
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9532
+ }
9533
+ /**
9534
+ * Report fork voting equivocation. This method will verify the equivocation proof
9535
+ * and validate the given key ownership proof against the extracted offender.
9536
+ * If both are valid, the offence will be reported.
9537
+ *
9538
+ * This extrinsic must be called unsigned and it is expected that only
9539
+ * block authors will call it (validated in `ValidateUnsigned`), as such
9540
+ * if the block author is defined it will be defined as the equivocation
9541
+ * reporter.
9542
+ **/
9543
+ | {
9544
+ name: 'ReportForkVotingUnsigned';
9545
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9546
+ }
9547
+ /**
9548
+ * Report future block voting equivocation. This method will verify the equivocation proof
9549
+ * and validate the given key ownership proof against the extracted offender.
9550
+ * If both are valid, the offence will be reported.
9551
+ **/
9552
+ | {
9553
+ name: 'ReportFutureBlockVoting';
9554
+ params: { equivocationProof: SpConsensusBeefyFutureBlockVotingProof; keyOwnerProof: SpSessionMembershipProof };
9555
+ }
9556
+ /**
9557
+ * Report future block voting equivocation. This method will verify the equivocation proof
9558
+ * and validate the given key ownership proof against the extracted offender.
9559
+ * If both are valid, the offence will be reported.
9560
+ *
9561
+ * This extrinsic must be called unsigned and it is expected that only
9562
+ * block authors will call it (validated in `ValidateUnsigned`), as such
9563
+ * if the block author is defined it will be defined as the equivocation
9564
+ * reporter.
9565
+ **/
9566
+ | {
9567
+ name: 'ReportFutureBlockVotingUnsigned';
9568
+ params: { equivocationProof: SpConsensusBeefyFutureBlockVotingProof; keyOwnerProof: SpSessionMembershipProof };
9569
+ };
9524
9570
 
9525
9571
  export type PalletBeefyCallLike =
9526
9572
  /**
@@ -9530,7 +9576,7 @@ export type PalletBeefyCallLike =
9530
9576
  * will be reported.
9531
9577
  **/
9532
9578
  | {
9533
- name: 'ReportEquivocation';
9579
+ name: 'ReportDoubleVoting';
9534
9580
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9535
9581
  }
9536
9582
  /**
@@ -9545,7 +9591,7 @@ export type PalletBeefyCallLike =
9545
9591
  * reporter.
9546
9592
  **/
9547
9593
  | {
9548
- name: 'ReportEquivocationUnsigned';
9594
+ name: 'ReportDoubleVotingUnsigned';
9549
9595
  params: { equivocationProof: SpConsensusBeefyDoubleVotingProof; keyOwnerProof: SpSessionMembershipProof };
9550
9596
  }
9551
9597
  /**
@@ -9554,7 +9600,53 @@ export type PalletBeefyCallLike =
9554
9600
  *
9555
9601
  * Note: `delay_in_blocks` has to be at least 1.
9556
9602
  **/
9557
- | { name: 'SetNewGenesis'; params: { delayInBlocks: number } };
9603
+ | { name: 'SetNewGenesis'; params: { delayInBlocks: number } }
9604
+ /**
9605
+ * Report fork voting equivocation. This method will verify the equivocation proof
9606
+ * and validate the given key ownership proof against the extracted offender.
9607
+ * If both are valid, the offence will be reported.
9608
+ **/
9609
+ | {
9610
+ name: 'ReportForkVoting';
9611
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9612
+ }
9613
+ /**
9614
+ * Report fork voting equivocation. This method will verify the equivocation proof
9615
+ * and validate the given key ownership proof against the extracted offender.
9616
+ * If both are valid, the offence will be reported.
9617
+ *
9618
+ * This extrinsic must be called unsigned and it is expected that only
9619
+ * block authors will call it (validated in `ValidateUnsigned`), as such
9620
+ * if the block author is defined it will be defined as the equivocation
9621
+ * reporter.
9622
+ **/
9623
+ | {
9624
+ name: 'ReportForkVotingUnsigned';
9625
+ params: { equivocationProof: SpConsensusBeefyForkVotingProof; keyOwnerProof: SpSessionMembershipProof };
9626
+ }
9627
+ /**
9628
+ * Report future block voting equivocation. This method will verify the equivocation proof
9629
+ * and validate the given key ownership proof against the extracted offender.
9630
+ * If both are valid, the offence will be reported.
9631
+ **/
9632
+ | {
9633
+ name: 'ReportFutureBlockVoting';
9634
+ params: { equivocationProof: SpConsensusBeefyFutureBlockVotingProof; keyOwnerProof: SpSessionMembershipProof };
9635
+ }
9636
+ /**
9637
+ * Report future block voting equivocation. This method will verify the equivocation proof
9638
+ * and validate the given key ownership proof against the extracted offender.
9639
+ * If both are valid, the offence will be reported.
9640
+ *
9641
+ * This extrinsic must be called unsigned and it is expected that only
9642
+ * block authors will call it (validated in `ValidateUnsigned`), as such
9643
+ * if the block author is defined it will be defined as the equivocation
9644
+ * reporter.
9645
+ **/
9646
+ | {
9647
+ name: 'ReportFutureBlockVotingUnsigned';
9648
+ params: { equivocationProof: SpConsensusBeefyFutureBlockVotingProof; keyOwnerProof: SpSessionMembershipProof };
9649
+ };
9558
9650
 
9559
9651
  export type SpConsensusBeefyDoubleVotingProof = {
9560
9652
  first: SpConsensusBeefyVoteMessage;
@@ -9577,6 +9669,21 @@ export type SpConsensusBeefyCommitment = {
9577
9669
 
9578
9670
  export type SpConsensusBeefyPayload = Array<[FixedBytes<2>, Bytes]>;
9579
9671
 
9672
+ export type SpConsensusBeefyForkVotingProof = {
9673
+ vote: SpConsensusBeefyVoteMessage;
9674
+ ancestryProof: SpMmrPrimitivesAncestryProof;
9675
+ header: Header;
9676
+ };
9677
+
9678
+ export type SpMmrPrimitivesAncestryProof = {
9679
+ prevPeaks: Array<H256>;
9680
+ prevLeafCount: bigint;
9681
+ leafCount: bigint;
9682
+ items: Array<[bigint, H256]>;
9683
+ };
9684
+
9685
+ export type SpConsensusBeefyFutureBlockVotingProof = { vote: SpConsensusBeefyVoteMessage };
9686
+
9580
9687
  /**
9581
9688
  * Contains a variant per dispatchable extrinsic that this pallet has.
9582
9689
  **/
@@ -14343,9 +14450,21 @@ export type PalletBeefyError =
14343
14450
  **/
14344
14451
  | 'InvalidKeyOwnershipProof'
14345
14452
  /**
14346
- * An equivocation proof provided as part of an equivocation report is invalid.
14453
+ * A double voting proof provided as part of an equivocation report is invalid.
14347
14454
  **/
14348
- | 'InvalidEquivocationProof'
14455
+ | 'InvalidDoubleVotingProof'
14456
+ /**
14457
+ * A fork voting proof provided as part of an equivocation report is invalid.
14458
+ **/
14459
+ | 'InvalidForkVotingProof'
14460
+ /**
14461
+ * A future block voting proof provided as part of an equivocation report is invalid.
14462
+ **/
14463
+ | 'InvalidFutureBlockVotingProof'
14464
+ /**
14465
+ * The session of the equivocation proof is invalid
14466
+ **/
14467
+ | 'InvalidEquivocationProofSession'
14349
14468
  /**
14350
14469
  * A given equivocation report is valid but already previously reported.
14351
14470
  **/