states

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TypeAsset        = "A"
	TypeAssetForSale = "S"
	TypeAssetBid     = "B"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgreementToBuy

type AgreementToBuy struct {
	TradeID string        `json:"trade_id"`
	ID      string        `json:"asset_id"`
	Price   int           `json:"price"`
	Owner   view.Identity `json:"owner"`
}

func (*AgreementToBuy) GetLinearID

func (a *AgreementToBuy) GetLinearID() (string, error)

func (*AgreementToBuy) Owners

func (a *AgreementToBuy) Owners() state.Identities

type AgreementToSell

type AgreementToSell struct {
	TradeID string        `json:"trade_id"`
	ID      string        `json:"asset_id"`
	Price   int           `json:"price"`
	Owner   view.Identity `json:"owner"`
}

func (*AgreementToSell) GetLinearID

func (a *AgreementToSell) GetLinearID() (string, error)

func (*AgreementToSell) Owners

func (a *AgreementToSell) Owners() state.Identities

type Asset

type Asset struct {
	ObjectType        string        `json:"objectType"`
	ID                string        `json:"assetID"`
	Owner             view.Identity `json:"owner"`
	PublicDescription string        `json:"publicDescription"`
	PrivateProperties []byte        `state:"hash" json:"privateProperties"`
}

func (*Asset) GetLinearID

func (a *Asset) GetLinearID() (string, error)

func (*Asset) Owners

func (a *Asset) Owners() state.Identities

type AssetProperties

type AssetProperties struct {
	ObjectType string `json:"objectType"` // ObjectType is used to distinguish different object types in the same chaincode namespace
	ID         string `json:"assetID"`
	Color      string `json:"color"`
	Size       int    `json:"size"`
	Salt       []byte `json:"salt"`
}

func (*AssetProperties) Bytes

func (ap *AssetProperties) Bytes() ([]byte, error)

type Receipt

type Receipt struct {
	Price     int
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

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