New:Socket for Asana Is Now Available.Learn more
Get Started

@axvn-vn/spl-token

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axvn-vn/spl-token

SPL Token Program JS API

latest
Source
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

@solana/spl-token

A TypeScript library for interacting with the SPL Token and Token-2022 programs.

[!IMPORTANT]
If you are using @solana/web3.js version 2 , you should use the @solana-program/token and @solana-program/token-2022 packages instead.

FAQs

How can I get support?

Please ask questions in the Solana Stack Exchange: https://solana.stackexchange.com/

If you've found a bug or you'd like to request a feature, please open an issue.

No export named Token

Please see upgrading from 0.1.x.

Install

npm install --save @solana/spl-token @solana/web3.js@1

OR

yarn add @solana/spl-token @solana/web3.js@1

Build from Source

  • Prerequisites
  • Node 16+
  • PNPM

If you have Node 16+, you can activate PNPM with Corepack.

  • Clone the project:
git clone https://github.com/solana-program/token-2022.git
  • Navigate to the root of the repository:
cd token-2022
  • Build the on-chain programs:
make build-sbf-program
make build-sbf-confidential-elgamal-registry
  • Navigate to the SPL Token library:
cd clients/js-legacy
  • Build the libraries in the repository:
pnpm install
pnpm run build
  • Run the tests:
pnpm run test
  • Run the example:
pnpm run example

Upgrading

Upgrading from 0.2.0

There are no breaking changes from 0.2.0, only new functionality for Token-2022.

Upgrading from 0.1.x

When upgrading from spl-token 0.1.x, you may see the following error in your code:

import {TOKEN_PROGRAM_ID, Token, AccountLayout} from '@solana/spl-token';
                          ^^^^^
SyntaxError: The requested module '@solana/spl-token' does not provide an export named 'Token'

The @solana/spl-token library as of version 0.2.0 does not have the Token class. Instead the actions are split up and exported separately.

To use the old version, install it with:

npm install @solana/spl-token@0.1.8

Otherwise you can find documentation on how to use new versions on the SPL docs or Solana Cookbook.

FAQs

Package last updated on 21 Aug 2026

Related posts