Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type AccountSudoMsg
- type Any
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetNextAccountId() uint64
- func (m *GenesisState) GetParams() *Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (genState *GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgCreateAccount
- func (*MsgCreateAccount) Descriptor() ([]byte, []int)
- func (m *MsgCreateAccount) GetCodeID() uint64
- func (m *MsgCreateAccount) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *MsgCreateAccount) GetMsg() github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage
- func (m *MsgCreateAccount) GetSalt() []byte
- func (m *MsgCreateAccount) GetSender() string
- func (m *MsgCreateAccount) GetSigners() []sdk.AccAddress
- func (m *MsgCreateAccount) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateAccount) ProtoMessage()
- func (m *MsgCreateAccount) Reset()
- func (m *MsgCreateAccount) Size() (n int)
- func (m *MsgCreateAccount) String() string
- func (m *MsgCreateAccount) Unmarshal(dAtA []byte) error
- func (m *MsgCreateAccount) ValidateBasic() error
- func (m *MsgCreateAccount) XXX_DiscardUnknown()
- func (m *MsgCreateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateAccount) XXX_Merge(src proto.Message)
- func (m *MsgCreateAccount) XXX_Size() int
- func (m *MsgCreateAccount) XXX_Unmarshal(b []byte) error
- type MsgCreateAccountResponse
- func (*MsgCreateAccountResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateAccountResponse) GetAddress() string
- func (m *MsgCreateAccountResponse) GetData() []byte
- func (m *MsgCreateAccountResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateAccountResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateAccountResponse) ProtoMessage()
- func (m *MsgCreateAccountResponse) Reset()
- func (m *MsgCreateAccountResponse) Size() (n int)
- func (m *MsgCreateAccountResponse) String() string
- func (m *MsgCreateAccountResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateAccountResponse) XXX_DiscardUnknown()
- func (m *MsgCreateAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateAccountResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateAccountResponse) XXX_Size() int
- func (m *MsgCreateAccountResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetParams() *Params
- func (m *MsgUpdateParams) GetSender() string
- func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type NilPubKey
- func (pk *NilPubKey) Address() cryptotypes.Address
- func (pk *NilPubKey) Bytes() []byte
- func (*NilPubKey) Descriptor() ([]byte, []int)
- func (pk *NilPubKey) Equals(other cryptotypes.PubKey) bool
- func (m *NilPubKey) GetAddressBytes() []byte
- func (m *NilPubKey) Marshal() (dAtA []byte, err error)
- func (m *NilPubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *NilPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NilPubKey) ProtoMessage()
- func (m *NilPubKey) Reset()
- func (m *NilPubKey) Size() (n int)
- func (pk *NilPubKey) String() string
- func (pk *NilPubKey) Type() string
- func (m *NilPubKey) Unmarshal(dAtA []byte) error
- func (pk *NilPubKey) VerifySignature(_ []byte, _ []byte) bool
- func (m *NilPubKey) XXX_DiscardUnknown()
- func (m *NilPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NilPubKey) XXX_Merge(src proto.Message)
- func (m *NilPubKey) XXX_Size() int
- func (m *NilPubKey) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetMaxGasPost() uint64
- func (m *Params) GetMaxGasPre() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p *Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PostExecTx
- type PreExecTx
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() *Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type SmartAccount
- func (*SmartAccount) Descriptor() ([]byte, []int)
- func (acc *SmartAccount) GetAccountNumber() uint64
- func (acc *SmartAccount) GetAddress() sdk.AccAddress
- func (acc *SmartAccount) GetPubKey() cryptotypes.PubKey
- func (acc *SmartAccount) GetSequence() uint64
- func (m *SmartAccount) Marshal() (dAtA []byte, err error)
- func (m *SmartAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *SmartAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SmartAccount) ProtoMessage()
- func (m *SmartAccount) Reset()
- func (acc *SmartAccount) SetAccountNumber(accNumber uint64) error
- func (acc *SmartAccount) SetAddress(addr sdk.AccAddress) error
- func (acc *SmartAccount) SetPubKey(_ cryptotypes.PubKey) error
- func (acc *SmartAccount) SetSequence(seq uint64) error
- func (m *SmartAccount) Size() (n int)
- func (m *SmartAccount) String() string
- func (m *SmartAccount) Unmarshal(dAtA []byte) error
- func (m *SmartAccount) XXX_DiscardUnknown()
- func (m *SmartAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SmartAccount) XXX_Merge(src proto.Message)
- func (m *SmartAccount) XXX_Size() int
- func (m *SmartAccount) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( EventTypeAccountCreated = "account_created" AttributeKeyCreator = "creator" AttributeKeyCodeID = "code_id" AttributeKeyContractAddr = "contract_addr" )
const ( // ModuleName defines the module name ModuleName = "nativesca" // StoreKey defines the primary module store key StoreKey = ModuleName )
const DefaultMaxGas = 2_000_000
Variables ¶
var ( ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") )
var ( ErrNotBaseAccount = errors.Register(ModuleName, 2, "account is not an authtypes.BaseAccount") ErrNotSingleSignautre = errors.Register(ModuleName, 3, "signature is not a txsigning.SingleSignatureData") ErrParsingParams = errors.Register(ModuleName, 4, "failed to marshal or unmarshal module params") ErrZeroMaxGas = errors.Register(ModuleName, 5, "max gas cannot be zero") )
x/nativesca module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // Module parameters KeyParams = []byte{0x00} KeyNextAccountID = []byte{0x01} // In the AnteHandler, if the tx only has one sender and this sender is an // SmartAccount, we store its address here. This way, in the PostHandler, // we know whether to call the post_exec_tx method. KeySignerAddress = []byte{0x02} )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountSudoMsg ¶
type AccountSudoMsg struct { PreExecTx *PreExecTx `json:"pre_exec_tx,omitempty"` PostExecTx *PostExecTx `json:"post_exec_tx,omitempty"` }
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶
type GenesisState struct { Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` NextAccountId uint64 `protobuf:"varint,2,opt,name=next_account_id,json=nextAccountId,proto3" json:"next_account_id,omitempty"` }
GenesisState defines the nativesca module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
func NewGenesisState ¶
func NewGenesisState(nextAccountID uint64, params *Params) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetNextAccountId ¶
func (m *GenesisState) GetNextAccountId() uint64
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() *Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) Validate ¶
func (genState *GenesisState) Validate() error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Update the module's parameters. Can only be called by the authority. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // Create a new SmartAccount. CreateAccount(ctx context.Context, in *MsgCreateAccount, opts ...grpc.CallOption) (*MsgCreateAccountResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgCreateAccount ¶
type MsgCreateAccount struct { // Sender is the actor who signs the message Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // CodeID indicates which wasm binary code is to be used for this contract CodeID uint64 `protobuf:"varint,2,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` // Msg is the JSON-encoded instantiate message for the contract Msg github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage `` /* 126-byte string literal not displayed */ // Funds are coins to be deposited to the contract on instantiattion Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` // Salt is an arbinary value to be used in deriving the account address. // Max 64 bytes. Salt []byte `protobuf:"bytes,5,opt,name=salt,proto3" json:"salt,omitempty"` }
func (*MsgCreateAccount) Descriptor ¶
func (*MsgCreateAccount) Descriptor() ([]byte, []int)
func (*MsgCreateAccount) GetCodeID ¶
func (m *MsgCreateAccount) GetCodeID() uint64
func (*MsgCreateAccount) GetFunds ¶
func (m *MsgCreateAccount) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins
func (*MsgCreateAccount) GetMsg ¶
func (m *MsgCreateAccount) GetMsg() github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage
func (*MsgCreateAccount) GetSalt ¶
func (m *MsgCreateAccount) GetSalt() []byte
func (*MsgCreateAccount) GetSender ¶
func (m *MsgCreateAccount) GetSender() string
func (*MsgCreateAccount) GetSigners ¶
func (m *MsgCreateAccount) GetSigners() []sdk.AccAddress
func (*MsgCreateAccount) Marshal ¶
func (m *MsgCreateAccount) Marshal() (dAtA []byte, err error)
func (*MsgCreateAccount) MarshalToSizedBuffer ¶
func (m *MsgCreateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateAccount) ProtoMessage ¶
func (*MsgCreateAccount) ProtoMessage()
func (*MsgCreateAccount) Reset ¶
func (m *MsgCreateAccount) Reset()
func (*MsgCreateAccount) Size ¶
func (m *MsgCreateAccount) Size() (n int)
func (*MsgCreateAccount) String ¶
func (m *MsgCreateAccount) String() string
func (*MsgCreateAccount) Unmarshal ¶
func (m *MsgCreateAccount) Unmarshal(dAtA []byte) error
func (*MsgCreateAccount) ValidateBasic ¶
func (m *MsgCreateAccount) ValidateBasic() error
func (*MsgCreateAccount) XXX_DiscardUnknown ¶
func (m *MsgCreateAccount) XXX_DiscardUnknown()
func (*MsgCreateAccount) XXX_Marshal ¶
func (m *MsgCreateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateAccount) XXX_Merge ¶
func (m *MsgCreateAccount) XXX_Merge(src proto.Message)
func (*MsgCreateAccount) XXX_Size ¶
func (m *MsgCreateAccount) XXX_Size() int
func (*MsgCreateAccount) XXX_Unmarshal ¶
func (m *MsgCreateAccount) XXX_Unmarshal(b []byte) error
type MsgCreateAccountResponse ¶
type MsgCreateAccountResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*MsgCreateAccountResponse) Descriptor ¶
func (*MsgCreateAccountResponse) Descriptor() ([]byte, []int)
func (*MsgCreateAccountResponse) GetAddress ¶
func (m *MsgCreateAccountResponse) GetAddress() string
func (*MsgCreateAccountResponse) GetData ¶
func (m *MsgCreateAccountResponse) GetData() []byte
func (*MsgCreateAccountResponse) Marshal ¶
func (m *MsgCreateAccountResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateAccountResponse) MarshalTo ¶
func (m *MsgCreateAccountResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateAccountResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateAccountResponse) ProtoMessage ¶
func (*MsgCreateAccountResponse) ProtoMessage()
func (*MsgCreateAccountResponse) Reset ¶
func (m *MsgCreateAccountResponse) Reset()
func (*MsgCreateAccountResponse) Size ¶
func (m *MsgCreateAccountResponse) Size() (n int)
func (*MsgCreateAccountResponse) String ¶
func (m *MsgCreateAccountResponse) String() string
func (*MsgCreateAccountResponse) Unmarshal ¶
func (m *MsgCreateAccountResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateAccountResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateAccountResponse) XXX_DiscardUnknown()
func (*MsgCreateAccountResponse) XXX_Marshal ¶
func (m *MsgCreateAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateAccountResponse) XXX_Merge ¶
func (m *MsgCreateAccountResponse) XXX_Merge(src proto.Message)
func (*MsgCreateAccountResponse) XXX_Size ¶
func (m *MsgCreateAccountResponse) XXX_Size() int
func (*MsgCreateAccountResponse) XXX_Unmarshal ¶
func (m *MsgCreateAccountResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Update the module's parameters. Can only be called by the authority. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // Create a new SmartAccount. CreateAccount(context.Context, *MsgCreateAccount) (*MsgCreateAccountResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` }
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() *Params
func (*MsgUpdateParams) GetSender ¶
func (m *MsgUpdateParams) GetSender() string
func (*MsgUpdateParams) GetSigners ¶
func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶
func (m *MsgUpdateParams) ValidateBasic() error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type NilPubKey ¶
type NilPubKey struct {
AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"`
}
NilPubKey is the pubkey type of the SmartAccount. Basically, it represents a pubkey that doesn't exist.
The actual pubkey of an SmartAccount (if it has one) is to be stored inside the contract, not at the SDK level. Signature verification is also done inside the contract, typically in the PreExecTx hook.
func NewNilPubKey ¶
func (*NilPubKey) Address ¶
func (pk *NilPubKey) Address() cryptotypes.Address
func (*NilPubKey) Descriptor ¶
func (*NilPubKey) GetAddressBytes ¶
func (*NilPubKey) MarshalToSizedBuffer ¶
func (*NilPubKey) ProtoMessage ¶
func (*NilPubKey) ProtoMessage()
func (*NilPubKey) XXX_DiscardUnknown ¶
func (m *NilPubKey) XXX_DiscardUnknown()
func (*NilPubKey) XXX_Marshal ¶
func (*NilPubKey) XXX_Unmarshal ¶
type Params ¶
type Params struct { // MaxGasPre is the maximum amount of gas that can be consumed by the // contract call in the pre_exec_tx decorator. // // Must be greater than zero. MaxGasPre uint64 `protobuf:"varint,1,opt,name=max_gas_pre,json=maxGasPre,proto3" json:"max_gas_pre,omitempty"` // MaxGasPost is the maximum amount of gas that can be consumed by the // contract call in the post_exec_tx decorator. // // Must be greater than zero. MaxGasPost uint64 `protobuf:"varint,2,opt,name=max_gas_post,json=maxGasPost,proto3" json:"max_gas_post,omitempty"` }
func DefaultParams ¶
func DefaultParams() *Params
func (*Params) Descriptor ¶
func (*Params) GetMaxGasPost ¶
func (*Params) GetMaxGasPre ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PostExecTx ¶
type PostExecTx struct{}
type QueryClient ¶
type QueryClient interface {
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() *Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}
QueryServer is the server API for Query service.
type SmartAccount ¶
type SmartAccount struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` AccountNumber uint64 `protobuf:"varint,2,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` }
SmartAccount is a smart contract that is capable of initiating txs.
This account type is similar to BaseAccount except for it doesn't have a pubkey. If a pubkey is needed, it creates and returns a new NilPubKey.
func NewSmartAccount ¶
func NewSmartAccount(address string, accountNum, seq uint64) *SmartAccount
func NewSmartAccountFromAccount ¶
func NewSmartAccountFromAccount(acc authtypes.AccountI) *SmartAccount
func (*SmartAccount) Descriptor ¶
func (*SmartAccount) Descriptor() ([]byte, []int)
func (*SmartAccount) GetAccountNumber ¶
func (acc *SmartAccount) GetAccountNumber() uint64
func (*SmartAccount) GetAddress ¶
func (acc *SmartAccount) GetAddress() sdk.AccAddress
func (*SmartAccount) GetPubKey ¶
func (acc *SmartAccount) GetPubKey() cryptotypes.PubKey
func (*SmartAccount) GetSequence ¶
func (acc *SmartAccount) GetSequence() uint64
func (*SmartAccount) Marshal ¶
func (m *SmartAccount) Marshal() (dAtA []byte, err error)
func (*SmartAccount) MarshalToSizedBuffer ¶
func (m *SmartAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SmartAccount) ProtoMessage ¶
func (*SmartAccount) ProtoMessage()
func (*SmartAccount) Reset ¶
func (m *SmartAccount) Reset()
func (*SmartAccount) SetAccountNumber ¶
func (acc *SmartAccount) SetAccountNumber(accNumber uint64) error
func (*SmartAccount) SetAddress ¶
func (acc *SmartAccount) SetAddress(addr sdk.AccAddress) error
func (*SmartAccount) SetPubKey ¶
func (acc *SmartAccount) SetPubKey(_ cryptotypes.PubKey) error
func (*SmartAccount) SetSequence ¶
func (acc *SmartAccount) SetSequence(seq uint64) error
func (*SmartAccount) Size ¶
func (m *SmartAccount) Size() (n int)
func (*SmartAccount) String ¶
func (m *SmartAccount) String() string
func (*SmartAccount) Unmarshal ¶
func (m *SmartAccount) Unmarshal(dAtA []byte) error
func (*SmartAccount) XXX_DiscardUnknown ¶
func (m *SmartAccount) XXX_DiscardUnknown()
func (*SmartAccount) XXX_Marshal ¶
func (m *SmartAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SmartAccount) XXX_Merge ¶
func (m *SmartAccount) XXX_Merge(src proto.Message)
func (*SmartAccount) XXX_Size ¶
func (m *SmartAccount) XXX_Size() int
func (*SmartAccount) XXX_Unmarshal ¶
func (m *SmartAccount) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreateAccount ¶
func (*UnimplementedMsgServer) CreateAccount(ctx context.Context, req *MsgCreateAccount) (*MsgCreateAccountResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)