sidetree-svc-go

module
v0.0.0-...-11c8459 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0

README

sidetree-svc-go

This library implements components of a service conforming to the Sidetree Protocol.

Below are the main components:

Batch Writer

The batch writer batches multiple document operations(create, update, delete, recover) in a single batch file. Batch files are stored in a distributed content-addressable storage (DCAS or CAS). A reference to the operation batch is then anchored on a blockchain as a Sidetree transaction.

Operation Processor

All document processing is deferred to resolution time. Resolution of the given ID to its document is done by iterating over all operations in blockchain-time order (starts with ‘create’). Each operation is checked for validity before applying a JSON patch to document.

Document Handler

The document handler performs document operation processing and document resolution. It supports both DID documents and generic documents.

Operation Processing

Upon successful validation against a configured validator, an operation will be added to the batch.

Resolution

Document resolution is based on ID or initial state values.

  • DID: The latest document is returned if found.

  • Long Form DID: Can be requested in the following format: did:METHOD::Base64url(JCS({suffix-data, delta}))

Contributing

Thank you for your interest in contributing. Please see our community contribution guidelines for more information.

License

Apache License, Version 2.0 (Apache-2.0). See the LICENSE file.

Directories

Path Synopsis
pkg
batch
Package batch batches multiple operations into batch files and stores the batch files in a distributed content-addressable storage (DCAS or CAS).
Package batch batches multiple operations into batch files and stores the batch files in a distributed content-addressable storage (DCAS or CAS).
dochandler
Package dochandler performs document operation processing and document resolution.
Package dochandler performs document operation processing and document resolution.
dochandler/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
log
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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