Documentation ¶
Index ¶
Constants ¶
View Source
const ( Commit TxFunc = "commit" Reveal TxFunc = "reveal" AddOracle TxFunc = "addOracle" AddOracleInNebula TxFunc = "addOracleInNebula" Result TxFunc = "result" NewRound TxFunc = "newRound" Vote TxFunc = "vote" SetNebula TxFunc = "setNebula" SignNewConsuls TxFunc = "signNewConsuls" SignNewOracles TxFunc = "signNewOracles" ApproveLastRound TxFunc = "approveLastRound" String Type = "string" Int Type = "int" Bytes Type = "bytes" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BytesValue ¶
type BytesValue struct {
Value []byte
}
type StringValue ¶
type StringValue struct {
Value string
}
type Transaction ¶
type Transaction struct { Id ID SenderPubKey account.ConsulPubKey Signature [72]byte Func TxFunc Timestamp uint64 Args []Arg }
func New ¶
func New(pubKey account.ConsulPubKey, funcName TxFunc, privKey tCrypto.PrivKey) (*Transaction, error)
func UnmarshalJson ¶
func UnmarshalJson(data []byte) (*Transaction, error)
func (*Transaction) AddValue ¶
func (tx *Transaction) AddValue(value Value)
func (*Transaction) AddValues ¶
func (tx *Transaction) AddValues(values []Value)
func (*Transaction) Bytes ¶
func (tx *Transaction) Bytes() []byte
func (*Transaction) Hash ¶
func (tx *Transaction) Hash()
func (*Transaction) Value ¶
func (tx *Transaction) Value(index int) interface{}
Click to show internal directories.
Click to hide internal directories.