asset

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPrecision = 8
	MinPrecision = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name        string
	Description string
	Precision   byte
	AssetType   AssetType
	RecordType  AssetRecordType
}

func (*Asset) Deserialize

func (asset *Asset) Deserialize(r io.Reader) error

func (*Asset) Serialize

func (asset *Asset) Serialize(w io.Writer) error

func (*Asset) ToArray

func (asset *Asset) ToArray() []byte

type AssetRecordType

type AssetRecordType byte
const (
	UTXO    AssetRecordType = 0x00
	Balance AssetRecordType = 0x01
)

starchin STC is planed to support UTXO and Balance

type AssetType

type AssetType byte
const (
	Currency AssetType = 0x00
	Share    AssetType = 0x01
	Invoice  AssetType = 0x10
	Token    AssetType = 0x11
)

type LockAsset

type LockAsset struct {
	Lock   uint32
	Unlock uint32
	Amount common.Fixed64
}

func (*LockAsset) Deserialize

func (la *LockAsset) Deserialize(r io.Reader) error

func (*LockAsset) Serialize

func (la *LockAsset) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL