Documentation ¶
Index ¶
- Constants
- Variables
- func HashForNewBillID(tx *types.TransactionOrder, splitIndex uint32, hashAlgorithm crypto.Hash) ([]byte, error)
- func NewBillID(shardPart []byte, unitPart []byte) types.UnitID
- func NewFeeCreditRecordID(shardPart []byte, unitPart []byte) types.UnitID
- func NewFeeCreditRecordIDFromOwnerPredicate(shardPart []byte, ownerPredicate []byte, latestAdditionTime uint64) (types.UnitID, error)
- func NewFeeCreditRecordIDFromPublicKey(shardPart, pubKey []byte, latestAdditionTime uint64) (types.UnitID, error)
- func NewFeeCreditRecordIDFromPublicKeyHash(shardPart, pubKeyHash []byte, latestAdditionTime uint64) (types.UnitID, error)
- func NewUnitData(unitID types.UnitID) (types.UnitData, error)
- type BillData
- type LockAttributes
- type LockAuthProof
- type SplitAttributes
- type SplitAuthProof
- type SwapDCAttributes
- type SwapDCAuthProof
- type TargetUnit
- type TransferAttributes
- type TransferAuthProof
- type TransferDCAttributes
- type TransferDCAuthProof
- type UnlockAttributes
- type UnlockAuthProof
Constants ¶
View Source
const ( TransactionTypeTransfer uint16 = 1 TransactionTypeSplit uint16 = 2 TransactionTypeTransDC uint16 = 3 TransactionTypeSwapDC uint16 = 4 TransactionTypeLock uint16 = 5 TransactionTypeUnlock uint16 = 6 )
View Source
const ( UnitIDLength = UnitPartLength + TypePartLength UnitPartLength = 32 TypePartLength = 1 )
View Source
const DefaultPartitionID types.PartitionID = 1
Variables ¶
View Source
var ( BillUnitType = []byte{1} FeeCreditRecordUnitType = []byte{16} )
Functions ¶
func HashForNewBillID ¶
func HashForNewBillID(tx *types.TransactionOrder, splitIndex uint32, hashAlgorithm crypto.Hash) ([]byte, error)
HashForNewBillID generates a new bill ID (unit part of the extended identifier) from the transaction order. Use NewBillID to generate the extended identifier from the unit part.
func NewFeeCreditRecordID ¶
Types ¶
type BillData ¶
type BillData struct { Value uint64 `json:"value,string"` // The monetary value of this bill OwnerPredicate hex.Bytes `json:"ownerPredicate"` // The owner predicate of this bill Locked uint64 `json:"locked,string"` // The lock status of this bill (non-zero value means locked) Counter uint64 `json:"counter,string"` // The transaction counter of this bill // contains filtered or unexported fields }
func NewBillData ¶
func (*BillData) SummaryValueInput ¶
type LockAttributes ¶
type LockAuthProof ¶
type LockAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
type SplitAttributes ¶
type SplitAttributes struct { TargetUnits []*TargetUnit Counter uint64 // contains filtered or unexported fields }
type SplitAuthProof ¶
type SplitAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
type SwapDCAttributes ¶
type SwapDCAttributes struct { DustTransferProofs []*types.TxRecordProof // the dust transfer records and proofs // contains filtered or unexported fields }
type SwapDCAuthProof ¶
type SwapDCAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
type TargetUnit ¶
type TransferAttributes ¶
type TransferAuthProof ¶
type TransferAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
type TransferDCAttributes ¶
type TransferDCAuthProof ¶
type TransferDCAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
type UnlockAttributes ¶
type UnlockAttributes struct { Counter uint64 // contains filtered or unexported fields }
type UnlockAuthProof ¶
type UnlockAuthProof struct { OwnerProof []byte // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.