bip44

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CoinList = map[Coin]*Altcoin{
	Ethereum: {"Ethereum", 0xff, 0xff, 60},
	Energi:   {"Energi", 0xff, 0xff, 39797},
	Bitcoin:  {"Bitcoin", 0x00, 0x80, 0},
	Litecoin: {"Litecoin", 0x30, 0xb0, 2},
	Dash:     {"Dash", 0x4c, 0xcc, 5},
	Dogecoin: {"Dogecoin", 0x1e, 0x9e, 3},
}

Functions

This section is empty.

Types

type Account

type Account struct {
	Coin       string
	CoinType   int
	Key        *hdkeychain.ExtendedKey // bip44 extended key (m/44'/cointype'/0')
	External   *hdkeychain.ExtendedKey // external extended key (m/44'/cointype'/0'/0)
	Masterkey  *btcec.PrivateKey
	Addresses  Addresses
	PrivateKey string
}

func GenerateWallets

func GenerateWallets(coin Coin, mnemonic, passphrase string, start, qty int) (*Account, error)

type Address

type Address struct {
	Address string
	Pubkey  string
	Privkey string
	Index   int
}

type Addresses

type Addresses []Address

type Altcoin

type Altcoin struct {
	Name             string
	PubKeyHashAddrID byte
	PrivateKeyID     byte
	CoinType         int
}

type Coin

type Coin string
const (
	Ethereum Coin = "Ethereum"
	Energi   Coin = "Energi"
	Bitcoin  Coin = "Bitcoin"
	Litecoin Coin = "Litecoin"
	Dash     Coin = "Dash"
	Dogecoin Coin = "Dogecoin"
)

type Wallet

type Wallet struct {
	Seed      []byte    // bip39 64byte (512bits) bip39
	Seedwords string    // bip39 mnemonic
	Accounts  []Account // different coin accounts
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL