entity

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDocument added in v0.1.0

func CreateDocument(id string, controller string, keyset *keyset.Keyset) (*doc.Document, error)

Types

type Entity

type Entity struct {
	DID    *did.DID
	Doc    *doc.Document
	Keyset *keyset.Keyset
}

So not only does it create a new DID, it also creates a new IPNS key, which you can use to publish your DID Document with.

func New

func New(id *did.DID, controller *did.DID) (*Entity, error)

func NewFromIPFSKey added in v0.0.6

func NewFromIPFSKey(ipfsKey *ipfs.Key) (*Entity, error)

func NewFromIPFSKeyWithController added in v0.0.6

func NewFromIPFSKeyWithController(ipfsKey *ipfs.Key, controller *did.DID) (*Entity, error)

func NewFromKeyset

func NewFromKeyset(keyset *keyset.Keyset) (*Entity, error)

func NewFromPackedKeyset

func NewFromPackedKeyset(data string) (*Entity, error)

func Unpack

func Unpack(data string) (*Entity, error)

func (*Entity) MarshalToCBOR

func (e *Entity) MarshalToCBOR() ([]byte, error)

func (*Entity) Pack

func (e *Entity) Pack() (string, error)

func (*Entity) PublishDocument added in v0.1.0

func (e *Entity) PublishDocument() error

Publish entity document. This needs to be done, when the keyset is new. Maybe we can check the assertionMethod and keyAgreement fields to see if the document is already published corretly.

func (*Entity) PublishDocumentGorutine added in v0.2.0

func (e *Entity) PublishDocumentGorutine(wg *sync.WaitGroup, cancel context.CancelFunc, opts *doc.PublishOptions)

func (*Entity) UnmarshalFromCBOR

func (e *Entity) UnmarshalFromCBOR(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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