Documentation ¶
Index ¶
- Constants
- func Checker(item interface{}, value interface{}) bool
- func RebuildTransactionID(forTx Transaction) (txID model.Hash, err error)
- type Contract
- type Features
- type Frequency
- type Signatures
- type Subchain
- type Transaction
- func (tx *Transaction) CreateTransactionID() error
- func (tx Transaction) Dump()
- func (tx Transaction) DumpByte() ([]byte, error)
- func (tx Transaction) GetByteArrayValues() (values [][]byte)
- func (tx Transaction) GetLastBlockID() model.Hash
- func (tx Transaction) GetTimestamp() uint64
- func (tx Transaction) GetTransactionID() model.Hash
- func (tx *Transaction) IsEmpty() bool
- func (tx Transaction) IsFeeding() bool
- func (tx Transaction) IsOblivion() bool
- func (tx Transaction) IsOptOut() bool
- func (tx Transaction) IsSpending() bool
- func (tx Transaction) IsStatic() bool
- func (tx *Transaction) VerifyIdentification(checker model.Ciphered, decompressedPublicKey model.Key) bool
- type Transactions
- type Type
Constants ¶
const ( // INFINITY ... INFINITY int = -1 // Any negative value would suit but -1 is our preferred choice )
Variables ¶
This section is empty.
Functions ¶
func Checker ¶
func Checker(item interface{}, value interface{}) bool
Checker is a function to be sent to concurrent.Slice.Check to compare transactions. `item` will be the original and `value` will be either the new transaction we're trying to compare or its ID as a `Hash`.
func RebuildTransactionID ¶
func RebuildTransactionID(forTx Transaction) (txID model.Hash, err error)
RebuildTransactionID ...
Types ¶
type Contract ¶
type Contract struct { TransactionType Type `json:"type"` Channel channel.Channel `json:"channel,omitempty"` Features Features `json:"features,omitempty"` Signatures Signatures `json:"signatures"` }
Contract ...
type Features ¶
type Features struct { Start uint64 `json:"start"` End int `json:"end"` // Possible INFINITY MaxUse int `json:"maxUse"` // Possible INFINITY Frequency Frequency `json:"freq,omitempty"` Destination features.Destination `json:"dest"` }
Features ...
func (Features) GetByteArrayValues ¶
GetByteArrayValues ...
func (Features) HasStaticFeatures ¶
HasStaticFeatures ...
type Frequency ¶
type Frequency struct { FirstPeriodID uint64 `json:"firstPeriodId"` CycleLength uint64 `json:"cycleLength"` UsePerCycle int `json:"usePerCycle"` // Possible INFINITY CurrentPeriodID uint64 `json:"currentPeriodId"` }
Frequency ...
type Signatures ¶
type Signatures struct { Beneficiary model.Signature `json:"beneficiary,omitempty"` Emitter model.Signature `json:"emitter,omitempty"` }
Signatures ...
type Subchain ¶
type Subchain struct { InitialTransactionID model.Hash `json:"initialTransactionId"` LastStateTransactionID model.Hash `json:"lastStateTransactionId,omitempty"` FinalTransactionID model.Hash `json:"finalTransactionId,omitempty"` }
Subchain ...
type Transaction ¶
type Transaction struct { TransactionID model.Hash `json:"transactionId"` LastBlockID model.Hash `json:"lastBlockId"` Subchain Subchain `json:"subchain,omitempty"` Timestamp uint64 `json:"timestamp"` Contract Contract `json:"contract"` Identification ti.Identifications `json:"identification,omitempty"` Script script.Script `json:"script"` OblivionCode string `json:"oblivionCode,omitempty"` // NB: this is the encrypted oblivion code (or the final one) }
Transaction ...
func (*Transaction) CreateTransactionID ¶
func (tx *Transaction) CreateTransactionID() error
CreateTransactionID ...
func (Transaction) GetByteArrayValues ¶
func (tx Transaction) GetByteArrayValues() (values [][]byte)
GetByteArrayValues ...
func (Transaction) GetLastBlockID ¶ added in v1.7.4
func (tx Transaction) GetLastBlockID() model.Hash
func (Transaction) GetTimestamp ¶ added in v1.7.4
func (tx Transaction) GetTimestamp() uint64
func (Transaction) GetTransactionID ¶ added in v1.7.4
func (tx Transaction) GetTransactionID() model.Hash
func (*Transaction) IsEmpty ¶
func (tx *Transaction) IsEmpty() bool
IsEmpty returns `true` if all its fields are empty.
func (Transaction) IsOblivion ¶ added in v1.1.0
func (tx Transaction) IsOblivion() bool
IsOblivion ...
func (*Transaction) VerifyIdentification ¶
func (tx *Transaction) VerifyIdentification(checker model.Ciphered, decompressedPublicKey model.Key) bool
VerifyIdentification helps verify that the transaction was correctly "signed". It takes the data to check as well as the stakeholder's decompressed public key and returns a boolean.
type Transactions ¶
type Transactions []Transaction
Transactions ...
func (Transactions) Get ¶ added in v1.5.9
func (t Transactions) Get(id model.Hash) *Transaction
Get ...
func (Transactions) Len ¶
func (t Transactions) Len() int
func (Transactions) Less ¶
func (t Transactions) Less(i, j int) bool
func (Transactions) Swap ¶
func (t Transactions) Swap(i, j int)