writer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Providers

type Providers struct {
	AnchorGraph   anchorGraph
	DidAnchors    didAnchors
	AnchorBuilder anchorBuilder
	VCStore       vcStore
	VCStatusStore vcStatusStore
	OpProcessor   opProcessor
	Outbox        outbox
	Witness       witness
	Signer        signer
	MonitoringSvc monitoringSvc
	WitnessStore  witnessStore
	ActivityStore activityStore
	WFClient      webfingerClient
}

Providers contains all of the providers required by the client.

type Writer

type Writer struct {
	*Providers
	// contains filtered or unexported fields
}

Writer implements writing anchors.

func New

func New(namespace string, apServiceIRI, casURL *url.URL, providers *Providers,
	anchorPublisher anchorPublisher, pubSub pubSub,
	maxWitnessDelay time.Duration, signWithLocalWitness bool,
	documentLoader ld.DocumentLoader, resourceResolver *resourceresolver.Resolver,
	metrics metricsProvider) (*Writer, error)

New returns a new anchor writer.

func (*Writer) Read

func (c *Writer) Read(_ int) (bool, *txnapi.SidetreeTxn)

Read reads transactions since transaction time. TODO: This is not used and can be removed from interface if we change observer in sidetree-mock to point to core observer (can be done easily) Concern: Reference app has this interface.

func (*Writer) WriteAnchor

func (c *Writer) WriteAnchor(anchor string, attachments []*protocol.AnchorDocument, refs []*operation.Reference, version uint64) error

WriteAnchor writes Sidetree anchor string to Orb anchor.

Jump to

Keyboard shortcuts

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