types

package
v0.0.0-...-396812e Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeAccountCreated  = "account_created"
	AttributeKeyCreator      = "creator"
	AttributeKeyCodeID       = "code_id"
	AttributeKeyContractAddr = "contract_addr"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "nativesca"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)
View Source
const DefaultMaxGas = 2_000_000

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)
View Source
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

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
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}
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

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 Any

type Any struct {
	TypeURL string `json:"type_url"`
	Value   []byte `json:"value"`
}

func NewAnyFromProtoMsg

func NewAnyFromProtoMsg(msg proto.Message) (*Any, error)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

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) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 (*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) MarshalTo

func (m *MsgCreateAccount) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, 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 NewNilPubKey(bz []byte) *NilPubKey

func (*NilPubKey) Address

func (pk *NilPubKey) Address() cryptotypes.Address

func (*NilPubKey) Bytes

func (pk *NilPubKey) Bytes() []byte

func (*NilPubKey) Descriptor

func (*NilPubKey) Descriptor() ([]byte, []int)

func (*NilPubKey) Equals

func (pk *NilPubKey) Equals(other cryptotypes.PubKey) bool

func (*NilPubKey) GetAddressBytes

func (m *NilPubKey) GetAddressBytes() []byte

func (*NilPubKey) Marshal

func (m *NilPubKey) Marshal() (dAtA []byte, err error)

func (*NilPubKey) MarshalTo

func (m *NilPubKey) MarshalTo(dAtA []byte) (int, error)

func (*NilPubKey) MarshalToSizedBuffer

func (m *NilPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NilPubKey) ProtoMessage

func (*NilPubKey) ProtoMessage()

func (*NilPubKey) Reset

func (m *NilPubKey) Reset()

func (*NilPubKey) Size

func (m *NilPubKey) Size() (n int)

func (*NilPubKey) String

func (pk *NilPubKey) String() string

func (*NilPubKey) Type

func (pk *NilPubKey) Type() string

func (*NilPubKey) Unmarshal

func (m *NilPubKey) Unmarshal(dAtA []byte) error

func (*NilPubKey) VerifySignature

func (pk *NilPubKey) VerifySignature(_ []byte, _ []byte) bool

func (*NilPubKey) XXX_DiscardUnknown

func (m *NilPubKey) XXX_DiscardUnknown()

func (*NilPubKey) XXX_Marshal

func (m *NilPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NilPubKey) XXX_Merge

func (m *NilPubKey) XXX_Merge(src proto.Message)

func (*NilPubKey) XXX_Size

func (m *NilPubKey) XXX_Size() int

func (*NilPubKey) XXX_Unmarshal

func (m *NilPubKey) XXX_Unmarshal(b []byte) error

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 NewParams

func NewParams(maxGasPre, maxGasPost uint64) (*Params, error)

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetMaxGasPost

func (m *Params) GetMaxGasPost() uint64

func (*Params) GetMaxGasPre

func (m *Params) GetMaxGasPre() uint64

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) Validate

func (p *Params) Validate() error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type PostExecTx

type PostExecTx struct{}

type PreExecTx

type PreExecTx struct {
	Msgs       []*Any `json:"msgs"`
	TxBytes    []byte `json:"tx_bytes"`
	Credential []byte `json:"credential"`
}

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) MarshalTo

func (m *SmartAccount) MarshalTo(dAtA []byte) (int, 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) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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