Documentation ¶
Index ¶
- type ClientFee
- type ClientSignature
- type ClientTx
- type Factory
- func (f *Factory) AccountNumber() uint64
- func (f *Factory) Address() string
- func (f *Factory) BuildAndSign(name string, msgs []sdk.Msg) ([]byte, error)
- func (f *Factory) BuildUnsignedTx(msgs []sdk.Msg) (sdk.TxBuilder, error)
- func (f *Factory) ChainID() string
- func (f *Factory) Fees() sdk.Coins
- func (f *Factory) Gas() uint64
- func (f Factory) GasAdjustment() float64
- func (f *Factory) KeyManager() sdk.KeyManager
- func (f *Factory) Memo() string
- func (f *Factory) Mode() sdk.BroadcastMode
- func (f *Factory) Password() string
- func (f *Factory) Sequence() uint64
- func (f *Factory) Sign(name string, txBuilder sdk.TxBuilder) error
- func (f *Factory) SimulateAndExecute() bool
- func (f *Factory) WithAccountNumber(accnum uint64) *Factory
- func (f *Factory) WithAddress(address string) *Factory
- func (f *Factory) WithChainID(chainID string) *Factory
- func (f *Factory) WithFee(fee sdk.Coins) *Factory
- func (f *Factory) WithGas(gas uint64) *Factory
- func (f *Factory) WithGasAdjustment(gasAdjustment float64) *Factory
- func (f *Factory) WithKeyManager(keyManager sdk.KeyManager) *Factory
- func (f *Factory) WithMemo(memo string) *Factory
- func (f *Factory) WithMode(mode sdk.BroadcastMode) *Factory
- func (f *Factory) WithPassword(password string) *Factory
- func (f *Factory) WithQueryFunc(queryFunc QueryWithData) *Factory
- func (f *Factory) WithSequence(sequence uint64) *Factory
- func (f *Factory) WithSignModeHandler(signModeHandler sdk.SignModeHandler) *Factory
- func (f *Factory) WithSimulateAndExecute(simulate bool) *Factory
- func (f *Factory) WithTxConfig(txConfig sdk.TxConfig) *Factory
- type Generator
- type QueryWithData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSignature ¶
type ClientTx ¶
type ClientTx interface { sdk.Tx codec.ProtoMarshaler SetMsgs(...sdk.Msg) error GetSignatures() []sdk.Signature SetSignatures(...ClientSignature) error GetFee() sdk.Fee SetFee(ClientFee) error GetMemo() string SetMemo(string) // CanonicalSignBytes returns the canonical JSON bytes to sign over, given a // chain ID, along with an account and sequence number. The JSON encoding // ensures all field names adhere to their proto definition, default values // are omitted, and follows the JSON Canonical Form. CanonicalSignBytes(cid string, num, seq uint64) ([]byte, error) }
ClientTx defines an interface which an application-defined concrete transaction type must implement. Namely, it must be able to set messages, generate signatures, and provide canonical bytes to sign over. The transaction must also know how to encode itself.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements a transaction context created in SDK modules.
func (*Factory) AccountNumber ¶
AccountNumber returns accountNumber.
func (*Factory) BuildAndSign ¶
func (*Factory) BuildUnsignedTx ¶
func (Factory) GasAdjustment ¶
GasAdjustment returns the gasAdjustment.
func (*Factory) KeyManager ¶
func (f *Factory) KeyManager() sdk.KeyManager
KeyManager returns keyManager.
func (*Factory) Sign ¶
Sign signs a transaction given a name, passphrase, and a single message to signed. An error is returned if signing fails.
func (*Factory) SimulateAndExecute ¶
SimulateAndExecute returns the option to simulateAndExecute and then execute the transaction using the gas from the simulation results
func (*Factory) WithAccountNumber ¶
WithAccountNumber returns a pointer of the context with an account number.
func (*Factory) WithAddress ¶
WithAddress returns a pointer of the context with a password.
func (*Factory) WithChainID ¶
WithChainID returns a pointer of the context with an updated ChainID.
func (*Factory) WithGasAdjustment ¶
WithGasAdjustment returns a pointer of the context with an updated gasAdjustment.
func (*Factory) WithKeyManager ¶
func (f *Factory) WithKeyManager(keyManager sdk.KeyManager) *Factory
WithKeyManager returns a pointer of the context with a KeyManager.
func (*Factory) WithMode ¶
func (f *Factory) WithMode(mode sdk.BroadcastMode) *Factory
WithMode returns a pointer of the context with a Mode.
func (*Factory) WithPassword ¶
WithPassword returns a pointer of the context with a password.
func (*Factory) WithQueryFunc ¶
func (f *Factory) WithQueryFunc(queryFunc QueryWithData) *Factory
WithQueryFunc returns a pointer of the context with an queryFunc.
func (*Factory) WithSequence ¶
WithSequence returns a pointer of the context with an updated sequence number.
func (*Factory) WithSignModeHandler ¶
func (f *Factory) WithSignModeHandler(signModeHandler sdk.SignModeHandler) *Factory
WithSignModeHandler returns a pointer of the context with an signModeHandler.
func (*Factory) WithSimulateAndExecute ¶
WithSimulateAndExecute returns a pointer of the context with a simulateAndExecute.
type Generator ¶
type Generator interface { NewTx() ClientTx NewFee() ClientFee NewSignature() ClientSignature }
Generator defines an interface a client can utilize to generate an application-defined concrete transaction type. The type returned must implement ClientTx.