Developing in this repository requires Node.js 18 or higher.
Clone the repo by running:
git clone git@github.com:coinbase/coinbase-sdk-nodejs.gitTo install all dependencies, run:
npm installTo autocorrect all lint errors, run:
npm run lint-fixTo detect all lint errors, run:
npm run lintTo run all tests, run:
npm testTo run a specific test, run (for example):
npx jest ./src/coinbase/tests/wallet_test.tsTo run e2e tests, run:
In the root directory, create a .env file with the following configuration. Ensure to update the placeholders with your actual data:
NAME=API_KEY_NAME
PRIVATE_KEY=API_PRIVATE_KEY
WALLET_DATA={ "WALLET_ID": { "seed": "", "encrypted": false, "authTag": "", "iv": "" } }Then run the following commands:
npm run test:dry-run && npm run test:e2eTo generate documentation from the TypeDoc comments, run:
npm run docs