ibc_tx

package
v0.0.0-...-69704c5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MaxGasWanted = uint64((1 << 63) - 1)

Variables

View Source
var (
	PubKeyRegisterInterfaces = ibccodec.RegisterInterfaces
	LagacyKey2PbKey          = adapter.LagacyPubkey2ProtoBuffPubkey
)

DefaultSignModes are the default sign modes enabled for protobuf transactions.

Functions

func CM40TxDecoder

func CM40TxDecoder(cdc codec.ProtoCodecMarshaler) func(txBytes []byte) (ibctx.Tx, error)

func DefaultJSONTxEncoder

func DefaultJSONTxEncoder(cdc codec.ProtoCodecMarshaler) ibctx.IBCTxEncoder

DefaultJSONTxEncoder returns a default protobuf JSON TxEncoder using the provided Marshaler.

func DefaultTxEncoder

func DefaultTxEncoder() ibctx.TxEncoder

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 IbcTxDecoder

func IbcTxDecoder(cdc codec.ProtoCodecMarshaler) ibctx.IbcTxDecoder

DefaultTxDecoder returns a default protobuf TxDecoder using the provided Marshaler. func IbcTxDecoder(cdc codec.ProtoCodecMarshaler) ibcadapter.TxDecoder {

func IbcTxEncoder

func IbcTxEncoder() ibctx.IBCTxEncoder

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.ProtoCodecMarshaler, enabledSignModes []signing2.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 RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

TODO add call RegisterInterfaces RegisterInterfaces registers the sdk.Tx interface.

func SignatureDataToModeInfoAndSig

func SignatureDataToModeInfoAndSig(data signing.SignatureData) (*tx.ModeInfo, []byte)

SignatureDataToModeInfoAndSig converts a SignatureData to a ModeInfo and raw bytes signature

func ValidateParams

func ValidateParams(ibcTx *tx.Tx) func() error

Types

type DenomAdapterMsg

type DenomAdapterMsg interface {
	sdk.Msg
	DenomOpr
}

type DenomOpr

type DenomOpr interface {
	RulesFilter() (sdk.Msg, error)
}

type ExtensionOptionsTxBuilder

type ExtensionOptionsTxBuilder interface {
	client.TxBuilder

	SetExtensionOptions(...*codectypes.Any)
	SetNonCriticalExtensionOptions(...*codectypes.Any)
}

ExtensionOptionsTxBuilder defines a TxBuilder that can also set extensions.

type MessageSensitive

type MessageSensitive interface {
	Swap(ctx sdk.Context) (sdk.Msg, error)
}

type TxAdapter

type TxAdapter struct {
	*types.Tx
}

func (*TxAdapter) GetMsgs

func (t *TxAdapter) GetMsgs() []ibctx.Msg

func (*TxAdapter) GetSigners

func (t *TxAdapter) GetSigners() []sdk.AccAddress

GetSigners retrieves all the signers of a tx. This includes all unique signers of the messages (in order), as well as the FeePayer (if specified and not already included).

func (*TxAdapter) ValidateBasic

func (t *TxAdapter) ValidateBasic() error

ValidateBasic implements the ValidateBasic method on sdk.Tx.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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