https://github.com/metaplex-foundation/mpl-token-metadata
Program to attach additional data to Fungible or Non-Fungible tokens on Solana.
https://github.com/metaplex-foundation/mpl-token-metadata
Last synced: 6 months ago
JSON representation
Program to attach additional data to Fungible or Non-Fungible tokens on Solana.
- Host: GitHub
- URL: https://github.com/metaplex-foundation/mpl-token-metadata
- Owner: metaplex-foundation
- License: other
- Created: 2023-01-22T21:02:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T15:19:02.000Z (7 months ago)
- Last Synced: 2025-05-08T19:12:47.211Z (6 months ago)
- Language: Rust
- Homepage: https://developers.metaplex.com/token-metadata
- Size: 5.93 MB
- Stars: 193
- Watchers: 8
- Forks: 109
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solana-security - Metaplex's token metadata program
README
Metaplex Token Metadata
Program to attach additional data to Fungible or Non-Fungible tokens on Solana. It achieves this using Program Derived Addresses (PDAs) that are derived from the address of Mint accounts.
## Getting Started
The packages below can be used to interact with Token Metadata program.
### TypeScript
```sh
npm install @metaplex-foundation/mpl-token-metadata
```
[See typedoc documentation](https://mpl-token-metadata-js-docs.vercel.app/).
### Rust
```sh
cargo add mpl-token-metadata
```
[See crate documentation](https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/).
## Building
From the root directory of the repository:
- Install the required packages:
```sh
pnpm install
```
- Build the program:
```sh
pnpm programs:build
```
This will create the program binary at `/programs/.bin`
## Testing
Token Metadata includes two sets of tests: BPF and TypeScript.
### BPF
From the root directory of the repository:
```sh
pnpm programs:test
```
### TypeScript
From the root directory of the repository:
```sh
pnpm validator
```
This will start a local validator using [Amman](https://github.com/metaplex-foundation/amman).
After starting the validator, go to the folder `/clients/js` and run:
```sh
pnpm install
```
This will install the required packages for the tests. Then, run:
```sh
pnpm build && pnpm test
```
## Documentation
Full documentation for Token Metadata can be found here [developers.metaplex.com/token-metadata](https://developers.metaplex.com/token-metadata).
## Security
To report a security issue, please follow the guidance on our [bug bounty program](https://www.metaplex.com/bounty-program) page.
## License
The Rust/Cargo programs are licensed under the
"Apache-style" [Metaplex(TM) NFT Open Source License](https://github.com/metaplex-foundation/mpl-token-metadata/blob/master/LICENSE) and the JS/TS client libraries are licensed
under either the [MIT](https://www.mit.edu/~amini/LICENSE.md) or the [Apache](https://www.apache.org/licenses/LICENSE-2.0.txt) licenses.