Documentation
¶
Index ¶
- Constants
- Variables
- 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 ¶
View Source
var (
UnsupportedDIDError = errors.New("unsupported Method for DID")
)
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
}
A sample wallet This would NOT be how it would be stored in production But serves for demonstrative purposes This holds the assigned dids 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
Adds a Private Key to a wallet
func (*SimpleWallet) Init ¶
func (s *SimpleWallet) Init(keyType string) error
In the simple wallet 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. |
|------------| |----------------------| |------------| | 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.