Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 845 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 845 Bytes

Solana Examples

Various examples of how to use solana, inspired by SecretJS-Templates.

Installation and Setup

git clone --depth=1 https://github.com/monomadic/solana-examples.git
cd solana-examples
yarn install

You will also need to specify some environment variables in a .env file in the root of this project. An example can be found at .env.example - if you don't have a wallet yet you can create one on devnet and airdrop it by running:

yarn airdrop

Copy the private key (also known as secret key in solana) and supply it as SOLANA_PRIVATE_KEY in .env.example.

Running the Examples

Run the examples with ts-node.

npx ts-node examples/1-basic/1-airdrop.ts

Some shortcut scripts are set up if you prefer:

yarn 1-1