interledger / interledger/open-payments-node

Make createAuthenticatedClient's `privateKey` input type clear

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10
Forks
4
Avg merge
27m
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the open-payments package README and the createAuthenticatedClient entry point. Confirm the accepted privateKey representations and decide whether the change is documentation, JSDoc, TypeScript typing, or early validation. Done means the accepted input is stated consistently with examples and any chosen behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.