cli

package
v1.4.4-test.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 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

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

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

func GetMixedVerificationMethodList

func GetMixedVerificationMethodList(verificationRelationship []any) ([]*types.VerificationRelationship, 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

type DIDDocument struct {
	Context              []string             `json:"context"`
	ID                   string               `json:"id"`
	Controller           []string             `json:"controller,omitempty"`
	VerificationMethod   []VerificationMethod `json:"verificationMethod,omitempty"`
	Authentication       []any                `json:"authentication,omitempty"`
	AssertionMethod      []any                `json:"assertionMethod,omitempty"`
	CapabilityInvocation []any                `json:"capabilityInvocation,omitempty"`
	CapabilityDelegation []any                `json:"capabilityDelegation,omitempty"`
	KeyAgreement         []any                `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

type Service struct {
	ID              string   `json:"id"`
	Type            string   `json:"type"`
	ServiceEndpoint []string `json:"serviceEndpoint"`
	Accept          []string `json:"accept,omitempty"`
	RoutingKeys     []string `json:"routingKeys,omitempty"`
}

type SignInput

type SignInput struct {
	VerificationMethodID string
	PrivKey              ed25519.PrivateKey
}

func ReadPayloadWithSignInputsFromFile

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

type VerificationMethod

type VerificationMethod map[string]any

Jump to

Keyboard shortcuts

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