Documentation ¶
Index ¶
- Constants
- Variables
- func AddressStoreKey(addr sdk.AccAddress) []byte
- func CountSubKeys(pub crypto.PubKey) int
- func DefaultJSONTxDecoder(cdc *codec.Codec) sdk.TxDecoder
- func DefaultTxDecoder(cdc *codec.Codec) sdk.TxDecoder
- func DefaultTxEncoder(cdc *codec.Codec) sdk.TxEncoder
- func MultiSignatureDataToAminoMultisignature(cdc *codec.Codec, mSig *signing.MultiSignatureData) (multisig.AminoMultisignature, error)
- func NewModuleAddress(name string) sdk.AccAddress
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterKeyTypeCodec(o interface{}, name string)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func SignatureDataToAminoSignature(cdc *codec.Codec, data signing.SignatureData) ([]byte, error)
- func StdSignBytes(chainID string, accnum uint64, sequence uint64, fee StdFee, msgs []sdk.Msg, ...) []byte
- func StdSignatureToSignatureV2(cdc *codec.Codec, sig StdSignature) (signing.SignatureV2, error)
- func ValidateGenAccounts(accounts GenesisAccounts) error
- func ValidateGenesis(data GenesisState) error
- type AccountI
- type AccountRetriever
- func (ar AccountRetriever) EnsureExists(querier client.NodeQuerier, addr sdk.AccAddress) error
- func (ar AccountRetriever) GetAccount(querier client.NodeQuerier, addr sdk.AccAddress) (AccountI, error)
- func (ar AccountRetriever) GetAccountNumberSequence(nodeQuerier client.NodeQuerier, addr sdk.AccAddress) (uint64, uint64, error)
- func (ar AccountRetriever) GetAccountWithHeight(querier client.NodeQuerier, addr sdk.AccAddress) (AccountI, int64, error)
- type BankKeeper
- type BaseAccount
- func (*BaseAccount) Descriptor() ([]byte, []int)
- func (acc BaseAccount) GetAccountNumber() uint64
- func (acc BaseAccount) GetAddress() sdk.AccAddress
- func (acc BaseAccount) GetPubKey() (pk crypto.PubKey)
- func (acc BaseAccount) GetSequence() uint64
- func (m *BaseAccount) Marshal() (dAtA []byte, err error)
- func (m *BaseAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *BaseAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (acc BaseAccount) MarshalYAML() (interface{}, error)
- func (*BaseAccount) ProtoMessage()
- func (m *BaseAccount) Reset()
- func (acc *BaseAccount) SetAccountNumber(accNumber uint64) error
- func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error
- func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error
- func (acc *BaseAccount) SetSequence(seq uint64) error
- func (m *BaseAccount) Size() (n int)
- func (acc BaseAccount) String() string
- func (m *BaseAccount) Unmarshal(dAtA []byte) error
- func (acc BaseAccount) Validate() error
- func (m *BaseAccount) XXX_DiscardUnknown()
- func (m *BaseAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BaseAccount) XXX_Merge(src proto.Message)
- func (m *BaseAccount) XXX_Size() int
- func (m *BaseAccount) XXX_Unmarshal(b []byte) error
- type GenesisAccount
- type GenesisAccountIterator
- type GenesisAccounts
- type GenesisState
- type LegacyAminoJSONHandler
- type ModuleAccount
- func (*ModuleAccount) Descriptor() ([]byte, []int)
- func (ma ModuleAccount) GetName() string
- func (ma ModuleAccount) GetPermissions() []string
- func (ma ModuleAccount) HasPermission(permission string) bool
- func (m *ModuleAccount) Marshal() (dAtA []byte, err error)
- func (ma ModuleAccount) MarshalJSON() ([]byte, error)
- func (m *ModuleAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *ModuleAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (ma ModuleAccount) MarshalYAML() (interface{}, error)
- func (*ModuleAccount) ProtoMessage()
- func (m *ModuleAccount) Reset()
- func (ma ModuleAccount) SetPubKey(pubKey crypto.PubKey) error
- func (ma ModuleAccount) SetSequence(seq uint64) error
- func (m *ModuleAccount) Size() (n int)
- func (ma ModuleAccount) String() string
- func (m *ModuleAccount) Unmarshal(dAtA []byte) error
- func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error
- func (ma ModuleAccount) Validate() error
- func (m *ModuleAccount) XXX_DiscardUnknown()
- func (m *ModuleAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModuleAccount) XXX_Merge(src proto.Message)
- func (m *ModuleAccount) XXX_Size() int
- func (m *ModuleAccount) XXX_Unmarshal(b []byte) error
- type ModuleAccountI
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetMaxMemoCharacters() uint64
- func (m *Params) GetSigVerifyCostED25519() uint64
- func (m *Params) GetSigVerifyCostSecp256k1() uint64
- func (m *Params) GetTxSigLimit() uint64
- func (m *Params) GetTxSizeCostPerByte() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PermissionsForAddress
- type QueryAccountRequest
- func (*QueryAccountRequest) Descriptor() ([]byte, []int)
- func (m *QueryAccountRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (m *QueryAccountRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAccountRequest) ProtoMessage()
- func (m *QueryAccountRequest) Reset()
- func (m *QueryAccountRequest) Size() (n int)
- func (m *QueryAccountRequest) String() string
- func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAccountRequest) XXX_DiscardUnknown()
- func (m *QueryAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAccountRequest) XXX_Merge(src proto.Message)
- func (m *QueryAccountRequest) XXX_Size() int
- func (m *QueryAccountRequest) XXX_Unmarshal(b []byte) error
- type QueryAccountResponse
- func (*QueryAccountResponse) Descriptor() ([]byte, []int)
- func (m *QueryAccountResponse) GetAccount() *types.Any
- func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAccountResponse) ProtoMessage()
- func (m *QueryAccountResponse) Reset()
- func (m *QueryAccountResponse) Size() (n int)
- func (m *QueryAccountResponse) String() string
- func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAccountResponse) XXX_DiscardUnknown()
- func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAccountResponse) XXX_Merge(src proto.Message)
- func (m *QueryAccountResponse) XXX_Size() int
- func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type StdFeedeprecated
- type StdSignDoc
- type StdSignMsg
- type StdSignaturedeprecated
- type StdTx
- func (tx StdTx) FeePayer() sdk.AccAddress
- func (tx StdTx) GetFee() sdk.Coins
- func (tx StdTx) GetGas() uint64
- func (tx StdTx) GetMemo() string
- func (tx StdTx) GetMsgs() []sdk.Msg
- func (tx StdTx) GetPubKeys() []crypto.PubKey
- func (tx StdTx) GetSignatures() [][]byte
- func (tx StdTx) GetSignaturesV2() ([]signing.SignatureV2, error)
- func (tx StdTx) GetSigners() []sdk.AccAddress
- func (tx StdTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (tx StdTx) ValidateBasic() error
- type StdTxBuilder
- func (s *StdTxBuilder) GetTx() authsigning.SigFeeMemoTx
- func (s *StdTxBuilder) SetFeeAmount(amount sdk.Coins)
- func (s *StdTxBuilder) SetGasLimit(limit uint64)
- func (s *StdTxBuilder) SetMemo(memo string)
- func (s *StdTxBuilder) SetMsgs(msgs ...sdk.Msg) error
- func (s *StdTxBuilder) SetSignatures(signatures ...signing.SignatureV2) error
- type StdTxConfig
- func (s StdTxConfig) NewTxBuilder() client.TxBuilder
- func (s StdTxConfig) SignModeHandler() authsigning.SignModeHandler
- func (s StdTxConfig) TxDecoder() sdk.TxDecoder
- func (s StdTxConfig) TxEncoder() sdk.TxEncoder
- func (s StdTxConfig) TxJSONDecoder() sdk.TxDecoder
- func (s StdTxConfig) TxJSONEncoder() sdk.TxEncoder
- func (s StdTxConfig) WrapTxBuilder(newTx sdk.Tx) (client.TxBuilder, error)
- type TxBuilder
- func (bldr TxBuilder) AccountNumber() uint64
- func (bldr TxBuilder) BuildAndSign(name string, msgs []sdk.Msg) ([]byte, error)
- func (bldr TxBuilder) BuildSignMsg(msgs []sdk.Msg) (StdSignMsg, error)
- func (bldr TxBuilder) BuildTxForSim(msgs []sdk.Msg) ([]byte, error)
- func (bldr TxBuilder) ChainID() string
- func (bldr TxBuilder) Fees() sdk.Coins
- func (bldr TxBuilder) Gas() uint64
- func (bldr TxBuilder) GasAdjustment() float64
- func (bldr TxBuilder) GasPrices() sdk.DecCoins
- func (bldr TxBuilder) Keybase() keyring.Keyring
- func (bldr TxBuilder) Memo() string
- func (bldr TxBuilder) Sequence() uint64
- func (bldr TxBuilder) Sign(name string, msg StdSignMsg) ([]byte, error)
- func (bldr TxBuilder) SignStdTx(name string, stdTx StdTx, appendSig bool) (signedStdTx StdTx, err error)
- func (bldr TxBuilder) SimulateAndExecute() bool
- func (bldr TxBuilder) TxEncoder() sdk.TxEncoder
- func (bldr TxBuilder) WithAccountNumber(accnum uint64) TxBuilder
- func (bldr TxBuilder) WithChainID(chainID string) TxBuilder
- func (bldr TxBuilder) WithFees(fees string) TxBuilder
- func (bldr TxBuilder) WithGas(gas uint64) TxBuilder
- func (bldr TxBuilder) WithGasPrices(gasPrices string) TxBuilder
- func (bldr TxBuilder) WithKeybase(keybase keyring.Keyring) TxBuilder
- func (bldr TxBuilder) WithMemo(memo string) TxBuilder
- func (bldr TxBuilder) WithSequence(sequence uint64) TxBuilder
- func (bldr TxBuilder) WithTxEncoder(txEncoder sdk.TxEncoder) TxBuilder
- type UnimplementedQueryServer
Constants ¶
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 auth QuerierRoute = ModuleName )
const ( DefaultMaxMemoCharacters uint64 = 256 DefaultTxSigLimit uint64 = 7 DefaultTxSizeCostPerByte uint64 = 10 DefaultSigVerifyCostED25519 uint64 = 590 DefaultSigVerifyCostSecp256k1 uint64 = 1000 )
Default parameter values
const ( Minter = "minter" Burner = "burner" Staking = "staking" )
permissions
const ( QueryAccount = "account" QueryParams = "params" )
query endpoints supported by the auth Querier
const MaxGasWanted = uint64((1 << 63) - 1)
MaxGasWanted defines the max gas allowed.
Variables ¶
var ( ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group") )
var ( // AddressStoreKeyPrefix prefix for account-by-address store AddressStoreKeyPrefix = []byte{0x01} // param key for global account number GlobalAccountNumberKey = []byte("globalAccountNumber") )
var ( KeyMaxMemoCharacters = []byte("MaxMemoCharacters") KeyTxSigLimit = []byte("TxSigLimit") KeyTxSizeCostPerByte = []byte("TxSizeCostPerByte") KeySigVerifyCostED25519 = []byte("SigVerifyCostED25519") KeySigVerifyCostSecp256k1 = []byte("SigVerifyCostSecp256k1") )
Parameter keys
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewHybridCodec(amino, types.NewInterfaceRegistry())
)
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 ¶
CountSubKeys counts the total number of keys for a multi-sig public key.
func DefaultTxDecoder ¶
DefaultTxDecoder logic for standard transaction decoding
func DefaultTxEncoder ¶
DefaultTxEncoder logic for standard transaction encoding
func MultiSignatureDataToAminoMultisignature ¶
func MultiSignatureDataToAminoMultisignature(cdc *codec.Codec, mSig *signing.MultiSignatureData) (multisig.AminoMultisignature, error)
MultiSignatureDataToAminoMultisignature converts a MultiSignatureData to an AminoMultisignature. Only SIGN_MODE_LEGACY_AMINO_JSON is supported.
func NewModuleAddress ¶
func NewModuleAddress(name string) sdk.AccAddress
NewModuleAddress creates an AccAddress from the hash of the module's name
func RegisterCodec ¶
RegisterCodec registers the account interfaces and concrete types on the provided Amino codec.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterface associates protoName with AccountI interface and creates a registry of it's concrete implementations
func RegisterKeyTypeCodec ¶
func RegisterKeyTypeCodec(o interface{}, name string)
RegisterKeyTypeCodec registers an external concrete type defined in another module for the internal ModuleCdc.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func SignatureDataToAminoSignature ¶
SignatureDataToAminoSignature converts a SignatureData to amino-encoded signature bytes. Only SIGN_MODE_LEGACY_AMINO_JSON is supported.
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 StdSignatureToSignatureV2 ¶
func StdSignatureToSignatureV2(cdc *codec.Codec, sig StdSignature) (signing.SignatureV2, error)
StdSignatureToSignatureV2 converts a StdSignature to a SignatureV2
func ValidateGenAccounts ¶
func ValidateGenAccounts(accounts 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 AccountI ¶
type AccountI interface { GetAddress() sdk.AccAddress SetAddress(sdk.AccAddress) error // errors if already set. GetPubKey() crypto.PubKey // can return nil. SetPubKey(crypto.PubKey) error GetAccountNumber() uint64 SetAccountNumber(uint64) error GetSequence() uint64 SetSequence(uint64) error // Ensure that account implements stringer String() string }
AccountI is an interface used to store coins at a given address within state. It presumes a notion of sequence numbers for replay protection, a notion of account numbers for replay protection for previously pruned accounts, and a pubkey for authentication purposes.
Many complex conditions can be used in the concrete struct which implements AccountI.
func ProtoBaseAccount ¶
func ProtoBaseAccount() AccountI
ProtoBaseAccount - a prototype function for BaseAccount
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(codec codec.JSONMarshaler) AccountRetriever
NewAccountRetriever initialises a new AccountRetriever instance.
func (AccountRetriever) EnsureExists ¶
func (ar AccountRetriever) EnsureExists(querier client.NodeQuerier, 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(querier client.NodeQuerier, addr sdk.AccAddress) (AccountI, 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) GetAccountNumberSequence ¶
func (ar AccountRetriever) GetAccountNumberSequence(nodeQuerier client.NodeQuerier, 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(querier client.NodeQuerier, addr sdk.AccAddress) (AccountI, 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 BankKeeper ¶
type BankKeeper interface {
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}
BankKeeper defines the contract needed for supply related APIs (noalias)
type BaseAccount ¶
type BaseAccount struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` PubKey []byte `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"public_key,omitempty" yaml:"public_key"` AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"` Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` }
BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting).
func NewBaseAccount ¶
func NewBaseAccount(address sdk.AccAddress, pubKey crypto.PubKey, accountNumber, 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) Descriptor ¶
func (*BaseAccount) Descriptor() ([]byte, []int)
func (BaseAccount) GetAccountNumber ¶
func (acc BaseAccount) GetAccountNumber() uint64
GetAccountNumber - Implements AccountI
func (BaseAccount) GetAddress ¶
func (acc BaseAccount) GetAddress() sdk.AccAddress
GetAddress - Implements sdk.AccountI.
func (BaseAccount) GetPubKey ¶
func (acc BaseAccount) GetPubKey() (pk crypto.PubKey)
GetPubKey - Implements sdk.AccountI.
func (BaseAccount) GetSequence ¶
func (acc BaseAccount) GetSequence() uint64
GetSequence - Implements sdk.AccountI.
func (*BaseAccount) Marshal ¶
func (m *BaseAccount) Marshal() (dAtA []byte, err error)
func (*BaseAccount) MarshalToSizedBuffer ¶
func (m *BaseAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (BaseAccount) MarshalYAML ¶
func (acc BaseAccount) MarshalYAML() (interface{}, error)
MarshalYAML returns the YAML representation of an account.
func (*BaseAccount) ProtoMessage ¶
func (*BaseAccount) ProtoMessage()
func (*BaseAccount) Reset ¶
func (m *BaseAccount) Reset()
func (*BaseAccount) SetAccountNumber ¶
func (acc *BaseAccount) SetAccountNumber(accNumber uint64) error
SetAccountNumber - Implements AccountI
func (*BaseAccount) SetAddress ¶
func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error
SetAddress - Implements sdk.AccountI.
func (*BaseAccount) SetPubKey ¶
func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error
SetPubKey - Implements sdk.AccountI.
func (*BaseAccount) SetSequence ¶
func (acc *BaseAccount) SetSequence(seq uint64) error
SetSequence - Implements sdk.AccountI.
func (*BaseAccount) Size ¶
func (m *BaseAccount) Size() (n int)
func (BaseAccount) String ¶
func (acc BaseAccount) String() string
func (*BaseAccount) Unmarshal ¶
func (m *BaseAccount) Unmarshal(dAtA []byte) error
func (BaseAccount) Validate ¶
func (acc BaseAccount) Validate() error
Validate checks for errors on the account fields
func (*BaseAccount) XXX_DiscardUnknown ¶
func (m *BaseAccount) XXX_DiscardUnknown()
func (*BaseAccount) XXX_Marshal ¶
func (m *BaseAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BaseAccount) XXX_Merge ¶
func (m *BaseAccount) XXX_Merge(src proto.Message)
func (*BaseAccount) XXX_Size ¶
func (m *BaseAccount) XXX_Size() int
func (*BaseAccount) XXX_Unmarshal ¶
func (m *BaseAccount) XXX_Unmarshal(b []byte) error
type GenesisAccount ¶
GenesisAccount defines a genesis account that embeds an AccountI with validation capabilities.
type GenesisAccountIterator ¶
type GenesisAccountIterator struct{}
GenesisAccountIterator implements genesis account iteration.
func (GenesisAccountIterator) IterateGenesisAccounts ¶
func (GenesisAccountIterator) IterateGenesisAccounts( cdc codec.Marshaler, appGenesis map[string]json.RawMessage, cb func(AccountI) (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 GenesisAccounts ¶
type GenesisAccounts []GenesisAccount
GenesisAccounts defines a slice of GenesisAccount objects
func SanitizeGenesisAccounts ¶
func SanitizeGenesisAccounts(genAccs GenesisAccounts) GenesisAccounts
SanitizeGenesisAccounts sorts accounts and coin sets.
type GenesisState ¶
type GenesisState struct { Params Params `json:"params" yaml:"params"` Accounts 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.Marshaler, appState map[string]json.RawMessage) GenesisState
GetGenesisStateFromAppState returns x/auth GenesisState given raw application genesis state.
func NewGenesisState ¶
func NewGenesisState(params Params, accounts GenesisAccounts) GenesisState
NewGenesisState - Create a new genesis state
type LegacyAminoJSONHandler ¶
type LegacyAminoJSONHandler struct{}
LegacyAminoJSONHandler is a SignModeHandler that handles SIGN_MODE_LEGACY_AMINO_JSON
func (LegacyAminoJSONHandler) DefaultMode ¶
func (h LegacyAminoJSONHandler) DefaultMode() signingtypes.SignMode
DefaultMode implements SignModeHandler.DefaultMode
func (LegacyAminoJSONHandler) GetSignBytes ¶
func (LegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, data signing.SignerData, tx sdk.Tx) ([]byte, error)
DefaultMode implements SignModeHandler.GetSignBytes
func (LegacyAminoJSONHandler) Modes ¶
func (LegacyAminoJSONHandler) Modes() []signingtypes.SignMode
Modes implements SignModeHandler.Modes
type ModuleAccount ¶
type ModuleAccount struct { *BaseAccount `` /* 136-byte string literal not displayed */ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Permissions []string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"` }
ModuleAccount defines an account for modules that holds coins on a pool
func NewEmptyModuleAccount ¶
func NewEmptyModuleAccount(name string, permissions ...string) *ModuleAccount
NewEmptyModuleAccount creates a empty ModuleAccount from a string
func NewModuleAccount ¶
func NewModuleAccount(ba *BaseAccount, name string, permissions ...string) *ModuleAccount
NewModuleAccount creates a new ModuleAccount instance
func (*ModuleAccount) Descriptor ¶
func (*ModuleAccount) Descriptor() ([]byte, []int)
func (ModuleAccount) GetName ¶
func (ma ModuleAccount) GetName() string
GetName returns the the name of the holder's module
func (ModuleAccount) GetPermissions ¶
func (ma ModuleAccount) GetPermissions() []string
GetPermissions returns permissions granted to the module account
func (ModuleAccount) HasPermission ¶
func (ma ModuleAccount) HasPermission(permission string) bool
HasPermission returns whether or not the module account has permission.
func (*ModuleAccount) Marshal ¶
func (m *ModuleAccount) Marshal() (dAtA []byte, err error)
func (ModuleAccount) MarshalJSON ¶
func (ma ModuleAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of a ModuleAccount.
func (*ModuleAccount) MarshalToSizedBuffer ¶
func (m *ModuleAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (ModuleAccount) MarshalYAML ¶
func (ma ModuleAccount) MarshalYAML() (interface{}, error)
MarshalYAML returns the YAML representation of a ModuleAccount.
func (*ModuleAccount) ProtoMessage ¶
func (*ModuleAccount) ProtoMessage()
func (*ModuleAccount) Reset ¶
func (m *ModuleAccount) Reset()
func (ModuleAccount) SetPubKey ¶
func (ma ModuleAccount) SetPubKey(pubKey crypto.PubKey) error
SetPubKey - Implements AccountI
func (ModuleAccount) SetSequence ¶
func (ma ModuleAccount) SetSequence(seq uint64) error
SetSequence - Implements AccountI
func (*ModuleAccount) Size ¶
func (m *ModuleAccount) Size() (n int)
func (ModuleAccount) String ¶
func (ma ModuleAccount) String() string
func (*ModuleAccount) Unmarshal ¶
func (m *ModuleAccount) Unmarshal(dAtA []byte) error
func (*ModuleAccount) UnmarshalJSON ¶
func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a ModuleAccount.
func (ModuleAccount) Validate ¶
func (ma ModuleAccount) Validate() error
Validate checks for errors on the account fields
func (*ModuleAccount) XXX_DiscardUnknown ¶
func (m *ModuleAccount) XXX_DiscardUnknown()
func (*ModuleAccount) XXX_Marshal ¶
func (m *ModuleAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModuleAccount) XXX_Merge ¶
func (m *ModuleAccount) XXX_Merge(src proto.Message)
func (*ModuleAccount) XXX_Size ¶
func (m *ModuleAccount) XXX_Size() int
func (*ModuleAccount) XXX_Unmarshal ¶
func (m *ModuleAccount) XXX_Unmarshal(b []byte) error
type ModuleAccountI ¶
type ModuleAccountI interface { AccountI GetName() string GetPermissions() []string HasPermission(string) bool }
ModuleAccountI defines an account interface for modules that hold tokens in an escrow.
type Params ¶
type Params struct { MaxMemoCharacters uint64 `` /* 142-byte string literal not displayed */ TxSigLimit uint64 `protobuf:"varint,2,opt,name=tx_sig_limit,json=txSigLimit,proto3" json:"tx_sig_limit,omitempty" yaml:"tx_sig_limit"` TxSizeCostPerByte uint64 `` /* 148-byte string literal not displayed */ SigVerifyCostED25519 uint64 `` /* 157-byte string literal not displayed */ SigVerifyCostSecp256k1 uint64 `` /* 165-byte string literal not displayed */ }
Params defines the parameters for the auth module.
func NewParams ¶
func NewParams( maxMemoCharacters, txSigLimit, txSizeCostPerByte, sigVerifyCostED25519, sigVerifyCostSecp256k1 uint64, ) Params
NewParams creates a new Params object
func (*Params) Descriptor ¶
func (*Params) GetMaxMemoCharacters ¶
func (*Params) GetSigVerifyCostED25519 ¶
func (*Params) GetSigVerifyCostSecp256k1 ¶
func (*Params) GetTxSigLimit ¶
func (*Params) GetTxSizeCostPerByte ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters. nolint
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PermissionsForAddress ¶
type PermissionsForAddress struct {
// contains filtered or unexported fields
}
PermissionsForAddress defines all the registered permissions for an address
func NewPermissionsForAddress ¶
func NewPermissionsForAddress(name string, permissions []string) PermissionsForAddress
NewPermissionsForAddress creates a new PermissionsForAddress object
func (PermissionsForAddress) GetAddress ¶
func (pa PermissionsForAddress) GetAddress() sdk.AccAddress
GetAddress returns the address of the PermissionsForAddress object
func (PermissionsForAddress) GetPermissions ¶
func (pa PermissionsForAddress) GetPermissions() []string
GetPermissions returns the permissions granted to the address
func (PermissionsForAddress) HasPermission ¶
func (pa PermissionsForAddress) HasPermission(permission string) bool
HasPermission returns whether the PermissionsForAddress contains permission.
type QueryAccountRequest ¶
type QueryAccountRequest struct {
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
}
QueryAccountRequest is request type for the Query/Account RPC method
func (*QueryAccountRequest) Descriptor ¶
func (*QueryAccountRequest) Descriptor() ([]byte, []int)
func (*QueryAccountRequest) GetAddress ¶
func (m *QueryAccountRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*QueryAccountRequest) Marshal ¶
func (m *QueryAccountRequest) Marshal() (dAtA []byte, err error)
func (*QueryAccountRequest) MarshalTo ¶
func (m *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAccountRequest) MarshalToSizedBuffer ¶
func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAccountRequest) ProtoMessage ¶
func (*QueryAccountRequest) ProtoMessage()
func (*QueryAccountRequest) Reset ¶
func (m *QueryAccountRequest) Reset()
func (*QueryAccountRequest) Size ¶
func (m *QueryAccountRequest) Size() (n int)
func (*QueryAccountRequest) String ¶
func (m *QueryAccountRequest) String() string
func (*QueryAccountRequest) Unmarshal ¶
func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error
func (*QueryAccountRequest) XXX_DiscardUnknown ¶
func (m *QueryAccountRequest) XXX_DiscardUnknown()
func (*QueryAccountRequest) XXX_Marshal ¶
func (m *QueryAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAccountRequest) XXX_Merge ¶
func (m *QueryAccountRequest) XXX_Merge(src proto.Message)
func (*QueryAccountRequest) XXX_Size ¶
func (m *QueryAccountRequest) XXX_Size() int
func (*QueryAccountRequest) XXX_Unmarshal ¶
func (m *QueryAccountRequest) XXX_Unmarshal(b []byte) error
type QueryAccountResponse ¶
type QueryAccountResponse struct {
Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}
QueryAccountResponse is response type for the Query/Account RPC method
func (*QueryAccountResponse) Descriptor ¶
func (*QueryAccountResponse) Descriptor() ([]byte, []int)
func (*QueryAccountResponse) GetAccount ¶
func (m *QueryAccountResponse) GetAccount() *types.Any
func (*QueryAccountResponse) Marshal ¶
func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error)
func (*QueryAccountResponse) MarshalTo ¶
func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAccountResponse) MarshalToSizedBuffer ¶
func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAccountResponse) ProtoMessage ¶
func (*QueryAccountResponse) ProtoMessage()
func (*QueryAccountResponse) Reset ¶
func (m *QueryAccountResponse) Reset()
func (*QueryAccountResponse) Size ¶
func (m *QueryAccountResponse) Size() (n int)
func (*QueryAccountResponse) String ¶
func (m *QueryAccountResponse) String() string
func (*QueryAccountResponse) Unmarshal ¶
func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error
func (*QueryAccountResponse) XXX_DiscardUnknown ¶
func (m *QueryAccountResponse) XXX_DiscardUnknown()
func (*QueryAccountResponse) XXX_Marshal ¶
func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAccountResponse) XXX_Merge ¶
func (m *QueryAccountResponse) XXX_Merge(src proto.Message)
func (*QueryAccountResponse) XXX_Size ¶
func (m *QueryAccountResponse) XXX_Size() int
func (*QueryAccountResponse) XXX_Unmarshal ¶
func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // 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 ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method
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"`
}
QueryParamsResponse is response type for the Query/Params RPC method
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 { // 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 StdFee
deprecated
type StdFee struct { Amount sdk.Coins `json:"amount" yaml:"amount"` Gas uint64 `json:"gas" yaml:"gas"` }
Deprecated: 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 (StdFee) GasPrices ¶
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).
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) UnpackInterfaces ¶
func (msg StdSignMsg) UnpackInterfaces(unpacker types.AnyUnpacker) error
type StdSignature
deprecated
type StdSignature struct { PubKey []byte `json:"pub_key" yaml:"pub_key"` // optional Signature []byte `json:"signature" yaml:"signature"` }
Deprecated: StdSignature represents a sig
func MakeSignature ¶
func MakeSignature(kr keyring.Keyring, name string, msg StdSignMsg) (sig StdSignature, err error)
MakeSignature builds a StdSignature given a keyring, key name, and a StdSignMsg.
func (StdSignature) GetPubKey ¶
func (ss StdSignature) GetPubKey() (pk crypto.PubKey)
GetPubKey returns the public key of a signature as a crypto.PubKey using the Amino codec.
func (StdSignature) GetSignature ¶
func (ss StdSignature) GetSignature() []byte
GetSignature returns the raw signature bytes.
func (StdSignature) MarshalYAML ¶
func (ss StdSignature) MarshalYAML() (interface{}, error)
MarshalYAML returns the YAML representation of the signature.
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"` }
StdTx is the legacy transaction format for wrapping a Msg with Fee and Signatures. It only works with Amino, please prefer the new protobuf Tx in types/tx. NOTE: the first signature is the fee payer (Signatures must not be nil).
func (StdTx) FeePayer ¶
func (tx StdTx) FeePayer() 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) GetPubKeys ¶
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) GetSignatures ¶
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) GetSignaturesV2 ¶
func (tx StdTx) GetSignaturesV2() ([]signing.SignatureV2, error)
GetSignaturesV2 implements SigVerifiableTx.GetSignaturesV2
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) UnpackInterfaces ¶
func (tx StdTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
func (StdTx) ValidateBasic ¶
ValidateBasic does a simple and lightweight validation check that doesn't require access to any other information.
type StdTxBuilder ¶
type StdTxBuilder struct { StdTx // contains filtered or unexported fields }
StdTxBuilder wraps StdTx to implement to the context.TxBuilder interface. Note that this type just exists for backwards compatibility with amino StdTx and will not work for protobuf transactions.
func (*StdTxBuilder) GetTx ¶
func (s *StdTxBuilder) GetTx() authsigning.SigFeeMemoTx
GetTx implements TxBuilder.GetTx
func (*StdTxBuilder) SetFeeAmount ¶
func (s *StdTxBuilder) SetFeeAmount(amount sdk.Coins)
func (*StdTxBuilder) SetGasLimit ¶
func (s *StdTxBuilder) SetGasLimit(limit uint64)
func (*StdTxBuilder) SetMemo ¶
func (s *StdTxBuilder) SetMemo(memo string)
SetMemo implements TxBuilder.SetMemo
func (*StdTxBuilder) SetMsgs ¶
func (s *StdTxBuilder) SetMsgs(msgs ...sdk.Msg) error
SetMsgs implements TxBuilder.SetMsgs
func (*StdTxBuilder) SetSignatures ¶
func (s *StdTxBuilder) SetSignatures(signatures ...signing.SignatureV2) error
SetSignatures implements TxBuilder.SetSignatures
type StdTxConfig ¶
StdTxConfig is a context.TxConfig for StdTx
func (StdTxConfig) NewTxBuilder ¶
func (s StdTxConfig) NewTxBuilder() client.TxBuilder
NewTxBuilder implements TxConfig.NewTxBuilder
func (StdTxConfig) SignModeHandler ¶
func (s StdTxConfig) SignModeHandler() authsigning.SignModeHandler
func (StdTxConfig) TxDecoder ¶
func (s StdTxConfig) TxDecoder() sdk.TxDecoder
func (StdTxConfig) TxEncoder ¶
func (s StdTxConfig) TxEncoder() sdk.TxEncoder
MarshalTx implements TxConfig.MarshalTx
func (StdTxConfig) TxJSONDecoder ¶
func (s StdTxConfig) TxJSONDecoder() sdk.TxDecoder
func (StdTxConfig) TxJSONEncoder ¶
func (s StdTxConfig) TxJSONEncoder() sdk.TxEncoder
func (StdTxConfig) WrapTxBuilder ¶
WrapTxBuilder returns a StdTxBuilder from provided transaction
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 NewTxBuilderFromFlags ¶
func NewTxBuilderFromFlags(input io.Reader, fs *pflag.FlagSet, keyringPath string) (TxBuilder, error)
NewTxBuilderFromFlags returns a new initialized TxBuilder with parameters extracted from FlagSet.
func (TxBuilder) AccountNumber ¶
AccountNumber returns the account number
func (TxBuilder) BuildAndSign ¶
BuildAndSign builds a single message to be signed, and signs a transaction with the built message given a name 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 ¶
BuildTxForSim creates a StdSignMsg and encodes a transaction with the StdSignMsg with a single empty StdSignature for tx simulation.
func (TxBuilder) GasAdjustment ¶
GasAdjustment returns the gas adjustment
func (TxBuilder) Sign ¶
func (bldr TxBuilder) Sign(name string, msg StdSignMsg) ([]byte, error)
Sign signs a transaction given a name and a single message to be signed. Returns error if signing fails.
func (TxBuilder) SignStdTx ¶
func (bldr TxBuilder) SignStdTx(name 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 ¶
SimulateAndExecute returns the option to simulate and then execute the transaction using the gas from the simulation results
func (TxBuilder) WithAccountNumber ¶
WithAccountNumber returns a copy of the context with an account number.
func (TxBuilder) WithChainID ¶
WithChainID returns a copy of the context with an updated chainID.
func (TxBuilder) WithGasPrices ¶
WithGasPrices returns a copy of the context with updated gas prices.
func (TxBuilder) WithKeybase ¶
WithKeybase returns a copy of the context with updated keybase.
func (TxBuilder) WithSequence ¶
WithSequence returns a copy of the context with an updated sequence number.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Account ¶
func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)