@dedot/chaintypes 0.231.0 → 0.232.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 +2 -2
- package/paseo/consts.d.ts +19 -0
- package/paseo/errors.d.ts +107 -12
- package/paseo/events.d.ts +83 -13
- package/paseo/index.d.ts +1 -1
- package/paseo/query.d.ts +99 -52
- package/paseo/runtime.d.ts +138 -63
- package/paseo/tx.d.ts +185 -40
- package/paseo/types.d.ts +473 -205
package/paseo/runtime.d.ts
CHANGED
|
@@ -25,37 +25,39 @@ import type {
|
|
|
25
25
|
SpInherentsCheckInherentsResult,
|
|
26
26
|
SpRuntimeTransactionValidityValidTransaction,
|
|
27
27
|
SpRuntimeTransactionValidityTransactionSource,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
PolkadotPrimitivesV8ValidatorAppPublic,
|
|
29
|
+
PolkadotPrimitivesV8ValidatorIndex,
|
|
30
|
+
PolkadotPrimitivesV8GroupRotationInfo,
|
|
31
|
+
PolkadotPrimitivesV8CoreState,
|
|
32
|
+
PolkadotPrimitivesV8PersistedValidationData,
|
|
33
33
|
PolkadotParachainPrimitivesPrimitivesId,
|
|
34
|
-
|
|
34
|
+
PolkadotPrimitivesV8OccupiedCoreAssumption,
|
|
35
35
|
PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
|
|
36
|
-
|
|
36
|
+
PolkadotPrimitivesV8CandidateCommitments,
|
|
37
37
|
PolkadotParachainPrimitivesPrimitivesValidationCode,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
PolkadotPrimitivesV8CommittedCandidateReceipt,
|
|
39
|
+
PolkadotPrimitivesV8CandidateEvent,
|
|
40
40
|
PolkadotCorePrimitivesInboundDownwardMessage,
|
|
41
41
|
PolkadotCorePrimitivesInboundHrmpMessage,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
PolkadotPrimitivesV8ScrapedOnChainVotes,
|
|
43
|
+
PolkadotPrimitivesV8SessionInfo,
|
|
44
|
+
PolkadotPrimitivesV8PvfCheckStatement,
|
|
45
|
+
PolkadotPrimitivesV8ValidatorAppSignature,
|
|
46
46
|
PolkadotCorePrimitivesCandidateHash,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
PolkadotPrimitivesV8DisputeState,
|
|
48
|
+
PolkadotPrimitivesV8ExecutorParams,
|
|
49
|
+
PolkadotPrimitivesV8SlashingPendingSlashes,
|
|
50
|
+
PolkadotPrimitivesV8SlashingOpaqueKeyOwnershipProof,
|
|
51
|
+
PolkadotPrimitivesV8SlashingDisputeProof,
|
|
52
|
+
PolkadotPrimitivesV8AsyncBackingBackingState,
|
|
53
|
+
PolkadotPrimitivesV8AsyncBackingAsyncBackingParams,
|
|
54
|
+
PolkadotPrimitivesV8ApprovalVotingParams,
|
|
55
|
+
PolkadotPrimitivesV8CoreIndex,
|
|
56
56
|
SpConsensusBeefyValidatorSet,
|
|
57
57
|
SpConsensusBeefyDoubleVotingProof,
|
|
58
58
|
SpRuntimeOpaqueValue,
|
|
59
|
+
SpConsensusBeefyForkVotingProofOpaqueValue,
|
|
60
|
+
SpConsensusBeefyFutureBlockVotingProof,
|
|
59
61
|
SpConsensusBeefyEcdsaCryptoPublic,
|
|
60
62
|
SpMmrPrimitivesError,
|
|
61
63
|
SpMmrPrimitivesEncodableOpaqueLeaf,
|
|
@@ -268,6 +270,9 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
268
270
|
/**
|
|
269
271
|
* Returns the pending slash for a given pool member.
|
|
270
272
|
*
|
|
273
|
+
* If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on
|
|
274
|
+
* chain.
|
|
275
|
+
*
|
|
271
276
|
* @callname: NominationPoolsApi_member_pending_slash
|
|
272
277
|
* @param {AccountId32Like} member
|
|
273
278
|
**/
|
|
@@ -302,6 +307,22 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
302
307
|
**/
|
|
303
308
|
memberNeedsDelegateMigration: GenericRuntimeApiMethod<(member: AccountId32Like) => Promise<boolean>>;
|
|
304
309
|
|
|
310
|
+
/**
|
|
311
|
+
* Returns the total contribution of a pool member including any balance that is unbonding.
|
|
312
|
+
*
|
|
313
|
+
* @callname: NominationPoolsApi_member_total_balance
|
|
314
|
+
* @param {AccountId32Like} who
|
|
315
|
+
**/
|
|
316
|
+
memberTotalBalance: GenericRuntimeApiMethod<(who: AccountId32Like) => Promise<bigint>>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Total balance contributed to the pool.
|
|
320
|
+
*
|
|
321
|
+
* @callname: NominationPoolsApi_pool_balance
|
|
322
|
+
* @param {number} pool_id
|
|
323
|
+
**/
|
|
324
|
+
poolBalance: GenericRuntimeApiMethod<(poolId: number) => Promise<bigint>>;
|
|
325
|
+
|
|
305
326
|
/**
|
|
306
327
|
* Generic runtime api call
|
|
307
328
|
**/
|
|
@@ -403,7 +424,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
403
424
|
*
|
|
404
425
|
* @callname: ParachainHost_validators
|
|
405
426
|
**/
|
|
406
|
-
validators: GenericRuntimeApiMethod<() => Promise<Array<
|
|
427
|
+
validators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV8ValidatorAppPublic>>>;
|
|
407
428
|
|
|
408
429
|
/**
|
|
409
430
|
* Returns the validator groups and rotation info localized based on the hypothetical child
|
|
@@ -413,7 +434,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
413
434
|
* @callname: ParachainHost_validator_groups
|
|
414
435
|
**/
|
|
415
436
|
validatorGroups: GenericRuntimeApiMethod<
|
|
416
|
-
() => Promise<[Array<Array<
|
|
437
|
+
() => Promise<[Array<Array<PolkadotPrimitivesV8ValidatorIndex>>, PolkadotPrimitivesV8GroupRotationInfo]>
|
|
417
438
|
>;
|
|
418
439
|
|
|
419
440
|
/**
|
|
@@ -422,7 +443,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
422
443
|
*
|
|
423
444
|
* @callname: ParachainHost_availability_cores
|
|
424
445
|
**/
|
|
425
|
-
availabilityCores: GenericRuntimeApiMethod<() => Promise<Array<
|
|
446
|
+
availabilityCores: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV8CoreState>>>;
|
|
426
447
|
|
|
427
448
|
/**
|
|
428
449
|
* Yields the persisted validation data for the given `ParaId` along with an assumption that
|
|
@@ -433,13 +454,13 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
433
454
|
*
|
|
434
455
|
* @callname: ParachainHost_persisted_validation_data
|
|
435
456
|
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
436
|
-
* @param {
|
|
457
|
+
* @param {PolkadotPrimitivesV8OccupiedCoreAssumption} assumption
|
|
437
458
|
**/
|
|
438
459
|
persistedValidationData: GenericRuntimeApiMethod<
|
|
439
460
|
(
|
|
440
461
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
441
|
-
assumption:
|
|
442
|
-
) => Promise<
|
|
462
|
+
assumption: PolkadotPrimitivesV8OccupiedCoreAssumption,
|
|
463
|
+
) => Promise<PolkadotPrimitivesV8PersistedValidationData | undefined>
|
|
443
464
|
>;
|
|
444
465
|
|
|
445
466
|
/**
|
|
@@ -456,7 +477,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
456
477
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
457
478
|
expectedPersistedValidationDataHash: H256,
|
|
458
479
|
) => Promise<
|
|
459
|
-
| [
|
|
480
|
+
| [PolkadotPrimitivesV8PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
|
|
460
481
|
| undefined
|
|
461
482
|
>
|
|
462
483
|
>;
|
|
@@ -466,12 +487,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
466
487
|
*
|
|
467
488
|
* @callname: ParachainHost_check_validation_outputs
|
|
468
489
|
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
469
|
-
* @param {
|
|
490
|
+
* @param {PolkadotPrimitivesV8CandidateCommitments} outputs
|
|
470
491
|
**/
|
|
471
492
|
checkValidationOutputs: GenericRuntimeApiMethod<
|
|
472
493
|
(
|
|
473
494
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
474
|
-
outputs:
|
|
495
|
+
outputs: PolkadotPrimitivesV8CandidateCommitments,
|
|
475
496
|
) => Promise<boolean>
|
|
476
497
|
>;
|
|
477
498
|
|
|
@@ -492,12 +513,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
492
513
|
*
|
|
493
514
|
* @callname: ParachainHost_validation_code
|
|
494
515
|
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
495
|
-
* @param {
|
|
516
|
+
* @param {PolkadotPrimitivesV8OccupiedCoreAssumption} assumption
|
|
496
517
|
**/
|
|
497
518
|
validationCode: GenericRuntimeApiMethod<
|
|
498
519
|
(
|
|
499
520
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
500
|
-
assumption:
|
|
521
|
+
assumption: PolkadotPrimitivesV8OccupiedCoreAssumption,
|
|
501
522
|
) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
|
|
502
523
|
>;
|
|
503
524
|
|
|
@@ -511,7 +532,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
511
532
|
candidatePendingAvailability: GenericRuntimeApiMethod<
|
|
512
533
|
(
|
|
513
534
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
514
|
-
) => Promise<
|
|
535
|
+
) => Promise<PolkadotPrimitivesV8CommittedCandidateReceipt | undefined>
|
|
515
536
|
>;
|
|
516
537
|
|
|
517
538
|
/**
|
|
@@ -519,7 +540,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
519
540
|
*
|
|
520
541
|
* @callname: ParachainHost_candidate_events
|
|
521
542
|
**/
|
|
522
|
-
candidateEvents: GenericRuntimeApiMethod<() => Promise<Array<
|
|
543
|
+
candidateEvents: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV8CandidateEvent>>>;
|
|
523
544
|
|
|
524
545
|
/**
|
|
525
546
|
* Get all the pending inbound messages in the downward message queue for a para.
|
|
@@ -563,7 +584,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
563
584
|
*
|
|
564
585
|
* @callname: ParachainHost_on_chain_votes
|
|
565
586
|
**/
|
|
566
|
-
onChainVotes: GenericRuntimeApiMethod<() => Promise<
|
|
587
|
+
onChainVotes: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV8ScrapedOnChainVotes | undefined>>;
|
|
567
588
|
|
|
568
589
|
/**
|
|
569
590
|
* Get the session info for the given session, if stored.
|
|
@@ -573,7 +594,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
573
594
|
* @callname: ParachainHost_session_info
|
|
574
595
|
* @param {number} index
|
|
575
596
|
**/
|
|
576
|
-
sessionInfo: GenericRuntimeApiMethod<(index: number) => Promise<
|
|
597
|
+
sessionInfo: GenericRuntimeApiMethod<(index: number) => Promise<PolkadotPrimitivesV8SessionInfo | undefined>>;
|
|
577
598
|
|
|
578
599
|
/**
|
|
579
600
|
* Submits a PVF pre-checking statement into the transaction pool.
|
|
@@ -581,11 +602,11 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
581
602
|
* NOTE: This function is only available since parachain host version 2.
|
|
582
603
|
*
|
|
583
604
|
* @callname: ParachainHost_submit_pvf_check_statement
|
|
584
|
-
* @param {
|
|
585
|
-
* @param {
|
|
605
|
+
* @param {PolkadotPrimitivesV8PvfCheckStatement} stmt
|
|
606
|
+
* @param {PolkadotPrimitivesV8ValidatorAppSignature} signature
|
|
586
607
|
**/
|
|
587
608
|
submitPvfCheckStatement: GenericRuntimeApiMethod<
|
|
588
|
-
(stmt:
|
|
609
|
+
(stmt: PolkadotPrimitivesV8PvfCheckStatement, signature: PolkadotPrimitivesV8ValidatorAppSignature) => Promise<[]>
|
|
589
610
|
>;
|
|
590
611
|
|
|
591
612
|
/**
|
|
@@ -606,12 +627,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
606
627
|
*
|
|
607
628
|
* @callname: ParachainHost_validation_code_hash
|
|
608
629
|
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
609
|
-
* @param {
|
|
630
|
+
* @param {PolkadotPrimitivesV8OccupiedCoreAssumption} assumption
|
|
610
631
|
**/
|
|
611
632
|
validationCodeHash: GenericRuntimeApiMethod<
|
|
612
633
|
(
|
|
613
634
|
paraId: PolkadotParachainPrimitivesPrimitivesId,
|
|
614
|
-
assumption:
|
|
635
|
+
assumption: PolkadotPrimitivesV8OccupiedCoreAssumption,
|
|
615
636
|
) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>
|
|
616
637
|
>;
|
|
617
638
|
|
|
@@ -621,7 +642,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
621
642
|
* @callname: ParachainHost_disputes
|
|
622
643
|
**/
|
|
623
644
|
disputes: GenericRuntimeApiMethod<
|
|
624
|
-
() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash,
|
|
645
|
+
() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV8DisputeState]>>
|
|
625
646
|
>;
|
|
626
647
|
|
|
627
648
|
/**
|
|
@@ -631,7 +652,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
631
652
|
* @param {number} session_index
|
|
632
653
|
**/
|
|
633
654
|
sessionExecutorParams: GenericRuntimeApiMethod<
|
|
634
|
-
(sessionIndex: number) => Promise<
|
|
655
|
+
(sessionIndex: number) => Promise<PolkadotPrimitivesV8ExecutorParams | undefined>
|
|
635
656
|
>;
|
|
636
657
|
|
|
637
658
|
/**
|
|
@@ -641,7 +662,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
641
662
|
* @callname: ParachainHost_unapplied_slashes
|
|
642
663
|
**/
|
|
643
664
|
unappliedSlashes: GenericRuntimeApiMethod<
|
|
644
|
-
() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash,
|
|
665
|
+
() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV8SlashingPendingSlashes]>>
|
|
645
666
|
>;
|
|
646
667
|
|
|
647
668
|
/**
|
|
@@ -649,12 +670,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
649
670
|
* NOTE: This function is only available since parachain host version 5.
|
|
650
671
|
*
|
|
651
672
|
* @callname: ParachainHost_key_ownership_proof
|
|
652
|
-
* @param {
|
|
673
|
+
* @param {PolkadotPrimitivesV8ValidatorAppPublic} validator_id
|
|
653
674
|
**/
|
|
654
675
|
keyOwnershipProof: GenericRuntimeApiMethod<
|
|
655
676
|
(
|
|
656
|
-
validatorId:
|
|
657
|
-
) => Promise<
|
|
677
|
+
validatorId: PolkadotPrimitivesV8ValidatorAppPublic,
|
|
678
|
+
) => Promise<PolkadotPrimitivesV8SlashingOpaqueKeyOwnershipProof | undefined>
|
|
658
679
|
>;
|
|
659
680
|
|
|
660
681
|
/**
|
|
@@ -663,13 +684,13 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
663
684
|
* NOTE: This function is only available since parachain host version 5.
|
|
664
685
|
*
|
|
665
686
|
* @callname: ParachainHost_submit_report_dispute_lost
|
|
666
|
-
* @param {
|
|
667
|
-
* @param {
|
|
687
|
+
* @param {PolkadotPrimitivesV8SlashingDisputeProof} dispute_proof
|
|
688
|
+
* @param {PolkadotPrimitivesV8SlashingOpaqueKeyOwnershipProof} key_ownership_proof
|
|
668
689
|
**/
|
|
669
690
|
submitReportDisputeLost: GenericRuntimeApiMethod<
|
|
670
691
|
(
|
|
671
|
-
disputeProof:
|
|
672
|
-
keyOwnershipProof:
|
|
692
|
+
disputeProof: PolkadotPrimitivesV8SlashingDisputeProof,
|
|
693
|
+
keyOwnershipProof: PolkadotPrimitivesV8SlashingOpaqueKeyOwnershipProof,
|
|
673
694
|
) => Promise<[] | undefined>
|
|
674
695
|
>;
|
|
675
696
|
|
|
@@ -690,7 +711,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
690
711
|
paraBackingState: GenericRuntimeApiMethod<
|
|
691
712
|
(
|
|
692
713
|
undefined: PolkadotParachainPrimitivesPrimitivesId,
|
|
693
|
-
) => Promise<
|
|
714
|
+
) => Promise<PolkadotPrimitivesV8AsyncBackingBackingState | undefined>
|
|
694
715
|
>;
|
|
695
716
|
|
|
696
717
|
/**
|
|
@@ -698,14 +719,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
698
719
|
*
|
|
699
720
|
* @callname: ParachainHost_async_backing_params
|
|
700
721
|
**/
|
|
701
|
-
asyncBackingParams: GenericRuntimeApiMethod<() => Promise<
|
|
722
|
+
asyncBackingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV8AsyncBackingAsyncBackingParams>>;
|
|
702
723
|
|
|
703
724
|
/**
|
|
704
725
|
* Returns a list of all disabled validators at the given block.
|
|
705
726
|
*
|
|
706
727
|
* @callname: ParachainHost_disabled_validators
|
|
707
728
|
**/
|
|
708
|
-
disabledValidators: GenericRuntimeApiMethod<() => Promise<Array<
|
|
729
|
+
disabledValidators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV8ValidatorIndex>>>;
|
|
709
730
|
|
|
710
731
|
/**
|
|
711
732
|
* Get node features.
|
|
@@ -720,7 +741,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
720
741
|
*
|
|
721
742
|
* @callname: ParachainHost_approval_voting_params
|
|
722
743
|
**/
|
|
723
|
-
approvalVotingParams: GenericRuntimeApiMethod<() => Promise<
|
|
744
|
+
approvalVotingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV8ApprovalVotingParams>>;
|
|
724
745
|
|
|
725
746
|
/**
|
|
726
747
|
* Claim queue
|
|
@@ -728,7 +749,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
728
749
|
* @callname: ParachainHost_claim_queue
|
|
729
750
|
**/
|
|
730
751
|
claimQueue: GenericRuntimeApiMethod<
|
|
731
|
-
() => Promise<Array<[
|
|
752
|
+
() => Promise<Array<[PolkadotPrimitivesV8CoreIndex, Array<PolkadotParachainPrimitivesPrimitivesId>]>>
|
|
732
753
|
>;
|
|
733
754
|
|
|
734
755
|
/**
|
|
@@ -738,7 +759,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
738
759
|
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
739
760
|
**/
|
|
740
761
|
candidatesPendingAvailability: GenericRuntimeApiMethod<
|
|
741
|
-
(paraId: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<
|
|
762
|
+
(paraId: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<PolkadotPrimitivesV8CommittedCandidateReceipt>>
|
|
742
763
|
>;
|
|
743
764
|
|
|
744
765
|
/**
|
|
@@ -765,8 +786,8 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
765
786
|
validatorSet: GenericRuntimeApiMethod<() => Promise<SpConsensusBeefyValidatorSet | undefined>>;
|
|
766
787
|
|
|
767
788
|
/**
|
|
768
|
-
* Submits an unsigned extrinsic to report
|
|
769
|
-
* must provide the
|
|
789
|
+
* Submits an unsigned extrinsic to report a double voting equivocation. The caller
|
|
790
|
+
* must provide the double voting proof and a key ownership proof
|
|
770
791
|
* (should be obtained using `generate_key_ownership_proof`). The
|
|
771
792
|
* extrinsic will be unsigned and should only be accepted for local
|
|
772
793
|
* authorship (not to be broadcast to the network). This method returns
|
|
@@ -774,17 +795,59 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
774
795
|
* reporting is disabled for the given runtime (i.e. this method is
|
|
775
796
|
* hardcoded to return `None`). Only useful in an offchain context.
|
|
776
797
|
*
|
|
777
|
-
* @callname:
|
|
798
|
+
* @callname: BeefyApi_submit_report_double_voting_unsigned_extrinsic
|
|
778
799
|
* @param {SpConsensusBeefyDoubleVotingProof} equivocation_proof
|
|
779
800
|
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
780
801
|
**/
|
|
781
|
-
|
|
802
|
+
submitReportDoubleVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
782
803
|
(
|
|
783
804
|
equivocationProof: SpConsensusBeefyDoubleVotingProof,
|
|
784
805
|
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
785
806
|
) => Promise<[] | undefined>
|
|
786
807
|
>;
|
|
787
808
|
|
|
809
|
+
/**
|
|
810
|
+
* Submits an unsigned extrinsic to report a fork voting equivocation. The caller
|
|
811
|
+
* must provide the fork voting proof (the ancestry proof should be obtained using
|
|
812
|
+
* `generate_ancestry_proof`) and a key ownership proof (should be obtained using
|
|
813
|
+
* `generate_key_ownership_proof`). The extrinsic will be unsigned and should only
|
|
814
|
+
* be accepted for local authorship (not to be broadcast to the network). This method
|
|
815
|
+
* returns `None` when creation of the extrinsic fails, e.g. if equivocation
|
|
816
|
+
* reporting is disabled for the given runtime (i.e. this method is
|
|
817
|
+
* hardcoded to return `None`). Only useful in an offchain context.
|
|
818
|
+
*
|
|
819
|
+
* @callname: BeefyApi_submit_report_fork_voting_unsigned_extrinsic
|
|
820
|
+
* @param {SpConsensusBeefyForkVotingProofOpaqueValue} equivocation_proof
|
|
821
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
822
|
+
**/
|
|
823
|
+
submitReportForkVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
824
|
+
(
|
|
825
|
+
equivocationProof: SpConsensusBeefyForkVotingProofOpaqueValue,
|
|
826
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
827
|
+
) => Promise<[] | undefined>
|
|
828
|
+
>;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Submits an unsigned extrinsic to report a future block voting equivocation. The caller
|
|
832
|
+
* must provide the future block voting proof and a key ownership proof
|
|
833
|
+
* (should be obtained using `generate_key_ownership_proof`).
|
|
834
|
+
* The extrinsic will be unsigned and should only be accepted for local
|
|
835
|
+
* authorship (not to be broadcast to the network). This method returns
|
|
836
|
+
* `None` when creation of the extrinsic fails, e.g. if equivocation
|
|
837
|
+
* reporting is disabled for the given runtime (i.e. this method is
|
|
838
|
+
* hardcoded to return `None`). Only useful in an offchain context.
|
|
839
|
+
*
|
|
840
|
+
* @callname: BeefyApi_submit_report_future_block_voting_unsigned_extrinsic
|
|
841
|
+
* @param {SpConsensusBeefyFutureBlockVotingProof} equivocation_proof
|
|
842
|
+
* @param {SpRuntimeOpaqueValue} key_owner_proof
|
|
843
|
+
**/
|
|
844
|
+
submitReportFutureBlockVotingUnsignedExtrinsic: GenericRuntimeApiMethod<
|
|
845
|
+
(
|
|
846
|
+
equivocationProof: SpConsensusBeefyFutureBlockVotingProof,
|
|
847
|
+
keyOwnerProof: SpRuntimeOpaqueValue,
|
|
848
|
+
) => Promise<[] | undefined>
|
|
849
|
+
>;
|
|
850
|
+
|
|
788
851
|
/**
|
|
789
852
|
* Generates a proof of key ownership for the given authority in the
|
|
790
853
|
* given set. An example usage of this module is coupled with the
|
|
@@ -806,6 +869,18 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
806
869
|
(setId: bigint, authorityId: SpConsensusBeefyEcdsaCryptoPublic) => Promise<SpRuntimeOpaqueValue | undefined>
|
|
807
870
|
>;
|
|
808
871
|
|
|
872
|
+
/**
|
|
873
|
+
* Generates a proof that the `prev_block_number` is part of the canonical chain at
|
|
874
|
+
* `best_known_block_number`.
|
|
875
|
+
*
|
|
876
|
+
* @callname: BeefyApi_generate_ancestry_proof
|
|
877
|
+
* @param {number} prev_block_number
|
|
878
|
+
* @param {number | undefined} best_known_block_number
|
|
879
|
+
**/
|
|
880
|
+
generateAncestryProof: GenericRuntimeApiMethod<
|
|
881
|
+
(prevBlockNumber: number, bestKnownBlockNumber?: number | undefined) => Promise<SpRuntimeOpaqueValue | undefined>
|
|
882
|
+
>;
|
|
883
|
+
|
|
809
884
|
/**
|
|
810
885
|
* Generic runtime api call
|
|
811
886
|
**/
|
|
@@ -1383,7 +1458,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
1383
1458
|
*
|
|
1384
1459
|
* Otherwise function returns a JSON representation of the built-in, named
|
|
1385
1460
|
* `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
|
|
1386
|
-
*
|
|
1461
|
+
* exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
|
|
1387
1462
|
* (potentially nested) key-value pairs that are intended for customizing the default
|
|
1388
1463
|
* runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
|
|
1389
1464
|
* of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
|