types

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0, Apache-2.0 Imports: 49 Imported by: 6

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

nolint noalias

Index

Constants

View Source
const (
	// module name
	ModuleName = "auth"

	// StoreKey is string representation of the store key for auth
	StoreKey = "acc"

	// FeeCollectorName the root string for the fee collector account address
	FeeCollectorName = "fee_collector"

	// QuerierRoute is the querier route for acc
	QuerierRoute = StoreKey
)
View Source
const (
	DefaultMaxMemoCharacters      uint64 = 256
	DefaultTxSigLimit             uint64 = 7
	DefaultTxSizeCostPerByte      uint64 = 10
	DefaultSigVerifyCostED25519   uint64 = 590
	DefaultSigVerifyCostSecp256k1 uint64 = 1000
)

Default parameter values

View Source
const (
	Minter  = "minter"
	Burner  = "burner"
	Staking = "staking"
)

permissions

View Source
const DefaultParamspace = ModuleName

DefaultParamspace defines the default auth module parameter subspace

View Source
const (
	QueryAccount = "account"
)

query endpoints supported by the auth Querier

Variables

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")
)
View Source
var (
	// AddressStoreKeyPrefix prefix for account-by-address store
	AddressStoreKeyPrefix = []byte{0x01}

	// param key for global account number
	GlobalAccountNumberKey = []byte("globalAccountNumber")
)
View Source
var (
	KeyMaxMemoCharacters      = []byte("MaxMemoCharacters")
	KeyTxSigLimit             = []byte("TxSigLimit")
	KeyTxSizeCostPerByte      = []byte("TxSizeCostPerByte")
	KeySigVerifyCostED25519   = []byte("SigVerifyCostED25519")
	KeySigVerifyCostSecp256k1 = []byte("SigVerifyCostSecp256k1")
)

Parameter keys

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 ModuleCdc = codec.New()

ModuleCdc auth module wide codec

Functions

func AddressStoreKey

func AddressStoreKey(addr sdk.AccAddress) []byte

AddressStoreKey turn an address to key used to get it from the account store

func CountSubKeys

func CountSubKeys(pub crypto.PubKey) int

CountSubKeys counts the total number of keys for a multi-sig public key.

func DefaultTxDecoder

func DefaultTxDecoder(cdc *codec.Codec) sdk.TxDecoder

DefaultTxDecoder logic for standard transaction decoding

func DefaultTxEncoder

func DefaultTxEncoder(cdc *codec.Codec) sdk.TxEncoder

DefaultTxEncoder logic for standard transaction encoding

func EthereumTxDecode added in v1.1.1

func EthereumTxDecode(b []byte, tx interface{}) error

func EthereumTxEncode added in v1.1.5

func EthereumTxEncode(tx sdk.Tx) ([]byte, error)

func EthereumTxEncoder added in v1.1.1

func EthereumTxEncoder(_ *codec.Codec) sdk.TxEncoder

func IbcAminoSignBytes added in v1.3.0

func IbcAminoSignBytes(chainID string, accNum uint64,
	sequence uint64, fee IbcFee, msgs []sdk.Msg,
	memo string, height uint64) []byte

func IbcDirectSignBytes added in v1.3.0

func IbcDirectSignBytes(chainID string, accnum uint64,
	sequence uint64, fee StdFee, msgs []sdk.Msg,
	memo string, authInfoBytes []byte, bodyBytes []byte) []byte

IbcDirectSignBytes returns the bytes to sign for a transaction.

func KeyTestPubAddr

func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress)

func MakeAddressStoreKey added in v1.6.2

func MakeAddressStoreKey(addr sdk.AccAddress, target []byte) []byte

MakeAddressStoreKey return an address store key for the given address, it will try copy the key to target slice if its capacity is enough.

func NewModuleAddress added in v1.3.0

func NewModuleAddress(name string) sdk.AccAddress

NewModuleAddress creates an AccAddress from the hash of the module's name

func NewTestCoins

func NewTestCoins() sdk.Coins

coins to more than cover the fee

func NewTestMsg

func NewTestMsg(addrs ...sdk.AccAddress) *sdk.TestMsg

func NewTestTx

func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee) sdk.Tx

func NewTestTxWithMemo

func NewTestTxWithMemo(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, memo string) sdk.Tx

func NewTestTxWithSignBytes

func NewTestTxWithSignBytes(msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, signBytes []byte, memo string) sdk.Tx

func ParamKeyTable

func ParamKeyTable() subspace.KeyTable

ParamKeyTable for auth module

func ProtoBaseAccount

func ProtoBaseAccount() exported.Account

ProtoBaseAccount - a prototype function for BaseAccount

func RegisterAccountTypeCodec

func RegisterAccountTypeCodec(o interface{}, name string)

RegisterAccountTypeCodec registers an external account type defined in another module for the internal ModuleCdc.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the codec

func RegisterQueryHandler added in v1.3.0

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 added in v1.3.0

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 added in v1.3.0

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 added in v1.3.0

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer added in v1.3.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SanitizeGenesisAccounts

func SanitizeGenesisAccounts(genAccs exported.GenesisAccounts) exported.GenesisAccounts

SanitizeGenesisAccounts sorts accounts and coin sets.

func StdSignBytes

func StdSignBytes(chainID string, accnum uint64, sequence uint64, fee StdFee, msgs []sdk.Msg, memo string) []byte

StdSignBytes returns the bytes to sign for a transaction.

func ValidateGenAccounts

func ValidateGenAccounts(accounts exported.GenesisAccounts) error

ValidateGenAccounts validates an array of GenesisAccounts and checks for duplicates

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of auth genesis data returning an error for any failed validation criteria.

Types

type AccountRetriever

type AccountRetriever struct {
	// contains filtered or unexported fields
}

AccountRetriever defines the properties of a type that can be used to retrieve accounts.

func NewAccountRetriever

func NewAccountRetriever(querier NodeQuerier) AccountRetriever

NewAccountRetriever initialises a new AccountRetriever instance.

func (AccountRetriever) EnsureExists

func (ar AccountRetriever) EnsureExists(addr sdk.AccAddress) error

EnsureExists returns an error if no account exists for the given address else nil.

func (AccountRetriever) GetAccount

func (ar AccountRetriever) GetAccount(addr sdk.AccAddress) (exported.Account, error)

GetAccount queries for an account given an address and a block height. An error is returned if the query or decoding fails.

func (AccountRetriever) GetAccountNonce

func (ar AccountRetriever) GetAccountNonce(address string) uint64

func (AccountRetriever) GetAccountNumberSequence

func (ar AccountRetriever) GetAccountNumberSequence(addr sdk.AccAddress) (uint64, uint64, error)

GetAccountNumberSequence returns sequence and account number for the given address. It returns an error if the account couldn't be retrieved from the state.

func (AccountRetriever) GetAccountWithHeight

func (ar AccountRetriever) GetAccountWithHeight(addr sdk.AccAddress) (exported.Account, int64, error)

GetAccountWithHeight queries for an account given an address. Returns the height of the query with the account. An error is returned if the query or decoding fails.

type AuthInfo added in v1.3.0

type AuthInfo struct {
	// signer_infos defines the signing modes for the required signers. The number
	// and order of elements must match the required signers from TxBody's
	// messages. The first element is the primary signer and the one which pays
	// the fee.
	SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"`
	// Fee is the fee and gas limit for the transaction. The first signer is the
	// primary signer and the one which pays the fee. The fee can be calculated
	// based on the cost of evaluating the body and doing signature verification
	// of the signers. This can be estimated via simulation.
	Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"`
}

AuthInfo describes the fee and signer modes that are used to sign a transaction.

func (*AuthInfo) Descriptor added in v1.3.0

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

func (*AuthInfo) GetFee added in v1.3.0

func (m *AuthInfo) GetFee() *Fee

func (*AuthInfo) GetSignerInfos added in v1.3.0

func (m *AuthInfo) GetSignerInfos() []*SignerInfo

func (*AuthInfo) Marshal added in v1.3.0

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

func (*AuthInfo) MarshalTo added in v1.3.0

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

func (*AuthInfo) MarshalToSizedBuffer added in v1.3.0

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

func (*AuthInfo) ProtoMessage added in v1.3.0

func (*AuthInfo) ProtoMessage()

func (*AuthInfo) Reset added in v1.3.0

func (m *AuthInfo) Reset()

func (*AuthInfo) Size added in v1.3.0

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

func (*AuthInfo) String added in v1.3.0

func (m *AuthInfo) String() string

func (*AuthInfo) Unmarshal added in v1.3.0

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

func (*AuthInfo) XXX_DiscardUnknown added in v1.3.0

func (m *AuthInfo) XXX_DiscardUnknown()

func (*AuthInfo) XXX_Marshal added in v1.3.0

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

func (*AuthInfo) XXX_Merge added in v1.3.0

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

func (*AuthInfo) XXX_Size added in v1.3.0

func (m *AuthInfo) XXX_Size() int

func (*AuthInfo) XXX_Unmarshal added in v1.3.0

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

type BaseAccount

type BaseAccount struct {
	Address       sdk.AccAddress `json:"address" yaml:"address"`
	Coins         sdk.Coins      `json:"coins" yaml:"coins"`
	PubKey        crypto.PubKey  `json:"public_key" yaml:"public_key"`
	AccountNumber uint64         `json:"account_number" yaml:"account_number"`
	Sequence      uint64         `json:"sequence" yaml:"sequence"`
}

BaseAccount - a base account structure. This can be extended by embedding within in your AppAccount. However one doesn't have to use BaseAccount as long as your struct implements Account.

func NewBaseAccount

func NewBaseAccount(address sdk.AccAddress, coins sdk.Coins,
	pubKey crypto.PubKey, accountNumber uint64, sequence uint64) *BaseAccount

NewBaseAccount creates a new BaseAccount object

func NewBaseAccountWithAddress

func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount

NewBaseAccountWithAddress - returns a new base account with a given address

func (*BaseAccount) AminoSize added in v1.1.10

func (acc *BaseAccount) AminoSize(cdc *amino.Codec) int

func (BaseAccount) Copy added in v1.0.0

func (acc BaseAccount) Copy() sdk.Account

func (*BaseAccount) GetAccountNumber

func (acc *BaseAccount) GetAccountNumber() uint64

GetAccountNumber - Implements Account

func (BaseAccount) GetAddress

func (acc BaseAccount) GetAddress() sdk.AccAddress

GetAddress - Implements sdk.Account.

func (*BaseAccount) GetCoins

func (acc *BaseAccount) GetCoins() sdk.Coins

GetCoins - Implements sdk.Account.

func (BaseAccount) GetPubKey

func (acc BaseAccount) GetPubKey() crypto.PubKey

GetPubKey - Implements sdk.Account.

func (*BaseAccount) GetSequence

func (acc *BaseAccount) GetSequence() uint64

GetSequence - Implements sdk.Account.

func (*BaseAccount) MarshalAminoTo added in v1.6.0

func (acc *BaseAccount) MarshalAminoTo(cdc *amino.Codec, buf *bytes.Buffer) error

func (*BaseAccount) MarshalToAmino added in v0.19.16

func (acc *BaseAccount) MarshalToAmino(cdc *amino.Codec) ([]byte, error)

func (BaseAccount) MarshalYAML

func (acc BaseAccount) MarshalYAML() (interface{}, error)

MarshalYAML returns the YAML representation of an account.

func (*BaseAccount) SetAccountNumber

func (acc *BaseAccount) SetAccountNumber(accNumber uint64) error

SetAccountNumber - Implements Account

func (*BaseAccount) SetAddress

func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error

SetAddress - Implements sdk.Account.

func (*BaseAccount) SetCoins

func (acc *BaseAccount) SetCoins(coins sdk.Coins) error

SetCoins - Implements sdk.Account.

func (*BaseAccount) SetPubKey

func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error

SetPubKey - Implements sdk.Account.

func (*BaseAccount) SetSequence

func (acc *BaseAccount) SetSequence(seq uint64) error

SetSequence - Implements sdk.Account.

func (*BaseAccount) SpendableCoins

func (acc *BaseAccount) SpendableCoins(_ time.Time) sdk.Coins

SpendableCoins returns the total set of spendable coins. For a base account, this is simply the base coins.

func (BaseAccount) String

func (acc BaseAccount) String() string

func (*BaseAccount) UnmarshalFromAmino added in v1.1.6

func (acc *BaseAccount) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

func (BaseAccount) Validate

func (acc BaseAccount) Validate() error

Validate checks for errors on the account fields

type CustomGetTxsEventResponse added in v1.7.0

type CustomGetTxsEventResponse struct {
	// txs is the list of queried transactions.
	Txs []sdk.Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// tx_responses is the list of queried TxResponses.
	TxResponses []sdk.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"`
	// pagination defines an pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

type Fee added in v1.3.0

type Fee struct {
	// amount is the amount of coins to be paid as a fee
	Amount github_com_cosmos_cosmos_sdk_types.CoinAdapters `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
	// gas_limit is the maximum gas that can be used in transaction processing
	// before an out of gas error occurs
	GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
	// the payer must be a tx signer (and thus have signed this field in AuthInfo).
	// setting this field does *not* change the ordering of required signers for the transaction.
	Payer string `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"`
	// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
	// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
	// not support fee grants, this will fail
	Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"`
}

Fee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool.

func (*Fee) Descriptor added in v1.3.0

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

func (*Fee) GetAmount added in v1.3.0

func (*Fee) GetGasLimit added in v1.3.0

func (m *Fee) GetGasLimit() uint64

func (*Fee) GetGranter added in v1.3.0

func (m *Fee) GetGranter() string

func (*Fee) GetPayer added in v1.3.0

func (m *Fee) GetPayer() string

func (*Fee) Marshal added in v1.3.0

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

func (*Fee) MarshalTo added in v1.3.0

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

func (*Fee) MarshalToSizedBuffer added in v1.3.0

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

func (*Fee) ProtoMessage added in v1.3.0

func (*Fee) ProtoMessage()

func (*Fee) Reset added in v1.3.0

func (m *Fee) Reset()

func (*Fee) Size added in v1.3.0

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

func (*Fee) String added in v1.3.0

func (m *Fee) String() string

func (*Fee) Unmarshal added in v1.3.0

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

func (*Fee) XXX_DiscardUnknown added in v1.3.0

func (m *Fee) XXX_DiscardUnknown()

func (*Fee) XXX_Marshal added in v1.3.0

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

func (*Fee) XXX_Merge added in v1.3.0

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

func (*Fee) XXX_Size added in v1.3.0

func (m *Fee) XXX_Size() int

func (*Fee) XXX_Unmarshal added in v1.3.0

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

type GenesisAccountIterator

type GenesisAccountIterator struct{}

GenesisAccountIterator implements genesis account iteration.

func (GenesisAccountIterator) IterateGenesisAccounts

func (GenesisAccountIterator) IterateGenesisAccounts(
	cdc *codec.Codec, appGenesis map[string]json.RawMessage, cb func(exported.Account) (stop bool),
)

IterateGenesisAccounts iterates over all the genesis accounts found in appGenesis and invokes a callback on each genesis account. If any call returns true, iteration stops.

type GenesisState

type GenesisState struct {
	Params   Params                   `json:"params" yaml:"params"`
	Accounts exported.GenesisAccounts `json:"accounts" yaml:"accounts"`
}

GenesisState - all auth state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - Return a default genesis state

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc *codec.Codec, appState map[string]json.RawMessage) GenesisState

GetGenesisStateFromAppState returns x/auth GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(params Params, accounts exported.GenesisAccounts) GenesisState

NewGenesisState - Create a new genesis state

type IbcFee added in v1.5.0

type IbcFee struct {
	Amount sdk.CoinAdapters `json:"amount" yaml:"amount"`
	Gas    uint64           `json:"gas" yaml:"gas"`
}

type IbcTx added in v1.3.0

type IbcTx struct {
	*StdTx

	AuthInfoBytes                []byte
	BodyBytes                    []byte
	SignMode                     []signing.SignMode
	SigFee                       IbcFee
	SigMsgs                      []sdk.Msg
	Sequences                    []uint64
	TxBodyHasUnknownNonCriticals bool
	HasExtensionOpt              bool
	Payer                        string
	ValidateParams               func() error
}

func (*IbcTx) GetSignBytes added in v1.3.0

func (tx *IbcTx) GetSignBytes(ctx sdk.Context, index int, acc exported.Account) []byte

func (*IbcTx) ValidateBasic added in v1.6.1

func (tx *IbcTx) ValidateBasic() error

func (*IbcTx) VerifySequence added in v1.6.1

func (tx *IbcTx) VerifySequence(index int, acc exported.Account) error

type ModeInfo added in v1.3.0

type ModeInfo struct {
	// sum is the oneof that specifies whether this represents a single or nested
	// multisig signer
	//
	// Types that are valid to be assigned to Sum:
	//	*ModeInfo_Single_
	//	*ModeInfo_Multi_
	Sum isModeInfo_Sum `protobuf_oneof:"sum"`
}

ModeInfo describes the signing mode of a single or nested multisig signer.

func (*ModeInfo) Descriptor added in v1.3.0

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

func (*ModeInfo) GetMulti added in v1.3.0

func (m *ModeInfo) GetMulti() *ModeInfo_Multi

func (*ModeInfo) GetSingle added in v1.3.0

func (m *ModeInfo) GetSingle() *ModeInfo_Single

func (*ModeInfo) GetSum added in v1.3.0

func (m *ModeInfo) GetSum() isModeInfo_Sum

func (*ModeInfo) Marshal added in v1.3.0

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

func (*ModeInfo) MarshalTo added in v1.3.0

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

func (*ModeInfo) MarshalToSizedBuffer added in v1.3.0

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

func (*ModeInfo) ProtoMessage added in v1.3.0

func (*ModeInfo) ProtoMessage()

func (*ModeInfo) Reset added in v1.3.0

func (m *ModeInfo) Reset()

func (*ModeInfo) Size added in v1.3.0

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

func (*ModeInfo) String added in v1.3.0

func (m *ModeInfo) String() string

func (*ModeInfo) Unmarshal added in v1.3.0

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

func (*ModeInfo) XXX_DiscardUnknown added in v1.3.0

func (m *ModeInfo) XXX_DiscardUnknown()

func (*ModeInfo) XXX_Marshal added in v1.3.0

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

func (*ModeInfo) XXX_Merge added in v1.3.0

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

func (*ModeInfo) XXX_OneofWrappers added in v1.3.0

func (*ModeInfo) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ModeInfo) XXX_Size added in v1.3.0

func (m *ModeInfo) XXX_Size() int

func (*ModeInfo) XXX_Unmarshal added in v1.3.0

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

type ModeInfo_Multi added in v1.3.0

type ModeInfo_Multi struct {
	// bitarray specifies which keys within the multisig are signing
	Bitarray *types1.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"`
	// mode_infos is the corresponding modes of the signers of the multisig
	// which could include nested multisig public keys
	ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"`
}

Multi is the mode info for a multisig public key

func (*ModeInfo_Multi) Descriptor added in v1.3.0

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

func (*ModeInfo_Multi) GetBitarray added in v1.3.0

func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray

func (*ModeInfo_Multi) GetModeInfos added in v1.3.0

func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo

func (*ModeInfo_Multi) Marshal added in v1.3.0

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

func (*ModeInfo_Multi) MarshalTo added in v1.3.0

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

func (*ModeInfo_Multi) MarshalToSizedBuffer added in v1.3.0

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

func (*ModeInfo_Multi) ProtoMessage added in v1.3.0

func (*ModeInfo_Multi) ProtoMessage()

func (*ModeInfo_Multi) Reset added in v1.3.0

func (m *ModeInfo_Multi) Reset()

func (*ModeInfo_Multi) Size added in v1.3.0

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

func (*ModeInfo_Multi) String added in v1.3.0

func (m *ModeInfo_Multi) String() string

func (*ModeInfo_Multi) Unmarshal added in v1.3.0

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

func (*ModeInfo_Multi) XXX_DiscardUnknown added in v1.3.0

func (m *ModeInfo_Multi) XXX_DiscardUnknown()

func (*ModeInfo_Multi) XXX_Marshal added in v1.3.0

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

func (*ModeInfo_Multi) XXX_Merge added in v1.3.0

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

func (*ModeInfo_Multi) XXX_Size added in v1.3.0

func (m *ModeInfo_Multi) XXX_Size() int

func (*ModeInfo_Multi) XXX_Unmarshal added in v1.3.0

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

type ModeInfo_Multi_ added in v1.3.0

type ModeInfo_Multi_ struct {
	Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
}

func (*ModeInfo_Multi_) MarshalTo added in v1.3.0

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

func (*ModeInfo_Multi_) MarshalToSizedBuffer added in v1.3.0

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

func (*ModeInfo_Multi_) Size added in v1.3.0

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

type ModeInfo_Single added in v1.3.0

type ModeInfo_Single struct {
	// mode is the signing mode of the single signer
	Mode signing.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"`
}

Single is the mode info for a single signer. It is structured as a message to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future

func (*ModeInfo_Single) Descriptor added in v1.3.0

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

func (*ModeInfo_Single) GetMode added in v1.3.0

func (m *ModeInfo_Single) GetMode() signing.SignMode

func (*ModeInfo_Single) Marshal added in v1.3.0

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

func (*ModeInfo_Single) MarshalTo added in v1.3.0

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

func (*ModeInfo_Single) MarshalToSizedBuffer added in v1.3.0

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

func (*ModeInfo_Single) ProtoMessage added in v1.3.0

func (*ModeInfo_Single) ProtoMessage()

func (*ModeInfo_Single) Reset added in v1.3.0

func (m *ModeInfo_Single) Reset()

func (*ModeInfo_Single) Size added in v1.3.0

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

func (*ModeInfo_Single) String added in v1.3.0

func (m *ModeInfo_Single) String() string

func (*ModeInfo_Single) Unmarshal added in v1.3.0

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

func (*ModeInfo_Single) XXX_DiscardUnknown added in v1.3.0

func (m *ModeInfo_Single) XXX_DiscardUnknown()

func (*ModeInfo_Single) XXX_Marshal added in v1.3.0

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

func (*ModeInfo_Single) XXX_Merge added in v1.3.0

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

func (*ModeInfo_Single) XXX_Size added in v1.3.0

func (m *ModeInfo_Single) XXX_Size() int

func (*ModeInfo_Single) XXX_Unmarshal added in v1.3.0

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

type ModeInfo_Single_ added in v1.3.0

type ModeInfo_Single_ struct {
	Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
}

func (*ModeInfo_Single_) MarshalTo added in v1.3.0

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

func (*ModeInfo_Single_) MarshalToSizedBuffer added in v1.3.0

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

func (*ModeInfo_Single_) Size added in v1.3.0

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

type NodeQuerier

type NodeQuerier interface {
	// QueryWithData performs a query to a Tendermint node with the provided path
	// and a data payload. It returns the result and height of the query upon success
	// or an error if the query fails.
	QueryWithData(path string, data []byte) ([]byte, int64, error)
}

NodeQuerier is an interface that is satisfied by types that provide the QueryWithData method

type Params

type Params struct {
	MaxMemoCharacters      uint64 `json:"max_memo_characters" yaml:"max_memo_characters"`
	TxSigLimit             uint64 `json:"tx_sig_limit" yaml:"tx_sig_limit"`
	TxSizeCostPerByte      uint64 `json:"tx_size_cost_per_byte" yaml:"tx_size_cost_per_byte"`
	SigVerifyCostED25519   uint64 `json:"sig_verify_cost_ed25519" yaml:"sig_verify_cost_ed25519"`
	SigVerifyCostSecp256k1 uint64 `json:"sig_verify_cost_secp256k1" yaml:"sig_verify_cost_secp256k1"`
}

Params defines the parameters for the auth module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(maxMemoCharacters, txSigLimit, txSizeCostPerByte,
	sigVerifyCostED25519, sigVerifyCostSecp256k1 uint64) Params

NewParams creates a new Params object

func (Params) Equal

func (p Params) Equal(p2 Params) bool

Equal returns a boolean determining if two Params types are identical.

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() subspace.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters. nolint

func (Params) String

func (p Params) String() string

String implements the stringer interface.

func (Params) Validate

func (p Params) Validate() error

Validate checks that the parameters have valid values.

type PermissionsForAddress added in v1.3.0

type PermissionsForAddress struct {
	// contains filtered or unexported fields
}

PermissionsForAddress defines all the registered permissions for an address

func NewPermissionsForAddress added in v1.3.0

func NewPermissionsForAddress(name string, permissions []string) PermissionsForAddress

NewPermissionsForAddress creates a new PermissionsForAddress object

func (PermissionsForAddress) GetAddress added in v1.3.0

func (pa PermissionsForAddress) GetAddress() sdk.AccAddress

GetAddress returns the address of the PermissionsForAddress object

func (PermissionsForAddress) GetPermissions added in v1.3.0

func (pa PermissionsForAddress) GetPermissions() []string

GetPermissions returns the permissions granted to the address

func (PermissionsForAddress) HasPermission added in v1.3.0

func (pa PermissionsForAddress) HasPermission(permission string) bool

HasPermission returns whether the PermissionsForAddress contains permission.

type ProtobufViewMsg added in v1.5.0

type ProtobufViewMsg struct {
	TypeStr string `json:"type"`
	Data    string `json:"data"`
}

/////////

func NewProtobufViewMsg added in v1.5.0

func NewProtobufViewMsg(typeStr string, data string) *ProtobufViewMsg

func (ProtobufViewMsg) GetSignBytes added in v1.5.0

func (b ProtobufViewMsg) GetSignBytes() []byte

func (ProtobufViewMsg) GetSigners added in v1.5.0

func (b ProtobufViewMsg) GetSigners() []sdk.AccAddress

func (ProtobufViewMsg) Route added in v1.5.0

func (b ProtobufViewMsg) Route() string

func (ProtobufViewMsg) Type added in v1.5.0

func (b ProtobufViewMsg) Type() string

func (ProtobufViewMsg) ValidateBasic added in v1.5.0

func (b ProtobufViewMsg) ValidateBasic() error

type QueryAccountParams

type QueryAccountParams struct {
	Address sdk.AccAddress
}

QueryAccountParams defines the params for querying accounts.

func NewQueryAccountParams

func NewQueryAccountParams(addr sdk.AccAddress) QueryAccountParams

NewQueryAccountParams creates a new instance of QueryAccountParams.

type QueryAccountRequest added in v1.3.0

type QueryAccountRequest struct {
	// address defines the address to query for.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryAccountRequest is the request type for the Query/Account RPC method.

func (*QueryAccountRequest) Descriptor added in v1.3.0

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

func (*QueryAccountRequest) Marshal added in v1.3.0

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

func (*QueryAccountRequest) MarshalTo added in v1.3.0

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

func (*QueryAccountRequest) MarshalToSizedBuffer added in v1.3.0

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

func (*QueryAccountRequest) ProtoMessage added in v1.3.0

func (*QueryAccountRequest) ProtoMessage()

func (*QueryAccountRequest) Reset added in v1.3.0

func (m *QueryAccountRequest) Reset()

func (*QueryAccountRequest) Size added in v1.3.0

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

func (*QueryAccountRequest) String added in v1.3.0

func (m *QueryAccountRequest) String() string

func (*QueryAccountRequest) Unmarshal added in v1.3.0

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

func (*QueryAccountRequest) XXX_DiscardUnknown added in v1.3.0

func (m *QueryAccountRequest) XXX_DiscardUnknown()

func (*QueryAccountRequest) XXX_Marshal added in v1.3.0

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

func (*QueryAccountRequest) XXX_Merge added in v1.3.0

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

func (*QueryAccountRequest) XXX_Size added in v1.3.0

func (m *QueryAccountRequest) XXX_Size() int

func (*QueryAccountRequest) XXX_Unmarshal added in v1.3.0

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

type QueryAccountResponse added in v1.3.0

type QueryAccountResponse struct {
	// account defines the account of the corresponding address.
	Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}

QueryAccountResponse is the response type for the Query/Account RPC method.

func (*QueryAccountResponse) Descriptor added in v1.3.0

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

func (*QueryAccountResponse) GetAccount added in v1.3.0

func (m *QueryAccountResponse) GetAccount() *types.Any

func (*QueryAccountResponse) Marshal added in v1.3.0

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

func (*QueryAccountResponse) MarshalTo added in v1.3.0

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

func (*QueryAccountResponse) MarshalToSizedBuffer added in v1.3.0

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

func (*QueryAccountResponse) ProtoMessage added in v1.3.0

func (*QueryAccountResponse) ProtoMessage()

func (*QueryAccountResponse) Reset added in v1.3.0

func (m *QueryAccountResponse) Reset()

func (*QueryAccountResponse) Size added in v1.3.0

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

func (*QueryAccountResponse) String added in v1.3.0

func (m *QueryAccountResponse) String() string

func (*QueryAccountResponse) Unmarshal added in v1.3.0

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

func (*QueryAccountResponse) XXX_DiscardUnknown added in v1.3.0

func (m *QueryAccountResponse) XXX_DiscardUnknown()

func (*QueryAccountResponse) XXX_Marshal added in v1.3.0

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

func (*QueryAccountResponse) XXX_Merge added in v1.3.0

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

func (*QueryAccountResponse) XXX_Size added in v1.3.0

func (m *QueryAccountResponse) XXX_Size() int

func (*QueryAccountResponse) XXX_Unmarshal added in v1.3.0

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

type QueryAccountsRequest added in v1.3.0

type QueryAccountsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAccountsRequest is the request type for the Query/Accounts RPC method.

Since: cosmos-sdk 0.43

func (*QueryAccountsRequest) Descriptor added in v1.3.0

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

func (*QueryAccountsRequest) GetPagination added in v1.3.0

func (m *QueryAccountsRequest) GetPagination() *query.PageRequest

func (*QueryAccountsRequest) Marshal added in v1.3.0

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

func (*QueryAccountsRequest) MarshalTo added in v1.3.0

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

func (*QueryAccountsRequest) MarshalToSizedBuffer added in v1.3.0

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

func (*QueryAccountsRequest) ProtoMessage added in v1.3.0

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset added in v1.3.0

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size added in v1.3.0

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

func (*QueryAccountsRequest) String added in v1.3.0

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal added in v1.3.0

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

func (*QueryAccountsRequest) XXX_DiscardUnknown added in v1.3.0

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal added in v1.3.0

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

func (*QueryAccountsRequest) XXX_Merge added in v1.3.0

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

func (*QueryAccountsRequest) XXX_Size added in v1.3.0

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal added in v1.3.0

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

type QueryAccountsResponse added in v1.3.0

type QueryAccountsResponse struct {
	// accounts are the existing accounts
	Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAccountsResponse is the response type for the Query/Accounts RPC method.

Since: cosmos-sdk 0.43

func (*QueryAccountsResponse) Descriptor added in v1.3.0

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

func (*QueryAccountsResponse) GetAccounts added in v1.3.0

func (m *QueryAccountsResponse) GetAccounts() []*types.Any

func (*QueryAccountsResponse) GetPagination added in v1.3.0

func (m *QueryAccountsResponse) GetPagination() *query.PageResponse

func (*QueryAccountsResponse) Marshal added in v1.3.0

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

func (*QueryAccountsResponse) MarshalTo added in v1.3.0

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

func (*QueryAccountsResponse) MarshalToSizedBuffer added in v1.3.0

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

func (*QueryAccountsResponse) ProtoMessage added in v1.3.0

func (*QueryAccountsResponse) ProtoMessage()

func (*QueryAccountsResponse) Reset added in v1.3.0

func (m *QueryAccountsResponse) Reset()

func (*QueryAccountsResponse) Size added in v1.3.0

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

func (*QueryAccountsResponse) String added in v1.3.0

func (m *QueryAccountsResponse) String() string

func (*QueryAccountsResponse) Unmarshal added in v1.3.0

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

func (*QueryAccountsResponse) XXX_DiscardUnknown added in v1.3.0

func (m *QueryAccountsResponse) XXX_DiscardUnknown()

func (*QueryAccountsResponse) XXX_Marshal added in v1.3.0

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

func (*QueryAccountsResponse) XXX_Merge added in v1.3.0

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

func (*QueryAccountsResponse) XXX_Size added in v1.3.0

func (m *QueryAccountsResponse) XXX_Size() int

func (*QueryAccountsResponse) XXX_Unmarshal added in v1.3.0

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

type QueryClient added in v1.3.0

type QueryClient interface {
	// Accounts returns all the existing accounts
	//
	// Since: cosmos-sdk 0.43
	Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
	// Account returns account details based on address.
	Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error)
	// Params queries all parameters.
	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 added in v1.3.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest added in v1.3.0

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor added in v1.3.0

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

func (*QueryParamsRequest) Marshal added in v1.3.0

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

func (*QueryParamsRequest) MarshalTo added in v1.3.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v1.3.0

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

func (*QueryParamsRequest) ProtoMessage added in v1.3.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v1.3.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v1.3.0

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

func (*QueryParamsRequest) String added in v1.3.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v1.3.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v1.3.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v1.3.0

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

func (*QueryParamsRequest) XXX_Merge added in v1.3.0

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

func (*QueryParamsRequest) XXX_Size added in v1.3.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v1.3.0

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

type QueryParamsResponse added in v1.3.0

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor added in v1.3.0

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

func (*QueryParamsResponse) GetParams added in v1.3.0

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) ProtoMessage added in v1.3.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v1.3.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) String added in v1.3.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) XXX_DiscardUnknown added in v1.3.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (m *QueryParamsResponse) XXX_Size() int {
	return m.Size()
}

func (*QueryParamsResponse) XXX_Merge added in v1.3.0

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}

type QueryServer added in v1.3.0

type QueryServer interface {
	// Accounts returns all the existing accounts
	//
	// Since: cosmos-sdk 0.43
	Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
	// Account returns account details based on address.
	Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error)
	// Params queries all parameters.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type SignDoc added in v1.3.0

type SignDoc struct {
	// body_bytes is protobuf serialization of a TxBody that matches the
	// representation in TxRaw.
	BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"`
	// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
	// representation in TxRaw.
	AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"`
	// chain_id is the unique identifier of the chain this transaction targets.
	// It prevents signed transactions from being used on another chain by an
	// attacker
	ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// account_number is the account number of the account in state
	AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
}

SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.

func (*SignDoc) Descriptor added in v1.3.0

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

func (*SignDoc) GetAccountNumber added in v1.3.0

func (m *SignDoc) GetAccountNumber() uint64

func (*SignDoc) GetAuthInfoBytes added in v1.3.0

func (m *SignDoc) GetAuthInfoBytes() []byte

func (*SignDoc) GetBodyBytes added in v1.3.0

func (m *SignDoc) GetBodyBytes() []byte

func (*SignDoc) GetChainId added in v1.3.0

func (m *SignDoc) GetChainId() string

func (*SignDoc) Marshal added in v1.3.0

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

func (*SignDoc) MarshalTo added in v1.3.0

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

func (*SignDoc) MarshalToSizedBuffer added in v1.3.0

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

func (*SignDoc) ProtoMessage added in v1.3.0

func (*SignDoc) ProtoMessage()

func (*SignDoc) Reset added in v1.3.0

func (m *SignDoc) Reset()

func (*SignDoc) Size added in v1.3.0

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

func (*SignDoc) String added in v1.3.0

func (m *SignDoc) String() string

func (*SignDoc) Unmarshal added in v1.3.0

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

func (*SignDoc) XXX_DiscardUnknown added in v1.3.0

func (m *SignDoc) XXX_DiscardUnknown()

func (*SignDoc) XXX_Marshal added in v1.3.0

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

func (*SignDoc) XXX_Merge added in v1.3.0

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

func (*SignDoc) XXX_Size added in v1.3.0

func (m *SignDoc) XXX_Size() int

func (*SignDoc) XXX_Unmarshal added in v1.3.0

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

type SignerInfo added in v1.3.0

type SignerInfo struct {
	// public_key is the public key of the signer. It is optional for accounts
	// that already exist in state. If unset, the verifier can use the required \
	// signer address for this position and lookup the public key.
	PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// mode_info describes the signing mode of the signer and is a nested
	// structure to support nested multisig pubkey's
	ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"`
	// sequence is the sequence of the account, which describes the
	// number of committed transactions signed by a given address. It is used to
	// prevent replay attacks.
	Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
}

SignerInfo describes the public key and signing mode of a single top-level signer.

func (*SignerInfo) Descriptor added in v1.3.0

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

func (*SignerInfo) GetModeInfo added in v1.3.0

func (m *SignerInfo) GetModeInfo() *ModeInfo

func (*SignerInfo) GetPublicKey added in v1.3.0

func (m *SignerInfo) GetPublicKey() *types.Any

func (*SignerInfo) GetSequence added in v1.3.0

func (m *SignerInfo) GetSequence() uint64

func (*SignerInfo) Marshal added in v1.3.0

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

func (*SignerInfo) MarshalTo added in v1.3.0

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

func (*SignerInfo) MarshalToSizedBuffer added in v1.3.0

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

func (*SignerInfo) ProtoMessage added in v1.3.0

func (*SignerInfo) ProtoMessage()

func (*SignerInfo) Reset added in v1.3.0

func (m *SignerInfo) Reset()

func (*SignerInfo) Size added in v1.3.0

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

func (*SignerInfo) String added in v1.3.0

func (m *SignerInfo) String() string

func (*SignerInfo) Unmarshal added in v1.3.0

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

func (*SignerInfo) XXX_DiscardUnknown added in v1.3.0

func (m *SignerInfo) XXX_DiscardUnknown()

func (*SignerInfo) XXX_Marshal added in v1.3.0

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

func (*SignerInfo) XXX_Merge added in v1.3.0

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

func (*SignerInfo) XXX_Size added in v1.3.0

func (m *SignerInfo) XXX_Size() int

func (*SignerInfo) XXX_Unmarshal added in v1.3.0

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

type StdFee

type StdFee struct {
	Amount sdk.Coins `json:"amount" yaml:"amount"`
	Gas    uint64    `json:"gas" yaml:"gas"`
}

StdFee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool.

func NewStdFee

func NewStdFee(gas uint64, amount sdk.Coins) StdFee

NewStdFee returns a new instance of StdFee

func NewTestStdFee

func NewTestStdFee() StdFee

func (*StdFee) Bytes

func (fee *StdFee) Bytes() []byte

Bytes for signing later

func (*StdFee) GasPrices

func (fee *StdFee) GasPrices() sdk.DecCoins

GasPrices returns the gas prices for a StdFee.

NOTE: The gas prices returned are not the true gas prices that were originally part of the submitted transaction because the fee is computed as fee = ceil(gasWanted * gasPrices).

func (*StdFee) UnmarshalFromAmino added in v0.19.16

func (fee *StdFee) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

type StdIBCSignDoc added in v1.3.0

type StdIBCSignDoc struct {
	AccountNumber uint64            `json:"account_number" yaml:"account_number"`
	Sequence      uint64            `json:"sequence" yaml:"sequence"`
	TimeoutHeight uint64            `json:"timeout_height,omitempty" yaml:"timeout_height"`
	ChainID       string            `json:"chain_id" yaml:"chain_id"`
	Memo          string            `json:"memo" yaml:"memo"`
	Fee           json.RawMessage   `json:"fee" yaml:"fee"`
	Msgs          []json.RawMessage `json:"msgs" yaml:"msgs"`
}

type StdSignDoc

type StdSignDoc struct {
	AccountNumber uint64            `json:"account_number" yaml:"account_number"`
	ChainID       string            `json:"chain_id" yaml:"chain_id"`
	Fee           json.RawMessage   `json:"fee" yaml:"fee"`
	Memo          string            `json:"memo" yaml:"memo"`
	Msgs          []json.RawMessage `json:"msgs" yaml:"msgs"`
	Sequence      uint64            `json:"sequence" yaml:"sequence"`
}

StdSignDoc is replay-prevention structure. It includes the result of msg.GetSignBytes(), as well as the ChainID (prevent cross chain replay) and the Sequence numbers for each signature (prevent inchain replay and enforce tx ordering per account).

type StdSignMsg

type StdSignMsg struct {
	ChainID       string    `json:"chain_id" yaml:"chain_id"`
	AccountNumber uint64    `json:"account_number" yaml:"account_number"`
	Sequence      uint64    `json:"sequence" yaml:"sequence"`
	Fee           StdFee    `json:"fee" yaml:"fee"`
	Msgs          []sdk.Msg `json:"msgs" yaml:"msgs"`
	Memo          string    `json:"memo" yaml:"memo"`
}

StdSignMsg is a convenience structure for passing along a Msg with the other requirements for a StdSignDoc before it is signed. For use in the CLI.

func (StdSignMsg) Bytes

func (msg StdSignMsg) Bytes() []byte

get message bytes

type StdSignature

type StdSignature struct {
	crypto.PubKey `json:"pub_key" yaml:"pub_key"` // optional
	Signature     []byte                          `json:"signature" yaml:"signature"`
}

StdSignature represents a sig

func MakeSignature

func MakeSignature(keybase keys.Keybase, name, passphrase string,
	msg StdSignMsg) (sig StdSignature, err error)

MakeSignature builds a StdSignature given keybase, key name, passphrase, and a StdSignMsg.

func (StdSignature) MarshalYAML

func (ss StdSignature) MarshalYAML() (interface{}, error)

MarshalYAML returns the YAML representation of the signature.

func (*StdSignature) UnmarshalFromAmino added in v0.19.16

func (ss *StdSignature) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

type StdTx

type StdTx struct {
	Msgs       []sdk.Msg      `json:"msg" yaml:"msg"`
	Fee        StdFee         `json:"fee" yaml:"fee"`
	Signatures []StdSignature `json:"signatures" yaml:"signatures"`
	Memo       string         `json:"memo" yaml:"memo"`

	sdk.BaseTx `json:"-" yaml:"-"`
}

StdTx is a standard way to wrap a Msg with Fee and Signatures. NOTE: the first signature is the fee payer (Signatures must not be nil).

func FromProtobufTx added in v1.5.0

func FromProtobufTx(cdc *codec.CodecProxy, tx *IbcTx) (*StdTx, error)

func NewStdTx

func NewStdTx(msgs []sdk.Msg, fee StdFee, sigs []StdSignature, memo string) *StdTx

func (*StdTx) FeePayer

func (tx *StdTx) FeePayer(ctx sdk.Context) sdk.AccAddress

FeePayer returns the address that is responsible for paying fee StdTx returns the first signer as the fee payer If no signers for tx, return empty address

func (*StdTx) GetEthAddr added in v1.7.8

func (tx *StdTx) GetEthAddr() string

func (*StdTx) GetFee

func (tx *StdTx) GetFee() sdk.Coins

GetFee returns the FeeAmount in StdFee

func (*StdTx) GetFrom added in v1.2.0

func (tx *StdTx) GetFrom() string

func (*StdTx) GetGas

func (tx *StdTx) GetGas() uint64

GetGas returns the Gas in StdFee

func (*StdTx) GetGasPrice

func (tx *StdTx) GetGasPrice() *big.Int

GetGasPrice return gas price

func (*StdTx) GetMemo

func (tx *StdTx) GetMemo() string

GetMemo returns the memo

func (*StdTx) GetMsgs

func (tx *StdTx) GetMsgs() []sdk.Msg

GetMsgs returns the all the transaction's messages.

func (*StdTx) GetNonce added in v1.2.0

func (tx *StdTx) GetNonce() uint64

func (*StdTx) GetPubKeys

func (tx *StdTx) GetPubKeys() []crypto.PubKey

GetPubkeys returns the pubkeys of signers if the pubkey is included in the signature If pubkey is not included in the signature, then nil is in the slice instead

func (*StdTx) GetSender added in v1.6.2

func (tx *StdTx) GetSender(_ sdk.Context) string

func (*StdTx) GetSignBytes

func (tx *StdTx) GetSignBytes(ctx sdk.Context, index int, acc exported.Account) []byte

GetSignBytes returns the signBytes of the tx for a given signer

func (*StdTx) GetSignatures

func (tx *StdTx) GetSignatures() [][]byte

GetSignatures returns the signature of signers who signed the Msg. CONTRACT: Length returned is same as length of pubkeys returned from MsgKeySigners, and the order matches. CONTRACT: If the signature is missing (ie the Msg is invalid), then the corresponding signature is .Empty().

func (*StdTx) GetSigners

func (tx *StdTx) GetSigners() []sdk.AccAddress

GetSigners returns the addresses that must sign the transaction. Addresses are returned in a deterministic order. They are accumulated from the GetSigners method for each Msg in the order they appear in tx.GetMsgs(). Duplicate addresses will be omitted.

func (*StdTx) GetTxFnSignatureInfo added in v0.19.16

func (tx *StdTx) GetTxFnSignatureInfo() ([]byte, int)

func (*StdTx) GetType added in v1.1.5

func (tx *StdTx) GetType() sdk.TransactionType

func (*StdTx) UnmarshalFromAmino added in v0.19.16

func (tx *StdTx) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

func (*StdTx) ValidWithHeight added in v1.6.7

func (tx *StdTx) ValidWithHeight(h int64) error

func (*StdTx) ValidateBasic

func (tx *StdTx) ValidateBasic() error

ValidateBasic does a simple and lightweight validation check that doesn't require access to any other information.

func (*StdTx) VerifySequence added in v1.6.1

func (tx *StdTx) VerifySequence(index int, acc exported.Account) error

type SupplyKeeper

type SupplyKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	GetModuleAccount(ctx sdk.Context, moduleName string) exported.ModuleAccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
}

SupplyKeeper defines the expected supply Keeper (noalias)

type Tx added in v1.3.0

type Tx struct {
	// body is the processable content of the transaction
	Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// auth_info is the authorization related content of the transaction,
	// specifically signers, signer modes and fee
	AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"`
	// signatures is a list of signatures that matches the length and order of
	// AuthInfo's signer_infos to allow connecting signature meta information like
	// public key and signing mode by position.
	Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

Tx is the standard type used for broadcasting transactions.

func (*Tx) Descriptor added in v1.3.0

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

func (*Tx) GetAuthInfo added in v1.3.0

func (m *Tx) GetAuthInfo() *AuthInfo

func (*Tx) GetBody added in v1.3.0

func (m *Tx) GetBody() *TxBody

func (*Tx) GetSignatures added in v1.3.0

func (m *Tx) GetSignatures() [][]byte

func (*Tx) Marshal added in v1.3.0

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

func (*Tx) MarshalTo added in v1.3.0

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

func (*Tx) MarshalToSizedBuffer added in v1.3.0

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

func (*Tx) ProtoMessage added in v1.3.0

func (*Tx) ProtoMessage()

func (*Tx) Reset added in v1.3.0

func (m *Tx) Reset()

func (*Tx) Size added in v1.3.0

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

func (*Tx) String added in v1.3.0

func (m *Tx) String() string

func (*Tx) Unmarshal added in v1.3.0

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

func (*Tx) XXX_DiscardUnknown added in v1.3.0

func (m *Tx) XXX_DiscardUnknown()

func (*Tx) XXX_Marshal added in v1.3.0

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

func (*Tx) XXX_Merge added in v1.3.0

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

func (*Tx) XXX_Size added in v1.3.0

func (m *Tx) XXX_Size() int

func (*Tx) XXX_Unmarshal added in v1.3.0

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

type TxBody added in v1.3.0

type TxBody struct {
	// messages is a list of messages to be executed. The required signers of
	// those messages define the number and order of elements in AuthInfo's
	// signer_infos and Tx's signatures. Each required signer address is added to
	// the list only the first time it occurs.
	// By convention, the first required signer (usually from the first message)
	// is referred to as the primary signer and pays the fee for the whole
	// transaction.
	Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// memo is any arbitrary note/comment to be added to the transaction.
	// WARNING: in clients, any publicly exposed text should not be called memo,
	// but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
	Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"`
	// timeout is the block height after which this transaction will not
	// be processed by the chain
	TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"`
	// extension_options are arbitrary options that can be added by chains
	// when the default options are not sufficient. If any of these are present
	// and can't be handled, the transaction will be rejected
	ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"`
	// extension_options are arbitrary options that can be added by chains
	// when the default options are not sufficient. If any of these are present
	// and can't be handled, they will be ignored
	NonCriticalExtensionOptions []*types.Any `` /* 149-byte string literal not displayed */
}

TxBody is the body of a transaction that all signers sign over.

func (*TxBody) Descriptor added in v1.3.0

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

func (*TxBody) GetExtensionOptions added in v1.3.0

func (m *TxBody) GetExtensionOptions() []*types.Any

func (*TxBody) GetMemo added in v1.3.0

func (m *TxBody) GetMemo() string

func (*TxBody) GetMessages added in v1.3.0

func (m *TxBody) GetMessages() []*types.Any

func (*TxBody) GetNonCriticalExtensionOptions added in v1.3.0

func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any

func (*TxBody) GetTimeoutHeight added in v1.3.0

func (m *TxBody) GetTimeoutHeight() uint64

func (*TxBody) Marshal added in v1.3.0

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

func (*TxBody) MarshalTo added in v1.3.0

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

func (*TxBody) MarshalToSizedBuffer added in v1.3.0

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

func (*TxBody) ProtoMessage added in v1.3.0

func (*TxBody) ProtoMessage()

func (*TxBody) Reset added in v1.3.0

func (m *TxBody) Reset()

func (*TxBody) Size added in v1.3.0

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

func (*TxBody) String added in v1.3.0

func (m *TxBody) String() string

func (*TxBody) Unmarshal added in v1.3.0

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

func (*TxBody) XXX_DiscardUnknown added in v1.3.0

func (m *TxBody) XXX_DiscardUnknown()

func (*TxBody) XXX_Marshal added in v1.3.0

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

func (*TxBody) XXX_Merge added in v1.3.0

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

func (*TxBody) XXX_Size added in v1.3.0

func (m *TxBody) XXX_Size() int

func (*TxBody) XXX_Unmarshal added in v1.3.0

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

type TxBuilder

type TxBuilder struct {
	// contains filtered or unexported fields
}

TxBuilder implements a transaction context created in SDK modules.

func NewTxBuilder

func NewTxBuilder(
	txEncoder sdk.TxEncoder, accNumber, seq, gas uint64, gasAdj float64,
	simulateAndExecute bool, chainID, memo string, fees sdk.Coins, gasPrices sdk.DecCoins,
) TxBuilder

NewTxBuilder returns a new initialized TxBuilder.

func NewTxBuilderFromCLI

func NewTxBuilderFromCLI(input io.Reader) TxBuilder

NewTxBuilderFromCLI returns a new initialized TxBuilder with parameters from the command line using Viper.

func (TxBuilder) AccountNumber

func (bldr TxBuilder) AccountNumber() uint64

AccountNumber returns the account number

func (TxBuilder) BuildAndSign

func (bldr TxBuilder) BuildAndSign(name, passphrase string, msgs []sdk.Msg) ([]byte, error)

BuildAndSign builds a single message to be signed, and signs a transaction with the built message given a name, passphrase, and a set of messages.

func (TxBuilder) BuildSignMsg

func (bldr TxBuilder) BuildSignMsg(msgs []sdk.Msg) (StdSignMsg, error)

BuildSignMsg builds a single message to be signed from a TxBuilder given a set of messages. It returns an error if a fee is supplied but cannot be parsed.

func (TxBuilder) BuildTxForSim

func (bldr TxBuilder) BuildTxForSim(msgs []sdk.Msg) ([]byte, error)

BuildTxForSim creates a StdSignMsg and encodes a transaction with the StdSignMsg with a single empty StdSignature for tx simulation.

func (TxBuilder) ChainID

func (bldr TxBuilder) ChainID() string

ChainID returns the chain id

func (TxBuilder) Fees

func (bldr TxBuilder) Fees() sdk.Coins

Fees returns the fees for the transaction

func (TxBuilder) Gas

func (bldr TxBuilder) Gas() uint64

Gas returns the gas for the transaction

func (TxBuilder) GasAdjustment

func (bldr TxBuilder) GasAdjustment() float64

GasAdjustment returns the gas adjustment

func (TxBuilder) GasPrices

func (bldr TxBuilder) GasPrices() sdk.DecCoins

GasPrices returns the gas prices set for the transaction, if any.

func (TxBuilder) Keybase

func (bldr TxBuilder) Keybase() keys.Keybase

Keybase returns the keybase

func (TxBuilder) Memo

func (bldr TxBuilder) Memo() string

Memo returns the memo message

func (TxBuilder) Sequence

func (bldr TxBuilder) Sequence() uint64

Sequence returns the transaction sequence

func (TxBuilder) Sign

func (bldr TxBuilder) Sign(name, passphrase string, msg StdSignMsg) ([]byte, error)

Sign signs a transaction given a name, passphrase, and a single message to signed. An error is returned if signing fails.

func (TxBuilder) SignStdTx

func (bldr TxBuilder) SignStdTx(name, passphrase string, stdTx *StdTx, appendSig bool) (signedStdTx *StdTx, err error)

SignStdTx appends a signature to a StdTx and returns a copy of it. If append is false, it replaces the signatures already attached with the new signature.

func (TxBuilder) SimulateAndExecute

func (bldr TxBuilder) SimulateAndExecute() bool

SimulateAndExecute returns the option to simulate and then execute the transaction using the gas from the simulation results

func (TxBuilder) TxEncoder

func (bldr TxBuilder) TxEncoder() sdk.TxEncoder

TxEncoder returns the transaction encoder

func (TxBuilder) WithAccountNumber

func (bldr TxBuilder) WithAccountNumber(accnum uint64) TxBuilder

WithAccountNumber returns a copy of the context with an account number.

func (TxBuilder) WithChainID

func (bldr TxBuilder) WithChainID(chainID string) TxBuilder

WithChainID returns a copy of the context with an updated chainID.

func (TxBuilder) WithFees

func (bldr TxBuilder) WithFees(fees string) TxBuilder

WithFees returns a copy of the context with an updated fee.

func (TxBuilder) WithGas

func (bldr TxBuilder) WithGas(gas uint64) TxBuilder

WithGas returns a copy of the context with an updated gas.

func (TxBuilder) WithGasPrices

func (bldr TxBuilder) WithGasPrices(gasPrices string) TxBuilder

WithGasPrices returns a copy of the context with updated gas prices.

func (TxBuilder) WithKeybase

func (bldr TxBuilder) WithKeybase(keybase keys.Keybase) TxBuilder

WithKeybase returns a copy of the context with updated keybase.

func (TxBuilder) WithMemo

func (bldr TxBuilder) WithMemo(memo string) TxBuilder

WithMemo returns a copy of the context with an updated memo.

func (TxBuilder) WithSequence

func (bldr TxBuilder) WithSequence(sequence uint64) TxBuilder

WithSequence returns a copy of the context with an updated sequence number.

func (TxBuilder) WithTxEncoder

func (bldr TxBuilder) WithTxEncoder(txEncoder sdk.TxEncoder) TxBuilder

WithTxEncoder returns a copy of the context with an updated codec.

type TxRaw added in v1.3.0

type TxRaw struct {
	// body_bytes is a protobuf serialization of a TxBody that matches the
	// representation in SignDoc.
	BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"`
	// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
	// representation in SignDoc.
	AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"`
	// signatures is a list of signatures that matches the length and order of
	// AuthInfo's signer_infos to allow connecting signature meta information like
	// public key and signing mode by position.
	Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

TxRaw is a variant of Tx that pins the signer's exact binary representation of body and auth_info. This is used for signing, broadcasting and verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used as the transaction ID.

func (*TxRaw) Descriptor added in v1.3.0

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

func (*TxRaw) GetAuthInfoBytes added in v1.3.0

func (m *TxRaw) GetAuthInfoBytes() []byte

func (*TxRaw) GetBodyBytes added in v1.3.0

func (m *TxRaw) GetBodyBytes() []byte

func (*TxRaw) GetSignatures added in v1.3.0

func (m *TxRaw) GetSignatures() [][]byte

func (*TxRaw) Marshal added in v1.3.0

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

func (*TxRaw) MarshalTo added in v1.3.0

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

func (*TxRaw) MarshalToSizedBuffer added in v1.3.0

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

func (*TxRaw) ProtoMessage added in v1.3.0

func (*TxRaw) ProtoMessage()

func (*TxRaw) Reset added in v1.3.0

func (m *TxRaw) Reset()

func (*TxRaw) Size added in v1.3.0

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

func (*TxRaw) String added in v1.3.0

func (m *TxRaw) String() string

func (*TxRaw) Unmarshal added in v1.3.0

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

func (*TxRaw) XXX_DiscardUnknown added in v1.3.0

func (m *TxRaw) XXX_DiscardUnknown()

func (*TxRaw) XXX_Marshal added in v1.3.0

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

func (*TxRaw) XXX_Merge added in v1.3.0

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

func (*TxRaw) XXX_Size added in v1.3.0

func (m *TxRaw) XXX_Size() int

func (*TxRaw) XXX_Unmarshal added in v1.3.0

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

type UnimplementedQueryServer added in v1.3.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Account added in v1.3.0

func (*UnimplementedQueryServer) Accounts added in v1.3.0

func (*UnimplementedQueryServer) Params added in v1.3.0

type WasmMsgChecker added in v1.7.5

type WasmMsgChecker interface {
	FnSignatureInfo() (string, int, error)
}

Jump to

Keyboard shortcuts

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