New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ethers

Package Overview
Dependencies
Maintainers
1
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethers - npm Package Compare versions

Comparing version 4.0.0-beta.7 to 4.0.0-beta.8

providers/base-provider.d.ts

2

_version.d.ts

@@ -1,1 +0,1 @@

export declare const version = "4.0.0-beta.7";
export declare const version = "4.0.0-beta.8";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "4.0.0-beta.7";
exports.version = "4.0.0-beta.8";

@@ -11,103 +11,12 @@ // Generated by dts-bundle v0.7.3

import { Contract, Interface } from 'ethers/contracts';
import { Provider, getDefaultProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider } from 'ethers/providers';
import { JsonRpcSigner } from 'ethers/providers/json-rpc-provider';
import * as providers from 'ethers/providers';
import { HDNode, SigningKey, Wallet } from 'ethers/wallet';
import { constants } from 'ethers/utils/constants';
import * as errors from 'ethers/utils/errors';
import * as utils from 'ethers/utils';
import * as types from 'ethers/types';
import * as wordlists from 'ethers/wordlists';
import * as errors from 'ethers/utils/errors';
import { platform } from 'ethers/utils/shims';
import { version } from 'ethers/_version';
import { Provider as _AbstractProvider } from 'ethers/providers/abstract-provider';
import { Signer as _AbstractSigner } from 'ethers/wallet/abstract-signer';
import { ContractFunction as _ContractFunction, Event as _Event, EventFilter as _EventFilter } from 'ethers/contracts/contract';
import { Indexed as _Indexed, DeployDescription as _DeplyDescription, EventDescription as _EventDescription, FunctionDescription as _FunctionDescription, LogDescription as _LogDescription, TransactionDescription as _TransactionDescription } from 'ethers/contracts/interface';
import { Block as _Block, BlockTag as _BlockTag, EventType as _EventType, Filter as _Filter, Log as _Log, Listener as _Listener, TransactionReceipt as _TransactionReceipt, TransactionRequest as _TransactionRequest, TransactionResponse as _TransactionResponse } from 'ethers/providers/abstract-provider';
import { AsyncSendable as _AsyncSendable } from 'ethers/providers/web3-provider';
import { CoerceFunc as _CoerceFunc, EventFragment as _EventFragment, FunctionFragment as _FunctionFragment, ParamType as _ParamType } from 'ethers/utils/abi-coder';
import { BigNumberish as _BigNumberish } from 'ethers/utils/bignumber';
import { Arrayish as _Arrayish, Hexable as _Hexable, Signature as _Signature } from 'ethers/utils/bytes';
import { SupportedAlgorithms as _SupportedAlgorithms } from 'ethers/utils/hmac';
import { Network as _Network, Networkish as _Networkish } from 'ethers/utils/networks';
import { Transaction as _Transaction, UnsignedTransaction as _UnsignedTransaction } from 'ethers/utils/transaction';
import { UnicodeNormalizationForm as _UnicodeNotmalizationForm } from 'ethers/utils/utf8';
import { ConnectionInfo as _ConnectionInfo, OnceBlockable as _OnceBlockable, PollOptions as _PollOptions } from 'ethers/utils/web';
import { EncryptOptions as _EncryptOptions, ProgressCallback as _ProgressCallback } from 'ethers/wallet/secret-storage';
import { Wordlist as _Wordlist } from 'ethers/wordlists/wordlist';
module types {
const AbstractSigner: typeof _AbstractSigner;
const AbstractProvider: typeof _AbstractProvider;
type SignerOrProvider = _AbstractSigner | _AbstractProvider;
type ContractFunction = _ContractFunction;
type EventFilter = _EventFilter;
interface Event extends _Event {
}
interface Indexed extends _Indexed {
}
interface DeployDescription extends _DeplyDescription {
}
interface EventDescription extends _EventDescription {
}
interface FunctionDescription extends _FunctionDescription {
}
interface LogDescription extends _LogDescription {
}
interface TransactionDescription extends _TransactionDescription {
}
type BlockTag = _BlockTag;
type EventType = _EventType;
type Filter = _Filter;
type Listener = _Listener;
type TransactionRequest = _TransactionRequest;
interface Block extends _Block {
}
interface Log extends _Log {
}
interface TransactionReceipt extends _TransactionReceipt {
}
interface TransactionResponse extends _TransactionResponse {
}
type AsyncSendable = _AsyncSendable;
type CoerceFunc = _CoerceFunc;
type EventFragment = _EventFragment;
type FunctionFragment = _FunctionFragment;
type ParamType = _ParamType;
type BigNumberish = _BigNumberish;
type Arrayish = _Arrayish;
type Hexable = _Hexable;
type Signature = _Signature;
const SupportedAlgorithms: typeof _SupportedAlgorithms;
type Network = _Network;
type Networkish = _Networkish;
type UnsignedTransaction = _UnsignedTransaction;
interface Transaction extends _Transaction {
}
const UnicodeNormalizationForm: typeof _UnicodeNotmalizationForm;
type ConnectionInfo = _ConnectionInfo;
interface OnceBlockable extends _OnceBlockable {
}
type PollOptions = _PollOptions;
type EncryptOptions = _EncryptOptions;
type ProgressCallback = _ProgressCallback;
const Wordlist: typeof _Wordlist;
}
const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: utils.BigNumber;
Zero: utils.BigNumber;
One: utils.BigNumber;
Two: utils.BigNumber;
WeiPerEther: utils.BigNumber;
MaxUint256: utils.BigNumber;
};
const providers: {
Provider: typeof Provider;
FallbackProvider: typeof FallbackProvider;
EtherscanProvider: typeof EtherscanProvider;
InfuraProvider: typeof InfuraProvider;
IpcProvider: typeof IpcProvider;
JsonRpcProvider: typeof JsonRpcProvider;
Web3Provider: typeof Web3Provider;
JsonRpcSigner: typeof JsonRpcSigner;
};
function getDefaultProvider(network?: types.Network | string): providers.BaseProvider;
export { Wallet, HDNode, SigningKey, Contract, Interface, getDefaultProvider, providers, errors, constants, utils, types, wordlists, platform, version };

@@ -123,3 +32,3 @@ }

declare module 'ethers/providers' {
import { Provider } from 'ethers/providers/provider';
import { BaseProvider } from 'ethers/providers/base-provider';
import { EtherscanProvider } from 'ethers/providers/etherscan-provider';

@@ -131,40 +40,5 @@ import { FallbackProvider } from 'ethers/providers/fallback-provider';

import { Web3Provider } from 'ethers/providers/web3-provider';
import { Provider as AbstractProvider } from 'ethers/providers/abstract-provider';
import { Network } from 'ethers/utils/networks';
function getDefaultProvider(network?: Network | string): Provider;
export { AbstractProvider, Provider, getDefaultProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider, JsonRpcSigner };
export { BaseProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider, JsonRpcSigner };
}
declare module 'ethers/providers/json-rpc-provider' {
import { Provider } from 'ethers/providers/provider';
import { Signer } from 'ethers/wallet/abstract-signer';
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
import { Networkish } from 'ethers/utils/networks';
import { ConnectionInfo } from 'ethers/utils/web';
import { BlockTag, TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';
export class JsonRpcSigner extends Signer {
readonly provider: JsonRpcProvider;
constructor(constructorGuard: any, provider: JsonRpcProvider, address?: string);
readonly address: string;
getAddress(): Promise<string>;
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
getTransactionCount(blockTag?: BlockTag): Promise<number>;
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
signMessage(message: Arrayish | string): Promise<string>;
unlock(password: string): Promise<boolean>;
}
export class JsonRpcProvider extends Provider {
readonly connection: ConnectionInfo;
constructor(url?: ConnectionInfo | string, network?: Networkish);
getSigner(address?: string): JsonRpcSigner;
listAccounts(): Promise<Array<string>>;
send(method: string, params: any): Promise<any>;
perform(method: string, params: any): Promise<any>;
protected _startPending(): void;
protected _stopPending(): void;
static hexlifyTransaction(transaction: TransactionRequest): any;
}
}
declare module 'ethers/wallet' {

@@ -174,6 +48,38 @@ import { Wallet } from 'ethers/wallet/wallet';

import { SigningKey } from 'ethers/wallet/signing-key';
import { Signer as AbstractSigner } from 'ethers/wallet/abstract-signer';
export { AbstractSigner, HDNode, SigningKey, Wallet };
export { HDNode, SigningKey, Wallet };
}
declare module 'ethers/utils/constants' {
export const constants: {
AddressZero: string;
HashZero: string;
EtherSymbol: string;
NegativeOne: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
Zero: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
One: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
Two: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
WeiPerEther: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
MaxUint256: import("../../../../../../../../Users/ricmoo/Development/ethers/ethers.ts/ethers.js/src.ts/utils/bignumber").BigNumber;
};
}
declare module 'ethers/utils/errors' {
export const UNKNOWN_ERROR = "UNKNOWN_ERROR";
export const NOT_IMPLEMENTED = "NOT_IMPLEMENTED";
export const MISSING_NEW = "MISSING_NEW";
export const CALL_EXCEPTION = "CALL_EXCEPTION";
export const INVALID_ARGUMENT = "INVALID_ARGUMENT";
export const MISSING_ARGUMENT = "MISSING_ARGUMENT";
export const UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT";
export const NUMERIC_FAULT = "NUMERIC_FAULT";
export const INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS";
export const NONCE_EXPIRED = "NONCE_EXPIRED";
export const REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED";
export const UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION";
export function throwError(message: string, code: string, params: any): never;
export function checkNew(self: any, kind: any): void;
export function checkArgumentCount(count: number, expectedCount: number, suffix?: string): void;
export function setCensorship(censorship: boolean, permanent?: boolean): void;
}
declare module 'ethers/utils' {

@@ -199,17 +105,25 @@ import { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType } from 'ethers/utils/abi-coder';

import { fetchJson } from 'ethers/utils/web';
import * as errors from 'ethers/utils/errors';
const etherSymbol = "\u039E";
const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: BigNumber;
Zero: BigNumber;
One: BigNumber;
Two: BigNumber;
WeiPerEther: BigNumber;
MaxUint256: BigNumber;
};
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, constants, RLP, fetchJson, getNetwork, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, etherSymbol, arrayify, concat, padZeros, stripZeros, base64, BigNumber, bigNumberify, hexlify, hexStripZeros, hexZeroPad, hexDataLength, hexDataSlice, toUtf8Bytes, toUtf8String, hashMessage, namehash, id, getAddress, getIcapAddress, getContractAddress, formatEther, parseEther, formatUnits, parseUnits, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computePublicKey, verifyMessage, errors };
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, RLP, fetchJson, getNetwork, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, arrayify, concat, padZeros, stripZeros, base64, BigNumber, bigNumberify, hexlify, hexStripZeros, hexZeroPad, hexDataLength, hexDataSlice, toUtf8Bytes, toUtf8String, hashMessage, namehash, id, getAddress, getIcapAddress, getContractAddress, formatEther, parseEther, formatUnits, parseUnits, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computePublicKey, verifyMessage };
}
declare module 'ethers/types' {
import { Provider } from 'ethers/providers/abstract-provider';
import { Signer } from 'ethers/wallet/abstract-signer';
import { ContractFunction, Event, EventFilter } from 'ethers/contracts/contract';
import { Indexed, DeployDescription, EventDescription, FunctionDescription, LogDescription, TransactionDescription } from 'ethers/contracts/interface';
import { Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';
import { AsyncSendable } from 'ethers/providers/web3-provider';
import { CoerceFunc, EventFragment, FunctionFragment, ParamType } from 'ethers/utils/abi-coder';
import { BigNumberish } from 'ethers/utils/bignumber';
import { Arrayish, Hexable, Signature } from 'ethers/utils/bytes';
import { SupportedAlgorithms } from 'ethers/utils/hmac';
import { Network, Networkish } from 'ethers/utils/networks';
import { Transaction, UnsignedTransaction } from 'ethers/utils/transaction';
import { UnicodeNormalizationForm } from 'ethers/utils/utf8';
import { ConnectionInfo, OnceBlockable, PollOptions } from 'ethers/utils/web';
import { EncryptOptions, ProgressCallback } from 'ethers/wallet/secret-storage';
import { Wordlist } from 'ethers/wordlists/wordlist';
export { Provider, Signer, ContractFunction, EventFilter, Event, Indexed, DeployDescription, EventDescription, FunctionDescription, LogDescription, TransactionDescription, BlockTag, EventType, Filter, Listener, TransactionRequest, Block, Log, TransactionReceipt, TransactionResponse, AsyncSendable, CoerceFunc, EventFragment, FunctionFragment, ParamType, BigNumberish, Arrayish, Hexable, Signature, SupportedAlgorithms, Network, Networkish, UnsignedTransaction, Transaction, UnicodeNormalizationForm, ConnectionInfo, OnceBlockable, PollOptions, EncryptOptions, ProgressCallback, Wordlist };
}
declare module 'ethers/wordlists' {

@@ -227,21 +141,2 @@ import { Wordlist } from 'ethers/wordlists/wordlist';

declare module 'ethers/utils/errors' {
export const UNKNOWN_ERROR = "UNKNOWN_ERROR";
export const NOT_IMPLEMENTED = "NOT_IMPLEMENTED";
export const MISSING_NEW = "MISSING_NEW";
export const CALL_EXCEPTION = "CALL_EXCEPTION";
export const INVALID_ARGUMENT = "INVALID_ARGUMENT";
export const MISSING_ARGUMENT = "MISSING_ARGUMENT";
export const UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT";
export const NUMERIC_FAULT = "NUMERIC_FAULT";
export const INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS";
export const NONCE_EXPIRED = "NONCE_EXPIRED";
export const REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED";
export const UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION";
export function throwError(message: string, code: string, params: any): never;
export function checkNew(self: any, kind: any): void;
export function checkArgumentCount(count: number, expectedCount: number, suffix?: string): void;
export function setCensorship(censorship: boolean, permanent?: boolean): void;
}
declare module 'ethers/utils/shims' {

@@ -252,121 +147,5 @@ export const platform = "node";

declare module 'ethers/_version' {
export const version = "4.0.0-beta.7";
export const version = "4.0.0-beta.8";
}
declare module 'ethers/providers/abstract-provider' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
import { BigNumberish } from 'ethers/utils/bignumber';
import { Network } from 'ethers/utils/networks';
import { OnceBlockable } from 'ethers/utils/web';
import { Transaction } from 'ethers/utils/transaction';
export interface Block {
hash: string;
parentHash: string;
number: number;
timestamp: number;
nonce: string;
difficulty: number;
gasLimit: BigNumber;
gasUsed: BigNumber;
miner: string;
extraData: string;
transactions: Array<string>;
}
export type BlockTag = string | number;
export type Filter = {
fromBlock?: BlockTag;
toBlock?: BlockTag;
address?: string;
topics?: Array<string | Array<string>>;
};
export interface Log {
blockNumber?: number;
blockHash?: string;
transactionIndex?: number;
removed?: boolean;
transactionLogIndex?: number;
address: string;
data: string;
topics: Array<string>;
transactionHash?: string;
logIndex?: number;
}
export interface TransactionReceipt {
contractAddress?: string;
transactionIndex?: number;
root?: string;
gasUsed?: BigNumber;
logsBloom?: string;
blockHash?: string;
transactionHash?: string;
logs?: Array<Log>;
blockNumber?: number;
cumulativeGasUsed?: BigNumber;
byzantium: boolean;
status?: number;
}
export type TransactionRequest = {
to?: string | Promise<string>;
from?: string | Promise<string>;
nonce?: number | string | Promise<number | string>;
gasLimit?: BigNumberish | Promise<BigNumberish>;
gasPrice?: BigNumberish | Promise<BigNumberish>;
data?: Arrayish | Promise<Arrayish>;
value?: BigNumberish | Promise<BigNumberish>;
chainId?: number | Promise<number>;
};
export interface TransactionResponse extends Transaction {
blockNumber?: number;
blockHash?: string;
timestamp?: number;
from: string;
raw?: string;
wait: (timeout?: number) => Promise<TransactionReceipt>;
}
export type EventType = string | Array<string> | Filter;
export type Listener = (...args: Array<any>) => void;
export abstract class Provider implements OnceBlockable {
abstract getNetwork(): Promise<Network>;
abstract getBlockNumber(): Promise<number>;
abstract getGasPrice(): Promise<BigNumber>;
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
abstract call(transaction: TransactionRequest): Promise<string>;
abstract estimateGas(transaction: TransactionRequest): Promise<BigNumber>;
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
abstract getLogs(filter: Filter): Promise<Array<Log>>;
abstract resolveName(name: string | Promise<string>): Promise<string>;
abstract lookupAddress(address: string | Promise<string>): Promise<string>;
abstract on(eventName: EventType, listener: Listener): Provider;
abstract once(eventName: EventType, listener: Listener): Provider;
abstract listenerCount(eventName?: EventType): number;
abstract listeners(eventName: EventType): Array<Listener>;
abstract removeAllListeners(eventName: EventType): Provider;
abstract removeListener(eventName: EventType, listener: Listener): Provider;
abstract waitForTransaction(transactionHash: string, timeout?: number): Promise<TransactionReceipt>;
constructor();
static isProvider(value: any): value is Provider;
}
}
declare module 'ethers/wallet/abstract-signer' {
import { Provider } from 'ethers/providers/abstract-provider';
import { Arrayish } from 'ethers/utils/bytes';
import { TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';
export abstract class Signer {
provider?: Provider;
abstract getAddress(): Promise<string>;
abstract signMessage(message: Arrayish | string): Promise<string>;
abstract sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
constructor();
static isSigner(value: any): value is Signer;
}
}
declare module 'ethers/contracts/contract' {

@@ -543,257 +322,5 @@ import { Indexed, Interface } from 'ethers/contracts/interface';

declare module 'ethers/providers/web3-provider' {
import { JsonRpcProvider } from 'ethers/providers/json-rpc-provider';
import { Networkish } from 'ethers/utils/networks';
export type AsyncSendable = {
isMetaMask?: boolean;
host?: string;
path?: string;
sendAsync?: (request: any, callback: (error: any, response: any) => void) => void;
send?: (request: any, callback: (error: any, response: any) => void) => void;
};
export class Web3Provider extends JsonRpcProvider {
readonly _web3Provider: AsyncSendable;
constructor(web3Provider: AsyncSendable, network?: Networkish);
send(method: string, params: any): Promise<any>;
}
}
declare module 'ethers/utils/abi-coder' {
declare module 'ethers/providers/base-provider' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
export type CoerceFunc = (type: string, value: any) => any;
export type ParamType = {
name?: string;
type: string;
indexed?: boolean;
components?: Array<any>;
};
export type EventFragment = {
type: string;
name: string;
anonymous: boolean;
inputs: Array<ParamType>;
};
export type FunctionFragment = {
type: string;
name: string;
constant: boolean;
inputs: Array<ParamType>;
outputs: Array<ParamType>;
payable: boolean;
stateMutability: string;
gas: BigNumber;
};
export const defaultCoerceFunc: CoerceFunc;
export function parseParamType(type: string): ParamType;
export function formatParamType(paramType: ParamType): string;
export function formatSignature(fragment: EventFragment | FunctionFragment): string;
export function parseSignature(fragment: string): EventFragment | FunctionFragment;
export class AbiCoder {
readonly coerceFunc: CoerceFunc;
constructor(coerceFunc?: CoerceFunc);
encode(types: Array<string | ParamType>, values: Array<any>): string;
decode(types: Array<string | ParamType>, data: Arrayish): any;
}
export const defaultAbiCoder: AbiCoder;
}
declare module 'ethers/utils/bignumber' {
import { Hexable } from 'ethers/utils/bytes';
import { Arrayish } from 'ethers/utils/bytes';
export type BigNumberish = BigNumber | string | number | Arrayish;
export class BigNumber implements Hexable {
constructor(value: BigNumberish);
fromTwos(value: number): BigNumber;
toTwos(value: number): BigNumber;
add(other: BigNumberish): BigNumber;
sub(other: BigNumberish): BigNumber;
div(other: BigNumberish): BigNumber;
mul(other: BigNumberish): BigNumber;
mod(other: BigNumberish): BigNumber;
pow(other: BigNumberish): BigNumber;
maskn(value: number): BigNumber;
eq(other: BigNumberish): boolean;
lt(other: BigNumberish): boolean;
lte(other: BigNumberish): boolean;
gt(other: BigNumberish): boolean;
gte(other: BigNumberish): boolean;
isZero(): boolean;
toNumber(): number;
toString(): string;
toHexString(): string;
static isBigNumber(value: any): value is BigNumber;
}
export function bigNumberify(value: BigNumberish): BigNumber;
export const ConstantNegativeOne: BigNumber;
export const ConstantZero: BigNumber;
export const ConstantOne: BigNumber;
export const ConstantTwo: BigNumber;
export const ConstantWeiPerEther: BigNumber;
export const ConstantMaxUint256: BigNumber;
}
declare module 'ethers/utils/bytes' {
/**
* Conversion Utilities
*
*/
import { Arrayish } from 'ethers/utils/bytes';
export type Arrayish = string | ArrayLike<number>;
export interface Hexable {
toHexString(): string;
}
export interface Signature {
r: string;
s: string;
recoveryParam?: number;
v?: number;
}
export const AddressZero = "0x0000000000000000000000000000000000000000";
export const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
export function isHexable(value: any): value is Hexable;
export function isArrayish(value: any): value is Arrayish;
export function arrayify(value: Arrayish | Hexable): Uint8Array;
export function concat(objects: Array<Arrayish>): Uint8Array;
export function stripZeros(value: Arrayish): Uint8Array;
export function padZeros(value: Arrayish, length: number): Uint8Array;
export function isHexString(value: any, length?: number): boolean;
export function hexlify(value: Arrayish | Hexable | number): string;
export function hexDataLength(data: string): number;
export function hexDataSlice(data: string, offset: number, length?: number): string;
export function hexStripZeros(value: string): string;
export function hexZeroPad(value: string, length: number): string;
export function splitSignature(signature: Arrayish | Signature): Signature;
export function joinSignature(signature: Signature): string;
}
declare module 'ethers/utils/hmac' {
import { Arrayish } from 'ethers/utils/bytes';
export enum SupportedAlgorithms {
sha256 = "sha256",
sha512 = "sha512"
}
export function computeHmac(algorithm: SupportedAlgorithms, key: Arrayish, data: Arrayish): Uint8Array;
}
declare module 'ethers/utils/networks' {
export type Network = {
name: string;
chainId: number;
ensAddress?: string;
};
export type Networkish = Network | string | number;
/**
* getNetwork
*
* Converts a named common networks or chain ID (network ID) to a Network
* and verifies a network is a valid Network..
*/
export function getNetwork(network: Networkish): Network;
}
declare module 'ethers/utils/transaction' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish, Signature } from 'ethers/utils/bytes';
import { BigNumberish } from 'ethers/utils/bignumber';
export type UnsignedTransaction = {
to?: string;
nonce?: number;
gasLimit?: BigNumberish;
gasPrice?: BigNumberish;
data?: Arrayish;
value?: BigNumberish;
chainId?: number;
};
export interface Transaction {
hash?: string;
to?: string;
from?: string;
nonce: number;
gasLimit: BigNumber;
gasPrice: BigNumber;
data: string;
value: BigNumber;
chainId: number;
r?: string;
s?: string;
v?: number;
}
export function serialize(transaction: UnsignedTransaction, signature?: Arrayish | Signature): string;
export function parse(rawTransaction: Arrayish): Transaction;
}
declare module 'ethers/utils/utf8' {
import { Arrayish } from 'ethers/utils/bytes';
export enum UnicodeNormalizationForm {
current = "",
NFC = "NFC",
NFD = "NFD",
NFKC = "NFKC",
NFKD = "NFKD"
}
export function toUtf8Bytes(str: string, form?: UnicodeNormalizationForm): Uint8Array;
export function toUtf8String(bytes: Arrayish): string;
}
declare module 'ethers/utils/web' {
export type ConnectionInfo = {
url: string;
user?: string;
password?: string;
allowInsecure?: boolean;
};
export interface OnceBlockable {
once(eventName: "block", handler: () => void): void;
}
export type PollOptions = {
timeout?: number;
floor?: number;
ceiling?: number;
interval?: number;
onceBlock?: OnceBlockable;
};
export function fetchJson(connection: string | ConnectionInfo, json: string, processFunc: (value: any) => any): Promise<any>;
export function poll(func: () => Promise<any>, options?: PollOptions): Promise<any>;
}
declare module 'ethers/wallet/secret-storage' {
import { SigningKey } from 'ethers/wallet/signing-key';
import { Arrayish } from 'ethers/utils/bytes';
export type ProgressCallback = (percent: number) => void;
export type EncryptOptions = {
iv?: Arrayish;
entropy?: Arrayish;
mnemonic?: string;
path?: string;
client?: string;
salt?: Arrayish;
uuid?: string;
scrypt?: {
N?: number;
r?: number;
p?: number;
};
};
export function decryptCrowdsale(json: string, password: Arrayish | string): SigningKey;
export function decrypt(json: string, password: Arrayish, progressCallback?: ProgressCallback): Promise<SigningKey>;
export function encrypt(privateKey: Arrayish | SigningKey, password: Arrayish | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise<string>;
}
declare module 'ethers/wordlists/wordlist' {
export function check(wordlist: Wordlist): string;
export abstract class Wordlist {
readonly locale: string;
constructor(locale: string);
abstract getWord(index: number): string;
abstract getWordIndex(word: string): number;
split(mnemonic: string): Array<string>;
join(words: Array<string>): string;
}
export function register(lang: Wordlist, name?: string): void;
}
declare module 'ethers/providers/provider' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Provider as AbstractProvider } from 'ethers/providers/abstract-provider';
import { Provider } from 'ethers/providers/abstract-provider';
import { Block, BlockTag, EventType, Filter, Listener, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';

@@ -803,3 +330,3 @@ import { BigNumberish } from 'ethers/utils/bignumber';

import { Network, Networkish } from 'ethers/utils/networks';
export class Provider extends AbstractProvider {
export class BaseProvider extends Provider {
protected _emitted: any;

@@ -858,6 +385,6 @@ /**

declare module 'ethers/providers/etherscan-provider' {
import { Provider } from 'ethers/providers/provider';
import { BaseProvider } from 'ethers/providers/base-provider';
import { BlockTag, TransactionResponse } from 'ethers/providers/abstract-provider';
import { Networkish } from 'ethers/utils/networks';
export class EtherscanProvider extends Provider {
export class EtherscanProvider extends BaseProvider {
readonly baseUrl: string;

@@ -872,6 +399,6 @@ readonly apiKey: string;

declare module 'ethers/providers/fallback-provider' {
import { Provider } from 'ethers/providers/provider';
export class FallbackProvider extends Provider {
constructor(providers: Array<Provider>);
readonly providers: Array<Provider>;
import { BaseProvider } from 'ethers/providers/base-provider';
export class FallbackProvider extends BaseProvider {
constructor(providers: Array<BaseProvider>);
readonly providers: Array<BaseProvider>;
perform(method: string, params: any): any;

@@ -903,2 +430,51 @@ }

declare module 'ethers/providers/json-rpc-provider' {
import { BaseProvider } from 'ethers/providers/base-provider';
import { Signer } from 'ethers/wallet/abstract-signer';
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
import { Networkish } from 'ethers/utils/networks';
import { ConnectionInfo } from 'ethers/utils/web';
import { BlockTag, TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';
export class JsonRpcSigner extends Signer {
readonly provider: JsonRpcProvider;
constructor(constructorGuard: any, provider: JsonRpcProvider, address?: string);
readonly address: string;
getAddress(): Promise<string>;
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
getTransactionCount(blockTag?: BlockTag): Promise<number>;
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
signMessage(message: Arrayish | string): Promise<string>;
unlock(password: string): Promise<boolean>;
}
export class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo;
constructor(url?: ConnectionInfo | string, network?: Networkish);
getSigner(address?: string): JsonRpcSigner;
listAccounts(): Promise<Array<string>>;
send(method: string, params: any): Promise<any>;
perform(method: string, params: any): Promise<any>;
protected _startPending(): void;
protected _stopPending(): void;
static hexlifyTransaction(transaction: TransactionRequest): any;
}
}
declare module 'ethers/providers/web3-provider' {
import { JsonRpcProvider } from 'ethers/providers/json-rpc-provider';
import { Networkish } from 'ethers/utils/networks';
export type AsyncSendable = {
isMetaMask?: boolean;
host?: string;
path?: string;
sendAsync?: (request: any, callback: (error: any, response: any) => void) => void;
send?: (request: any, callback: (error: any, response: any) => void) => void;
};
export class Web3Provider extends JsonRpcProvider {
readonly _web3Provider: AsyncSendable;
constructor(web3Provider: AsyncSendable, network?: Networkish);
send(method: string, params: any): Promise<any>;
}
}
declare module 'ethers/wallet/wallet' {

@@ -992,2 +568,42 @@ import { HDNode } from 'ethers/wallet/hdnode';

declare module 'ethers/utils/abi-coder' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
export type CoerceFunc = (type: string, value: any) => any;
export type ParamType = {
name?: string;
type: string;
indexed?: boolean;
components?: Array<any>;
};
export type EventFragment = {
type: string;
name: string;
anonymous: boolean;
inputs: Array<ParamType>;
};
export type FunctionFragment = {
type: string;
name: string;
constant: boolean;
inputs: Array<ParamType>;
outputs: Array<ParamType>;
payable: boolean;
stateMutability: string;
gas: BigNumber;
};
export const defaultCoerceFunc: CoerceFunc;
export function parseParamType(type: string): ParamType;
export function formatParamType(paramType: ParamType): string;
export function formatSignature(fragment: EventFragment | FunctionFragment): string;
export function parseSignature(fragment: string): EventFragment | FunctionFragment;
export class AbiCoder {
readonly coerceFunc: CoerceFunc;
constructor(coerceFunc?: CoerceFunc);
encode(types: Array<string | ParamType>, values: Array<any>): string;
decode(types: Array<string | ParamType>, data: Arrayish): any;
}
export const defaultAbiCoder: AbiCoder;
}
declare module 'ethers/utils/address' {

@@ -1010,2 +626,69 @@ import { BigNumber } from 'ethers/utils/bignumber';

declare module 'ethers/utils/bignumber' {
import { Hexable } from 'ethers/utils/bytes';
import { Arrayish } from 'ethers/utils/bytes';
export type BigNumberish = BigNumber | string | number | Arrayish;
export class BigNumber implements Hexable {
constructor(value: BigNumberish);
fromTwos(value: number): BigNumber;
toTwos(value: number): BigNumber;
add(other: BigNumberish): BigNumber;
sub(other: BigNumberish): BigNumber;
div(other: BigNumberish): BigNumber;
mul(other: BigNumberish): BigNumber;
mod(other: BigNumberish): BigNumber;
pow(other: BigNumberish): BigNumber;
maskn(value: number): BigNumber;
eq(other: BigNumberish): boolean;
lt(other: BigNumberish): boolean;
lte(other: BigNumberish): boolean;
gt(other: BigNumberish): boolean;
gte(other: BigNumberish): boolean;
isZero(): boolean;
toNumber(): number;
toString(): string;
toHexString(): string;
static isBigNumber(value: any): value is BigNumber;
}
export function bigNumberify(value: BigNumberish): BigNumber;
export const ConstantNegativeOne: BigNumber;
export const ConstantZero: BigNumber;
export const ConstantOne: BigNumber;
export const ConstantTwo: BigNumber;
export const ConstantWeiPerEther: BigNumber;
export const ConstantMaxUint256: BigNumber;
}
declare module 'ethers/utils/bytes' {
/**
* Conversion Utilities
*
*/
import { Arrayish } from 'ethers/utils/bytes';
export type Arrayish = string | ArrayLike<number>;
export interface Hexable {
toHexString(): string;
}
export interface Signature {
r: string;
s: string;
recoveryParam?: number;
v?: number;
}
export function isHexable(value: any): value is Hexable;
export function isArrayish(value: any): value is Arrayish;
export function arrayify(value: Arrayish | Hexable): Uint8Array;
export function concat(objects: Array<Arrayish>): Uint8Array;
export function stripZeros(value: Arrayish): Uint8Array;
export function padZeros(value: Arrayish, length: number): Uint8Array;
export function isHexString(value: any, length?: number): boolean;
export function hexlify(value: Arrayish | Hexable | number): string;
export function hexDataLength(data: string): number;
export function hexDataSlice(data: string, offset: number, length?: number): string;
export function hexStripZeros(value: string): string;
export function hexZeroPad(value: string, length: number): string;
export function splitSignature(signature: Arrayish | Signature): Signature;
export function joinSignature(signature: Signature): string;
}
declare module 'ethers/utils/hash' {

@@ -1045,2 +728,18 @@ import { Arrayish } from 'ethers/utils/bytes';

declare module 'ethers/utils/networks' {
export type Network = {
name: string;
chainId: number;
ensAddress?: string;
};
export type Networkish = Network | string | number;
/**
* getNetwork
*
* Converts a named common networks or chain ID (network ID) to a Network
* and verifies a network is a valid Network..
*/
export function getNetwork(network: Networkish): Network;
}
declare module 'ethers/utils/properties' {

@@ -1080,2 +779,46 @@ export function defineReadOnly(object: any, name: string, value: any): void;

declare module 'ethers/utils/transaction' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish, Signature } from 'ethers/utils/bytes';
import { BigNumberish } from 'ethers/utils/bignumber';
export type UnsignedTransaction = {
to?: string;
nonce?: number;
gasLimit?: BigNumberish;
gasPrice?: BigNumberish;
data?: Arrayish;
value?: BigNumberish;
chainId?: number;
};
export interface Transaction {
hash?: string;
to?: string;
from?: string;
nonce: number;
gasLimit: BigNumber;
gasPrice: BigNumber;
data: string;
value: BigNumber;
chainId: number;
r?: string;
s?: string;
v?: number;
}
export function serialize(transaction: UnsignedTransaction, signature?: Arrayish | Signature): string;
export function parse(rawTransaction: Arrayish): Transaction;
}
declare module 'ethers/utils/utf8' {
import { Arrayish } from 'ethers/utils/bytes';
export enum UnicodeNormalizationForm {
current = "",
NFC = "NFC",
NFD = "NFD",
NFKC = "NFKC",
NFKD = "NFKD"
}
export function toUtf8Bytes(str: string, form?: UnicodeNormalizationForm): Uint8Array;
export function toUtf8String(bytes: Arrayish): string;
}
declare module 'ethers/utils/units' {

@@ -1090,1 +833,183 @@ import { BigNumber } from 'ethers/utils/bignumber';

declare module 'ethers/utils/web' {
export type ConnectionInfo = {
url: string;
user?: string;
password?: string;
allowInsecure?: boolean;
};
export interface OnceBlockable {
once(eventName: "block", handler: () => void): void;
}
export type PollOptions = {
timeout?: number;
floor?: number;
ceiling?: number;
interval?: number;
onceBlock?: OnceBlockable;
};
export function fetchJson(connection: string | ConnectionInfo, json: string, processFunc: (value: any) => any): Promise<any>;
export function poll(func: () => Promise<any>, options?: PollOptions): Promise<any>;
}
declare module 'ethers/providers/abstract-provider' {
import { BigNumber } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes';
import { BigNumberish } from 'ethers/utils/bignumber';
import { Network } from 'ethers/utils/networks';
import { OnceBlockable } from 'ethers/utils/web';
import { Transaction } from 'ethers/utils/transaction';
export interface Block {
hash: string;
parentHash: string;
number: number;
timestamp: number;
nonce: string;
difficulty: number;
gasLimit: BigNumber;
gasUsed: BigNumber;
miner: string;
extraData: string;
transactions: Array<string>;
}
export type BlockTag = string | number;
export type Filter = {
fromBlock?: BlockTag;
toBlock?: BlockTag;
address?: string;
topics?: Array<string | Array<string>>;
};
export interface Log {
blockNumber?: number;
blockHash?: string;
transactionIndex?: number;
removed?: boolean;
transactionLogIndex?: number;
address: string;
data: string;
topics: Array<string>;
transactionHash?: string;
logIndex?: number;
}
export interface TransactionReceipt {
contractAddress?: string;
transactionIndex?: number;
root?: string;
gasUsed?: BigNumber;
logsBloom?: string;
blockHash?: string;
transactionHash?: string;
logs?: Array<Log>;
blockNumber?: number;
cumulativeGasUsed?: BigNumber;
byzantium: boolean;
status?: number;
}
export type TransactionRequest = {
to?: string | Promise<string>;
from?: string | Promise<string>;
nonce?: number | string | Promise<number | string>;
gasLimit?: BigNumberish | Promise<BigNumberish>;
gasPrice?: BigNumberish | Promise<BigNumberish>;
data?: Arrayish | Promise<Arrayish>;
value?: BigNumberish | Promise<BigNumberish>;
chainId?: number | Promise<number>;
};
export interface TransactionResponse extends Transaction {
blockNumber?: number;
blockHash?: string;
timestamp?: number;
from: string;
raw?: string;
wait: (timeout?: number) => Promise<TransactionReceipt>;
}
export type EventType = string | Array<string> | Filter;
export type Listener = (...args: Array<any>) => void;
export abstract class Provider implements OnceBlockable {
abstract getNetwork(): Promise<Network>;
abstract getBlockNumber(): Promise<number>;
abstract getGasPrice(): Promise<BigNumber>;
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
abstract call(transaction: TransactionRequest): Promise<string>;
abstract estimateGas(transaction: TransactionRequest): Promise<BigNumber>;
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
abstract getLogs(filter: Filter): Promise<Array<Log>>;
abstract resolveName(name: string | Promise<string>): Promise<string>;
abstract lookupAddress(address: string | Promise<string>): Promise<string>;
abstract on(eventName: EventType, listener: Listener): Provider;
abstract once(eventName: EventType, listener: Listener): Provider;
abstract listenerCount(eventName?: EventType): number;
abstract listeners(eventName: EventType): Array<Listener>;
abstract removeAllListeners(eventName: EventType): Provider;
abstract removeListener(eventName: EventType, listener: Listener): Provider;
abstract waitForTransaction(transactionHash: string, timeout?: number): Promise<TransactionReceipt>;
constructor();
static isProvider(value: any): value is Provider;
}
}
declare module 'ethers/wallet/abstract-signer' {
import { Provider } from 'ethers/providers/abstract-provider';
import { Arrayish } from 'ethers/utils/bytes';
import { TransactionRequest, TransactionResponse } from 'ethers/providers/abstract-provider';
export abstract class Signer {
provider?: Provider;
abstract getAddress(): Promise<string>;
abstract signMessage(message: Arrayish | string): Promise<string>;
abstract sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
constructor();
static isSigner(value: any): value is Signer;
}
}
declare module 'ethers/utils/hmac' {
import { Arrayish } from 'ethers/utils/bytes';
export enum SupportedAlgorithms {
sha256 = "sha256",
sha512 = "sha512"
}
export function computeHmac(algorithm: SupportedAlgorithms, key: Arrayish, data: Arrayish): Uint8Array;
}
declare module 'ethers/wallet/secret-storage' {
import { SigningKey } from 'ethers/wallet/signing-key';
import { Arrayish } from 'ethers/utils/bytes';
export type ProgressCallback = (percent: number) => void;
export type EncryptOptions = {
iv?: Arrayish;
entropy?: Arrayish;
mnemonic?: string;
path?: string;
client?: string;
salt?: Arrayish;
uuid?: string;
scrypt?: {
N?: number;
r?: number;
p?: number;
};
};
export function decryptCrowdsale(json: string, password: Arrayish | string): SigningKey;
export function decrypt(json: string, password: Arrayish, progressCallback?: ProgressCallback): Promise<SigningKey>;
export function encrypt(privateKey: Arrayish | SigningKey, password: Arrayish | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise<string>;
}
declare module 'ethers/wordlists/wordlist' {
export function check(wordlist: Wordlist): string;
export abstract class Wordlist {
readonly locale: string;
constructor(locale: string);
abstract getWord(index: number): string;
abstract getWordIndex(word: string): number;
split(mnemonic: string): Array<string>;
join(words: Array<string>): string;
}
export function register(lang: Wordlist, name?: string): void;
}
import { Contract, Interface } from './contracts';
import { Provider, getDefaultProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider } from './providers';
import { JsonRpcSigner } from './providers/json-rpc-provider';
import * as providers from './providers';
import { HDNode, SigningKey, Wallet } from './wallet';
import { constants } from './utils/constants';
import * as errors from './utils/errors';
import * as utils from './utils';
import * as types from './types';
import * as wordlists from './wordlists';
import * as errors from './utils/errors';
import { platform } from './utils/shims';
import { version } from './_version';
import { Provider as _AbstractProvider } from './providers/abstract-provider';
import { Signer as _AbstractSigner } from './wallet/abstract-signer';
import { ContractFunction as _ContractFunction, Event as _Event, EventFilter as _EventFilter } from './contracts/contract';
import { Indexed as _Indexed, DeployDescription as _DeplyDescription, EventDescription as _EventDescription, FunctionDescription as _FunctionDescription, LogDescription as _LogDescription, TransactionDescription as _TransactionDescription } from './contracts/interface';
import { Block as _Block, BlockTag as _BlockTag, EventType as _EventType, Filter as _Filter, Log as _Log, Listener as _Listener, TransactionReceipt as _TransactionReceipt, TransactionRequest as _TransactionRequest, TransactionResponse as _TransactionResponse } from './providers/abstract-provider';
import { AsyncSendable as _AsyncSendable } from './providers/web3-provider';
import { CoerceFunc as _CoerceFunc, EventFragment as _EventFragment, FunctionFragment as _FunctionFragment, ParamType as _ParamType } from './utils/abi-coder';
import { BigNumberish as _BigNumberish } from './utils/bignumber';
import { Arrayish as _Arrayish, Hexable as _Hexable, Signature as _Signature } from './utils/bytes';
import { SupportedAlgorithms as _SupportedAlgorithms } from './utils/hmac';
import { Network as _Network, Networkish as _Networkish } from './utils/networks';
import { Transaction as _Transaction, UnsignedTransaction as _UnsignedTransaction } from './utils/transaction';
import { UnicodeNormalizationForm as _UnicodeNotmalizationForm } from './utils/utf8';
import { ConnectionInfo as _ConnectionInfo, OnceBlockable as _OnceBlockable, PollOptions as _PollOptions } from './utils/web';
import { EncryptOptions as _EncryptOptions, ProgressCallback as _ProgressCallback } from './wallet/secret-storage';
import { Wordlist as _Wordlist } from './wordlists/wordlist';
declare module types {
const AbstractSigner: typeof _AbstractSigner;
const AbstractProvider: typeof _AbstractProvider;
type SignerOrProvider = _AbstractSigner | _AbstractProvider;
type ContractFunction = _ContractFunction;
type EventFilter = _EventFilter;
interface Event extends _Event {
}
interface Indexed extends _Indexed {
}
interface DeployDescription extends _DeplyDescription {
}
interface EventDescription extends _EventDescription {
}
interface FunctionDescription extends _FunctionDescription {
}
interface LogDescription extends _LogDescription {
}
interface TransactionDescription extends _TransactionDescription {
}
type BlockTag = _BlockTag;
type EventType = _EventType;
type Filter = _Filter;
type Listener = _Listener;
type TransactionRequest = _TransactionRequest;
interface Block extends _Block {
}
interface Log extends _Log {
}
interface TransactionReceipt extends _TransactionReceipt {
}
interface TransactionResponse extends _TransactionResponse {
}
type AsyncSendable = _AsyncSendable;
type CoerceFunc = _CoerceFunc;
type EventFragment = _EventFragment;
type FunctionFragment = _FunctionFragment;
type ParamType = _ParamType;
type BigNumberish = _BigNumberish;
type Arrayish = _Arrayish;
type Hexable = _Hexable;
type Signature = _Signature;
const SupportedAlgorithms: typeof _SupportedAlgorithms;
type Network = _Network;
type Networkish = _Networkish;
type UnsignedTransaction = _UnsignedTransaction;
interface Transaction extends _Transaction {
}
const UnicodeNormalizationForm: typeof _UnicodeNotmalizationForm;
type ConnectionInfo = _ConnectionInfo;
interface OnceBlockable extends _OnceBlockable {
}
type PollOptions = _PollOptions;
type EncryptOptions = _EncryptOptions;
type ProgressCallback = _ProgressCallback;
const Wordlist: typeof _Wordlist;
}
declare const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: utils.BigNumber;
Zero: utils.BigNumber;
One: utils.BigNumber;
Two: utils.BigNumber;
WeiPerEther: utils.BigNumber;
MaxUint256: utils.BigNumber;
};
declare const providers: {
Provider: typeof Provider;
FallbackProvider: typeof FallbackProvider;
EtherscanProvider: typeof EtherscanProvider;
InfuraProvider: typeof InfuraProvider;
IpcProvider: typeof IpcProvider;
JsonRpcProvider: typeof JsonRpcProvider;
Web3Provider: typeof Web3Provider;
JsonRpcSigner: typeof JsonRpcSigner;
};
declare function getDefaultProvider(network?: types.Network | string): providers.BaseProvider;
export { Wallet, HDNode, SigningKey, Contract, Interface, getDefaultProvider, providers, errors, constants, utils, types, wordlists, platform, version };

@@ -13,5 +13,4 @@ 'use strict';

exports.Interface = contracts_1.Interface;
var providers_1 = require("./providers");
exports.getDefaultProvider = providers_1.getDefaultProvider;
var json_rpc_provider_1 = require("./providers/json-rpc-provider");
var providers = __importStar(require("./providers"));
exports.providers = providers;
var wallet_1 = require("./wallet");

@@ -21,8 +20,12 @@ exports.HDNode = wallet_1.HDNode;

exports.Wallet = wallet_1.Wallet;
var constants_1 = require("./utils/constants");
exports.constants = constants_1.constants;
var errors = __importStar(require("./utils/errors"));
exports.errors = errors;
var utils = __importStar(require("./utils"));
exports.utils = utils;
var types = __importStar(require("./types"));
exports.types = types;
var wordlists = __importStar(require("./wordlists"));
exports.wordlists = wordlists;
var errors = __importStar(require("./utils/errors"));
exports.errors = errors;
// This is empty in node, and used by browserify to inject extra goodies

@@ -34,48 +37,8 @@ var shims_1 = require("./utils/shims");

exports.version = _version_1.version;
///////////////////////////////
// Imported Abstracts
var abstract_provider_1 = require("./providers/abstract-provider");
var abstract_signer_1 = require("./wallet/abstract-signer");
var hmac_1 = require("./utils/hmac");
var utf8_1 = require("./utils/utf8");
var wordlist_1 = require("./wordlists/wordlist");
///////////////////////////////
// Exported Types
var types;
(function (types) {
types.AbstractSigner = abstract_signer_1.Signer;
types.AbstractProvider = abstract_provider_1.Provider;
;
;
;
;
;
;
;
;
;
;
// ./utils/hmac
types.SupportedAlgorithms = hmac_1.SupportedAlgorithms;
;
// ./utils/utf8
types.UnicodeNormalizationForm = utf8_1.UnicodeNormalizationForm;
;
// ./wordlists/wordlist
types.Wordlist = wordlist_1.Wordlist;
})(types || (types = {}));
exports.types = types;
///////////////////////////////
var constants = utils.constants;
exports.constants = constants;
var providers = {
Provider: providers_1.Provider,
FallbackProvider: providers_1.FallbackProvider,
EtherscanProvider: providers_1.EtherscanProvider,
InfuraProvider: providers_1.InfuraProvider,
IpcProvider: providers_1.IpcProvider,
JsonRpcProvider: providers_1.JsonRpcProvider,
Web3Provider: providers_1.Web3Provider,
JsonRpcSigner: json_rpc_provider_1.JsonRpcSigner
};
exports.providers = providers;
function getDefaultProvider(network) {
return new providers.FallbackProvider([
new providers.InfuraProvider(network),
new providers.EtherscanProvider(network),
]);
}
exports.getDefaultProvider = getDefaultProvider;
{
"name": "ethers",
"version": "4.0.0-beta.7",
"version": "4.0.0-beta.8",
"description": "Ethereum wallet library.",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -1,5 +0,5 @@

import { Provider } from './provider';
import { BaseProvider } from './base-provider';
import { BlockTag, TransactionResponse } from './abstract-provider';
import { Networkish } from '../utils/networks';
export declare class EtherscanProvider extends Provider {
export declare class EtherscanProvider extends BaseProvider {
readonly baseUrl: string;

@@ -6,0 +6,0 @@ readonly apiKey: string;

@@ -20,3 +20,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var provider_1 = require("./provider");
var base_provider_1 = require("./base-provider");
var bytes_1 = require("../utils/bytes");

@@ -292,3 +292,3 @@ var properties_1 = require("../utils/properties");

}
var item = provider_1.Provider.checkTransactionResponse(tx);
var item = base_provider_1.BaseProvider.checkTransactionResponse(tx);
if (tx.timeStamp) {

@@ -304,3 +304,3 @@ item.timestamp = parseInt(tx.timeStamp);

return EtherscanProvider;
}(provider_1.Provider));
}(base_provider_1.BaseProvider));
exports.EtherscanProvider = EtherscanProvider;

@@ -1,7 +0,7 @@

import { Provider } from './provider';
export declare class FallbackProvider extends Provider {
import { BaseProvider } from './base-provider';
export declare class FallbackProvider extends BaseProvider {
private _providers;
constructor(providers: Array<Provider>);
readonly providers: Array<Provider>;
constructor(providers: Array<BaseProvider>);
readonly providers: Array<BaseProvider>;
perform(method: string, params: any): any;
}

@@ -20,3 +20,3 @@ 'use strict';

Object.defineProperty(exports, "__esModule", { value: true });
var provider_1 = require("./provider");
var base_provider_1 = require("./base-provider");
var errors = __importStar(require("../utils/errors"));

@@ -110,3 +110,3 @@ // Returns:

return FallbackProvider;
}(provider_1.Provider));
}(base_provider_1.BaseProvider));
exports.FallbackProvider = FallbackProvider;

@@ -1,2 +0,2 @@

import { Provider } from './provider';
import { BaseProvider } from './base-provider';
import { EtherscanProvider } from './etherscan-provider';

@@ -8,5 +8,2 @@ import { FallbackProvider } from './fallback-provider';

import { Web3Provider } from './web3-provider';
import { Provider as AbstractProvider } from './abstract-provider';
import { Network } from '../utils/networks';
declare function getDefaultProvider(network?: Network | string): Provider;
export { AbstractProvider, Provider, getDefaultProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider, JsonRpcSigner };
export { BaseProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider, JsonRpcSigner };
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var provider_1 = require("./provider");
exports.Provider = provider_1.Provider;
var base_provider_1 = require("./base-provider");
exports.BaseProvider = base_provider_1.BaseProvider;
var etherscan_provider_1 = require("./etherscan-provider");

@@ -18,13 +18,1 @@ exports.EtherscanProvider = etherscan_provider_1.EtherscanProvider;

exports.Web3Provider = web3_provider_1.Web3Provider;
///////////////////////////////
// Imported Abstracts
var abstract_provider_1 = require("./abstract-provider");
exports.AbstractProvider = abstract_provider_1.Provider;
///////////////////////////////
function getDefaultProvider(network) {
return new fallback_provider_1.FallbackProvider([
new infura_provider_1.InfuraProvider(network),
new etherscan_provider_1.EtherscanProvider(network),
]);
}
exports.getDefaultProvider = getDefaultProvider;

@@ -1,2 +0,2 @@

import { Provider } from './provider';
import { BaseProvider } from './base-provider';
import { Signer } from '../wallet/abstract-signer';

@@ -20,3 +20,3 @@ import { BigNumber } from '../utils/bignumber';

}
export declare class JsonRpcProvider extends Provider {
export declare class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo;

@@ -23,0 +23,0 @@ private _pendingFilter;

@@ -21,3 +21,3 @@ 'use strict';

// See: https://github.com/ethereum/wiki/wiki/JSON-RPC
var provider_1 = require("./provider");
var base_provider_1 = require("./base-provider");
var abstract_signer_1 = require("../wallet/abstract-signer");

@@ -348,3 +348,3 @@ var address_1 = require("../utils/address");

return JsonRpcProvider;
}(provider_1.Provider));
}(base_provider_1.BaseProvider));
exports.JsonRpcProvider = JsonRpcProvider;

@@ -1,16 +0,17 @@

export { ContractFunction, Event, EventFilter } from './contracts/contract';
export { Indexed, DeployDescription, EventDescription, FunctionDescription, LogDescription, TransactionDescription } from './contracts/interface';
export { Provider as AbstractProvider, Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, } from './providers/abstract-provider';
export { AsyncSendable } from './providers/web3-provider';
export { JsonRpcSigner } from './providers/json-rpc-provider';
export { CoerceFunc, EventFragment, FunctionFragment, ParamType } from './utils/abi-coder';
export { BigNumberish } from './utils/bignumber';
export { Arrayish, Hexable, Signature } from './utils/bytes';
export { SupportedAlgorithms } from './utils/hmac';
export { Network, Networkish } from './utils/networks';
export { Transaction, UnsignedTransaction } from './utils/transaction';
export { UnicodeNormalizationForm } from './utils/utf8';
export { ConnectionInfo, OnceBlockable, PollOptions } from './utils/web';
export { Signer as AbstractSigner } from './wallet/abstract-signer';
export { EncryptOptions, ProgressCallback } from './wallet/secret-storage';
export { Wordlist } from './wordlists/wordlist';
import { Provider } from './providers/abstract-provider';
import { Signer } from './wallet/abstract-signer';
import { ContractFunction, Event, EventFilter } from './contracts/contract';
import { Indexed, DeployDescription, EventDescription, FunctionDescription, LogDescription, TransactionDescription } from './contracts/interface';
import { Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse } from './providers/abstract-provider';
import { AsyncSendable } from './providers/web3-provider';
import { CoerceFunc, EventFragment, FunctionFragment, ParamType } from './utils/abi-coder';
import { BigNumberish } from './utils/bignumber';
import { Arrayish, Hexable, Signature } from './utils/bytes';
import { SupportedAlgorithms } from './utils/hmac';
import { Network, Networkish } from './utils/networks';
import { Transaction, UnsignedTransaction } from './utils/transaction';
import { UnicodeNormalizationForm } from './utils/utf8';
import { ConnectionInfo, OnceBlockable, PollOptions } from './utils/web';
import { EncryptOptions, ProgressCallback } from './wallet/secret-storage';
import { Wordlist } from './wordlists/wordlist';
export { Provider, Signer, ContractFunction, EventFilter, Event, Indexed, DeployDescription, EventDescription, FunctionDescription, LogDescription, TransactionDescription, BlockTag, EventType, Filter, Listener, TransactionRequest, Block, Log, TransactionReceipt, TransactionResponse, AsyncSendable, CoerceFunc, EventFragment, FunctionFragment, ParamType, BigNumberish, Arrayish, Hexable, Signature, SupportedAlgorithms, Network, Networkish, UnsignedTransaction, Transaction, UnicodeNormalizationForm, ConnectionInfo, OnceBlockable, PollOptions, EncryptOptions, ProgressCallback, Wordlist };
"use strict";
///////////////////////////////
// Imported Abstracts
Object.defineProperty(exports, "__esModule", { value: true });
var abstract_provider_1 = require("./providers/abstract-provider");
exports.AbstractProvider = abstract_provider_1.Provider;
var json_rpc_provider_1 = require("./providers/json-rpc-provider");
exports.JsonRpcSigner = json_rpc_provider_1.JsonRpcSigner;
exports.Provider = abstract_provider_1.Provider;
var abstract_signer_1 = require("./wallet/abstract-signer");
exports.Signer = abstract_signer_1.Signer;
var hmac_1 = require("./utils/hmac");
exports.SupportedAlgorithms = hmac_1.SupportedAlgorithms;
var utf8_1 = require("./utils/utf8");
exports.UnicodeNormalizationForm = utf8_1.UnicodeNormalizationForm;
var abstract_signer_1 = require("./wallet/abstract-signer");
exports.AbstractSigner = abstract_signer_1.Signer;
var wordlist_1 = require("./wordlists/wordlist");
exports.Wordlist = wordlist_1.Wordlist;
///////////////////////////////

@@ -16,4 +16,2 @@ /**

}
export declare const AddressZero = "0x0000000000000000000000000000000000000000";
export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
export declare function isHexable(value: any): value is Hexable;

@@ -20,0 +18,0 @@ export declare function isArrayish(value: any): value is Arrayish;

@@ -16,4 +16,2 @@ "use strict";

///////////////////////////////
exports.AddressZero = '0x0000000000000000000000000000000000000000';
exports.HashZero = '0x0000000000000000000000000000000000000000000000000000000000000000';
function isHexable(value) {

@@ -20,0 +18,0 @@ return !!(value.toHexString);

@@ -20,14 +20,2 @@ import { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType } from './abi-coder';

import { fetchJson } from './web';
import * as errors from './errors';
declare const etherSymbol = "\u039E";
declare const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: BigNumber;
Zero: BigNumber;
One: BigNumber;
Two: BigNumber;
WeiPerEther: BigNumber;
MaxUint256: BigNumber;
};
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, constants, RLP, fetchJson, getNetwork, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, etherSymbol, arrayify, concat, padZeros, stripZeros, base64, BigNumber, bigNumberify, hexlify, hexStripZeros, hexZeroPad, hexDataLength, hexDataSlice, toUtf8Bytes, toUtf8String, hashMessage, namehash, id, getAddress, getIcapAddress, getContractAddress, formatEther, parseEther, formatUnits, parseUnits, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computePublicKey, verifyMessage, errors };
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, RLP, fetchJson, getNetwork, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, arrayify, concat, padZeros, stripZeros, base64, BigNumber, bigNumberify, hexlify, hexStripZeros, hexZeroPad, hexDataLength, hexDataSlice, toUtf8Bytes, toUtf8String, hashMessage, namehash, id, getAddress, getIcapAddress, getContractAddress, formatEther, parseEther, formatUnits, parseUnits, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computePublicKey, verifyMessage };

@@ -79,19 +79,1 @@ 'use strict';

exports.fetchJson = web_1.fetchJson;
var errors = __importStar(require("./errors"));
exports.errors = errors;
// NFKD (decomposed)
//const etherSymbol = '\uD835\uDF63';
// NFKC (composed)
var etherSymbol = '\u039e';
exports.etherSymbol = etherSymbol;
var constants = {
AddressZero: bytes_1.AddressZero,
HashZero: bytes_1.HashZero,
NegativeOne: bignumber_1.ConstantNegativeOne,
Zero: bignumber_1.ConstantZero,
One: bignumber_1.ConstantOne,
Two: bignumber_1.ConstantTwo,
WeiPerEther: bignumber_1.ConstantWeiPerEther,
MaxUint256: bignumber_1.ConstantMaxUint256
};
exports.constants = constants;
import { Wallet } from './wallet';
import * as HDNode from './hdnode';
import { SigningKey } from './signing-key';
import { Signer as AbstractSigner } from './abstract-signer';
export { AbstractSigner, HDNode, SigningKey, Wallet };
export { HDNode, SigningKey, Wallet };

@@ -16,3 +16,1 @@ 'use strict';

exports.SigningKey = signing_key_1.SigningKey;
var abstract_signer_1 = require("./abstract-signer");
exports.AbstractSigner = abstract_signer_1.Signer;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc