Releases: metaplex-foundation/js
js/v0.17.3
What's Changed
- Documentation Error 'The amount of tokens to (mint -> send)' by @CoachChuckFF in #360
- Update Auction House's find listings to allow multiple criteria by @zaxozhu in #363
- Add script to generate workspace.json by @ovasylenko in #364
- Fix MerkleTree import by @lorisleiva in #371
- Implement Find All Bids/Purchases by @zaxozhu in #373
New Contributors
- @CoachChuckFF made their first contribution in #360
Full Changelog: js/v0.17.2...js/v0.17.3
js/v0.17.2
What's Changed
- Update token metadata package to 2.3.3 by @zaxozhu in #348
- Fix Bundlr upload transaction failure in browser by @zaxozhu in #349
- Use appropriate payers in derived identity by @lorisleiva in #351
Full Changelog: js/v0.17.1...js/v0.17.2
js/v0.17.1
What's Changed
- Fix
Buffer
related error in browsers by @acheroncrypto in #347
New Contributors
- @acheroncrypto made their first contribution in #347
Full Changelog: js/v0.17.0...js/v0.17.1
js/v0.17.0
What's Changed
- New Candy Machine module by @lorisleiva in #315
- Improve the monorepo structure by @ovasylenko in #274
- Update web3.js and other dependencies by @lorisleiva in #326
- Import Amman account providers by @lorisleiva in #327
- Remove run() suffix on operations by @lorisleiva in #335
- Use finalized commitment before fetching data by @lorisleiva in #336
- Add support for Candy Guard route instructions by @lorisleiva in #339
- Update CG program and use official program libraries by @lorisleiva in #340
Breaking Changes
The .run()
suffix was removed from every operation call. That means you must now call operation as shown below. You can read more about this decision in PR #335.
// Before.
const { nft } = await metaplex.nfts().create({...}).run();
// After.
const { nft } = await metaplex.nfts().create({...});
All operations now accept a second object argument which is the same for all operations. It enables us to provide more generic information such as the fee payer and the commitment levels to use when querying the blockchain. PR #335 also contains information about this change.
export type OperationOptions = {
/** The wallet that should pay for transaction fees and, potentially, rent-exempt fees to create accounts.*/
payer?: Signer;
/** The level of commitment desired when querying the state of the blockchain. */
commitment?: Commitment;
/** Options for confirming transactions as defined by the Solana web3.js library.*/
confirmOptions?: ConfirmOptions;
/** An optional set of programs that override the registered ones. */
programs?: Program[];
/** An abort signal that can be used to cancel the operation. */
signal?: AbortSignal;
};
This means, if you were providing some of these generic parameters as part of the first argument, you will need to pass them in the second argument instead.
// Before.
const { nft } = await metaplex.nfts().create({ ..., payer: someOtherPayer }).run();
// After, locally.
const { nft } = await metaplex.nfts().create({...}, { payer: someOtherPayer });
// After, globally (default to the current identity).
metaplex.rpc().setDefaultFeePayer(someOtherPayer);
const { nft } = await metaplex.nfts().create({...});
Additionally, if you were using abort signals within the run()
method before, you must now provide them within the second argument of the operation directly like so.
const abortController = new AbortController();
// Before.
const { nft } = await metaplex.nfts().create({...}).run({
signal: abortController.signal,
});
// After.
const { nft } = await metaplex.nfts().create({...}, {
signal: abortController.signal,
});
PDA helper methods have also been refactored to make use of Metaplex’s Program Repository which allows you to override default programs and register your own.
// Before.
const metadataAddress = findMetadataPda(mintAddress);
// After.
const metadataAddress = metaplex.nfts().pdas().metadata({
mint: mintAddress
});
Whilst the new way is more lengthy, it ensures the computed PDAs are using the programs you registered via metaplex.programs().register()
. You may even provide local overrides via the programs
property like so.
// After, with local program overrides.
const metadataAddress = metaplex.nfts().pdas().metadata({
mint: mintAddress,
programs,
});
Last but not least, the Candy Machine V2 module has been renamed to be explicitly called CandyMachineV2
to allow the latest Candy Machine V3 iteration to become the main Candy Machine module on the SDK. Therefore, if you were using the Candy Machine V2 module before, you will need to rename your clients like this.
// Before.
const candyMachineV2 = metaplex.candyMachines().create({...}).run();
// After.
const candyMachineV2 = metaplex.candyMachinesV2().create({...});
const candyMachineV3 = metaplex.candyMachines().create({...});
New Contributors
- @ovasylenko made their first contribution in #274
Full Changelog: js/v0.16.1...js/v0.17.0
js/v0.16.1
What's Changed
- Add Direct Buy & Sell operations by @zaxozhu in #289
- Add support for setting the default fee payer by @lorisleiva in #325
Full Changelog: js/v0.16.0...js/v0.16.1
js/v0.16.0
What's Changed
- Write custom typedoc plugin and add CI workflow to publish API references by @lorisleiva in #243
- Manually deploy API references instead by @lorisleiva in #244
- Add Find Listing by Receipt to Auction House by @zaxozhu in #242
- Add Find Purchase by Receipt to Auction House by @zaxozhu in #246
- Write docblock retroactively on token, system, CM and NFT modules by @lorisleiva in #249
- Refactor Auction House client by @zaxozhu in #251
- Format Amount: fix decimals with leading zeroes by @cosimo-rip in #250
- Require less data in transaction builders in Auction House by @zaxozhu in #258
- Add Deposit instruction by @zaxozhu in #265
- Add find bids, listings, purchases to Auction House by @zaxozhu in #252
- docs: fixed links by @tjkyner in #278
- Fix
keypairIdentity()
error on web (#202) by @KartikSoneji in #268 - Add optional publicKey to guestIdentity by @mcintyre94 in #280
- Implement Withdraw from Fees & Treasury by @zaxozhu in #276
- Auction House documentation by @zaxozhu in #282
- Add Withdraw instruction by @antey13 in #275
- Fix typo in
UninitializedWalletAdapterError
by @steveluscher in #290 - Add operations builders to AuctionHouseBuildersClient by @antey13 in #283
- Candy Machine: accurate Amount if a
tokenMintAddress
is specified, fixes [#234] by @cosimo-rip in #279 - Auction House Partial Sale by @zaxozhu in #291
- Update Solana on CI by @zaxozhu in #311
- Fix now() helper method by @lorisleiva in #322
- Fix "Can't use this function on unsized collection" error on nfts.update operation by @lorisleiva in #321
New Contributors
- @tjkyner made their first contribution in #278
- @KartikSoneji made their first contribution in #268
- @mcintyre94 made their first contribution in #280
- @antey13 made their first contribution in #275
- @steveluscher made their first contribution in #290
Full Changelog: js/v0.15.0...js/v0.16.0
js/v0.15.0
What's Changed
- Update token and system modules so they can be used as references for other modules by @lorisleiva in #231
- Add Find Bid by Receipt to Auction House by @zaxozhu in #235
- Refactor and fix transaction builder issues in NFT and Candy Machine modules by @lorisleiva in #236
- Update docblocks and readme by @lorisleiva in #240
Breaking Changes
All client methods now accept an object of input as a first argument. Whilst this is slightly less convenient it makes the high-level API a lot more consistent and easier to maintain in the future as we can more easily deprecate attributes and introduce new ones without adding breaking changes.
For instance, here's how you'd fetch an NFT by mint address before and after this release.
// Before
const nft = await metaplex.nfts().findByMint(mintAddress).run();
// After
const nft = await metaplex.nfts().findByMint({ mintAddress }).run();
The README has been updated accordingly.
Full Changelog: js/v0.14.1...js/v0.15.0
js/v0.14.1
What's Changed
- Fix: Force version 4.3.0 on autogenerated Candy Machine library until the package gets fixed
- Fix: file path for createNft.ts in readme by @Muhammad-Hasham-Khalid in #220
- Auction House Cancel Bid/Listing by @zaxozhu in #222
New Contributors
- @Muhammad-Hasham-Khalid made their first contribution in #220
Full Changelog: js/v0.14.0...js/v0.14.1
js/v0.14.0
What's Changed
- Add Auctioneer delegate & extend Bid to allow Auctioneer by @zaxozhu in #185
- Add support for SFTs and refactor NFT module accordingly by @lorisleiva in #206
- Add support for verifying creators by @lorisleiva in #208
- Support use authorities by @lorisleiva in #209
- Support NFT Collections by @lorisleiva in #210
- Make SDK errors easier to reuse by adding an option object by @lorisleiva in #211
- Improve token module and ensure missing token accounts are created by @lorisleiva in #212
- Add Execute Sale operation by @zaxozhu in #205
- Add support for token delegation, token freezing and burning NFTs by @lorisleiva in #215
Full Changelog: js/v0.13.3...js/v0.14.0
js/v0.13.3
What's Changed
- Add program address and version to Candy Machine model by @lorisleiva in #198
Full Changelog: js/v0.13.2...js/v0.13.3