doc

package
v1.0.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 14

Documentation

Overview

Package doc implements sidetree document

Index

Constants

View Source
const (

	// KeyPurposeAuthentication defines key purpose as authentication key.
	KeyPurposeAuthentication = "authentication"
	// KeyPurposeAssertionMethod defines key purpose as assertion key.
	KeyPurposeAssertionMethod = "assertionMethod"
	// KeyPurposeKeyAgreement defines key purpose as agreement key.
	KeyPurposeKeyAgreement = "keyAgreement"
	// KeyPurposeCapabilityDelegation defines key purpose as delegation key.
	KeyPurposeCapabilityDelegation = "capabilityDelegation"
	// KeyPurposeCapabilityInvocation defines key purpose as invocation key.
	KeyPurposeCapabilityInvocation = "capabilityInvocation"

	// JWSVerificationKey2020 defines key type signature.
	JWSVerificationKey2020 = "JwsVerificationKey2020"

	// JWK2020Type defines key type for JWK public keys.
	JWK2020Type = "JsonWebKey2020"

	// Ed25519VerificationKey2018 define key type signature.
	Ed25519VerificationKey2018 = "Ed25519VerificationKey2018"
)

Variables

This section is empty.

Functions

func PopulateRawAlsoKnownAs

func PopulateRawAlsoKnownAs(alsoKnownAs []string) []interface{}

PopulateRawAlsoKnownAs populates raw also known as.

func PopulateRawPublicKeys

func PopulateRawPublicKeys(pks []PublicKey) ([]map[string]interface{}, error)

PopulateRawPublicKeys populate raw public keys.

func PopulateRawServices

func PopulateRawServices(services []docdid.Service) ([]map[string]interface{}, error)

PopulateRawServices populate raw services.

Types

type Doc

type Doc struct {
	PublicKey   []PublicKey
	Service     []docdid.Service
	AlsoKnownAs []string
}

Doc DID Document definition.

func (*Doc) JSONBytes

func (doc *Doc) JSONBytes() ([]byte, error)

JSONBytes converts document to json bytes.

type PublicKey

type PublicKey struct {
	ID       string
	Type     string
	Purposes []string
	JWK      jwk.JWK
	B58Key   string
}

PublicKey struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL