entity

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEntityDocument

func CreateEntityDocument(id *did.DID, controller *did.DID, 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, forceUpdate bool) (*Entity, error)

func NewFromKey

func NewFromKey(ipfsKey *ipnskey.Key, controller *did.DID, forceUpdate bool) (*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) Publish

func (e *Entity) Publish(force bool) error

Publishes the entity's DIDDocument and IPNSKey to IPFS. If force is true, it will publish even if the IPNSKey is already published.

func (*Entity) PublishEntityDocument

func (e *Entity) PublishEntityDocument() error

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