Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(opts ...CreateOption) (did.BearerDID, error)
Create can be used to create a new `did:jwk`. `did:jwk` is useful in scenarios where:
- Offline resolution is preferred
- Key rotation is not required
- Service endpoints are not necessary
Spec: https://github.com/quartzjer/did-jwk/blob/main/spec.md
Types ¶
type CreateOption ¶
type CreateOption func(o *createOptions)
CreateOption is a type returned by all Create options for variadic parameter support
func AlgorithmID ¶
func AlgorithmID(id string) CreateOption
AlgorithmID is an option that can be passed to Create to specify a specific cryptographic algorithm to use to generate the private key
func KeyManager ¶
func KeyManager(k crypto.KeyManager) CreateOption
KeyManager is an option that can be passed to Create to provide a KeyManager
type Resolver ¶
type Resolver struct{}
Resolver is a type to implement resolution
func (Resolver) Resolve ¶
func (r Resolver) Resolve(uri string) (didcore.ResolutionResult, error)
Resolve the provided DID URI (must be a did:jwk) as per the wee bit of detail provided in the spec: https://github.com/quartzjer/did-jwk/blob/main/spec.md
func (Resolver) ResolveWithContext ¶
func (r Resolver) ResolveWithContext(ctx context.Context, uri string) (didcore.ResolutionResult, error)
ResolveWithContext the provided DID URI (must be a did:jwk) as per the wee bit of detail provided in the spec: https://github.com/quartzjer/did-jwk/blob/main/spec.md