UNPKG

eulith-web3js

Version:

Official Eulith Typescript client library

55 lines (54 loc) 2.21 kB
import Web3 from "web3"; import { TransactionConfig, TransactionReceipt } from "web3-eth"; import * as Eulith from "./index"; /** * This can be used to access Eulith-specific APIs, but often all that is needed * is Eulith.Provider, and that can be used directly with a web3 js object. * * EulithWeb3 is an extension of the basic Web3; this allows you to use the Eulith services as * a drop-in replacement for your existing Web3js code. */ export declare class EulithWeb3 extends Web3 { constructor({ provider, disableTransactionPolling }: { provider: Eulith.Provider; disableTransactionPolling?: boolean; }); /** * The signer is an optional property of a web3 object, so this can return null */ get signer(): Eulith.Signing.SigningService | undefined; /** * Fetch the logger associate with this web3 object. */ get logger(): Eulith.Logging.ILogger; /** * Sends an unsigned transaction payload to Eulith servers to append to * an atomic transaction. */ eulithSendUnsignedTransaction(transactionConfig: TransactionConfig): Promise<string>; eulithSwapQuote(params: Eulith.Swaps.Request): Promise<[number, TransactionConfig[]]>; /** * Send a series of transactions and wait for each to be confirmed, * returning the transaction receipts of each. * * At any point, one of them could fail, with some having gone on to completion. This process aborts at that time * and offers no clues about how many were processed (could include the completed ones in a special exception) */ eulithSendMultiTransaction(txs: TransactionConfig[]): Promise<TransactionReceipt[]>; /** * Checks that an ACE binary is connected to the server for the auth address. */ eulithPingAce(authAddress: string): Promise<{ ping_time_millis: number; auth_address: string; ui_address: string; }>; /** * Returns the provider object associated with this EulithWeb3 instance */ get provider(): Eulith.Provider; get inAtomicTx(): boolean; atomicTx: Eulith.AtomicTx.Transaction; private readonly logger_; private readonly provider_; }