Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFromBytes ¶
func EncodeToBytes ¶
func EncodeToBytes(p interface{}) []byte
func HexToPrivateKey ¶
func HexToPrivateKey(hexStr string) *ecdsa.PrivateKey
Types ¶
type Address ¶
type Address [addressLength]byte
Address is the address of the account.
func BytesToAddress ¶
NewAddress creates a new address from the given byte array.
func PublicKeyToAddress ¶
type CompactPublicKey ¶
type CompactPublicKey struct { CurveParams *elliptic.CurveParams `json:"Curve"` X *big.Int `json:"X"` Y *big.Int `json:"Y"` }
func PublicKeyToCompact ¶
func PublicKeyToCompact(pubkey *ecdsa.PublicKey) *CompactPublicKey
func (*CompactPublicKey) PublicKey ¶
func (cpk *CompactPublicKey) PublicKey() *ecdsa.PublicKey
type Hash ¶
type Hash [hashLength]byte
Hash is the hash of the block.
type UnlockedAccount ¶
type UnlockedAccount struct {
// contains filtered or unexported fields
}
func NewUnlockedAccount ¶
func NewUnlockedAccount(privateKey *ecdsa.PrivateKey) *UnlockedAccount
func (*UnlockedAccount) Address ¶
func (ua *UnlockedAccount) Address() *Address
func (*UnlockedAccount) PublicKey ¶
func (ua *UnlockedAccount) PublicKey() *ecdsa.PublicKey
Click to show internal directories.
Click to hide internal directories.