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