Documentation ¶
Index ¶
Constants ¶
View Source
const ( // InitialKey the key reference assigned to the first key in a DidDoc InitialKey = "key-1" IssuerDIDMethod = "did:work:" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DIDDoc ¶
type DIDDoc struct { *UnsignedDIDDoc *proof.Proof `json:"proof"` }
DIDDoc a W3C compliant signed DID Document
func SignDIDDoc ¶
func SignDIDDoc(unsignedDoc UnsignedDIDDoc, privKey ed25519.PrivateKey, keyRef string) (*DIDDoc, error)
type KeyDef ¶
type KeyDef struct { ID string `json:"id"` Type string `json:"type"` Controller string `json:"controller,omitempty"` PublicKeyBase58 string `json:"publicKeyBase58"` }
KeyDef represents a DID public key
type ServiceDef ¶
type UnsignedDIDDoc ¶
type UnsignedDIDDoc struct { ID string `json:"id"` PublicKey []KeyDef `json:"publicKey"` Authentication []string `json:"authentication"` Service []ServiceDef `json:"service"` }
Click to show internal directories.
Click to hide internal directories.