o3-dapi-ont
Version:
Ontology Plugin for o3-dapi
24 lines (20 loc) • 493 B
text/typescript
import { sendMessage } from '../../messaging';
import { Command } from '../../constants';
interface GetMerkleProofInput {
txHash: string;
network: string;
}
interface MerkleProof {
Type: string;
TransactionsRoot: string;
BlockHeight: number;
CurBlockRoot: string;
CurBlockHeight: number;
TargetHashes: string[];
}
export function getMerkleProof(data: GetMerkleProofInput): Promise<MerkleProof> {
return sendMessage({
command: Command.getMerkleProof,
data,
});
}