Closed jojobii-arks closed 1 year ago
ah, it's a code style that helps with treeshaking (especially for singletons). But I think it doesn't help much with the current code and wrapping them up in a class makes sense.
(evidently my use case was too focused on single user instances and completely forgot that normal servers need to sign for different users 😅)
The signer info is now encapsulated in the Signer
class. in the future if there are other runtimes with different signing utilities the CoreSigner
class can be extended.
import { sendRequest, Signer } from '...'
const res = await sendRequest(req, new Signer(keyId, key))
Issue
hs
that utilize an Actor Key rely on mutable variables that are declared on import.HttpSignatureClient
" that can be instantiated via "createHttpSignatureClient
" would be pretty handy, and could enable use cases such as being able to sign with different keys from the same runtime.Notes