Abridged guide of getting started with metaplex candy machine
and exiled-apes frontend starter
.
I wanted to capture this guide so I could quickly skip the boilerplate.
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
"use strict"; | |
var __importDefault = (this && this.__importDefault) || function (mod) { | |
return (mod && mod.__esModule) ? mod : { "default": mod }; | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
var web3_js_1 = require("@solana/web3.js"); | |
var hex_to_32_1 = __importDefault(require("hex-to-32")); | |
var atob_1 = __importDefault(require("atob")); | |
var bs58_1 = __importDefault(require("bs58")); | |
// ---------------------------------------------------- |
Abridged guide of getting started with metaplex candy machine
and exiled-apes frontend starter
.
I wanted to capture this guide so I could quickly skip the boilerplate.
Guides / Walkthroughs | |
Intro to Programming on Solana | |
https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/ | |
Development Tutorial by Solong | |
https://solongwallet.medium.com/solana-development-tutorial-things-you-should-know-before-structuring-your-code-807f0e2ee43 | |
Intro to Anchor Framework | |
https://project-serum.github.io/anchor/getting-started/introduction.html |
const Web3 = ({ | |
Account, | |
Transaction, | |
TransactionInstruction, | |
PublicKey, | |
Connection, | |
} = require("@solana/web3.js")); | |
const testMemo = (conn, account) => { | |
const instruction = new TransactionInstruction({ |
import * as web3 from "@solana/web3.js"; | |
import * as metadata from "./metadata"; // see metadata.ts | |
const tokenAddress = new web3.PublicKey( | |
"CxkKDaBvtHqg8aHBVY8E4YYBsCfJkJVsTAEdTo5k4SEw" | |
); | |
(async () => { | |
// Connect to cluster | |
var connection = new web3.Connection( |
This guide will attempt to give an overview of the technical/coding steps that are required to render a Metaplex NFT with any programming language/platform. I'll attempt to write it a programming language-agnostic manner; you'll need to fill in the particular methods of performing the steps with your coding language of choice.
For the purposes of discussion, we'll call the Solana account that holds the Metaplex NFTs the "NFT-Account."
The first thing you need to do is call the getTokenAccountsByOwner
JSON RPC method as documented here:
cellvibr.io | |
pelobact.er | |
shewane.la | |
myxococc.us | |
stigmate.la | |
cystobact.er | |
nannocyst.is | |
vitreosci.la | |
lysobact.er | |
simonsie.la |
import json | |
from solana.account import Account | |
from solana.rpc.api import Client | |
from solana.transaction import Transaction | |
from metaplex.transactions import update_metadata_instruction | |
from metaplex.metadata import ( | |
get_metadata, | |
update_metadata_instruction_data | |
) |
The package linked to from here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.