Documentation ¶
Index ¶
- Constants
- func HandleExampleError(err error, msg string)
- func WriteAction(s string)
- func WriteError(s string)
- func WriteNote(s string)
- func WriteOK(s string)
- func WriteStep(s string, step int)
- type SimpleWallet
- func (s *SimpleWallet) AddCredentials(cred credential.VerifiableCredential) error
- func (s *SimpleWallet) AddDIDKey(k string, key string) error
- func (s *SimpleWallet) AddPrivateKey(k string, key gocrypto.PrivateKey) error
- func (s *SimpleWallet) GetDID(k string) (string, error)
- func (s *SimpleWallet) Init(keyType string) error
- func (s *SimpleWallet) Size() int
Constants ¶
View Source
const ( NoteColor = "\033[1;34m%s\033[0m" ActionColor = "\033[1;36m%s\033[0m" StepColor = "\033[1;33m%s\033[0m" ErrorColor = "\033[1;31m%s\033[0m" DebugColor = "\033[0;36m%s\033[0m" OKColor = "\033[0;32m%s\033[0m" )
Color coding to make it easier to read terminal
Variables ¶
This section is empty.
Functions ¶
func HandleExampleError ¶
HandleExampleError writes an error to stderr and terminates the program
func WriteAction ¶
func WriteAction(s string)
func WriteError ¶
func WriteError(s string)
Types ¶
type SimpleWallet ¶
type SimpleWallet struct {
// contains filtered or unexported fields
}
SimpleWallet is a sample wallet This would NOT be how it would be stored in production, but serves for demonstrative purposes This holds the assigned DIDs, their associated private keys, and VCs
func NewSimpleWallet ¶
func NewSimpleWallet() *SimpleWallet
func (*SimpleWallet) AddCredentials ¶
func (s *SimpleWallet) AddCredentials(cred credential.VerifiableCredential) error
func (*SimpleWallet) AddPrivateKey ¶
func (s *SimpleWallet) AddPrivateKey(k string, key gocrypto.PrivateKey) error
AddPrivateKey Adds a Private Key to a wallet
func (*SimpleWallet) Init ¶
func (s *SimpleWallet) Init(keyType string) error
Init stores a DID for a particular user and adds it to the registry
func (*SimpleWallet) Size ¶
func (s *SimpleWallet) Size() int
Directories ¶
Path | Synopsis |
---|---|
A simple application using a did:key.
|
A simple application using a did:key. |
A simple example of making a credential manifest and issuing a credential from it, using a credential application.
|
A simple example of making a credential manifest and issuing a credential from it, using a credential application. |
|------------| |----------------------| |------------| | Verifier | ----> | Presentation Request | -----> | Holder | | | | \Definition | | | |------------| |----------------------| |------------|
|
|------------| |----------------------| |------------| | Verifier | ----> | Presentation Request | -----> | Holder | | | | \Definition | | | |------------| |----------------------| |------------| |
usecase
|
|
This is a simple application which creates a Verifiable Credential.
|
This is a simple application which creates a Verifiable Credential. |
Click to show internal directories.
Click to hide internal directories.