types

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const IxoNativeToken = "uixo"

Variables

View Source
var (
	IxoDecimals = sdk.NewDec(100000000)
)
View Source
var ModuleCdc *codec.Codec

module wide codec

Functions

func ApproximateFeeForTx

func ApproximateFeeForTx(cliCtx context.CLIContext, tx auth.StdTx, chainId string) (auth.StdFee, error)

func BuildAndSign added in v0.12.1

func BuildAndSign(txBldr auth.TxBuilder, ctx context.CLIContext,
	msgs []sdk.Msg, ixoDid exported.IxoDid) ([]byte, error)

func CompleteAndBroadcastTxCLI

func CompleteAndBroadcastTxCLI(txBldr auth.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, ixoDid exported.IxoDid) error

func GenerateOrBroadcastMsgs

func GenerateOrBroadcastMsgs(cliCtx context.CLIContext, msg sdk.Msg, ixoDid exported.IxoDid) error

func IxoSigVerificationGasConsumer added in v0.12.2

func IxoSigVerificationGasConsumer(
	meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params auth.Params,
) sdk.Result

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, sk supply.Keeper, pubKeyGetter PubKeyGetter) sdk.AnteHandler

func ProcessSig

func ProcessSig(
	ctx sdk.Context, acc auth.Account, sig auth.StdSignature, signBytes []byte, simulate bool, params auth.Params,
) (updatedAcc auth.Account, res sdk.Result)

func RegisterCodec added in v0.12.1

func RegisterCodec(cdc *codec.Codec)

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 DidKeeper

type DidKeeper interface {
	GetDidDoc(ctx sdk.Context, did exported.Did) (exported.DidDoc, sdk.Error)
	SetDidDoc(ctx sdk.Context, did exported.DidDoc) (err sdk.Error)
	AddDidDoc(ctx sdk.Context, did exported.DidDoc)
	AddCredentials(ctx sdk.Context, did exported.Did, credential exported.DidCredential) (err sdk.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 IxoMsg

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

type PubKeyGetter

type PubKeyGetter func(ctx sdk.Context, msg IxoMsg) (crypto.PubKey, sdk.Result)

func NewDefaultPubKeyGetter

func NewDefaultPubKeyGetter(didKeeper DidKeeper) PubKeyGetter

Jump to

Keyboard shortcuts

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