-
Notifications
You must be signed in to change notification settings - Fork 0
Solana web3.js Client
Andrei Montchik edited this page Apr 15, 2026
·
1 revision
- Install NodeJS
- Enable Corepack:
corepack enable - Enable Corepack, that will make Yarn available:
corepack enable - Install the Solana Web3.js client:
yarn add @solana/web3.js - Install Typescript:
npm install -g typescript - Install the BN JavaScript library and it's Typescript definitions:
npm install bn.js @types/bn.js --save - Run the
tsc --initcommand in the scripts directory to generate the default TypeScript configuration file. It will setup some helpful flags. Consider commenting out the"strict": trueto disable strict type checking.
- To generate the JavaScript file, run
tscin the scripts directory. It will pick up the TypeScript compiler configuration from thetsconfig.jsonfile and compile all TypeScript files. - Run the JavaScript file:
node <SCRIPT_NAME.js>
- List of NodeJS modules:
npm ls.