Documentation ¶
Overview ¶
Package api defines wallet-sdk APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityLog ¶
type ActivityLog interface { // Log logs an activity. Log(message string) }
ActivityLog defines activity log related APIs.
type CreateDIDOpts ¶
CreateDIDOpts represents the various options for the DIDCreator.Create method.
type CredentialReader ¶
type CredentialReader interface { // Get retrieves a VC. Get(id string) (*verifiable.Credential, error) // GetAll retrieves all VCs. GetAll() ([]*verifiable.Credential, error) }
A CredentialReader is capable of reading VCs from some underlying storage mechanism.
type CredentialWriter ¶
type CredentialWriter interface { // Add adds a VC. Add(vc *verifiable.Credential) error // Remove removes a VC. Remove(id string) error }
A CredentialWriter is capable of writing VCs to some underlying storage mechanism.
type Crypto ¶
type Crypto interface { // Sign will sign msg using a matching signature primitive from key referenced by keyID Sign(msg []byte, keyID string) ([]byte, error) // Verify will verify a signature for the given msg using a matching signature primitive from key referenced by keyID Verify(signature, msg []byte, keyID string) error }
Crypto defines various crypto operations that may be used with wallet-sdk APIs.
type DIDCreator ¶
type DIDCreator interface { // Create creates a new DID Document using the given method. Create(method string, createDIDOpts *CreateDIDOpts) (*did.DocResolution, error) }
DIDCreator defines the method required for a type to create DID documents.
type DIDResolver ¶
type DIDResolver interface { // Resolve resolves a DID. Resolve(did string) (*did.DocResolution, error) }
DIDResolver defines DID resolution APIs.
type JWTSigner ¶
type JWTSigner interface { GetKeyID() string Sign(data []byte) ([]byte, error) Headers() jose.Headers }
JWTSigner defines interface for JWT signing operation.
type KeyReader ¶
type KeyReader interface { // ExportPubKey returns the public key associated with the given keyID as raw bytes. ExportPubKey(keyID string) ([]byte, error) }
KeyReader represents a type that is capable of performing operations related to reading keys from an underlying KMS.
type KeyWriter ¶
type KeyWriter interface { // Create creates a keyset of the given keyType and then writes it to storage. // The keyID and raw public key bytes of the newly generated keyset are returned. Create(keyType kms.KeyType) (string, []byte, error) }
KeyWriter represents a type that is capable of performing operations related to key creation and storage within an underlying KMS.