diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aadbeb812e..59dc3bc9de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,6 +58,6 @@ jobs: - run: yarn lint - - run: yarn publish --access public + - run: yarn publish --access public --tag 1.x.x env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 5a5cfff94e..28e606b96e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ -# [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](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 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) @@ -24,7 +19,7 @@ You can find API documentation at [Github Pages](https://tatumio.github.io/tatum ### Node.js 1. Install module: - `npm install @tatumio/tatum-v1` + `npm install @tatumio/tatum` ### Node.JS & Browser support Library is written in TypeScript with ES2017 as the target JS version. Library should work in Node.JS current LTS. @@ -87,7 +82,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-v1'); +const Tatum = require('@tatumio/tatum'); const btcWallet = await Tatum.generateWallet(Tatum.Currency.BTC, true); console.log(btcWallet); @@ -102,10 +97,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-v1` as follows: +You can use `@tatumio/tatum` as follows: ```typescript -import { generateWallet, Currency } from '@tatumio/tatum-v1'; +import { generateWallet, Currency } from '@tatumio/tatum'; const btcWallet = await generateWallet(Currency.BTC, true); ``` @@ -133,7 +128,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-v1 --save +npm i @tatumio/tatum --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 964e04099c..6cb66667ea 100644 --- a/documentation/blockchain/marketplace/auction.md +++ b/documentation/blockchain/marketplace/auction.md @@ -18,7 +18,7 @@ import { sendAuctionBid, sendAuctionApproveNftTransfer, celoGetCurrentBlock -} from '@tatumio/tatum-v1'; +} from '@tatumio/tatum'; ``` ## 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 ff06754a6d..d37fffa18d 100644 --- a/documentation/blockchain/marketplace/marketplace.md +++ b/documentation/blockchain/marketplace/marketplace.md @@ -13,7 +13,7 @@ import { sendMarketplaceCreateListing, sendCeloSmartContractReadMethodInvocationTransaction, sendAuctionApproveNftTransfer -} from '@tatumio/tatum-v1'; +} from '@tatumio/tatum'; ``` ## 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 260e106e02..0d88fd6430 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-v1'; +import { mintNFTWithUri } from '@tatumio/tatum'; ``` ## 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 2b994fb7c0..ec92d61f01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@tatumio/tatum-v1", - "version": "1.37.37", + "name": "@tatumio/tatum", + "version": "1.37.38", "description": "Tatum API client allows browsers and Node.js clients to interact with Tatum API.", "main": "dist/src/index.js", "repository": "https://github.com/tatumio/tatum-js", diff --git a/src/blockchain/README.md b/src/blockchain/README.md index 3a5ace5ecc..12d940f446 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-v1'; +import { btcGetCurrentBlock } from '@tatumio/tatum'; ``` ## Get Current BTC block diff --git a/src/ledger/README.md b/src/ledger/README.md index 272f352ac9..b166201d17 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-v1'; +import { getAccountById } from '@tatumio/tatum'; ``` ## 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 d42289e7e3..1a9a3da3d3 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-v1'; +import { mintNFTWithUri } from '@tatumio/tatum'; ``` ## 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 c2ef58fa4d..832b9c5d5e 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-v1'; +import { sendBitcoinOffchainTransaction } from '@tatumio/tatum'; ``` ## Send bitcoin offchain transaction diff --git a/src/security/README.md b/src/security/README.md index 735e75243f..1d1d718a9a 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-v1'; +import { getTransactionKMS } from '@tatumio/tatum'; ``` ## 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 fe567f235f..6ec4b3c8f7 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-v1'; +import { sendBitcoinTransaction } from '@tatumio/tatum'; ``` ## Send bitcoin transaction - from address diff --git a/src/wallet/README.md b/src/wallet/README.md index e8eb819007..d741e53ad1 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-v1'; +import { generateWallet } from '@tatumio/tatum'; ``` ## Generate a wallet