Releases: trader-xyz/nft-swap-sdk
v0.20.0 - 128bit order nonces
(Somewhat) Breaking change: Now building orders default to 128bit numbers as nonces. Previously was using hex strings as nonces.
v0.19 - Helper functions for v4 orders
Adds a bunch of useful utility/helper functions for working with 0x v4 assets and orders.
Changeset:
- Adds typedoc documentation for all public functions in
NftSwapV4
class getMakerAsset
function addedgetTakerAsset
function addedvalidateSignature
function addedfetchBalanceForAsset
function addedcheckOrderCanBeFilledMakerSide
function addedcheckOrderCanBeFilledTakerSide
function addedgetErc20TotalIncludingFees
function added- Adds tests for all convenience functions
v0.18.0 Bug fixes + dependency updates
- Updates to TypeChain v8
- Handle buying NFT with ETH (or native token) better (bugfix-ish)
- Better order building guard rails (e.g. an NFT sell [i.e. NFT as the taker asset] order cannot use ETH.
v0.16.2 Fixes 0x v4 ERC1155 NFT fill order arguments
v0.16.1 - Fix V4 ERC1155 signatures
Fixes V4 ERC1155 signatures w/ EIP712 typed data.
v0.16.0 - 0x v4 multichain support
🎉 Enables multichain support for 0x v4. 🎉
Swap SDK v4 now supports Ethereum Mainnet, Polygon, Optimism, BSC, Fantom, and Celo, and Ropsten Testnet.
Arbitrum support coming soon.
Note: No breaking changes; Just wanted to increment to pin the multichain contract versions.
PRs:
#36
v0.15.2 Fixes 0x v3 `verifyOrderSignature` fn to validate correctly
Previously there would be a mismatch between 0x order signature and the type data signature (and the verifyOrderSignature would return false despite an order signature being valid). Now we use ethers to standardize the signature type and compare signatures from there, so any kind of signature passed should work. Special thanks to @rahuldamodar94 for reporting.
v0.15 - Expose SwapSdkV4 types
Note: This is technically a breaking change because some types were renamed. If you have types that suddenly don't work, add V3
or V4
to the end of them. This release specifies the SDK version of these types since we have two versions (v3 and v4) in the codebase at one time. (e.g. SwappableAsset
-> SwappableAssetV4
)
v0.14 0x v4 Mainnet support
🎉 Official mainnet support for Swap SDK is now live 🎉
v0.13 Orderbook support
Overview
Adds official hosted orderbook support for all supported 0x v4 chains.
Save Order
To save an order to the hosted orderbook:
await nftSwapSdk.saveOrder(signedOrder);
Fetch orders
// Search the orderbook for all offers to sell this NFT (CryptoCoven #9757)
const orders = await nftSwap.getOrders({
nftToken: "0x5180db8f5c931aae63c74266b211f580155ecac8",
nftTokenId: "9757",
sellOrBuyNft: "sell", // Only show asks (sells) for this NFT (excludes asks)
});
// Or search by unique nonce
const orders = await nftSwap.getOrders({
nonce: "0x31f42841c2db5173425b5223809cf3a38fede360",
});
https://docs.swapsdk.xyz/0x-v4/hosted-orderbook (Comprehensive docs forthcoming)
Relevant links:
All orders: https://api.trader.xyz/orderbook/orders
Status page: https://status.trader.xyz
Example from ETHDenver workshop: https://slides.com/johnj/nft-workshop#/40/0/6