This folder contains code examples for usage of @imtbl/core-sdk
git clone https://github.com/immutable/imx-core-sdk.git
cd imx-core-sdk/examples
yarn install
Create a .env
file similar to .env.example
cp .env.example .env
Once you have saved the necessary values in your .env
file, follow the instructions below to run.
Update depositEth.ts with your deposit amount then run
yarn deposit-eth
Update depositNft.ts with your token address and id then run
yarn deposit-nft
Update createEthWithdrawal.ts with your withdrawal amount then run
yarn create-eth-withdrawal
Check completeEthWithdrawal.ts then run
yarn complete-eth-withdrawal
Update createProject.ts with your project details then run
yarn create-project
Update createCollection.ts with your collection details then run
yarn create-collection
Update mint.ts with your minting details then run
yarn mint
Update listMints.ts with your mint query details then run
yarn list-mints
Update getMint.ts with your mint id then run
yarn get-mint
Update createOrder.ts with your order details then run
yarn create-order
Update listOrders.ts with your order query details then run
yarn list-orders
Update getOrder.ts with your order id then run
yarn get-order
Update cancelOrder.ts with your order id then run
yarn cancel-order
Update createTrade.ts with your trade details then run
yarn create-trade
Update listTrades.ts with your trade query details then run
yarn list-trades
Update getTrade.ts with your trade id then run
yarn get-trade
Update transferNfts.ts with your transfer details then run
yarn transfer-nfts
Update transferEth.ts with your transfer details then run
yarn transfer-eth
Update transferErc20.ts with your transfer details then run
yarn transfer-erc20
Update createExchangeTransfer.ts with your exchange transfer details then run
yarn create-exchange-transfer
Update create-nft-primary-txn.ts with your exchange transfer details then run
yarn create-nft-primary-txn
Update createMetadataRefresh.ts with your refresh details then run
yarn create-metadata-refresh
Update getMetadataRefreshResults.ts with your refresh details then run
yarn get-metadata-refresh-results
Update listMetadataRefreshes.ts with your refresh details then run
yarn list-metadata-refreshes
Update getMetadataRefreshErrors.ts with your refresh details then run
yarn get-metadata-refresh-errors
Update addMetadataSchemaToCollection.ts with your metadata schema details then run
yarn add-metadata-schema-to-collection
Update getMetadataSchema.ts with your collection details then run
yarn get-metadata-schema
Update updateMetadataSchemaByName.ts with your metadata schema details then run
yarn update-metadata-schema-by-name
Update listTokens.ts with your token query details then run
yarn list-tokens
Update getToken.ts with the token contract address then run
yarn get-token
Update getBalance.ts with the user address and token address then run
yarn get-balance
Update listBalance.ts with the user address and then run
yarn list-balances
Update getProjects.ts with the desired fields and then run
yarn get-projects
Update getTransfer.ts with the transaction id and then run
yarn get-transfer
Update listTransfers.ts the desired fields and then run
yarn list-transfers
Update getAsset.ts the token address and token id and then run
yarn get-asset
Update listAssets.ts the desired fields and then run
yarn list-assets
Update getUser.ts with the wallet address and then run
yarn get-user
Update getWithdrawal.ts with the transaction id and then run
yarn get-withdrawal
Update lisWithdrawals.ts the desired field and then run
yarn list-withdrawals
Update createNftWithdrawal.ts with the token id and token address then run
yarn create-nft-withdrawal
Update completeNftWithdrawal.ts with the token id and token address then run
yarn complete-nft-withdrawal
Update createErc20Withdrawal.ts with the token address then run
yarn create-erc20-withdrawal
Update completeErc20Withdrawal.ts with the token id and token address then run
yarn complete-erc20-withdrawal
Update listCollections.ts with the wanted filters and run
yarn list-collections
Update listCollectionFilters.ts with the wanted filters and run
yarn list-collection-filters
Update updateCollection.ts with the all values filled in and run
yarn update-collection