Documentation
¶
Index ¶
- Constants
- Variables
- func ApproximateFeeForTx(cliCtx context.CLIContext, tx auth.StdTx, chainId string) (auth.StdFee, error)
- func BuildAndSign(txBldr auth.TxBuilder, ctx context.CLIContext, msgs []sdk.Msg, ...) ([]byte, error)
- func CompleteAndBroadcastTxCLI(txBldr auth.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, ...) error
- func GenerateOrBroadcastMsgs(cliCtx context.CLIContext, msg sdk.Msg, ixoDid exported.IxoDid) error
- func IxoSigVerificationGasConsumer(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params auth.Params) error
- func MakeSignature(signBytes []byte, privateKey ed25519tm.PrivKeyEd25519) (auth.StdSignature, error)
- func NewDefaultAnteHandler(ak auth.AccountKeeper, supplyKeeper supply.Keeper, ...) sdk.AnteHandler
- func RegisterCodec(cdc *codec.Codec)
- func Sign(cliCtx context.CLIContext, msg auth.StdSignMsg, ixoDid exported.IxoDid) ([]byte, error)
- func SignAndBroadcastTxFromStdSignMsg(cliCtx context.CLIContext, msg auth.StdSignMsg, ixoDid exported.IxoDid) (sdk.TxResponse, error)
- type DeductFeeDecorator
- type DidKeeper
- type IncrementSequenceDecorator
- type IxoMsg
- type PubKeyGetter
- type SetPubKeyDecorator
- type SigGasConsumeDecorator
- type SigVerificationDecorator
Constants ¶
const IxoNativeToken = "uixo"
const (
ModuleName = "ixo"
)
Variables ¶
var ModuleCdc *codec.Codec
module wide codec
Functions ¶
func ApproximateFeeForTx ¶
func BuildAndSign ¶ added in v0.12.1
func GenerateOrBroadcastMsgs ¶
func IxoSigVerificationGasConsumer ¶ added in v0.12.2
func IxoSigVerificationGasConsumer( meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params auth.Params, ) error
Identical to DefaultSigVerificationGasConsumer, but with ed25519 allowed
func MakeSignature ¶ added in v0.12.1
func MakeSignature(signBytes []byte, privateKey ed25519tm.PrivKeyEd25519) (auth.StdSignature, error)
func NewDefaultAnteHandler ¶
func NewDefaultAnteHandler(ak auth.AccountKeeper, supplyKeeper supply.Keeper, sigGasConsumer ante.SignatureVerificationGasConsumer, pubKeyGetter PubKeyGetter) sdk.AnteHandler
func RegisterCodec ¶ added in v0.12.1
func Sign ¶ added in v0.12.1
func Sign(cliCtx context.CLIContext, msg auth.StdSignMsg, ixoDid exported.IxoDid) ([]byte, error)
func SignAndBroadcastTxFromStdSignMsg ¶
func SignAndBroadcastTxFromStdSignMsg(cliCtx context.CLIContext, msg auth.StdSignMsg, ixoDid exported.IxoDid) (sdk.TxResponse, error)
Types ¶
type DeductFeeDecorator ¶ added in v0.14.0
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 ¶ added in v0.14.0
func NewDeductFeeDecorator(ak keeper.AccountKeeper, sk types.SupplyKeeper, pkg PubKeyGetter) DeductFeeDecorator
func (DeductFeeDecorator) AnteHandle ¶ added in v0.14.0
type DidKeeper ¶
type DidKeeper interface { GetDidDoc(ctx sdk.Context, did exported.Did) (exported.DidDoc, error) SetDidDoc(ctx sdk.Context, did exported.DidDoc) (err error) AddDidDoc(ctx sdk.Context, did exported.DidDoc) AddCredentials(ctx sdk.Context, did exported.Did, credential exported.DidCredential) (err error) GetAllDidDocs(ctx sdk.Context) (didDocs []exported.DidDoc) GetAddDids(ctx sdk.Context) (dids []exported.Did) }
DidKeeper defines the did contract that must be fulfilled throughout the ixo module
type IncrementSequenceDecorator ¶ added in v0.14.0
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 ¶ added in v0.14.0
func NewIncrementSequenceDecorator(ak keeper.AccountKeeper, pkg PubKeyGetter) IncrementSequenceDecorator
func (IncrementSequenceDecorator) AnteHandle ¶ added in v0.14.0
type SetPubKeyDecorator ¶ added in v0.14.0
type SetPubKeyDecorator struct {
// contains filtered or unexported fields
}
func NewSetPubKeyDecorator ¶ added in v0.14.0
func NewSetPubKeyDecorator(ak keeper.AccountKeeper, pkg PubKeyGetter) SetPubKeyDecorator
func (SetPubKeyDecorator) AnteHandle ¶ added in v0.14.0
type SigGasConsumeDecorator ¶ added in v0.14.0
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 ¶ added in v0.14.0
func NewSigGasConsumeDecorator(ak keeper.AccountKeeper, sigGasConsumer ante.SignatureVerificationGasConsumer, pkg PubKeyGetter) SigGasConsumeDecorator
func (SigGasConsumeDecorator) AnteHandle ¶ added in v0.14.0
type SigVerificationDecorator ¶ added in v0.14.0
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 ¶ added in v0.14.0
func NewSigVerificationDecorator(ak keeper.AccountKeeper, pkg PubKeyGetter) SigVerificationDecorator