Documentation ¶
Index ¶
- Constants
- Variables
- func NewBillID(shardPart []byte, unitPart []byte) types.UnitID
- func NewFeeCreditRecordID(shardPart []byte, unitPart []byte) types.UnitID
- func NewUnitData(unitID types.UnitID) (types.UnitData, error)
- type BillData
- type LockAttributes
- type SplitAttributes
- type SwapDCAttributes
- type TargetUnit
- type TransferAttributes
- type TransferDCAttributes
- type UnlockAttributes
Constants ¶
View Source
const ( PayloadTypeTransfer = "trans" PayloadTypeSplit = "split" PayloadTypeTransDC = "transDC" PayloadTypeSwapDC = "swapDC" PayloadTypeLock = "lock" PayloadTypeUnlock = "unlock" )
View Source
const ( UnitIDLength = UnitPartLength + TypePartLength UnitPartLength = 32 TypePartLength = 1 )
View Source
const DefaultSystemID types.SystemID = 0x00000001
Variables ¶
View Source
var ( BillUnitType = []byte{0x00} FeeCreditRecordUnitType = []byte{0x0f} )
Functions ¶
func NewFeeCreditRecordID ¶
Types ¶
type BillData ¶
type BillData struct { V uint64 `json:"value,string"` // The monetary value of this bill T uint64 `json:"lastUpdate,string"` // The round number of the last transaction with the bill Counter uint64 `json:"counter,string"` // The transaction counter of this bill Locked uint64 `json:"locked,string"` // locked status of the bill, non-zero value means locked // contains filtered or unexported fields }
func (*BillData) SummaryValueInput ¶
type LockAttributes ¶
type SplitAttributes ¶
type SplitAttributes struct { TargetUnits []*TargetUnit RemainingValue uint64 Counter uint64 // contains filtered or unexported fields }
type SwapDCAttributes ¶
type TargetUnit ¶
type TransferAttributes ¶
type TransferDCAttributes ¶
type UnlockAttributes ¶
type UnlockAttributes struct { Counter uint64 // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.