Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeSignerFromPEM ¶
DecodeSignerFromPEM loads a private key from a PKCS#8 PEM as a signer. Currently, only Ed25519 keys are supported.
Types ¶
type Identity ¶
Identity holds a service's cryptographic identity. It's intended to be held by the service itself. This is the source of its DID document, can then be published (eg, to the web). Other services should use normal DID resolution to find the document.
func New ¶
New creates a new identity. If privateKeyBase64 is empty, generates a new key. If serviceDID is empty, uses the key DID derived from the key.
func NewFromPEMFile ¶
NewFromPEMFile creates a new identity from an Ed25519 PEM key file.
func NewFromPEMFileWithDID ¶
NewFromPEMFileWithDID creates a new identity from an Ed25519 PEM key file. When serviceDID is provided (e.g., "did:web:upload"), the identity will use that DID. Otherwise, it will use the key DID derived from the key.