Documentation ¶
Index ¶
Constants ¶
View Source
const (
KTOPrefix = "Kto"
)
View Source
const Lenthaddr = 47
Variables ¶
This section is empty.
Functions ¶
func AddressToPublicKey ¶
Types ¶
type Transaction ¶
type Transaction struct { Nonce uint64 `json:"nonce"` Amount uint64 `json:"amount"` From Address `json:"from"` To Address `json:"to"` Hash []byte `json:"hash"` Signature []byte `json:"signature"` Time int64 `json:"time"` }
func NewTransaction ¶
func NewTransaction(nonce, amount uint64, from, to string) *Transaction
func (*Transaction) HashTransaction ¶
func (tx *Transaction) HashTransaction()
func (*Transaction) Sgin ¶
func (tx *Transaction) Sgin(privateKey []byte)
func (*Transaction) TrimmedCopy ¶
func (tx *Transaction) TrimmedCopy() *Transaction
func (*Transaction) Verify ¶
func (tx *Transaction) Verify() bool
Click to show internal directories.
Click to hide internal directories.