Updated dist files.

This commit is contained in:
Richard Moore 2018-07-12 02:53:06 -04:00
parent 979e374270
commit dfdbb9bb28
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
4 changed files with 706 additions and 528 deletions

148
dist/ethers.d.ts vendored

@ -9,7 +9,16 @@ declare module 'ethers' {
import { HDNode, SigningKey, Wallet } from 'ethers/wallet'; import { HDNode, SigningKey, Wallet } from 'ethers/wallet';
import * as wordlists from 'ethers/wordlists'; import * as wordlists from 'ethers/wordlists';
import { version } from 'ethers/_version'; import { version } from 'ethers/_version';
export { Wallet, HDNode, SigningKey, Contract, Interface, getNetwork, providers, errors, utils, wordlists, version }; const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: utils.BigNumber;
Zero: utils.BigNumber;
One: utils.BigNumber;
Two: utils.BigNumber;
WeiPerEther: utils.BigNumber;
};
export { Wallet, HDNode, SigningKey, Contract, Interface, getNetwork, providers, errors, constants, utils, wordlists, version };
const _default: { const _default: {
Wallet: typeof Wallet; Wallet: typeof Wallet;
HDNode: typeof HDNode; HDNode: typeof HDNode;
@ -19,6 +28,15 @@ declare module 'ethers' {
getNetwork: typeof getNetwork; getNetwork: typeof getNetwork;
providers: typeof providers; providers: typeof providers;
errors: typeof errors; errors: typeof errors;
constants: {
AddressZero: string;
HashZero: string;
NegativeOne: utils.BigNumber;
Zero: utils.BigNumber;
One: utils.BigNumber;
Two: utils.BigNumber;
WeiPerEther: utils.BigNumber;
};
utils: typeof utils; utils: typeof utils;
wordlists: typeof wordlists; wordlists: typeof wordlists;
version: string; version: string;
@ -38,7 +56,7 @@ declare module 'ethers/contracts' {
} }
declare module 'ethers/providers' { declare module 'ethers/providers' {
import { Provider, ProviderSigner } from 'ethers/providers/provider'; import { Provider } from 'ethers/providers/provider';
import { Network } from 'ethers/providers/networks'; import { Network } from 'ethers/providers/networks';
import { EtherscanProvider } from 'ethers/providers/etherscan-provider'; import { EtherscanProvider } from 'ethers/providers/etherscan-provider';
import { FallbackProvider } from 'ethers/providers/fallback-provider'; import { FallbackProvider } from 'ethers/providers/fallback-provider';
@ -47,11 +65,10 @@ declare module 'ethers/providers' {
import { JsonRpcProvider } from 'ethers/providers/json-rpc-provider'; import { JsonRpcProvider } from 'ethers/providers/json-rpc-provider';
import { Web3Provider } from 'ethers/providers/web3-provider'; import { Web3Provider } from 'ethers/providers/web3-provider';
function getDefaultProvider(network?: Network | string): FallbackProvider; function getDefaultProvider(network?: Network | string): FallbackProvider;
export { Provider, getDefaultProvider, ProviderSigner, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider }; export { Provider, getDefaultProvider, FallbackProvider, EtherscanProvider, InfuraProvider, JsonRpcProvider, Web3Provider, IpcProvider };
const _default: { const _default: {
Provider: typeof Provider; Provider: typeof Provider;
getDefaultProvider: typeof getDefaultProvider; getDefaultProvider: typeof getDefaultProvider;
ProviderSigner: typeof ProviderSigner;
FallbackProvider: typeof FallbackProvider; FallbackProvider: typeof FallbackProvider;
EtherscanProvider: typeof EtherscanProvider; EtherscanProvider: typeof EtherscanProvider;
InfuraProvider: typeof InfuraProvider; InfuraProvider: typeof InfuraProvider;
@ -99,7 +116,7 @@ declare module 'ethers/utils' {
import { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType } from 'ethers/utils/abi-coder'; import { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType } from 'ethers/utils/abi-coder';
import * as base64 from 'ethers/utils/base64'; import * as base64 from 'ethers/utils/base64';
import { BigNumber, bigNumberify } from 'ethers/utils/bignumber'; import { BigNumber, bigNumberify } from 'ethers/utils/bignumber';
import { arrayify, concat, hexlify, joinSignature, padZeros, splitSignature, stripZeros } from 'ethers/utils/bytes'; import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexZeroPad, joinSignature, padZeros, splitSignature, stripZeros } from 'ethers/utils/bytes';
import { hashMessage, id, namehash } from 'ethers/utils/hash'; import { hashMessage, id, namehash } from 'ethers/utils/hash';
import { keccak256 } from 'ethers/utils/keccak256'; import { keccak256 } from 'ethers/utils/keccak256';
import { sha256 } from 'ethers/utils/sha2'; import { sha256 } from 'ethers/utils/sha2';
@ -113,12 +130,30 @@ declare module 'ethers/utils' {
import { parse as parseTransaction, serialize as serializeTransaction } from 'ethers/utils/transaction'; import { parse as parseTransaction, serialize as serializeTransaction } from 'ethers/utils/transaction';
import * as errors from 'ethers/utils/errors'; import * as errors from 'ethers/utils/errors';
const etherSymbol = "\u039E"; const etherSymbol = "\u039E";
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, RLP, fetchJson, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, etherSymbol, arrayify, concat, padZeros, stripZeros, base64, bigNumberify, BigNumber, hexlify, toUtf8Bytes, toUtf8String, hashMessage, namehash, id, getAddress, getIcapAddress, getContractAddress, formatEther, parseEther, formatUnits, parseUnits, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, errors }; const constants: {
AddressZero: string;
HashZero: string;
NegativeOne: BigNumber;
Zero: BigNumber;
One: BigNumber;
Two: BigNumber;
WeiPerEther: BigNumber;
};
export { AbiCoder, defaultAbiCoder, formatSignature, formatParamType, parseSignature, parseParamType, constants, RLP, fetchJson, defineReadOnly, defineFrozen, resolveProperties, shallowCopy, etherSymbol, arrayify, concat, padZeros, stripZeros, base64, bigNumberify, BigNumber, 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, errors };
const _default: { const _default: {
AbiCoder: typeof AbiCoder; AbiCoder: typeof AbiCoder;
defaultAbiCoder: AbiCoder; defaultAbiCoder: AbiCoder;
parseSignature: typeof parseSignature; parseSignature: typeof parseSignature;
parseParamType: typeof parseParamType; parseParamType: typeof parseParamType;
constants: {
AddressZero: string;
HashZero: string;
NegativeOne: BigNumber;
Zero: BigNumber;
One: BigNumber;
Two: BigNumber;
WeiPerEther: BigNumber;
};
RLP: typeof RLP; RLP: typeof RLP;
fetchJson: typeof fetchJson; fetchJson: typeof fetchJson;
defineReadOnly: typeof defineReadOnly; defineReadOnly: typeof defineReadOnly;
@ -134,6 +169,10 @@ declare module 'ethers/utils' {
bigNumberify: typeof bigNumberify; bigNumberify: typeof bigNumberify;
BigNumber: typeof BigNumber; BigNumber: typeof BigNumber;
hexlify: typeof hexlify; hexlify: typeof hexlify;
hexStripZeros: typeof hexStripZeros;
hexZeroPad: typeof hexZeroPad;
hexDataLength: typeof hexDataLength;
hexDataSlice: typeof hexDataSlice;
toUtf8Bytes: typeof toUtf8Bytes; toUtf8Bytes: typeof toUtf8Bytes;
toUtf8String: typeof toUtf8String; toUtf8String: typeof toUtf8String;
hashMessage: typeof hashMessage; hashMessage: typeof hashMessage;
@ -201,17 +240,38 @@ declare module 'ethers/_version' {
} }
declare module 'ethers/contracts/contract' { declare module 'ethers/contracts/contract' {
import { Interface } from 'ethers/contracts/interface'; import { EventDescription, Interface } from 'ethers/contracts/interface';
import { Provider, TransactionRequest, TransactionResponse } from 'ethers/providers/provider'; import { Block, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from 'ethers/providers/provider';
import { Signer } from 'ethers/wallet/wallet'; import { Signer } from 'ethers/wallet/wallet';
import { ParamType } from 'ethers/utils/abi-coder'; import { ParamType } from 'ethers/utils/abi-coder';
import { BigNumber } from 'ethers/utils/bignumber'; import { BigNumber } from 'ethers/utils/bignumber';
export type Listener = (...args: Array<any>) => void;
export type EventFilter = {
address?: string;
topics?: Array<string>;
};
export type ContractEstimate = (...params: Array<any>) => Promise<BigNumber>; export type ContractEstimate = (...params: Array<any>) => Promise<BigNumber>;
export type ContractFunction = (...params: Array<any>) => Promise<any>; export type ContractFunction = (...params: Array<any>) => Promise<any>;
export type ContractEvent = (...params: Array<any>) => void; export type ContractFilter = (...params: Array<any>) => EventFilter;
export interface Event extends Log {
args: Array<any>;
decode: (data: string, topics?: Array<string>) => any;
event: string;
eventSignature: string;
removeListener: () => void;
getBlock: () => Promise<Block>;
getTransaction: () => Promise<TransactionResponse>;
getTransactionReceipt: () => Promise<TransactionReceipt>;
}
interface Bucket<T> { interface Bucket<T> {
[name: string]: T; [name: string]: T;
} }
type _EventFilter = {
decode: (log: Log) => Array<any>;
event?: EventDescription;
eventTag: string;
filter: EventFilter;
};
export type ErrorCallback = (error: Error) => void; export type ErrorCallback = (error: Error) => void;
export type Contractish = Array<string | ParamType> | Interface | string; export type Contractish = Array<string | ParamType> | Interface | string;
export class Contract { export class Contract {
@ -221,7 +281,7 @@ declare module 'ethers/contracts/contract' {
readonly provider: Provider; readonly provider: Provider;
readonly estimate: Bucket<ContractEstimate>; readonly estimate: Bucket<ContractEstimate>;
readonly functions: Bucket<ContractFunction>; readonly functions: Bucket<ContractFunction>;
readonly events: Bucket<ContractEvent>; readonly filters: Bucket<ContractFilter>;
readonly addressPromise: Promise<string>; readonly addressPromise: Promise<string>;
readonly deployTransaction: TransactionResponse; readonly deployTransaction: TransactionResponse;
constructor(addressOrName: string, contractInterface: Contractish, signerOrProvider: Signer | Provider); constructor(addressOrName: string, contractInterface: Contractish, signerOrProvider: Signer | Provider);
@ -231,6 +291,16 @@ declare module 'ethers/contracts/contract' {
connect(signerOrProvider: Signer | Provider): Contract; connect(signerOrProvider: Signer | Provider): Contract;
attach(addressOrName: string): Contract; attach(addressOrName: string): Contract;
deploy(bytecode: string, ...args: Array<any>): Promise<Contract>; deploy(bytecode: string, ...args: Array<any>): Promise<Contract>;
_getEventFilter(eventName: EventFilter | string): _EventFilter;
_addEventListener(eventFilter: _EventFilter, listener: Listener, once: boolean): void;
on(event: EventFilter | string, listener: Listener): Contract;
once(event: EventFilter | string, listener: Listener): Contract;
addEventLisener(eventName: EventFilter | string, listener: Listener): Contract;
emit(eventName: EventFilter | string, ...args: Array<any>): boolean;
listenerCount(eventName?: EventFilter | string): number;
listeners(eventName: EventFilter | string): Array<Listener>;
removeAllListeners(eventName: EventFilter | string): Contract;
removeListener(eventName: any, listener: Listener): Contract;
} }
export {}; export {};
} }
@ -266,6 +336,7 @@ declare module 'ethers/contracts/interface' {
readonly inputs: Array<ParamType>; readonly inputs: Array<ParamType>;
readonly anonymous: boolean; readonly anonymous: boolean;
readonly topic: string; readonly topic: string;
encodeTopics(params: Array<any>): Array<string>;
decode(data: string, topics?: Array<string>): any; decode(data: string, topics?: Array<string>): any;
} }
class TransactionDescription extends Description { class TransactionDescription extends Description {
@ -305,11 +376,10 @@ declare module 'ethers/contracts/interface' {
} }
declare module 'ethers/providers/provider' { declare module 'ethers/providers/provider' {
import { Signer } from 'ethers/wallet/wallet'; import { Network, Networkish } from 'ethers/providers/networks';
import { BigNumber, BigNumberish } from 'ethers/utils/bignumber'; import { BigNumber, BigNumberish } from 'ethers/utils/bignumber';
import { Arrayish } from 'ethers/utils/bytes'; import { Arrayish } from 'ethers/utils/bytes';
import { Network, Networkish } from 'ethers/providers/networks'; import { Transaction } from 'ethers/utils/transaction';
import { SignDigestFunc, Transaction } from 'ethers/utils/transaction';
export type BlockTag = string | number; export type BlockTag = string | number;
export interface Block { export interface Block {
hash: string; hash: string;
@ -360,7 +430,7 @@ declare module 'ethers/providers/provider' {
fromBlock?: BlockTag; fromBlock?: BlockTag;
toBlock?: BlockTag; toBlock?: BlockTag;
address?: string; address?: string;
topics?: Array<any>; topics?: Array<string | Array<string>>;
}; };
export interface Log { export interface Log {
blockNumber?: number; blockNumber?: number;
@ -369,21 +439,24 @@ declare module 'ethers/providers/provider' {
removed?: boolean; removed?: boolean;
transactionLogIndex?: number; transactionLogIndex?: number;
address: string; address: string;
data?: string; data: string;
topics?: Array<string>; topics: Array<string>;
transactionHash?: string; transactionHash?: string;
logIndex?: number; logIndex?: number;
} }
export type Listener = (...args: Array<any>) => void;
export function checkTransactionResponse(transaction: any): TransactionResponse; export function checkTransactionResponse(transaction: any): TransactionResponse;
export class ProviderSigner extends Signer { export type Listener = (...args: Array<any>) => void;
readonly provider: Provider; /**
readonly signDigest: SignDigestFunc; * EventType
constructor(address: string | Promise<string>, signDigest: SignDigestFunc, provider: Provider); * - "block"
getAddress(): Promise<string>; * - "pending"
signMessage(message: Arrayish | string): Promise<string>; * - "error"
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>; * - address
} * - filter
* - topics array
* - transaction hash
*/
export type EventType = string | Array<string> | Filter;
export class Provider { export class Provider {
protected _emitted: any; protected _emitted: any;
/** /**
@ -429,13 +502,15 @@ declare module 'ethers/providers/provider' {
perform(method: string, params: any): Promise<any>; perform(method: string, params: any): Promise<any>;
_startPending(): void; _startPending(): void;
_stopPending(): void; _stopPending(): void;
on(eventName: any, listener: Listener): Provider; _addEventListener(eventName: EventType, listener: Listener, once: boolean): void;
once(eventName: any, listener: Listener): Provider; on(eventName: EventType, listener: Listener): Provider;
emit(eventName: any, ...args: Array<any>): boolean; once(eventName: EventType, listener: Listener): Provider;
listenerCount(eventName?: any): number; addEventListener(eventName: EventType, listener: Listener): Provider;
listeners(eventName: any): Array<Listener>; emit(eventName: EventType, ...args: Array<any>): boolean;
removeAllListeners(eventName: any): Provider; listenerCount(eventName?: EventType): number;
removeListener(eventName: any, listener: Listener): Provider; listeners(eventName: EventType): Array<Listener>;
removeAllListeners(eventName: EventType): Provider;
removeListener(eventName: EventType, listener: Listener): Provider;
} }
} }
@ -574,7 +649,7 @@ declare module 'ethers/utils/abi-coder' {
readonly coerceFunc: CoerceFunc; readonly coerceFunc: CoerceFunc;
constructor(coerceFunc?: CoerceFunc); constructor(coerceFunc?: CoerceFunc);
encode(types: Array<string | ParamType>, values: Array<any>): string; encode(types: Array<string | ParamType>, values: Array<any>): string;
decode(types: Array<string | ParamType>, data: Arrayish): any; decode(types: Array<string | ParamType>, data: Arrayish): Array<any>;
} }
export const defaultAbiCoder: AbiCoder; export const defaultAbiCoder: AbiCoder;
} }
@ -625,6 +700,8 @@ declare module 'ethers/utils/bytes' {
*/ */
import { BigNumber } from 'ethers/utils/bignumber'; import { BigNumber } from 'ethers/utils/bignumber';
import { Signature } from 'ethers/utils/secp256k1'; import { Signature } from 'ethers/utils/secp256k1';
export const AddressZero = "0x0000000000000000000000000000000000000000";
export const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
export type Arrayish = string | ArrayLike<number>; export type Arrayish = string | ArrayLike<number>;
export function isArrayish(value: any): boolean; export function isArrayish(value: any): boolean;
export function arrayify(value: Arrayish | BigNumber): Uint8Array; export function arrayify(value: Arrayish | BigNumber): Uint8Array;
@ -637,7 +714,7 @@ declare module 'ethers/utils/bytes' {
export function hexDataSlice(data: string, offset: number, length?: number): string; export function hexDataSlice(data: string, offset: number, length?: number): string;
export function hexStripZeros(value: string): string; export function hexStripZeros(value: string): string;
export function hexZeroPad(value: string, length: number): string; export function hexZeroPad(value: string, length: number): string;
export function splitSignature(signature: Arrayish): Signature; export function splitSignature(signature: Arrayish | Signature): Signature;
export function joinSignature(signature: Signature): string; export function joinSignature(signature: Signature): string;
} }
@ -753,8 +830,7 @@ declare module 'ethers/utils/transaction' {
s?: string; s?: string;
v?: number; v?: number;
} }
export type SignDigestFunc = (digest: Uint8Array) => Signature; export function serialize(transaction: UnsignedTransaction, signature?: Arrayish | Signature): string;
export function serialize(transaction: UnsignedTransaction, signDigest?: SignDigestFunc): string;
export function parse(rawTransaction: Arrayish): Transaction; export function parse(rawTransaction: Arrayish): Transaction;
} }

850
dist/ethers.js vendored

File diff suppressed because it is too large Load Diff

2
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long