UNPKG

dev3-sdk

Version:

SDK for interacting with the 0xDev3 platform.

15 lines (14 loc) 1.44 kB
import { ContractCallAction } from '../actions/ContractCallAction'; import { EncodedFunctionOutput, EncodedFunctionParameter } from '../types'; import { ethers, TransactionResponse } from 'ethers'; export declare let web3provider: ethers.JsonRpcProvider; export declare function poll<T>(fetchFn: () => Promise<T>, conditionFn: (response: T) => boolean, intervalSeconds?: number): Promise<T>; export declare const wait: (ms: number) => Promise<unknown>; export declare function isBrowser(): boolean; export declare function ensureBrowser(): void; export declare function getWeb3Provider(chainId: string): Promise<ethers.JsonRpcProvider>; export declare function readContract(contract_address: string, function_name: string, function_params: EncodedFunctionParameter[], output_params: EncodedFunctionOutput[], caller_address: string): Promise<import("../types").ReadFromContractResult>; export declare function writeContract(contract_address: string, function_name: string, function_params: EncodedFunctionParameter[], eth_amount: string): Promise<ContractCallAction>; export declare function signAndSendTransaction(contract_address: string, function_name: string, pk: string, parameter_names?: string[], function_params?: [EncodedFunctionParameter]): Promise<TransactionResponse>; export declare function fetchChainlist(): Promise<Map<string, string>>; export declare function fetchChainlinkContractsAddresses(): Promise<Map<string, string>>;