UNPKG

@celo/connect

Version:

Light Toolkit for connecting with the Celo network

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