Documentation
¶
Overview ¶
Package vdr is a generated GoMock package.
Package vdr contains a verifiable data registry to the w3c specification and provides primitives for storing and working with Nuts DID based identities. It provides an easy to work with web api and a command line interface. It provides underlying storage back ends to store, update and search for Nuts identities.
Index ¶
- Variables
- func CreateDocumentValidator() did.Validator
- func TestMethodDIDAPrivateKey() crypto.TestKey
- func TestMethodDIDBPrivateKey() crypto.TestKey
- type Ambassador
- type Config
- type VDR
- func (r *VDR) Config() interface{}
- func (r *VDR) Configure(_ core.ServerConfig) error
- func (r *VDR) ConflictedDocuments() ([]did.Document, []types.DocumentMetadata, error)
- func (r VDR) Create(options types.DIDCreationOptions) (*did.Document, crypto.Key, error)
- func (r *VDR) Diagnostics() []core.DiagnosticResult
- func (r *VDR) Name() string
- func (r VDR) Update(id did.DID, current hash.SHA256Hash, next did.Document, ...) error
Constants ¶
This section is empty.
Variables ¶
var ErrThumbprintMismatch = errors.New("thumbprint of signing key does not match DID")
ErrThumbprintMismatch is returned when a transaction publishing a new DID is signed with a different key than the DID is generated from
var TestDIDA, _ = did.ParseDID("did:nuts:GvkzxsezHvEc8nGhgz6Xo3jbqkHwswLmWw3CYtCm7hAW")
Two TestDIDs which can be used during testing: TestDIDA is a testDID
var TestDIDB, _ = did.ParseDID("did:nuts:B8PUHs2AUHbFF1xLLK4eZjgErEcMXHxs68FteY7NDtCY")
TestDIDB is a testDID
var TestMethodDIDA, _ = did.ParseDIDURL(TestDIDA.String() + "#abc-method-1")
TestMethodDIDA is a test method DID for the TestDIDA
var TestMethodDIDB, _ = did.ParseDIDURL(TestDIDB.String() + "#abc-method-2")
TestMethodDIDB is a test method DID for the TestDIDB
Functions ¶
func CreateDocumentValidator ¶
CreateDocumentValidator creates a DID Document validator that checks for inconsistencies in the the DID Document: - validate it according to the W3C DID Core Data Model specification - validate is according to the Nuts DID Method specification:
- it checks validationMethods for the following conditions:
- every validationMethod id must have a fragment
- every validationMethod id should have the DID prefix
- every validationMethod id must be unique
- it checks services for the following conditions:
- every service id must have a fragment
- every service id should have the DID prefix
- every service id must be unique
func TestMethodDIDAPrivateKey ¶
TestMethodDIDAPrivateKey returns the key for TestMethodDIDA
func TestMethodDIDBPrivateKey ¶
TestMethodDIDBPrivateKey returns the key for TestMethodDIDB
Types ¶
type Ambassador ¶
type Ambassador interface {
// Configure instructs the ambassador to start receiving DID Documents from the network.
Configure()
}
Ambassador acts as integration point between VDR and network by sending DID Documents network and process DID Documents received through the network.
func NewAmbassador ¶
func NewAmbassador(networkClient network.Transactions, didStore types.Store) Ambassador
NewAmbassador creates a new Ambassador,
type Config ¶
type Config struct{}
Config holds the config for the VDR engine
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a fresh Config filled with default values
func TestVDRConfig ¶
func TestVDRConfig() Config
type VDR ¶
type VDR struct {
OnChange func(registry *VDR)
// contains filtered or unexported fields
}
VDR stands for the Nuts Verifiable Data Registry. It is the public entrypoint to work with W3C DID documents. It connects the Resolve, Create and Update DID methods to the network, and receives events back from the network which are processed in the store. It is also a Runnable, Diagnosable and Configurable Nuts Engine.
func NewTestVDRInstance ¶
func NewVDR ¶
func NewVDR(config Config, cryptoClient crypto.KeyStore, networkClient network.Transactions, store types.Store) *VDR
NewVDR creates a new VDR with provided params
func (*VDR) Configure ¶
func (r *VDR) Configure(_ core.ServerConfig) error
Configure configures the VDR engine.
func (*VDR) ConflictedDocuments ¶
func (*VDR) Diagnostics ¶
func (r *VDR) Diagnostics() []core.DiagnosticResult
Diagnostics returns the diagnostics for this engine
Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
v1
Package v1 provides primitives to interact with the openapi HTTP API.
|
Package v1 provides primitives to interact with the openapi HTTP API. |
|
Package doc contains DID Document related functionality that only matters to the current node.
|
Package doc contains DID Document related functionality that only matters to the current node. |
|
Package types is a generated GoMock package.
|
Package types is a generated GoMock package. |