Documentation ¶
Overview ¶
current block data
Index ¶
- func CRC(height uint64, packed []byte) uint64
- func CreateOwnership(issueTxId merkle.Digest, issueBlockNumber uint64, ...)
- func DeleteDownToBlock(finalBlockNumber uint64) error
- func DigestForBlock(number uint64) (blockdigest.Digest, error)
- func Finalise() error
- func Get() (blockdigest.Digest, uint64)
- func GetHeight() uint64
- func GetLatestCRC() uint64
- func GetPayment(blockNumberKey []byte) *transactionrecord.Payment
- func Initialise() error
- func OwnerOf(txId merkle.Digest) *account.Account
- func StoreIncoming(packedBlock []byte) error
- func TransferOwnership(previousTxId merkle.Digest, transferTxId merkle.Digest, ...)
- func VerifyTransfer(arguments *transactionrecord.BitmarkTransfer) (merkle.Digest, []byte, *transactionrecord.BitmarkTransfer, []byte, error)
- type Ownership
- type RingReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOwnership ¶ added in v0.2.0
func CreateOwnership(issueTxId merkle.Digest, issueBlockNumber uint64, assetIndex transactionrecord.AssetIndex, newOwner *account.Account)
func DeleteDownToBlock ¶ added in v0.2.0
delete from current highest block down to and including the specified block
func DigestForBlock ¶ added in v0.2.0
func DigestForBlock(number uint64) (blockdigest.Digest, error)
func Get ¶
func Get() (blockdigest.Digest, uint64)
get block data for initialising a new block returns: previous block digest and the number for the new block
func GetPayment ¶ added in v0.2.0
func GetPayment(blockNumberKey []byte) *transactionrecord.Payment
get a payment record from a specific block given the blocks 8 byte big endian key
func OwnerOf ¶ added in v0.2.0
find the owner of a specific transaction (only issue or transfer is allowed)
func StoreIncoming ¶ added in v0.2.0
store an incoming block checking to make sure it is valid first
func TransferOwnership ¶ added in v0.2.0
func TransferOwnership(previousTxId merkle.Digest, transferTxId merkle.Digest, transferBlockNumber uint64, currentOwner *account.Account, newOwner *account.Account)
need to have a lock
func VerifyTransfer ¶ added in v0.2.0
func VerifyTransfer(arguments *transactionrecord.BitmarkTransfer) (merkle.Digest, []byte, *transactionrecord.BitmarkTransfer, []byte, error)
verify that a transfer is ok
Types ¶
type Ownership ¶ added in v0.2.0
type Ownership struct { N uint64 `json:"n,string"` TxId merkle.Digest `json:"txId"` IssueTxId merkle.Digest `json:"issue"` AssetIndex transactionrecord.AssetIndex `json:"index"` }
type to represent an ownership record
type RingReader ¶ added in v0.2.0
type RingReader struct {
// contains filtered or unexported fields
}
to iterate though the ring
func (*RingReader) Get ¶ added in v0.2.0
func (r *RingReader) Get() (uint64, bool)
fetch item from ring works in reverse, fetching older items
Click to show internal directories.
Click to hide internal directories.