Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.95 KB

SETUP.md

File metadata and controls

66 lines (41 loc) · 1.95 KB

Setting up the development environment

This guide will help you set up the development environment for StarBeam. Please note that this is a work in progress and the instructions may be incomplete. Feel free to open an issue if you have any questions or suggestions.

Common tools

Install Rust toolchain:

https://www.rust-lang.org/

Stellar-related dependencies

  1. Install wasm target for Rust
rustup target add wasm32-unknown-unknown
  1. Install Stellar CLI

If you're on Mac, use brew install stellar-cli On Linux, you can install with Cargo: cargo install --locked [email protected] --features opt

  1. Initialize the environment

Run the initialize.sh script. It will create a deployer identity, build contracts, deploy contracts and generate typescript bindings.

./initialize.sh
  1. Use localias to debug the mini-app locally (optional)

You can use localias to redirect all requests to the mini-app host to your local development server.

  • Install localias from its repository: https://github.com/peterldowns/localias

  • Add alias for the mini-app hostname:

    localias set starbeam-webapp.vercel.app 3000
  • Start dev server:

    yarn dev
  • Run localias:

    localias start

You can now open the mini-app in Telegram and it will be served from your local server.

Setting up Testing Environment for Telegram Bots

To set up the testing environment for the Telegram bot associated with this project, please refer to the Telegram Testing Setup Guide. This guide will walk you through the process of creating and configuring a bot, setting up the Telegram app, and testing locally with Ngrok.

Before proceeding with the setup, ensure you have configured the following environment variables: BOT_TOKEN: Your Telegram bot token obtained from BotFather WEBAPP_URL: The URL where your web application is hosted (e.g., your Ngrok URL during local development)