This is an off-chain development project built in Node.js + TypeScript that uses @solana/web3.js
and @solana-developers/helpers
dependencies. It goes through all the basic actions with the Solana blockchain.
This project is linked to the on_chain_solana_rust repository, which provides the on-chain interactions required (smart contracts).
.
├── package.json
├── package-lock.json
├── README.md
├── src
│ ├── add_memo_to_transaction.ts
│ ├── basic_transaction.ts
│ ├── mnemonic.ts
│ ├── ping_counter.ts
│ ├── sign_and_verify_message.ts
│ ├── spl
│ │ ├── spl_1.ts
│ │ ├── spl_2.ts
│ │ ├── spl_3.ts
│ │ └── spl_4.ts
│ └── utils.ts
└── tsconfig.json
To configure the project, follow these steps:
- Create a
.env
file in the project root and add the necessary environment variables:
ENVIRONMENT=<your_environment>
MNEMONIC_PASSWORD=<your_passphrase>
SECRET_KEY=<[your_secretkey]>
SEED_PHRASE=<your_seedphrase>
The project is built to run on any cluster, but I highly recommend to run it locally.
- run
solana-test-validator
on your terminal - update your .env:
ENVIRONMENT="http://localhost:8899"
- run the scripts:
ts-node <file>