Skip to content

Latest commit

 

History

History
1524 lines (870 loc) · 106 KB

CHANGELOG.md

File metadata and controls

1524 lines (870 loc) · 106 KB

@thirdweb-dev/sdk

3.10.23

Patch Changes

3.10.22

Patch Changes

3.10.21

Patch Changes

3.10.20

Patch Changes

3.10.19

Patch Changes

3.10.18

Patch Changes

3.10.17

Patch Changes

3.10.16

Patch Changes

3.10.15

Patch Changes

3.10.14

Patch Changes

3.10.13

Patch Changes

3.10.12

Patch Changes

3.10.11

Patch Changes

3.10.10

Patch Changes

3.10.9

Patch Changes

3.10.8

Patch Changes

3.10.7

Patch Changes

3.10.6

Patch Changes

  • #834 b7fcae6e Thanks @adam-maj! - The signature of all contract.call methods has been updated to the following structure:

    function call(functionName: string, args: any[], overrides?: CallOverrides);

    Meaning that the following contract call in the old format:

    const owner = "0x...";
    const operator = "0x...";
    const overrides = { gasLimit: "10000", gasPrice: "10000" };
    
    const res = await contract.call("approve", owner, operator, overrides);

    Would now look like this with the changes:

    const owner = "0x...";
    const operator = "0x...";
    const overrides = { gasLimit: "10000", gasPrice: "10000" };
    
    const res = await contract.call("approve", [owner, operator], overrides);
  • Updated dependencies [839fce1f, 839fce1f]:

3.10.5

Patch Changes

3.10.4

Patch Changes

  • #703 6e9b9dba Thanks @adam-maj! - Add .prepare() to all other functions

  • #794 a6fce0f6 Thanks @shift4id! - Minor copy changes

  • #705 2ec28021 Thanks @joaquim-verges! - Remove hardcoded gasLimit on marketplace/pack

  • #830 805896c7 Thanks @adam-maj! - Make metadata optional on signature input

  • #796 b56511e2 Thanks @iketw! - [SDK] avoid recursively parsing the abi

  • #753 8ef5a6f2 Thanks @joaquim-verges! - Allow interacting with marketplace v3 extensions from getContract()

  • #758 4cbbad98 Thanks @adam-maj! - Add .prepare support for transaction deployments

  • #681 5f0493d0 Thanks @adam-maj! - Add support for ENS

  • #701 71532e5a Thanks @kumaryash90! - contracts v3.4.4

  • #702 33d1cc7f Thanks @jnsdls! - enable browser export

  • #797 de7b6196 Thanks @iketw! - [SDK] Remove duplicate creation in derived class

  • #721 1baed0b1 Thanks @adam-maj! - Add support for thirdweb generate

  • #761 52d37f01 Thanks @joaquim-verges! - Fix ABI parser for inputs with no names

  • #790 485abd06 Thanks @joaquim-verges! - Fix getPackContents for ERC20 rewards

  • #819 682f1c67 Thanks @adam-maj! - Update contract.call to have function types

  • #782 d8c1c943 Thanks @jnsdls! - parse ABIs correctly (knowing function names can be empty strings)

  • #820 08507611 Thanks @adam-maj! - Add magical types for thirdweb generate

  • #773 8463a176 Thanks @adam-maj! - Fix ENS cache infinite recursion

  • #832 e47ceafe Thanks @MananTank! - - Fix wallet.addListener "connect", "disconnect" event emit issue

    • update the paper sdk
  • #704 208d97e6 Thanks @joaquim-verges! - Export currency utils

  • #770 5c7c0923 Thanks @joaquim-verges! - Fix failed metadata fetch breaking marketplace get all listings calls

  • #735 ba9f593b Thanks @jnsdls! -

    New Functions

    getBlockNumber() - get the latest block number for a given chain

    Example: Get the latest block number for Ethereum.

    import { getBlockNumber } from "@thirdweb-dev/sdk";
    
    const blockNumber = await getBlockNumber({
      network: "ethereum",
    });
    
    console.log("Block number", blockNumber);
    getBlock() - get a block by number or hash

    Example: Get the latest block for Ethereum.

    import { getBlock } from "@thirdweb-dev/sdk";
    
    const block = await getBlock({
      network: "ethereum",
      block: "latest",
    });
    
    console.log("Block", block);
    getBlockWithTransactions() - get a block (with parsed transactions) by block number or hash

    Example: Get the latest block for Ethereum.

    import { getBlockWithTransactions } from "@thirdweb-dev/sdk";
    
    const blockWithTransactions = await getBlockWithTransactions({
      network: "ethereum",
      block: "latest",
    });
    
    console.log("Block", blockWithTransactions);
    console.log("Transactions", blockWithTransactions.transactions);
    watchBlockNumber() - watch for new blocks (real-time)

    Example: Watch for new blocks on Ethereum.

    import { watchBlockNumber } from "@thirdweb-dev/sdk";
    
    const unsubscribe = watchBlockNumber({
      network: "ethereum",
      onBlockNumber: (blockNumber) => {
        console.log("New block number", blockNumber);
      },
    });
    
    // Later unsubscribe from watching for new blocks
    unsubscribe();
    watchBlock() - watch for new blocks (real-time)

    Example: Watch for new blocks on Ethereum.

    import { watchBlock } from "@thirdweb-dev/sdk";
    
    const unsubscribe = watchBlock({
      network: "ethereum",
      onBlock: (block) => {
        console.log("New block", block);
      },
    });
    
    // Later unsubscribe from watching for new blocks
    unsubscribe();
    watchBlockWithTransactions() - watch for new blocks (real-time)

    Example: Watch for new blocks on Ethereum.

    import { watchBlockWithTransactions } from "@thirdweb-dev/sdk";
    
    const unsubscribe = watchBlockWithTransactions({
      network: "ethereum",
      onBlock: (blockWithTransactions) => {
        console.log("New block", blockWithTransactions);
        console.log("Transactions", blockWithTransactions.transactions);
      },
    });
    
    // Later unsubscribe from watching for new blocks
    unsubscribe();
    watchTransactions() - watch for transactions for a given address (real-time)

    Example: Watch for transactions on USD Coin (USDC) contract address.

    import { watchTransactions } from "@thirdweb-dev/sdk";
    
    const unsubscribe = watchTransactions({
      network: "ethereum",
      contractAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      onTransactions: (transactions) => {
        console.log("New transactions", transactions);
      },
    });
    
    // Later unsubscribe from watching for new transactions
    unsubscribe();
  • #767 9fa628f8 Thanks @adam-maj! - Make generate work with useContract

  • #737 abf609a4 Thanks @adam-maj! - Add multiply gas limit on Transaction class

  • Updated dependencies [d01b135d, 9ea43969, e3161e59, 71532e5a, 33d1cc7f, 6b145d4b, e2ec70c4, 1baed0b1, 2221f97d, 5c7c0923, 92d19070, 9a4a542c, b2d0ffb0]:

3.10.3

Patch Changes

3.10.2

Patch Changes

3.10.1

Patch Changes

3.10.0

Minor Changes

Patch Changes

3.9.5

Patch Changes

3.9.4

Patch Changes

3.9.3

Patch Changes

3.9.2

Patch Changes

3.9.1

Patch Changes

3.9.0

Minor Changes

  • af8cf40 Thanks @joaquim-verges! - ## Now supports Any EVM - Any Contract!

    • Can now create a ThirdwebSDK instance passing: chain id (any EVM chain) / chain name (only supported ones) / RPC url / Provider / Signer
    • Ability to pass and override any chain information in the new supportedChains property of the SDKOptions
    • Support for local nodes! Simply create an SDK with ChainId.Localhost or your own local URL to interact with contracts and wallets on your local node
    • While connected to a local node, request funds to the connected wallet using await sdk.wallet.requestFunds(0.1)
    • Any contract can now be used without passing any ABI, simply by importing the contract on thirdweb.com/chain/contract_address

Patch Changes

3.8.2

Patch Changes

3.8.1

Patch Changes

3.8.0

Minor Changes

Patch Changes

3.7.4

Patch Changes

3.7.3

Patch Changes

3.7.2

Patch Changes

3.7.1

3.7.0

Minor Changes

  • #519 f15733f Thanks @adam-maj! - The sdk.auth namespace has been removed with Auth major upgrade. Instead, use the ThirdwebAuth import from the @thirdweb-dev/auth package.

    import { PrivateKeyWallet } from "@thirdweb-dev/auth/evm";
    
    // Pass in domain and wallet to the constructor
    const wallet = new PrivateKeyWallet("0x...");
    const auth = new ThirdwebAuth(wallet, "example.com");
    
    // Auth functions no longer require domain to be passed in
    const payload = await auth.login();

    Additionally, AwsKmsWallet and AwsSecretsManager wallets have been moved into the @thirdweb-dev/wallets/evm entrypoint from the SDK.

    import {
      AwsKmsWallet,
      AwsSecretsManagerWallet,
    } from "@thirdweb-dev/wallets/evm";

Patch Changes

  • #493 f37e86b Thanks @joaquim-verges! - Move Solana dependencies to peer dependencies - please install them separately:

    npm install @thirdweb-dev/sdk @metaplex-foundation/js @project-serum/anchor

3.6.11

Patch Changes

3.6.10

Patch Changes

3.6.9

Patch Changes

3.6.8

Patch Changes

3.6.7

Patch Changes

3.6.6

Patch Changes

3.6.5

Patch Changes

  • #440 efc56fa Thanks @jnsdls! - [EVM] - providers are now re-used if the constructor options are identical leading to better batching, also introduced an additional max batch size param (250 by default)

3.6.4

Patch Changes

3.6.3

Patch Changes

3.6.2

Patch Changes

3.6.1

Patch Changes

3.6.0

Minor Changes

Patch Changes

  • #382 0ed77d2 Thanks @jnsdls! - Add constructorParams to ExtraPublishMetadataSchemaInput schema to support better deploys from releases.

  • #385 04a47e8 Thanks @adam-maj! - Add retroactive royalty and creator setting

3.5.2

Patch Changes

3.5.1

Patch Changes

3.5.0

Minor Changes

  • #329 5200d5d Thanks @adam-maj! - ### Breaking changes:

    1. claim conditions had some changes to support the new drop contracts:
    • maxClaimablePerTransaction is now named maxClaimablePerWallet
    • maxQuantity is now named maxClaimable
    1. signature minting now requires a to address to be set for security purposees

    Main Changes:

    • Support for new optimized Drop contracts
    • Support for new claim conditions with overrides
    • Don't allow zero address recipient on signature minting

Patch Changes

3.4.5

Patch Changes

3.4.4

3.4.3

Patch Changes

3.4.2

Patch Changes

3.4.1

Patch Changes

3.4.0

Patch Changes

3.3.1

Patch Changes

3.3.0

Minor Changes

  • #315 89ff921 Thanks @furqanrydhan! - fixing vite, multihash moved to non lazy load + cbor-x instead of cbor-web

  • #321 a57b4f0 Thanks @joaquim-verges! - [SDK] Implement sharded merkle trees for lightweight allowlist checks

    Behavior change

    We've made allowlists much more performant using sharded merkle trees. This allows us to process large allowlists (1M+) efficiently.

    To support those large allowlists, fetching claim conditions does not fetch the allowlist data by default anymore. Instead, you can pass an options object to additionally fetch the allowlist data along with the rest of the claim conditions data.

    This affects ClaimConditions.getActive() and ClaimConditions.getAll()

    Examples:

    const activeClaimCondition =
      await contract.erc721.claimConditions.getActive();
    // `activeClaimCondition.snapshot` is undefined
    const activeclaimConditionWithtAllowList =
      await contract.erc721.claimConditions.getActive({
        withAllowList: true,
      });
    // `activeClaimCondition.snapshot` returns the allowlist data

Patch Changes

3.2.6

Patch Changes

3.2.5

Patch Changes

3.2.4

3.2.3

3.2.2

Patch Changes

3.2.1

3.2.0

Minor Changes

  • #247 caf9795 Thanks @furqanrydhan! - AppURI detection now enabled

  • #238 6647f70 Thanks @joaquim-verges! - Unify NFT return types for EVM and Solana

    NFT Types are now consistent accross EVM (both ERC721 and ERC1155) and Solana

    This is a transparent upgrade, except for one type change for ERC1155 NFTs

    • nft.id is now of type string instead of BigNumber
    • edition.supply is now of type number instead of BigNumber

    This should make it much easer to deal with in applications, instead of having to manipulate BigNumber objects.

    Most people convert BigNumber to strings, which is compatible with this upgrade.

Patch Changes

3.1.2

Patch Changes

3.1.1

Patch Changes

3.1.0

Minor Changes

Patch Changes

3.0.8

Patch Changes

3.0.7

Patch Changes

3.0.6

Patch Changes

3.0.5

Patch Changes

3.0.4

Patch Changes

3.0.3

Patch Changes

3.0.2

Patch Changes

3.0.1

Patch Changes

3.0.0

Major Changes

  • #19 82627ea Thanks @joaquim-verges! - 3.0.0 update

    MAJOR VERSION CHANGE

    • 85% reduction in package size!
    • Custom contracts are now first class citizens

    Full changelog

    Breaking changes:

    1. Getting contracts is now async. This allows dynamically importing contracts and reduces the weight of the SDK significantly.

    before:

    const token = sdk.getToken(...)
    const nftDrop = sdk.getNFTDrop(...)

    after:

    const token = await sdk.getToken(...)
    const nftDrop = await sdk.getNFTDrop(...)
    1. New Extension API for custom contracts

    When working with custom contracts using await sdk.getContract(...), we now expose all the convenient high level APIs for each ERC standard top level. Calling a function that is not supported in your contract will give you an error with instructions on how to unlock that functionality.

    before:

    const contract = await sdk.getContract(...)
    // ERC721 contracts
    const contract.nft?.drop?.claim?.to(...)
    const contract.nft?.drop?.claim?.conditions.set(...)
    // ERC1155 contracts
    const contract.edition?.mint?.to(...)
    // ERC20 contracts
    const contract.token?.burn.tokens(...)

    after:

    const contract = await sdk.getContract(...)
    // ERC721 contracts
    const contract.erc721.claimTo(...)
    const contract.erc721.claimConditions.set(...)
    // ERC1155 contracts
    const contract.erc1155.mintTo(...)
    // ERC20 contracts
    const contract.erc20.burn(...)

Patch Changes

2.4.9

Patch Changes

2.4.8

Patch Changes

2.4.7

Patch Changes

2.4.6

Patch Changes

2.4.5

Patch Changes

2.4.4

Patch Changes

2.4.3

Patch Changes

2.4.2

Patch Changes

2.4.1

Patch Changes

2.4.0

Minor Changes

  • 3abe26c: initialze monorepo packages

Patch Changes

2.3.43

Patch Changes

  • d4abb09: Add support for Binance chains (BSC)
  • 274afb5: make input/output versions of the release metadata schemas
  • 86e3b58: use storage helpers from @thirdweb-dev/storage
  • 0c78b16: Fix listening to a single contract event
  • Updated dependencies [86e3b58]