types

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const IxoNativeToken = "uixo"
View Source
const (
	ModuleName = "ixo"
)

Variables

View Source
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 BroadcastTx(clientCtx client.Context, txf tx.Factory, ixoDid exported.IxoDid, msg sdk.Msg) error

func GenerateOrBroadcastTxCLI

func GenerateOrBroadcastTxCLI(clientCtx client.Context, flagSet *pflag.FlagSet, ixoDid exported.IxoDid, msg sdk.Msg) error

func GenerateOrBroadcastTxWithFactory

func GenerateOrBroadcastTxWithFactory(clientCtx client.Context, txf tx.Factory, ixoDid exported.IxoDid, msg sdk.Msg) error

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)

func Sign

func Sign(txf tx.Factory, clientCtx client.Context, txBuilder client.TxBuilder, overwriteSig bool, ixoDid exported.IxoDid) error

func SignAndBroadcastTxFromStdSignMsg

func SignAndBroadcastTxFromStdSignMsg(clientCtx client.Context,
	msg sdk.Msg, ixoDid exported.IxoDid, flagSet *pflag.FlagSet) (*sdk.TxResponse, error)

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 (DeductFeeDecorator) AnteHandle

func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

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 (IncrementSequenceDecorator) AnteHandle

func (isd IncrementSequenceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

type IxoMsg

type IxoMsg interface {
	sdk.Msg
	GetSignerDid() exported.Did
}

type PubKeyGetter

type PubKeyGetter func(ctx sdk.Context, msg IxoMsg) (cryptotypes.PubKey, error)

type SetPubKeyDecorator

type SetPubKeyDecorator struct {
	// contains filtered or unexported fields
}

func NewSetPubKeyDecorator

func NewSetPubKeyDecorator(ak ante.AccountKeeper, pkg PubKeyGetter) SetPubKeyDecorator

func (SetPubKeyDecorator) AnteHandle

func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

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 (SigGasConsumeDecorator) AnteHandle

func (sgcd SigGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

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 (SigVerificationDecorator) AnteHandle

func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

Jump to

Keyboard shortcuts

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