Documentation ¶
Index ¶
Constants ¶
View Source
const (
ZeroCoinType uint32 = 0x80000000
)
Variables ¶
View Source
var DefaultPath = Path{
Purpose: 2147483692,
CoinType: 2147483648,
Account: 2147483648,
Change: 0,
AddressIndex: 0,
}
Functions ¶
func SerializeIns ¶
func Serializeouts ¶
func Str2Number ¶
Types ¶
type Account ¶
type Account struct { ExtendedKey *hdkeychain.ExtendedKey // extended private key BtcecPriv *btcec.PrivateKey BtcecPub *btcec.PublicKey PriavateKey *ecdsa.PrivateKey PublicKey *ecdsa.PublicKey PublicKeyByte []byte // serialized compressed Public Key Address string Path Path }
func (*Account) SignTx ¶
func (a *Account) SignTx(tx *Transaction)
type Path ¶
type Path struct { Purpose uint32 CoinType uint32 Account uint32 Change uint32 AddressIndex uint32 }
func String2Path ¶
type Publickeyhash ¶
type Publickeyhash []byte
type Transaction ¶
func NewTX ¶
func NewTX(utxos []*UTXO, from Publickey, to Publickeyhash, amount int) (*Transaction, error)
func (*Transaction) Hash ¶
func (tx *Transaction) Hash() []byte
func (*Transaction) Serialize ¶
func (tx *Transaction) Serialize() []byte
type Wallet ¶
func (*Wallet) NewAccount ¶
func (w *Wallet) NewAccount()
func (*Wallet) SortAccounts ¶
Click to show internal directories.
Click to hide internal directories.