Documentation
¶
Overview ¶
this handles low-level access to the ownership data in storage pool
Index ¶
- Constants
- func CreateAsset(issueTxId merkle.Digest, issueBlockNumber uint64, ...)
- func CreateBlock(issueTxId merkle.Digest, blockNumber uint64, newOwner *account.Account)
- func CurrentlyOwns(owner *account.Account, txId merkle.Digest) bool
- func OwnerOf(txId merkle.Digest) *account.Account
- func Transfer(previousTxId merkle.Digest, transferTxId merkle.Digest, ...)
- type OwnedItem
- type Ownership
Constants ¶
View Source
const ( FlagByteStart = 0 FlagByteFinish = FlagByteStart + oneByteSize TxIdStart = FlagByteFinish TxIdFinish = TxIdStart + merkle.DigestLength TransferBlockNumberStart = TxIdFinish TransferBlockNumberFinish = TransferBlockNumberStart + uint64ByteSize IssueTxIdStart = TransferBlockNumberFinish IssueTxIdFinish = IssueTxIdStart + merkle.DigestLength IssueBlockNumberStart = IssueTxIdFinish IssueBlockNumberFinish = IssueBlockNumberStart + uint64ByteSize // overlap flag==0x00 AssetIndexStart = IssueBlockNumberFinish AssetIndexFinish = AssetIndexStart + transactionrecord.AssetIndexLength // overlap flag==0x01 OwnedBlockNumberStart = IssueBlockNumberFinish OwnedBlockNumberFinish = OwnedBlockNumberStart + uint64ByteSize )
structure of the ownership record
Variables ¶
This section is empty.
Functions ¶
func CreateAsset ¶
func CreateAsset(issueTxId merkle.Digest, issueBlockNumber uint64, assetIndex transactionrecord.AssetIndex, newOwner *account.Account)
func CreateBlock ¶
func CurrentlyOwns ¶
find owner currently owns this transaction id
Types ¶
type OwnedItem ¶
type OwnedItem byte
the flag byte
func (OwnedItem) MarshalText ¶
convert item to text
type Ownership ¶
type Ownership struct { N uint64 `json:"n,string"` TxId merkle.Digest `json:"txId"` IssueTxId merkle.Digest `json:"issue"` Item OwnedItem `json:"item"` AssetIndex *transactionrecord.AssetIndex `json:"assetIndex,omitempty"` BlockNumber *uint64 `json:"blockNumber,omitempty"` }
type to represent an ownership record
Click to show internal directories.
Click to hide internal directories.