bitxid

package module
v0.0.0-...-e0eaf0f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 4

README

BitXID

build codecov Go Report Card

BitXID is a DID framework which complys with W3C DID(Decentralized Identifiers) specifications. It has the following features:

  1. Multiple storage management: BitXID offers both on-chain storage and off-chain storage for DID storage. The best practice will be store small amounts of data(e.g. id, status, etc.) on-chain while store large amounts of data(e.g. public keys, authentication methods, etc.) off-chain(e.g. IPFS), and combines them by store hash of the data on-chain.
  2. Multiple methods management: not only can BitXID be used to build digital identity for a blockchain but also it can be to build digital identity ecosystem for a blockchain network(i.e. cross-chain platform).

Installation

Install bitxid package:

go get -u github.com/meshplus/bitxid

import it in your code:

import "github.com/meshplus/bitxid"

Example

BitXID is already used by several great projects, among which BitXHub is one of them. BitXHub DID has already registered on DIF Universal Resolver. You can find BitXHub DID Implementation here and the design of BitXHub DID in the latest BitXHub WhitePaper.

Usage

Usage guide documantation can be found in here.

Contact

Email: bitxhub@hyperchain.cn

Wechat: If you‘re interested in BitXID or BitXHub, please add the assistant to join our community group.

License

BitXID is under the APACHE LICENSE VERSION 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(s interface{}) ([]byte, error)

Marshal .

func MarshalAccountDoc

func MarshalAccountDoc(docStruct AccountDoc) ([]byte, error)

MarshalAccountDoc converts struct doc to byte doc

func MarshalChainDoc

func MarshalChainDoc(docStruct ChainDoc) ([]byte, error)

MarshalChainDoc converts struct doc to byte doc

func Unmarshal

func Unmarshal(b []byte, s interface{}) error

Unmarshal .

func WithAccountDocStorage

func WithAccountDocStorage(ds storage.Storage) func(*AccountDIDRegistry)

WithAccountDocStorage used for InternalDocDB mode

func WithAdmin

func WithAdmin(a DID) func(*ChainDIDRegistry)

WithAdmin used for admin setup

func WithChainDocStorage

func WithChainDocStorage(ds storage.Storage) func(*ChainDIDRegistry)

WithChainDocStorage used for InternalDocDB mode

func WithDIDAdmin

func WithDIDAdmin(a DID) func(*AccountDIDRegistry)

WithDIDAdmin used for admin setup

func WithGenesisAccountDocContent

func WithGenesisAccountDocContent(doc Doc) func(*AccountDIDRegistry)

WithGenesisAccountDoc used for genesis account doc setup

func WithGenesisAccountDocInfo

func WithGenesisAccountDocInfo(DocInfo DocInfo) func(*AccountDIDRegistry)

WithGenesisAccountDoc used for genesis account doc setup

func WithGenesisChainDocContent

func WithGenesisChainDocContent(doc Doc) func(*ChainDIDRegistry)

WithGenesisChainDoc used for genesis chain doc setup

func WithGenesisChainDocInfo

func WithGenesisChainDocInfo(docInfo DocInfo) func(*ChainDIDRegistry)

WithGenesisChainDoc used for genesis chain doc setup

Types

type AccountDIDManager

type AccountDIDManager interface {
	BasicManager
	GetChainDID() DID
	HasAccountDID(did DID) bool

	Register(did DID, addr string, hash []byte) (string, []byte, error)
	RegisterWithDoc(doc Doc) (string, []byte, error)
	Update(did DID, addr string, hash []byte) (string, []byte, error)
	UpdateWithDoc(doc Doc) (string, []byte, error)
	Freeze(did DID) error
	UnFreeze(did DID) error
	Delete(did DID) error
	Resolve(did DID) (*AccountItem, *AccountDoc, bool, error)
}

AccountDIDManager represents account did management registry

type AccountDIDRegistry

type AccountDIDRegistry struct {
	Mode                     RegistryMode  `json:"mode"`
	SelfChainDID             DID           `json:"method"` // method of the registry
	Admins                   []DID         `json:"admins"` // admins of the registry
	Table                    RegistryTable `json:"table"`
	Docdb                    DocDB         `json:"docdb"`
	GenesisAccountDID        DID           `json:"genesis_account_did"`
	GenesisAccountDocInfo    DocInfo       `json:"genesis_account_doc_info"`
	GenesisAccountDocContent Doc           `json:"genesis_account_doc_content"`
	// contains filtered or unexported fields
}

AccountDIDRegistry for DID Identifier, Every appchain should use this DID Registry module.

func NewAccountDIDRegistry

func NewAccountDIDRegistry(
	ts storage.Storage,
	l logrus.FieldLogger,
	options ...func(*AccountDIDRegistry)) (*AccountDIDRegistry, error)

NewAccountDIDRegistry news a AccountDIDRegistry

func (*AccountDIDRegistry) AddAdmin

func (r *AccountDIDRegistry) AddAdmin(caller DID) error

AddAdmin adds an admin for the registry

func (*AccountDIDRegistry) Delete

func (r *AccountDIDRegistry) Delete(did DID) error

Delete deletes data of an account did

func (*AccountDIDRegistry) Freeze

func (r *AccountDIDRegistry) Freeze(did DID) error

Freeze freezes an account did ATN: only admin should call this.

func (*AccountDIDRegistry) GetAdmins

func (r *AccountDIDRegistry) GetAdmins() []DID

GetAdmins gets admin list of the registry

func (*AccountDIDRegistry) GetChainDID

func (r *AccountDIDRegistry) GetChainDID() DID

GetChainDID get chain did of the registry

func (*AccountDIDRegistry) GetSelfID

func (r *AccountDIDRegistry) GetSelfID() DID

GetSelfID gets genesis did of the registry

func (*AccountDIDRegistry) HasAccountDID

func (r *AccountDIDRegistry) HasAccountDID(did DID) bool

HasAccountDID checks whether an account did exists

func (*AccountDIDRegistry) HasAdmin

func (r *AccountDIDRegistry) HasAdmin(caller DID) bool

HasAdmin checks whether caller is an admin of the registry

func (*AccountDIDRegistry) Register

func (r *AccountDIDRegistry) Register(accountDID DID, addr string, hash []byte) (string, []byte, error)

Register ties did name to a did doc ATN: only did who owns did-name should call this

func (*AccountDIDRegistry) RegisterWithDoc

func (r *AccountDIDRegistry) RegisterWithDoc(doc Doc) (string, []byte, error)

RegisterWithDoc registers with doc

func (*AccountDIDRegistry) RemoveAdmin

func (r *AccountDIDRegistry) RemoveAdmin(caller DID) error

RemoveAdmin removes an admin for the registry

func (*AccountDIDRegistry) Resolve

func (r *AccountDIDRegistry) Resolve(did DID) (*AccountItem, *AccountDoc, bool, error)

Resolve looks up local-chain to resolve did. @*AccountDoc returns nil if mode is ExternalDocDB

func (*AccountDIDRegistry) SetupGenesis

func (r *AccountDIDRegistry) SetupGenesis() error

SetupGenesis set up genesis to boot the whole did registry

func (*AccountDIDRegistry) UnFreeze

func (r *AccountDIDRegistry) UnFreeze(did DID) error

UnFreeze unfreezes an account did ATN: only admin should call this.

func (*AccountDIDRegistry) Update

func (r *AccountDIDRegistry) Update(accountDID DID, addr string, hash []byte) (string, []byte, error)

Update updates data of an account did ATN: only caller who owns did should call this

func (*AccountDIDRegistry) UpdateWithDoc

func (r *AccountDIDRegistry) UpdateWithDoc(doc Doc) (string, []byte, error)

UpdateWithDoc updates with doc

type AccountDoc

type AccountDoc struct {
	BasicDoc
	Service string `json:"service"`
}

AccountDoc represents account identity information

func UnmarshalAccountDoc

func UnmarshalAccountDoc(docBytes []byte) (AccountDoc, error)

UnmarshalAccountDoc converts byte doc to struct doc

func (*AccountDoc) GetID

func (dd *AccountDoc) GetID() DID

GetID gets id of account doc

func (*AccountDoc) GetType

func (dd *AccountDoc) GetType() int

GetType gets type of account doc

func (*AccountDoc) IsValidFormat

func (dd *AccountDoc) IsValidFormat() bool

IsValidFormat checks whether account doc is valid format

func (*AccountDoc) Marshal

func (dd *AccountDoc) Marshal() ([]byte, error)

Marshal marshals account doc

func (*AccountDoc) Unmarshal

func (dd *AccountDoc) Unmarshal(docBytes []byte) error

Unmarshal unmarshals account doc

type AccountItem

type AccountItem struct {
	BasicItem
}

AccountItem reperesentis a did item, element of registry table. Registry table is used together with docdb.

func (*AccountItem) GetID

func (di *AccountItem) GetID() DID

GetID gets id of account item

func (*AccountItem) Marshal

func (di *AccountItem) Marshal() ([]byte, error)

Marshal marshals account item

func (*AccountItem) Unmarshal

func (di *AccountItem) Unmarshal(docBytes []byte) error

Unmarshal unmarshals account item

type Auth

type Auth struct {
	PublicKey []string `json:"publicKey"` // ID of PublicKey
	Strategy  string   `json:"strategy"`  // strategy of publicKey combination
}

Auth represents authentication information

type BasicDoc

type BasicDoc struct {
	ID             DID      `json:"id"`
	Type           int      `json:"type"`
	Created        uint64   `json:"created"`
	Updated        uint64   `json:"updated"`
	Controller     DID      `json:"controller"`
	PublicKey      []PubKey `json:"publicKey"`
	Authentication []Auth   `json:"authentication"`
}

BasicDoc is the fundamental part of doc structure

type BasicItem

type BasicItem struct {
	ID      DID
	DocAddr string     // addr where the doc file stored
	DocHash []byte     // hash of the doc file
	Status  StatusType // status of the item
}

BasicItem is the fundamental part of item structure

type BasicManager

type BasicManager interface {
	SetupGenesis() error
	GetSelfID() DID
	GetAdmins() []DID
	AddAdmin(caller DID) error
	RemoveAdmin(caller DID) error
	HasAdmin(caller DID) bool
}

BasicManager represents basic did management that should be used by other type of did management registry.

type ChainDIDManager

type ChainDIDManager interface {
	BasicManager
	HasChainDID(chainDID DID) bool

	Apply(caller DID, chainDID DID) error
	AuditApply(chainDID DID, result bool) error
	Audit(chainDID DID, status StatusType) error
	Register(chainDID DID, addr string, hash []byte) (string, []byte, error)
	RegisterWithDoc(doc Doc) (string, []byte, error)
	Update(chainDID DID, addr string, hash []byte) (string, []byte, error)
	UpdateWithDoc(doc Doc) (string, []byte, error)
	Freeze(chainDID DID) error
	UnFreeze(chainDID DID) error
	Resolve(chainDID DID) (*ChainItem, *ChainDoc, bool, error)
	Delete(chainDID DID) error
}

ChainDIDManager represents chain did management registry

type ChainDIDRegistry

type ChainDIDRegistry struct {
	Mode                   RegistryMode  `json:"mode"`
	IsRoot                 bool          `json:"is_root"`
	Admins                 []DID         `json:"admins"`
	Table                  RegistryTable `json:"table"`
	Docdb                  DocDB         `json:"docdb"`
	GenesisChainDID        DID           `json:"genesis_chain_did"`
	GenesisChainDocInfo    DocInfo       `json:"genesis_chain_doc_info"`
	GenesisChainDocContent Doc           `json:"genesis_chain_doc_content"`
	// contains filtered or unexported fields
}

ChainDIDRegistry .

func NewChainDIDRegistry

func NewChainDIDRegistry(
	ts storage.Storage,
	l logrus.FieldLogger,
	options ...func(*ChainDIDRegistry)) (*ChainDIDRegistry, error)

NewChainDIDRegistry news a ChainDIDRegistry

func (*ChainDIDRegistry) AddAdmin

func (r *ChainDIDRegistry) AddAdmin(caller DID) error

AddAdmin adds an admin for the registry

func (*ChainDIDRegistry) Apply

func (r *ChainDIDRegistry) Apply(caller DID, chainDID DID) error

Apply apply for rights of a new methd-name

func (*ChainDIDRegistry) Audit

func (r *ChainDIDRegistry) Audit(chainDID DID, status StatusType) error

Audit audits status of a chain did ATN: only admin should call this.

func (*ChainDIDRegistry) AuditApply

func (r *ChainDIDRegistry) AuditApply(chainDID DID, result bool) error

AuditApply audits status of a chain did application ATNS: only admin should call this.

func (*ChainDIDRegistry) Delete

func (r *ChainDIDRegistry) Delete(chainDID DID) error

Delete deletes data of a chain did

func (*ChainDIDRegistry) Freeze

func (r *ChainDIDRegistry) Freeze(chainDID DID) error

Freeze freezes a chain did ATN: only admdin should call this.

func (*ChainDIDRegistry) GetAdmins

func (r *ChainDIDRegistry) GetAdmins() []DID

GetAdmins gets admin list of the registry

func (*ChainDIDRegistry) GetSelfID

func (r *ChainDIDRegistry) GetSelfID() DID

GetSelfID gets genesis did of the registry

func (*ChainDIDRegistry) HasAdmin

func (r *ChainDIDRegistry) HasAdmin(caller DID) bool

HasAdmin checks whether caller is an admin of the registry

func (*ChainDIDRegistry) HasChainDID

func (r *ChainDIDRegistry) HasChainDID(chainDID DID) bool

HasChainDID checks whether a chain did exists

func (*ChainDIDRegistry) Register

func (r *ChainDIDRegistry) Register(chainDID DID, addr string, hash []byte) (string, []byte, error)

Register ties chain did to a chain doc ATN: only did who owns method-name should call this

func (*ChainDIDRegistry) RegisterWithDoc

func (r *ChainDIDRegistry) RegisterWithDoc(doc Doc) (string, []byte, error)

RegisterWithDoc registers with doc

func (*ChainDIDRegistry) RemoveAdmin

func (r *ChainDIDRegistry) RemoveAdmin(caller DID) error

RemoveAdmin removes an admin for the registry

func (*ChainDIDRegistry) Resolve

func (r *ChainDIDRegistry) Resolve(chainDID DID) (*ChainItem, *ChainDoc, bool, error)

Resolve looks up local-chain to resolve chain did. @*ChainDoc returns nil if mode is ExternalDocDB

func (*ChainDIDRegistry) SetupGenesis

func (r *ChainDIDRegistry) SetupGenesis() error

SetupGenesis set up genesis to boot the whole methed system

func (*ChainDIDRegistry) Synchronize

func (r *ChainDIDRegistry) Synchronize(item TableItem) error

Synchronize synchronizes table data between different registrys

func (*ChainDIDRegistry) UnFreeze

func (r *ChainDIDRegistry) UnFreeze(chainDID DID) error

UnFreeze unfreezes a chain did ATN: only admdin should call this.

func (*ChainDIDRegistry) Update

func (r *ChainDIDRegistry) Update(chainDID DID, addr string, hash []byte) (string, []byte, error)

Update updates data about a chain did ATN: only did who owns method-name should call this.

func (*ChainDIDRegistry) UpdateWithDoc

func (r *ChainDIDRegistry) UpdateWithDoc(doc Doc) (string, []byte, error)

UpdateWithDoc updates with doc

type ChainDoc

type ChainDoc struct {
	BasicDoc
	Extra []byte `json:"extra"` // for further usage
}

ChainDoc represents chain identity information

func UnmarshalChainDoc

func UnmarshalChainDoc(docBytes []byte) (ChainDoc, error)

UnmarshalChainDoc converts byte doc to struct doc

func (*ChainDoc) GetID

func (cd *ChainDoc) GetID() DID

GetID gets id of chain doc

func (*ChainDoc) GetType

func (cd *ChainDoc) GetType() int

GetType gets type of chain doc

func (*ChainDoc) IsValidFormat

func (cd *ChainDoc) IsValidFormat() bool

IsValidFormat checks whether chain doc is valid format

func (*ChainDoc) Marshal

func (cd *ChainDoc) Marshal() ([]byte, error)

Marshal marshals chain doc

func (*ChainDoc) Unmarshal

func (cd *ChainDoc) Unmarshal(docBytes []byte) error

Unmarshal unmarshals chain doc

type ChainItem

type ChainItem struct {
	BasicItem
	Owner DID // owner of the chain did, is a did, TODO: owner ==> owners
}

ChainItem reperesents a chain did item, element of registry table, it stores all data about a did. Registry table is used together with docdb.

func (*ChainItem) GetID

func (mi *ChainItem) GetID() DID

GetID gets id of chain item

func (*ChainItem) Marshal

func (mi *ChainItem) Marshal() ([]byte, error)

Marshal marshals chain item

func (*ChainItem) Unmarshal

func (mi *ChainItem) Unmarshal(docBytes []byte) error

Unmarshal unmarshals chain item

type ClaimTyp

type ClaimTyp struct {
	ID      string      `json:"id"` // the universal id of claim type
	Content []*FieldTyp `json:"content"`
}

ClaimTyp represents claim type

func (*ClaimTyp) Marshal

func (c *ClaimTyp) Marshal() ([]byte, error)

Marshal marshals claimTyp

func (*ClaimTyp) Unmarshal

func (c *ClaimTyp) Unmarshal(docBytes []byte) error

Unmarshal unmarshals claimTyp

type Credential

type Credential struct {
	ID         string `json:"id"`
	Typ        string `json:"typ"`
	Issuer     DID    `json:"issuer"`
	Issued     uint64 `json:"issued"`
	Expiration uint64 `json:"expiration"`
	Claim      string `json:"claim"` // jsonSchema string
	Signature  Sig    `json:"signature"`
}

Credential represents verifiable credential

func (*Credential) Marshal

func (c *Credential) Marshal() ([]byte, error)

Marshal marshals credential

func (*Credential) Unmarshal

func (c *Credential) Unmarshal(docBytes []byte) error

Unmarshal unmarshals credential

type DID

type DID string

DID represents decentrilzed identifier and method names example identifier: did:bitxhub:appchain001 example method name:

func (DID) GetAddress

func (did DID) GetAddress() string

GetAddress get address from did-format string

func (DID) GetChainDID

func (did DID) GetChainDID() DID

GetChainDID gets chain did of a did

func (DID) GetRootMethod

func (did DID) GetRootMethod() string

GetRootMethod get root method from did-format string

func (DID) GetSubMethod

func (did DID) GetSubMethod() string

GetSubMethod get sub method from did-format string

func (DID) GetType

func (did DID) GetType() int

GetType gets type of a did

func (DID) IsValidFormat

func (did DID) IsValidFormat() bool

IsValidFormat checks whether did is valid format

type DIDType

type DIDType int

DIDType .

const (
	ChainDIDType DIDType = iota
	AccountDIDType
)

type of did

type Doc

type Doc interface {
	Marshal() ([]byte, error)
	Unmarshal(docBytes []byte) error
	GetID() DID
	IsValidFormat() bool
	GetType() int
}

Doc represents did doc

type DocDB

type DocDB interface {
	Create(doc Doc) (string, error)
	Update(doc Doc) (string, error)
	Get(did DID, typ DIDType) (Doc, error)
	Delete(did DID)
	Has(did DID) bool
	Close() error
}

DocDB represents did Doc db (used under InternalDocDB mode)

type DocInfo

type DocInfo struct {
	ID   DID
	Addr string
	Hash []byte
}

DocInfo represent info about a doc

type FieldTyp

type FieldTyp struct {
	Field string `json:"field"` // field name
	Typ   string `json:"typ"`   // field type e.g. int, float, string
}

FieldTyp represents field type

type KVDocDB

type KVDocDB struct {
	BasicAddr string          `json:"basic_addr"`
	Store     storage.Storage `json:"store"`
}

KVDocDB .

func NewKVDocDB

func NewKVDocDB(s storage.Storage) (*KVDocDB, error)

NewKVDocDB .

func (*KVDocDB) Close

func (d *KVDocDB) Close() error

Close .

func (*KVDocDB) Create

func (d *KVDocDB) Create(doc Doc) (string, error)

Create .

func (*KVDocDB) Delete

func (d *KVDocDB) Delete(did DID)

Delete .

func (*KVDocDB) Get

func (d *KVDocDB) Get(did DID, typ DIDType) (Doc, error)

Get .

func (*KVDocDB) Has

func (d *KVDocDB) Has(did DID) bool

Has whether db has the item(by key)

func (*KVDocDB) Update

func (d *KVDocDB) Update(doc Doc) (string, error)

Update .

type KVTable

type KVTable struct {
	Store storage.Storage `json:"store"`
}

KVTable .

func NewKVTable

func NewKVTable(s storage.Storage) (*KVTable, error)

NewKVTable .

func (*KVTable) Close

func (r *KVTable) Close() error

Close .

func (*KVTable) CreateItem

func (r *KVTable) CreateItem(item TableItem) error

CreateItem checks and sets

func (*KVTable) DeleteItem

func (r *KVTable) DeleteItem(did DID)

DeleteItem without any checks

func (*KVTable) GetItem

func (r *KVTable) GetItem(did DID, typ DIDType) (TableItem, error)

GetItem checks ang gets

func (*KVTable) HasItem

func (r *KVTable) HasItem(did DID) bool

HasItem whether table has the item(by key)

func (*KVTable) UpdateItem

func (r *KVTable) UpdateItem(item TableItem) error

UpdateItem checks and sets

type KeyType

type KeyType int

KeyType .

const (
	AES KeyType = iota
	ThirdDES
	RSA
	Secp256k1
	ECDSAP256
	ECDSAP384
	ECDSAP521
	Ed25519
)

value of keytype

type PubKey

type PubKey struct {
	ID           string `json:"id"`
	Type         string `json:"type"`
	PublicKeyPem string `json:"publicKeyPem"`
}

PubKey represents publick key

type RegistryMode

type RegistryMode int

RegistryMode .

const (
	ExternalDocDB RegistryMode = iota
	InternalDocDB
)

type of RegistryMode: @ExternalDocDB: Doc store won't be mastered by Registry @InternalDocDB: Doc store will be mastered by Registry

type RegistryTable

type RegistryTable interface {
	CreateItem(item TableItem) error
	UpdateItem(item TableItem) error
	GetItem(did DID, typ DIDType) (TableItem, error)
	HasItem(did DID) bool
	DeleteItem(did DID)
	Close() error
}

RegistryTable represents state table of a registry

type Sig

type Sig struct {
	Typ     string `json:"typ"`
	Content string `json:"content"`
}

Sig represents signature data

type StatusType

type StatusType string

StatusType .

const (
	BadStatus      StatusType = "BadStatus"
	Initial        StatusType = "Initial"
	ApplyAudit     StatusType = "ApplyAudit"
	ApplyFailed    StatusType = "ApplyFailed"
	ApplySuccess   StatusType = "ApplySuccess"
	RegisterAudit  StatusType = "RegisterAudit"
	RegisterFailed StatusType = "RegisterFailed"
	UpdateAudit    StatusType = "UpdateAudit"
	UpdateFailed   StatusType = "UpdateFailed"
	Frozen         StatusType = "Frozen"
	Normal         StatusType = "Normal"
)

the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen

type TableItem

type TableItem interface {
	Marshal() ([]byte, error)
	Unmarshal(itemBytes []byte) error
	GetID() DID
}

TableItem represents the table item of a registry table

type VCManager

type VCManager interface {
	CreateClaimTyp(ct *ClaimTyp) (string, error)
	GetClaimTyp(ctid string) (*ClaimTyp, error)
	DeleteClaimtyp(ctid string)
	GetAllClaimTyps() ([]*ClaimTyp, error)

	StoreVC(c *Credential) (string, error)
	GetVC(cid string) (*Credential, error)
	DeleteVC(cid string)
}

VCManager interface for verifiable credential management registry

type VCRegistry

type VCRegistry struct {
	Store  storage.Storage `json:"store"`
	CTlist []string        `json:"ct_list"`
}

VCRegistry represents verifiable credential management registry

func NewVCRegistry

func NewVCRegistry(s storage.Storage) (*VCRegistry, error)

NewVCRegistry news a NewVCRegistry

func (*VCRegistry) CreateClaimTyp

func (vcr *VCRegistry) CreateClaimTyp(ct *ClaimTyp) (string, error)

CreateClaimTyp creates new claim type

func (*VCRegistry) DeleteClaimtyp

func (vcr *VCRegistry) DeleteClaimtyp(ctid string)

DeleteClaimtyp deletes a claim type

func (*VCRegistry) DeleteVC

func (vcr *VCRegistry) DeleteVC(cid string)

DeleteVC deletes a vc

func (*VCRegistry) GetAllClaimTyps

func (vcr *VCRegistry) GetAllClaimTyps() ([]*ClaimTyp, error)

GetAllClaimTyps gets all claim types

func (*VCRegistry) GetClaimTyp

func (vcr *VCRegistry) GetClaimTyp(ctid string) (*ClaimTyp, error)

GetClaimTyp gets a claim type

func (*VCRegistry) GetVC

func (vcr *VCRegistry) GetVC(cid string) (*Credential, error)

GetVC gets a vc

func (*VCRegistry) StoreVC

func (vcr *VCRegistry) StoreVC(c *Credential) (string, error)

StoreVC stores a vc

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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