Skip to content

Releases: metaplex-foundation/js

js/v0.17.3

26 Oct 22:13
e9a4ece
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: js/v0.17.2...js/v0.17.3

js/v0.17.2

17 Oct 14:38
cf7b368
Compare
Choose a tag to compare

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

12 Oct 08:07
75b18cf
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: js/v0.17.0...js/v0.17.1

js/v0.17.0

10 Oct 09:55
a983309
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: js/v0.16.1...js/v0.17.0

js/v0.16.1

03 Oct 10:38
7360346
Compare
Choose a tag to compare

What's Changed

Full Changelog: js/v0.16.0...js/v0.16.1

js/v0.16.0

30 Sep 11:41
14908aa
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: js/v0.15.0...js/v0.16.0

js/v0.15.0

16 Aug 11:12
e47872f
Compare
Choose a tag to compare

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

15 Aug 08:53
f3d12c0
Compare
Choose a tag to compare

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

Full Changelog: js/v0.14.0...js/v0.14.1

js/v0.14.0

05 Aug 17:17
30c3837
Compare
Choose a tag to compare

What's Changed

Full Changelog: js/v0.13.3...js/v0.14.0

js/v0.13.3

05 Aug 17:17
c3f3034
Compare
Choose a tag to compare

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