UNPKG

pchain-dapp-sdk-js

Version:
14 lines (13 loc) 837 B
import { CommandReceipt, Keypair, PublicAddress, Receipt, Sha256Hash, SignedTx } from "pchain-types-js"; import BN from "bn.js"; export declare class PChainWriter { private pchain_client; private endpoint; private pchainReader; constructor(endpoint: string); submitAndConfirmTransaction(signedTx: SignedTx): Promise<Receipt>; submitTransaction(signedTx: SignedTx): Promise<Sha256Hash>; callContractView(contractAddress: string | PublicAddress, method: string, args: Uint8Array[] | null): Promise<CommandReceipt>; callContractStateChange(contractAddress: string | PublicAddress, method: string, args: Uint8Array[] | null, amount: BN | null, keypair: Keypair, gasLimit: BN): Promise<CommandReceipt>; transferToken(toAddress: PublicAddress | string, amount: BN, keypair: Keypair): Promise<Sha256Hash>; }