Documentation ¶
Index ¶
- func DerivePrivateKey(seed []byte, path string, isDev bool) (*btcec.PrivateKey, error)
- func GenerateMnemonic() (string, error)
- func IsMnemonicValid(mnemonic string) bool
- func MnemonicFromEntropy(entropyLength int) (string, error)
- func SeedFromMnemonic(mnemonic, passphrase string) ([]byte, error)
- type BitcoinRawTx
- type BitsharesRawTx
- type EthereumRawTx
- type IRawTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DerivePrivateKey ¶
DerivePrivateKey derives the private key of the derivation path.
func GenerateMnemonic ¶
GenerateMnemonic will return a string consisting of the mnemonic words for the default entropy = 256. If the provide entropy is invalid, an error will be returned.
func IsMnemonicValid ¶
IsMnemonicValid attempts to verify that the provided mnemonic is valid. Validity is determined by both the number of words being appropriate, and that all the words in the mnemonic are present in the word list.
func MnemonicFromEntropy ¶
MnemonicFromEntropy will return a string consisting of the mnemonic words for the given entropy.
func SeedFromMnemonic ¶
SeedFromMnemonic creates a hashed seed output given a provided string and password. No checking is performed to validate that the string provided is a valid mnemonic.
Types ¶
type BitcoinRawTx ¶
type BitcoinRawTx struct { Inputs []struct { Txhash string `json:"txhash"` Vout uint32 `json:"vout"` } `json:"inputs"` Outputs []struct { Address string `json:"address"` Amount int64 `json:"amount"` } `json:"outputs"` IRawTx }
BitcoinRawTx stores bitcoin based raw transaction payloads stores input UTXO's and output Addresses implements IRawTx
type BitsharesRawTx ¶
type BitsharesRawTx struct {}
BitsharesRawTx Ethereum raw transaction implements IRawTx to store raw Bitshares JSON payload Bitshares' Payload will only have a hex encoded string that would represent the transaction digest.
type EthereumRawTx ¶
type EthereumRawTx struct { Nonce uint64 `json:"nonce"` Value *big.Int `json:"value"` GasLimit uint64 `json:"gasLimit"` GasPrice *big.Int `json:"gasPrice"` To string `json:"to"` Data string `json:"data"` ChainID *big.Int `json:"chainId"` IRawTx }
EthereumRawTx Ethereum raw transaction implements IRawTx to store raw Ethereum JSON payload