UNPKG

@dioxide-js/silas

Version:

RPC utility for Silas

25 lines (24 loc) 779 B
import { TxOption } from './transaction'; import { GetProofsParams } from '../api/type'; export interface NewProofParams { sender: string; ttl?: number; key: string; content: string; } export interface NewProofByProofHashParams { sender: string; ttl?: number; proof_key: string; content?: string; } declare class Proof { private tx; private proofSvc; constructor(opts: TxOption); newProof(privatekey: string | Uint8Array, params: NewProofParams): Promise<string>; newProofByProofKey(privatekey: string | Uint8Array, params: NewProofByProofHashParams): Promise<string>; getProofs(params: GetProofsParams): Promise<import("../api/type").Proof[]>; checkProof(proof_hash: string): Promise<boolean>; } export default Proof;