counterpartycrypto

package
v0.0.0-...-485d38d Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Developed to be stand alone to enable creation of Counterwallet HD wallets, retrieval of the public, private keys and the addresses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateKey

func GetPrivateKey(passphrase string, address string) (string, error)

GetPrivateKey_Counterparty will retrieve the private key that corresponds to the address given. The hierarchical master key is derived from the passphrase and then searches up to the first 20 addresses for a match

func GetPublicKey

func GetPublicKey(passphrase string, address string) (string, error)

GetPublicKey_Counterparty will retrieve the public key that corresponds to the address given. The hierarchical master key is derived from the passphrase and then searches up to the first 20 addresses for a match

Types

type CounterpartyAddress

type CounterpartyAddress struct {
	Value      string `json:"value"`
	PublicKey  string `json:"publicKey"`
	PrivateKey string `json:"privateKey"`
}

func GetPublicPrivateKey

func GetPublicPrivateKey(passphrase string, address string) (CounterpartyAddress, error)

type CounterpartyWallet

type CounterpartyWallet struct {
	Passphrase string   `json:"passphrase"`
	HexSeed    string   `json:"hexSeed"`
	Addresses  []string `json:"addresses"`
	RequestId  string   `json:"requestId"`
}

func CreateWallet

func CreateWallet(numberOfAddressesToGenerate int) (CounterpartyWallet, error)

Jump to

Keyboard shortcuts

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