Documentation ¶
Index ¶
- Constants
- func MarshalDIDDocument(d *didcore.Document) ([]byte, error)
- func MarshalService(dhtDNSkey string, s didcore.Service, msg *dnsmessage.Message) error
- func MarshalVerificationMethod(vm *didcore.VerificationMethod) (string, error)
- func UnmarshalDIDDocument(payload []byte) (*didcore.Document, error)
- func UnmarshalService(data string, s *didcore.Service) error
- func UnmarshalVerificationMethod(data string, did string, vm *didcore.VerificationMethod) error
Constants ¶
View Source
const ( // PurposeAuthentication is the DNS representation of the authentication purpose PurposeAuthentication = "auth" // PurposeAssertionMethod is the DNS representation of the assertion method purpose PurposeAssertionMethod = "asm" // PurposeCapabilityDeletion is the DNS representation of the capability delegation purpose PurposeCapabilityDeletion = "del" // PurposeCapabilityInvocation is the DNS representation of the capability invocation purpose PurposeCapabilityInvocation = "inv" // PurposeKeyAgreement is the DNS representation of the key agreement purpose PurposeKeyAgreement = "agm" // DNSLabelVerificationMethod is the DNS representation of the verification method property DNSLabelVerificationMethod = "vm" // DNSLabelService is the DNS representation of the service property DNSLabelService = "srv" // DNSLabelController is the DNS representation of the controller property DNSLabelController = "cnt" // DNSLabelAlsoKnownAs is the DNS representation of the AKA property DNSLabelAlsoKnownAs = "aka" )
Variables ¶
This section is empty.
Functions ¶
func MarshalDIDDocument ¶
MarshalDIDDocument packs a DID document into a TXT DNS resource records and adds to the DNS message Answers
func MarshalService ¶
MarshalService packs a service into a TXT DNS resource record and adds to the DNS message Answers
func MarshalVerificationMethod ¶
func MarshalVerificationMethod(vm *didcore.VerificationMethod) (string, error)
MarshalVerificationMethod packs a verification method into a TXT DNS resource record and adds to the DNS message Answers
func UnmarshalDIDDocument ¶
UnmarshalDIDDocument unpacks the TXT DNS resource records and returns a DID document
func UnmarshalService ¶
UnmarshalService unpacks the TXT DNS resource encoded service
func UnmarshalVerificationMethod ¶
func UnmarshalVerificationMethod(data string, did string, vm *didcore.VerificationMethod) error
UnmarshalVerificationMethod unpacks the TXT DNS resource encoded verification method
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.