In open-payments package README and in lack of JSDoc comments, it's not clear what goes in privateKey parameter of createAuthenticatedClient function.
So far, I've seen people writing:
- path to key (passes, as expected)
- a string in
-----BEGIN PRIVATE KEY format (fails)
- a base64 encoded string (fails)
Buffer.from(base64PrivateKeyString, 'base64') (passes)
If we can write more examples (in README as well as JSDoc) and/or restrict TypeScript types, that would be very helpful. Throwing any errors earlier would be helpful too.