Documentation ¶
Index ¶
- func GetRipemd16Hash(tx CommonOperation) []byte
- func GetTxId(tx CommonOperation) []byte
- func GetTxIdString(tx CommonOperation) string
- func Sign(tx CommonOperation, private *crypto.Key) (txID string, raw []byte, err error)
- func TxFromMetadata(metadataSerialized []byte) (*TxMetadata, CommonOperation, error)
- func Validate(tx CommonOperation, getAccount func(number uint32) *accounter.Account) (context interface{}, err error)
- func ValidateSignature(tx CommonOperation) error
- type ChangeKey
- func (this *ChangeKey) Apply(index uint32, context interface{}, accounter *accounter.Accounter) ([]uint32, error)
- func (this *ChangeKey) GetAccount() uint32
- func (this *ChangeKey) GetAmount() uint64
- func (this *ChangeKey) GetDestAccount() uint32
- func (this *ChangeKey) GetFee() uint64
- func (this *ChangeKey) GetPayload() []byte
- func (this *ChangeKey) GetType() txType
- func (this *ChangeKey) SerializeWithoutPrefix(w io.Writer) error
- type CommonOperation
- type OperationsNetwork
- type Transfer
- func (this *Transfer) Apply(index uint32, context interface{}, accounter *accounter.Accounter) ([]uint32, error)
- func (this *Transfer) GetAccount() uint32
- func (this *Transfer) GetAmount() uint64
- func (this *Transfer) GetDestAccount() uint32
- func (this *Transfer) GetFee() uint64
- func (this *Transfer) GetPayload() []byte
- func (this *Transfer) GetType() txType
- func (this *Transfer) SerializeWithoutPrefix(w io.Writer) error
- type TxMetadata
- type TxSerialized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRipemd16Hash ¶
func GetRipemd16Hash(tx CommonOperation) []byte
func GetTxId ¶
func GetTxId(tx CommonOperation) []byte
func GetTxIdString ¶
func GetTxIdString(tx CommonOperation) string
func TxFromMetadata ¶
func TxFromMetadata(metadataSerialized []byte) (*TxMetadata, CommonOperation, error)
func Validate ¶
func Validate(tx CommonOperation, getAccount func(number uint32) *accounter.Account) (context interface{}, err error)
func ValidateSignature ¶
func ValidateSignature(tx CommonOperation) error
Types ¶
type ChangeKey ¶
type ChangeKey struct { Source uint32 OperationId uint32 Fee uint64 Payload []byte PublicKey crypto.Public NewPublickey []byte Signature crypto.SignatureSerialized }
func (*ChangeKey) GetAccount ¶
func (*ChangeKey) GetDestAccount ¶
func (*ChangeKey) GetPayload ¶
type CommonOperation ¶
type CommonOperation interface { GetAmount() uint64 GetAccount() uint32 GetDestAccount() uint32 GetFee() uint64 GetPayload() []byte GetType() txType Apply(index uint32, context interface{}, accounter *accounter.Accounter) ([]uint32, error) SerializeWithoutPrefix(w io.Writer) error // contains filtered or unexported methods }
type OperationsNetwork ¶
type OperationsNetwork struct {
Operations []CommonOperation
}
func (*OperationsNetwork) Deserialize ¶
func (this *OperationsNetwork) Deserialize(r io.Reader) error
type Transfer ¶
type Transfer struct { Source uint32 OperationId uint32 Destination uint32 Amount uint64 Fee uint64 Payload []byte PublicKey crypto.Public Signature crypto.SignatureSerialized }
func (*Transfer) GetAccount ¶
func (*Transfer) GetDestAccount ¶
func (*Transfer) GetPayload ¶
type TxMetadata ¶
func GetMetadata ¶
func GetMetadata(tx CommonOperation, txIndexInsideBlock uint32, blockIndex uint32, time uint32) TxMetadata
type TxSerialized ¶
type TxSerialized struct {
CommonOperation
}
func ToTxSerialized ¶
func ToTxSerialized(txes []CommonOperation) []TxSerialized
func (*TxSerialized) Deserialize ¶
func (this *TxSerialized) Deserialize(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.