STAS
  • STAS Documentation
  • Getting Started
    • Setup
    • 2 Minute Mint
    • The Ecosystem
  • Presentations
  • Insights
    • STAS-20
    • STAS-50
    • STAS-789
  • Library
    • Token Properties
    • Instant Mint
    • Mint in Detail
    • Transfer
    • Split
    • Merge
    • Redeem
    • Atomic Swaps
    • Advanced Features
      • Data Transactions
      • Fee Estimates
      • Zero Change
      • Zero Fee
      • Unsigned Transactions
  • External
    • DXS Library
Powered by GitBook
On this page
  1. Getting Started

Setup

Setup your STAS SDK

PreviousSTAS DocumentationNext2 Minute Mint

Last updated 2 months ago

For this setup example, we will use Node.js along with the Visual Studio Code IDE or your preferred IDE.

  1. Create a new project directory: Open your terminal and navigate to the directory where you want to create your project. Create a new folder for your project.

    mkdir mintTest
  2. Initialize a new Node.js project: Navigate into the new directory you just created and run initiation.

    cd mintTest
    npm init -y
  3. Install required packages: In your project directory we will now install the stas and bsv libraries:

    npm install bsv
    npm install stas-sdk
  4. Create an entry point file: In your project directory, create a new file called index.js. This will serve as the entry point for your application, where you can import the libraries and write your code.

  5. Import required libraries: In your index.js file, import the required libraries using the require function. Here's an example:

    const stas = require('stas-sdk');
    const bsv = require('bsv');

Alternatively, you can retrieve the open source code for the STAS SDK from GitHub

That concludes the setup! you are now ready to start writing code to mint your first STAS tokens!

https://github.com/stas-token/stas-sdk