Skip to content

Commit

Permalink
correct mmr_root interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Lederstrumpf committed Feb 26, 2023
1 parent 9fea152 commit a5c2b51
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/api-augment/src/kusama/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
Expand Down
2 changes: 1 addition & 1 deletion packages/api-augment/src/polkadot/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
Expand Down
2 changes: 1 addition & 1 deletion packages/api-augment/src/substrate/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
Expand Down
4 changes: 2 additions & 2 deletions packages/rpc-augment/src/augment/jsonrpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
/**
* Get the MMR root hash for the current best block.
**/
mmrRoot: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>;
root: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>;
/**
* Verify an MMR proof
**/
verifyProof: AugmentedRpc<(proof: MmrLeafBatchProof | { blockHash?: any; leaves?: any; proof?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Verify an MMR proof statelessly given an mmr_root
**/
verifyProofStateless: AugmentedRpc<(mmrRoot: MmrHash | string | Uint8Array, proof: MmrLeafBatchProof | { blockHash?: any; leaves?: any; proof?: any } | string | Uint8Array) => Observable<bool>>;
verifyProofStateless: AugmentedRpc<(root: MmrHash | string | Uint8Array, proof: MmrLeafBatchProof | { blockHash?: any; leaves?: any; proof?: any } | string | Uint8Array) => Observable<bool>>;
};
net: {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/interfaces/mmr/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type { DefinitionsRpc } from '../../types';

export const rpc: DefinitionsRpc = {
mmrRoot: {
root: {
description: 'Get the MMR root hash for the current best block.',
params: [
{
Expand Down Expand Up @@ -54,7 +54,7 @@ export const rpc: DefinitionsRpc = {
description: 'Verify an MMR proof statelessly given an mmr_root',
params: [
{
name: 'mmrRoot',
name: 'root',
type: 'MmrHash'
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/interfaces/mmr/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const runtime: DefinitionsCall = {
],
type: 'Result<(Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof), MmrError>'
},
mmr_root: {
root: {
description: 'Return the on-chain MMR root hash.',
params: [],
type: 'Result<Hash, MmrError>'
Expand Down

0 comments on commit a5c2b51

Please sign in to comment.