All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
release-it
config update.
- Add V4 registration contract addresses.
- Update
completeWithdrawal
:- If the user has only v4 balance,
completeWithdrawal
will withdraw v4 balance. - If the user has v3 balance,
completeWithdrawal
will try to withdraw both v3 and v4 balance. - If the user has v3 balance, and is not registered on-chain,
completeWithdrawal
will try to register the user and then withdraw both v3 and v4 balance. - If the v3 balance is not zero for an NFT,
completeWithdrawal
will only try to withdraw v3 balance.
- If the user has only v4 balance,
- v3 balance refers to withdrawal prepared using /v1/withdrawal API.
- v4 balance refers to withdrawal prepared using /v2/withdrawal API.
- Added on chain registration workflow for StarkEx V4 contract.
- Update
StarkSigner
interface to add 2 methods -signMessage
andgetYCoordinate
.
completeWithdrawal
now supports v3 and v4 withdrawal flow for registered users.
- Add V4 registration contract bindings.
- Remove experimental flag for primary sales functions
completeWithdrawal
has been updated to use V2 withdrawal logic for StarkEx V4 contract.- [BREAKING CHANGE]
completeWithdrawal
now requiresWalletConnection
instead of Eth Signer. See https://github.com/immutable/imx-core-sdk/blob/3.0.0/examples/completeEthWithdrawal.ts.
prepareWithdrawal
has been updated to use V2 withdrawal logic for StarkEx V4 contract.- Add StarkEx V4 contract bindings so that SDK can interact with the contract.
- [Experimental] RejectPrimarySale interface
- [Experimental] AcceptPrimarySale interface
- New version of generated open-api specs used throughout the SDK
CreateProject
is no longer available through the SDK, it can only be done at Immutable Hub
- Critical Babel security vulnerability
- vm2 security vulnerability
- A range of types, as per the current swagger definition of the Immutable X API
- all
v1/trade
functions, usev3/trade
instead - all
v1/order
functions, usev3/order
instead
- Updated README.md and examples to use sepolia in sandbox environment.
- Replace AlchemyProvider with EtherscanProvider for sepolia network in examples.
- Updated ethers to enable sepolia network
- Updated configuration to use sepolia in sandbox environment.
- Rerouted getTrade to v3 endpoint
- Added support for
v3/getTrade
endpoint
v1/getTrade
, usev3/getTrade
instead
- API docs update
- Added support to generate backwards compatible stark key using
generateLegacyStarkPrivateKey
for accounts created usingimx-sdk-js
versions before 1.43.5
- Fix for bug in generateLegacyStarkPrivateKey for some wallets, see #334 for details.
- Updated getOrder, listOrders, cancelOrder and listTrades to use thew new upgraded v3 endpoints
- Added support for listings & bids for the upgraded v3 endpoints of orders and trades
- Added examples for following endpoints
- Get token
- List tokens
- Get balance
- List balances
- List orders
- Get projects
- Get transfer
- List transfers
- Get trade
- List trades
- Get user
- Deposit nft
- Add metadata schema to collection
- Create metadata refresh
- Get metadata refresh errors
- Get metadata refresh results
- List metadata refreshes
- Get metadata schema
- Get withdrawal
- List withdrawals
- Create nft withdrawal
- Complete nft withdrawal
- Complete erc20 withdrawal
- Create erc20 withdrawal
- Fixed bug in stark grindkey logic to work when there is a leading zero in ethereum wallet private key.
- Readme bug fixes
- Removed unused parameter from
listMints
interface - Removed
getMintStatus
- Added Exchange transfers
- Added Moonpay primary nft checkout
- Method to generate deterministic stark key
- ImmutableX class now exposes apis for users who need access outside of basic workflows
- formatError to handle undefined error.response.data
- Deposit workflow for register and deposit NFT
- Correct the x-sdk-version header value
- Added methods from MetadataRefreshesApi
- Expose fewer public methods to make it easier for us to maintain the SDK.
- Introduced a single entry point for the SDK to improve discoverability
- Clear response and error types, no more Axios wrappers
- Simplified complex types required for creating trades, orders and transfers, no more SignableToken in the interface
- Make the deposit method on SDK consistent with the API and industry norms.
- SDK now handles L1 signature-protected APIs; no need to generate imx-signature separately for authentication headers
- Removed wallet-specific logic
- Removed the
ethereumjs-wallet
dependency.
- Added on all workflow methods a chain check comparing the current connected wallet chain versus the chain informed on setup phase
-
listMints endpoint accepts
max_timestamp
,min_timestamp
instead ofupdated_max_timestamp
,updated_min_timestamp
respectively -
[BREAKING CHANGE]
x-imx-eth-address
, andx-imx-eth-signature
headers are now required for createOrder, cancelOrder, createTransfer, createTransferV1, createWithdrawal, and createTrade endpoints. -
[BREAKING CHANGE] Removed the
getKeyPairFromPrivateKey
function -
[BREAKING CHANGE] Removed the
getStarkPublicKey
function -
[BREAKING CHANGE]
getConfig
method now requires environment parameters and returns the new ImmutableXConfiguration -
[BREAKING CHANGE] Renamed the
registerOffchainWithSigner
method toregisterOffchain
-
[BREAKING CHANGE] Renamed the
isRegisteredOnchainWithSigner
method toisRegisteredOnchain
-
[BREAKING CHANGE] Renamed the
transferWithSigner
method totransfer
-
[BREAKING CHANGE] Renamed the
batchNftTransferWithSigner
method tobatchNftTransfer
-
[BREAKING CHANGE] Renamed the
burnWithSigner
method toburn
-
[BREAKING CHANGE] Renamed the
prepareWithdrawalWithSigner
method toprepareWithdrawal
-
[BREAKING CHANGE] Renamed the
createOrderWithSigner
method tocreateOrder
-
[BREAKING CHANGE] Renamed the
cancelOrderWithSigner
method tocancelOrder
-
[BREAKING CHANGE] Renamed the
createTradeWithSigner
method tocreateTrade
-
Changed the
getAddress
method from theL2Signer
interface to be able to return bothstring
or asyncPromise<string>
- [BREAKING CHANGE] Removed the deprecated
registerOffchain
method - [BREAKING CHANGE] Removed the deprecated
isRegisteredOnchain
method - [BREAKING CHANGE] Removed the deprecated
transfer
method - [BREAKING CHANGE] Removed the deprecated
batchNftTransfer
method - [BREAKING CHANGE] Removed the deprecated
burn
method - [BREAKING CHANGE] Removed the deprecated
prepareWithdrawal
method - [BREAKING CHANGE] Removed the deprecated
createOrder
method - [BREAKING CHANGE] Removed the deprecated
cancelOrder
method - [BREAKING CHANGE] Removed the deprecated
createTrade
method
- Added
createOrderWithSigner
function to enable create order with l2signer - Added
cancelOrderWithSigner
function to enable cancel order with l2signer - Added
WalletConnection
type - Added
transferWithSigner
function to enable transfer with l2signer - Added
batchNftTransferWithSigner
function to enable batch transfer with l2signer - Added
prepareWithdrawalWorkflowWithSigner
function to enable prepare withdrawal with l2signer - Added
burnWithSigner
function to enable burn with l2signer - Added
getStarkPublicKeyWithXCoordinate
method to get the same public key as thegenerateStarkWallet
returns
createOrder
, usecreateOrderWithSigner
insteadcancelOrder
, usecancelOrderWithSigner
insteadtransfer
, usetransferWithSigner
insteadbatchNftTransfer
, usebatchNftTransferWithSigner
insteadprepareWithdrawalWorkflow
, useprepareWithdrawalWorkflowWithSigner
insteadburn
, useburnWithSigner
insteadgetStarkPublicKey
, use BaseSigner'sgetAddress
instead
- Added
registerOffchainWithSigner
function to enable register offchain user with L2Signer
- Changed
registerOffchainWorkflowWithSigner
to return a void promise and return early if wallet is already registered - RegisterUserRequest
email
property added - [BREAKING CHANGE]
Transfer
andListTransfersResponse
objects swappeddata
andtype
properties withtoken
registerOffchain
, useregisterOffchainWithSigner
instead
getAddress
method from BaseSigner- Mark
project_id
as required onCreateCollectionRequest
- Updated list orders OpenAPI spec to document the
include_fees
query param
- Added
BaseSigner
, a default implementation of the Stark L2Signer interface - Added
createTradeWithSigner
function to enable creating trade workflow with l2signer
- Mark
createTrade
as deprecated
- Include ethers as a dependency
- Resolved dependabot alerts https://github.com/immutable/imx-core-sdk/security/dependabot/3
- Added
generateStarkWalletFromSignedMessage
function to generate stark keys from EthAddress and Signature - Added
L2Signer
type
- Added
project_owner_address
property to collection objects returned fromGET
/v1/collections
public API endpoints. - Exported
L1Signer
andL2Signer
- Correctly exported type definitions with the published package.
- Updated the auto-generated API clients
- Added Workflows
createOrder
cancelOrder
createTrade
- Added SDK version headers
- Removed requirements for lowercase ETH addresses
- Regenerated clients to correctly indicate
nullable
fields. - Correct the response type fields which were indicated as possible undefined.
- Added Workflows
registerOffchain
isRegisteredOnchain
mint
transfer
batchNftTransfer
burn
getBurn
deposit
depositEth
depositERC20
depositERC721
prepareWithdrawal
completeEthWithdrawal
completeERC20Withdrawal
completeERC721Withdrawal
completeWithdrawal
cancelOrder
- Changelog and changelog management tool (release-it)
- Initial release