Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDIDKey ¶
CreateDIDKey creates a new DID key from an existing public key, accepting a JSON representation of CreateDIDKeyRequest and returns a JSON representation of CreateDIDKeyResult which contains the DID of the newly created key as a string
func ExpandDIDKey ¶
ExpandDIDKey expands a DID key string and returns a JSON representation of the expanded key Returns a JSON representation of Document
func GenerateDIDKey ¶
GenerateDIDKey generates a new DID key and returns a JSON representation of GenerateDIDKeyResult
func GetSupportedKeyTypes ¶
func GetSupportedKeyTypes() []string
GetSupportedKeyTypes returns a list of supported key types as string values
Types ¶
type CreateDIDKeyRequest ¶
type CreateDIDKeyRequest struct { // KeyType is the type of key to be created, such as "Ed25519VerificationKey2018" KeyType string `json:"keyType"` // PublicKeyJWK is the JSON Web Key (public key) of the DID Key to be created PublicKeyJWK map[string]any `json:"publicKeyJwk"` }
CreateDIDKeyRequest is a struct that contains the key type and public key JWK of a DID key to be created
type CreateDIDKeyResult ¶
type CreateDIDKeyResult struct { // DID is the string of the DID Key created, such as did:key:z6Mk... DID string `json:"did"` }
CreateDIDKeyResult is a struct that contains the DID of a newly created DID key
type Document ¶
type Document struct { // DIDDocument is the JSON representation of the DID document of a DID key DIDDocument map[string]any `json:"didDocument"` }
Document is a struct that contains the DID document of a DID key
type GenerateDIDKeyResult ¶
type GenerateDIDKeyResult struct { // DID is the string of the DID Key created, such as did:key:z6Mk... DID string `json:"did"` // JWK is the JSON Web Key (private key) of the newly created DID Key JWK map[string]any `json:"jwk"` }
GenerateDIDKeyResult is a struct that contains the DID and JWK of a newly generated DID key It is returned as a result of the GenerateDIDKey function