Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DIDPrefix is the prefix string DIDPrefix = "did:io:" // DIDAuthType is the authentication type DIDAuthType = "EcdsaSecp256k1VerificationKey2019" // DIDOwner is the suffix string DIDOwner = "#owner" // KnownDIDContext known context for did KnownDIDContext = "https://www.w3.org/ns/did/v1" // Secp256k1DIDContext secp256k1 context for did Secp256k1DIDContext = "https://w3id.org/security/suites/secp256k1-2019/v1" )
Variables ¶
View Source
var DIDCmd = &cobra.Command{ Use: "did", Short: config.TranslateInLang(DIDCmdShorts, config.UILanguage), }
DIDCmd represents the DID command
View Source
var ( DIDCmdShorts = map[config.Language]string{ config.English: "DID command", config.Chinese: "DID command", } )
Multi-language support
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶ added in v1.11.0
CreateRequest create DID request
type Doc ¶
type Doc struct { Context interface{} `json:"@context,omitempty"` ID string `json:"id,omitempty"` Controller string `json:"controller,omitempty"` VerificationMethod []verificationMethod `json:"verificationMethod,omitempty"` Authentication []verificationMethodSet `json:"authentication,omitempty"` AssertionMethod []verificationMethodSet `json:"assertionMethod,omitempty"` Service []serviceStruct `json:"service,omitempty"` }
Doc is the DID document struct
func (*Doc) AddService ¶ added in v1.11.0
AddService add service to did document
func (*Doc) RemoveService ¶ added in v1.11.0
RemoveService remove service from did document
type Permit ¶ added in v1.11.0
type Permit struct { Separator string `json:"DOMAIN_SEPARATOR"` PermitHash string `json:"permitHash"` }
Permit permit content for DID
type ServiceAddRequest ¶ added in v1.11.0
type ServiceAddRequest struct { Signature Tag string `json:"tag"` Type string `json:"type"` ServiceEndpoint string `json:"serviceEndpoint"` }
ServiceAddRequest add service to DID request
type ServiceRemoveRequest ¶ added in v1.11.0
ServiceRemoveRequest remove service from DID request
Click to show internal directories.
Click to hide internal directories.