Documentation
¶
Index ¶
- type Store
- func (s *Store) Add(cred *StoredCredential) string
- func (s *Store) Count() int
- func (s *Store) Delete(id string) bool
- func (s *Store) FindByFormat(format string) []*StoredCredential
- func (s *Store) FindByVCT(vct string) []*StoredCredential
- func (s *Store) Get(id string) (*StoredCredential, bool)
- func (s *Store) List() []*StoredCredential
- type StoredCredential
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a thread-safe in-memory credential store
func (*Store) Add ¶
func (s *Store) Add(cred *StoredCredential) string
Add stores a credential and returns its ID
func (*Store) FindByFormat ¶
func (s *Store) FindByFormat(format string) []*StoredCredential
FindByFormat returns credentials matching the given format
func (*Store) FindByVCT ¶
func (s *Store) FindByVCT(vct string) []*StoredCredential
FindByVCT returns credentials matching the given VCT
type StoredCredential ¶
type StoredCredential struct {
// ID is a unique identifier for this stored credential
ID string `json:"id"`
// RawCredential is the raw credential string (SD-JWT, mdoc, etc.)
RawCredential string `json:"raw_credential"`
// Format is the credential format (e.g., "vc+sd-jwt", "mso_mdoc")
Format string `json:"format"`
// VCT is the verifiable credential type URN
VCT string `json:"vct,omitempty"`
// IssuerURL is the issuer that issued this credential
IssuerURL string `json:"issuer_url"`
// IssuedAt is when the credential was received
IssuedAt time.Time `json:"issued_at"`
// ScenarioName is the scenario that obtained this credential
ScenarioName string `json:"scenario_name"`
// NotificationID is the notification_id from the issuer (if any)
NotificationID string `json:"notification_id,omitempty"`
// TransactionID is the deferred transaction_id (if any)
TransactionID string `json:"transaction_id,omitempty"`
}
StoredCredential represents a credential held in the wallet
Click to show internal directories.
Click to hide internal directories.