2019-05-15 01:25:46 +03:00
|
|
|
"use strict";
|
|
|
|
|
2020-04-25 10:25:42 +03:00
|
|
|
import { AbiCoder, checkResultErrors, defaultAbiCoder, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, ParamType, Result } from "@ethersproject/abi";
|
2020-01-07 02:51:36 +03:00
|
|
|
import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address";
|
2019-05-15 01:25:46 +03:00
|
|
|
import * as base64 from "@ethersproject/base64";
|
2020-01-30 05:32:34 +03:00
|
|
|
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
2019-07-28 00:44:53 +03:00
|
|
|
import { hashMessage, id, isValidName, namehash } from "@ethersproject/hash";
|
2019-07-02 23:04:34 +03:00
|
|
|
import { defaultPath, entropyToMnemonic, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode";
|
2019-05-15 01:25:46 +03:00
|
|
|
import { getJsonWalletAddress } from "@ethersproject/json-wallets";
|
|
|
|
import { keccak256 } from "@ethersproject/keccak256";
|
2019-08-02 09:32:32 +03:00
|
|
|
import { Logger } from "@ethersproject/logger";
|
2020-04-22 09:42:25 +03:00
|
|
|
import { computeHmac, ripemd160, sha256, sha512 } from "@ethersproject/sha2";
|
2019-05-15 01:25:46 +03:00
|
|
|
import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@ethersproject/solidity";
|
2020-04-22 09:42:25 +03:00
|
|
|
import { randomBytes, shuffled } from "@ethersproject/random";
|
2019-07-28 00:44:53 +03:00
|
|
|
import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties";
|
2019-05-15 01:25:46 +03:00
|
|
|
import * as RLP from "@ethersproject/rlp";
|
|
|
|
import { computePublicKey, recoverPublicKey, SigningKey } from "@ethersproject/signing-key";
|
2020-01-21 03:29:06 +03:00
|
|
|
import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@ethersproject/strings";
|
2019-05-15 01:25:46 +03:00
|
|
|
import { computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction } from "@ethersproject/transactions";
|
|
|
|
import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@ethersproject/units";
|
|
|
|
import { verifyMessage } from "@ethersproject/wallet";
|
2019-06-06 04:52:09 +03:00
|
|
|
import { fetchJson, poll } from "@ethersproject/web";
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Enums
|
|
|
|
|
2020-01-21 03:29:06 +03:00
|
|
|
import { SupportedAlgorithm } from "@ethersproject/sha2";
|
|
|
|
import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings";
|
2020-02-07 02:21:34 +03:00
|
|
|
import { UnsignedTransaction } from "@ethersproject/transactions";
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Types and Interfaces
|
|
|
|
|
|
|
|
import { CoerceFunc } from "@ethersproject/abi";
|
|
|
|
import { Bytes, BytesLike, Hexable } from "@ethersproject/bytes"
|
2020-01-19 05:09:02 +03:00
|
|
|
import { Mnemonic } from "@ethersproject/hdnode";
|
2019-05-15 01:25:46 +03:00
|
|
|
import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets";
|
2020-01-21 03:29:06 +03:00
|
|
|
import { Utf8ErrorFunc } from "@ethersproject/strings";
|
2020-05-05 05:43:44 +03:00
|
|
|
import { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from "@ethersproject/web";
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Exports
|
|
|
|
|
|
|
|
export {
|
|
|
|
AbiCoder,
|
|
|
|
defaultAbiCoder,
|
|
|
|
|
|
|
|
Fragment,
|
|
|
|
EventFragment,
|
|
|
|
FunctionFragment,
|
|
|
|
ParamType,
|
2019-07-21 01:57:21 +03:00
|
|
|
FormatTypes,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
2020-04-25 10:25:42 +03:00
|
|
|
checkResultErrors,
|
|
|
|
Result,
|
|
|
|
|
2019-08-02 09:32:32 +03:00
|
|
|
Logger,
|
|
|
|
|
2019-05-15 01:25:46 +03:00
|
|
|
RLP,
|
|
|
|
|
|
|
|
fetchJson,
|
2019-06-06 04:52:09 +03:00
|
|
|
poll,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
checkProperties,
|
|
|
|
deepCopy,
|
|
|
|
defineReadOnly,
|
2019-07-28 00:44:53 +03:00
|
|
|
getStatic,
|
2019-05-15 01:25:46 +03:00
|
|
|
resolveProperties,
|
|
|
|
shallowCopy,
|
|
|
|
|
|
|
|
arrayify,
|
|
|
|
|
|
|
|
concat,
|
|
|
|
stripZeros,
|
|
|
|
zeroPad,
|
|
|
|
|
2020-01-30 05:32:34 +03:00
|
|
|
isBytes,
|
|
|
|
isBytesLike,
|
|
|
|
|
2019-07-02 23:04:34 +03:00
|
|
|
defaultPath,
|
2019-05-15 01:25:46 +03:00
|
|
|
HDNode,
|
|
|
|
SigningKey,
|
|
|
|
|
|
|
|
Interface,
|
|
|
|
|
|
|
|
base64,
|
|
|
|
|
|
|
|
hexlify,
|
|
|
|
isHexString,
|
|
|
|
hexStripZeros,
|
|
|
|
hexValue,
|
|
|
|
hexZeroPad,
|
|
|
|
hexDataLength,
|
|
|
|
hexDataSlice,
|
|
|
|
|
2019-07-28 00:44:53 +03:00
|
|
|
nameprep,
|
2019-07-23 06:58:07 +03:00
|
|
|
_toEscapedUtf8String,
|
2019-05-15 01:25:46 +03:00
|
|
|
toUtf8Bytes,
|
2019-07-28 00:44:53 +03:00
|
|
|
toUtf8CodePoints,
|
2019-05-15 01:25:46 +03:00
|
|
|
toUtf8String,
|
2020-01-21 03:29:06 +03:00
|
|
|
Utf8ErrorFuncs,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
formatBytes32String,
|
|
|
|
parseBytes32String,
|
|
|
|
|
|
|
|
hashMessage,
|
|
|
|
namehash,
|
2019-07-28 00:44:53 +03:00
|
|
|
isValidName,
|
2019-05-15 01:25:46 +03:00
|
|
|
id,
|
|
|
|
|
|
|
|
getAddress,
|
|
|
|
getIcapAddress,
|
|
|
|
getContractAddress,
|
2020-01-07 02:51:36 +03:00
|
|
|
getCreate2Address,
|
2019-05-15 01:25:46 +03:00
|
|
|
isAddress,
|
|
|
|
|
|
|
|
formatEther,
|
|
|
|
parseEther,
|
|
|
|
|
|
|
|
formatUnits,
|
|
|
|
parseUnits,
|
|
|
|
|
|
|
|
commify,
|
|
|
|
|
2020-04-22 09:42:25 +03:00
|
|
|
computeHmac,
|
2019-05-15 01:25:46 +03:00
|
|
|
keccak256,
|
2020-04-22 09:42:25 +03:00
|
|
|
ripemd160,
|
2019-05-15 01:25:46 +03:00
|
|
|
sha256,
|
2020-04-22 09:42:25 +03:00
|
|
|
sha512,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
randomBytes,
|
2020-04-22 09:42:25 +03:00
|
|
|
shuffled,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
solidityPack,
|
|
|
|
solidityKeccak256,
|
|
|
|
soliditySha256,
|
|
|
|
|
|
|
|
splitSignature,
|
|
|
|
joinSignature,
|
|
|
|
|
|
|
|
parseTransaction,
|
|
|
|
serializeTransaction,
|
|
|
|
|
|
|
|
getJsonWalletAddress,
|
|
|
|
|
|
|
|
computeAddress,
|
|
|
|
recoverAddress,
|
|
|
|
|
|
|
|
computePublicKey,
|
|
|
|
recoverPublicKey,
|
|
|
|
|
|
|
|
verifyMessage,
|
|
|
|
|
|
|
|
mnemonicToEntropy,
|
|
|
|
entropyToMnemonic,
|
|
|
|
isValidMnemonic,
|
|
|
|
mnemonicToSeed,
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Enums
|
|
|
|
|
2020-01-21 03:29:06 +03:00
|
|
|
SupportedAlgorithm,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
2020-01-21 03:29:06 +03:00
|
|
|
UnicodeNormalizationForm,
|
|
|
|
Utf8ErrorReason,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Types
|
|
|
|
|
|
|
|
Bytes,
|
|
|
|
BytesLike,
|
|
|
|
Hexable,
|
|
|
|
|
2020-02-07 02:21:34 +03:00
|
|
|
UnsignedTransaction,
|
|
|
|
|
2019-05-15 01:25:46 +03:00
|
|
|
CoerceFunc,
|
|
|
|
|
|
|
|
Indexed,
|
|
|
|
|
2020-01-19 05:09:02 +03:00
|
|
|
Mnemonic,
|
|
|
|
|
2020-01-21 03:29:06 +03:00
|
|
|
Utf8ErrorFunc,
|
|
|
|
|
2019-05-15 01:25:46 +03:00
|
|
|
ConnectionInfo,
|
|
|
|
OnceBlockable,
|
2020-05-05 05:43:44 +03:00
|
|
|
OncePollable,
|
2019-05-15 01:25:46 +03:00
|
|
|
PollOptions,
|
2019-09-28 04:55:40 +03:00
|
|
|
FetchJsonResponse,
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
EncryptOptions,
|
|
|
|
ProgressCallback
|
|
|
|
}
|
|
|
|
|