Documentation ¶
Overview ¶
Package wasm supports smart contract integration with the metadata module.
Index ¶
- func Querier(keeper keeper.Keeper) provwasm.Querier
- type GetRecordsParams
- type GetScopeParams
- type GetSessionsParams
- type InputStatus
- type MetadataQueryParams
- type Party
- type PartyType
- type Process
- type ProcessID
- type ProcessIDAddress
- type ProcessIDHash
- type Record
- type RecordInput
- type RecordInputSource
- type RecordInputSourceHash
- type RecordInputSourceRecord
- type RecordOutput
- type Records
- type ResultStatus
- type Scope
- type Session
- type Sessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetRecordsParams ¶
type GetRecordsParams struct { // The bech32 address of the scope we want to get records for. ScopeID string `json:"scope_id"` // The optional record name. Name string `json:"name,omitempty"` }
GetRecordsParams are the inputs for a records query.
type GetScopeParams ¶
type GetScopeParams struct { // The bech32 address of the scope we want to get. ScopeID string `json:"scope_id"` }
GetScopeParams are the inputs for a scope query.
type GetSessionsParams ¶
type GetSessionsParams struct { // The bech32 address of the scope we want to get sessions for. ScopeID string `json:"scope_id"` }
GetSessionsParams are the inputs for a session query.
type InputStatus ¶
type InputStatus string
InputStatus defines record input status types.
const ( // InputStatusRecord is a concrete record input status type. InputStatusRecord InputStatus = "record" // InputStatusProposed is a concrete record input status type. InputStatusProposed InputStatus = "proposed" // InputStatusUnspecified is a concrete record input status type. InputStatusUnspecified InputStatus = "unspecified" )
type MetadataQueryParams ¶
type MetadataQueryParams struct { // Get a scope by ID. GetScope *GetScopeParams `json:"get_scope,omitempty"` // Get sessions by scope ID and name (optional). GetSessions *GetSessionsParams `json:"get_sessions,omitempty"` // Get records by scope ID and name (optional). GetRecords *GetRecordsParams `json:"get_records,omitempty"` }
MetadataQueryParams represents the query request type for the metadata module sent by smart contracts. Only one query field should be set.
type PartyType ¶
type PartyType string
PartyType defines roles that can be associated to a party.
const ( // PartyTypeAffiliate is a concrete party type. PartyTypeAffiliate PartyType = "affiliate" // PartyTypeCustodian is a concrete party type. PartyTypeCustodian PartyType = "custodian" // PartyTypeInvestor is a concrete party type. PartyTypeInvestor PartyType = "investor" // PartyTypeOmnibus is a concrete party type. PartyTypeOmnibus PartyType = "omnibus" // PartyTypeOriginator is a concrete party type. PartyTypeOriginator PartyType = "originator" // PartyTypeOwner is a concrete party type. PartyTypeOwner PartyType = "owner" // PartyTypeProvenance is a concrete party type. PartyTypeProvenance PartyType = "provenance" // PartyTypeServicer is a concrete party type. PartyTypeServicer PartyType = "servicer" // PartyTypeUnspecified is a concrete party type. PartyTypeUnspecified PartyType = "unspecified" )
type Process ¶
type Process struct { ProcessID *ProcessID `json:"process_id"` Name string `json:"name"` Method string `json:"method"` }
Process is the entity that generated a record.
type ProcessID ¶
type ProcessID struct { Address *ProcessIDAddress `json:"address,omitempty"` Hash *ProcessIDHash `json:"hash,omitempty"` }
ProcessID is a process identifier. Either address or hash should be set, but not both.
type ProcessIDAddress ¶
type ProcessIDAddress struct {
Address string `json:"address"`
}
ProcessIDAddress is the on-chain address of a process.
type ProcessIDHash ¶
type ProcessIDHash struct {
Hash string `json:"hash"`
}
ProcessIDHash is the hash of an off-chain process.
type Record ¶
type Record struct { SessionID string `json:"session_id"` SpecificationID string `json:"specification_id"` Name string `json:"name"` Process *Process `json:"process"` Inputs []*RecordInput `json:"inputs,omitempty"` Outputs []*RecordOutput `json:"outputs,omitempty"` }
Record is a record of fact for a session.
type RecordInput ¶
type RecordInput struct { Name string `json:"name"` TypeName string `json:"type_name"` Source *RecordInputSource `json:"source"` Status InputStatus `json:"status"` }
RecordInput is an input used to produce a record.
type RecordInputSource ¶
type RecordInputSource struct { Record *RecordInputSourceRecord `json:"record,omitempty"` Hash *RecordInputSourceHash `json:"hash,omitempty"` }
RecordInputSource is a record input source. Either record or hash should be set, but not both.
type RecordInputSourceHash ¶
type RecordInputSourceHash struct {
Hash string `json:"hash"`
}
RecordInputSourceHash is the hash of an off-chain piece of information (proposed records).
type RecordInputSourceRecord ¶
type RecordInputSourceRecord struct {
RecordID string `json:"record_id"`
}
RecordInputSourceRecord is the address of a record on chain (established records).
type RecordOutput ¶
type RecordOutput struct { Hash string `json:"hash"` Status ResultStatus `json:"status"` }
RecordOutput is the output of a process.
type Records ¶
type Records struct {
Records []*Record `json:"records"`
}
Records is a group of records.
type ResultStatus ¶
type ResultStatus string
Result status types.
const ( // ResultStatusPass is a concrete result status type. ResultStatusPass ResultStatus = "pass" // ResultStatusFail is a concrete result status type. ResultStatusFail ResultStatus = "fail" // ResultStatusSkip is a concrete result status type. ResultStatusSkip ResultStatus = "skip" // ResultStatusUnspecified is a concrete result status type. ResultStatusUnspecified ResultStatus = "unspecified" )
type Scope ¶
type Scope struct { ScopeID string `json:"scope_id"` SpecificationID string `json:"specification_id"` DataAccess []string `json:"data_access,omitempty"` Owners []*Party `json:"owners,omitempty"` ValueOwnerAddress string `json:"value_owner_address"` }
Scope is a root reference for a collection of records owned by one or more parties.
type Session ¶
type Session struct { SessionID string `json:"session_id"` SpecificationID string `json:"specification_id"` Name string `json:"name"` Context []byte `json:"context"` Parties []*Party `json:"parties,omitempty"` }
Session is the state of an execution context for a specification instance.