Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAddressFromXPub ¶
*
- Generate address *
- @param currency type of blockchain
- @param testnet testnet or mainnet version of address
- @param xpub extended public key to generate address from
- @param i derivation index of address to generate. Up to 2^32 addresses can be generated.
- @return the string
- @throws Exception the exception
- @returns blockchain address
func GeneratePrivateKeyFromMnemonic ¶
func GeneratePrivateKeyFromMnemonic(currency request.Currency, testnet bool, mnemonic string, i uint32) string
*
- Generate private key from mnemonic seed *
- @param currency type of blockchain
- @param testnet testnet or mainnet version of address
- @param mnemonic mnemonic to generate private key from
- @param i derivation index of private key to generate.
- @return the string
- @throws Exception the exception
- @returns blockchain private key to the address
Types ¶
type Wallet ¶
type Wallet struct { /** * mnemonic seed */ Mnemonic string /** * extended public key to derive addresses from */ Xpub string /** * address */ Address string /** * secret */ Secret string }
func GenerateWallet ¶
*
- Generate wallet *
- @param currency blockchain to generate wallet for
- @param testnet testnet or mainnet version of address
- @param mnemonic mnemonic seed to use. If not present, new one will be generated
- @return the wallet
- @throws Exception the exception
- @returns wallet or a combination of address and private key
Click to show internal directories.
Click to hide internal directories.