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) AddCredentialJWT(credID, cred string) error
- func (s *SimpleWallet) AddDID(id string) error
- func (s *SimpleWallet) AddPrivateKey(id, kid string, pubKey gocrypto.PrivateKey) error
- func (s *SimpleWallet) GetDIDs() []string
- func (s *SimpleWallet) GetKey(kid string) (string, gocrypto.PrivateKey, error)
- func (s *SimpleWallet) GetKeysForDID(id string) ([]WalletKeys, error)
- func (s *SimpleWallet) Init(didMethod did.Method) error
- func (s *SimpleWallet) Size() int
- type WalletKeys
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) AddCredentialJWT ¶
func (s *SimpleWallet) AddCredentialJWT(credID, cred string) error
func (*SimpleWallet) AddDID ¶
func (s *SimpleWallet) AddDID(id string) error
func (*SimpleWallet) AddPrivateKey ¶
func (s *SimpleWallet) AddPrivateKey(id, kid string, pubKey gocrypto.PrivateKey) error
AddPrivateKey Adds a Private Key to a wallet
func (*SimpleWallet) GetDIDs ¶
func (s *SimpleWallet) GetDIDs() []string
func (*SimpleWallet) GetKey ¶
func (s *SimpleWallet) GetKey(kid string) (string, gocrypto.PrivateKey, error)
func (*SimpleWallet) GetKeysForDID ¶
func (s *SimpleWallet) GetKeysForDID(id string) ([]WalletKeys, error)
func (*SimpleWallet) Init ¶
func (s *SimpleWallet) Init(didMethod did.Method) error
Init stores a DID for a particular user and adds it to the registry
func (*SimpleWallet) Size ¶
func (s *SimpleWallet) Size() int
type WalletKeys ¶
type WalletKeys struct { ID string Key gocrypto.PrivateKey }
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.