https://github.com/monogon-dev/solana-spe
https://github.com/monogon-dev/solana-spe
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/monogon-dev/solana-spe
- Owner: monogon-dev
- Created: 2024-02-18T11:54:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-20T11:55:17.000Z (over 2 years ago)
- Last Synced: 2024-11-11T05:11:02.099Z (over 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SPE Toolkit
This is a library of utilities to help you get started with Solana Permissioned Environments.
## Requirements
- Docker (https://www.docker.com/products/docker-desktop)
- Bash
## Setting up the environment
**1. Source the environment (in case you don't have dotenv configured)**
```bash
set -a
source .env
set +a
```
**2. Start the local SPE network**
```bash
docker compose up
```
You can now access the explorer at http://localhost:8080. The port can be adjusted in the `.env` file.
**3. Initialize the CLI config**
```bash
spe init
```
**4. Use the shipped CLIs**
* `spe` is a helper CLI to get you setup in the SPE environment
* `spe-token` is a CLI to interact with the SPL Token program
* `spe-cli` is an alias for the Solana CLI configured to interact with your SPE
* `spe-keygen` is an alias for the Solana Keygen CLI
## Examples
### Create and fund a new account
[](https://asciinema.org/a/0686yP02xTiD4ActAsMG7ycpF)
```bash
# This creates a new keypair
spe create-account [name]
# This funds the account with x SOL
spe fund [name] [amount]
# This sets the account as the current account (i.e. use it for future commands)
spe use-account [name]
```
### Create a new token
**Note:** Make sure you have funded and called `spe use-account` on the account you want to use to create the token.
[](https://asciinema.org/a/IkIdYp6AgRJNomIrWrFmO1RRf)
```bash
spe-token create-token
spe-token create-account [token_address]
spe-token mint [account_address] [amount]
```