GitHunt
BE

benjaminPla/off_chain_solana_typescript

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.

Off-Chain Development

Overview

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).

Structure

.
├── 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

Configuration

To configure the project, follow these steps:

  1. 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>

Clusters

The project is built to run on any cluster, but I highly recommend to run it locally.

  1. run solana-test-validator on your terminal
  2. update your .env: ENVIRONMENT="http://localhost:8899"
  3. run the scripts: ts-node <file>

Images

image

image

image

image

Languages

TypeScript100.0%

Contributors

Created January 29, 2025
Updated February 3, 2025