Giter Club home page Giter Club logo

shivankk26 / spl-token-minting Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 16 KB

This repository contains code snippets and explanations for creating and interacting with mintable tokens on the Solana blockchain using the SPL Token program. The provided code demonstrates various operations such as creating a new mint, creating a token account, minting tokens, approving delegates, transferring tokens, revoking delegates...

TypeScript 100.00%
blockchain git solana solana-program solana-token typescript web3 web3js

spl-token-minting's Introduction

SPL Token Minting

This repository contains code snippets and explanations for creating and interacting with mintable tokens on the Solana blockchain using the SPL Token program. The provided code demonstrates various operations such as creating a new mint, creating a token account, minting tokens, approving delegates, transferring tokens, revoking delegates, and burning tokens.

Code Overview

Initialization

  • initializeKeypair: Initializes a new keypair for Solana wallet interactions.

Token Mint Operations

  • createNewmint: Creates a new mintable token.
  • createTokenAccount: Creates a new token account associated with a specific mint.
  • mintTokens: Mints tokens to a specified token account.
  • approveDelegate: Authorizes a delegate to transfer tokens on behalf of the owner.
  • transferTokens: Transfers tokens from one token account to another.
  • revokeDelegate: Revokes a delegate's authority to transfer tokens.
  • burnTokens: Burns tokens to remove them from circulation.

Main Function

  • main: Orchestrates the token minting process, including creating a new mint, initializing token accounts, minting tokens, approving delegates, transferring tokens, revoking delegates, and burning tokens.

Getting Started

  1. Clone the repository.
    git clone https://github.com/ShivankK26/SPL-Token-Minting
    
  2. Install dependencies using npm install.
  3. Replace placeholder values and customize the code as needed.
  4. Execute the main function to perform token minting operations.

Dependencies

  • @solana/web3.js: Solana JavaScript API for interacting with the Solana blockchain.
  • @solana/spl-token: SPL Token program for managing token minting, transfers, and other token operations.

Usage

Ensure that you have a valid Solana wallet configured and connected to the Solana network. Adjust the code parameters and execute the main function to perform token minting operations.

spl-token-minting's People

Contributors

shivankk26 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.