interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
172 lines (171 loc) • 6.4 kB
TypeScript
import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs";
import { BinaryReader, BinaryWriter } from "../../../../binary";
import { DeepPartial } from "../../../../helpers";
/**
* MerkleRoot defines a merkle root hash.
* In the Cosmos SDK, the AppHash of a block header becomes the root.
* @name MerkleRoot
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleRoot
*/
export interface MerkleRoot {
hash: Uint8Array;
}
export interface MerkleRootProtoMsg {
typeUrl: "/ibc.core.commitment.v1.MerkleRoot";
value: Uint8Array;
}
/**
* MerkleRoot defines a merkle root hash.
* In the Cosmos SDK, the AppHash of a block header becomes the root.
* @name MerkleRootAmino
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleRoot
*/
export interface MerkleRootAmino {
hash: string;
}
export interface MerkleRootAminoMsg {
type: "cosmos-sdk/MerkleRoot";
value: MerkleRootAmino;
}
/**
* MerklePrefix is merkle path prefixed to the key.
* The constructed key from the Path and the key will be append(Path.KeyPath,
* append(Path.KeyPrefix, key...))
* @name MerklePrefix
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerklePrefix
*/
export interface MerklePrefix {
keyPrefix: Uint8Array;
}
export interface MerklePrefixProtoMsg {
typeUrl: "/ibc.core.commitment.v1.MerklePrefix";
value: Uint8Array;
}
/**
* MerklePrefix is merkle path prefixed to the key.
* The constructed key from the Path and the key will be append(Path.KeyPath,
* append(Path.KeyPrefix, key...))
* @name MerklePrefixAmino
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerklePrefix
*/
export interface MerklePrefixAmino {
key_prefix: string;
}
export interface MerklePrefixAminoMsg {
type: "cosmos-sdk/MerklePrefix";
value: MerklePrefixAmino;
}
/**
* MerkleProof is a wrapper type over a chain of CommitmentProofs.
* It demonstrates membership or non-membership for an element or set of
* elements, verifiable in conjunction with a known commitment root. Proofs
* should be succinct.
* MerkleProofs are ordered from leaf-to-root
* @name MerkleProof
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleProof
*/
export interface MerkleProof {
proofs: CommitmentProof[];
}
export interface MerkleProofProtoMsg {
typeUrl: "/ibc.core.commitment.v1.MerkleProof";
value: Uint8Array;
}
/**
* MerkleProof is a wrapper type over a chain of CommitmentProofs.
* It demonstrates membership or non-membership for an element or set of
* elements, verifiable in conjunction with a known commitment root. Proofs
* should be succinct.
* MerkleProofs are ordered from leaf-to-root
* @name MerkleProofAmino
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleProof
*/
export interface MerkleProofAmino {
proofs: CommitmentProofAmino[];
}
export interface MerkleProofAminoMsg {
type: "cosmos-sdk/MerkleProof";
value: MerkleProofAmino;
}
/**
* MerkleRoot defines a merkle root hash.
* In the Cosmos SDK, the AppHash of a block header becomes the root.
* @name MerkleRoot
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleRoot
*/
export declare const MerkleRoot: {
typeUrl: string;
aminoType: string;
is(o: any): o is MerkleRoot;
isAmino(o: any): o is MerkleRootAmino;
encode(message: MerkleRoot, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MerkleRoot;
fromPartial(object: DeepPartial<MerkleRoot>): MerkleRoot;
fromAmino(object: MerkleRootAmino): MerkleRoot;
toAmino(message: MerkleRoot): MerkleRootAmino;
fromAminoMsg(object: MerkleRootAminoMsg): MerkleRoot;
toAminoMsg(message: MerkleRoot): MerkleRootAminoMsg;
fromProtoMsg(message: MerkleRootProtoMsg): MerkleRoot;
toProto(message: MerkleRoot): Uint8Array;
toProtoMsg(message: MerkleRoot): MerkleRootProtoMsg;
registerTypeUrl(): void;
};
/**
* MerklePrefix is merkle path prefixed to the key.
* The constructed key from the Path and the key will be append(Path.KeyPath,
* append(Path.KeyPrefix, key...))
* @name MerklePrefix
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerklePrefix
*/
export declare const MerklePrefix: {
typeUrl: string;
aminoType: string;
is(o: any): o is MerklePrefix;
isAmino(o: any): o is MerklePrefixAmino;
encode(message: MerklePrefix, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MerklePrefix;
fromPartial(object: DeepPartial<MerklePrefix>): MerklePrefix;
fromAmino(object: MerklePrefixAmino): MerklePrefix;
toAmino(message: MerklePrefix): MerklePrefixAmino;
fromAminoMsg(object: MerklePrefixAminoMsg): MerklePrefix;
toAminoMsg(message: MerklePrefix): MerklePrefixAminoMsg;
fromProtoMsg(message: MerklePrefixProtoMsg): MerklePrefix;
toProto(message: MerklePrefix): Uint8Array;
toProtoMsg(message: MerklePrefix): MerklePrefixProtoMsg;
registerTypeUrl(): void;
};
/**
* MerkleProof is a wrapper type over a chain of CommitmentProofs.
* It demonstrates membership or non-membership for an element or set of
* elements, verifiable in conjunction with a known commitment root. Proofs
* should be succinct.
* MerkleProofs are ordered from leaf-to-root
* @name MerkleProof
* @package ibc.core.commitment.v1
* @see proto type: ibc.core.commitment.v1.MerkleProof
*/
export declare const MerkleProof: {
typeUrl: string;
aminoType: string;
is(o: any): o is MerkleProof;
isAmino(o: any): o is MerkleProofAmino;
encode(message: MerkleProof, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MerkleProof;
fromPartial(object: DeepPartial<MerkleProof>): MerkleProof;
fromAmino(object: MerkleProofAmino): MerkleProof;
toAmino(message: MerkleProof): MerkleProofAmino;
fromAminoMsg(object: MerkleProofAminoMsg): MerkleProof;
toAminoMsg(message: MerkleProof): MerkleProofAminoMsg;
fromProtoMsg(message: MerkleProofProtoMsg): MerkleProof;
toProto(message: MerkleProof): Uint8Array;
toProtoMsg(message: MerkleProof): MerkleProofProtoMsg;
registerTypeUrl(): void;
};