cli

package
v1.2.0-develop.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagVersionID = "version-id"
)

Variables

This section is empty.

Functions

func AccAddrByKeyRef

func AccAddrByKeyRef(keyring keyring.Keyring, keyRef string) (sdk.AccAddress, error)

func AddTxFlagsToCmd added in v1.2.0

func AddTxFlagsToCmd(cmd *cobra.Command)

AddTxFlagsToCmd adds common flags to a module tx command.

func CmdCreateDidDoc

func CmdCreateDidDoc() *cobra.Command

func CmdDeactivateDidDoc

func CmdDeactivateDidDoc() *cobra.Command

func CmdGetAllDidDocVersionsMetadata

func CmdGetAllDidDocVersionsMetadata() *cobra.Command

func CmdGetDidDoc

func CmdGetDidDoc() *cobra.Command

func CmdGetDidDocVersion

func CmdGetDidDocVersion() *cobra.Command

func CmdUpdateDidDoc

func CmdUpdateDidDoc() *cobra.Command

func GetFromSpecCompliantPayload added in v1.2.0

func GetFromSpecCompliantPayload(specPayload DIDDocument) ([]*types.VerificationMethod, []*types.Service, error)

func GetQueryCmd

func GetQueryCmd() *cobra.Command

GetQueryCmd returns the cli query commands for this module

func GetTxCmd

func GetTxCmd() *cobra.Command

GetTxCmd returns the transaction commands for this module

func SetFeePayerFromSigner

func SetFeePayerFromSigner(ctx *client.Context) error

func SignWithSignInputs

func SignWithSignInputs(signBytes []byte, signInputs []SignInput) []*types.SignInfo

Types

type DIDDocument added in v1.2.0

type DIDDocument struct {
	Context              []string             `json:"context"`
	ID                   string               `json:"id"`
	Controller           []string             `json:"controller,omitempty"`
	VerificationMethod   []VerificationMethod `json:"verificationMethod,omitempty"`
	Authentication       []string             `json:"authentication,omitempty"`
	AssertionMethod      []string             `json:"assertionMethod,omitempty"`
	CapabilityInvocation []string             `json:"capabilityInvocation,omitempty"`
	CapabilityDelegation []string             `json:"capabilityDelegation,omitempty"`
	KeyAgreement         []string             `json:"keyAgreement,omitempty"`
	Service              []Service            `json:"service,omitempty"`
	AlsoKnownAs          []string             `json:"alsoKnownAs,omitempty"`
}

type PayloadWithSignInputs

type PayloadWithSignInputs struct {
	Payload    json.RawMessage
	SignInputs []SignInput
}

type Service added in v1.2.0

type Service struct {
	ID              string   `json:"id"`
	Type            string   `json:"type"`
	ServiceEndpoint []string `json:"serviceEndpoint"`
}

type SignInput

type SignInput struct {
	VerificationMethodID string
	PrivKey              ed25519.PrivateKey
}

func ReadPayloadWithSignInputsFromFile

func ReadPayloadWithSignInputsFromFile(filePath string) (json.RawMessage, []SignInput, error)

type VerificationMethod added in v1.2.0

type VerificationMethod map[string]any

Jump to

Keyboard shortcuts

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