Documentation ¶
Index ¶
- Constants
- Variables
- func BroadcastTx(clientCtx client.Context, txf tx.Factory, ixoDid exported.IxoDid, msg sdk.Msg) error
- func GenerateOrBroadcastTxCLI(clientCtx client.Context, flagSet *pflag.FlagSet, ixoDid exported.IxoDid, ...) error
- func GenerateOrBroadcastTxWithFactory(clientCtx client.Context, txf tx.Factory, ixoDid exported.IxoDid, msg sdk.Msg) error
- func IxoSigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- func NewDefaultAnteHandler(ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, ...) sdk.AnteHandler
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func Sign(txf tx.Factory, clientCtx client.Context, txBuilder client.TxBuilder, ...) error
- func SignAndBroadcastTxFromStdSignMsg(clientCtx client.Context, msg sdk.Msg, ixoDid exported.IxoDid, ...) (*sdk.TxResponse, error)
- type DeductFeeDecorator
- type IncrementSequenceDecorator
- type IxoMsg
- type PubKeyGetter
- type SetPubKeyDecorator
- type SigGasConsumeDecorator
- type SigVerificationDecorator
Constants ¶
const IxoNativeToken = "uixo"
const (
ModuleName = "ixo"
)
Variables ¶
var ( // ModuleCdc references the global x/ixo module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is // still used for that purpose. // // The actual codec used for serialization should be provided to x/gov and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func BroadcastTx ¶
func IxoSigVerificationGasConsumer ¶
func IxoSigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
Identical to DefaultSigVerificationGasConsumer, but with ed25519 allowed
func NewDefaultAnteHandler ¶
func NewDefaultAnteHandler(ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, sigGasConsumer ante.SignatureVerificationGasConsumer, pubKeyGetter PubKeyGetter, signModeHandler authsigning.SignModeHandler) sdk.AnteHandler
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
Types ¶
type DeductFeeDecorator ¶
type DeductFeeDecorator struct {
// contains filtered or unexported fields
}
DeductFeeDecorator 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 AnteHandler if fees successfully deducted CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator
func NewDeductFeeDecorator ¶
func NewDeductFeeDecorator(ak ante.AccountKeeper, bk types.BankKeeper, pkg PubKeyGetter) DeductFeeDecorator
func (DeductFeeDecorator) AnteHandle ¶
type IncrementSequenceDecorator ¶
type IncrementSequenceDecorator struct {
// contains filtered or unexported fields
}
IncrementSequenceDecorator handles incrementing sequences of all signers. Use the IncrementSequenceDecorator decorator to prevent replay attacks. Note, there is no need to execute IncrementSequenceDecorator on RecheckTX since CheckTx would already bump the sequence number.
NOTE: Since CheckTx and DeliverTx state are managed separately, subsequent and sequential txs orginating from the same account cannot be handled correctly in a reliable way unless sequence numbers are managed and tracked manually by a client. It is recommended to instead use multiple messages in a tx.
func NewIncrementSequenceDecorator ¶
func NewIncrementSequenceDecorator(ak keeper.AccountKeeper, pkg PubKeyGetter) IncrementSequenceDecorator
func (IncrementSequenceDecorator) AnteHandle ¶
type PubKeyGetter ¶
type SetPubKeyDecorator ¶
type SetPubKeyDecorator struct {
// contains filtered or unexported fields
}
func NewSetPubKeyDecorator ¶
func NewSetPubKeyDecorator(ak ante.AccountKeeper, pkg PubKeyGetter) SetPubKeyDecorator
func (SetPubKeyDecorator) AnteHandle ¶
type SigGasConsumeDecorator ¶
type SigGasConsumeDecorator struct {
// contains filtered or unexported fields
}
Consume parameter-defined amount of gas for each signature according to the passed-in SignatureVerificationGasConsumer function before calling the next AnteHandler CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewSigGasConsumeDecorator ¶
func NewSigGasConsumeDecorator(ak keeper.AccountKeeper, sigGasConsumer ante.SignatureVerificationGasConsumer, pkg PubKeyGetter) SigGasConsumeDecorator
func (SigGasConsumeDecorator) AnteHandle ¶
type SigVerificationDecorator ¶
type SigVerificationDecorator struct {
// contains filtered or unexported fields
}
Verify all signatures for a tx and return an error if any are invalid. Note, the SigVerificationDecorator decorator will not get executed on ReCheck.
CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewSigVerificationDecorator ¶
func NewSigVerificationDecorator(ak keeper.AccountKeeper, signModeHandler authsigning.SignModeHandler, pkg PubKeyGetter) SigVerificationDecorator