From cb8f4a3a4e378a749c6bbbddf46d8d79d35722cc Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 25 Aug 2020 01:09:48 -0400 Subject: [PATCH] Updated docs for all packages on npm pages (#1013). --- packages/abi/README.md | 47 +++++++++++++++--- packages/abstract-provider/README.md | 53 +++++++++++++++++--- packages/abstract-signer/README.md | 29 ++++++++--- packages/address/README.md | 30 +++++++++--- packages/asm/README.md | 1 + packages/base64/README.md | 1 - packages/basex/README.md | 30 +++++++++++- packages/bignumber/README.md | 36 +++++++++++--- packages/bytes/README.md | 63 +++++++++++++++++++++--- packages/cli/README.md | 1 + packages/constants/README.md | 34 ++++++++++--- packages/contracts/README.md | 47 +++++++++++++++--- packages/hash/README.md | 29 ++++++++--- packages/hdnode/README.md | 35 ++++++++++--- packages/json-wallets/README.md | 42 +++++++++++++--- packages/keccak256/README.md | 24 ++++++--- packages/logger/README.md | 28 ++++++++++- packages/networks/README.md | 29 ++++++++--- packages/pbkdf2/README.md | 23 ++++++--- packages/properties/README.md | 39 ++++++++++++--- packages/providers/README.md | 73 +++++++++++++++++++++++++--- packages/random/README.md | 26 +++++++--- packages/rlp/README.md | 25 +++++++--- packages/sha2/README.md | 33 ++++++++++--- packages/shims/README.md | 10 +--- packages/signing-key/README.md | 27 +++++++++- packages/solidity/README.md | 26 +++++++--- packages/strings/README.md | 42 +++++++++++++--- packages/testcases/README.md | 9 ++-- packages/tests/README.md | 10 ++-- packages/transactions/README.md | 33 ++++++++++--- packages/units/README.md | 31 +++++++++--- packages/wallet/README.md | 27 +++++++--- packages/web/README.md | 34 ++++++++++--- packages/wordlists/README.md | 11 ++--- 35 files changed, 851 insertions(+), 187 deletions(-) diff --git a/packages/abi/README.md b/packages/abi/README.md index c3c1581835..ded58c951f 100644 --- a/packages/abi/README.md +++ b/packages/abi/README.md @@ -1,15 +1,50 @@ Ethereum ABI Coder ================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for encoding and decoding the Application Binary Interface (ABI) +used by most smart contracts to interoperate between other smart contracts and clients. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/abi/). -`@TODO` +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + ConstructorFragment, + EventFragment, + Fragment, + FunctionFragment, + ParamType, + FormatTypes, + + AbiCoder, + defaultAbiCoder, + + Interface, + Indexed, + + ///////////////////////// + // Types + + CoerceFunc, + JsonFragment, + JsonFragmentType, + + Result, + checkResultErrors, + + LogDescription, + TransactionDescription + +} = require("@ethersproject/abi"); +``` License ------- diff --git a/packages/abstract-provider/README.md b/packages/abstract-provider/README.md index 8010615a25..16ce8cc0b8 100644 --- a/packages/abstract-provider/README.md +++ b/packages/abstract-provider/README.md @@ -1,15 +1,56 @@ Abstract Provider ================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for defining the common interface for a Provider, which in +ethers differs quite substantially from Web3.js. -API ---- +A Provider is an abstraction of non-account-based operations on a blockchain and +is generally not directly involved in signing transaction or data. -`@TODO` +For signing, see the [Abstract Signer](https://www.npmjs.com/package/@ethersproject/abstract-signer) +or [Wallet](https://www.npmjs.com/package/@ethersproject/wallet) sub-modules. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Provider, + + ForkEvent, + BlockForkEvent, + TransactionForkEvent, + TransactionOrderForkEvent, + + // Types + BlockTag, + + Block, + BlockWithTransactions, + + TransactionRequest, + TransactionResponse, + TransactionReceipt, + + Log, + EventFilter, + + Filter, + FilterByBlockHash, + + EventType, + Listener + +} = require("@ethersproject/abstract-provider"); +``` License ------- diff --git a/packages/abstract-signer/README.md b/packages/abstract-signer/README.md index bf42770221..0e8be1accc 100644 --- a/packages/abstract-signer/README.md +++ b/packages/abstract-signer/README.md @@ -1,15 +1,32 @@ Abstract Signer =============== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is an abstraction of an Ethereum account, which may be backed by a [private key](https://www.npmjs.com/package/@ethersproject/wallet), +signing service (such as Geth or Parity with key managment enabled, or a +dedicated signing service such as Clef), +[hardware wallets](https://www.npmjs.com/package/@ethersproject/hardware-wallets), etc. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/signer/). -`@TODO` +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Signer, + VoidSigner, + + // Types + ExternallyOwnedAccount + +} = require("@ethersproject/abstract-signer"); +``` License ------- diff --git a/packages/address/README.md b/packages/address/README.md index dbea4f2da2..80e994d88e 100644 --- a/packages/address/README.md +++ b/packages/address/README.md @@ -1,15 +1,33 @@ Ethereum Address Utilities ========================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for encoding, verifying and computing checksums for +Ethereum addresses and computing special addresses, such as those +enerated by and for contracts under various situations. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/address/). -`@TODO` +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + getAddress, + isAddress, + + getIcapAddress, + + getContractAddress, + getCreate2Address + +} = require("@ethersproject/address"); +``` License ------- diff --git a/packages/asm/README.md b/packages/asm/README.md index b1732ee774..6a8d6c8200 100644 --- a/packages/asm/README.md +++ b/packages/asm/README.md @@ -205,6 +205,7 @@ Building If you make changes to the `grammar.jison` file, make sure to run the `npm generate` command to re-build the AST parser. + License ======= diff --git a/packages/base64/README.md b/packages/base64/README.md index 7e4a07fdd5..9c7d505482 100644 --- a/packages/base64/README.md +++ b/packages/base64/README.md @@ -29,7 +29,6 @@ console.log(encodedData); // "..." ``` - License ======= diff --git a/packages/basex/README.md b/packages/basex/README.md index db64b85c62..b5217d1c92 100644 --- a/packages/basex/README.md +++ b/packages/basex/README.md @@ -1,5 +1,31 @@ -Base X +Base-X ====== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). +It is responsible for encoding and decoding vinary data in arbitrary bases, but +is primarily for Base58 encoding which is used for various blockchain data. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/encoding/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + BaseX, + + Base32, + Base58 + +} = require("@ethersproject/basex"); +``` + +License +------- + +MIT License diff --git a/packages/bignumber/README.md b/packages/bignumber/README.md index 1d1b8bb2db..9d19325734 100644 --- a/packages/bignumber/README.md +++ b/packages/bignumber/README.md @@ -1,15 +1,39 @@ Big Numbers =========== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for handling arbitrarily large numbers and mathematic operations. -API ---- +For more information, see the documentation for [Big Numbers](https://docs.ethers.io/v5/api/utils/bignumber/) +and [Fixed-Point Numbers](https://docs.ethers.io/v5/api/utils/fixednumber/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + BigNumber, + + FixedFormat, + FixedNumber, + + formatFixed, + + parseFixed + + // Types + + BigNumberish + +} = require("@ethersproject/bignumber"); +``` -`@TODO` License ------- diff --git a/packages/bytes/README.md b/packages/bytes/README.md index 0616e29a68..865325e1f4 100644 --- a/packages/bytes/README.md +++ b/packages/bytes/README.md @@ -1,15 +1,62 @@ -Byte Manipulation Libraries -=========================== +Byte Manipulation +================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for manipulating binary data. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/bytes/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isBytesLike, + isBytes, + + arrayify, + + concat, + + stripZeros, + zeroPad, + + isHexString, + hexlify, + + hexDataLength, + hexDataSlice, + hexConcat, + + hexValue, + + hexStripZeros, + hexZeroPad, + + splitSignature, + joinSignature, + + // Types + + Bytes, + BytesLike, + + DataOptions, + + Hexable, + + SignatureLike, + Signature + +} = require("@ethersproject/bytes"); +``` -`@TODO` License ------- diff --git a/packages/cli/README.md b/packages/cli/README.md index 2611cd5854..d68c0a500b 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -12,6 +12,7 @@ and debug Ethereum-related tasks using the ethers.js library. ----- + Sandbox Utility =============== diff --git a/packages/constants/README.md b/packages/constants/README.md index 327559c8d1..4018a69014 100644 --- a/packages/constants/README.md +++ b/packages/constants/README.md @@ -1,15 +1,37 @@ Etehreum Constants ================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains many frequently used constants when dealing with Ethereum. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/constants/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + AddressZero, + HashZero, + + EtherSymbol, + + NegativeOne, + Zero, + One, + Two, + + WeiPerEther, + MaxUint256 + +} = require("@ethersproject/constants"); +``` -`@TODO` License ------- diff --git a/packages/contracts/README.md b/packages/contracts/README.md index f8d0aaf910..0af4985e6d 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -1,15 +1,50 @@ Ethereum Contract Meta-Class ============================ -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is creating (at run-time) an object which interacts with an on-chain +contract as a native JavaScript object. -API ---- +If you are familiar with ORM for Databases, this is similar, but for smart contracts. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/contract/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Contract, + ContractFactory, + + RunningEvent, + + // Types + + ContractInterface, + + Overrides, + PayableOverrides, + CallOverrides, + + PopulatedTransaction, + + EventFilter, + + ContractFunction, + + Event, + ContractReceipt, + ContractTransaction + +} = require("@ethersproject/contract"); +``` -`@TODO` License ------- diff --git a/packages/hash/README.md b/packages/hash/README.md index c2a48b2114..fde1d644db 100644 --- a/packages/hash/README.md +++ b/packages/hash/README.md @@ -1,15 +1,32 @@ Etheruem Hash Utilities ======================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains several common hashing utilities (but not the actual hash functions). -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isValidName, + namehash, + + id, + + messagePrefix, + hashMessage + +} = require("@ethersproject/hash"); +``` -`@TODO` License ------- diff --git a/packages/hdnode/README.md b/packages/hdnode/README.md index eb8597b9fe..f61ba72c75 100644 --- a/packages/hdnode/README.md +++ b/packages/hdnode/README.md @@ -1,15 +1,38 @@ Hierarchal Deterministic Utilities (BIP32) ========================================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible computing, deriving, encoding and decoding Hierarchal-Deterministic +private keys. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hdnode/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + HDNode, + + defaultPath, + + mnemonicToSeed, + mnemonicToEntropy, + entropyToMnemonic, + isValidMnemonic, + + // Types + + Mnemonic + +} = require("@ethersproject/hdnode"); +``` -`@TODO` License ------- diff --git a/packages/json-wallets/README.md b/packages/json-wallets/README.md index 9531cc324e..f46048465f 100644 --- a/packages/json-wallets/README.md +++ b/packages/json-wallets/README.md @@ -1,15 +1,45 @@ Secret Storage JSON Wallet Utilities ==================================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for encoding, decoding, encrypting and decrypting JSON wallet +formats. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isCrowdsaleWallet, + decryptCrowdsale, + + isKeystoreWallet, + decryptKeystore, + decryptKeystoreSync, + encryptKeystore, + + getJsonWalletAddress, + + decryptJsonWallet, + decryptJsonWalletSync, + + // Types + + ProgressCallback, + + EncryptOptions + +} = require("@ethersproject/json-wallets"); +``` -`@TODO` License ------- diff --git a/packages/keccak256/README.md b/packages/keccak256/README.md index d2021a496c..bc9da6482f 100644 --- a/packages/keccak256/README.md +++ b/packages/keccak256/README.md @@ -1,15 +1,27 @@ KECCAK256 Hash Function ======================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for the identify function (i.e. KECCAK256) use in Ethereum. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/#utils-keccak256). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + keccak256 + +} = require("@ethersproject/keccak256"); +``` -`@TODO` License ------- diff --git a/packages/logger/README.md b/packages/logger/README.md index 911a0f8abc..114b2fdeef 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -1,7 +1,33 @@ Logger ====== -@TODO: +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for managing logging and errors to maintain a standard +structure. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/logger/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Logger, + + // Enums + + ErrorCode, + + LogLevel, + +} = require("@ethersproject/logger"); +``` + License ------- diff --git a/packages/networks/README.md b/packages/networks/README.md index 92e05b02d7..1b93a51e14 100644 --- a/packages/networks/README.md +++ b/packages/networks/README.md @@ -1,15 +1,32 @@ Ethereum (and ilk) Network Definitions ====================================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for tracking common networks along with important +parameters for each. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/types/#providers-Network). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + getNetwork, + + // Types + + Network, + Networkish + +} = require("@ethersproject/networks"); +``` -`@TODO` License ------- diff --git a/packages/pbkdf2/README.md b/packages/pbkdf2/README.md index cd2c61e0ad..722c23c35b 100644 --- a/packages/pbkdf2/README.md +++ b/packages/pbkdf2/README.md @@ -1,15 +1,26 @@ Password-Based Key Derivation Function 2 (pbkdf2) ================================================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains the PBKDF2 function. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + pbkdf2 + +} = require("@ethersproject/pbkdf2"); +``` -`@TODO` License ------- diff --git a/packages/properties/README.md b/packages/properties/README.md index 1f82cfe60c..a31e298f1d 100644 --- a/packages/properties/README.md +++ b/packages/properties/README.md @@ -1,15 +1,42 @@ Property Utilities ================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains several useful utility methods for managing simple objects with +defined properties. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/properties/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + defineReadOnly, + + getStatic, + + resolveProperties, + checkProperties, + + shallowCopy, + deepCopy, + + Description, + + // Types + + Deferrable + +} = require("@ethersproject/properties"); +``` -`@TODO` License ------- diff --git a/packages/providers/README.md b/packages/providers/README.md index 8b28057b42..c267a5851f 100644 --- a/packages/providers/README.md +++ b/packages/providers/README.md @@ -1,15 +1,76 @@ Ethereum Providers ================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains common Provider classes, utility functions for dealing with providers +and re-exports many of the classes and types needed implement a custom Provider. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Provider, + BaseProvider, + + JsonRpcProvider, + StaticJsonRpcProvider, + UrlJsonRpcProvider, + + FallbackProvider, + + AlchemyProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + NodesmithProvider, + + IpcProvider, + + Web3Provider, + + WebSocketProvider, + + JsonRpcSigner, + + getDefaultProvider, + + getNetwork, + + Formatter, + + // Types + + TransactionReceipt, + TransactionRequest, + TransactionResponse, + + Listener, + + ExternalProvider, + + Block, + BlockTag, + EventType, + Filter, + Log, + + JsonRpcFetchFunc, + + Network, + Networkish + +} = require("@ethersproject/providers"); +``` -`@TODO` License ------- diff --git a/packages/random/README.md b/packages/random/README.md index f04a4efbd9..0ab3743960 100644 --- a/packages/random/README.md +++ b/packages/random/README.md @@ -1,15 +1,29 @@ Random Value Utilities ====================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions to assist with random numbers. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/bytes/#byte-manipulation--random-bytes). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + shuffled, + + randomBytes + +} = require("@ethersproject/random"); +``` -`@TODO` License ------- diff --git a/packages/rlp/README.md b/packages/rlp/README.md index 1693604f14..bffb36322a 100644 --- a/packages/rlp/README.md +++ b/packages/rlp/README.md @@ -1,15 +1,28 @@ Recursive-Length Prefix Coder ============================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions for encoding and decoding RLP data. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/encoding/#rlp--methods). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + encode, + decode + +} = require("@ethersproject/rlp"); +``` -`@TODO` License ------- diff --git a/packages/sha2/README.md b/packages/sha2/README.md index fce94ac488..901e51f98c 100644 --- a/packages/sha2/README.md +++ b/packages/sha2/README.md @@ -1,15 +1,36 @@ SHA2 Hash Functions =================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It is responsible for common cryptographic hashes and HMAC. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + ripemd160, + + sha256, + sha512, + + computeHmac, + + // Enums + + SupportedAlgorithm + +} = require("@ethersproject/sha2"); +``` -`@TODO` License ------- diff --git a/packages/shims/README.md b/packages/shims/README.md index e341bd2702..701538fbbc 100644 --- a/packages/shims/README.md +++ b/packages/shims/README.md @@ -1,15 +1,7 @@ Compatibility Shims (for constrained environments) ================================================== -**EXPERIMENTAL** - -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. - -API ---- - -`@TODO` +Common shims to fix incomplete environments. License ------- diff --git a/packages/signing-key/README.md b/packages/signing-key/README.md index b756558bb8..dbd6a021d5 100644 --- a/packages/signing-key/README.md +++ b/packages/signing-key/README.md @@ -1,5 +1,30 @@ Signing Key =========== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). +It is responsible for secp256-k1 signing, verifying and recovery operations. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/signing-key/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + SigningKey, + + computePublicKey, + recoverPublicKey + +} = require("@ethersproject/signing-key"); +``` + +License +------- + +MIT License diff --git a/packages/solidity/README.md b/packages/solidity/README.md index a8b9e70846..a15f1ec5ea 100644 --- a/packages/solidity/README.md +++ b/packages/solidity/README.md @@ -1,15 +1,29 @@ Solidity Packed-Encoding Utilities ================================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions to perform Solidity-specific packed (i.e. non-standard) +encoding operations. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/#utils--solidity-hashing). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + pack, + keccak256, + sha256 + +} = require("@ethersproject/solidity"); +``` -`@TODO` License ------- diff --git a/packages/strings/README.md b/packages/strings/README.md index 4b556cfdd7..f00aaa4e03 100644 --- a/packages/strings/README.md +++ b/packages/strings/README.md @@ -1,15 +1,45 @@ String Manipulation Utilities ============================= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions to safely convert between UTF-8 data, strings and Bytes32 strings +(i.e. "short strings"). -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/strings/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + toUtf8Bytes, + toUtf8CodePoints, + toUtf8String, + + formatBytes32String, + parseBytes32String, + + nameprep + + // Enums + + Utf8ErrorFuncs, + Utf8ErrorReason, + + UnicodeNormalizationForm + + // Types + + Utf8ErrorFunc, + +} = require("@ethersproject/strings"); +``` -`@TODO` License ------- diff --git a/packages/testcases/README.md b/packages/testcases/README.md index 1c6306a31f..9cb97afe67 100644 --- a/packages/testcases/README.md +++ b/packages/testcases/README.md @@ -1,15 +1,12 @@ Testcases for Ethereum ====================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains the testcases used to verify various Ethereum operations. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/testing/). -`@TODO` License ------- diff --git a/packages/tests/README.md b/packages/tests/README.md index dd1985d3e4..9b36ac7e47 100644 --- a/packages/tests/README.md +++ b/packages/tests/README.md @@ -1,15 +1,11 @@ Mocha Test Suite for Ethers =========================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains the tests to verify ethers is working correctly. -API ---- - -`@TODO` +For more information, see the [documentation](https://docs.ethers.io/v5/testing/). License ------- diff --git a/packages/transactions/README.md b/packages/transactions/README.md index 3ed096c2fc..63099df6ea 100644 --- a/packages/transactions/README.md +++ b/packages/transactions/README.md @@ -1,15 +1,36 @@ Ethereum Transaction Utilities ============================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains various functions for encoding and decoding serialized transactios. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/transactions/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + computeAddress, + recoverAddress, + + serialize, + parse, + + // Types + + Transaction, + UnsignedTransaction + +} = require("@ethersproject/abi"); +``` -`@TODO` License ------- diff --git a/packages/units/README.md b/packages/units/README.md index bc36335404..140220fc63 100644 --- a/packages/units/README.md +++ b/packages/units/README.md @@ -1,15 +1,34 @@ Ethereum Unit Conversion Utilities ================================== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions to convert between string representations and numeric +representations of numbers, including those out of the range of JavaScript. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/display-logic/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + formatUnits, + parseUnits, + + formatEther, + parseEther, + + commify + +} = require("@ethersproject/units"); +``` -`@TODO` License ------- diff --git a/packages/wallet/README.md b/packages/wallet/README.md index ea997424ee..d6fea3ed3d 100644 --- a/packages/wallet/README.md +++ b/packages/wallet/README.md @@ -1,15 +1,30 @@ Ethereum Wallet =============== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains the class to manage a private key and signing for a standard +externally-owned account. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/signer/#Wallet). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Wallet, + + verifyMessage + +} = require("@ethersproject/wallet"); +``` -`@TODO` License ------- diff --git a/packages/web/README.md b/packages/web/README.md index 16efcd0c4c..5ed09d1425 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -1,15 +1,37 @@ Web Utilities ============= -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. +It contains functions to abstract safely and responsibly connecting to the web, +including exponential back-off. -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/web/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + fetchJson, + + poll, + + // Types + ConnectionInfo, + FetchJsonResponse, + + PollOptions, + OncePollable, + OnceBlockable + +} = require("@ethersproject/web"); +``` -`@TODO` License ------- diff --git a/packages/wordlists/README.md b/packages/wordlists/README.md index a752ea3fd0..ac3cec441f 100644 --- a/packages/wordlists/README.md +++ b/packages/wordlists/README.md @@ -1,9 +1,10 @@ BIP39 Wordlists =============== -**EXPERIMENTAL** +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). Supported Languages: + - **en** - English - **es** - Spanish - **fr** - French @@ -13,13 +14,8 @@ Supported Languages: - **zh_cn** - Chinese (simplified) - **zh_tw** - Chinese (traditional) -Please see the [ethers](https://github.com/ethers-io/ethers.js) repository -for more informations. - -API ---- +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/wordlists/). -`@TODO` Browser ------- @@ -28,7 +24,6 @@ In the browser distribution file, only the English word list is included in the root `ethers` pacakge. To include additional word lists, they must be added using additional `