Documentation ¶
Index ¶
- func CreateBTCWifFromPk(pk *secp256k1.PrivateKey) *btcutil.WIF
- func CreatePrivateKey() (*secp256k1.PrivateKey, error)
- func GenRandomBytes(size int) (blk []byte, err error)
- func GenerateAddressFromPlainPrivateKey(pk string) (common.Address, error)
- func GenerateETHPrivateKey() string
- func GenerateEcdsaPrivateKey() (*ecdsa.PrivateKey, error)
- func GenerateSecp256k1PrivateKey(pk *ecdsa.PrivateKey) (*secp256k1.PrivateKey, error)
- func HashSkein1024(data []byte) []byte
- func ImportWIF(wifStr string) (*btcutil.WIF, error)
- func Private(privateKey string) *ecdsa.PrivateKey
- func Public(privateKey string) (publicKey string)
- type MasterWallet
- func (mw MasterWallet) BtcAddress() string
- func (mw MasterWallet) EthAddress() string
- func (mw MasterWallet) MasterAddress() string
- func (mw MasterWallet) MasterAddressFromBtcEthPrivateKey(btcPk, ethPk string) *MasterWallet
- func (mw MasterWallet) MasterAddressFromPrivateKey(masterPrivate []byte) *MasterWallet
- func (mw MasterWallet) ToString()
- type Network
- type Wallet
- func GenerateBTCWallet() Wallet
- func GenerateBTCWalletFromPrivateKey(privateKey *ecdsa.PrivateKey) Wallet
- func GenerateBTCWalletFromWIF(wif *btcutil.WIF) Wallet
- func GenerateETHWallet() Wallet
- func GenerateETHWalletFromPlainPrivateKey(pk string) (*Wallet, error)
- func GenerateETHWalletFromPrivateKey(privateKey *ecdsa.PrivateKey) Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBTCWifFromPk ¶
func CreateBTCWifFromPk(pk *secp256k1.PrivateKey) *btcutil.WIF
func CreatePrivateKey ¶
func CreatePrivateKey() (*secp256k1.PrivateKey, error)
func GenRandomBytes ¶
func GenerateETHPrivateKey ¶
func GenerateETHPrivateKey() string
func GenerateEcdsaPrivateKey ¶
func GenerateEcdsaPrivateKey() (*ecdsa.PrivateKey, error)
GeneratePrivateKey returns a private key that is suitable for use with secp256k1.
func GenerateSecp256k1PrivateKey ¶
func GenerateSecp256k1PrivateKey(pk *ecdsa.PrivateKey) (*secp256k1.PrivateKey, error)
GeneratePrivateKey returns a private key that is suitable for use with secp256k1.
func HashSkein1024 ¶
func Private ¶
func Private(privateKey string) *ecdsa.PrivateKey
Types ¶
type MasterWallet ¶
type MasterWallet struct { PublicKey string `json:"public_key"` PrivateKey string `json:"private_key"` BtcWallet Wallet `json:"btc_wallet"` EthWallet Wallet `json:"eth_wallet"` MasterPrivateKey string `json:"master_private_key"` }
SysInfo saves the basic system information
func NewMasterWallet ¶
func NewMasterWallet() *MasterWallet
func (MasterWallet) BtcAddress ¶
func (mw MasterWallet) BtcAddress() string
func (MasterWallet) EthAddress ¶
func (mw MasterWallet) EthAddress() string
func (MasterWallet) MasterAddress ¶
func (mw MasterWallet) MasterAddress() string
func (MasterWallet) MasterAddressFromBtcEthPrivateKey ¶
func (mw MasterWallet) MasterAddressFromBtcEthPrivateKey(btcPk, ethPk string) *MasterWallet
func (MasterWallet) MasterAddressFromPrivateKey ¶
func (mw MasterWallet) MasterAddressFromPrivateKey(masterPrivate []byte) *MasterWallet
func (MasterWallet) ToString ¶
func (mw MasterWallet) ToString()
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func (Network) CreateWifFromPk ¶
func (Network) GetAddress ¶
func (Network) GetNetworkParams ¶
type Wallet ¶
func GenerateBTCWallet ¶
func GenerateBTCWallet() Wallet
func GenerateBTCWalletFromPrivateKey ¶
func GenerateBTCWalletFromPrivateKey(privateKey *ecdsa.PrivateKey) Wallet
func GenerateETHWallet ¶
func GenerateETHWallet() Wallet
func GenerateETHWalletFromPrivateKey ¶
func GenerateETHWalletFromPrivateKey(privateKey *ecdsa.PrivateKey) Wallet
Click to show internal directories.
Click to hide internal directories.