didorbtestgenerator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ID specifies the ID of the generator.
	ID = "https://w3id.org/orb#v777"

	// Namespace specifies the namespace of the generator.
	Namespace = "did:orb"

	// Version specifies the version of the generator - corresponds to protocol genesis time.
	Version = uint64(testProtocolGenesisTime)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator generates a content object for did:orb anchor events.

func New

func New() *Generator

New returns a new generator.

func (*Generator) CreateContentObject

func (g *Generator) CreateContentObject(payload *subject.Payload) (vocab.Document, error)

CreateContentObject creates a content object from the given payload.

func (*Generator) CreatePayload

func (g *Generator) CreatePayload(doc vocab.Document, coreIndexURI *url.URL, anchors []*url.URL) (*subject.Payload, error)

CreatePayload creates a payload from the given anchor event.

func (*Generator) ID

func (g *Generator) ID() *url.URL

ID returns the ID of the generator.

func (*Generator) Namespace

func (g *Generator) Namespace() string

Namespace returns the Namespace for the DID method.

func (*Generator) ValidateAnchorCredential

func (g *Generator) ValidateAnchorCredential(vc *verifiable.Credential, originalContentBytes []byte) error

ValidateAnchorCredential validates the anchor credential against the given content.

func (*Generator) Version

func (g *Generator) Version() uint64

Version returns the Version of this generator.

Jump to

Keyboard shortcuts

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