Documentation ¶
Overview ¶
Package didclient provides did commands.
Index ¶
Constants ¶
View Source
const ( // CommandName package command name. CommandName = "didclient" // CreateOrbDIDCommandMethod command method. CreateOrbDIDCommandMethod = "CreateOrbDID" // ResolveOrbDIDCommandMethod command method. ResolveOrbDIDCommandMethod = "ResolveOrbDID" // CreatePeerDIDCommandMethod command method. CreatePeerDIDCommandMethod = "CreatePeerDID" // BLS12381G2KeyType BLS12381G2 key type. BLS12381G2KeyType = "bls12381g2" )
View Source
const ( // InvalidRequestErrorCode is typically a code for validation errors. InvalidRequestErrorCode = command.Code(iota + command.DIDClient) // CreateDIDErrorCode is typically a code for create did errors. CreateDIDErrorCode // ResolveDIDErrorCode is typically a code for resolve did errors. ResolveDIDErrorCode )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for DID Exchange.
func New ¶
func New(domain, didAnchorOrigin, token string, unanchoredDIDMaxLifeTime int, p Provider) (*Command, error)
New returns new DID Exchange controller command instance.
func (*Command) CreateOrbDID ¶ added in v0.1.7
CreateOrbDID creates a new orb DID.
func (*Command) CreatePeerDID ¶
CreatePeerDID creates a new peer DID.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
type CreateOrbDIDRequest ¶ added in v0.1.7
type CreateOrbDIDRequest struct { ServiceID string `json:"serviceID,omitempty"` ServiceEndpoint string `json:"serviceEndpoint,omitempty"` DIDcommServiceType string `json:"didcommServiceType,omitempty"` PublicKeys []PublicKey `json:"publicKeys,omitempty"` RoutersKeyAgrIDS []string `json:"routerKAIDS,omitempty"` RouterConnections []string `json:"routerConnections,omitempty"` }
CreateOrbDIDRequest model
This is used for creating orb DID.
type CreatePeerDIDRequest ¶
type CreatePeerDIDRequest struct {
RouterConnectionID string `json:"routerConnectionID,omitempty"`
}
CreatePeerDIDRequest model
This is used for creating peer DID.
type Provider ¶
type Provider interface { VDRegistry() vdr.Registry Service(id string) (interface{}, error) KMS() kms.KeyManager }
Provider describes dependencies for the client.
type PublicKey ¶
type PublicKey struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Encoding string `json:"encoding,omitempty"` KeyType string `json:"keyType,omitempty"` Purposes []string `json:"purposes,omitempty"` Recovery bool `json:"recovery,omitempty"` Update bool `json:"update,omitempty"` Value string `json:"value,omitempty"` }
PublicKey public key.
type ResolveOrbDIDRequest ¶ added in v0.1.8
type ResolveOrbDIDRequest struct {
DID string `json:"did,omitempty"`
}
ResolveOrbDIDRequest model
This is used for resolving orb DID.
Click to show internal directories.
Click to hide internal directories.