Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 1970356

Browse files
authored
token-js: Version bump to 0.3.0 (#3448)
* token-js: Bump version 0.3.0 for release * Improve README with support info
1 parent 6b5e7cb commit 1970356

File tree

3 files changed

+45
-12
lines changed

3 files changed

+45
-12
lines changed

token/js/FAQ.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

token/js/README.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# `@solana/spl-token`
22

3-
A TypeScript library for interacting with the SPL Token program.
3+
A TypeScript library for interacting with the SPL Token and Token-2022 programs.
44

55
## Links
66

77
- [TypeScript Docs](https://solana-labs.github.io/solana-program-library/token/js/)
8-
- [FAQ (Frequently Asked Questions)](./FAQ.md)
8+
- [FAQs (Frequently Asked Questions)](#faqs)
99
- [Install](#install)
1010
- [Build from Source](#build-from-source)
1111

12+
## FAQs
13+
14+
### How can I get support?
15+
16+
Please ask questions in the Solana Stack Exchange: https://solana.stackexchange.com/
17+
18+
If you've found a bug or you'd like to request a feature, please
19+
[open an issue](https://github.com/solana-labs/solana-program-library/issues/new).
20+
21+
### No export named Token
22+
23+
Please see [upgrading from 0.1.x](#upgrading-from-0.1.x).
24+
1225
## Install
1326

1427
```shell
@@ -51,3 +64,32 @@ yarn test
5164
```shell
5265
yarn example
5366
```
67+
68+
## Upgrading
69+
70+
### Upgrading from 0.2.0
71+
72+
There are no breaking changes from 0.2.0, only new functionality for Token-2022.
73+
74+
### Upgrading from 0.1.x
75+
76+
When upgrading from spl-token 0.1.x, you may see the following error in your code:
77+
78+
```
79+
import {TOKEN_PROGRAM_ID, Token, AccountLayout} from '@solana/spl-token';
80+
^^^^^
81+
SyntaxError: The requested module '@solana/spl-token' does not provide an export named 'Token'
82+
```
83+
84+
The `@solana/spl-token` library as of version 0.2.0 does not have the `Token`
85+
class. Instead the actions are split up and exported separately.
86+
87+
To use the old version, install it with:
88+
89+
```
90+
npm install @solana/[email protected]
91+
```
92+
93+
Otherwise you can find documentation on how to use new versions on the
94+
[SPL docs](https://spl.solana.com/token) or
95+
[Solana Cookbook](https://solanacookbook.com/references/token.html).

token/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solana/spl-token",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"author": "Solana Maintainers <[email protected]>",
55
"repository": "https://github.com/solana-labs/solana-program-library",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)