operationparser

package
v1.0.2 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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser is an operation parser.

func New

func New(parser protocol.OperationParser) *Parser

New returns a new operation parser.

func (*Parser) GetCommitment

func (p *Parser) GetCommitment(opBytes []byte) (string, error)

GetCommitment returns next operation commitment.

func (*Parser) GetRevealValue

func (p *Parser) GetRevealValue(opBytes []byte) (string, error)

GetRevealValue returns this operation reveal value.

func (*Parser) Parse

func (p *Parser) Parse(namespace string, operationBuffer []byte) (*operation.Operation, error)

Parse parses and validates operation.

func (*Parser) ParseDID

func (p *Parser) ParseDID(namespace, shortOrLongFormDID string) (string, []byte, error)

ParseDID inspects resolution request and returns: - did and create request in case of long form resolution - just did in case of short form resolution (common scenario).

Directories

Path Synopsis
validators

Jump to

Keyboard shortcuts

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