Documentation ¶
Overview ¶
this handles low-level access to the ownership data in storage pool
Index ¶
- 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) (uint64, *account.Account)
- func Share(previousTxId merkle.Digest, transferTxId merkle.Digest, ...)
- func Transfer(previousTxId merkle.Digest, transferTxId merkle.Digest, ...)
- type AssetOwnerData
- type BlockOwnerData
- type OwnedItem
- type OwnerData
- type Ownership
- type PackedOwnerData
- type ShareOwnerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAsset ¶
func CreateAsset(issueTxId merkle.Digest, issueBlockNumber uint64, assetId transactionrecord.AssetIdentifier, newOwner *account.Account)
func CreateBlock ¶
func CurrentlyOwns ¶
check owner currently owns this transaction id
Types ¶
type AssetOwnerData ¶ added in v0.10.0
type AssetOwnerData struct {
// contains filtered or unexported fields
}
func (AssetOwnerData) IssueBlockNumber ¶ added in v0.10.0
func (a AssetOwnerData) IssueBlockNumber() uint64
func (AssetOwnerData) IssueTxId ¶ added in v0.10.0
func (a AssetOwnerData) IssueTxId() merkle.Digest
accessors
func (AssetOwnerData) Pack ¶ added in v0.10.0
func (a AssetOwnerData) Pack() PackedOwnerData
pack asset owner data to byte slice
func (AssetOwnerData) TransferBlockNumber ¶ added in v0.10.0
func (a AssetOwnerData) TransferBlockNumber() uint64
type BlockOwnerData ¶ added in v0.10.0
type BlockOwnerData struct {
// contains filtered or unexported fields
}
func (BlockOwnerData) IssueBlockNumber ¶ added in v0.10.0
func (b BlockOwnerData) IssueBlockNumber() uint64
func (BlockOwnerData) IssueTxId ¶ added in v0.10.0
func (b BlockOwnerData) IssueTxId() merkle.Digest
accessors
func (BlockOwnerData) Pack ¶ added in v0.10.0
func (b BlockOwnerData) Pack() PackedOwnerData
pack block owner data to byte slice
func (BlockOwnerData) TransferBlockNumber ¶ added in v0.10.0
func (b BlockOwnerData) TransferBlockNumber() uint64
type OwnedItem ¶
type OwnedItem byte
the flag byte
func (OwnedItem) MarshalText ¶
convert item to text
func (*OwnedItem) UnmarshalText ¶ added in v0.10.0
convert test to Item
type OwnerData ¶ added in v0.10.0
type OwnerData interface { Pack() PackedOwnerData IssueTxId() merkle.Digest TransferBlockNumber() uint64 IssueBlockNumber() uint64 }
func GetOwnerData ¶ added in v0.10.0
fetch and unpack owner data
func GetOwnerDataB ¶ added in v0.10.0
fetch and unpack owner data
type Ownership ¶
type Ownership struct { N uint64 `json:"n,string"` TxId merkle.Digest `json:"txId"` IssueTxId merkle.Digest `json:"issue"` Item OwnedItem `json:"item"` AssetId *transactionrecord.AssetIdentifier `json:"assetId,omitempty"` BlockNumber *uint64 `json:"blockNumber,omitempty"` }
type to represent an ownership record
type PackedOwnerData ¶ added in v0.10.0
type PackedOwnerData []byte
func (PackedOwnerData) Unpack ¶ added in v0.10.0
func (packed PackedOwnerData) Unpack() (OwnerData, error)
unpack record into the appropriate type
type ShareOwnerData ¶ added in v0.10.0
type ShareOwnerData struct {
// contains filtered or unexported fields
}
func (ShareOwnerData) IssueBlockNumber ¶ added in v0.10.0
func (a ShareOwnerData) IssueBlockNumber() uint64
func (ShareOwnerData) IssueTxId ¶ added in v0.10.0
func (a ShareOwnerData) IssueTxId() merkle.Digest
accessors
func (ShareOwnerData) Pack ¶ added in v0.10.0
func (a ShareOwnerData) Pack() PackedOwnerData
pack share owner data to byte slice
func (ShareOwnerData) TransferBlockNumber ¶ added in v0.10.0
func (a ShareOwnerData) TransferBlockNumber() uint64
Click to show internal directories.
Click to hide internal directories.