Developing in this repository requires Node.js 18 or higher.
Clone the repo by running:
git clone git@github.com:coinbase/coinbase-sdk-nodejs.git
To install all dependencies, run:
npm install
To autocorrect all lint errors, run:
npm run lint-fix
To detect all lint errors, run:
npm run lint
To run all tests, run:
npm test
To run a specific test, run (for example):
npx jest ./src/coinbase/tests/wallet_test.ts
To 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:e2e
To generate documentation from the TypeDoc comments, run:
npm run docs