did

package
v2.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DIDContext is the general context
	DIDContext = "https://www.w3.org/ns/did/v1"
	// DIDPrefix is the prefix string
	DIDPrefix = "did:io:"
	// DIDAuthType is the authentication type
	DIDAuthType = "EcdsaSecp256k1VerificationKey2019"
	// DIDOwner is the suffix string
	DIDOwner = "#owner"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	Context        string           `json:"@context,omitempty"`
	ID             string           `json:"id,omitempty"`
	Authentication []authentication `json:"authentication,omitempty"`
}

Doc is the DID document struct

func CreateDID

func CreateDID(pk crypto.PublicKey) Doc

CreateDID creates a new DID using public key

Jump to

Keyboard shortcuts

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