Documentation
¶
Index ¶
- Constants
- type CountValue
- func (*CountValue) Descriptor() ([]byte, []int)
- func (count *CountValue) Encode() ([]byte, error)
- func (m *CountValue) GetCurrent() uint32
- func (count *CountValue) Inc()
- func (*CountValue) ProtoMessage()
- func (m *CountValue) Reset()
- func (m *CountValue) String() string
- func (count *CountValue) ValidNextValue(proposed uint32) bool
- func (m *CountValue) XXX_DiscardUnknown()
- func (m *CountValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CountValue) XXX_Merge(src proto.Message)
- func (m *CountValue) XXX_Size() int
- func (m *CountValue) XXX_Unmarshal(b []byte) error
- type Increment
- func (*Increment) Descriptor() ([]byte, []int)
- func (inc *Increment) Encode() ([]byte, error)
- func (m *Increment) GetValue() uint32
- func (*Increment) ProtoMessage()
- func (m *Increment) Reset()
- func (m *Increment) String() string
- func (m *Increment) XXX_DiscardUnknown()
- func (m *Increment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Increment) XXX_Merge(src proto.Message)
- func (m *Increment) XXX_Size() int
- func (m *Increment) XXX_Unmarshal(b []byte) error
- type Schema
- type Service
- type Wallet
Constants ¶
View Source
const ServiceName = "counter_example"
ServiceName is just that...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountValue ¶
type CountValue struct {
Current uint32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Storage
func DecodeCount ¶
func DecodeCount(raw []byte) (*CountValue, error)
DecodeCount bytes => Countvalue
func (*CountValue) Descriptor ¶
func (*CountValue) Descriptor() ([]byte, []int)
func (*CountValue) GetCurrent ¶
func (m *CountValue) GetCurrent() uint32
func (*CountValue) ProtoMessage ¶
func (*CountValue) ProtoMessage()
func (*CountValue) Reset ¶
func (m *CountValue) Reset()
func (*CountValue) String ¶
func (m *CountValue) String() string
func (*CountValue) ValidNextValue ¶
func (count *CountValue) ValidNextValue(proposed uint32) bool
ValidNextValue check if the proposed count is correct
func (*CountValue) XXX_DiscardUnknown ¶
func (m *CountValue) XXX_DiscardUnknown()
func (*CountValue) XXX_Marshal ¶
func (m *CountValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CountValue) XXX_Merge ¶
func (m *CountValue) XXX_Merge(src proto.Message)
func (*CountValue) XXX_Size ¶
func (m *CountValue) XXX_Size() int
func (*CountValue) XXX_Unmarshal ¶
func (m *CountValue) XXX_Unmarshal(b []byte) error
type Increment ¶
type Increment struct {
Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Message
func (*Increment) Descriptor ¶
func (*Increment) ProtoMessage ¶
func (*Increment) ProtoMessage()
func (*Increment) XXX_DiscardUnknown ¶
func (m *Increment) XXX_DiscardUnknown()
func (*Increment) XXX_Marshal ¶
func (*Increment) XXX_Unmarshal ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func (Schema) IncrementCount ¶
type Service ¶
type Service struct{}
Service is a simple service to demonstrate the menta API. It stores an counter for each tx.sender
func (Service) Execute ¶
func (srv Service) Execute(sender []byte, msgid uint32, message []byte, store sdk.KVStore) sdk.Result
Execute runs the core logic for a state transition
func (Service) Initialize ¶
Initialize is called on the genesis block. Not used
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func CreateWallet ¶
func CreateWallet() Wallet
func WalletFromSeed ¶
Click to show internal directories.
Click to hide internal directories.