UNPKG

@planq-network/connect

Version:

Light Toolkit for connecting with the Planq network

16 lines (15 loc) 941 B
import { Connection } from "../connection"; import { PlanqTx, PlanqTxObject, PlanqTxReceipt } from "../types"; import { TransactionResult } from "./tx-result"; export type PlanqTransactionParams = Omit<PlanqTx, "data">; export declare function toTransactionObject<O>(connection: Connection, txo: PlanqTxObject<O>, defaultParams?: PlanqTransactionParams): PlanqTransactionObject<O>; export declare class PlanqTransactionObject<O> { private connection; readonly txo: PlanqTxObject<O>; readonly defaultParams?: PlanqTransactionParams | undefined; constructor(connection: Connection, txo: PlanqTxObject<O>, defaultParams?: PlanqTransactionParams | undefined); /** send the transaction to the chain */ send: (params?: PlanqTransactionParams) => Promise<TransactionResult>; /** send the transaction and waits for the receipt */ sendAndWaitForReceipt: (params?: PlanqTransactionParams) => Promise<PlanqTxReceipt>; }