Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
nolint noalias
Index ¶
- Constants
- Variables
- func AddressStoreKey(addr sdk.AccAddress) []byte
- func CountSubKeys(pub crypto.PubKey) int
- func DefaultTxDecoder(cdc *codec.Codec) sdk.TxDecoder
- func DefaultTxEncoder(cdc *codec.Codec) sdk.TxEncoder
- func EthereumTxDecode(b []byte, tx interface{}) error
- func EthereumTxEncode(tx sdk.Tx) ([]byte, error)
- func EthereumTxEncoder(_ *codec.Codec) sdk.TxEncoder
- func IbcAminoSignBytes(chainID string, accNum uint64, sequence uint64, fee IbcFee, msgs []sdk.Msg, ...) []byte
- func IbcDirectSignBytes(chainID string, accnum uint64, sequence uint64, fee StdFee, msgs []sdk.Msg, ...) []byte
- func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress)
- func MakeAddressStoreKey(addr sdk.AccAddress, target []byte) []byte
- func NewModuleAddress(name string) sdk.AccAddress
- func NewTestCoins() sdk.Coins
- func NewTestMsg(addrs ...sdk.AccAddress) *sdk.TestMsg
- func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, ...) sdk.Tx
- func NewTestTxWithMemo(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, ...) sdk.Tx
- func NewTestTxWithSignBytes(msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, ...) sdk.Tx
- func ParamKeyTable() subspace.KeyTable
- func ProtoBaseAccount() exported.Account
- func RegisterAccountTypeCodec(o interface{}, name string)
- func RegisterCodec(cdc *codec.Codec)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func SanitizeGenesisAccounts(genAccs exported.GenesisAccounts) exported.GenesisAccounts
- func StdSignBytes(chainID string, accnum uint64, sequence uint64, fee StdFee, msgs []sdk.Msg, ...) []byte
- func ValidateGenAccounts(accounts exported.GenesisAccounts) error
- func ValidateGenesis(data GenesisState) error
- type AccountRetriever
- func (ar AccountRetriever) EnsureExists(addr sdk.AccAddress) error
- func (ar AccountRetriever) GetAccount(addr sdk.AccAddress) (exported.Account, error)
- func (ar AccountRetriever) GetAccountNonce(address string) uint64
- func (ar AccountRetriever) GetAccountNumberSequence(addr sdk.AccAddress) (uint64, uint64, error)
- func (ar AccountRetriever) GetAccountWithHeight(addr sdk.AccAddress) (exported.Account, int64, error)
- type AuthInfo
- func (*AuthInfo) Descriptor() ([]byte, []int)
- func (m *AuthInfo) GetFee() *Fee
- func (m *AuthInfo) GetSignerInfos() []*SignerInfo
- func (m *AuthInfo) Marshal() (dAtA []byte, err error)
- func (m *AuthInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthInfo) ProtoMessage()
- func (m *AuthInfo) Reset()
- func (m *AuthInfo) Size() (n int)
- func (m *AuthInfo) String() string
- func (m *AuthInfo) Unmarshal(dAtA []byte) error
- func (m *AuthInfo) XXX_DiscardUnknown()
- func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthInfo) XXX_Merge(src proto.Message)
- func (m *AuthInfo) XXX_Size() int
- func (m *AuthInfo) XXX_Unmarshal(b []byte) error
- type BaseAccount
- func (acc *BaseAccount) AminoSize(cdc *amino.Codec) int
- func (acc BaseAccount) Copy() sdk.Account
- func (acc *BaseAccount) GetAccountNumber() uint64
- func (acc BaseAccount) GetAddress() sdk.AccAddress
- func (acc BaseAccount) GetCodeHash() []byte
- func (acc *BaseAccount) GetCoins() sdk.Coins
- func (acc BaseAccount) GetPubKey() crypto.PubKey
- func (acc *BaseAccount) GetSequence() uint64
- func (acc BaseAccount) GetStateRoot() ethcmn.Hash
- func (acc *BaseAccount) MarshalAminoTo(cdc *amino.Codec, buf *bytes.Buffer) error
- func (acc *BaseAccount) MarshalToAmino(cdc *amino.Codec) ([]byte, error)
- func (acc BaseAccount) MarshalYAML() (interface{}, error)
- func (acc *BaseAccount) SetAccountNumber(accNumber uint64) error
- func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error
- func (acc *BaseAccount) SetCoins(coins sdk.Coins) error
- func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error
- func (acc *BaseAccount) SetSequence(seq uint64) error
- func (acc *BaseAccount) SpendableCoins(_ time.Time) sdk.Coins
- func (acc BaseAccount) String() string
- func (acc *BaseAccount) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error
- func (acc BaseAccount) Validate() error
- type Fee
- func (*Fee) Descriptor() ([]byte, []int)
- func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.CoinAdapters
- func (m *Fee) GetGasLimit() uint64
- func (m *Fee) GetGranter() string
- func (m *Fee) GetPayer() string
- func (m *Fee) Marshal() (dAtA []byte, err error)
- func (m *Fee) MarshalTo(dAtA []byte) (int, error)
- func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Fee) ProtoMessage()
- func (m *Fee) Reset()
- func (m *Fee) Size() (n int)
- func (m *Fee) String() string
- func (m *Fee) Unmarshal(dAtA []byte) error
- func (m *Fee) XXX_DiscardUnknown()
- func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fee) XXX_Merge(src proto.Message)
- func (m *Fee) XXX_Size() int
- func (m *Fee) XXX_Unmarshal(b []byte) error
- type GenesisAccountIterator
- type GenesisState
- type IbcFee
- type IbcTx
- type ModeInfo
- func (*ModeInfo) Descriptor() ([]byte, []int)
- func (m *ModeInfo) GetMulti() *ModeInfo_Multi
- func (m *ModeInfo) GetSingle() *ModeInfo_Single
- func (m *ModeInfo) GetSum() isModeInfo_Sum
- func (m *ModeInfo) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo) ProtoMessage()
- func (m *ModeInfo) Reset()
- func (m *ModeInfo) Size() (n int)
- func (m *ModeInfo) String() string
- func (m *ModeInfo) Unmarshal(dAtA []byte) error
- func (m *ModeInfo) XXX_DiscardUnknown()
- func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo) XXX_Merge(src proto.Message)
- func (*ModeInfo) XXX_OneofWrappers() []interface{}
- func (m *ModeInfo) XXX_Size() int
- func (m *ModeInfo) XXX_Unmarshal(b []byte) error
- type ModeInfo_Multi
- func (*ModeInfo_Multi) Descriptor() ([]byte, []int)
- func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray
- func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo
- func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo_Multi) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo_Multi) ProtoMessage()
- func (m *ModeInfo_Multi) Reset()
- func (m *ModeInfo_Multi) Size() (n int)
- func (m *ModeInfo_Multi) String() string
- func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error
- func (m *ModeInfo_Multi) XXX_DiscardUnknown()
- func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo_Multi) XXX_Merge(src proto.Message)
- func (m *ModeInfo_Multi) XXX_Size() int
- func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error
- type ModeInfo_Multi_
- type ModeInfo_Single
- func (*ModeInfo_Single) Descriptor() ([]byte, []int)
- func (m *ModeInfo_Single) GetMode() signing.SignMode
- func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo_Single) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo_Single) ProtoMessage()
- func (m *ModeInfo_Single) Reset()
- func (m *ModeInfo_Single) Size() (n int)
- func (m *ModeInfo_Single) String() string
- func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error
- func (m *ModeInfo_Single) XXX_DiscardUnknown()
- func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo_Single) XXX_Merge(src proto.Message)
- func (m *ModeInfo_Single) XXX_Size() int
- func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error
- type ModeInfo_Single_
- type NodeQuerier
- type Params
- type PermissionsForAddress
- type ProtobufViewMsg
- type QueryAccountParams
- type QueryAccountRequest
- func (*QueryAccountRequest) Descriptor() ([]byte, []int)
- 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 QueryAccountsRequest
- func (*QueryAccountsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAccountsRequest) GetPagination() *query.PageRequest
- func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAccountsRequest) ProtoMessage()
- func (m *QueryAccountsRequest) Reset()
- func (m *QueryAccountsRequest) Size() (n int)
- func (m *QueryAccountsRequest) String() string
- func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAccountsRequest) XXX_DiscardUnknown()
- func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAccountsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAccountsRequest) XXX_Size() int
- func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error
- type QueryAccountsResponse
- func (*QueryAccountsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAccountsResponse) GetAccounts() []*types.Any
- func (m *QueryAccountsResponse) GetPagination() *query.PageResponse
- func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAccountsResponse) ProtoMessage()
- func (m *QueryAccountsResponse) Reset()
- func (m *QueryAccountsResponse) Size() (n int)
- func (m *QueryAccountsResponse) String() string
- func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAccountsResponse) XXX_DiscardUnknown()
- func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAccountsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAccountsResponse) XXX_Size() int
- func (m *QueryAccountsResponse) 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 (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- type QueryServer
- type SignDoc
- func (*SignDoc) Descriptor() ([]byte, []int)
- func (m *SignDoc) GetAccountNumber() uint64
- func (m *SignDoc) GetAuthInfoBytes() []byte
- func (m *SignDoc) GetBodyBytes() []byte
- func (m *SignDoc) GetChainId() string
- func (m *SignDoc) Marshal() (dAtA []byte, err error)
- func (m *SignDoc) MarshalTo(dAtA []byte) (int, error)
- func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignDoc) ProtoMessage()
- func (m *SignDoc) Reset()
- func (m *SignDoc) Size() (n int)
- func (m *SignDoc) String() string
- func (m *SignDoc) Unmarshal(dAtA []byte) error
- func (m *SignDoc) XXX_DiscardUnknown()
- func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignDoc) XXX_Merge(src proto.Message)
- func (m *SignDoc) XXX_Size() int
- func (m *SignDoc) XXX_Unmarshal(b []byte) error
- type SignerInfo
- func (*SignerInfo) Descriptor() ([]byte, []int)
- func (m *SignerInfo) GetModeInfo() *ModeInfo
- func (m *SignerInfo) GetPublicKey() *types.Any
- func (m *SignerInfo) GetSequence() uint64
- func (m *SignerInfo) Marshal() (dAtA []byte, err error)
- func (m *SignerInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignerInfo) ProtoMessage()
- func (m *SignerInfo) Reset()
- func (m *SignerInfo) Size() (n int)
- func (m *SignerInfo) String() string
- func (m *SignerInfo) Unmarshal(dAtA []byte) error
- func (m *SignerInfo) XXX_DiscardUnknown()
- func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignerInfo) XXX_Merge(src proto.Message)
- func (m *SignerInfo) XXX_Size() int
- func (m *SignerInfo) XXX_Unmarshal(b []byte) error
- type StdFee
- type StdIBCSignDoc
- type StdSignDoc
- type StdSignMsg
- type StdSignature
- type StdTx
- func (tx *StdTx) FeePayer(ctx sdk.Context) sdk.AccAddress
- func (tx *StdTx) GetFee() sdk.Coins
- func (tx *StdTx) GetFrom() string
- func (tx *StdTx) GetGas() uint64
- func (tx *StdTx) GetGasPrice() *big.Int
- func (tx *StdTx) GetMemo() string
- func (tx *StdTx) GetMsgs() []sdk.Msg
- func (tx *StdTx) GetNonce() uint64
- func (tx *StdTx) GetPubKeys() []crypto.PubKey
- func (tx *StdTx) GetSender(_ sdk.Context) string
- func (tx *StdTx) GetSignBytes(ctx sdk.Context, index int, acc exported.Account) []byte
- func (tx *StdTx) GetSignatures() [][]byte
- func (tx *StdTx) GetSigners() []sdk.AccAddress
- func (tx *StdTx) GetTxFnSignatureInfo() ([]byte, int)
- func (tx *StdTx) GetType() sdk.TransactionType
- func (tx *StdTx) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error
- func (tx *StdTx) ValidWithHeight(h int64) error
- func (tx *StdTx) ValidateBasic() error
- func (tx *StdTx) VerifySequence(index int, acc exported.Account) error
- type SupplyKeeper
- type Tx
- func (*Tx) Descriptor() ([]byte, []int)
- func (m *Tx) GetAuthInfo() *AuthInfo
- func (m *Tx) GetBody() *TxBody
- func (m *Tx) GetSignatures() [][]byte
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (m *Tx) String() string
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (m *Tx) XXX_DiscardUnknown()
- func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tx) XXX_Merge(src proto.Message)
- func (m *Tx) XXX_Size() int
- func (m *Tx) XXX_Unmarshal(b []byte) error
- type TxBody
- func (*TxBody) Descriptor() ([]byte, []int)
- func (m *TxBody) GetExtensionOptions() []*types.Any
- func (m *TxBody) GetMemo() string
- func (m *TxBody) GetMessages() []*types.Any
- func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any
- func (m *TxBody) GetTimeoutHeight() uint64
- func (m *TxBody) Marshal() (dAtA []byte, err error)
- func (m *TxBody) MarshalTo(dAtA []byte) (int, error)
- func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxBody) ProtoMessage()
- func (m *TxBody) Reset()
- func (m *TxBody) Size() (n int)
- func (m *TxBody) String() string
- func (m *TxBody) Unmarshal(dAtA []byte) error
- func (m *TxBody) XXX_DiscardUnknown()
- func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxBody) XXX_Merge(src proto.Message)
- func (m *TxBody) XXX_Size() int
- func (m *TxBody) XXX_Unmarshal(b []byte) error
- type TxBuilder
- func (bldr TxBuilder) AccountNumber() uint64
- func (bldr TxBuilder) BuildAndSign(name, passphrase 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() keys.Keybase
- func (bldr TxBuilder) Memo() string
- func (bldr TxBuilder) Sequence() uint64
- func (bldr TxBuilder) Sign(name, passphrase string, msg StdSignMsg) ([]byte, error)
- func (bldr TxBuilder) SignStdTx(name, passphrase 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 keys.Keybase) TxBuilder
- func (bldr TxBuilder) WithMemo(memo string) TxBuilder
- func (bldr TxBuilder) WithSequence(sequence uint64) TxBuilder
- func (bldr TxBuilder) WithTxEncoder(txEncoder sdk.TxEncoder) TxBuilder
- type TxRaw
- func (*TxRaw) Descriptor() ([]byte, []int)
- func (m *TxRaw) GetAuthInfoBytes() []byte
- func (m *TxRaw) GetBodyBytes() []byte
- func (m *TxRaw) GetSignatures() [][]byte
- func (m *TxRaw) Marshal() (dAtA []byte, err error)
- func (m *TxRaw) MarshalTo(dAtA []byte) (int, error)
- func (m *TxRaw) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxRaw) ProtoMessage()
- func (m *TxRaw) Reset()
- func (m *TxRaw) Size() (n int)
- func (m *TxRaw) String() string
- func (m *TxRaw) Unmarshal(dAtA []byte) error
- func (m *TxRaw) XXX_DiscardUnknown()
- func (m *TxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxRaw) XXX_Merge(src proto.Message)
- func (m *TxRaw) XXX_Size() int
- func (m *TxRaw) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error)
- func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- type WasmMsgChecker
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 acc QuerierRoute = StoreKey )
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 DefaultParamspace = ModuleName
DefaultParamspace defines the default auth module parameter subspace
const (
QueryAccount = "account"
)
query endpoints supported by the auth Querier
Variables ¶
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = 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.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 ¶
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 EthereumTxDecode ¶
func IbcAminoSignBytes ¶
func IbcDirectSignBytes ¶
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 MakeAddressStoreKey ¶
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 ¶
func NewModuleAddress(name string) sdk.AccAddress
NewModuleAddress creates an AccAddress from the hash of the module's name
func NewTestMsg ¶
func NewTestMsg(addrs ...sdk.AccAddress) *sdk.TestMsg
func NewTestTxWithMemo ¶
func NewTestTxWithSignBytes ¶
func ProtoBaseAccount ¶
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 ¶
RegisterCodec registers concrete types on the codec
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
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 ¶
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 ¶
func (*AuthInfo) GetSignerInfos ¶
func (m *AuthInfo) GetSignerInfos() []*SignerInfo
func (*AuthInfo) MarshalToSizedBuffer ¶
func (*AuthInfo) ProtoMessage ¶
func (*AuthInfo) ProtoMessage()
func (*AuthInfo) XXX_DiscardUnknown ¶
func (m *AuthInfo) XXX_DiscardUnknown()
func (*AuthInfo) XXX_Marshal ¶
func (*AuthInfo) XXX_Unmarshal ¶
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 ¶
func (acc *BaseAccount) AminoSize(cdc *amino.Codec) int
func (BaseAccount) Copy ¶
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) GetCodeHash ¶ added in v0.1.2
func (acc BaseAccount) GetCodeHash() []byte
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) GetStateRoot ¶
func (acc BaseAccount) GetStateRoot() ethcmn.Hash
func (*BaseAccount) MarshalAminoTo ¶
func (acc *BaseAccount) MarshalAminoTo(cdc *amino.Codec, buf *bytes.Buffer) error
func (*BaseAccount) MarshalToAmino ¶
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 ¶
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 Fee ¶
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 ¶
func (*Fee) GetAmount ¶
func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.CoinAdapters
func (*Fee) GetGasLimit ¶
func (*Fee) GetGranter ¶
func (*Fee) ProtoMessage ¶
func (*Fee) ProtoMessage()
func (*Fee) XXX_DiscardUnknown ¶
func (m *Fee) XXX_DiscardUnknown()
func (*Fee) XXX_Unmarshal ¶
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 ¶
type IbcFee struct { Amount sdk.CoinAdapters `json:"amount" yaml:"amount"` Gas uint64 `json:"gas" yaml:"gas"` }
type IbcTx ¶
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 ¶
func (*IbcTx) ValidateBasic ¶
type ModeInfo ¶
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 ¶
func (*ModeInfo) GetMulti ¶
func (m *ModeInfo) GetMulti() *ModeInfo_Multi
func (*ModeInfo) GetSingle ¶
func (m *ModeInfo) GetSingle() *ModeInfo_Single
func (*ModeInfo) MarshalToSizedBuffer ¶
func (*ModeInfo) ProtoMessage ¶
func (*ModeInfo) ProtoMessage()
func (*ModeInfo) XXX_DiscardUnknown ¶
func (m *ModeInfo) XXX_DiscardUnknown()
func (*ModeInfo) XXX_Marshal ¶
func (*ModeInfo) XXX_OneofWrappers ¶
func (*ModeInfo) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ModeInfo) XXX_Unmarshal ¶
type ModeInfo_Multi ¶
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 ¶
func (*ModeInfo_Multi) Descriptor() ([]byte, []int)
func (*ModeInfo_Multi) GetBitarray ¶
func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray
func (*ModeInfo_Multi) GetModeInfos ¶
func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo
func (*ModeInfo_Multi) Marshal ¶
func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error)
func (*ModeInfo_Multi) MarshalToSizedBuffer ¶
func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Multi) ProtoMessage ¶
func (*ModeInfo_Multi) ProtoMessage()
func (*ModeInfo_Multi) Reset ¶
func (m *ModeInfo_Multi) Reset()
func (*ModeInfo_Multi) Size ¶
func (m *ModeInfo_Multi) Size() (n int)
func (*ModeInfo_Multi) String ¶
func (m *ModeInfo_Multi) String() string
func (*ModeInfo_Multi) Unmarshal ¶
func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error
func (*ModeInfo_Multi) XXX_DiscardUnknown ¶
func (m *ModeInfo_Multi) XXX_DiscardUnknown()
func (*ModeInfo_Multi) XXX_Marshal ¶
func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModeInfo_Multi) XXX_Merge ¶
func (m *ModeInfo_Multi) XXX_Merge(src proto.Message)
func (*ModeInfo_Multi) XXX_Size ¶
func (m *ModeInfo_Multi) XXX_Size() int
func (*ModeInfo_Multi) XXX_Unmarshal ¶
func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error
type ModeInfo_Multi_ ¶
type ModeInfo_Multi_ struct {
Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
}
func (*ModeInfo_Multi_) MarshalToSizedBuffer ¶
func (m *ModeInfo_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Multi_) Size ¶
func (m *ModeInfo_Multi_) Size() (n int)
type ModeInfo_Single ¶
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 ¶
func (*ModeInfo_Single) Descriptor() ([]byte, []int)
func (*ModeInfo_Single) GetMode ¶
func (m *ModeInfo_Single) GetMode() signing.SignMode
func (*ModeInfo_Single) Marshal ¶
func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error)
func (*ModeInfo_Single) MarshalToSizedBuffer ¶
func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Single) ProtoMessage ¶
func (*ModeInfo_Single) ProtoMessage()
func (*ModeInfo_Single) Reset ¶
func (m *ModeInfo_Single) Reset()
func (*ModeInfo_Single) Size ¶
func (m *ModeInfo_Single) Size() (n int)
func (*ModeInfo_Single) String ¶
func (m *ModeInfo_Single) String() string
func (*ModeInfo_Single) Unmarshal ¶
func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error
func (*ModeInfo_Single) XXX_DiscardUnknown ¶
func (m *ModeInfo_Single) XXX_DiscardUnknown()
func (*ModeInfo_Single) XXX_Marshal ¶
func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModeInfo_Single) XXX_Merge ¶
func (m *ModeInfo_Single) XXX_Merge(src proto.Message)
func (*ModeInfo_Single) XXX_Size ¶
func (m *ModeInfo_Single) XXX_Size() int
func (*ModeInfo_Single) XXX_Unmarshal ¶
func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error
type ModeInfo_Single_ ¶
type ModeInfo_Single_ struct {
Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
}
func (*ModeInfo_Single_) MarshalToSizedBuffer ¶
func (m *ModeInfo_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Single_) Size ¶
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 NewParams ¶
func NewParams(maxMemoCharacters, txSigLimit, txSizeCostPerByte, sigVerifyCostED25519, sigVerifyCostSecp256k1 uint64) Params
NewParams creates a new Params object
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
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 ProtobufViewMsg ¶
/////////
func NewProtobufViewMsg ¶
func NewProtobufViewMsg(typeStr string, data string) *ProtobufViewMsg
func (ProtobufViewMsg) GetSignBytes ¶
func (b ProtobufViewMsg) GetSignBytes() []byte
func (ProtobufViewMsg) GetSigners ¶
func (b ProtobufViewMsg) GetSigners() []sdk.AccAddress
func (ProtobufViewMsg) Route ¶
func (b ProtobufViewMsg) Route() string
func (ProtobufViewMsg) Type ¶
func (b ProtobufViewMsg) Type() string
func (ProtobufViewMsg) ValidateBasic ¶
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 ¶
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 ¶
func (*QueryAccountRequest) Descriptor() ([]byte, []int)
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 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 ¶
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 QueryAccountsRequest ¶
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 ¶
func (*QueryAccountsRequest) Descriptor() ([]byte, []int)
func (*QueryAccountsRequest) GetPagination ¶
func (m *QueryAccountsRequest) GetPagination() *query.PageRequest
func (*QueryAccountsRequest) Marshal ¶
func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error)
func (*QueryAccountsRequest) MarshalTo ¶
func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAccountsRequest) MarshalToSizedBuffer ¶
func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAccountsRequest) ProtoMessage ¶
func (*QueryAccountsRequest) ProtoMessage()
func (*QueryAccountsRequest) Reset ¶
func (m *QueryAccountsRequest) Reset()
func (*QueryAccountsRequest) Size ¶
func (m *QueryAccountsRequest) Size() (n int)
func (*QueryAccountsRequest) String ¶
func (m *QueryAccountsRequest) String() string
func (*QueryAccountsRequest) Unmarshal ¶
func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error
func (*QueryAccountsRequest) XXX_DiscardUnknown ¶
func (m *QueryAccountsRequest) XXX_DiscardUnknown()
func (*QueryAccountsRequest) XXX_Marshal ¶
func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAccountsRequest) XXX_Merge ¶
func (m *QueryAccountsRequest) XXX_Merge(src proto.Message)
func (*QueryAccountsRequest) XXX_Size ¶
func (m *QueryAccountsRequest) XXX_Size() int
func (*QueryAccountsRequest) XXX_Unmarshal ¶
func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error
type QueryAccountsResponse ¶
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 ¶
func (*QueryAccountsResponse) Descriptor() ([]byte, []int)
func (*QueryAccountsResponse) GetAccounts ¶
func (m *QueryAccountsResponse) GetAccounts() []*types.Any
func (*QueryAccountsResponse) GetPagination ¶
func (m *QueryAccountsResponse) GetPagination() *query.PageResponse
func (*QueryAccountsResponse) Marshal ¶
func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error)
func (*QueryAccountsResponse) MarshalTo ¶
func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAccountsResponse) MarshalToSizedBuffer ¶
func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAccountsResponse) ProtoMessage ¶
func (*QueryAccountsResponse) ProtoMessage()
func (*QueryAccountsResponse) Reset ¶
func (m *QueryAccountsResponse) Reset()
func (*QueryAccountsResponse) Size ¶
func (m *QueryAccountsResponse) Size() (n int)
func (*QueryAccountsResponse) String ¶
func (m *QueryAccountsResponse) String() string
func (*QueryAccountsResponse) Unmarshal ¶
func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error
func (*QueryAccountsResponse) XXX_DiscardUnknown ¶
func (m *QueryAccountsResponse) XXX_DiscardUnknown()
func (*QueryAccountsResponse) XXX_Marshal ¶
func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAccountsResponse) XXX_Merge ¶
func (m *QueryAccountsResponse) XXX_Merge(src proto.Message)
func (*QueryAccountsResponse) XXX_Size ¶
func (m *QueryAccountsResponse) XXX_Size() int
func (*QueryAccountsResponse) XXX_Unmarshal ¶
func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
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 ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the 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 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 ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (m *QueryParamsResponse) XXX_Size() int { return m.Size() }
func (*QueryParamsResponse) XXX_Merge ¶
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 ¶
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 ¶
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 ¶
func (*SignDoc) GetAccountNumber ¶
func (*SignDoc) GetAuthInfoBytes ¶
func (*SignDoc) GetBodyBytes ¶
func (*SignDoc) GetChainId ¶
func (*SignDoc) MarshalToSizedBuffer ¶
func (*SignDoc) ProtoMessage ¶
func (*SignDoc) ProtoMessage()
func (*SignDoc) XXX_DiscardUnknown ¶
func (m *SignDoc) XXX_DiscardUnknown()
func (*SignDoc) XXX_Marshal ¶
func (*SignDoc) XXX_Unmarshal ¶
type SignerInfo ¶
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 ¶
func (*SignerInfo) Descriptor() ([]byte, []int)
func (*SignerInfo) GetModeInfo ¶
func (m *SignerInfo) GetModeInfo() *ModeInfo
func (*SignerInfo) GetPublicKey ¶
func (m *SignerInfo) GetPublicKey() *types.Any
func (*SignerInfo) GetSequence ¶
func (m *SignerInfo) GetSequence() uint64
func (*SignerInfo) Marshal ¶
func (m *SignerInfo) Marshal() (dAtA []byte, err error)
func (*SignerInfo) MarshalToSizedBuffer ¶
func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignerInfo) ProtoMessage ¶
func (*SignerInfo) ProtoMessage()
func (*SignerInfo) Reset ¶
func (m *SignerInfo) Reset()
func (*SignerInfo) Size ¶
func (m *SignerInfo) Size() (n int)
func (*SignerInfo) String ¶
func (m *SignerInfo) String() string
func (*SignerInfo) Unmarshal ¶
func (m *SignerInfo) Unmarshal(dAtA []byte) error
func (*SignerInfo) XXX_DiscardUnknown ¶
func (m *SignerInfo) XXX_DiscardUnknown()
func (*SignerInfo) XXX_Marshal ¶
func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignerInfo) XXX_Merge ¶
func (m *SignerInfo) XXX_Merge(src proto.Message)
func (*SignerInfo) XXX_Size ¶
func (m *SignerInfo) XXX_Size() int
func (*SignerInfo) XXX_Unmarshal ¶
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 NewTestStdFee ¶
func NewTestStdFee() StdFee
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).
func (*StdFee) UnmarshalFromAmino ¶
type StdIBCSignDoc ¶
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.
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 ¶
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 ¶
func FromProtobufTx(cdc *codec.CodecProxy, tx *IbcTx) (*StdTx, error)
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) 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) GetSignBytes ¶
GetSignBytes returns the signBytes of the tx for a given signer
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) 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 ¶
func (*StdTx) GetType ¶
func (tx *StdTx) GetType() sdk.TransactionType
func (*StdTx) UnmarshalFromAmino ¶
func (*StdTx) ValidWithHeight ¶
func (*StdTx) ValidateBasic ¶
ValidateBasic does a simple and lightweight validation check that doesn't require access to any other information.
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 ¶
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 ¶
func (*Tx) GetAuthInfo ¶
func (*Tx) GetSignatures ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) XXX_DiscardUnknown ¶
func (m *Tx) XXX_DiscardUnknown()
func (*Tx) XXX_Unmarshal ¶
type TxBody ¶
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 ¶
func (*TxBody) GetExtensionOptions ¶
func (*TxBody) GetMessages ¶
func (*TxBody) GetNonCriticalExtensionOptions ¶
func (*TxBody) GetTimeoutHeight ¶
func (*TxBody) MarshalToSizedBuffer ¶
func (*TxBody) ProtoMessage ¶
func (*TxBody) ProtoMessage()
func (*TxBody) XXX_DiscardUnknown ¶
func (m *TxBody) XXX_DiscardUnknown()
func (*TxBody) XXX_Marshal ¶
func (*TxBody) XXX_Unmarshal ¶
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 ¶
NewTxBuilderFromCLI returns a new initialized TxBuilder with parameters from the command line using Viper.
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, 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 ¶
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, 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 ¶
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 TxRaw ¶
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 ¶
func (*TxRaw) GetAuthInfoBytes ¶
func (*TxRaw) GetBodyBytes ¶
func (*TxRaw) GetSignatures ¶
func (*TxRaw) ProtoMessage ¶
func (*TxRaw) ProtoMessage()
func (*TxRaw) XXX_DiscardUnknown ¶
func (m *TxRaw) XXX_DiscardUnknown()
func (*TxRaw) XXX_Marshal ¶
func (*TxRaw) XXX_Unmarshal ¶
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) Accounts ¶
func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)