Version: v0.0.8 Latest Latest

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

Go to latest
Published: Jun 3, 2020 License: GPL-3.0 Imports: 5 Imported by: 0




This section is empty.


View Source
var (
	ErrCalculatedIdenStateDoesntMatch = fmt.Errorf("Calculated IdenState doesn't match the one in PublicDataBlobs")


This section is empty.


type IdenPubOffChainReader

type IdenPubOffChainReader interface {
	GetPublicData(idenPubUrl string, id *core.ID, idenState *merkletree.Hash) (*PublicData, error)

IdenPubOffChainReader is a interface to read the off chain public state of an identity.

type IdenPubOffChainWriter

type IdenPubOffChainWriter interface {
	Publish(id *core.ID, publicData *PublicData) error
	Url() string

IdenPubOffChainWriter is a interface to write the off chain public state of an identity.

type PublicData

type PublicData struct {
	IdenState           *merkletree.Hash
	ClaimsTreeRoot      *merkletree.Hash
	RevocationsTreeRoot *merkletree.Hash
	RevocationsTree     *merkletree.MerkleTree
	RootsTreeRoot       *merkletree.Hash
	RootsTree           *merkletree.MerkleTree

PublicData contains the IdenState, ClaimsRoot, RootsTree and RevocationsTree

func NewPublicDataFromBlobs

func NewPublicDataFromBlobs(publicDataBlobs *PublicDataBlobs) (*PublicData, error)

NewPublicDataFromBlobs builds the revocation tree and the roots tree in memory storage. It also checks the validity of the tree roots against the identity state.

type PublicDataBlobs

type PublicDataBlobs struct {
	IdenState           merkletree.Hash
	ClaimsTreeRoot      merkletree.Hash
	RevocationsTreeRoot merkletree.Hash
	RevocationsTree     []byte
	RootsTreeRoot       merkletree.Hash
	RootsTree           []byte

PublicDataBlobs contains the RootsTree (blob) + Root, and the RevocationTree (blob) + Root


Path Synopsis

Jump to

Keyboard shortcuts

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