metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs
360 stars 183 forks source link

How do you mint? #186

Closed PomegranateApps closed 2 years ago

PomegranateApps commented 2 years ago

I've been using this code to mint Solana NFT's in my own project, but is it possible to use this API to do the same? https://github.com/metaplex-foundation/candy-machine-ui/blob/main/src/candy-machine.ts#L371

lorisleiva commented 2 years ago
const { nft } = await metaplex.candyMachines().mint(...).run();

🙂

PomegranateApps commented 2 years ago

Is there documentation for this somewhere?

lorisleiva commented 2 years ago

Not yet, soon :)

PomegranateApps commented 2 years ago

How get the candy machine state for input into that new mint function? I'm using this one right now here. https://github.com/metaplex-foundation/candy-machine-ui/blob/main/src/candy-machine.ts#L166