modulepackage
0.0.0-20210412025850-e0eaf0f9063a
Repository: https://github.com/meshplus/bitxid.git
Documentation: pkg.go.dev
# README
BitXID
BitXID is a DID framework which complys with W3C DID(Decentralized Identifiers) specifications. It has the following features:
- 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.
- 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: [email protected]
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.
# Packages
No description provided by the author
# Functions
Marshal .
MarshalAccountDoc converts struct doc to byte doc.
MarshalChainDoc converts struct doc to byte doc.
NewAccountDIDRegistry news a AccountDIDRegistry.
NewChainDIDRegistry news a ChainDIDRegistry.
NewKVDocDB .
NewKVTable .
NewVCRegistry news a NewVCRegistry.
Unmarshal .
UnmarshalAccountDoc converts byte doc to struct doc.
UnmarshalChainDoc converts byte doc to struct doc.
WithAccountDocStorage used for InternalDocDB mode.
WithAdmin used for admin setup.
WithChainDocStorage used for InternalDocDB mode.
WithDIDAdmin used for admin setup.
WithGenesisAccountDoc used for genesis account doc setup.
WithGenesisAccountDoc used for genesis account doc setup.
WithGenesisChainDoc used for genesis chain doc setup.
WithGenesisChainDoc used for genesis chain doc setup.
# Constants
type of did.
value of keytype.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
type of did.
value of keytype.
value of keytype.
value of keytype.
value of keytype.
type of RegistryMode: @ExternalDocDB: Doc store won't be mastered by Registry @InternalDocDB: Doc store will be mastered by Registry.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
type of RegistryMode: @ExternalDocDB: Doc store won't be mastered by Registry @InternalDocDB: Doc store will be mastered by Registry.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
value of keytype.
value of keytype.
value of keytype.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
the rule of status code: @BadStatus: something went wrong during get status @Normal: AuditSuccess or Unfrozen.
# Structs
AccountDIDRegistry for DID Identifier, Every appchain should use this DID Registry module.
AccountDoc represents account identity information.
AccountItem reperesentis a did item, element of registry table.
Auth represents authentication information.
BasicDoc is the fundamental part of doc structure.
BasicItem is the fundamental part of item structure.
ChainDIDRegistry .
ChainDoc represents chain identity information.
ChainItem reperesents a chain did item, element of registry table, it stores all data about a did.
ClaimTyp represents claim type.
Credential represents verifiable credential.
DocInfo represent info about a doc.
FieldTyp represents field type.
KVDocDB .
KVTable .
PubKey represents publick key.
Sig represents signature data.
VCRegistry represents verifiable credential management registry.
# Interfaces
AccountDIDManager represents account did management registry.
BasicManager represents basic did management that should be used by other type of did management registry.
ChainDIDManager represents chain did management registry.
Doc represents did doc.
DocDB represents did Doc db (used under InternalDocDB mode).
RegistryTable represents state table of a registry.
TableItem represents the table item of a registry table.
VCManager interface for verifiable credential management registry.
# Type aliases
DID represents decentrilzed identifier and method names example identifier: did:bitxhub:appchain001 example method name:.
DIDType .
KeyType .
RegistryMode .
StatusType .