writer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

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
	AnchorLinkStore        anchorStore
	AnchorEventStatusStore statusStore
	OpProcessor            opProcessor
	Outbox                 outbox
	ProofHandler           proofHandler
	Witness                witness
	Signer                 signer
	MonitoringSvc          monitoringSvc
	WitnessStore           witnessStore
	WitnessPolicy          witnessPolicy
	ActivityStore          activityStore
	WFClient               webfingerClient
	DocumentLoader         ld.DocumentLoader
	VCStore                storage.Store
	GeneratorRegistry      generatorRegistry
	AnchorLinkBuilder      anchorLinkBuilder
}

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, apServiceEndpointURL, casURL *url.URL, dataURIMediaType vocab.MediaType,
	providers *Providers, anchorPublisher anchorPublisher, pubSub pubSub,
	maxWitnessDelay time.Duration, signWithLocalWitness bool,
	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.

Directories

Path Synopsis
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