Expand description
WalletD
This library facilitates the creation and use of non-custodial multi-currency wallets.
Re-exports
pub use walletd_bip39;pub use walletd_bitcoin;pub use walletd_coin_core;pub use walletd_ethereum;pub use walletd_hd_key;pub use walletd_mnemonics_core;
Modules
- This module contains the implementation of the handling getting information to and from the bitcoin blockchain using the Blockstream Esplora JSON over HTTP API https://github.com/Blockstream/esplora/blob/master/API.md
Structs
- Struct representing a Bip39 mnemonic.
- BitcoinAmount contains a field representing the amount of satoshis in the amount. It also has functions to convert to and from the main unit (BTC) and the smallest unit (satoshi).
- Represents a Bitcoin wallet which can have mulitple BitcoinAddress structs associated with it which are derived from a single master HD key.
- EthClient is a blockchain connector for Ethereum, it contains a web3 instance using a HTTP transport
- EthereumAmount contains a field representing the amount of wei in the amount. It also has functions to convert to and from the main unit (ETH) and the smallest unit (wei).
- The EthereumWallet struct contains the information needed to interact with an Ethereum wallet with a single public address associated with it.
- This struct can be used to represent and create a master key or derive child keys.
- This struct contains vector of
HDPathIndexto represent a derivation path. HDPathBuilderis a builder for theHDPath, it allows specification of the standard full path and also which component are hardened. The default implementation uses the standard format for the full path.- The struct holds info about a mnemonic type and the associated seed and phrase as well as the network type. It enables the creation of a HD wallet from a mnemonic phrase that could be used with multiple cryptocurrencies.
- This struct is used specify options for and build a KeyPair struct
- Stores the secret value which can be used to derive a hierarchical deterministic wallet.
Enums
- Determines the number of words that will make up the
Mnemonicphrase - ConnectorType is an enum that represents the type of connector that is being used, the different enum variants are meant to bue used with different cryptocurrency types and the generic type T is meant to be a specific struct that implements the BlockchainConnector trait
- An enum representing the different crypto coins that are supported by WalletD
- Custom error type for this crate.
- EthereumFormat is an enum that represents the format of an Ethereum address (checksummed or non-checksummed)
- This enum represents the different network types supported by the library.
- This enum distinguishes between the different derivation path components.
- This enum represents the different derivation path schemes supported by the library.
- The MnemonicKeyPairType enum is used to specify the type of mnemonic phrase
Traits
- BlockchainConnector trait is used to connect to a blockchain and send and receive information to and from the blockchain.
- BlockchainConnectorGeneral is a general trait that can work with any struct that implements the BlockchainConnector trait
- CryptoAddress is a trait that defines the public address of a crypto currency
- The CryptoAmount trait provides a common interface handling crypto amounts. It provides functions to convert to and from the main unit and the smallest unit of the coin.
- CryptoWallet is a trait that provides common functionality for a crypto wallet. It provides functions to get the balance, send and receive transactions, and sync the wallet with the blockchain.
- CryptoWalletBuilder is a trait that provides a common interface for building a CryptoWallet
- CryptoWalletGeneral is a general trait that can work with any struct that implements the CryptoWallet trait
- The MnemonicHandler trait is used to provide a common interface for the different Mnemonic libraries
- This trait implements a builder pattern for creating a mnemonic