Socket
Socket
Sign inDemoInstall

@holaplex/js

Package Overview
Dependencies
69
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @holaplex/js

Metaplex JavaScript API


Version published
Weekly downloads
1
Maintainers
3
Created
Weekly downloads
 

Readme

Source

@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

  • Structure
    • Builds and Deployments
    • Connection, Account, Transaction, Errors
  • Programs (serialize/deserialize accounts, rpc transactions, simple actions)
    • Metadata
      • Accounts
        • Metadata
        • Master Edition
        • Edition
        • Edition Marker
      • Instructions
        • CreateMetadataAccount
        • UpdateMetadataAccount
        • UpdatePrimarySaleHappenedViaToken
        • SignMetadata
        • CreateMasterEdition
        • MintNewEditionFromMasterEditionViaToken
        • MintNewEditionFromMasterEditionViaVaultProxy
      • Actions
        • Create
        • Update
        • Sign
        • Send
        • Mint Master Edition
        • Mint Limited Edition from Master
        • Burn
    • Metaplex
      • Accounts
        • Bid Redemption Ticket
        • Auction Manager (V2)
        • Safety Deposit Validation Ticket
        • Payout Ticket
        • Token Tracker
        • Prize Tracking Ticket
        • Auction Cache
        • Store Indexer
        • Store
        • Whitelisted Creator
        • Safety Deposit Config
        • Original Authority Lookup
      • Instructions
        • RedeemBid
        • RedeemFullRightsTransferBid
        • StartAuction
        • EndAuction
        • ClaimBid
        • EmptyPaymentAccount
        • SetStore
        • SetWhitelistedCreator
        • RedeemUnusedWinningConfigItemsAsAuctioneer
        • DecommissionAuctionManager
        • RedeemPrintingV2Bid
        • WithdrawMasterEdition
        • InitAuctionManagerV2
        • ValidateSafetyDepositBoxV2
        • RedeemParticipationBidV3
        • SetStoreIndex
        • SetAuctionCache
      • Actions
    • Auction
      • Accounts
        • Auction
        • Auction Extended
        • Bidder Pot
        • Bidder Meta
      • Instructions
        • CancelBid
        • CreateAuction
        • CreateAuctionV2
        • SetAuthority
        • PlaceBid
      • Actions (no standalone actions)
        • Cancel Bid
        • Place Bid
        • Redeem Bid
        • Instant Sale
    • Vault
      • Accounts
        • Safety Deposit Box
        • Vault
        • External Price
      • Instructions
        • InitVault
        • AddTokenToInactiveVault
        • ActivateVault
        • CombineVault
        • RedeemShares
        • WithdrawTokenFromSafetyDepositBox
        • MintFractionalShares
        • WithdrawSharesFromTreasury
        • AddSharesToTreasury
        • UpdateExternalPriceAccount
        • 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

Keywords

FAQs

Last updated on 20 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc