Documentation ¶
Index ¶
- Constants
- type Generator
- func (g *Generator) CreateContentObject(payload *subject.Payload) (vocab.Document, error)
- func (g *Generator) CreatePayload(doc vocab.Document, coreIndexURI *url.URL, anchors []*url.URL) (*subject.Payload, error)
- func (g *Generator) ID() *url.URL
- func (g *Generator) Namespace() string
- func (g *Generator) ValidateAnchorCredential(vc *verifiable.Credential, originalContentBytes []byte) error
- func (g *Generator) Version() uint64
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 (*Generator) CreateContentObject ¶
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) ValidateAnchorCredential ¶
func (g *Generator) ValidateAnchorCredential(vc *verifiable.Credential, originalContentBytes []byte) error
ValidateAnchorCredential validates the anchor credential against the given content.
Click to show internal directories.
Click to hide internal directories.