@gootools/with-metaplex
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

with-metaplex

npm version

Helpers for doing stuff with metaplex on solana

Installation

npm i @gootools/with-metaplex

Add peer dependencies (if required)

 npm i @solana/web3.js borsh bs58

Usage

import { clusterApiUrl, Connection } from "@solana/web3.js";
import { withMetaplex } from "@gootools/with-metaplex";
// uncomment below if using node and you need to polyfill fetch
// import "cross-fetch/polyfill";

const { getMetadataForMint } = withMetaplex(
  new Connection(clusterApiUrl("mainnet-beta"))
);

getMetadataForMint("9gqFyarEBGDsK2pEw7WBUwmZSbxgyVrH7QQXCYiM1Ekm").then(
  console.log
);

TODO

  • tests!
  • types!
  • complete decodeMetadata
  • fetch polyfill?

Readme

Keywords

none

Package Sidebar

Install

npm i @gootools/with-metaplex

Weekly Downloads

4

Version

0.2.3

License

none

Unpacked Size

305 kB

Total Files

23

Last publish

Collaborators

  • johnrees