npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@holaplex/js

v4.3.3

Published

Metaplex JavaScript API

Downloads

8

Readme

@metaplex/js · GitHub license npm version

Metaplex JavaScript SDK

In Development - All interfaces are very likely to change very frequently. Please be aware.

Learn how to use Metaplex JavaScript SDK in your own project.

Load and Deserialize Accounts

import { Connection, Account, programs } from '@metaplex/js';
const { metaplex: { Store, AuctionManager }, metadata: { Metadata }, auction: { Auction }, vault: { Vault } } = programs;


const connection = new Connection('devnet');

// Format: await <AccountType>.load(connection, pubkey);
const account = await Account.load(connection, '<pubkey>');

// Metadata
const metadata = await Metadata.load(connection, '<pubkey>');
// Auction
const auction = await Auction.load(connection, '<pubkey>');
// Vault
const vault = await Vault.load(connection, '<pubkey>');
// Metaplex
const auctionManager = await AuctionManager.load(connection, '<pubkey>');
const store = await Store.load(connection, '<pubkey>');

Send transactions

The Metaplex SDK currently has low level transaction convenience classes for all the necessary operations.


import { Connection, Wallet, actions } from '@metaplex/js';

const connection = new Connection('devnet');

await actions.initStore({ connection, wallet });

Providers

Coingecko - for exchange rates

import { Coingecko, Currency } from '@metaplex/js';
const rates = await new Coingecko().getRate([Currency.AR, Currency.SOL], Currency.USD);

Checklist

  • [x] Structure
    • [x] Builds and Deployments
    • [x] Connection, Account, Transaction, Errors
  • [x] Programs (serialize/deserialize accounts, rpc transactions, simple actions)
    • [x] Metadata
      • [x] Accounts
        • [x] Metadata
        • [x] Master Edition
        • [x] Edition
        • [x] Edition Marker
      • [ ] Instructions
        • [x] CreateMetadataAccount
        • [x] UpdateMetadataAccount
        • [x] UpdatePrimarySaleHappenedViaToken
        • [x] SignMetadata
        • [x] CreateMasterEdition
        • [x] MintNewEditionFromMasterEditionViaToken
        • [ ] MintNewEditionFromMasterEditionViaVaultProxy
      • [ ] Actions
        • [X] Create
        • [X] Update
        • [X] Sign
        • [ ] Send
        • [X] Mint Master Edition
        • [X] Mint Limited Edition from Master
        • [ ] Burn
    • [ ] Metaplex
      • [ ] Accounts
        • [x] Bid Redemption Ticket
        • [x] Auction Manager (V2)
        • [ ] Safety Deposit Validation Ticket
        • [x] Payout Ticket
        • [ ] Token Tracker
        • [x] Prize Tracking Ticket
        • [ ] Auction Cache
        • [ ] Store Indexer
        • [x] Store
        • [x] Whitelisted Creator
        • [x] Safety Deposit Config
        • [ ] Original Authority Lookup
      • [ ] Instructions
        • [x] RedeemBid
        • [ ] RedeemFullRightsTransferBid
        • [x] StartAuction
        • [ ] EndAuction
        • [x] ClaimBid
        • [ ] EmptyPaymentAccount
        • [x] SetStore
        • [x] SetWhitelistedCreator
        • [ ] RedeemUnusedWinningConfigItemsAsAuctioneer
        • [ ] DecommissionAuctionManager
        • [ ] RedeemPrintingV2Bid
        • [ ] WithdrawMasterEdition
        • [x] InitAuctionManagerV2
        • [ ] ValidateSafetyDepositBoxV2
        • [ ] RedeemParticipationBidV3
        • [ ] SetStoreIndex
        • [ ] SetAuctionCache
      • [ ] Actions
    • [ ] Auction
      • [x] Accounts
        • [x] Auction
        • [x] Auction Extended
        • [x] Bidder Pot
        • [x] Bidder Meta
      • [ ] Instructions
        • [x] CancelBid
        • [x] CreateAuction
        • [x] CreateAuctionV2
        • [x] SetAuthority
        • [x] PlaceBid
      • [ ] Actions (no standalone actions)
        • [x] Cancel Bid
        • [x] Place Bid
        • [x] Redeem Bid
        • [x] Instant Sale
    • [ ] Vault
      • [ ] Accounts
        • [x] Safety Deposit Box
        • [x] Vault
        • [x] External Price
      • [ ] Instructions
        • [x] InitVault
        • [x] AddTokenToInactiveVault
        • [x] ActivateVault
        • [x] CombineVault
        • [ ] RedeemShares
        • [x] WithdrawTokenFromSafetyDepositBox
        • [ ] MintFractionalShares
        • [ ] WithdrawSharesFromTreasury
        • [ ] AddSharesToTreasury
        • [x] UpdateExternalPriceAccount
        • [x] SetAuthority
      • [ ] Actions
    • [ ] Candy Machine
      • [ ] Accounts
        • [ ] Candy Machine
      • [ ] Instructions
        • [ ] Mint
        • [ ] Update
        • [ ] Initialize
        • [ ] Initialize Config
        • [ ] Add Config Lines
      • [ ] Actions
    • [ ] Fair Launch
      • [ ] Accounts
        • [ ] Fair Launch
        • [ ] Ticket
        • [ ] Ticket Seq Lookup
        • [ ] Lottery Bitmap
      • [ ] Instructions
        • [ ] Initialize
        • [ ] Update
        • [ ] Create Lottery Bitmap
        • [ ] Update Lottery Bitmap
        • [ ] Start Phase Three
        • [ ] Restart Phase Two
        • [ ] Purchase Ticket
        • [ ] Adjust Ticket
        • [ ] Punch Ticket
        • [ ] Create Ticket Seq
        • [ ] Withdraw Funds
        • [ ] Receive Refund
        • [ ] Set Token Metadata
        • [ ] Set Participation NFT
        • [ ] Update Participation NFT
        • [ ] Mint Participation NFT
        • [ ] Mint Tokens
      • [ ] Actions
    • [ ] Packs TBD
    • [ ] Airdrop TBD
    • [ ] Fusion TBD
  • [ ] Providers
    • [ ] CoinGecko
    • [ ] Arweave
  • [ ] Global (common use cases)
    • [ ] Actions