From 964828ec94bb5f76fd28d4dc4da786a5910c4ae0 Mon Sep 17 00:00:00 2001 From: alexloiko <13203602+alexloiko@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:25:31 +0300 Subject: [PATCH] ALL-2604 New package name - @tatumio/tatum-v1 (#919) * ALL-2604 New package name - @tatumio/tatum-v1 * ALL-2604 New package name - @tatumio/tatum-v1. Notice --------- Co-authored-by: Oleksandr Loiko --- README.md | 17 +++++++++++------ documentation/blockchain/marketplace/auction.md | 4 ++-- .../blockchain/marketplace/marketplace.md | 4 ++-- documentation/blockchain/nft/nft.md | 4 ++-- package.json | 2 +- src/blockchain/README.md | 2 +- src/ledger/README.md | 4 ++-- src/nft/README.md | 2 +- src/offchain/README.md | 2 +- src/security/README.md | 4 ++-- src/transaction/README.md | 2 +- src/wallet/README.md | 2 +- 12 files changed, 27 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 28e606b96e..5a5cfff94e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -# [Tatum API client](http://tatum.io/) · [![GitHub license](https://img.shields.io/npm/dm/@tatumio/tatum)](https://img.shields.io/npm/dm/@tatumio/tatum) [![GitHub license](https://img.shields.io/npm/v/@tatumio/tatum)](https://img.shields.io/npm/v/@tatumio/tatum) [![CI](https://github.com/tatumio/tatum-js/actions/workflows/main.yml/badge.svg)](https://github.com/tatumio/tatum-js/actions/workflows/main.yml) +# [Tatum API client](http://tatum.io/) · [![GitHub license](https://img.shields.io/npm/dm/@tatumio/tatum-v1)](https://img.shields.io/npm/dm/@tatumio/tatum-v1) [![GitHub license](https://img.shields.io/npm/v/@tatumio/tatum-v1)](https://img.shields.io/npm/v/@tatumio/tatum-v1) [![CI](https://github.com/tatumio/tatum-js/actions/workflows/main.yml/badge.svg)](https://github.com/tatumio/tatum-js/actions/workflows/main.yml) Tatum API client allows browsers and Node.js clients to interact with Tatum API. It includes the following core components. +> **Package name change** +> +> Important notice about package name change. Starting from version **1.37.36**, package name is changed from `@tatumio/tatum` to `@tatumio/tatum-v1`. Please update your package.json accordingly if you're using v1 sdk. + + > **Warning** > > Important notice about using ETH and CELO: Please upgrade to version 1.37.22 or newer (all previous versions depend on https://ethgasstation.info which will stop working from 12.12.2022) @@ -19,7 +24,7 @@ You can find API documentation at [Github Pages](https://tatumio.github.io/tatum ### Node.js 1. Install module: - `npm install @tatumio/tatum` + `npm install @tatumio/tatum-v1` ### Node.JS & Browser support Library is written in TypeScript with ES2017 as the target JS version. Library should work in Node.JS current LTS. @@ -82,7 +87,7 @@ If you want to work with TRON locally, you need to enter API Key for [Trongrid]( ```js // In Node.js -const Tatum = require('@tatumio/tatum'); +const Tatum = require('@tatumio/tatum-v1'); const btcWallet = await Tatum.generateWallet(Tatum.Currency.BTC, true); console.log(btcWallet); @@ -97,10 +102,10 @@ console.log(btcWallet); We support types within the repo itself. Please open an issue here if you find any wrong types. -You can use `@tatumio/tatum` as follows: +You can use `@tatumio/tatum-v1` as follows: ```typescript -import { generateWallet, Currency } from '@tatumio/tatum'; +import { generateWallet, Currency } from '@tatumio/tatum-v1'; const btcWallet = await generateWallet(Currency.BTC, true); ``` @@ -128,7 +133,7 @@ Tatum js use core node js modules or browser APIs that are not available in Reac ``` npm i rn-nodeify -g npm i react-native-randombytes --save -npm i @tatumio/tatum --save +npm i @tatumio/tatum-v1 --save rn-nodeify --install http,https,path,crypto,fs,stream,os --hack cd ios && pod install ``` diff --git a/documentation/blockchain/marketplace/auction.md b/documentation/blockchain/marketplace/auction.md index 6cb66667ea..964e04099c 100644 --- a/documentation/blockchain/marketplace/auction.md +++ b/documentation/blockchain/marketplace/auction.md @@ -18,7 +18,7 @@ import { sendAuctionBid, sendAuctionApproveNftTransfer, celoGetCurrentBlock -} from '@tatumio/tatum'; +} from '@tatumio/tatum-v1'; ``` ## Deploy the auction smart contract @@ -167,4 +167,4 @@ In the response you will get the transaction id, where you can find the contract settle.chain = Currency.CELO; console.log(await sendAuctionSettle(true, settle, 'https://alfajores-forno.celo-testnet.org')); -``` \ No newline at end of file +``` diff --git a/documentation/blockchain/marketplace/marketplace.md b/documentation/blockchain/marketplace/marketplace.md index d37fffa18d..ff06754a6d 100644 --- a/documentation/blockchain/marketplace/marketplace.md +++ b/documentation/blockchain/marketplace/marketplace.md @@ -13,7 +13,7 @@ import { sendMarketplaceCreateListing, sendCeloSmartContractReadMethodInvocationTransaction, sendAuctionApproveNftTransfer -} from '@tatumio/tatum'; +} from '@tatumio/tatum-v1'; ``` ## Deploy the smart contract for marketplace @@ -110,4 +110,4 @@ In case of cashbacks in custom erc20, you will need to give allowance from buyer r.methodABI = listing.abi.find(a => a.name === r.methodName) r.params = [] console.log(await sendCeloSmartContractReadMethodInvocationTransaction(r, 'https://data-seed-prebsc-2-s1.binance.org:8545')) -``` \ No newline at end of file +``` diff --git a/documentation/blockchain/nft/nft.md b/documentation/blockchain/nft/nft.md index 0d88fd6430..260e106e02 100644 --- a/documentation/blockchain/nft/nft.md +++ b/documentation/blockchain/nft/nft.md @@ -6,7 +6,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other N ## Import required libraries ```typescript -import { mintNFTWithUri } from '@tatumio/tatum'; +import { mintNFTWithUri } from '@tatumio/tatum-v1'; ``` ## Get NFTs @@ -99,4 +99,4 @@ const transactionHash = await updateCashbackForAuthorNFT(false, { cashbackValue: '15', fromPrivateKey: '0x315ea1dae65c75f088542161a0777525a8de1153904c745cb8131a9e0c632204' }); -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index 7db8c33dea..e633eaf90c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@tatumio/tatum", + "name": "@tatumio/tatum-v1", "version": "1.37.36", "description": "Tatum API client allows browsers and Node.js clients to interact with Tatum API.", "main": "dist/src/index.js", diff --git a/src/blockchain/README.md b/src/blockchain/README.md index 12d940f446..3a5ace5ecc 100644 --- a/src/blockchain/README.md +++ b/src/blockchain/README.md @@ -6,7 +6,7 @@ Just browse source code or [Github Pages](https://tatumio.github.io/tatum-js/) t ## Import required libraries ```typescript -import { btcGetCurrentBlock } from '@tatumio/tatum'; +import { btcGetCurrentBlock } from '@tatumio/tatum-v1'; ``` ## Get Current BTC block diff --git a/src/ledger/README.md b/src/ledger/README.md index b166201d17..272f352ac9 100644 --- a/src/ledger/README.md +++ b/src/ledger/README.md @@ -6,7 +6,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other l ## Import required libraries ```typescript -import { getAccountById } from '@tatumio/tatum'; +import { getAccountById } from '@tatumio/tatum-v1'; ``` ## Account endpoints @@ -298,4 +298,4 @@ const trade = await getTradeById('60ab440d58019206c876b4f6'); ### Get all active sell trades ```typescript const sellTrades = await getActiveSellTrades('60ab440d58019206c876b4f6'); -``` \ No newline at end of file +``` diff --git a/src/nft/README.md b/src/nft/README.md index 1a9a3da3d3..d42289e7e3 100644 --- a/src/nft/README.md +++ b/src/nft/README.md @@ -7,7 +7,7 @@ In following guide we will see how to work with NFT endpoints. Each endpoint bel First, we must import the required libraries from Tatum JS. ```typescript -import { mintNFTWithUri } from '@tatumio/tatum'; +import { mintNFTWithUri } from '@tatumio/tatum-v1'; ``` ## Deploy NFT Next, we must [deploy an NFT smart contract](https://apidoc.tatum.io/.php#operation/NftDeployErc721) on our blockchain of choice. diff --git a/src/offchain/README.md b/src/offchain/README.md index 832b9c5d5e..c2ef58fa4d 100644 --- a/src/offchain/README.md +++ b/src/offchain/README.md @@ -5,7 +5,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other o ## Import required libraries ```typescript -import { sendBitcoinOffchainTransaction } from '@tatumio/tatum'; +import { sendBitcoinOffchainTransaction } from '@tatumio/tatum-v1'; ``` ## Send bitcoin offchain transaction diff --git a/src/security/README.md b/src/security/README.md index 1d1d718a9a..735e75243f 100644 --- a/src/security/README.md +++ b/src/security/README.md @@ -5,7 +5,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other s ## Import required libraries ```typescript -import { getTransactionKMS } from '@tatumio/tatum'; +import { getTransactionKMS } from '@tatumio/tatum-v1'; ``` ## Get a KMS transaction @@ -21,4 +21,4 @@ await deleteTransactionKMS('60f990befd2f551040f512c0'); ## Complete a pending KMS transaction ```typescript await completePendingTransactionKMS('76da8509079338edd85cecb26ebd0fd644adb347d86e9e3c32bdead4ececb6e3'); -``` \ No newline at end of file +``` diff --git a/src/transaction/README.md b/src/transaction/README.md index 6ec4b3c8f7..fe567f235f 100644 --- a/src/transaction/README.md +++ b/src/transaction/README.md @@ -6,7 +6,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other t ## Import required libraries ```typescript -import { sendBitcoinTransaction } from '@tatumio/tatum'; +import { sendBitcoinTransaction } from '@tatumio/tatum-v1'; ``` ## Send bitcoin transaction - from address diff --git a/src/wallet/README.md b/src/wallet/README.md index d741e53ad1..e8eb819007 100644 --- a/src/wallet/README.md +++ b/src/wallet/README.md @@ -6,7 +6,7 @@ or [Github Pages](https://tatumio.github.io/tatum-js/) to see how to use other w ## Import required libraries ```typescript -import { generateWallet } from '@tatumio/tatum'; +import { generateWallet } from '@tatumio/tatum-v1'; ``` ## Generate a wallet