Skip to content

holaplex/js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

Metaplex JavaScript SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.4%
  • JavaScript 1.6%