diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 25128183..7bb9a5f0 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -77,10 +77,10 @@ jobs: - name: generate docs content run: npx typedoc - - name: Copy generated documentation + - name: Copy generated documentation run: | - mkdir -p docs-repo/docs/content - cp -r docs/content/* quais-docs/content/ + mkdir -p quais-docs/sdk/content + cp -r docs/content/* quais-docs/sdk/content/ cd quais-docs/scripts node updateNavigation.js diff --git a/docs/plugins/typedoc-plugin-navigation-output.mjs b/docs/plugins/typedoc-plugin-navigation-output.mjs index e684322b..302740bc 100644 --- a/docs/plugins/typedoc-plugin-navigation-output.mjs +++ b/docs/plugins/typedoc-plugin-navigation-output.mjs @@ -15,7 +15,7 @@ export function load(app) { } const formattedNavigation = navigation.map((group) => ({ group: group.title, - pages: (group.children || []).map((child) => `content/${child.url.replace('.mdx', '')}`), + pages: (group.children || []).map((child) => `sdk/content/${child.url.replace('.mdx', '')}`), })); fs.writeFileSync('./docs/content/navigation.json', JSON.stringify(formattedNavigation, null, 2)); }); diff --git a/docs/static/abi.mdx b/docs/static/abi.mdx deleted file mode 100644 index 8b2de400..00000000 --- a/docs/static/abi.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Application Binary Interfaces -sidebarTitle: abi -description: 'Implement smart contracts through their Application Binary Interface (ABI).' -icon: 'bars' ---- - -When interacting with any application, whether it is on Quai Network, over the internet or within a compiled application on a computer all information is stored and sent as binary data which is just a sequence of bytes. - -So every application must agree on how to encode and decode their information as a sequence of bytes. - -An **Application Binary Interface** (ABI) provides a way to describe the encoding and decoding process, in a generic way so that a variety of types and structures of types can be defined. - -For example, a string is often encoded as a UTF-8 sequence of bytes, which uses specific bits within sub-sequences to indicate emoji and other special characters. Every implementation of UTF-8 must understand and operate under the same rules so that strings work universally. In this way, UTF-8 standard is itself an ABI. - -When interacting with Quai, a contract received a sequence of bytes as input (provided by sending a transaction or through a call) and returns a result as a sequence of bytes. So, each Contract has its own ABI that helps specify how to encode the input and how to decode the output. - -It is up to the contract developer to make this ABI available. Many Contracts implement a standard (such as ERC-20), in which case the ABI for that standard can be used. Many developers choose to verify their source code on quaiscan, in which case quaiscan computes the ABI and provides it through their website (which can be fetched using the `getContract` method). Otherwise, beyond reverse engineering the Contract there is not a meaningful way to extract the contract ABI. - -## Call Data Representation - -When calling a Contract on Quai, the input data must be encoded according to the ABI. - -The first 4 bytes of the data are the **method selector**, which isthe keccak256 hash of the normalized method signature. - -Then the method parameters are encoded and concatenated to the selector. - -All encoded data is made up of components padded to 32 bytes, so the length of input data will always be congruent to `4 mod 32`. - -The result of a successful call will be encoded values, whose components are padded to 32 bytes each as well, so the length of a result will always be congruent to `0 mod 32`, on success. - -The result of a reverted call will contain the **error selector** as the first 4 bytes, which is the keccak256 of the normalized error signature, followed by the encoded values, whose components are padded to 32 bytes each, so the length of a revert will be congruent to `4 mod 32`. - -The one exception to all this is that `revert(false)` will return aresult or `0x`. - -## Event Data Representation - -When an Event is emitted from a contract, there are two places data is logged in a Log: the **topics** and the **data**. - -An additonal fee is paid for each **topic**, but this affords a topic to be indexed in a bloom filter within the block, which allows efficient filtering. - -The **topic hash** is always the first topic in a Log, which is the keccak256 of the normalized event signature. This allows a specific event to be efficiently filtered, finding the matching events in a block. - -Each additional **indexed** parameter (i.e. parameters marked with `indexed` in the signautre) are placed in the topics as well, but may be filtered to find matching values. - -All non-indexed parameters are encoded and placed in the **data**. This is cheaper and more compact, but does not allow filtering on these values. - -For example, the event `Transfer(address indexed from, address indexed to, uint value)` would require 3 topics, which are the topic hash, the `from` address and the `to` address and the data would contain 32 bytes, which is the padded big-endian representation of `value`. This allows for efficient filtering by the event (i.e. `Transfer`) as well as the `from` address and `to` address. - -## Deployment - -When deploying a transaction, the data provided is treated as **initcode**, which executes the data as normal EVM bytecode, which returns a sequence of bytes, but instead of that sequence of bytes being treated as data that result is instead the bytecode to install as the bytecode of the contract. - -The bytecode produced by Solidity is designed to have all constructor parameters encoded normally and concatenated to the bytecode and provided as the `data` to a transaction with no `to` address. - -## Classes - -| | | -| :---------------------------------------------------------------- | :----------------------------------------------------------------- | -| [ConstructorFragment](/content/classes/ConstructorFragment) | A fragment of a contract ABI that represents a constructor. | -| [ErrorDescription](/content/classes/ErrorDescription) | A description of an error in a contract ABI. | -| [ErrorFragment](/content/classes/ErrorFragment) | A fragment of a contract ABI that represents an error. | -| [EventFragment](/content/classes/EventFragment) | A fragment of a contract ABI that represents an event. | -| [FallbackFragment](/content/classes/FallbackFragment) | A fragment of a contract ABI that represents a fallback function. | -| [Fragment](/content/classes/Fragment) | A fragment of a contract ABI. | -| [FunctionFragment](/content/classes/FunctionFragment) | A fragment of a contract ABI that represents a function. | -| [Indexed](/content/classes/Indexed) | A fragment of a contract ABI that represents an indexed parameter. | -| [Interface](/content/classes/Interface) | An interface ABI. | -| [LogDescription](/content/classes/LogDescription) | A description of a log in a contract ABI. | -| [NamedFragment](/content/classes/NamedFragment) | A fragment of a contract ABI that has a name. | -| [ParamType](/content/classes/ParamType) | A fragment of a contract ABI that represents a parameter type. | -| [Result](/content/classes/Result) | A fragment of a contract ABI that represents a result. | -| [StructFragment](/content/classes/StructFragment) | A fragment of a contract ABI that represents a struct. | -| [TransactionDescription](/content/classes/TransactionDescription) | A description of a transaction in a contract ABI. | -| [Typed](/content/classes/Typed) | A fragment of a contract ABI that represents a typed parameter. | - -## Interfaces - -| | | -| :------------------------------------------------------- | :----------------------------------------------------- | -| [JsonFragment](/content/interfaces/JsonFragment) | A JSON representation of a contract ABI fragment. | -| [JsonFragmentType](/content/interfaces/JsonFragmentType) | A JSON representation of a contract ABI fragment type. | - -## Types - -| | | -| :--------------------------------------------------------------------- | :----------------------------------------------------------------- | -| [FormatType](/content/type-aliases/FormatType) | A type that represents a format. | -| [FragmentType](/content/type-aliases/FragmentType) | A type that represents a fragment. | -| [InterfaceAbi](/content/type-aliases/InterfaceAbi) | A type that represents an interface ABI. | -| [ParamTypeWalkAsyncFunc](/content/type-aliases/ParamTypeWalkAsyncFunc) | A type that represents an async function to walk a parameter type. | -| [ParamTypeWalkFunc](/content/type-aliases/ParamTypeWalkFunc) | A type that represents a function to walk a parameter type. | - -## Functions - -| | | -| :------------------------------------------------------------ | :--------------------------------- | -| [checkResultErrors](/content/functions/checkResultErrors) | Check if a result contains errors. | -| [decodeBytes32String](/content/functions/decodeBytes32String) | Decode a bytes32 string. | -| [encodeBytes32String](/content/functions/encodeBytes32String) | Encode a string as bytes32. | diff --git a/docs/static/address.mdx b/docs/static/address.mdx deleted file mode 100644 index ad89dd68..00000000 --- a/docs/static/address.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Addresses -sidebarTitle: address -description: '' -icon: 'user-secret' ---- - -**Addresses are a fundamental part of interacting with Quai Network**. They represent the global identity of Externally Owned Accounts (accounts backed by a private key), contracts, and UTXO wallets. - -These functions help convert between various formats, validate addresses across the Quai and Qi address spaces, and other utilities for working with addresses. - -The Quais SDK supports the following address formats: - -- `quai` addresses -- `qi` addresses - -## Interfaces - -| | | -| :--------------------------------------------- | :--------------------------------------------- | -| [Addressable](/content/interfaces/Addressable) | An interface for objects that have an address. | - -## Types - -| | | -| :----------------------------------------------- | :--------------------------------- | -| [AddressLike](/content/type-aliases/AddressLike) | A type that represents an address. | - -## Functions - -| | | -| :-------------------------------------------------------- | :------------------------------------------------------------------------------------------ | -| [computeAddress](/content/functions/computeAddress) | Compute the address of a contract created by a given address and nonce. | -| [getAddress](/content/functions/getAddress) | Get the address of a contract created by a given address and nonce. | -| [getCreateAddress](/content/functions/getCreateAddress) | Get the address of a contract created by a given address and nonce. | -| [getCreate2Address](/content/functions/getCreate2Address) | Get the address of a contract created by a given address and salt using the CREATE2 opcode. | -| [isAddress](/content/functions/isAddress) | Check if a string is a valid address. | -| [isAddressable](/content/functions/isAddressable) | Check if an object is an addressable object. | -| [recoverAddress](/content/functions/recoverAddress) | Recover the address of a signer from a signature. | -| [resolveAddress](/content/functions/resolveAddress) | Resolve an address from a value. | diff --git a/docs/static/constants.mdx b/docs/static/constants.mdx deleted file mode 100644 index b63bdba1..00000000 --- a/docs/static/constants.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Constants -sidebarTitle: constants -description: 'A collection of useful constants when interacting with Quai Network.' -icon: 'cube' ---- - -Some common constants useful for interacting with Quai and Qi. - -## Variables - -| | | -| ------------------------------------------------- | ----------------------------------------------------- | -| [MaxInt256](/content/variables/MaxInt256) | The maximum value of a signed 256-bit integer. | -| [MaxUint256](/content/variables/MaxUint256) | The maximum value of an unsigned 256-bit integer. | -| [MessagePrefix](/content/variables/MessagePrefix) | The prefix used when signing messages. | -| [MinInt256](/content/variables/MinInt256) | The minimum value of a signed 256-bit integer. | -| [N](/content/variables/N) | The order of the elliptic curve used in Quai Network. | -| [WeiPerEther](/content/variables/WeiPerEther) | The number of wei in one ether. | -| [ZeroAddress](/content/variables/ZeroAddress) | The address that represents zero. | -| [ZeroHash](/content/variables/ZeroHash) | The hash that represents zero. | diff --git a/docs/static/contract.mdx b/docs/static/contract.mdx deleted file mode 100644 index 8cd25c93..00000000 --- a/docs/static/contract.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Contracts -sidebarTitle: Smart Contracts -description: 'Contract connection and interaction utilities.' -icon: 'file-code' ---- - -A Contract object is a meta-class, which **communicates with a deployed smart contract** on the blockchain and provides a simple JavaScript interface to call methods, send transaction, and query historic logs. - -## Classes - -| | | -| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| [BaseContract](/content/classes/BaseContract) | Base class for all contract types. | -| [Contract](/content/classes/Contract) | A contract class that can be connected to an address and allows for calling methods | -| [ContractEventPayload](/content/classes/ContractEventPayload) | A contract event payload. | -| [ContractFactory](/content/classes/ContractFactory) | A factory for deploying contracts. | -| [ContractTransactionReceipt](/content/classes/ContractTransactionReceipt) | A contract transaction receipt. | -| [ContractTransactionResponse](/content/classes/ContractTransactionResponse) | A contract transaction response. | -| [ContractUnknownEventPayload](/content/classes/ContractUnknownEventPayload) | A contract unknown event payload. | -| [EventLog](/content/classes/EventLog) | An event log. | -| [UndecodedEventLog](/content/classes/UndecodedEventLog) | An undecoded event log. | - -## Interfaces - -| | | -| -------------------------------------------------------------------------- | -------------------------------- | -| [BaseContractMethod](/content/interfaces/BaseContractMethod) | A base contract method. | -| [ConstantContractMethod](/content/interfaces/ConstantContractMethod) | A constant contract method. | -| [ContractDeployTransaction](/content/interfaces/ContractDeployTransaction) | A contract deploy transaction. | -| [ContractEvent](/content/interfaces/ContractEvent) | A contract event. | -| [ContractInterface](/content/interfaces/ContractInterface) | A contract interface. | -| [ContractMethod](/content/interfaces/ContractMethod) | A contract method. | -| [ContractRunner](/content/interfaces/ContractRunner) | A contract runner. | -| [ContractTransaction](/content/interfaces/ContractTransaction) | A contract transaction. | -| [DeferredTopicFilter](/content/interfaces/DeferredTopicFilter) | A deferred topic filter. | -| [Overrides](/content/interfaces/Overrides) | Overrides for a contract method. | -| [WrappedFallback](/content/interfaces/WrappedFallback) | A wrapped fallback function. | - -## Types - -| | | -| ------------------------------------------------------------ | --------------------------------------------- | -| [ContractEventName](/content/type-aliases/ContractEventName) | A type that represents a contract event name. | diff --git a/docs/static/cookbook/react-native.md b/docs/static/cookbook/react-native.md deleted file mode 100644 index a60dd9f7..00000000 --- a/docs/static/cookbook/react-native.md +++ /dev/null @@ -1,31 +0,0 @@ -# React Native - -When using React Native, many of the built-in cryptographic primitives can be replaced by native, substantially faster implementations. - -This should be available in its own package in the future, but for now this is highly recommended, and requires installing the [Quick Crypto](https://www.npmjs.com/package/react-native-quick-crypto) package. - -```js -import { quais } from 'quais'; - -import crypto from 'react-native-quick-crypto'; - -quais.randomBytes.register((length) => { - return new Uint8Array(crypto.randomBytes(length)); -}); - -quais.computeHmac.register((algo, key, data) => { - return crypto.createHmac(algo, key).update(data).digest(); -}); - -quais.pbkdf2.register((passwd, salt, iter, keylen, algo) => { - return crypto.pbkdf2Sync(passwd, salt, iter, keylen, algo); -}); - -quais.sha256.register((data) => { - return crypto.createHash('sha256').update(data).digest(); -}); - -quais.sha512.register((data) => { - return crypto.createHash('sha512').update(data).digest(); -}); -``` diff --git a/docs/static/cookbook/signing.md b/docs/static/cookbook/signing.md deleted file mode 100644 index e52a8fd1..00000000 --- a/docs/static/cookbook/signing.md +++ /dev/null @@ -1,218 +0,0 @@ -# Signing - -Signing content and providing the content and signature to a Contract allows on-chain validation that a signer has access to the private key of a specific address. - -The ecrecover algorithm allows the public key to be determined given some message digest and the signature generated by the private key for that digest. From the public key, the address can then be computed. - -How a digest is derived depends on the type of data being signed and a variety of encoding formats are employed. Each format is designed to ensure that they do not collide, so for example, a user **cannot** be tricked into signing a message which is actually a valid transaction. - -For this reason, most APIs in Quai Network do not permit signing a raw digest, and instead require a separate API for each format type and require the related data be specified, protecting the user from accidentally authorizing an action they didn't intend. - -## Messages - -A signed message can be any data, but it is generally recommended to use human-readable text, as this is easier for a user to verify visually. - -This technique could be used, for example, to sign into a service by using the text `"I am signing into qu.ai on 2023-06-04 12:57pm"`. The user can then see the message in Pelagus and accept that they wish to sign the message which the site can then authenticate them with. By providing a timestamp the site can ensure that an older signed message cannot be used again in the future. - -The format that is signed uses [EIP-191](https://eips.ethereum.org/EIPS/eip-191) with the **personal sign** version code (`0x45`, or `"E"`). - -For those interested in the choice of this prefix, signed messages began as a Bitcoin feature, which used `"\\x18Bitcoin Signed Message:\\n"`, which was a Bitcoin var-int length-prefixed string (as `0x18` is 24, the length of `"Bitcoin Signed Message:\\n"`.). When Ethereum adopted the similar feature, the relevant string was `"\\x19Ethereum Signed Message:\\n"`. - -In one of the most brilliant instances of technical retcon-ing, since 0x19 is invalid as the first byte of a transaction (in [Recursive-Length Prefix](https://ethereum.org/en/developers/docs data-structures-and-encoding/rlp/) it indicates a single byte of value 25), the initial byte `\\x19` has now been adopted as a prefix for //some sort of signed data//, where the second byte determines how to interpret that data. If the second byte is 69 (the letter `"E"`, as in `"Ethereum Signed Message:\\n"`), then the format is a the above prefixed message format. - -So, all existing messages, tools and instances using the signed message format were already EIP-191 compliant, long before the standard existed or was even conceived and allowed for an extensible format for future formats (of which there now a few). - -```js -// The contract below is deployed to Sepolia at this address -contractAddress = '0xf554DA5e35b2e40C09DDB481545A395da1736513'; -contract = new Contract( - contractAddress, - [ - 'function recoverStringFromCompact(string message, (bytes32 r, bytes32 yParityAndS) sig) pure returns (address)', - 'function recoverStringFromExpanded(string message, (uint8 v, bytes32 r, bytes32 s) sig) pure returns (address)', - 'function recoverStringFromVRS(string message, uint8 v, bytes32 r, bytes32 s) pure returns (address)', - 'function recoverStringFromRaw(string message, bytes sig) pure returns (address)', - 'function recoverHashFromCompact(bytes32 hash, (bytes32 r, bytes32 yParityAndS) sig) pure returns (address)', - ], - new quais.InfuraProvider('sepolia'), -); - -// The Signer; it does not need to be connected to a Provider to sign -signer = new Wallet(id('foobar')); -signer.address; - -// Our message -message = 'Hello World'; - -// The raw signature; 65 bytes -rawSig = await signer.signMessage(message); - -// Converting it to a Signature object provides more -// flexibility, such as using it as a struct -sig = Signature.from(rawSig); - -// If the signature matches the EIP-2098 format, a Signature -// can be passed as the struct value directly, since the -// parser will pull out the matching struct keys from sig. -await contract.recoverStringFromCompact(message, sig); - -// Likewise, if the struct keys match an expanded signature -// struct, it can also be passed as the struct value directly. -await contract.recoverStringFromExpanded(message, sig); - -// If using an older API which requires the v, r and s be passed -// separately, those members are present on the Signature. -await contract.recoverStringFromVRS(message, sig.v, sig.r, sig.s); - -// Or if using an API that expects a raw signature. -await contract.recoverStringFromRaw(message, rawSig); - -// Note: The above recovered addresses matches the signer address -``` - -The Solidity Contract has been deployed and verified on the Sepolia testnet at the address [0xf554DA5e35b2e40C09DDB481545A395da1736513](https://sepolia.quaiscan.io/address/0xf554da5e35b2e40c09ddb481545a395da1736513#code). - -It provides a variety of examples using various Signature encodings and formats, to recover the address for an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signed message. - -```solidity -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.21; - -// Returns the decimal string representation of value -function itoa(uint value) pure returns (string memory) { - - // Count the length of the decimal string representation - uint length = 1; - uint v = value; - while ((v /= 10) != 0) { length++; } - - // Allocated enough bytes - bytes memory result = new bytes(length); - - // Place each ASCII string character in the string, - // right to left - while (true) { - length--; - - // The ASCII value of the modulo 10 value - result[length] = bytes1(uint8(0x30 + (value % 10))); - - value /= 10; - - if (length == 0) { break; } - } - - return string(result); -} - -contract RecoverMessage { - - // This is the EIP-2098 compact representation, which reduces gas costs - struct SignatureCompact { - bytes32 r; - bytes32 yParityAndS; - } - - // This is an expaned Signature representation - struct SignatureExpanded { - uint8 v; - bytes32 r; - bytes32 s; - } - - // Helper function - function _ecrecover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { - // Compute the EIP-191 prefixed message - bytes memory prefixedMessage = abi.encodePacked( - "\x19Ethereum Signed Message:\n", - itoa(bytes(message).length), - message - ); - - // Compute the message digest - bytes32 digest = keccak256(prefixedMessage); - - // Use the native ecrecover provided by the EVM - return ecrecover(digest, v, r, s); - } - - // Recover the address from an EIP-2098 compact Signature, which packs the bit for - // v into an unused bit within s, which saves gas overall, costing a little extra - // in computation, but saves far more in calldata length. - // - // This Signature format is 64 bytes in length. - function recoverStringFromCompact(string calldata message, SignatureCompact calldata sig) public pure returns (address) { - - // Decompose the EIP-2098 signature (the struct is 64 bytes in length) - uint8 v = 27 + uint8(uint256(sig.yParityAndS) >> 255); - bytes32 s = bytes32((uint256(sig.yParityAndS) << 1) >> 1); - - return _ecrecover(message, v, sig.r, s); - } - - // Recover the address from the expanded Signature struct. - // - // This Signature format is 96 bytes in length. - function recoverStringFromExpanded(string calldata message, SignatureExpanded calldata sig) public pure returns (address) { - - // The v, r and s are included directly within the struct, which is 96 bytes in length - return _ecrecover(message, sig.v, sig.r, sig.s); - } - - // Recover the address from a v, r and s passed directly into the method. - // - // This Signature format is 96 bytes in length. - function recoverStringFromVRS(string calldata message, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { - - // The v, r and s are included directly within the struct, which is 96 bytes in length - return _ecrecover(message, v, r, s); - } - - // Recover the address from a raw signature. The signature is 65 bytes, which when - // ABI encoded is 160 bytes long (a pointer, a length and the padded 3 words of data). - // - // When using raw signatures, some tools return the v as 0 or 1. In this case you must - // add 27 to that value as v must be either 27 or 28. - // - // This Signature format is 65 bytes of data, but when ABI encoded is 160 bytes in length; - // a pointer (32 bytes), a length (32 bytes) and the padded 3 words of data (96 bytes). - function recoverStringFromRaw(string calldata message, bytes calldata sig) public pure returns (address) { - - // Sanity check before using assembly - require(sig.length == 65, "invalid signature"); - - // Decompose the raw signature into r, s and v (note the order) - uint8 v; - bytes32 r; - bytes32 s; - assembly { - r := calldataload(sig.offset) - s := calldataload(add(sig.offset, 0x20)) - v := calldataload(add(sig.offset, 0x21)) - } - - return _ecrecover(message, v, r, s); - } - - // This is provided as a quick example for those that only need to recover a signature - // for a signed hash (highly discouraged; but common), which means we can hardcode the - // length in the prefix. This means we can drop the itoa and _ecrecover functions above. - function recoverHashFromCompact(bytes32 hash, SignatureCompact calldata sig) public pure returns (address) { - bytes memory prefixedMessage = abi.encodePacked( - // Notice the length of the message is hard-coded to 32 - // here -----------------------v - "\x19Ethereum Signed Message:\n32", - hash - ); - - bytes32 digest = keccak256(prefixedMessage); - - // Decompose the EIP-2098 signature - uint8 v = 27 + uint8(uint256(sig.yParityAndS) >> 255); - bytes32 s = bytes32((uint256(sig.yParityAndS) << 1) >> 1); - - return ecrecover(digest, v, sig.r, s); - } -} -``` diff --git a/docs/static/crypto.mdx b/docs/static/crypto.mdx deleted file mode 100644 index 59691c5c..00000000 --- a/docs/static/crypto.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Cryptographic Functions -sidebarTitle: crypto -description: 'A set of common cryptographic functions used in Quai Network.' -icon: 'brackets-curly' ---- - -A fundamental building block of Quai Network is the underlying **cryptographic primitives**. - -## Classes - -| | | -| ----------------------------------------- | ---------------------------- | -| [Signature](/content/classes/Signature) | A cryptographic signature. | -| [SigningKey](/content/classes/SigningKey) | A cryptographic signing key. | - -## Types - -| | | -| ---------------------------------------------------------- | -------------------------------------------------------- | -| [ProgressCallback](/content/type-aliases/ProgressCallback) | A callback function that can be used to report progress. | -| [SignatureLike](/content/type-aliases/SignatureLike) | A signature-like object. | - -## Functions - -| | | -| --------------------------------------------- | ------------------------------------------------- | -| [computeHmac](/content/functions/computeHmac) | Compute an HMAC. | -| [keccak256](/content/functions/keccak256) | Compute the Keccak-256 hash of a value. | -| [lock](/content/functions/lock) | Lock a function to prevent reentrancy. | -| [pbkdf2](/content/functions/pbkdf2) | Compute a PBKDF2 hash. | -| [randomBytes](/content/functions/randomBytes) | Generate random bytes. | -| [ripemd160](/content/functions/ripemd160) | Compute the RIPEMD-160 hash of a value. | -| [scrypt](/content/functions/scrypt) | Compute the scrypt hash of a value. | -| [scryptSync](/content/functions/scryptSync) | Compute the scrypt hash of a value synchronously. | -| [sha256](/content/functions/sha256) | Compute the SHA-256 hash of a value. | -| [sha512](/content/functions/sha512) | Compute the SHA-512 hash of a value. | diff --git a/docs/static/encoding.mdx b/docs/static/encoding.mdx deleted file mode 100644 index 8861eefa..00000000 --- a/docs/static/encoding.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Encoding Utilities -sidebarTitle: encoding -description: 'Utilities for common tasks involving data encoding.' -icon: 'laptop-binary' ---- - -A collection of useful encoding functions, many of which used when handling of `WorkObjects` and **Protobuf encoded data**. - -## Types - -| | | -| -------------------------------------------------------------------------- | --------------------------------------------------- | -| [UnicodeNormalizationForm](/content/type-aliases/UnicodeNormalizationForm) | A Unicode normalization form. | -| [Utf8ErrorFunc](/content/type-aliases/Utf8ErrorFunc) | A function that can be used to handle UTF-8 errors. | -| [Utf8ErrorReason](/content/type-aliases/Utf8ErrorReason) | A reason for a UTF-8 error. | - -## Variables - -| | | -| --------------------------------------------------- | ----------------------------------------------- | -| [Utf8ErrorFuncs](/content/variables/Utf8ErrorFuncs) | A set of common UTF-8 error handling functions. | - -## Functions - -| | | -| ------------------------------------------------------------------- | -------------------------------------- | -| [decodeBase58](/content/functions/decodeBase58) | Decode a Base58-encoded string. | -| [decodeBase64](/content/functions/decodeBase64) | Decode a Base64-encoded string. | -| [decodeProtoTransaction](/content/functions/decodeProtoTransaction) | Decode a protobuf-encoded transaction. | -| [decodeProtoWorkObject](/content/functions/decodeProtoWorkObject) | Decode a protobuf-encoded work object. | -| [encodeBase58](/content/functions/encodeBase58) | Encode a string as Base58. | -| [encodeBase64](/content/functions/encodeBase64) | Encode a string as Base64. | -| [encodeProtoTransaction](/content/functions/encodeProtoTransaction) | Encode a transaction as a protobuf. | -| [encodeProtoWorkObject](/content/functions/encodeProtoWorkObject) | Encode a work object as a protobuf. | -| [toUtf8Bytes](/content/functions/toUtf8Bytes) | Convert a string to UTF-8 bytes. | -| [toUtf8CodePoints](/content/functions/toUtf8CodePoints) | Convert a string to UTF-8 code points. | -| [toUtf8String](/content/functions/toUtf8String) | Convert a string to UTF-8. | diff --git a/docs/static/hash.mdx b/docs/static/hash.mdx deleted file mode 100644 index 32e4cd45..00000000 --- a/docs/static/hash.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Hashing Utilities -sidebarTitle: hash -description: 'Utilities for common tasks involving hashing.' -icon: 'binary-lock' ---- - -A collection of useful hashing functions, generally used for *typed data*, *message verification*, and *Solidity operations*. - -## Classes - -| | | -| ----------------------------------------------------- | ---------------------------------------- | -| [TypedDataEncoder](/content/classes/TypedDataEncoder) | A utility class for encoding typed data. | - -## Interfaces - -| | | -| ------------------------------------------------------ | ----------------------------------- | -| [TypedDataDomain](/content/interfaces/TypedDataDomain) | A domain definition for typed data. | -| [TypedDataField](/content/interfaces/TypedDataField) | A field definition for typed data. | - -## Functions - -| | | -| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| [hashMessage](/content/functions/hashMessage) | Hash a message using the specified algorithm. | -| [id](/content/functions/id) | Compute the ID of a typed data domain. | -| [solidityPacked](/content/functions/solidityPacked) | Compute the solidity-packed data of a typed data domain. | -| [solidityPackedKeccak256](/content/functions/solidityPackedKeccak256) | Compute the solidity-packed data of a typed data domain and hash it with Keccak256. | -| [solidityPackedSha256](/content/functions/solidityPackedSha256) | Compute the solidity-packed data of a typed data domain and hash it with SHA256. | -| [verifyMessage](/content/functions/verifyMessage) | Verify a message signature. | -| [verifyTypedData](/content/functions/verifyTypedData) | Verify a typed data signature. | diff --git a/docs/static/provider.mdx b/docs/static/provider.mdx deleted file mode 100644 index 94112412..00000000 --- a/docs/static/provider.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: Providers -sidebarTitle: Network Providers -description: 'Configure and utilize a Provider to interact with Quai Network.' -icon: 'circle-nodes' ---- - -**A Provider establishes a connection to the blockchain**, whch can be used to query its current state, simulate execution and send transactions to update the state. - -Providers are one of the most fundamental components of interacting with a blockchain application, and there are many ways to connect, such as *over HTTP*, *WebSockets* or *injected providers such as Pelagus*. - -## Classes - -| | | -| ------------------------------------------------------------------- | --------------------------------------------------------------------- | -| [AbstractProvider](/content/classes/AbstractProvider) | The base class for all providers. | -| [Block](/content/classes/Block) | Represents a block on the blockchain. | -| [BrowserProvider](/content/classes/BrowserProvider) | A provider that uses the browser's built-in provider. | -| [FeeData](/content/classes/FeeData) | Represents the fee data for a transaction. | -| [JsonRpcApiProvider](/content/classes/JsonRpcApiProvider) | A provider that uses a JSON-RPC API. | -| [JsonRpcProvider](/content/classes/JsonRpcProvider) | A provider that uses a JSON-RPC API. | -| [Log](/content/classes/Log) | Represents a log entry on the blockchain. | -| [Network](/content/classes/Network) | Represents a network on the blockchain. | -| [SocketBlockSubscriber](/content/classes/SocketBlockSubscriber) | A subscriber that listens for new blocks. | -| [SocketEventSubscriber](/content/classes/SocketEventSubscriber) | A subscriber that listens for new events. | -| [SocketPendingSubscriber](/content/classes/SocketPendingSubscriber) | A subscriber that listens for pending transactions. | -| [SocketProvider](/content/classes/SocketProvider) | A provider that uses a WebSocket connection. | -| [SocketSubscriber](/content/classes/SocketSubscriber) | A base class for all socket subscribers. | -| [TransactionReceipt](/content/classes/TransactionReceipt) | Represents the receipt of a transaction. | -| [UnmanagedSubscriber](/content/classes/UnmanagedSubscriber) | A subscriber that listens for events without managing the connection. | -| [WebSocketProvider](/content/classes/WebSocketProvider) | A provider that uses a WebSocket connection. | - -## Interfaces - -| | | -| ------------------------------------------------------------------------ | --------------------------------------------- | -| [AbstractProviderPlugin](/content/interfaces/AbstractProviderPlugin) | An abstract provider plugin. | -| [BlockParams](/content/interfaces/BlockParams) | Parameters for querying blocks. | -| [Eip1193Provider](/content/interfaces/Eip1193Provider) | An EIP-1193 provider. | -| [EventFilter](/content/interfaces/EventFilter) | A filter for events. | -| [Filter](/content/interfaces/Filter) | A filter for logs. | -| [FilterByBlockHash](/content/interfaces/FilterByBlockHash) | A filter for logs by block hash. | -| [LogParams](/content/interfaces/LogParams) | Parameters for querying logs. | -| [MinedBlock](/content/interfaces/MinedBlock) | A mined block. | -| [Provider](/content/interfaces/Provider) | A provider for the blockchain. | -| [Subscriber](/content/interfaces/Subscriber) | A subscriber for the blockchain. | -| [TransactionReceiptParams](/content/interfaces/TransactionReceiptParams) | Parameters for querying transaction receipts. | -| [WebSocketLike](/content/interfaces/WebSocketLike) | A WebSocket-like interface. | - -## Types - -| | | -| ------------------------------------------------------------------------------ | --------------------------------------- | -| [AbstractProviderOptions](/content/type-aliases/AbstractProviderOptions) | Options for an abstract provider. | -| [BlockTag](/content/type-aliases/BlockTag) | A block tag. | -| [DebugEventBrowserProvider](/content/type-aliases/DebugEventBrowserProvider) | A debug event browser provider. | -| [JsonRpcApiProviderOptions](/content/type-aliases/JsonRpcApiProviderOptions) | Options for a JSON-RPC API provider. | -| [JsonRpcError](/content/type-aliases/JsonRpcError) | An error from a JSON-RPC API. | -| [JsonRpcPayload](/content/type-aliases/JsonRpcPayload) | A JSON-RPC payload. | -| [JsonRpcResult](/content/type-aliases/JsonRpcResult) | A JSON-RPC result. | -| [MinedTransactionResponse](/content/type-aliases/MinedTransactionResponse) | A mined transaction response. | -| [Networkish](/content/type-aliases/Networkish) | A networkish type. | -| [OrphanFilter](/content/type-aliases/OrphanFilter) | An orphan filter. | -| [PerformActionFilter](/content/type-aliases/PerformActionFilter) | A filter for performing an action. | -| [PerformActionRequest](/content/type-aliases/PerformActionRequest) | A request for performing an action. | -| [PerformActionTransaction](/content/type-aliases/PerformActionTransaction) | A transaction for performing an action. | -| [PreparedTransactionRequest](/content/type-aliases/PreparedTransactionRequest) | A request for a prepared transaction. | -| [ProviderEvent](/content/type-aliases/ProviderEvent) | A provider event. | -| [Subscription](/content/type-aliases/Subscription) | A subscription. | -| [TopicFilter](/content/type-aliases/TopicFilter) | A filter for topics. | -| [TransactionRequest](/content/type-aliases/TransactionRequest) | A transaction request. | -| [TransactionResponse](/content/type-aliases/TransactionResponse) | A transaction response. | -| [TransactionResponseParams](/content/type-aliases/TransactionResponseParams) | Parameters for a transaction response. | -| [WebSocketCreator](/content/type-aliases/WebSocketCreator) | A WebSocket creator. | - -## Functions - -| | | -| --------------------------------------------- | --------------- | -| [copyRequest](/content/functions/copyRequest) | Copy a request. | diff --git a/docs/static/signer.mdx b/docs/static/signer.mdx deleted file mode 100644 index ec1d27fc..00000000 --- a/docs/static/signer.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Signers -sidebarTitle: Signers -description: 'Configure and manage signers for Quai and Qi.' -icon: 'key-skeleton-left-right' ---- - -A Signer can represent an account on the either the Quai or Qi ledger, and is most often backed by a private key represented by a mnemonic or residing on a Hardware Wallet. - -## Classes - -| | | -| ------------------------------------------------- | ----------------------------------------- | -| [AbstractSigner](/content/classes/AbstractSigner) | An abstract signer class. | -| [VoidSigner](/content/classes/VoidSigner) | A signer that does not sign transactions. | - -## Interfaces - -| | | -| ------------------------------------ | ---------------------------------------------------- | -| [Signer](/content/interfaces/Signer) | An interface for objects that can sign transactions. | diff --git a/docs/static/transactions.mdx b/docs/static/transactions.mdx deleted file mode 100644 index 1ccc9659..00000000 --- a/docs/static/transactions.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Transactions -sidebarTitle: Transactions -description: 'Build and sign transactions on Quai Network.' -icon: 'split' ---- - -Transactions are a fundamental piece of Quai Network. **Every state-changing operation within the network requires a signed transaction**. - -The Quais SDK supports both **Qi and Quai transactions**, and provides utilities for building and signing transactions. - -## Classes - -| | | -| ----------------------------------------------------------- | ---------------------------------------------- | -| [AbstractTransaction](/content/classes/AbstractTransaction) | An abstract transaction class. | -| [FewestCoinSelector](/content/classes/FewestCoinSelector) | A coin selector that selects the fewest coins. | -| [QiTransaction](/content/classes/QiTransaction) | A transaction on the Qi network. | - -## Interfaces - -| | | -| ------------------------------------------------------ | ----------------------------------------------------- | -| [TransactionLike](/content/interfaces/TransactionLike) | An interface for objects that represent transactions. | - -## Types - -| | | -| -------------------------------------------------------- | ----------------------------------------------------- | -| [AccessList](/content/type-aliases/AccessList) | A type that represents an access list. | -| [AccessListEntry](/content/type-aliases/AccessListEntry) | A type that represents an access list entry. | -| [AccessListish](/content/type-aliases/AccessListish) | A type that represents an access list or access list. | - -## Functions - -| | | -| ------------------------------------------------- | ----------------------------------------------------------- | -| [accessListify](/content/functions/accessListify) | Convert an access list or access listish to an access list. | diff --git a/docs/static/utils.mdx b/docs/static/utils.mdx deleted file mode 100644 index 33fb01dc..00000000 --- a/docs/static/utils.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Utilities -sidebarTitle: utils -description: 'Utility functions for common tasks.' -icon: 'wrench-simple' ---- - -A collection of useful utilities for manipulating data, mathematical operations, and more. - -A large number of the available utilities are generally for *internal use and are not intended to be used directly by developers*. However, there are a number of utilities that are useful for developers, such as the `FixedNumber` class, which provides fixed-point arithmetic, and the `EventPayload` class, which provides a way to encode event payloads. - -## Classes - -| | | -| ----------------------------------------------- | --------------------------------------------- | -| [EventPayload](/content/classes/EventPayload) | A utility class for encoding event payloads. | -| [FetchRequest](/content/classes/FetchRequest) | A utility class for making fetch requests. | -| [FetchResponse](/content/classes/FetchResponse) | A utility class for handling fetch responses. | -| [FixedNumber](/content/classes/FixedNumber) | A utility class for fixed-point numbers. | - -## Interfaces - -| | | -| ------------------------------------------------------------------------------ | ------------------------------------------------------- | -| [ActionRejectedError](/content/interfaces/ActionRejectedError) | An error that occurs when an action is rejected. | -| [BadDataError](/content/interfaces/BadDataError) | An error that occurs when data is bad. | -| [BufferOverrunError](/content/interfaces/BufferOverrunError) | An error that occurs when a buffer is overrun. | -| [CallExceptionError](/content/interfaces/CallExceptionError) | An error that occurs when a call exception is thrown. | -| [CancelledError](/content/interfaces/CancelledError) | An error that occurs when an operation is cancelled. | -| [EventEmitterable](/content/interfaces/EventEmitterable) | An interface for objects that can emit events. | -| [InsufficientFundsError](/content/interfaces/InsufficientFundsError) | An error that occurs when there are insufficient funds. | -| [InvalidArgumentError](/content/interfaces/InvalidArgumentError) | An error that occurs when an argument is invalid. | -| [MissingArgumentError](/content/interfaces/MissingArgumentError) | An error that occurs when an argument is missing. | -| [NetworkError](/content/interfaces/NetworkError) | An error that occurs when a network error occurs. | -| [NonceExpiredError](/content/interfaces/NonceExpiredError) | An error that occurs when a nonce is expired. | -| [NotImplementedError](/content/interfaces/NotImplementedError) | An error that occurs when a method is not implemented. | -| [NumericFaultError](/content/interfaces/NumericFaultError) | An error that occurs when a numeric fault occurs. | -| [ReplacementUnderpricedError](/content/interfaces/ReplacementUnderpricedError) | An error that occurs when a replacement is underpriced. | -| [ServerError](/content/interfaces/ServerError) | An error that occurs when a server error occurs. | -| [TimeoutError](/content/interfaces/TimeoutError) | An error that occurs when a timeout occurs. | -| [TransactionReplacedError](/content/interfaces/TransactionReplacedError) | An error that occurs when a transaction is replaced. | -| [UnexpectedArgumentError](/content/interfaces/UnexpectedArgumentError) | An error that occurs when an argument is unexpected. | -| [UnknownError](/content/interfaces/UnknownError) | An error that occurs when an unknown error occurs. | -| [UnsupportedOperationError](/content/interfaces/UnsupportedOperationError) | An error that occurs when an operation is unsupported. | -| [quaisError](/content/interfaces/quaisError) | An interface for quais errors. | - -## Types - -| | | -| -------------------------------------------------------------------------- | ---------------------------------------------------- | -| [BigNumberish](/content/type-aliases/BigNumberish) | A type that represents a big number. | -| [BytesLike](/content/type-aliases/BytesLike) | A type that represents bytes. | -| [CallExceptionAction](/content/type-aliases/CallExceptionAction) | A type that represents a call exception action. | -| [CallExceptionTransaction](/content/type-aliases/CallExceptionTransaction) | A type that represents a call exception transaction. | -| [CodedquaisError](/content/type-aliases/CodedquaisError) | A type that represents a coded quais error. | -| [ErrorCode](/content/type-aliases/ErrorCode) | A type that represents an error code. | -| [FetchGatewayFunc](/content/type-aliases/FetchGatewayFunc) | A type that represents a fetch gateway function. | -| [FetchGetUrlFunc](/content/type-aliases/FetchGetUrlFunc) | A type that represents a fetch get URL function. | -| [FetchPreflightFunc](/content/type-aliases/FetchPreflightFunc) | A type that represents a fetch preflight function. | -| [FetchProcessFunc](/content/type-aliases/FetchProcessFunc) | A type that represents a fetch process function. | -| [FetchRetryFunc](/content/type-aliases/FetchRetryFunc) | A type that represents a fetch retry function. | -| [FixedFormat](/content/type-aliases/FixedFormat) | A type that represents a fixed format. | -| [GetUrlResponse](/content/type-aliases/GetUrlResponse) | A type that represents a get URL response. | -| [Listener](/content/type-aliases/Listener) | A type that represents a listener. | -| [Numeric](/content/type-aliases/Numeric) | A type that represents a numeric value. | - -## Functions - -| | | -| ----------------------------------------------------------- | -------------------------------------------------- | -| [assert](/content/functions/assert) | Asserts that a condition is true. | -| [assertArgument](/content/functions/assertArgument) | Asserts that an argument is valid. | -| [assertNormalize](/content/functions/assertNormalize) | Asserts that a value is normalized. | -| [assertPrivate](/content/functions/assertPrivate) | Asserts that a value is private. | -| [concat](/content/functions/concat) | Concatenates two arrays. | -| [dataLength](/content/functions/dataLength) | Gets the length of a data array. | -| [dataSlice](/content/functions/dataSlice) | Slices a data array. | -| [defineProperties](/content/functions/defineProperties) | Defines properties on an object. | -| [formatEther](/content/functions/formatEther) | Formats a value in ether. | -| [formatQuai](/content/functions/formatQuai) | Formats a value in quai. | -| [formatUnits](/content/functions/formatUnits) | Formats a value in units. | -| [fromTwos](/content/functions/fromTwos) | Converts a two's complement value to a big number. | -| [getAddressDetails](/content/functions/getAddressDetails) | Gets details about an address. | -| [getBigInt](/content/functions/getBigInt) | Gets a big integer. | -| [getBytes](/content/functions/getBytes) | Gets a bytes array. | -| [getBytesCopy](/content/functions/getBytesCopy) | Gets a copy of a bytes array. | -| [getNumber](/content/functions/getNumber) | Gets a number. | -| [getShardForAddress](/content/functions/getShardForAddress) | Gets the shard for an address. | -| [getTxType](/content/functions/getTxType) | Gets the type of a transaction. | -| [hexlify](/content/functions/hexlify) | Converts a value to a hex string. | -| [isBytesLike](/content/functions/isBytesLike) | Checks if a value is bytes-like. | -| [isCallException](/content/functions/isCallException) | Checks if a value is a call exception. | -| [isError](/content/functions/isError) | Checks if a value is an error. | -| [isHexString](/content/functions/isHexString) | Checks if a value is a hex string. | -| [isQiAddress](/content/functions/isQiAddress) | Checks if a value is a Qi address. | -| [makeError](/content/functions/makeError) | Makes an error. | -| [mask](/content/functions/mask) | Masks a value. | -| [parseEther](/content/functions/parseEther) | Parses a value in ether. | -| [parseQuai](/content/functions/parseQuai) | Parses a value in quai. | -| [parseUnits](/content/functions/parseUnits) | Parses a value in units. | -| [resolveProperties](/content/functions/resolveProperties) | Resolves properties on an object. | -| [stripZerosLeft](/content/functions/stripZerosLeft) | Strips zeros from the left of a value. | -| [toBeArray](/content/functions/toBeArray) | Checks if a value is an array. | -| [toBeHex](/content/functions/toBeHex) | Checks if a value is a hex string. | -| [toBigInt](/content/functions/toBigInt) | Converts a value to a big integer. | -| [toNumber](/content/functions/toNumber) | Converts a value to a number. | -| [toQuantity](/content/functions/toQuantity) | Converts a value to a quantity. | -| [toTwos](/content/functions/toTwos) | Converts a value to two's complement. | -| [uuidV4](/content/functions/uuidV4) | Generates a UUID v4. | -| [zeroPadBytes](/content/functions/zeroPadBytes) | Zero-pads a bytes array. | -| [zeroPadValue](/content/functions/zeroPadValue) | Zero-pads a value. | diff --git a/docs/static/wallet.mdx b/docs/static/wallet.mdx deleted file mode 100644 index e7696c31..00000000 --- a/docs/static/wallet.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Wallets -sidebarTitle: Wallets -description: 'A combination of generalized and low-level wallet tools.' -icon: 'wallet' ---- - -When interacting with either Qi or Quai, it is necessary to use a private key authenticate actions by signing a payload. - -**Wallets are the simplest way** to expose the concept of an Externally Owner Account (EOA) or UTXO account as it wraps a private key and supports high-level methods to sign common types of interaction and send transactions. - -The class most developers will want to use is Wallet, **which can load a private key directly or from any common wallet format**. - -## Classes - -| | | -| ----------------------------------------------------- | -------------------------------------------------------------------- | -| [BaseWallet](/content/classes/BaseWallet) | An abstract wallet class. | -| [HDNodeVoidWallet](/content/classes/HDNodeVoidWallet) | A Hierarchical Deterministic wallet that does not sign transactions. | -| [Mnemonic](/content/classes/Mnemonic) | A mnemonic wallet. | -| [QiHDWallet](/content/classes/QiHDWallet) | A Hierarchical Deterministic wallet for the Qi network. | -| [QuaiHDWallet](/content/classes/QuaiHDWallet) | A Hierarchical Deterministic wallet for the Quai network. | -| [Wallet](/content/classes/Wallet) | A wallet that can sign transactions. | - -## Types - -| | | -| -------------------------------------------------------- | ------------------------------------- | -| [EncryptOptions](/content/type-aliases/EncryptOptions) | Options for encrypting a private key. | -| [KeystoreAccount](/content/type-aliases/KeystoreAccount) | A keystore account. | - -## Functions - -| | | -| --------------------------------------------------------------------- | --------------------------------------------- | -| [decryptKeystoreJson](/content/functions/decryptKeystoreJson) | Decrypt a keystore JSON object. | -| [decryptKeystoreJsonSync](/content/functions/decryptKeystoreJsonSync) | Decrypt a keystore JSON object synchronously. | -| [encryptKeystoreJson](/content/functions/encryptKeystoreJson) | Encrypt a keystore JSON object. | -| [encryptKeystoreJsonSync](/content/functions/encryptKeystoreJsonSync) | Encrypt a keystore JSON object synchronously. | -| [isKeystoreJson](/content/functions/isKeystoreJson) | Check if a JSON object is a keystore. | diff --git a/docs/static/wordlists.mdx b/docs/static/wordlists.mdx deleted file mode 100644 index 0c16a01d..00000000 --- a/docs/static/wordlists.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Wordlists -sidebarTitle: wordlists -description: 'A collection of wordlists for use in various applications.' -icon: 'keyboard' ---- - -A Wordlist is a set of 2048 words used to encode private keys (or other binary data) that is **easier for humans to write down, transcribe and dictate**. - -The BIP-39 standard includes several checksum bits, depending on the size of the mnemonic phrase. - -A mnemonic phrase may be 12, 15, 18, 21 or 24 words long. For most purposes 12 word mnemonics should be used, as including additional words increases the difficulty and potential for mistakes and does not offer any effective improvement on security. - -There are a variety of BIP-39 Wordlists for different languages, *but the most common is the English wordlist*. - -## Classes - -| | | -| ------------------------------------------- | -------------------------------------- | -| [LangEn](/content/classes/LangEn) | The English BIP-39 wordlist. | -| [LangEs](/content/classes/LangEs) | The Spanish BIP-39 wordlist. | -| [Wordlist](/content/classes/Wordlist) | An abstract wordlist class. | -| [WordlistOwl](/content/classes/WordlistOwl) | A wordlist that uses the Owl language. | - -## Variables - -| | | -| ----------------------------------------- | --------------------------------- | -| [wordlists](/content/variables/wordlists) | A set of common BIP-39 wordlists. |