From e60be10f5ee8807650752de0e26c0dd31c2c58d0 Mon Sep 17 00:00:00 2001 From: Jordan Date: Fri, 7 May 2021 15:17:09 +1200 Subject: [PATCH] Prerelease/2.0.0 alpha.0 (#295) --- .../promise/01_simple_connect/package.json | 2 +- .../promise/02_listen_to_blocks/package.json | 2 +- .../03_listen_to_balance_change/package.json | 2 +- .../package.json | 2 +- .../promise/05_unsubscribe/package.json | 2 +- .../promise/06_make_transfer/package.json | 2 +- .../promise/07_read_storage/package.json | 2 +- .../promise/08_read_storage_at/package.json | 2 +- .../package.json | 2 +- .../promise/10_system_events/package.json | 2 +- .../promise/11_transfer_events/index.js | 6 +- .../promise/11_transfer_events/package.json | 3 +- .../12_chose_fee_asset_to_pay_tx_fee/index.js | 7 +- .../package.json | 5 +- .../13_batch_all_transfer/package.json | 4 +- .../rx/01_simple_connect/package.json | 2 +- .../rx/02_listen_to_blocks/package.json | 2 +- .../03_listen_to_balance_change/package.json | 2 +- docs/examples/rx/04_unsubscribe/package.json | 2 +- docs/examples/rx/05_read_storage/package.json | 2 +- .../examples/rx/06_make_transfer/package.json | 2 +- .../examples/rx/07_system_events/package.json | 2 +- docs/examples/rx/08_transfer_events/index.js | 5 +- .../rx/08_transfer_events/package.json | 5 +- .../09_chose_fee_asset_to_pay_tx_fee/index.js | 5 +- .../package.json | 5 +- jest/integration.config.js | 2 - jest/unit.config.js | 2 - lerna.json | 2 +- packages/api/package.json | 4 +- packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 154 ------------------ packages/util/README.md | 146 ----------------- packages/util/package.json | 28 ---- packages/util/src/format/stripEndZero.ts | 26 --- packages/util/src/index.ts | 20 --- packages/util/src/is/integer.ts | 36 ---- packages/util/src/number/toFixed.ts | 35 ---- packages/util/src/types.ts | 15 -- packages/util/src/unit/formatUnits.spec.ts | 45 ----- packages/util/src/unit/formatUnits.ts | 38 ----- packages/util/src/unit/index.ts | 16 -- packages/util/src/unit/parseUnits.spec.ts | 48 ------ packages/util/src/unit/parseUnits.ts | 40 ----- scripts/generateSlimMetadataWrapper.js | 1 - test/package.json | 2 +- tsconfig.json | 2 - typedoc.config.js | 1 - 48 files changed, 37 insertions(+), 707 deletions(-) delete mode 100644 packages/util/CHANGELOG.md delete mode 100644 packages/util/README.md delete mode 100644 packages/util/package.json delete mode 100644 packages/util/src/format/stripEndZero.ts delete mode 100644 packages/util/src/index.ts delete mode 100644 packages/util/src/is/integer.ts delete mode 100644 packages/util/src/number/toFixed.ts delete mode 100644 packages/util/src/types.ts delete mode 100644 packages/util/src/unit/formatUnits.spec.ts delete mode 100644 packages/util/src/unit/formatUnits.ts delete mode 100644 packages/util/src/unit/index.ts delete mode 100644 packages/util/src/unit/parseUnits.spec.ts delete mode 100644 packages/util/src/unit/parseUnits.ts diff --git a/docs/examples/promise/01_simple_connect/package.json b/docs/examples/promise/01_simple_connect/package.json index 81a6cf8d3..ad14f411a 100644 --- a/docs/examples/promise/01_simple_connect/package.json +++ b/docs/examples/promise/01_simple_connect/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/02_listen_to_blocks/package.json b/docs/examples/promise/02_listen_to_blocks/package.json index d43d6aa11..81c49044e 100644 --- a/docs/examples/promise/02_listen_to_blocks/package.json +++ b/docs/examples/promise/02_listen_to_blocks/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/03_listen_to_balance_change/package.json b/docs/examples/promise/03_listen_to_balance_change/package.json index 89821a225..ef9c9f8f7 100644 --- a/docs/examples/promise/03_listen_to_balance_change/package.json +++ b/docs/examples/promise/03_listen_to_balance_change/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/04_listen_to_multiple_balances_change/package.json b/docs/examples/promise/04_listen_to_multiple_balances_change/package.json index 93b1a61ff..6566ed3ee 100644 --- a/docs/examples/promise/04_listen_to_multiple_balances_change/package.json +++ b/docs/examples/promise/04_listen_to_multiple_balances_change/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/05_unsubscribe/package.json b/docs/examples/promise/05_unsubscribe/package.json index 35e93111e..c9764efc1 100644 --- a/docs/examples/promise/05_unsubscribe/package.json +++ b/docs/examples/promise/05_unsubscribe/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/06_make_transfer/package.json b/docs/examples/promise/06_make_transfer/package.json index c73479494..5b876fae7 100644 --- a/docs/examples/promise/06_make_transfer/package.json +++ b/docs/examples/promise/06_make_transfer/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", + "@cennznet/api": "^2.0.0-alpha.0", "@polkadot/keyring": "^4.1.1" }, "devDependencies": { diff --git a/docs/examples/promise/07_read_storage/package.json b/docs/examples/promise/07_read_storage/package.json index ad2be3dbd..35663be32 100644 --- a/docs/examples/promise/07_read_storage/package.json +++ b/docs/examples/promise/07_read_storage/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/08_read_storage_at/package.json b/docs/examples/promise/08_read_storage_at/package.json index 7755aa68d..32f94ca35 100644 --- a/docs/examples/promise/08_read_storage_at/package.json +++ b/docs/examples/promise/08_read_storage_at/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/09_make_transfer_with_allowed_block_permissions_only/package.json b/docs/examples/promise/09_make_transfer_with_allowed_block_permissions_only/package.json index 19fe9139c..cda9170af 100644 --- a/docs/examples/promise/09_make_transfer_with_allowed_block_permissions_only/package.json +++ b/docs/examples/promise/09_make_transfer_with_allowed_block_permissions_only/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", + "@cennznet/api": "^2.0.0-alpha.0", "@polkadot/keyring": "^4.1.1" }, "devDependencies": { diff --git a/docs/examples/promise/10_system_events/package.json b/docs/examples/promise/10_system_events/package.json index 41fa60daf..fe2a342f8 100644 --- a/docs/examples/promise/10_system_events/package.json +++ b/docs/examples/promise/10_system_events/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/11_transfer_events/index.js b/docs/examples/promise/11_transfer_events/index.js index 1652b6de5..94b5e420f 100755 --- a/docs/examples/promise/11_transfer_events/index.js +++ b/docs/examples/promise/11_transfer_events/index.js @@ -4,8 +4,6 @@ const { Api } = require('@cennznet/api'); // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie) const { Keyring } = require('@polkadot/keyring'); -// utility function for random values -const { randomAsU8a } = require('@cennznet/util'); const AMOUNT = 10000; @@ -29,8 +27,8 @@ async function main () { // get the nonce for the admin key const nonce = await api.rpc.system.accountNextIndex(alicePair.address); - // create a new random recipient - const recipient = keyring.addFromSeed(randomAsU8a(32)).address; + // create a new recipient + const recipient = keyring.createFromUri('//TransferEventsTest').address; console.log('Sending', AMOUNT, 'from', alicePair.address, 'to', recipient, 'with nonce', nonce.toString()); diff --git a/docs/examples/promise/11_transfer_events/package.json b/docs/examples/promise/11_transfer_events/package.json index c34380363..c9aa17719 100644 --- a/docs/examples/promise/11_transfer_events/package.json +++ b/docs/examples/promise/11_transfer_events/package.json @@ -10,8 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", - "@cennznet/util": "^1.3.2", + "@cennznet/api": "^2.0.0-alpha.0", "@polkadot/keyring": "^4.1.1" }, "devDependencies": { diff --git a/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/index.js b/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/index.js index 04367d387..75a7a655d 100755 --- a/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/index.js +++ b/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/index.js @@ -5,9 +5,6 @@ const {Api} = require('@cennznet/api'); // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie) const { Keyring } = require('@polkadot/keyring'); -// utility function for random values -const {randomAsU8a} = require('@cennznet/util'); - const AMOUNT = 10000; const FEE_ASSET_ID = 16000; const MIN_REQUIRED_POOL_BALANCE = 1000000; @@ -44,8 +41,8 @@ async function main() { // get the nonce for the admin key const nonce = await api.rpc.system.accountNextIndex(alicePair.address); - // create a new random recipient - const recipient = keyring.addFromSeed(randomAsU8a(32)).address; + // create a new recipient + const recipient = keyring.addFromUri('//ChooseFeeAssetToPayTest').address; const [poolAssetBalance, poolCoreAssetBalance] = await queryPoolBalance(api); diff --git a/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/package.json b/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/package.json index 248b523c9..84327c9f5 100644 --- a/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/package.json +++ b/docs/examples/promise/12_chose_fee_asset_to_pay_tx_fee/package.json @@ -10,9 +10,8 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", - "@cennznet/util": "^1.3.2", - "@polkadot/keyring": "^4.1.1" + "@cennznet/api": "^2.0.0-alpha.0", + "@polkadot/keyring": "^6.3.1" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/promise/13_batch_all_transfer/package.json b/docs/examples/promise/13_batch_all_transfer/package.json index 1e5320dc2..02fefeb16 100644 --- a/docs/examples/promise/13_batch_all_transfer/package.json +++ b/docs/examples/promise/13_batch_all_transfer/package.json @@ -10,8 +10,8 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "1.3.5-alpha.1", - "@polkadot/keyring": "^4.1.1" + "@cennznet/api": "^2.0.0-alpha.0", + "@polkadot/keyring": "^6.3.1" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/01_simple_connect/package.json b/docs/examples/rx/01_simple_connect/package.json index 53565dbc5..d51d9ebf4 100644 --- a/docs/examples/rx/01_simple_connect/package.json +++ b/docs/examples/rx/01_simple_connect/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/02_listen_to_blocks/package.json b/docs/examples/rx/02_listen_to_blocks/package.json index 0c003e8fb..5764ab88b 100644 --- a/docs/examples/rx/02_listen_to_blocks/package.json +++ b/docs/examples/rx/02_listen_to_blocks/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/03_listen_to_balance_change/package.json b/docs/examples/rx/03_listen_to_balance_change/package.json index f8a85f8fc..c04a19cd1 100644 --- a/docs/examples/rx/03_listen_to_balance_change/package.json +++ b/docs/examples/rx/03_listen_to_balance_change/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/04_unsubscribe/package.json b/docs/examples/rx/04_unsubscribe/package.json index 090a28dcf..47c801cec 100644 --- a/docs/examples/rx/04_unsubscribe/package.json +++ b/docs/examples/rx/04_unsubscribe/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/05_read_storage/package.json b/docs/examples/rx/05_read_storage/package.json index 76519844c..2532afacb 100644 --- a/docs/examples/rx/05_read_storage/package.json +++ b/docs/examples/rx/05_read_storage/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/06_make_transfer/package.json b/docs/examples/rx/06_make_transfer/package.json index 8c4bc110d..d50525ba6 100644 --- a/docs/examples/rx/06_make_transfer/package.json +++ b/docs/examples/rx/06_make_transfer/package.json @@ -10,7 +10,7 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", + "@cennznet/api": "^2.0.0-alpha.0", "@polkadot/keyring": "^4.1.1" }, "devDependencies": { diff --git a/docs/examples/rx/07_system_events/package.json b/docs/examples/rx/07_system_events/package.json index 18259331e..2be5126ec 100644 --- a/docs/examples/rx/07_system_events/package.json +++ b/docs/examples/rx/07_system_events/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2" + "@cennznet/api": "^2.0.0-alpha.0" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/08_transfer_events/index.js b/docs/examples/rx/08_transfer_events/index.js index 931729f86..fe7de69c9 100644 --- a/docs/examples/rx/08_transfer_events/index.js +++ b/docs/examples/rx/08_transfer_events/index.js @@ -4,9 +4,6 @@ const { ApiRx } = require('@cennznet/api'); // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie) const { Keyring } = require('@polkadot/keyring'); -// utility function for random values -const { randomAsU8a } = require('@cennznet/util'); - // some constants we are using in this sample const AMOUNT = 10000; @@ -26,7 +23,7 @@ async function main () { const alicePair = keyring.addFromUri('//Alice'); // create a new random recipient - const recipient = keyring.addFromSeed(randomAsU8a(32)).address; + const recipient = keyring.addFromSeed('//TransferEventsTest').address; console.log('Sending', AMOUNT, 'from', alicePair.address, 'to', recipient); diff --git a/docs/examples/rx/08_transfer_events/package.json b/docs/examples/rx/08_transfer_events/package.json index fa351f3ac..00fe7d624 100644 --- a/docs/examples/rx/08_transfer_events/package.json +++ b/docs/examples/rx/08_transfer_events/package.json @@ -10,9 +10,8 @@ "start": "node index.js" }, "dependencies": { - "@cennznet/api": "^1.3.2", - "@cennznet/util": "^1.3.2", - "@polkadot/keyring": "^4.1.1" + "@cennznet/api": "^2.0.0-alpha.0", + "@polkadot/keyring": "^6.3.1" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/index.js b/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/index.js index 38d1284f5..0c48fb123 100755 --- a/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/index.js +++ b/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/index.js @@ -5,9 +5,6 @@ const {ApiRx} = require('@cennznet/api'); // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie) const { Keyring } = require('@polkadot/keyring'); -// utility function for random values -const {randomAsU8a} = require('@cennznet/util'); - const {combineLatest, of} = require('rxjs'); const {first, switchMap, tap} = require('rxjs/operators'); @@ -49,7 +46,7 @@ async function main() { const nonce = await api.rpc.system.accountNextIndex(alicePair.address).pipe(first()).toPromise();; // create a new random recipient - const recipient = keyring.addFromSeed(randomAsU8a(32)).address; + const recipient = keyring.addFromUri('//ChoseAssetToPayFee').address; queryPoolBalance(api).pipe( switchMap(([poolAssetBalance, poolCoreAssetBalance])=>{ diff --git a/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/package.json b/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/package.json index 1389e81dd..0ee3bc656 100644 --- a/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/package.json +++ b/docs/examples/rx/09_chose_fee_asset_to_pay_tx_fee/package.json @@ -11,9 +11,8 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2", - "@cennznet/util": "^1.3.2", - "@polkadot/keyring": "^4.1.1" + "@cennznet/api": "^2.0.0-alpha.0", + "@polkadot/keyring": "^6.3.1" }, "devDependencies": { "rimraf": "^3.0.2" diff --git a/jest/integration.config.js b/jest/integration.config.js index c5a2d6f17..cc46b6397 100644 --- a/jest/integration.config.js +++ b/jest/integration.config.js @@ -12,12 +12,10 @@ module.exports = { moduleNameMapper: { '@cennznet/api(.*)$': '/packages/api/src/$1', '@cennznet/types(.*)$': '/packages/types/src/$1', - '@cennznet/util(.*)$': '/packages/util/src/$1', }, modulePathIgnorePatterns: [ '/packages/api/build', '/packages/types/build', - '/packages/util/build', ], transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)'], testTimeout: 30000, diff --git a/jest/unit.config.js b/jest/unit.config.js index 52551bd77..dcdb290c5 100644 --- a/jest/unit.config.js +++ b/jest/unit.config.js @@ -12,12 +12,10 @@ module.exports = { moduleNameMapper: { '@cennznet/api(.*)$': '/packages/api/src/$1', '@cennznet/types(.*)$': '/packages/types/src/$1', - '@cennznet/util(.*)$': '/packages/util/src/$1', }, modulePathIgnorePatterns: [ '/packages/api/build', '/packages/types/build', - '/packages/util/build', ], transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)'] }; diff --git a/lerna.json b/lerna.json index 2fdf99af5..d9424b213 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "1.3.5-alpha.1" + "version": "^2.0.0-alpha.0" } diff --git a/packages/api/package.json b/packages/api/package.json index eb67914fc..9620228d8 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@cennznet/api", - "version":"1.3.5-alpha.1", + "version":"2.0.0-alpha.0", "description": "CENNZnet's javascript api", "keywords": [ "CENNZnet" @@ -19,7 +19,7 @@ "doc": "npx compodoc --tsconfig ../../tsconfig.json --hideGenerator --theme readthedocs --includes compodoc --output ../../docs/api" }, "dependencies": { - "@cennznet/types": "^1.3.5-alpha.1", + "@cennznet/types": "^2.0.0-alpha.0", "@polkadot/api": "4.5.1", "@polkadot/metadata": "4.5.1", "@polkadot/rpc-core": "4.5.1", diff --git a/packages/types/package.json b/packages/types/package.json index bf868c1f8..aae3bd4b6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@cennznet/types", - "version": "1.3.5-alpha.1", + "version": "2.0.0-alpha.0", "description": "Additional type definitions for the CENNZnet runtime", "author": "Centrality Developers ", "keywords": [ diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md deleted file mode 100644 index df5c66ff6..000000000 --- a/packages/util/CHANGELOG.md +++ /dev/null @@ -1,154 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [UNRELEASED] -- Update to @polkadot/types 4.5.1, @polkadot/util,keyring 6.3.1 - -# [0.14.4](https://github.com/cennznet/api.js/compare/v0.14.0...v0.14.4) (2019-06-18) - -### Bug Fixes -* fix ExtrinsicSignature#sign() when no doughnut and feeExchange set (#46) -* fix import from polkadot - - -# [0.14.0](https://github.com/cennznet/api.js/compare/v0.13.6...v0.14.0) (2019-06-18) - -### Features -* `decodeAddress`, `encodeAddress` & `setAddressPrefix` functions are exposed from `@cennznet/util` now - - - -## [0.13.5](https://github.com/cennznet/api.js/compare/v0.13.4...v0.13.5) (2019-05-24) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.13.4](https://github.com/cennznet/api.js/compare/v0.13.3...v0.13.4) (2019-05-21) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.13.3](https://github.com/cennznet/api.js/compare/v0.13.2...v0.13.3) (2019-05-21) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.13.2](https://github.com/cennznet/api.js/compare/v0.13.1...v0.13.2) (2019-05-16) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.13.1](https://github.com/cennznet/api.js/compare/v0.13.0...v0.13.1) (2019-05-10) - -**Note:** Version bump only for package @cennznet/util - - - - - -# [0.13.0](https://github.com/cennznet/api.js/compare/v0.12.3...v0.13.0) (2019-05-10) - - -### Dependency update - -* upgrade to @plugnet/api v0.78.100 ([3b50371](https://github.com/cennznet/api.js/commit/3b50371)), closes [#90](https://github.com/cennznet/api.js/issues/90) - - -### Features - -* prebundle metadata ([3b481af](https://github.com/cennznet/api.js/commit/3b481af)), closes [#87](https://github.com/cennznet/api.js/issues/87) - - - - - -## [0.12.3](https://github.com/cennznet/api.js/compare/v0.12.2...v0.12.3) (2019-05-07) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.12.2](https://github.com/cennznet/api.js/compare/v0.12.1...v0.12.2) (2019-05-07) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.12.1](https://github.com/cennznet/api.js/compare/v0.12.0...v0.12.1) (2019-05-06) - - -### Features - -* @cennznet/util add parseUnits and formatUnits ([448413b](https://github.com/cennznet/api.js/commit/448413b)), closes [#73](https://github.com/cennznet/api.js/issues/73) - - - - - -# [0.12.0](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.11.2...v0.12.0) (2019-04-30) - - -### Dependency update - -* upgrade to @plugnet/api 0.77.101 ([6e53046](https://bitbucket.org/centralitydev/cennznet-js/commits/6e53046)) - - - - - -## [0.11.2](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.11.1...v0.11.2) (2019-04-29) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.11.1](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.11.0...v0.11.1) (2019-04-24) - -**Note:** Version bump only for package @cennznet/util - - - - - -# [0.11.0](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.10.2...v0.11.0) (2019-04-17) - - -### Bug Fixes - -* missing deps ([6248afe](https://bitbucket.org/centralitydev/cennznet-js/commits/6248afe)), closes [#71](https://bitbucket.org/centralitydev/cennznet-js/issue/71) - - - - - -## [0.10.2](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.10.1...v0.10.2) (2019-04-11) - -**Note:** Version bump only for package @cennznet/util - - - - - -## [0.10.1](https://bitbucket.org/centralitydev/cennznet-js/compare/v0.10.0...v0.10.1) (2019-04-11) - -**Note:** Version bump only for package @cennznet/util diff --git a/packages/util/README.md b/packages/util/README.md deleted file mode 100644 index 3bc3995d4..000000000 --- a/packages/util/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# CENNZNet Util - -Utils for CENNZNet - -### Functions - -* [formatUnits](_cennznet_util.md#formatunits) -* [isSafeInteger](_cennznet_util.md#issafeinteger) -* [parseUnits](_cennznet_util.md#parseunits) -* [stripEndZero](_cennznet_util.md#stripendzero) -* [toFixed](_cennznet_util.md#tofixed) - ---- - -## Variables - - - -### `` INTEGER - -**● INTEGER**: *`RegExp`* = /^\d+$/ - -*Defined in [packages/util/src/is/integer.ts:15](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/is/integer.ts#L15)* - -___ - - -### `` STRIP_ZERO - -**● STRIP_ZERO**: *`RegExp`* = /^(.*?)(0*)$/ - -*Defined in [packages/util/src/format/stripEndZero.ts:17](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/format/stripEndZero.ts#L17)* - -___ - -## Functions - - - -### formatUnits - -▸ **formatUnits**(unValue: *`BN` \| `number` \| `string`*, decimals: *`number`*): `string` - -*Defined in [packages/util/src/unit/formatUnits.ts:25](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/unit/formatUnits.ts#L25)* - -format a amount from unit `un` to decimals passed in. - -**Parameters:** - -| Name | Type | Description | -| ------ | ------ | ------ | -| unValue | `BN` \| `number` \| `string` | \- | -| decimals | `number` | | - -**Returns:** `string` - -___ - - -### isSafeInteger - -▸ **isSafeInteger**(value: *`any`*): `boolean` - -*Defined in [packages/util/src/is/integer.ts:30](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/is/integer.ts#L30)* - -Check if the input is a integer - -*__example__*: - -```javascript -import { isInteger } from '@cennznet/util'; - -console.log('isInteger', isInteger(123)); // => true -console.log('isInteger', isInteger(123456789012345678)); // => false -console.log('isInteger', isInteger('123')); // => true -console.log('isInteger', isInteger('12.3')); // => false -``` - -**Parameters:** - -| Name | Type | -| ------ | ------ | -| value | `any` | - -**Returns:** `boolean` - -___ - - -### parseUnits - -▸ **parseUnits**(value: *`string` \| `number`*, decimals: *`number`*): `BN` - -*Defined in [packages/util/src/unit/parseUnits.ts:27](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/unit/parseUnits.ts#L27)* - -format a amount from unit `un` to decimals passed in. - -**Parameters:** - -| Name | Type | Description | -| ------ | ------ | ------ | -| value | `string` \| `number` | -| decimals | `number` | | - -**Returns:** `BN` - -___ - - -### stripEndZero - -▸ **stripEndZero**(value: *`string`*): `string` - -*Defined in [packages/util/src/format/stripEndZero.ts:23](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/format/stripEndZero.ts#L23)* - -trim all trailing zeros. return '' if only zero is passed in. - -**Parameters:** - -| Name | Type | Description | -| ------ | ------ | ------ | -| value | `string` | | - -**Returns:** `string` - -___ - - -### toFixed - -▸ **toFixed**(x: *`number`*): `string` - -*Defined in [packages/util/src/number/toFixed.ts:19](https://github.com/cennznet/api.js/blob/2ff9821/packages/util/src/number/toFixed.ts#L19)* - -convert number to string, without science notion - -**Parameters:** - -| Name | Type | Description | -| ------ | ------ | ------ | -| x | `number` | | - -**Returns:** `string` - -___ - diff --git a/packages/util/package.json b/packages/util/package.json deleted file mode 100644 index 5feda899a..000000000 --- a/packages/util/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@cennznet/util", - "version": "1.3.5-alpha.1", - "description": "utils for cennznet sdk", - "author": "Centrality Developers ", - "keywords": [ - "CENNZnet" - ], - "homepage": "https://github.com/cennznet/api.js/tree/master/packages/util", - "license": "Apache-2.0", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/cennznet/api.js.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@polkadot/util": "^6.3.1", - "@polkadot/util-crypto": "^6.3.1" - }, - "devDependencies": { - "@polkadot/keyring": "^6.3.1", - "@polkadot/types": "^4.2.1" - } -} diff --git a/packages/util/src/format/stripEndZero.ts b/packages/util/src/format/stripEndZero.ts deleted file mode 100644 index b2402506b..000000000 --- a/packages/util/src/format/stripEndZero.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { assert, isUndefined } from '@polkadot/util'; - -const STRIP_ZERO = /^(.*?)(0*)$/; - -/** - * trim all trailing zeros. return '' if only zero is passed in. - * @param value - */ -export default function stripEndZero(value: string) { - assert(!isUndefined(value), 'must not be undefined'); - return STRIP_ZERO.exec(value)[1]; -} diff --git a/packages/util/src/index.ts b/packages/util/src/index.ts deleted file mode 100644 index ecb13aa75..000000000 --- a/packages/util/src/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export * from '@polkadot/util'; - -export { default as stripEndZero } from './format/stripEndZero'; -export { default as isSafeInteger } from './is/integer'; -export { default as toFixed } from './number/toFixed'; -export * from './unit'; diff --git a/packages/util/src/is/integer.ts b/packages/util/src/is/integer.ts deleted file mode 100644 index c1da5afb4..000000000 --- a/packages/util/src/is/integer.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const INTEGER = /^\d+$/; -/** - * Check if the input is a integer - * @example - *
- * - * ```javascript - * import { isInteger } from '@cennznet/util'; - * - * console.log('isInteger', isInteger(123)); // => true - * console.log('isInteger', isInteger(123456789012345678)); // => false - * console.log('isInteger', isInteger('123')); // => true - * console.log('isInteger', isInteger('12.3')); // => false - * ``` - */ -export default function isSafeInteger(value: any): boolean { - if (typeof value === 'number') { - return Number.isSafeInteger(value); - } else { - return INTEGER.test(String(value)); - } -} diff --git a/packages/util/src/number/toFixed.ts b/packages/util/src/number/toFixed.ts deleted file mode 100644 index 0fd4fbf87..000000000 --- a/packages/util/src/number/toFixed.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * convert number to string, without science notion - * @param x - */ -export default function toFixed(x: number): string { - if (Math.abs(x) < 1.0) { - const [fixed, e] = x.toString().split('e-'); - if (!e) { - return x.toString(); - } - const decimal = fixed.split('.')[1] || ''; - return x.toFixed(decimal.length + parseInt(e)); - } else { - const [fixed, e] = x.toString().split('e+'); - if (!e) { - return x.toString(); - } - const [front, decimal = ''] = fixed.split('.'); - return front + decimal + new Array(parseInt(e) - decimal.length + 1).join('0'); - } -} diff --git a/packages/util/src/types.ts b/packages/util/src/types.ts deleted file mode 100644 index 78fa4eb53..000000000 --- a/packages/util/src/types.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019-2021 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export type { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/keyring/types'; diff --git a/packages/util/src/unit/formatUnits.spec.ts b/packages/util/src/unit/formatUnits.spec.ts deleted file mode 100644 index 3ea736f07..000000000 --- a/packages/util/src/unit/formatUnits.spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import BN from 'bn.js'; -import formatUnits from './formatUnits'; - -describe('format units', () => { - const cases: [string | number | BN, number, string][] = [ - ['123456', 3, '123.456'], - [123456, 3, '123.456'], - [new BN(1234567), 3, '1234.567'], - ['123456789012345678901234567890123456789', 18, '123456789012345678901.234567890123456789'], - ['123456789000000000000000000000000000000', 18, '123456789000000000000'], - [new BN('123456789000000000000000000000000000000'), 18, '123456789000000000000'], - ['1234567', 18, '0.000000000001234567'], - ]; - for (const [original, decimals, expectation] of cases) { - it(`normal cases ${original}-${decimals}`, () => { - expect(formatUnits(original, decimals)).toBe(expectation); - }); - } - - const sadCases: [string | number | BN, number, string][] = [ - ['123456abc', 3, 'not a safe integer'], - ['123.45', 3, 'not a safe integer'], - [123456789000000000000000000000000000000, 18, 'not a safe integer'], - [12321343513413413413241343241, 3, 'not a safe integer'], - ]; - for (const [original, decimals, expectation] of sadCases) { - it(`sad cases ${original}-${decimals}`, () => { - expect(() => formatUnits(original, decimals)).toThrow(expectation); - }); - } -}); diff --git a/packages/util/src/unit/formatUnits.ts b/packages/util/src/unit/formatUnits.ts deleted file mode 100644 index d486ccbd8..000000000 --- a/packages/util/src/unit/formatUnits.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { assert } from '@polkadot/util'; -import BN from 'bn.js'; -import stripEndZero from '../format/stripEndZero'; -import isSafeInteger from '../is/integer'; - -/** - * format a amount from unit `un` to decimals passed in. - * @param unValue - * @param decimals - */ -export default function formatUnits(unValue: BN | number | string, decimals: number): string { - assert(isSafeInteger(unValue), 'not a safe integer'); - let un = new BN(unValue).toString(); - un = un.padStart(decimals + 1, '0'); - const splitPos = un.length - decimals; - const intPart = un.slice(0, splitPos); - let fractionPart = un.slice(splitPos); - fractionPart = stripEndZero(fractionPart); - if (fractionPart !== '') { - return `${intPart}.${fractionPart}`; - } else { - return intPart; - } -} diff --git a/packages/util/src/unit/index.ts b/packages/util/src/unit/index.ts deleted file mode 100644 index 4e4e3ad1d..000000000 --- a/packages/util/src/unit/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export { default as formatUnits } from './formatUnits'; -export { default as parseUnits } from './parseUnits'; diff --git a/packages/util/src/unit/parseUnits.spec.ts b/packages/util/src/unit/parseUnits.spec.ts deleted file mode 100644 index 772592184..000000000 --- a/packages/util/src/unit/parseUnits.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import parseUnits from './parseUnits'; - -describe('parse units', () => { - const cases: [string | number, number, string][] = [ - ['123.456', 3, '123456'], - ['123456', 3, '123456000'], - [1234.56, 2, '123456'], - [123456, 2, '12345600'], - ['123456789012345678901.234567890123456789', 18, '123456789012345678901234567890123456789'], - ['123456789000000000000', 18, '123456789000000000000000000000000000000'], - ['0.000000000001234567', 18, '1234567'], - ['000001234567', 3, '1234567000'], - ['123', 0, '123'], - ['123.', 0, '123'], - ['123.000', 0, '123'], - ['123.000', 1, '1230'], - [0.00000000000001, 18, '10000'], - ]; - for (const [original, decimals, expectation] of cases) { - it(`normal cases ${original}-${decimals}`, () => { - expect(parseUnits(original, decimals).toString()).toBe(expectation); - }); - } - - const sadCases: [string | number, number, string][] = [ - ['123456abc', 3, 'not a integer'], - ['123.4567', 3, 'too much decimals'], - ]; - for (const [original, decimals, expectation] of sadCases) { - it(`sad cases ${original}-${decimals}`, () => { - expect(() => parseUnits(original, decimals)).toThrow(expectation); - }); - } -}); diff --git a/packages/util/src/unit/parseUnits.ts b/packages/util/src/unit/parseUnits.ts deleted file mode 100644 index 374d0f43d..000000000 --- a/packages/util/src/unit/parseUnits.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019 Centrality Investments Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { assert, isNumber } from '@polkadot/util'; -import BN from 'bn.js'; -import stripEndZero from '../format/stripEndZero'; -import isSafeInteger from '../is/integer'; -import toFixed from '../number/toFixed'; - -/** - * format a amount from unit `un` to decimals passed in. - * @param unValue - * @param decimals - */ -export default function parseUnits(value: string | number, decimals: number): BN { - const strValue = isNumber(value) ? toFixed(value) : value; - const [intPart, fractionalPart] = strValue.split('.'); - assert(isSafeInteger(intPart), 'intPart not a integer'); - let retValue = new BN(intPart).mul(new BN(10).pow(new BN(decimals))); - const fractionPart = stripEndZero(fractionalPart || ''); - if (fractionPart && fractionPart !== '') { - assert(isSafeInteger(fractionPart), 'fractionPart not a integer'); - if (fractionPart.length > decimals) { - throw new Error('too much decimals'); - } - retValue = retValue.add(new BN(fractionPart).mul(new BN(10).pow(new BN(decimals - fractionPart.length)))); - } - return retValue; -} diff --git a/scripts/generateSlimMetadataWrapper.js b/scripts/generateSlimMetadataWrapper.js index 464d7c1ab..e2dbb3f94 100644 --- a/scripts/generateSlimMetadataWrapper.js +++ b/scripts/generateSlimMetadataWrapper.js @@ -10,7 +10,6 @@ require('@babel/register')({ alias: { '^@cennznet/api(.*)': './packages/api/src\\1', '^@cennznet/types(.*)': './packages/types/src\\1', - '^@cennznet/util(.*)': './packages/util/src\\1', } }] ] diff --git a/test/package.json b/test/package.json index 0d2148e6e..8fe4cdd9a 100644 --- a/test/package.json +++ b/test/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "rxjs": "^6.6.0", - "@cennznet/api": "^1.3.2", + "@cennznet/api": "^1.3.4", "@polkadot/keyring": "^4.1.1" }, "devDependencies": { diff --git a/tsconfig.json b/tsconfig.json index 2e8fe944f..f367e25dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,8 +18,6 @@ "@cennznet/api": ["packages/api/src/index"], "@cennznet/types/*": ["packages/types/src/*"], "@cennznet/types": ["packages/types/src/index"], - "@cennznet/util/*": ["packages/util/src/*"], - "@cennznet/util": ["packages/util/src/index"], "@polkadot/api/augment": ["packages/types/src/interfaces/augment-api.ts"], "@polkadot/types/augment": ["packages/types/src/interfaces/augment-types.ts"] }, diff --git a/typedoc.config.js b/typedoc.config.js index 40ed006a2..9184d3977 100644 --- a/typedoc.config.js +++ b/typedoc.config.js @@ -18,7 +18,6 @@ module.exports = { "external-modulemap": [ ["@cennznet/api", "(.*packages\/api\/.*|node_modules\/@cennznet\/api\/.*)", "packages/api/README.md"], ["@cennznet/types", "(.*packages\/types\/.*|node_modules\/@cennznet\/types\/.*)", "packages/types/README.md"], - ["@cennznet/util", "(.*packages\/util\/.*|node_modules\/@cennznet\/util\/.*)", "packages/util/README.md"], ], "excludePrivate": true, "excludeProtected": true,