Documentation ¶
Index ¶
- Variables
- func DefaultJSONTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
- func DefaultJSONTxEncoder(cdc *codec.ProtoCodec) sdk.TxEncoder
- func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
- func DefaultTxEncoder() sdk.TxEncoder
- func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string, accnum uint64) ([]byte, error)
- func ModeInfoAndSigToSignatureData(modeInfo *tx.ModeInfo, sig []byte) (signing.SignatureData, error)
- func NewTxConfig(protoCodec *codec.ProtoCodec, enabledSignModes []signingtypes.SignMode) client.TxConfig
- func PubKeyToAny(key crypto.PubKey) (*codectypes.Any, error)
- func SignatureDataToModeInfoAndSig(data signing.SignatureData) (*tx.ModeInfo, []byte)
- func WrapTx(protoTx *tx.Tx) client.TxBuilder
- type ExtensionOptionsTxBuilder
Constants ¶
This section is empty.
Variables ¶
var DefaultSignModes = []signingtypes.SignMode{ signingtypes.SignMode_SIGN_MODE_DIRECT, signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, }
DefaultSignModes are the default sign modes enabled for protobuf transactions.
Functions ¶
func DefaultJSONTxDecoder ¶
func DefaultJSONTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
DefaultJSONTxDecoder returns a default protobuf JSON TxDecoder using the provided Marshaler.
func DefaultJSONTxEncoder ¶
func DefaultJSONTxEncoder(cdc *codec.ProtoCodec) sdk.TxEncoder
DefaultJSONTxEncoder returns a default protobuf JSON TxEncoder using the provided Marshaler.
func DefaultTxDecoder ¶
func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
DefaultTxDecoder returns a default protobuf TxDecoder using the provided Marshaler.
func DefaultTxEncoder ¶
DefaultTxEncoder returns a default protobuf TxEncoder using the provided Marshaler
func DirectSignBytes ¶
func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string, accnum uint64) ([]byte, error)
DirectSignBytes returns the SIGN_MODE_DIRECT sign bytes for the provided TxBody bytes, AuthInfo bytes, chain ID, account number and sequence.
func ModeInfoAndSigToSignatureData ¶
func ModeInfoAndSigToSignatureData(modeInfo *tx.ModeInfo, sig []byte) (signing.SignatureData, error)
ModeInfoAndSigToSignatureData converts a ModeInfo and raw bytes signature to a SignatureData or returns an error
func NewTxConfig ¶
func NewTxConfig(protoCodec *codec.ProtoCodec, enabledSignModes []signingtypes.SignMode) client.TxConfig
NewTxConfig returns a new protobuf TxConfig using the provided ProtoCodec and sign modes. The first enabled sign mode will become the default sign mode.
func PubKeyToAny ¶
func PubKeyToAny(key crypto.PubKey) (*codectypes.Any, error)
PubKeyToAny converts a crypto.PubKey to a proto Any.
func SignatureDataToModeInfoAndSig ¶
func SignatureDataToModeInfoAndSig(data signing.SignatureData) (*tx.ModeInfo, []byte)
SignatureDataToModeInfoAndSig converts a SignatureData to a ModeInfo and raw bytes signature
Types ¶
type ExtensionOptionsTxBuilder ¶
type ExtensionOptionsTxBuilder interface { client.TxBuilder SetExtensionOptions(...*codectypes.Any) SetNonCriticalExtensionOptions(...*codectypes.Any) }
ExtensionOptionsTxBuilder defines a TxBuilder that can also set extensions.