Documentation ¶
Index ¶
- Constants
- Variables
- func ErrAssetAlreadyFinal(assetID string) sdk.Error
- func ErrAssetNotFound(assetID string) sdk.Error
- func ErrInvalidAssetQuantity(assetID string) sdk.Error
- func ErrInvalidField(field string) sdk.Error
- func ErrInvalidRevokeReporter(addr sdk.AccAddress) sdk.Error
- func ErrInvalidRole(msg string) sdk.Error
- func ErrInvalidTransaction(msg string) sdk.Error
- func ErrMissingField(field string) sdk.Error
- func ErrProposalNotFound(recipient sdk.AccAddress) sdk.Error
- func GetAccountAssetKey(addr sdk.AccAddress, assetID string) []byte
- func GetAccountAssetsKey(addr sdk.AccAddress) []byte
- func GetAssetChildrenKey(parent, children string) []byte
- func GetAssetChildrensKey(parent string) []byte
- func GetAssetKey(assetID string) []byte
- func GetMaterialKey(recordID string, materialID string) []byte
- func GetMaterialsKey(recordID string) []byte
- func GetPropertiesKey(recordID string) []byte
- func GetPropertyKey(recordID, name string) []byte
- func GetProposalAccountKey(addr sdk.AccAddress, assetID string) []byte
- func GetProposalKey(assetID string, recipient sdk.AccAddress) []byte
- func GetProposalsAccountKey(addr sdk.AccAddress) []byte
- func GetProposalsKey(assetID string) []byte
- func GetReporterAssetKey(addr sdk.AccAddress, assetID string) []byte
- func GetReporterAssetsKey(addr sdk.AccAddress) []byte
- func GetReporterKey(recordID string, addr sdk.AccAddress) []byte
- func GetReportersKey(recordID string) []byte
- func NewHandler(k Keeper) sdk.Handler
- func NewPubKey(pk string) (res ed25519.PubKeyEd25519)
- func PropertyTypeToString(t PropertyType) string
- func RegisterWire(cdc *wire.Codec)
- func TestAddr(addr string, bech string) sdk.AccAddress
- func ValidatorByPowerIndexExists(ctx sdk.Context, keeper Keeper, power []byte) bool
- type Asset
- type Keeper
- func (k Keeper) AddMaterial(ctx sdk.Context, recordID string, input Material)
- func (k Keeper) AddMaterials(ctx sdk.Context, msg MsgAddMaterials) (sdk.Tags, sdk.Error)
- func (k Keeper) AddProposal(ctx sdk.Context, msg MsgCreateProposal) (sdk.Tags, sdk.Error)
- func (k Keeper) AddQuantity(ctx sdk.Context, msg MsgAddQuantity) (sdk.Tags, sdk.Error)
- func (k Keeper) AnswerProposal(ctx sdk.Context, msg MsgAnswerProposal) (sdk.Tags, sdk.Error)
- func (k Keeper) CheckUpdateAttributeAuthorization(ctx sdk.Context, record Asset, reporter Reporter, prop Property) bool
- func (k Keeper) CreateAsset(ctx sdk.Context, msg MsgCreateAsset) (sdk.Tags, sdk.Error)
- func (k Keeper) DeleteProposal(ctx sdk.Context, assetID string, recipient sdk.AccAddress)
- func (k Keeper) DeleteReporter(ctx sdk.Context, recordID string, reporter sdk.AccAddress)
- func (k Keeper) DeleteReporters(ctx sdk.Context, recordID string)
- func (k Keeper) Finalize(ctx sdk.Context, msg MsgFinalize) (sdk.Tags, sdk.Error)
- func (k Keeper) GetAsset(ctx sdk.Context, assetID string) (asset Asset, found bool)
- func (k Keeper) GetMaterial(ctx sdk.Context, recordID string, materialID string) (material Material, found bool)
- func (k Keeper) GetMaterials(ctx sdk.Context, recordID string) (materials []Material)
- func (k Keeper) GetProperties(ctx sdk.Context, recordID string) (reporters Properties)
- func (k Keeper) GetProposal(ctx sdk.Context, assetID string, recipient sdk.AccAddress) (proposal Proposal, found bool)
- func (k Keeper) GetReporter(ctx sdk.Context, recordID string, addr sdk.AccAddress) (reporter Reporter, found bool)
- func (k Keeper) GetReporters(ctx sdk.Context, recordID string) (reporters []Reporter)
- func (k Keeper) RevokeReporter(ctx sdk.Context, msg MsgRevokeReporter) (sdk.Tags, sdk.Error)
- func (k Keeper) SetAsset(ctx sdk.Context, asset Asset)
- func (k Keeper) SetProperties(ctx sdk.Context, recordID string, props Properties)
- func (k Keeper) SetProperty(ctx sdk.Context, recordID string, property Property)
- func (k Keeper) SetProposal(ctx sdk.Context, assetID string, proposal Proposal)
- func (k Keeper) SetReporter(ctx sdk.Context, recordID string, reporter Reporter)
- func (k Keeper) SubtractQuantity(ctx sdk.Context, msg MsgSubtractQuantity) (sdk.Tags, sdk.Error)
- func (k Keeper) UpdateProperties(ctx sdk.Context, msg MsgUpdateProperties) (sdk.Tags, sdk.Error)
- func (k Keeper) ValidateUpdateProperties(ctx sdk.Context, record Asset, sender sdk.AccAddress, properties Properties) sdk.Error
- type Location
- type Material
- type Materials
- type MsgAddMaterials
- type MsgAddQuantity
- type MsgAnswerProposal
- type MsgCreateAsset
- type MsgCreateProposal
- type MsgFinalize
- type MsgRevokeReporter
- type MsgSubtractQuantity
- type MsgUpdateProperties
- type Properties
- type Property
- type PropertyType
- type Proposal
- type ProposalRole
- type ProposalStatus
- type Proposals
- type RecordOutput
- type Reporter
- type Reporters
Constants ¶
const ( CodeUnknownAsset sdk.CodeType = 500 CodeInvalidTransaction sdk.CodeType = 501 CodeInvalidInput sdk.CodeType = 502 CodeInvalidOutput sdk.CodeType = 503 CodeInvalidAssets sdk.CodeType = 504 CodeMissingField sdk.CodeType = 505 CodeInvalidField sdk.CodeType = 506 CodeInvalidRevokeReporter sdk.CodeType = 507 CodeInvalidAssetQuantity sdk.CodeType = 508 CodeAssetAlreadyFinal sdk.CodeType = 509 CodeProposalNotFound sdk.CodeType = 510 CodeInvalidRole sdk.CodeType = 511 DefaultCodespace sdk.CodespaceType = 10 )
ABCI Response Codes Base SDK reserves 500 - 599.
const ( // TagAsset ... TagAsset = "asset_id" // TagSender ... TagSender = "sender" // TagRecipient ... TagRecipient = "recipient" )
Variables ¶
var ( // Keys for store prefixes AssetKey = []byte{0x00} // prefix for each key to an asset AccountAssetKey = []byte{0x01} // prefix for each key to an account ProposalsKey = []byte{0x02} // prefix for each key to an account a proposal AssetChildrenKey = []byte{0x03} // prefix for each key to an asset parent a an asset child AccountProposalsKey = []byte{0x04} // prefix for each key to an account a proposal ReportersKey = []byte{0x05} PropertiesKey = []byte{0x06} InventoryKey = []byte{0x07} ReporterAssetsKey = []byte{0x08} ProposalsAccountKey = []byte{0x09} MaterialsKey = []byte{0x0A} )
nolint
Functions ¶
func ErrAssetAlreadyFinal ¶ added in v0.2.1
ErrAssetAlreadyFinal ...
func ErrAssetNotFound ¶ added in v0.1.0
ErrAssetNotFound ...
func ErrInvalidAssetQuantity ¶ added in v0.2.1
ErrInvalidAssetQuantity ...
func ErrInvalidField ¶ added in v0.1.0
ErrInvalidField ...
func ErrInvalidRevokeReporter ¶ added in v0.2.2
func ErrInvalidRevokeReporter(addr sdk.AccAddress) sdk.Error
ErrInvalidRevokeReporter is used when the reporter of a revoke reporter message is not in the asset's reporter list
func ErrInvalidTransaction ¶ added in v0.2.1
ErrInvalidTransaction ...
func ErrProposalNotFound ¶ added in v0.20.0
func ErrProposalNotFound(recipient sdk.AccAddress) sdk.Error
ErrProposalNotFound ...
func GetAccountAssetKey ¶ added in v0.2.2
func GetAccountAssetKey(addr sdk.AccAddress, assetID string) []byte
GetAccountAssetKey get the key for an account for an asset
func GetAccountAssetsKey ¶ added in v0.2.2
func GetAccountAssetsKey(addr sdk.AccAddress) []byte
GetAccountAssetsKey get the key for an account for all assets
func GetAssetChildrenKey ¶ added in v0.20.0
GetAssetChilrenKey get the key for an asset for an asset
func GetAssetChildrensKey ¶ added in v0.20.0
func GetAssetKey ¶
GetAssetKey get the key for the record with address
func GetMaterialKey ¶ added in v0.22.4
GetMaterialKey ...
func GetMaterialsKey ¶ added in v0.22.4
GetMaterialsKey ...
func GetPropertiesKey ¶ added in v0.22.4
GetPropertiesKey ...
func GetPropertyKey ¶ added in v0.22.4
GetPropertyKey ...
func GetProposalAccountKey ¶ added in v0.21.0
func GetProposalAccountKey(addr sdk.AccAddress, assetID string) []byte
GetProposalAccountKey ...
func GetProposalKey ¶ added in v0.20.0
func GetProposalKey(assetID string, recipient sdk.AccAddress) []byte
func GetProposalsAccountKey ¶ added in v0.21.0
func GetProposalsAccountKey(addr sdk.AccAddress) []byte
GetProposalsAccountKey ...
func GetProposalsKey ¶ added in v0.20.0
func GetReporterAssetKey ¶ added in v0.21.0
func GetReporterAssetKey(addr sdk.AccAddress, assetID string) []byte
GetInventoryKey ...
func GetReporterAssetsKey ¶ added in v0.21.0
func GetReporterAssetsKey(addr sdk.AccAddress) []byte
GetInventoryKey ...
func GetReporterKey ¶ added in v0.22.4
func GetReporterKey(recordID string, addr sdk.AccAddress) []byte
GetReporterKey ...
func GetReportersKey ¶ added in v0.22.4
GetReportersKey ...
func NewPubKey ¶ added in v0.20.0
func NewPubKey(pk string) (res ed25519.PubKeyEd25519)
func PropertyTypeToString ¶ added in v0.22.0
func PropertyTypeToString(t PropertyType) string
func RegisterWire ¶ added in v0.0.2
Register concrete types on wire codec
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Name string `json:"name"` Owner sdk.AccAddress `json:"owner"` Parent string `json:"parent"` // the id of the asset parent Root string `json:"root"` // the id of the asset root Final bool `json:"final"` Quantity sdk.Int `json:"quantity"` Unit string `json:"unit"` Created int64 `json:"created"` Height int64 `json:"height"` }
Asset asset infomation
func UnmarshalRecord ¶ added in v0.22.4
UnmarshalRecord ...
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper ...
func (Keeper) AddMaterial ¶ added in v0.22.4
AddMaterial ...
func (Keeper) AddMaterials ¶ added in v0.2.1
AddMaterials add materials to the asset
func (Keeper) AddProposal ¶ added in v0.20.0
func (Keeper) AddQuantity ¶
AddQuantity ...
func (Keeper) AnswerProposal ¶ added in v0.1.0
func (Keeper) CheckUpdateAttributeAuthorization ¶ added in v0.22.4
func (k Keeper) CheckUpdateAttributeAuthorization(ctx sdk.Context, record Asset, reporter Reporter, prop Property) bool
CheckUpdateAttributeAuthorization returns whether the address is authorized to update the attribute
func (Keeper) CreateAsset ¶ added in v0.2.1
CreateAsset create new an asset
func (Keeper) DeleteProposal ¶ added in v0.20.0
func (Keeper) DeleteReporter ¶ added in v0.22.4
DeleteReporter ...
func (Keeper) DeleteReporters ¶ added in v0.22.4
DeleteReporters ...
func (Keeper) GetMaterial ¶ added in v0.22.4
func (k Keeper) GetMaterial(ctx sdk.Context, recordID string, materialID string) (material Material, found bool)
GetMaterial ...
func (Keeper) GetMaterials ¶ added in v0.22.4
GetMaterials ...
func (Keeper) GetProperties ¶ added in v0.22.4
func (k Keeper) GetProperties(ctx sdk.Context, recordID string) (reporters Properties)
GetProperties ...
func (Keeper) GetProposal ¶ added in v0.20.0
func (Keeper) GetReporter ¶ added in v0.22.4
func (k Keeper) GetReporter(ctx sdk.Context, recordID string, addr sdk.AccAddress) (reporter Reporter, found bool)
GetReporter ...
func (Keeper) GetReporters ¶ added in v0.22.4
GetReporters ...
func (Keeper) RevokeReporter ¶ added in v0.2.2
RevokeReporter delete reporter
func (Keeper) SetProperties ¶ added in v0.22.4
func (k Keeper) SetProperties(ctx sdk.Context, recordID string, props Properties)
SetProperties ...
func (Keeper) SetProperty ¶ added in v0.22.4
SetProperty ....
func (Keeper) SetProposal ¶ added in v0.20.0
func (Keeper) SetReporter ¶ added in v0.22.4
SetReporter ...
func (Keeper) SubtractQuantity ¶
SubtractQuantity subtract quantity of the asset
func (Keeper) UpdateProperties ¶ added in v0.2.2
UpdateProperties ...
func (Keeper) ValidateUpdateProperties ¶ added in v0.22.4
func (k Keeper) ValidateUpdateProperties(ctx sdk.Context, record Asset, sender sdk.AccAddress, properties Properties) sdk.Error
ValidateUpdateProperties ...
type Material ¶ added in v0.1.0
Material ...
func UnmarshalMaterial ¶ added in v0.22.4
UnmarshalMaterial ...
func (Material) ValidateBasic ¶ added in v0.22.4
ValidateBasic ...
type Materials ¶ added in v0.1.0
type Materials []Material
Materials ...
func (Materials) ValidateBasic ¶ added in v0.22.4
ValidateBasic ...
type MsgAddMaterials ¶ added in v0.1.0
type MsgAddMaterials struct { AssetID string `json:"asset_id"` Sender sdk.AccAddress `json:"sender"` Amount Materials `json:"amount"` }
MsgAddMaterials ...
func (MsgAddMaterials) Get ¶ added in v0.1.0
func (msg MsgAddMaterials) Get(key interface{}) (value interface{})
func (MsgAddMaterials) GetSignBytes ¶ added in v0.1.0
func (msg MsgAddMaterials) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgAddMaterials) GetSigners ¶ added in v0.1.0
func (msg MsgAddMaterials) GetSigners() []sdk.AccAddress
func (MsgAddMaterials) Type ¶ added in v0.1.0
func (msg MsgAddMaterials) Type() string
func (MsgAddMaterials) ValidateBasic ¶ added in v0.1.0
func (msg MsgAddMaterials) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgAddQuantity ¶ added in v0.2.2
type MsgAddQuantity struct { Sender sdk.AccAddress `json:"sender"` AssetID string `json:"asset_id"` Quantity sdk.Int `json:"quantity"` }
MsgAddQuantity ... ---------------------------------------------------------------
func (MsgAddQuantity) Get ¶ added in v0.2.2
func (msg MsgAddQuantity) Get(key interface{}) (value interface{})
func (MsgAddQuantity) GetSignBytes ¶ added in v0.2.2
func (msg MsgAddQuantity) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgAddQuantity) GetSigners ¶ added in v0.2.2
func (msg MsgAddQuantity) GetSigners() []sdk.AccAddress
func (MsgAddQuantity) Type ¶ added in v0.2.2
func (msg MsgAddQuantity) Type() string
func (MsgAddQuantity) ValidateBasic ¶ added in v0.2.2
func (msg MsgAddQuantity) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgAnswerProposal ¶ added in v0.20.0
type MsgAnswerProposal struct { AssetID string `json:"asset_id"` Sender sdk.AccAddress `json:"sender"` Recipient sdk.AccAddress `json:"recipient"` Response ProposalStatus `json:"response"` Role ProposalRole `json:"role"` }
MsgAnswerProposal ...
func (MsgAnswerProposal) Get ¶ added in v0.20.0
func (msg MsgAnswerProposal) Get(key interface{}) (value interface{})
func (MsgAnswerProposal) GetSignBytes ¶ added in v0.20.0
func (msg MsgAnswerProposal) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgAnswerProposal) GetSigners ¶ added in v0.20.0
func (msg MsgAnswerProposal) GetSigners() []sdk.AccAddress
func (MsgAnswerProposal) Type ¶ added in v0.20.0
func (msg MsgAnswerProposal) Type() string
func (MsgAnswerProposal) ValidateBasic ¶ added in v0.20.0
func (msg MsgAnswerProposal) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgCreateAsset ¶ added in v0.2.1
type MsgCreateAsset struct { Sender sdk.AccAddress `json:"sender"` AssetID string `json:"asset_id"` Name string `json:"name"` Quantity sdk.Int `json:"quantity"` Parent string `json:"parent"` // the id of the parent asset Unit string `json:"unit"` Properties Properties `json:"properties"` }
MsgCreateAsset A really msg record create type, these fields are can be entirely arbitrary and custom to your message
func NewMsgCreateAsset ¶ added in v0.2.1
func NewMsgCreateAsset(sender sdk.AccAddress, id, name string, quantity sdk.Int, parent string) MsgCreateAsset
NewMsgCreateAsset new record create msg
func (MsgCreateAsset) Get ¶ added in v0.2.1
func (msg MsgCreateAsset) Get(key interface{}) (value interface{})
func (MsgCreateAsset) GetSignBytes ¶ added in v0.2.1
func (msg MsgCreateAsset) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgCreateAsset) GetSigners ¶ added in v0.2.1
func (msg MsgCreateAsset) GetSigners() []sdk.AccAddress
func (MsgCreateAsset) ValidateBasic ¶ added in v0.2.1
func (msg MsgCreateAsset) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgCreateProposal ¶ added in v0.20.0
type MsgCreateProposal struct { AssetID string `json:"asset_id"` Sender sdk.AccAddress `json:"sender"` Recipient sdk.AccAddress `json:"recipient"` Properties []string `json:"properties"` Role ProposalRole `json:"role"` }
CreateProposalMsg ...
func (MsgCreateProposal) Get ¶ added in v0.20.0
func (msg MsgCreateProposal) Get(key interface{}) (value interface{})
func (MsgCreateProposal) GetSignBytes ¶ added in v0.20.0
func (msg MsgCreateProposal) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgCreateProposal) GetSigners ¶ added in v0.20.0
func (msg MsgCreateProposal) GetSigners() []sdk.AccAddress
func (MsgCreateProposal) Type ¶ added in v0.20.0
func (msg MsgCreateProposal) Type() string
func (MsgCreateProposal) ValidateBasic ¶ added in v0.20.0
func (msg MsgCreateProposal) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgFinalize ¶ added in v0.2.1
type MsgFinalize struct { Sender sdk.AccAddress `json:"sender"` AssetID string `json:"asset_id"` }
MsgSend ...
func (MsgFinalize) Get ¶ added in v0.2.1
func (msg MsgFinalize) Get(key interface{}) (value interface{})
func (MsgFinalize) GetSignBytes ¶ added in v0.2.1
func (msg MsgFinalize) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgFinalize) GetSigners ¶ added in v0.2.1
func (msg MsgFinalize) GetSigners() []sdk.AccAddress
func (MsgFinalize) Type ¶ added in v0.2.1
func (msg MsgFinalize) Type() string
func (MsgFinalize) ValidateBasic ¶ added in v0.2.1
func (msg MsgFinalize) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgRevokeReporter ¶ added in v0.2.2
type MsgRevokeReporter struct { Sender sdk.AccAddress `json:"sender"` Reporter sdk.AccAddress `json:"reporter"` AssetID string `json:"asset_id"` }
MsgRevokeReporter ...
func (MsgRevokeReporter) Get ¶ added in v0.2.2
func (msg MsgRevokeReporter) Get(key interface{}) (value interface{})
func (MsgRevokeReporter) GetSignBytes ¶ added in v0.2.2
func (msg MsgRevokeReporter) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgRevokeReporter) GetSigners ¶ added in v0.2.2
func (msg MsgRevokeReporter) GetSigners() []sdk.AccAddress
func (MsgRevokeReporter) Type ¶ added in v0.2.2
func (msg MsgRevokeReporter) Type() string
func (MsgRevokeReporter) ValidateBasic ¶ added in v0.2.2
func (msg MsgRevokeReporter) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgSubtractQuantity ¶ added in v0.2.2
type MsgSubtractQuantity struct { Sender sdk.AccAddress `json:"sender"` AssetID string `json:"asset_id"` Quantity sdk.Int `json:"quantity"` }
MsgSubtractQuantity ... ---------------------------------------------------------------
func (MsgSubtractQuantity) Get ¶ added in v0.2.2
func (msg MsgSubtractQuantity) Get(key interface{}) (value interface{})
func (MsgSubtractQuantity) GetSignBytes ¶ added in v0.2.2
func (msg MsgSubtractQuantity) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgSubtractQuantity) GetSigners ¶ added in v0.2.2
func (msg MsgSubtractQuantity) GetSigners() []sdk.AccAddress
func (MsgSubtractQuantity) Type ¶ added in v0.2.2
func (msg MsgSubtractQuantity) Type() string
func (MsgSubtractQuantity) ValidateBasic ¶ added in v0.2.2
func (msg MsgSubtractQuantity) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgUpdateProperties ¶ added in v0.2.2
type MsgUpdateProperties struct { Sender sdk.AccAddress `json:"sender"` AssetID string `json:"asset_id"` Properties Properties `json:"properties"` }
MsgUpdateProperties ... ---------------------------------------------------------------
func (MsgUpdateProperties) Get ¶ added in v0.2.2
func (msg MsgUpdateProperties) Get(key interface{}) (value interface{})
func (MsgUpdateProperties) GetSignBytes ¶ added in v0.2.2
func (msg MsgUpdateProperties) GetSignBytes() []byte
GetSignBytes Get the bytes for the message signer to sign on
func (MsgUpdateProperties) GetSigners ¶ added in v0.2.2
func (msg MsgUpdateProperties) GetSigners() []sdk.AccAddress
func (MsgUpdateProperties) Type ¶ added in v0.2.2
func (msg MsgUpdateProperties) Type() string
func (MsgUpdateProperties) ValidateBasic ¶ added in v0.2.2
func (msg MsgUpdateProperties) ValidateBasic() sdk.Error
ValidateBasic Validate Basic is used to quickly disqualify obviously invalid messages quickly
type Properties ¶ added in v0.2.2
type Properties []Property
Properties list all properties
func (Properties) ValidateBasic ¶ added in v0.22.4
func (props Properties) ValidateBasic() sdk.Error
ValidateBasic ...
type Property ¶ added in v0.2.1
type Property struct { Name string `json:"name"` Type PropertyType `json:"type"` BytesValue []byte `json:"bytes_value,omitempty"` StringValue string `json:"string_value,omitempty"` BooleanValue bool `json:"boolean_value,omitempty"` NumberValue int64 `json:"number_value,omitempty"` EnumValue []string `json:"enum_value,omitempty"` Location Location `json:"location_value,omitempty"` }
Property property of the asset
func UnmarshalProperty ¶ added in v0.22.4
UnmarshalProperty ...
func (Property) ValidateBasic ¶ added in v0.22.4
ValidateBasic ...
type PropertyType ¶ added in v0.2.2
type PropertyType int
PropertyType define the type of the property
const ( PropertyTypeBytes PropertyType = iota + 1 PropertyTypeString PropertyTypeBoolean PropertyTypeNumber PropertyTypeEnum PropertyTypeLocation )
All avaliable type ò the attribute
type Proposal ¶
type Proposal struct { Role ProposalRole `json:"role"` // The role assigned to the recipient Status ProposalStatus `json:"status"` // The response of the recipient Properties []string `json:"properties"` // The asset's attributes name that the recipient is authorized to update Issuer sdk.AccAddress `json:"issuer"` // The proposal issuer Recipient sdk.AccAddress `json:"recipient"` // The recipient of the proposal }
Proposal is an invitation to manage an asset
func UnmarshalProposal ¶ added in v0.22.4
UnmarshalProposal ...
func (Proposal) ValidateAnswer ¶ added in v0.20.0
func (p Proposal) ValidateAnswer(msg MsgAnswerProposal) sdk.Error
type ProposalRole ¶ added in v0.1.0
type ProposalRole int
ProposalRole defines the authority of the proposal's recipient
const ( // RoleReporter is authorized to update the asset's attributes // whose name is included in the proposal's properties field RoleReporter ProposalRole = iota + 1 // RoleOwner has the same authorization as RoleReporter // but also authorized to make proposal to other recipient RoleOwner )
type ProposalStatus ¶ added in v0.1.0
type ProposalStatus int
ProposalStatus define the status of the proposal
const ( StatusPending ProposalStatus = iota // The recipient has not answered StatusAccepted // The recipient accepted the proposal StatusCancel // The issuer cancel the proposal StatusRejected // the recipient reject the proposal )
All available status of the proposal
type RecordOutput ¶ added in v0.22.4
type RecordOutput struct { ID string `json:"id"` Name string `json:"name"` Owner sdk.AccAddress `json:"owner"` Type string `json:"type"` SubType string `json:"subtype"` Barcode string `json:"barcode"` Parent string `json:"parent"` // the id of the asset parent Root string `json:"root"` // the id of the asset root Final bool `json:"final"` Quantity sdk.Int `json:"quantity"` Unit string `json:"unit"` Created int64 `json:"created"` Height int64 `json:"height"` Materials []Material `json:"materials"` Reporters []Reporter `json:"reporters"` Properties Properties `json:"properties"` }
RecordOutput ...