package
0.0.0-20220620005849-a315113d9162
Repository: https://github.com/mycodeku/transtionhelper.git
Documentation: pkg.go.dev
# Functions
ComposeMiddlewares compose multiple middlewares on top of a tx.Handler.
ConsumeBlockGasMiddleware check and consume block gas meter.
ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature.
ConsumeTxSizeGasMiddleware will take in parameters and consume gas proportional to the size of tx before calling next middleware.
CountSubKeys counts the total number of keys for a multi-sig public key.
DeductFeeMiddleware deducts fees from the first signer of the tx If the first signer does not have the funds to pay for the fees, return with InsufficientFunds error Call next middleware if fees successfully deducted CONTRACT: Tx must implement FeeTx interface to use deductFeeTxHandler.
Deprecated: DeductFees deducts fees from the given account.
DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer.
GasTxMiddleware defines a simple middleware that sets a new GasMeter on the sdk.Context, and sets the GasInfo on the result.
GetSignerAcc returns an account for a given address that is expected to sign a transaction.
IncrementSequenceMiddleware handles incrementing sequences of all signers.
NewDefaultTxHandler defines a TxHandler middleware stacks that should work for most applications.
NewExtensionOptionsMiddleware creates a new middleware that rejects all extension options which can optionally be included in protobuf transactions that don't pass the checker.
NewIndexEventsTxMiddleware defines a middleware to optionally only index a subset of the emitted events inside the Tendermint events indexer.
NewRouter returns a reference to a new router.
NewMsgServiceRouter creates a new MsgServiceRouter.
No description provided by the author
NewTipMiddleware returns a new middleware for handling transactions with tips.
NewTxDecoderMiddleware creates a new middleware that will decode tx bytes into a sdk.Tx.
OnlyLegacyAminoSigners checks SignatureData to see if all signers are using SIGN_MODE_LEGACY_AMINO_JSON.
RecoveryTxMiddleware defines a middleware that catches all panics that happen in inner middlewares.
SetPubKeyMiddleware sets PubKeys in context for any signer which does not already have pubkey set PubKeys must be set in context for all signers before any other sigverify middlewares run CONTRACT: Tx must implement SigVerifiableTx interface.
SigGasConsumeMiddleware consumes parameter-defined amount of gas for each signature according to the passed-in SignatureVerificationGasConsumer function before calling the next middleware CONTRACT: Pubkeys are set in context for all signers before this middleware runs CONTRACT: Tx must implement SigVerifiableTx interface.
SigVerificationMiddleware verifies all signatures for a tx and return an error if any are invalid.
TxTimeoutHeightMiddleware defines a middleware that checks for a tx height timeout.
ValidateBasicMiddleware will call tx.ValidateBasic, msg.ValidateBasic(for each msg inside tx) and return any non-nil error.
ValidateMemoMiddleware will validate memo given the parameters passed in If memo is too large middleware returns with error, otherwise call next middleware CONTRACT: Tx must implement TxWithMemo interface.
ValidateSigCountMiddleware takes in Params and returns errors if there are too many signatures in the tx for the given params otherwise it calls next middleware Use this middleware to set parameterized limit on number of signatures in tx CONTRACT: Tx must implement SigVerifiableTx interface.
WithBranchedStore creates a new MultiStore branch and commits the store if the downstream returned no error.
# Structs
No description provided by the author
MsgServiceRouter routes fully-qualified Msg service methods to their handler.
No description provided by the author
# Interfaces
AccountKeeper defines the contract needed for AccountKeeper related APIs.
FeegrantKeeper defines the expected feegrant keeper.
GasTx defines a Tx with a GetGas() method which is needed to use gasTxHandler.
No description provided by the author
# Type aliases
ExtensionOptionChecker is a function that returns true if the extension option is accepted.
MsgServiceHandler defines a function type which handles Msg service message.
SignatureVerificationGasConsumer is the type of function that is used to both consume gas when verifying signatures and also to accept or reject different types of pubkeys This is where apps can define their own PubKey.
TxFeeChecker check if the provided fee is enough and returns the effective fee and tx priority, the effective fee should be deducted later, and the priority should be returned in abci response.