Compare commits

...
253 Commits
Author SHA1 Message Date
github-actions[bot] 280a8f89bd [CI Skip] release/stable 8.4.1
skip-checks: true
2022-02-14 04:55:25 +00:00
Jaco 8140d44d8a 8.4.1 (#1408)
* 8.4.1

* Disable yarn scripts on CI

* 14
2022-02-14 06:51:08 +02:00
github-actions[bot] 8b7717961f [CI Skip] release/beta 8.3.4-12
skip-checks: true
2022-02-13 08:03:39 +00:00
Jaco e462046c82 Bump deps (#1407) 2022-02-13 09:59:33 +02:00
github-actions[bot] d261b2e464 [CI Skip] release/beta 8.3.4-11
skip-checks: true
2022-02-11 08:56:34 +00:00
Jaco 73898ada43 ss58registry test (#1406)
* ss58registry test

* ss58 reg update

* Remove require

* json resolve

* Include test output
2022-02-11 10:52:35 +02:00
github-actions[bot] bb0831a023 [CI Skip] release/beta 8.3.4-10
skip-checks: true
2022-02-09 05:54:23 +00:00
Jaco 012719b0bf Bump dev deps (#1405) 2022-02-09 07:50:07 +02:00
github-actions[bot] c8dc222435 [CI Skip] release/beta 8.3.4-9
skip-checks: true
2022-02-08 13:39:52 +00:00
Jaco 7e0588b690 Bump dev (#1403) 2022-02-08 15:33:01 +02:00
github-actions[bot] 3dc6e8a128 [CI Skip] release/beta 8.3.4-8
skip-checks: true
2022-02-07 11:53:37 +00:00
Jaco eb5cebfb7c Remove networks:sync (& cron check) (#1402) 2022-02-07 13:49:22 +02:00
github-actions[bot] 1f6417a9a8 [CI Skip] release/beta 8.3.4-7
skip-checks: true
2022-02-07 10:05:36 +00:00
Jaco 306592f6b1 Bump bn.js (#1401)
* Bump bn.js

* Adjust expecatation
2022-02-07 11:59:57 +02:00
github-actions[bot] 673945c8cb [CI Skip] release/beta 8.3.4-6
skip-checks: true
2022-02-05 17:55:53 +00:00
Jaco 8a30f168c3 Bump deps (#1400) 2022-02-05 19:51:39 +02:00
github-actions[bot] 35708e8414 [CI Skip] release/beta 8.3.4-5
skip-checks: true
2022-02-04 06:09:32 +00:00
Jaco fb55db7797 Bump deps (#1399) 2022-02-04 08:04:56 +02:00
github-actions[bot] 2aca02ecd4 [CI Skip] release/beta 8.3.4-4
skip-checks: true
2022-02-02 15:45:46 +00:00
Hoon Kim bba72e7191 replace plasm genesis with astar (#1397) 2022-02-02 17:41:27 +02:00
github-actions[bot] a3ea860144 [CI Skip] release/beta 8.3.4-3
skip-checks: true
2022-02-01 18:42:44 +00:00
Jakub Pánik 6e20baf317 Add basilisk 🐍 (#1396) 2022-02-01 20:38:41 +02:00
github-actions[bot] f8742c8523 [CI Skip] release/beta 8.3.4-2
skip-checks: true
2022-01-29 10:22:29 +00:00
Jaco c6b84b8c7e Bump deps (#1394) 2022-01-29 12:18:20 +02:00
github-actions[bot] 815c1f5eeb [CI Skip] release/beta 8.3.4-1
skip-checks: true
2022-01-26 05:44:45 +00:00
Jaco e7d454787d Swap to @scure/base (micro-base rename) (#1392) 2022-01-26 07:40:28 +02:00
github-actions[bot] d5c541db67 [CI Skip] release/beta 8.3.4-0
skip-checks: true
2022-01-24 11:34:02 +00:00
Jaco 2cf12616ed Use upstream @substrate/ss58-registry (#1391)
* Use upstream @substrate/ss58-registry

* Fix expectation

* Adjust
2022-01-24 13:29:05 +02:00
github-actions[bot] 2dee1c86e6 [CI Skip] release/stable 8.3.3
skip-checks: true
2022-01-23 06:34:58 +00:00
Jaco 023b1e8610 8.3.3 (#1390) 2022-01-23 08:30:08 +02:00
github-actions[bot] e9f3efa0ec [CI Skip] release/beta 8.3.3-3
skip-checks: true
2022-01-22 12:01:57 +00:00
Jaco 529119d9c3 Bump deps (#1389) 2022-01-22 13:56:45 +02:00
github-actions[bot] 3748d578e0 [CI Skip] release/beta 8.3.3-2
skip-checks: true
2022-01-21 14:05:47 +00:00
Jaco 6af09d344d Rococo genesisHash update (another day, another reset) (#1388) 2022-01-21 16:01:38 +02:00
github-actions[bot] 951ee2be17 [CI Skip] release/beta 8.3.3-1
skip-checks: true
2022-01-20 12:39:32 +00:00
Jaco 7d902d1b6e Sync ss58 registry (#1387) 2022-01-20 14:34:40 +02:00
github-actions[bot] cba373ab8a [CI Skip] release/beta 8.3.3-0
skip-checks: true
2022-01-17 06:31:11 +00:00
Jaco ab1c1bf311 Bump deps (incl. node-fetch security fix) (#1383) 2022-01-17 08:27:01 +02:00
github-actions[bot] 749afff2e6 [CI Skip] release/stable 8.3.2
skip-checks: true
2022-01-15 10:57:02 +00:00
Jaco c2fc0328b8 8.3.2 (#1382) 2022-01-15 12:52:13 +02:00
github-actions[bot] b41fc87737 [CI Skip] release/beta 8.3.2-11
skip-checks: true
2022-01-15 07:14:41 +00:00
Jaco 65c1cbf973 Expand networks tests with sorting (#1381) 2022-01-15 09:10:15 +02:00
github-actions[bot] 1a362a7f66 [CI Skip] release/beta 8.3.2-10
skip-checks: true
2022-01-14 10:22:11 +00:00
Jaco a86c26d0d7 Manual format of tsconfig.build.json (#1380) 2022-01-14 12:18:01 +02:00
github-actions[bot] 37df8b1f0e [CI Skip] release/beta 8.3.2-9
skip-checks: true
2022-01-14 05:43:08 +00:00
Jaco 0d963bbb46 Bump dependencies (#1379) 2022-01-14 07:38:11 +02:00
github-actions[bot] 1aa791eeb2 [CI Skip] release/beta 8.3.2-8
skip-checks: true
2022-01-13 11:13:49 +00:00
Jaco a051a84187 Adjust network sorting (primary by prefix, secondary by name) (#1375)
* djust network sortying (primary by prefix, secondary by name)

* Typo
2022-01-13 13:09:20 +02:00
github-actions[bot] 43476b9c5d [CI Skip] release/beta 8.3.2-7
skip-checks: true
2022-01-13 08:09:46 +00:00
Jaco d2bdac70d5 Update .mailmap 2022-01-13 10:05:40 +02:00
github-actions[bot] b5036c6fd7 [CI Skip] release/beta 8.3.2-6
skip-checks: true
2022-01-12 13:47:11 +00:00
Jaco 0db7738bd1 Adjust .mailmap (#1378) 2022-01-12 15:42:23 +02:00
github-actions[bot] 31cec49247 [CI Skip] release/beta 8.3.2-5
skip-checks: true
2022-01-12 08:19:26 +00:00
Jaco d259174901 Adjust with tsconfig.build.json inside packages (#1377) 2022-01-12 10:14:28 +02:00
github-actions[bot] 98932406b9 [CI Skip] release/beta 8.3.2-4
skip-checks: true
2022-01-11 10:51:25 +00:00
Jaco 5994784bf5 Sync with upstream ss58 registry (#1374) 2022-01-11 12:46:17 +02:00
github-actions[bot] 488ab9e543 [CI Skip] release/beta 8.3.2-3
skip-checks: true
2022-01-11 10:20:58 +00:00
Jaco 8af1b0556e Bump dev (w/ babel updates) (#1372) 2022-01-11 12:16:44 +02:00
github-actions[bot] ab27e68c3b [CI Skip] release/beta 8.3.2-2
skip-checks: true
2022-01-11 06:54:13 +00:00
Jaco 5fe3528672 Add tsconfig.build.json (#1371) 2022-01-11 08:49:59 +02:00
github-actions[bot] c065ecc45f [CI Skip] release/beta 8.3.2-1
skip-checks: true
2022-01-10 09:53:00 +00:00
Jaco 9356c52f28 Crypto init failure test (#1370) 2022-01-10 11:48:47 +02:00
github-actions[bot] d015a96773 [CI Skip] release/beta 8.3.2-0
skip-checks: true
2022-01-10 05:19:28 +00:00
Jaco d3b7e50d06 Sync ss58 (#1369) 2022-01-10 07:14:47 +02:00
github-actions[bot] fb95efed6b [CI Skip] release/stable 8.3.1
skip-checks: true
2022-01-09 06:29:50 +00:00
Jaco e9483c6940 8.3.1 (#1367)
* 8.3.1

* 8.3.1

* Rebuild w/ dev
2022-01-09 08:25:44 +02:00
github-actions[bot] c70f749502 [CI Skip] release/beta 8.2.3-30
skip-checks: true
2022-01-08 06:13:21 +00:00
Jaco 1049ddb135 Bump dev (#1366) 2022-01-08 08:08:28 +02:00
github-actions[bot] 7d533005e1 [CI Skip] release/beta 8.2.3-29
skip-checks: true
2022-01-06 14:19:55 +00:00
Jaco 76ac710c73 Bump deps (w/ main + types) (#1365) 2022-01-06 16:14:44 +02:00
github-actions[bot] c1417f5325 [CI Skip] release/beta 8.2.3-28
skip-checks: true
2022-01-06 13:47:37 +00:00
Jaco 10bc207240 Latest deps (incl. bn.js revert) (#1364)
* Bump dev (w/ no import.meta.url)

* Latest deps (incl. bn.js revert)

* CHANGELOG

* Adjust expectation
2022-01-06 15:42:40 +02:00
github-actions[bot] 66115fe674 [CI Skip] release/beta 8.2.3-27
skip-checks: true
2022-01-06 09:30:39 +00:00
Jaco 488f22190e Bump dev deps (#1362)
* Bump dev, re-order CHANGELOG

* Bump dev
2022-01-06 11:25:44 +02:00
github-actions[bot] 8ba369271d [CI Skip] release/beta 8.2.3-26
skip-checks: true
2022-01-06 08:02:46 +00:00
Jaco 73a136f3e2 Don't exclude *.spec.ts from tsconfig (#1361) 2022-01-06 09:57:18 +02:00
github-actions[bot] a368157bb8 [CI Skip] release/beta 8.2.3-25
skip-checks: true
2022-01-05 09:36:15 +00:00
Jaco a8cda40af9 Adjust detectPackage to handle (optional) type/path (#1360)
* Adjust detectPackage to handle (optional) type/path

* Bump dev

* Adjust expectations
2022-01-05 11:32:09 +02:00
github-actions[bot] 74f2a1e24c [CI Skip] release/beta 8.2.3-24
skip-checks: true
2022-01-05 09:01:46 +00:00
Jaco 833e98c158 Bump dev (w/ packageInfo path) (#1359) 2022-01-05 10:57:29 +02:00
github-actions[bot] 590d5dc79e [CI Skip] release/beta 8.2.3-23
skip-checks: true
2022-01-05 06:44:12 +00:00
Jaco 64aab16124 Bump dev (#1358) 2022-01-05 08:39:50 +02:00
github-actions[bot] 55131c321d [CI Skip] release/beta 8.2.3-22
skip-checks: true
2022-01-04 10:23:43 +00:00
Jaco 29808dec17 fetch-depth 0 (#1356) 2022-01-04 12:18:50 +02:00
github-actions[bot] 4bdafeb4b9 [CI Skip] release/beta 8.2.3-21
skip-checks: true
2022-01-04 09:56:58 +00:00
Jaco aa7587de28 Bump dev (w/ CONTRIBUTORS & umd) (#1355) 2022-01-04 11:52:07 +02:00
github-actions[bot] 7aaeccf53f [CI Skip] release/beta 8.2.3-20
skip-checks: true
2022-01-04 09:09:54 +00:00
Jaco e38562e8dc Use x-global inside x-randomvalues (#1354)
* Use x-global inside x-randomvalues

* CHANGELOG
2022-01-04 11:05:03 +02:00
github-actions[bot] 6fa855b6fc [CI Skip] release/beta 8.2.3-19
skip-checks: true
2022-01-04 07:07:07 +00:00
Jaco 295f0d59a5 Split sign and verify sr25519 tests (#1353) 2022-01-04 09:02:03 +02:00
github-actions[bot] 7aed9a727b [CI Skip] release/beta 8.2.3-18
skip-checks: true
2022-01-03 12:01:57 +00:00
Jaco 0859fe4b74 Small util return adjustments (#1351) 2022-01-03 13:56:54 +02:00
github-actions[bot] 25644185cc [CI Skip] release/beta 8.2.3-17
skip-checks: true
2022-01-02 06:12:13 +00:00
Jaco 636b9730b4 Bump deps (#1349)
* Bump deps

* new bn.js toJSON
2022-01-02 08:08:15 +02:00
github-actions[bot] e3b9c93df2 [CI Skip] release/beta 8.2.3-16
skip-checks: true
2022-01-01 16:34:09 +00:00
Jaco 000387aa2a 2022 (#1348) 2022-01-01 18:30:07 +02:00
github-actions[bot] ad59bd2f8d [CI Skip] release/beta 8.2.3-15
skip-checks: true
2022-01-01 08:11:11 +00:00
Jaco 4d2577d6d7 Bump dev (#1347) 2022-01-01 10:05:57 +02:00
github-actions[bot] 5765b68909 [CI Skip] release/beta 8.2.3-14
skip-checks: true
2022-01-01 07:30:07 +00:00
Jaco 3597a4eb4e 2022 (#1346) 2022-01-01 09:26:11 +02:00
github-actions[bot] 235e155efc [CI Skip] release/beta 8.2.3-13
skip-checks: true
2021-12-31 15:28:30 +00:00
Jaco cd7b4c1d38 Introduce detectOther (#1345) 2021-12-31 17:23:42 +02:00
github-actions[bot] 7261fc3d79 [CI Skip] release/beta 8.2.3-12
skip-checks: true
2021-12-31 09:47:18 +00:00
Jaco 5b36029cb2 __dirname mock (#1344)
* __dirname mock

* CHANGELOG
2021-12-31 11:43:13 +02:00
github-actions[bot] d40331f3f3 [CI Skip] release/beta 8.2.3-11
skip-checks: true
2021-12-31 07:57:09 +00:00
Jaco ef9e2c6425 Bump dev deps (#1343) 2021-12-31 09:52:26 +02:00
github-actions[bot] 2065b437e6 [CI Skip] release/beta 8.2.3-10
skip-checks: true
2021-12-29 05:30:45 +00:00
Jaco e58bd1e764 Bump deps (#1342) 2021-12-29 07:26:41 +02:00
github-actions[bot] e330ed5058 [CI Skip] release/beta 8.2.3-9
skip-checks: true
2021-12-28 09:35:28 +00:00
Jaco 00e856d9c4 Rococo genesis hashes (#1341)
* Rococo genesis hashes

* Bump deps (while we are here...)
2021-12-28 11:31:09 +02:00
github-actions[bot] 82625aa8d1 [CI Skip] release/beta 8.2.3-8
skip-checks: true
2021-12-25 10:17:03 +00:00
Jaco 1c06e53bf4 Bump berry (#1340) 2021-12-25 12:12:55 +02:00
github-actions[bot] 051181b84a [CI Skip] release/beta 8.2.3-7
skip-checks: true
2021-12-25 08:14:30 +00:00
Jaco 46dc13cf4e master CHANGELOG (#1339) 2021-12-25 10:09:30 +02:00
github-actions[bot] 7487a726fd [CI Skip] release/beta 8.2.3-6
skip-checks: true
2021-12-25 06:44:13 +00:00
Jaco d9023b38c9 Bump deps (#1338) 2021-12-25 08:39:24 +02:00
github-actions[bot] 908cfc8d06 [CI Skip] release/beta 8.2.3-5
skip-checks: true
2021-12-24 14:26:58 +00:00
Jaco ff42c18cb3 Bump deps (#1336)
* Bump deps

* yarn.lock
2021-12-24 16:22:04 +02:00
github-actions[bot] 0ebdffdfac [CI Skip] release/beta 8.2.3-4
skip-checks: true
2021-12-24 07:10:04 +00:00
Jaco 89a8095b60 Bump deps (#1335) 2021-12-24 09:06:13 +02:00
github-actions[bot] de2445dd90 [CI Skip] release/beta 8.2.3-3
skip-checks: true
2021-12-23 08:04:56 +00:00
Jaco 21156c7a1c Dev update with src linting (#1334) 2021-12-23 10:01:01 +02:00
github-actions[bot] 38cd255703 [CI Skip] release/beta 8.2.3-2
skip-checks: true
2021-12-23 07:03:05 +00:00
Jaco a5119bb937 Dev bump (w/ types key in export map) (#1333)
* Dev bump (w/ types key in export map)

* Fix build
2021-12-23 08:59:18 +02:00
github-actions[bot] 1dc9de6613 [CI Skip] release/beta 8.2.3-1
skip-checks: true
2021-12-22 06:40:47 +00:00
Jaco d9d7200941 Bump deps (w/ @noble/hashes 0.5.x) (#1332) 2021-12-22 08:36:05 +02:00
github-actions[bot] 9f6a0eb7e9 [CI Skip] release/beta 8.2.3-0
skip-checks: true
2021-12-20 09:43:35 +00:00
Jaco b9210715d9 Bump dev (w/ adjusted output linting) (#1329) 2021-12-20 11:39:44 +02:00
github-actions[bot] bff05aad32 [CI Skip] release/stable 8.2.2
skip-checks: true
2021-12-19 07:02:52 +00:00
Jaco 0f98c1ac22 8.2.2 2021-12-19 08:58:36 +02:00
github-actions[bot] f72d9a2a26 [CI Skip] release/beta 8.2.2-0
skip-checks: true
2021-12-19 06:54:36 +00:00
Jaco 1d0558a537 8.2.2 (#1328) 2021-12-19 08:50:43 +02:00
Jaco 94e7c05573 8.2.1 (#1327) 2021-12-19 08:17:43 +02:00
github-actions[bot] 12601805b1 [CI Skip] release/beta 8.1.3-30
skip-checks: true
2021-12-19 06:02:04 +00:00
Jaco 9194f417fe ss58 sync (w/ bumps) (#1326) 2021-12-19 07:58:12 +02:00
github-actions[bot] 6a3118e66c [CI Skip] release/beta 8.1.3-29
skip-checks: true
2021-12-15 14:16:06 +00:00
Jaco 4ccad202c5 Remove x-noble-* packages (all upstream) (#1323) 2021-12-15 16:12:06 +02:00
github-actions[bot] 96a019f6eb [CI Skip] release/beta 8.1.3-28
skip-checks: true
2021-12-15 13:56:40 +00:00
Jaco bad6a1b991 Bump dependencies (#1322) 2021-12-15 15:52:47 +02:00
github-actions[bot] d83e50ee19 [CI Skip] release/beta 8.1.3-27
skip-checks: true
2021-12-14 06:27:14 +00:00
Jaco feae08fc0f Adjust with tsconfig references (#1317)
* Adjust with tsconfig references

* tabs -> spaces

* Adjust

* Cleanup spacing

* Adjust

* eslint-specific config

* Bump deps

* Bumps

* Adjust

* Update tests
2021-12-14 08:23:16 +02:00
github-actions[bot] fdd32df12f [CI Skip] release/beta 8.1.3-26
skip-checks: true
2021-12-13 16:12:33 +00:00
Jaco 17a9b653ac Upstream @noble packages (#1319) 2021-12-13 18:07:48 +02:00
github-actions[bot] 6154454c38 [CI Skip] release/beta 8.1.3-25
skip-checks: true
2021-12-13 16:04:15 +00:00
Jaco ac0ec5be55 Bump noble (#1318) 2021-12-13 17:58:48 +02:00
github-actions[bot] 3802426046 [CI Skip] release/beta 8.1.3-24
skip-checks: true
2021-12-13 08:15:54 +00:00
Jaco d91b27b180 CHANGELOG (#1316) 2021-12-13 10:10:59 +02:00
github-actions[bot] 1f9a1a5f8a [CI Skip] release/beta 8.1.3-23
skip-checks: true
2021-12-13 06:18:04 +00:00
Jaco 6b3edffe55 Add tsconfig.base (#1315) 2021-12-13 08:13:26 +02:00
github-actions[bot] 7d46eb8423 [CI Skip] release/beta 8.1.3-22
skip-checks: true
2021-12-12 09:31:45 +00:00
Jaco a7eb0ed319 Bump tsc (#1313) 2021-12-12 11:26:25 +02:00
github-actions[bot] 227a34d55d [CI Skip] release/beta 8.1.3-21
skip-checks: true
2021-12-12 06:48:22 +00:00
Jaco 8a29dc2b57 Bump dependencies (#1312) 2021-12-12 08:43:47 +02:00
github-actions[bot] 88d1a71df8 [CI Skip] release/beta 8.1.3-20
skip-checks: true
2021-12-11 07:50:27 +00:00
Jaco 6f53068297 Type re-exports (#1310) 2021-12-11 09:45:49 +02:00
github-actions[bot] 5bf71dab41 [CI Skip] release/beta 8.1.3-19
skip-checks: true
2021-12-10 09:34:04 +00:00
Jared Norris b6f3dfb2ca Add Sora network (#1306)
* Add Sora network

* Fixed sort order

* Add Sora network
2021-12-10 11:29:30 +02:00
github-actions[bot] 4d3a2d9610 [CI Skip] release/beta 8.1.3-18
skip-checks: true
2021-12-10 09:18:41 +00:00
Jaco 7eaf013572 isPromise utility (#1308)
* isPromise utility

* Adjust

* Update packages/util/src/is/wasm.ts

* Update packages/util/src/is/codec.ts

* Adjust
2021-12-10 11:13:00 +02:00
github-actions[bot] c673b96963 [CI Skip] release/beta 8.1.3-17
skip-checks: true
2021-12-10 06:48:03 +00:00
Jaco c57eee5027 Remove deprecated substr from formatBalance (#1307)
* Remove deprecated substr from formatBalance

* Cleanups

* Adjust
2021-12-10 08:43:28 +02:00
github-actions[bot] 9efd2db377 [CI Skip] release/beta 8.1.3-16
skip-checks: true
2021-12-09 18:43:56 +00:00
Jared Norris c90246ec0b Add Sora network (#1305)
* Add Sora network

* Add Sora network

removed trailing slash ( lint complaint )

* Remove Sora from knownLedger

Dependency has not been updated yet
2021-12-09 20:39:21 +02:00
github-actions[bot] fbe1532f62 [CI Skip] release/beta 8.1.3-15
skip-checks: true
2021-12-09 08:49:33 +00:00
Jaco f514402b15 Small maintainability cleanups (#1304) 2021-12-09 10:44:56 +02:00
github-actions[bot] 5ea6992704 [CI Skip] release/beta 8.1.3-14
skip-checks: true
2021-12-09 08:15:32 +00:00
Jaco 7955022ce5 Helpers for 256/512 hashing (#1303)
* Helpers for 256/512 hashing

* Adjust u8aToU8a (u8a-only check earlier)

* Fix export

* Simplify

* revert
2021-12-09 10:10:51 +02:00
github-actions[bot] 000d097de2 [CI Skip] release/beta 8.1.3-13
skip-checks: true
2021-12-08 18:28:50 +00:00
Jaco 8a6c8b64df Adjust & dedupe global extraction tests (#1301) 2021-12-08 20:23:46 +02:00
github-actions[bot] 306e503d23 [CI Skip] release/beta 8.1.3-12
skip-checks: true
2021-12-08 11:20:18 +00:00
Jaco 648019f9d4 CC check adjustments (#1300) 2021-12-08 13:14:51 +02:00
github-actions[bot] 5e48cfbbaa [CI Skip] release/beta 8.1.3-11
skip-checks: true
2021-12-08 11:13:34 +00:00
Jaco 57825fc73b Sync ss58 registry (#1299) 2021-12-08 13:07:34 +02:00
github-actions[bot] 19ae016723 [CI Skip] release/beta 8.1.3-10
skip-checks: true
2021-12-08 10:51:49 +00:00
pan 8d7bed5865 add bifrost (#1296)
* add bifrost.finance

* update code style

* update code style
2021-12-08 12:47:05 +02:00
github-actions[bot] e019a3043a [CI Skip] release/beta 8.1.3-9
skip-checks: true
2021-12-08 09:38:50 +00:00
Jaco 9dfd013755 Dedupes for min/max (#1297) 2021-12-08 11:33:29 +02:00
github-actions[bot] a5df4ed764 [CI Skip] release/beta 8.1.3-8
skip-checks: true
2021-12-08 08:49:18 +00:00
Jaco a938a9f998 Some bip39-en cleanups (& tests) (#1295) 2021-12-08 10:43:43 +02:00
github-actions[bot] 1a6f81e2a7 [CI Skip] release/beta 8.1.3-7
skip-checks: true
2021-12-08 08:32:18 +00:00
Jaco 6ab85a42bb assertUnreachable (#1294) 2021-12-08 10:26:45 +02:00
github-actions[bot] 21c9e1aefd [CI Skip] release/beta 8.1.3-6
skip-checks: true
2021-12-07 17:50:02 +00:00
Jaco 58f740f3de Bump deps (#1293) 2021-12-07 19:44:48 +02:00
github-actions[bot] ddc6b83e96 [CI Skip] release/beta 8.1.3-5
skip-checks: true
2021-12-07 16:15:16 +00:00
Antoine Estienne 285e595930 Add eth uri keyring test (#1291)
* added gerald test address

* add test for addUri for eth

* lint
2021-12-07 18:10:44 +02:00
github-actions[bot] dce16d59e6 [CI Skip] release/beta 8.1.3-4
skip-checks: true
2021-12-07 15:42:22 +00:00
Jaco b8edcb0e65 Revert package inclusion (re-add x-*) (#1292) 2021-12-07 17:37:06 +02:00
github-actions[bot] b63607c4a0 [CI Skip] release/beta 8.1.3-3
skip-checks: true
2021-12-06 12:45:44 +00:00
Jaco c56c86432a Sync ss58 (#1290) 2021-12-06 14:41:06 +02:00
github-actions[bot] e52fe9a838 [CI Skip] release/beta 8.1.3-2
skip-checks: true
2021-12-06 08:28:17 +00:00
Jaco 06dca3d955 Bump dev (#1288) 2021-12-06 10:22:55 +02:00
github-actions[bot] 0908dbb861 [CI Skip] release/beta 8.1.3-1
skip-checks: true
2021-12-06 07:06:02 +00:00
Jaco e97410df52 Preserve all-caps word splits in stringCamelCase (#1287)
* Preserve all-caps word splits in `stringCamelCase`

* Additional tests

* Additional test

* Additional
2021-12-06 09:02:03 +02:00
github-actions[bot] faa6734329 [CI Skip] release/beta 8.1.3-0
skip-checks: true
2021-12-06 05:09:14 +00:00
Jaco f2f25815c1 Swap to upstream @noble/hashes (#1285)
* Swap to upstream `@noble/hashes`

* Lintin (import order)
2021-12-06 07:05:08 +02:00
github-actions[bot] 80785babb4 [CI Skip] release/stable 8.1.2
skip-checks: true
2021-12-05 11:20:24 +00:00
Jaco 59761086d0 8.1.2 (#1284)
* 8.1.2

* Adjust

* Adjust
2021-12-05 13:14:40 +02:00
github-actions[bot] 05c82721e8 [CI Skip] release/stable 8.1.1
skip-checks: true
2021-12-05 08:58:29 +00:00
Jaco 1b13cf0eea 8.1.1 (#1283) 2021-12-05 10:54:07 +02:00
github-actions[bot] e6777ece62 [CI Skip] release/beta 8.0.6-18
skip-checks: true
2021-12-05 08:15:04 +00:00
Jaco 7436976598 Add shims for x-* (not used, convenience) (#1282)
* Add shims for x-* (not used, convenience)

* Update packages/x-ws/src/shim.ts

* Remove (now) unused dependencies
2021-12-05 10:09:47 +02:00
github-actions[bot] 699ef952c3 [CI Skip] release/beta 8.0.6-17
skip-checks: true
2021-12-04 11:02:06 +00:00
Jaco cd9dc35475 Align x-noble with upstream (#1281)
* Align x-noble with upstream

* Remove own version of hashes

* @noble/hashes from master
2021-12-04 12:57:36 +02:00
github-actions[bot] ee7923c457 [CI Skip] release/beta 8.0.6-16
skip-checks: true
2021-12-04 07:16:16 +00:00
Jaco bd3f51844c Add BigInt shim (#1280) 2021-12-04 09:11:16 +02:00
github-actions[bot] 986dfe5006 [CI Skip] release/beta 8.0.6-15
skip-checks: true
2021-12-03 15:29:06 +00:00
Jaco 1eba41b2e6 Use @noble/secp256k1 (#1189)
* Use @noble/secp256k1

* Remove elliptic

* Remove @types

* -19

* verify uses recover internally

* fromSeed

* Init Noble utils inside cryptoInit

* remove bn.js dep (used from @polkadot/util)

* With x-noble-secp256k1

* Adjust

* Remove unused functions

* CHANGELOG

* Fix useless assignment

* Cleanup cryptoInit

* adjust hasher

* bn.js only via util

* align versions

* Remove x-secp256k1 (to be pulled in from master merge)

* Remove (now) invalid test

* Remove assertBigInt

* hasBigInt

* cleanups

* Apply suggestions from code review

* evmAddress fixes

* Extra comment
2021-12-03 17:23:46 +02:00
github-actions[bot] 88c2d16951 [CI Skip] release/beta 8.0.6-14
skip-checks: true
2021-12-03 14:28:20 +00:00
Jaco 303a57c4b5 Use secp256k1 from wasm (#1276)
* Use secp256k1 from wasm

* Expand & recover

* sign (tests failing)

* Pass onlyJs flags everywhere

* Adjust, all ready to actually pass... they don't

* naming

* Fix verify tests

* Adjust verify with non-hashing

* bump wasm

* Allow verify against address or publicKey

* Passing tests

* comment for wasm

* bi/bn versions for tweakadd

* Bumps

* Adjust
2021-12-03 16:23:41 +02:00
github-actions[bot] 7bfca0d40f [CI Skip] release/beta 8.0.6-13
skip-checks: true
2021-12-03 13:47:26 +00:00
Jaco 916187dbf2 Add x-noble-secp256k1 (#1279)
* Add x-noble-secp256k1

* Ignores

* Remove unused functions

* Fix jest
2021-12-03 15:42:57 +02:00
github-actions[bot] cfc598b30f [CI Skip] release/beta 8.0.6-12
skip-checks: true
2021-12-03 12:06:48 +00:00
Jaco 67bfe3a52e Bump deps (#1278) 2021-12-03 14:01:30 +02:00
github-actions[bot] 0299cba18e [CI Skip] release/beta 8.0.6-11
skip-checks: true
2021-12-02 13:51:53 +00:00
Jaco 182c6770d1 Bump dev (#1277) 2021-12-02 15:46:22 +02:00
github-actions[bot] c89ec8a964 [CI Skip] release/beta 8.0.6-10
skip-checks: true
2021-12-02 06:53:44 +00:00
Jaco dc63304735 Remove unused x-noble-hashes functions (#1275) 2021-12-02 08:48:44 +02:00
github-actions[bot] 9ce825de94 [CI Skip] release/beta 8.0.6-9
skip-checks: true
2021-12-02 05:37:08 +00:00
Jaco 3cb41c3b03 CHANGELOG 2021-12-02 07:32:47 +02:00
Jaco b1f9c37f6a x-bigint package (#1274)
* x-bigint package

* x-bigint in has*

* 8.0.6-8

* Adjust

* Adjust

* jest config

* Adjust

* Remove commented code

* Update README

* CHANGELOG
2021-12-02 07:29:44 +02:00
github-actions[bot] 4a69486993 [CI Skip] release/beta 8.0.6-8
skip-checks: true
2021-12-01 19:41:34 +00:00
Jaco 3a7ab0454f instanceof BigInt (#1273) 2021-12-01 21:37:21 +02:00
github-actions[bot] ecfc262bcd [CI Skip] release/beta 8.0.6-7
skip-checks: true
2021-12-01 18:41:25 +00:00
Jaco 776a653f42 Use BigInt only via xglobal (#1272)
* Use BigInt only via xglobal

* Adjust

* yarn
2021-12-01 20:37:11 +02:00
github-actions[bot] ee99ffdbb4 [CI Skip] release/beta 8.0.6-6
skip-checks: true
2021-12-01 16:15:34 +00:00
Jaco bda848f484 Expand has checks (#1271) 2021-12-01 18:11:03 +02:00
github-actions[bot] 82a63887a6 [CI Skip] release/beta 8.0.6-5
skip-checks: true
2021-12-01 14:25:07 +00:00
Jaco 50317d7dc3 Adjust for anon (#1269) 2021-12-01 16:19:50 +02:00
github-actions[bot] 39e6a3c048 [CI Skip] release/beta 8.0.6-4
skip-checks: true
2021-12-01 13:33:02 +00:00
Jaco db93c3076b Revert "Remove ed2curve dependency (#1265)" (#1267)
* Revert "Remove ed2curve dependency (#1265)"

This reverts commit 7e9b2770b6.

* Adjust
2021-12-01 15:28:42 +02:00
Jaco c8f0ad55c4 Split into @polkadot/x-noble-hashes (indicating diff from upstream) (#1268)
* Aplit @noble/hashes fork

* Re-add original (non-eslint)

* Original package imports in README

* package.json

* Update packages/x-noble-hashes/package.json

* CC ignore

* jest
2021-12-01 15:27:29 +02:00
github-actions[bot] 2104c50bd0 [CI Skip] release/beta 8.0.6-3
skip-checks: true
2021-12-01 09:56:10 +00:00
Jaco 7e9b2770b6 Remove ed2curve dependency (#1265)
* Remove edcurve dependency

* browser overrides

* Remove bundledDependencies
2021-12-01 11:51:55 +02:00
github-actions[bot] 8bf24c2f85 [CI Skip] release/beta 8.0.6-2
skip-checks: true
2021-12-01 08:04:23 +00:00
Jaco 60337a3b55 Adjust stale cron (#1264) 2021-12-01 09:59:19 +02:00
github-actions[bot] f527c80b5c [CI Skip] release/beta 8.0.6-1
skip-checks: true
2021-12-01 07:26:29 +00:00
Jaco bdd2bcf236 camelCase with mixed uppercase/numbers (#1260)
* camelCase with mixed uppercase/numbers

* consequtive capitals

* CHANGELOG

* CHANGELOG
2021-12-01 09:21:31 +02:00
github-actions[bot] cf370febf0 [CI Skip] release/beta 8.0.6-0
skip-checks: true
2021-12-01 07:19:00 +00:00
Hussein Ait-Lahcen 715ef6e7db Add Picasso Genesis Hash (#1261) 2021-12-01 09:14:36 +02:00
github-actions[bot] cc644e85bf [CI Skip] release/stable 8.0.5
skip-checks: true
2021-12-01 06:00:21 +00:00
Jaco c7b8d95097 Adjust sha3 expectation of BigInt availability (#1263) 2021-12-01 07:54:50 +02:00
github-actions[bot] 42de7cebe1 [CI Skip] release/stable 8.0.4
skip-checks: true
2021-11-30 05:16:59 +00:00
Jaco 2e520c933a 8.0.4 (#1259) 2021-11-30 07:12:55 +02:00
github-actions[bot] 5d1dd0dd27 [CI Skip] release/stable 8.0.3
skip-checks: true
2021-11-30 04:37:24 +00:00
Jaco 154f9f22f1 8.0.3 (#1258) 2021-11-30 06:33:07 +02:00
github-actions[bot] 98e398954e [CI Skip] release/beta 8.0.3-3
skip-checks: true
2021-11-29 16:38:10 +00:00
Jaco 3643c2e306 Adjust string{Camel, Pascal}Case (#1256) 2021-11-29 18:34:04 +02:00
github-actions[bot] 80195f6d11 [CI Skip] release/beta 8.0.3-2
skip-checks: true
2021-11-27 10:55:11 +00:00
Jaco 6bc648bfe0 Some tweaks on base{32, 58, 64} (#1254)
* Some tweaks on base{32, 58, 64}

* align

* rationale
2021-11-27 12:50:40 +02:00
github-actions[bot] c29b12d3b5 [CI Skip] release/beta 8.0.3-1
skip-checks: true
2021-11-27 07:28:39 +00:00
Jaco 8a5b514944 Additional tiny base64 decoder tests (#1252)
* Additional tiny base64 decoder tests

* Update packages/util-crypto/src/base64/encode.spec.ts

* Update packages/x-randomvalues/src/base64.spec.ts
2021-11-27 09:23:18 +02:00
github-actions[bot] 64fd66bd2a [CI Skip] release/beta 8.0.3-0
skip-checks: true
2021-11-27 06:09:53 +00:00
Jaco 75aa7ba2c7 Tiny base64 decoder (no Buffer dep) (#1251)
* Tiny base64 decoder (no Buffer dep)

* CHANGELOG
2021-11-27 08:05:34 +02:00
652 changed files with 7077 additions and 9803 deletions
+8 -1
View File
@@ -20,4 +20,11 @@
7.1.2
7.8.2
7.9.2
8.0.2
8.0.2
8.0.3
8.0.4
8.0.5
8.1.2
8.2.2
8.3.2
8.3.3
+16
View File
@@ -1,5 +1,21 @@
checks:
argument-count:
config:
threshold: 5
method-complexity:
config:
threshold: 7
method-count:
config:
threshold: 25
method-lines:
config:
threshold: 30
exclude_patterns:
- "**/*.spec.js"
- "**/*.spec.ts"
- "packages/networks/src/substrate.ts"
- "packages/util/src/is/utf8.ts"
- "packages/x-noble-hashes/src/**.ts"
- "packages/x-noble-secp256k1/src/**.ts"
+2 -1
View File
@@ -1 +1,2 @@
packages/util-crypto/src/noble-hashes/lib/*.ts
packages/x-noble-hashes/**/*.ts
packages/x-noble-secp256k1/**/*.ts
+3 -9
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util authors & contributors
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint.cjs');
@@ -6,18 +6,12 @@ const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
'.eslintrc.js',
'.github/**',
'.vscode/**',
'.yarn/**',
'**/build/*',
'**/coverage/*',
'**/node_modules/*'
...base.ignorePatterns
],
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.json'
'./tsconfig.eslint.json'
]
},
rules: {
-10
View File
@@ -1,10 +0,0 @@
---
title: SS58 registry is outdated
labels: ['ci', '@networks']
---
cc @polkadot-js/notifications
Discrepancies detected between https://github.com/paritytech/substrate/blob/master/ss58-registry.json and https://github.com/polkadot-js/common/blob/master/packages/networks/src/substrate.ts
Check the nightly cron output (or via `yarn networks:crosscheck` locally) and run `yarn networks:sync` to update. The output as found from the test includes:
+3 -1
View File
@@ -2,11 +2,13 @@ name: 'Lock Threads'
on:
schedule:
- cron: '15 1 * * *'
- cron: '15 1/3 * * *'
jobs:
lock:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: dessant/lock-threads@v2
with:
+3 -2
View File
@@ -8,11 +8,12 @@ jobs:
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v2
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
+7 -5
View File
@@ -12,16 +12,18 @@ jobs:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
+2
View File
@@ -9,6 +9,8 @@ jobs:
check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
-26
View File
@@ -1,26 +0,0 @@
name: SS58
on:
schedule:
- cron: '15 4/6 * * *'
jobs:
ss58:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: check
env:
CI_LOG: 123
run: |
yarn install --immutable | grep -v 'YN0013'
yarn build
yarn networks:crosscheck
- name: issue
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_BOT }}
with:
filename: .github/ss58-check.md
update_existing: true
+3 -1
View File
@@ -1,11 +1,13 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '50 1 * * *'
- cron: '50 1/3 * * *'
jobs:
stale:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/stale@v3
with:
+3 -2
View File
@@ -11,7 +11,9 @@ tmp/
.env.development.local
.env.test.local
.env.production.local
.idea
.npmrc
.vscode
.yarn/*
!.yarn/releases
!.yarn/plugins
@@ -24,5 +26,4 @@ yarn-debug.log*
yarn-error.log*
store.db
store.db.compacted
.idea
.vscode
tsconfig.*buildinfo
+3
View File
@@ -0,0 +1,3 @@
Jaco <jacogr@gmail.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> <action@github.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Github Actions <action@github.com>
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/dev authors & contributors
// Copyright 2017-2022 @polkadot/dev authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/prettier.cjs');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-631
View File
File diff suppressed because one or more lines are too long
+768
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.0.1.cjs
yarnPath: .yarn/releases/yarn-3.1.1.cjs
+105 -1
View File
@@ -1,6 +1,110 @@
# CHANGELOG
## 8.0.2
## 8.4.1 Feb 14, 2022
Changes:
- Use upstream `@substrate/ss58-registry` (instead of duplicating here)
- Swap `micro-base` to `@scure/base` (same package, audited)
- Bump `bn.js` library to latest 5.2.0 (has impact on e.g. API)
- Upgrade dependencies to latest stable versions
## 8.3.3 Jan 23, 2022
Changes:
- Sync with upstream Substrate ss58 registry
## 8.3.2 Jan 15, 2022
Changes:
- Correct network sorting (primary by prefix, secondary by name)
- Sync with upstream Substrate ss58 registry
## 8.3.1 Jan 9, 2022
Changes:
- Fix `util-crypto` bundle generation (adjust `x-randomvalues`)
- Add all known Rococo genesis hashes
- `detectPackage` now uses optional `path` & `type` (`esm` or `cjs`) info
- Ensure package paths are available via ESM and CJS
- Upgrade 3rd party dependencies to latest
- Pin `@noble/*` to latest known tested integrated versions
## 8.2.2 Dec 19, 2021
Contributed:
- Add Bifrost Ledger capabilities (Thanks to https://github.com/awesomepan)
- Add Sora genesisHash & Ledger capabilities (Thanks to https://github.com/NoodleSploder)
Changes:
- Add `isPromise` check utility function
- Add `assertUnreachable` for codepaths that should not be followed
- Preserve all-caps word splits in `stringCamelCase`
- Adjust `x-*` fallbacks via `x-global/extractGlobal`
- Sync with upstream Substrate ss58 registry
- Additional tests for `bip39` wordlists
- Maintainability cleanups
- Update to latest Ledger dependencies
- Swap to upstream `@noble` packages
- Adjust tsconfig with references
- 8.2.2 (8.2.1 failed CI due to incorrect CHANGELOG)
## 8.1.2 Dec 5, 2021
Changes:
- Adjustment to non-full-word consecutive uppercase via `string{Camel, Pascal}Case`
## 8.1.1 Dec 5, 2021
Contributed:
- Add Picasso genesisHash (Thanks to https://github.com/hussein-aitlahcen)
Changes:
- Allow for use of `secp256k1` from `@polkadot/wasm-crypto`
- Adjust `isBigInt` to not do `instanceof` check
- Ensure consequtive capitals in `stringCamelCase` are lowercased
- Use `@polkadot/x-bigint` for `BigInt` constructor
- Split `@noble/hashes` fork into `x-noble-hashes`
- Add `@noble/secp256k1` fork into `x-noble-secp256k1`, replaces `elliptic`
## 8.0.5 Dec 1, 2021
Changes:
- Adjust sha3 expectation of `BigInt` availability
## 8.0.4 Nov 30, 2021
Changes:
- Adjust `stringCamelCase` with leading `_`
## 8.0.3 Nov 30, 2021
Changes:
- Remove `Buffer` usage in `x-randomvalues`
- Adjust `stringCamelCase` for all-caps parts
## 8.0.2 Nov 26, 2021
Changes:
+46
View File
@@ -0,0 +1,46 @@
1258 Jaco 8.4.1 (#1408)
9 Antoine Estienne Add eth uri keyring test (#1291)
6 Amaury Martiny Add tests from Rust (#283)
5 kwingram25 Add BN consts and timeToString (#610)
4 Adam Dossa Update Polymesh Genesis Hash (#1193)
4 Jakub Pánik Add basilisk 🐍 (#1396)
3 Luke Schoen docs: Fix example in readme since we use default imports (#243)
2 AndreasGassmann feat(dependencies): remove moment.js (#530)
2 Gav Wood Fix stake:unstake (#182)
2 Hyungsuk Kang Add cross client Encryption/Decryption (#496)
2 Jared Norris Add Sora network (#1306)
2 Nantian fix bigint type (#1079)
2 pan add bifrost (#1296)
2 Stefanie Doll Add missing dependencies to util-crypto (#424)
1 Agustinus Theodorus docs: fix typo in naclSeal docs. (#1005)
1 Alexander Krupenkin Added ECDSA keypair support (#589)
1 alexdniep added equilibrium slip44; added equilibrium genesis hash (#984)
1 amphineko chore: fix typo in versionDetect messages (#941)
1 Axel Chalon Simplify @polkadot/keyring KeyringPair (#419)
1 Brad Larson [FIX] Adjust error message (#646)
1 Eliott Teissonniere add nodle ledger specs (#1089)
1 h4x3rotab Throws an error when signing with a locked keypair (#578)
1 Harry Liu Update README.md (#446)
1 Hoon Kim replace plasm genesis with astar (#1397)
1 Hussein Ait-Lahcen Add Picasso Genesis Hash (#1261)
1 Igor Support genshiro network (#1148)
1 Jake Naviasky Add evmToAddress and addressToEvm crypto utils. (#705)
1 JesseAbram added check if valid address to docs (#440)
1 joe petrowski Add example for multisig address creation (#590)
1 Lezek123 logger - wildcard include/exclude with DEBUG env (#932)
1 Lovesh Harchandani Add Dock network id for address generation (#640)
1 Mario Neises remove redudant export (#257)
1 Miguel Hervas Add CFG Ledger Support (#1057)
1 nahuseyoum Reserving 65 for Aventus based on the new extended range (#871)
1 qwer951123 Add acala genesis (#1161)
1 Raoul Millais Fix yarn add instructions in x-global README (#873)
1 Raymond Zhong Add Edgeware ledger app (#1006)
1 Reto Trinkler Adding 4 as address type of ss58 for Katal Chain (#639)
1 Rocco Musolino remove doc broken link (#697)
1 Song Zhou Add in ability to encrypt/decrypt msg with keyring (#1070)
1 Thibaut Sardan add hasLedgerSupport prop to networks (#835)
1 Tomokazu Kozuma fix comment (#1119)
1 Tore19 Add stafi genesis hash (#1096)
1 Wei Tang ss58: add Kulupu prefix to the list (#595)
1 WoeOm Handing high precision scenes (#450)
1 Yuri Extra check for process for browser bundles (#923)
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util authors & contributors
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs');
+3 -4
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util authors & contributors
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
@@ -13,8 +13,7 @@ module.exports = Object.assign({}, config, {
'@polkadot/util-(crypto)(.*)$': '<rootDir>/packages/util-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/util(.*)$': '<rootDir>/packages/util/src/$1',
'@polkadot/x-(fetch|randomvalues|textdecoder|textencoder|ws)(.*)$': '<rootDir>/packages/x-$1/src/node',
'@polkadot/x-global(.*)$': '<rootDir>/packages/x-global/src/$1',
'@polkadot/x-rxjs(.*)$': '<rootDir>/packages/x-rxjs/src/$1'
'@polkadot/x-(bigint|global)(.*)$': '<rootDir>/packages/x-$1/src/$2',
'@polkadot/x-(fetch|randomvalues|textdecoder|textencoder|ws)(.*)$': '<rootDir>/packages/x-$1/src/node'
}
});
+6 -8
View File
@@ -2,7 +2,7 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/common/issues",
"homepage": "https://github.com/polkadot-js/common#readme",
"license": "Apache-2",
"license": "Apache-2.0",
"packageManager": "yarn@3.0.1",
"private": true,
"repository": {
@@ -10,7 +10,7 @@
"url": "https://github.com/polkadot-js/common.git"
},
"sideEffects": false,
"version": "8.0.2",
"version": "8.4.1",
"workspaces": [
"packages/*"
],
@@ -21,19 +21,17 @@
"clean": "polkadot-dev-clean-build",
"lint": "polkadot-dev-run-lint",
"networks:crosscheck": "polkadot-dev-run-test packages/networks/src/crosscheck",
"networks:sync": "yarn build && node packages/networks/scripts/fromSubstrate.mjs",
"postinstall": "polkadot-dev-yarn-only",
"test": "polkadot-dev-run-test --coverage --runInBand --testPathIgnorePatterns crosscheck --testPathIgnorePatterns toMiniSecretCmp",
"test:mnemonicCmp": "polkadot-dev-run-test packages/util-crypto/src/mnemonic/toMiniSecretCmp.spec.ts",
"test:one": "polkadot-dev-run-test --runInBand"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@polkadot/dev": "^0.63.33",
"@polkadot/ts": "^0.4.15",
"@types/jest": "^27.0.3"
"@babel/core": "^7.17.2",
"@polkadot/dev": "^0.65.56",
"@types/jest": "^27.4.0"
},
"resolutions": {
"typescript": "^4.5.2"
"typescript": "^4.5.5"
}
}
+7 -6
View File
@@ -16,17 +16,18 @@
},
"sideEffects": false,
"type": "module",
"version": "8.0.2",
"version": "8.4.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@ledgerhq/hw-transport": "^6.11.2",
"@ledgerhq/hw-transport-webhid": "^6.11.2",
"@ledgerhq/hw-transport-webusb": "^6.11.2"
"@babel/runtime": "^7.17.2",
"@ledgerhq/hw-transport": "^6.24.1",
"@ledgerhq/hw-transport-webhid": "^6.24.1",
"@ledgerhq/hw-transport-webusb": "^6.24.1",
"@polkadot/util": "8.4.1"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.11.2"
"@ledgerhq/hw-transport-node-hid-singleton": "^6.24.1"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type Transport from '@ledgerhq/hw-transport';
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
export default [];
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/hw-ledger-transports authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type Transport from '@ledgerhq/hw-transport';
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/hw-ledger-transports authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger-transports authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger-transports', version: '8.0.2' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.4.1' };
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { TransportDef } from './types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import Transport from '@ledgerhq/hw-transport';
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../util/tsconfig.build.json" }
]
}
+6 -5
View File
@@ -19,12 +19,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.0.2",
"version": "8.4.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@polkadot/hw-ledger-transports": "8.0.2",
"@polkadot/util": "8.0.2",
"@zondax/ledger-substrate": "^0.18.0"
"@babel/runtime": "^7.17.2",
"@ledgerhq/hw-transport": "^6.24.1",
"@polkadot/hw-ledger-transports": "8.4.1",
"@polkadot/util": "8.4.1",
"@zondax/ledger-substrate": "^0.24.0"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ResponseBase, SubstrateApp } from '@zondax/ledger-substrate';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
export const LEDGER_DEFAULT_ACCOUNT = 0x80000000;
-24
View File
@@ -1,24 +0,0 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { knownLedger } from '@polkadot/networks/defaults';
import { ledgerApps } from './defaults';
describe('defaults', (): void => {
it('has entries for each of the apps (hwledger -> networks)', (): void => {
expect(
Object.keys(knownLedger).filter((network) =>
!ledgerApps[network]
)
).toEqual([]);
});
it('has entries for each of the apps (networks -> hwledger)', (): void => {
expect(
Object.keys(ledgerApps).filter((network) =>
!knownLedger[network]
)
).toEqual([]);
});
});
+4 -2
View File
@@ -1,13 +1,14 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type Transport from '@ledgerhq/hw-transport';
import type { SubstrateApp } from '@zondax/ledger-substrate';
import { newCentrifugeApp, newDockApp, newEdgewareApp, newEquilibriumApp, newGenshiroApp, newKusamaApp, newNodleApp, newPolkadotApp, newPolymeshApp, newStatemineApp } from '@zondax/ledger-substrate';
import { newBifrostApp, newCentrifugeApp, newDockApp, newEdgewareApp, newEquilibriumApp, newGenshiroApp, newKusamaApp, newNodleApp, newPolkadotApp, newPolymeshApp, newSoraApp, newStatemineApp } from '@zondax/ledger-substrate';
// These match up with the keys of the knownLedger object in the @polkadot/networks/defaults.ts
export const ledgerApps: Record<string, (transport: Transport) => SubstrateApp> = {
bifrost: newBifrostApp,
centrifuge: newCentrifugeApp,
'dock-mainnet': newDockApp,
edgeware: newEdgewareApp,
@@ -17,5 +18,6 @@ export const ledgerApps: Record<string, (transport: Transport) => SubstrateApp>
'nodle-chain': newNodleApp,
polkadot: newPolkadotApp,
polymesh: newPolymeshApp,
sora: newSoraApp,
statemine: newStatemineApp
};
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as transportInfo } from '@polkadot/hw-ledger-transports/packageInfo';
import { packageInfo as utilInfo } from '@polkadot/util/packageInfo';
export default [transportInfo, utilInfo];
+6 -4
View File
@@ -1,9 +1,11 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as transportInfo } from '@polkadot/hw-ledger-transports/packageInfo';
import { detectPackage, packageInfo as utilInfo } from '@polkadot/util';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [transportInfo, utilInfo]);
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger', version: '8.0.2' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.4.1' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/hw-ledger authors & contributors
// Copyright 2017-2022 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../hw-ledger-transports/tsconfig.build.json" },
{ "path": "../util/tsconfig.build.json" }
]
}
+6 -6
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.0.2",
"version": "8.4.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@polkadot/util": "8.0.2",
"@polkadot/util-crypto": "8.0.2"
"@babel/runtime": "^7.17.2",
"@polkadot/util": "8.4.1",
"@polkadot/util-crypto": "8.4.1"
},
"peerDependencies": {
"@polkadot/util": "8.0.2",
"@polkadot/util-crypto": "8.0.2"
"@polkadot/util": "8.4.1",
"@polkadot/util-crypto": "8.4.1"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Keyring } from './keyring';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// default substrate dev phrase
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as utilInfo } from '@polkadot/util/packageInfo';
import { packageInfo as cryptoInfo } from '@polkadot/util-crypto/packageInfo';
export default [utilInfo, cryptoInfo];
+6 -4
View File
@@ -1,9 +1,11 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { detectPackage, packageInfo as utilInfo } from '@polkadot/util';
import { packageInfo as cryptoInfo } from '@polkadot/util-crypto/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [utilInfo, cryptoInfo]);
detectPackage(packageInfo, null, others);
+9 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringPair$Json } from './types';
@@ -369,6 +369,14 @@ describe('keypair', (): void => {
).toEqual(ETH_ADDRESS_ONE);
});
it('creates with dev phrase with derivation path specified - addFromUri with type', (): void => {
const keyringUntyped = new Keyring();
expect(
keyringUntyped.addFromUri(PHRASE, {}, 'ethereum').address
).toEqual(ETH_ADDRESS_ONE);
});
it('encodes a pair toJSON (and decodes)', (): void => {
const pair = keyring.createFromUri(PHRASE);
const json = pair.toJson('password');
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { EncryptedJsonEncoding, Keypair, KeypairType } from '@polkadot/util-crypto/types';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/keyring', version: '8.0.2' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.4.1' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { createTestPairs } from '../testingPairs';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { EncryptedJsonEncoding } from '@polkadot/util-crypto/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
export const PKCS8_DIVIDER = new Uint8Array([161, 35, 3, 33, 0]);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { NONCE_LENGTH, SCRYPT_LENGTH } from '@polkadot/util-crypto/json/constants';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PairInfo } from './types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { hexToU8a, u8aToHex } from '@polkadot/util';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '../types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { createTestPairs } from '../testingPairs';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeypairType } from '@polkadot/util-crypto/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
export interface PairInfo {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringPair } from '../types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// From https://github.com/paritytech/substrate/wiki/Secret-URI-Test-Vectors
+15 -11
View File
@@ -1,9 +1,9 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringInstance, KeyringOptions } from './types';
import { hexToU8a } from '@polkadot/util';
import { assert, hexToU8a } from '@polkadot/util';
import { KeypairType } from '@polkadot/util-crypto/types';
import { Keyring } from './keyring';
@@ -111,6 +111,15 @@ export const PAIRSETHEREUM: PairDef[] = [
}
];
function createMeta (name?: string, seed?: string) {
assert(name || seed, 'Testing pair should have either a name or a seed');
return {
isTesting: true,
name: name || (seed && seed.replace('//', '_').toLowerCase())
};
}
/**
* @name testKeyring
* @summary Create an instance of Keyring pre-populated with locked test accounts
@@ -119,17 +128,12 @@ export const PAIRSETHEREUM: PairDef[] = [
*/
export function createTestKeyring (options: KeyringOptions = {}, isDerived = true): KeyringInstance {
const keyring = new Keyring(options);
const pairs: PairDef[] = (options.type && options.type === 'ethereum') ? PAIRSETHEREUM : PAIRSSR25519;
const pairs = (options.type && options.type === 'ethereum')
? PAIRSETHEREUM
: PAIRSSR25519;
for (const { name, publicKey, secretKey, seed, type } of pairs) {
if (!name && !seed) {
throw new Error('Testing pair should have either a name or a seed');
}
const meta = {
isTesting: true,
name: name || (seed && seed.replace('//', '_').toLowerCase())
};
const meta = createMeta(name, seed);
const pair = !isDerived && !name && seed
? keyring.addFromUri(seed, meta, options.type)
: keyring.addPair(
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { u8aToHex } from '@polkadot/util';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringOptions, KeyringPair } from './types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../util/tsconfig.build.json" },
{ "path": "../util-crypto/tsconfig.build.json" }
]
}
+6 -4
View File
@@ -17,13 +17,15 @@
},
"sideEffects": false,
"type": "module",
"version": "8.0.2",
"version": "8.4.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3"
"@babel/runtime": "^7.17.2",
"@polkadot/util": "8.4.1",
"@substrate/ss58-registry": "^1.14.0"
},
"devDependencies": {
"@polkadot/util": "8.0.2",
"@polkadot/x-fetch": "8.0.2"
"@polkadot/hw-ledger": "8.4.1",
"@polkadot/x-fetch": "8.4.1"
}
}
@@ -1,72 +0,0 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import fetch from 'node-fetch';
import { substrateRegistry } from '../build/defaults.js';
const substrateRegistryRepo = substrateRegistry
.replace('raw.githubusercontent.com', 'github.com')
.split('main')[0];
function outputField (k, v) {
if (typeof v === 'string') {
return `'${v}'`;
} else if (Array.isArray(v)) {
// new format is [] to indicate optionality
return (['decimals', 'symbols'].includes(k) && !v.length)
? null
: `[${v.map((v) => outputField(k, v)).join(', ')}]`;
}
return v;
}
async function getSubstrateRegistry () {
const original = await fetch(substrateRegistry);
const json = await original.json();
return json.registry
.map((e) =>
` {\n${Object
.entries(e)
.sort(([a], [b]) => a.localeCompare(b))
.map(([k, v]) => ` ${k}: ${outputField(k, v)}`)
.join(',\n')}\n }`
)
.join(',\n');
}
getSubstrateRegistry()
.then((entries) => {
fs.writeFileSync('packages/networks/src/substrate.ts', `// Copyright 2017-2021 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
//
// Auto-generated by yarn networks:sync (via scripts/fromSubstrate.mjs)
//
// This file should never be edited manually. Rather the process is as follow -
//
// - make a PR to the upstream registry found at ${substrateRegistryRepo}
// - ensure the PR gets merged
// - yarn networks:sync in this repo to sync
//
// Any manual changes to this file will make CI cron checks fail and will be
// lost when the registry is updated alongside the above sync.
//
import type { KnownSubstrate } from './types';
export const knownSubstrate: KnownSubstrate[] = [\n${entries}\n];
`);
console.log('Completed.');
process.exit(0);
})
.catch((error) => {
console.error('Error:', error.message);
process.exit(-1);
});
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Ss58Registry } from './types';
+35 -14
View File
@@ -1,25 +1,46 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ledgerApps } from '@polkadot/hw-ledger/defaults';
import { isHex } from '@polkadot/util';
import { knownGenesis, knownLedger } from './defaults';
describe('defaults', (): void => {
it('has hex values for all genesis chains', (): void => {
expect(
Object.keys(knownGenesis).filter((network) =>
!knownGenesis[network].length ||
knownGenesis[network].some((g) => !isHex(g, 256))
)
).toEqual([]);
describe('genesis', (): void => {
it('has hex values for all genesis chains', (): void => {
expect(
Object.keys(knownGenesis).filter((network) =>
!knownGenesis[network].length ||
knownGenesis[network].some((g) => !isHex(g, 256))
)
).toEqual([]);
});
it('has genesis for all Ledger chains', (): void => {
expect(
Object.keys(knownLedger).filter((network) =>
!knownGenesis[network]
)
).toEqual([]);
});
});
it('has genesis for all Ledger chains', (): void => {
expect(
Object.keys(knownLedger).filter((network) =>
!knownGenesis[network]
)
).toEqual([]);
describe('Ledger', (): void => {
it('has entries for each of the apps (hwledger -> networks)', (): void => {
expect(
Object.keys(knownLedger).filter((network) =>
!ledgerApps[network]
)
).toEqual([]);
});
it('has entries for each of the apps (networks -> hwledger)', (): void => {
expect(
Object.keys(ledgerApps).filter((network) =>
!knownLedger[network]
)
).toEqual([]);
});
});
});
+7 -68
View File
@@ -1,81 +1,18 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownGenesis, KnownIcon, KnownLedger, KnownTestnet } from './types';
import type { KnownIcon, KnownLedger, KnownTestnet } from './types';
export { knownGenesis } from './genesis';
export const substrateRegistry = 'https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json';
// NOTE: In the case where the network was hard-spooned and multiple genesisHashes
// are provided, it needs to be in reverse order, i.e. most-recent first, oldest
// last. This make lookups for the current a simple genesisHash[0]
// (See Kusama as an example)
export const knownGenesis: KnownGenesis = {
acala: [
'0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c'
],
bifrost: [
'0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed'
],
centrifuge: [
'0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'
],
'dock-mainnet': [
'0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'
],
edgeware: [
'0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'
],
equilibrium: [
'0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'
],
genshiro: [
'0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'
],
hydradx: [
'0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc', // Snakenet Gen3-1
'0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9', // Snakenet Gen3
'0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047', // Snakenet Gen2
'0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2' // Snakenet Gen1
],
karura: [
'0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b'
],
kulupu: [
'0xf7a99d3cb92853d00d5275c971c132c074636256583fee53b3bbe60d7b8769ba'
],
kusama: [
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe', // Kusama CC3,
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1
],
'nodle-chain': [
'0xa3d114c2b8d0627c1aa9b134eafcf7d05ca561fdc19fb388bb9457f81809fb23'
],
plasm: [
'0x3e86364d4b4894021cb2a0390bcf2feb5517d5292f2de2bb9404227e908b0b8b'
],
polkadot: [
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
],
polymesh: [
'0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
],
stafi: [
'0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'
],
statemine: [
'0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'
],
subsocial: [
'0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'
]
};
// these are icon overrides
export const knownIcon: KnownIcon = {
centrifuge: 'polkadot',
kusama: 'polkadot',
polkadot: 'polkadot',
sora: 'polkadot',
statemine: 'polkadot',
statemint: 'polkadot',
westmint: 'polkadot'
@@ -85,6 +22,7 @@ export const knownIcon: KnownIcon = {
// and maps to the known slip44 (minus the `0x8` hard derivation flag)
// NOTE: Any network here needs to have a genesisHash attached in the config above
export const knownLedger: KnownLedger = {
bifrost: 0x00000314,
centrifuge: 0x000002eb,
'dock-mainnet': 0x00000252,
edgeware: 0x0000020b,
@@ -94,6 +32,7 @@ export const knownLedger: KnownLedger = {
'nodle-chain': 0x000003eb,
polkadot: 0x00000162,
polymesh: 0x00000253,
sora: 0x00000269,
statemine: 0x000001b2 // common-good on Kusama, shares derivation
};
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
export default [];
+11
View File
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+92
View File
@@ -0,0 +1,92 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownGenesis } from './types';
// NOTE: In the case where the network was hard-spooned and multiple genesisHashes
// are provided, it needs to be in reverse order, i.e. most-recent first, oldest
// last. This make lookups for the current a simple genesisHash[0]
// (See Kusama as an example)
export const knownGenesis: KnownGenesis = {
acala: [
'0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c'
],
astar: [
'0x9eb76c5184c4ab8679d2d5d819fdf90b9c001403e9e17da2e14b6d8aec4029c6'
],
basilisk: [
'0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755'
],
bifrost: [
'0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed'
],
centrifuge: [
'0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'
],
'dock-mainnet': [
'0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'
],
edgeware: [
'0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'
],
equilibrium: [
'0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'
],
genshiro: [
'0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'
],
hydradx: [
'0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc', // Snakenet Gen3-1
'0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9', // Snakenet Gen3
'0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047', // Snakenet Gen2
'0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2' // Snakenet Gen1
],
karura: [
'0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b'
],
kulupu: [
'0xf7a99d3cb92853d00d5275c971c132c074636256583fee53b3bbe60d7b8769ba'
],
kusama: [
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe', // Kusama CC3,
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1
],
'nodle-chain': [
'0xa3d114c2b8d0627c1aa9b134eafcf7d05ca561fdc19fb388bb9457f81809fb23'
],
picasso: [
'0xe8e7f0f4c4f5a00720b4821dbfddefea7490bcf0b19009961cc46957984e2c1c'
],
polkadot: [
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
],
polymesh: [
'0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
],
rococo: [
'0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897',
'0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770',
'0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff',
'0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a',
'0x5fce687da39305dfe682b117f0820b319348e8bb37eb16cf34acbf6a202de9d9',
'0xe7c3d5edde7db964317cd9b51a3a059d7cd99f81bdbce14990047354334c9779',
'0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215',
'0x343442f12fa715489a8714e79a7b264ea88c0d5b8c66b684a7788a516032f6b9',
'0x78bcd530c6b3a068bc17473cf5d2aff9c287102bed9af3ae3c41c33b9d6c6147',
'0x47381ee0697153d64404fc578392c8fd5cba9073391908f46c888498415647bd',
'0x19c0e4fa8ab75f5ac7865e0b8f74ff91eb9a100d336f423cd013a8befba40299'
],
sora: [
'0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'
],
stafi: [
'0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'
],
statemine: [
'0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'
],
subsocial: [
'0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'
]
};
+41 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubstrateNetwork } from './types';
@@ -6,9 +6,14 @@ import type { SubstrateNetwork } from './types';
import { knownGenesis, knownIcon, knownLedger, knownTestnet } from './defaults';
import { allNetworks, availableNetworks, selectableNetworks } from '.';
describe('selectableNetworks', (): void => {
describe('availableNetworks', (): void => {
it('has the correct starting order', (): void => {
expect(selectableNetworks.slice(0, 3).map(({ prefix }) => prefix)).toEqual([0, 2, 42]);
expect(availableNetworks.slice(0, 3).map(({ prefix }) => prefix)).toEqual([0, 2, 42]);
});
it('has a sorted list (first external, last external)', (): void => {
expect(availableNetworks[3].displayName).toEqual('Acala');
expect(availableNetworks[availableNetworks.length - 1].displayName).toEqual('ZERO');
});
it('has no ignored networks', (): void => {
@@ -63,6 +68,28 @@ describe('selectableNetworks', (): void => {
).toEqual([]);
});
it('has all the correct fields', (): void => {
expect(availableNetworks[0]).toEqual({
decimals: [10],
displayName: 'Polkadot Relay Chain',
genesisHash: [
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
],
hasLedgerSupport: true,
icon: 'polkadot',
isIgnored: false,
isTestnet: false,
network: 'polkadot',
prefix: 0,
slip44: 354,
standardAccount: '*25519',
symbols: ['DOT'],
website: 'https://polkadot.network'
});
});
});
describe('allNetworks', (): void => {
it('has no ss58 duplicates', (): void => {
const dupes: SubstrateNetwork[] = [];
const uniques: SubstrateNetwork[] = [];
@@ -78,3 +105,14 @@ describe('selectableNetworks', (): void => {
expect(dupes).toEqual([]);
});
});
describe('selectableNetworks', (): void => {
it('has the correct starting order', (): void => {
expect(selectableNetworks.slice(0, 3).map(({ prefix }) => prefix)).toEqual([0, 2, 42]);
});
it('has a sorted list (first external, last external)', (): void => {
expect(selectableNetworks[3].displayName).toEqual('Acala');
expect(selectableNetworks[selectableNetworks.length - 1].displayName).toEqual('Stafi');
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './interfaces';
+15 -7
View File
@@ -1,10 +1,11 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownSubstrate, Network, SubstrateNetwork } from './types';
import knownSubstrate from '@substrate/ss58-registry';
import { knownGenesis, knownIcon, knownLedger, knownTestnet } from './defaults';
import { knownSubstrate } from './substrate';
// These are known prefixes that are not sorted
const UNSORTED = [0, 2, 42];
@@ -25,7 +26,14 @@ function toExpanded (o: KnownSubstrate): SubstrateNetwork {
// filtering
n.isTestnet = !!knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
n.isIgnored = n.isTestnet || (!(o.standardAccount && o.decimals && o.symbols) && o.prefix !== 42);
n.isIgnored = n.isTestnet || (
!(
o.standardAccount &&
o.decimals && o.decimals.length &&
o.symbols && o.symbols.length
) &&
o.prefix !== 42
);
return n;
}
@@ -43,12 +51,12 @@ function sortNetworks (a: Network, b: Network): number {
const isUnSortedB = UNSORTED.includes(b.prefix);
return isUnSortedA === isUnSortedB
? 0
? isUnSortedA
? 0
: a.displayName.localeCompare(b.displayName)
: isUnSortedA
? -1
: isUnSortedB
? 1
: a.displayName.localeCompare(b.displayName);
: 1;
}
// This is all the Substrate networks with our additional information
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/networks', version: '8.0.2' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.4.1' };
@@ -0,0 +1,26 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import known from '@substrate/ss58-registry';
import fs from 'fs';
import path from 'path';
import other from './test/ss58registry.test.json';
describe('@substrate/ss58-registry', (): void => {
it('has known values', (): void => {
const json = JSON.stringify(known, null, 2);
try {
expect(JSON.parse(json)).toEqual(other);
} catch (error) {
if (process.env.GITHUB_REPOSITORY) {
console.error(json);
throw error;
}
fs.writeFileSync(path.join(__dirname, './test/ss58registry.test.json'), json, { flag: 'w' });
}
});
});
-749
View File
@@ -1,749 +0,0 @@
// Copyright 2017-2021 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
//
// Auto-generated by yarn networks:sync (via scripts/fromSubstrate.mjs)
//
// This file should never be edited manually. Rather the process is as follow -
//
// - make a PR to the upstream registry found at https://github.com/paritytech/ss58-registry/
// - ensure the PR gets merged
// - yarn networks:sync in this repo to sync
//
// Any manual changes to this file will make CI cron checks fail and will be
// lost when the registry is updated alongside the above sync.
//
import type { KnownSubstrate } from './types';
export const knownSubstrate: KnownSubstrate[] = [
{
decimals: [10],
displayName: 'Polkadot Relay Chain',
network: 'polkadot',
prefix: 0,
standardAccount: '*25519',
symbols: ['DOT'],
website: 'https://polkadot.network'
},
{
decimals: null,
displayName: 'Bare 32-bit Schnorr/Ristretto (S/R 25519) public key.',
network: 'BareSr25519',
prefix: 1,
standardAccount: 'Sr25519',
symbols: null,
website: null
},
{
decimals: [12],
displayName: 'Kusama Relay Chain',
network: 'kusama',
prefix: 2,
standardAccount: '*25519',
symbols: ['KSM'],
website: 'https://kusama.network'
},
{
decimals: null,
displayName: 'Bare 32-bit Ed25519 public key.',
network: 'BareEd25519',
prefix: 3,
standardAccount: 'Ed25519',
symbols: null,
website: null
},
{
decimals: null,
displayName: 'Katal Chain',
network: 'katalchain',
prefix: 4,
standardAccount: '*25519',
symbols: null,
website: null
},
{
decimals: [15],
displayName: 'Plasm Network',
network: 'plasm',
prefix: 5,
standardAccount: '*25519',
symbols: ['PLM'],
website: 'https://plasmnet.io'
},
{
decimals: [12],
displayName: 'Bifrost',
network: 'bifrost',
prefix: 6,
standardAccount: '*25519',
symbols: ['BNC'],
website: 'https://bifrost.finance/'
},
{
decimals: [18],
displayName: 'Edgeware',
network: 'edgeware',
prefix: 7,
standardAccount: '*25519',
symbols: ['EDG'],
website: 'https://edgewa.re'
},
{
decimals: [12],
displayName: 'Karura',
network: 'karura',
prefix: 8,
standardAccount: '*25519',
symbols: ['KAR'],
website: 'https://karura.network/'
},
{
decimals: [18],
displayName: 'Laminar Reynolds Canary',
network: 'reynolds',
prefix: 9,
standardAccount: '*25519',
symbols: ['REY'],
website: 'http://laminar.network/'
},
{
decimals: [12],
displayName: 'Acala',
network: 'acala',
prefix: 10,
standardAccount: '*25519',
symbols: ['ACA'],
website: 'https://acala.network/'
},
{
decimals: [18],
displayName: 'Laminar',
network: 'laminar',
prefix: 11,
standardAccount: '*25519',
symbols: ['LAMI'],
website: 'http://laminar.network/'
},
{
decimals: [6],
displayName: 'Polymesh',
network: 'polymesh',
prefix: 12,
standardAccount: '*25519',
symbols: ['POLYX'],
website: 'https://polymath.network/'
},
{
decimals: [12],
displayName: 'Integritee',
network: 'integritee',
prefix: 13,
standardAccount: '*25519',
symbols: ['TEER'],
website: 'https://integritee.network'
},
{
decimals: [0],
displayName: 'Totem',
network: 'totem',
prefix: 14,
standardAccount: '*25519',
symbols: ['TOTEM'],
website: 'https://totemaccounting.com'
},
{
decimals: [12],
displayName: 'Synesthesia',
network: 'synesthesia',
prefix: 15,
standardAccount: '*25519',
symbols: ['SYN'],
website: 'https://synesthesia.network/'
},
{
decimals: [12],
displayName: 'Kulupu',
network: 'kulupu',
prefix: 16,
standardAccount: '*25519',
symbols: ['KLP'],
website: 'https://kulupu.network/'
},
{
decimals: null,
displayName: 'Dark Mainnet',
network: 'dark',
prefix: 17,
standardAccount: '*25519',
symbols: null,
website: null
},
{
decimals: [9, 9],
displayName: 'Darwinia Network',
network: 'darwinia',
prefix: 18,
standardAccount: '*25519',
symbols: ['RING', 'KTON'],
website: 'https://darwinia.network/'
},
{
decimals: [12],
displayName: 'GeekCash',
network: 'geek',
prefix: 19,
standardAccount: '*25519',
symbols: ['GEEK'],
website: 'https://geekcash.org'
},
{
decimals: [12],
displayName: 'Stafi',
network: 'stafi',
prefix: 20,
standardAccount: '*25519',
symbols: ['FIS'],
website: 'https://stafi.io'
},
{
decimals: [6],
displayName: 'Dock Testnet',
network: 'dock-testnet',
prefix: 21,
standardAccount: '*25519',
symbols: ['DCK'],
website: 'https://dock.io'
},
{
decimals: [6],
displayName: 'Dock Mainnet',
network: 'dock-mainnet',
prefix: 22,
standardAccount: '*25519',
symbols: ['DCK'],
website: 'https://dock.io'
},
{
decimals: null,
displayName: 'ShiftNrg',
network: 'shift',
prefix: 23,
standardAccount: '*25519',
symbols: null,
website: null
},
{
decimals: [18],
displayName: 'ZERO',
network: 'zero',
prefix: 24,
standardAccount: '*25519',
symbols: ['PLAY'],
website: 'https://zero.io'
},
{
decimals: [18],
displayName: 'ZERO Alphaville',
network: 'zero-alphaville',
prefix: 25,
standardAccount: '*25519',
symbols: ['PLAY'],
website: 'https://zero.io'
},
{
decimals: [10],
displayName: 'Jupiter',
network: 'jupiter',
prefix: 26,
standardAccount: '*25519',
symbols: ['jDOT'],
website: 'https://jupiter.patract.io'
},
{
decimals: null,
displayName: 'Subsocial',
network: 'subsocial',
prefix: 28,
standardAccount: '*25519',
symbols: null,
website: null
},
{
decimals: [12, 12],
displayName: 'CORD Network',
network: 'cord',
prefix: 29,
standardAccount: '*25519',
symbols: ['DHI', 'WAY'],
website: 'https://cord.network/'
},
{
decimals: [12],
displayName: 'Phala Network',
network: 'phala',
prefix: 30,
standardAccount: '*25519',
symbols: ['PHA'],
website: 'https://phala.network'
},
{
decimals: [12],
displayName: 'Litentry Network',
network: 'litentry',
prefix: 31,
standardAccount: '*25519',
symbols: ['LIT'],
website: 'https://litentry.com/'
},
{
decimals: [9],
displayName: 'Robonomics',
network: 'robonomics',
prefix: 32,
standardAccount: '*25519',
symbols: ['XRT'],
website: 'https://robonomics.network'
},
{
decimals: null,
displayName: 'DataHighway',
network: 'datahighway',
prefix: 33,
standardAccount: '*25519',
symbols: null,
website: null
},
{
decimals: [12],
displayName: 'Ares Protocol',
network: 'ares',
prefix: 34,
standardAccount: '*25519',
symbols: ['ARES'],
website: 'https://www.aresprotocol.com/'
},
{
decimals: [15],
displayName: 'Valiu Liquidity Network',
network: 'vln',
prefix: 35,
standardAccount: '*25519',
symbols: ['USDv'],
website: 'https://valiu.com/'
},
{
decimals: [18],
displayName: 'Centrifuge Chain',
network: 'centrifuge',
prefix: 36,
standardAccount: '*25519',
symbols: ['CFG'],
website: 'https://centrifuge.io/'
},
{
decimals: [18],
displayName: 'Nodle Chain',
network: 'nodle',
prefix: 37,
standardAccount: '*25519',
symbols: ['NODL'],
website: 'https://nodle.io/'
},
{
decimals: [18],
displayName: 'KILT Chain',
network: 'kilt',
prefix: 38,
standardAccount: '*25519',
symbols: ['KILT'],
website: 'https://kilt.io/'
},
{
decimals: [18],
displayName: 'MathChain mainnet',
network: 'mathchain',
prefix: 39,
standardAccount: '*25519',
symbols: ['MATH'],
website: 'https://mathwallet.org'
},
{
decimals: [18],
displayName: 'MathChain testnet',
network: 'mathchain-testnet',
prefix: 40,
standardAccount: '*25519',
symbols: ['MATH'],
website: 'https://mathwallet.org'
},
{
decimals: null,
displayName: 'Polimec Chain',
network: 'poli',
prefix: 41,
standardAccount: '*25519',
symbols: null,
website: 'https://polimec.io/'
},
{
decimals: null,
displayName: 'Substrate',
network: 'substrate',
prefix: 42,
standardAccount: '*25519',
symbols: null,
website: 'https://substrate.io/'
},
{
decimals: null,
displayName: 'Bare 32-bit ECDSA SECP-256k1 public key.',
network: 'BareSecp256k1',
prefix: 43,
standardAccount: 'secp256k1',
symbols: null,
website: null
},
{
decimals: [8],
displayName: 'ChainX',
network: 'chainx',
prefix: 44,
standardAccount: '*25519',
symbols: ['PCX'],
website: 'https://chainx.org/'
},
{
decimals: [12, 12],
displayName: 'UniArts Network',
network: 'uniarts',
prefix: 45,
standardAccount: '*25519',
symbols: ['UART', 'UINK'],
website: 'https://uniarts.me'
},
{
decimals: null,
displayName: 'This prefix is reserved.',
network: 'reserved46',
prefix: 46,
standardAccount: null,
symbols: null,
website: null
},
{
decimals: null,
displayName: 'This prefix is reserved.',
network: 'reserved47',
prefix: 47,
standardAccount: null,
symbols: null,
website: null
},
{
decimals: [12],
displayName: 'Neatcoin Mainnet',
network: 'neatcoin',
prefix: 48,
standardAccount: '*25519',
symbols: ['NEAT'],
website: 'https://neatcoin.org'
},
{
decimals: [12],
displayName: 'Picasso',
network: 'picasso',
prefix: 49,
standardAccount: '*25519',
symbols: ['PICA'],
website: 'https://picasso.composable.finance'
},
{
decimals: [12],
displayName: 'Composable',
network: 'composable',
prefix: 50,
standardAccount: '*25519',
symbols: ['LAYR'],
website: 'https://composable.finance'
},
{
decimals: [9],
displayName: 'xx network',
network: 'xxnetwork',
prefix: 55,
standardAccount: '*25519',
symbols: ['XX'],
website: 'https://xx.network'
},
{
decimals: [12],
displayName: 'HydraDX',
network: 'hydradx',
prefix: 63,
standardAccount: '*25519',
symbols: ['HDX'],
website: 'https://hydradx.io'
},
{
decimals: [18],
displayName: 'AvN Mainnet',
network: 'aventus',
prefix: 65,
standardAccount: '*25519',
symbols: ['AVT'],
website: 'https://aventus.io'
},
{
decimals: [12],
displayName: 'Crust Network',
network: 'crust',
prefix: 66,
standardAccount: '*25519',
symbols: ['CRU'],
website: 'https://crust.network'
},
{
decimals: [0, 9, 9, 9, 9, 9, 9, 9],
displayName: 'Equilibrium Network',
network: 'equilibrium',
prefix: 67,
standardAccount: '*25519',
symbols: ['Unknown', 'USD', 'EQ', 'ETH', 'BTC', 'EOS', 'DOT', 'CRV'],
website: 'https://equilibrium.io'
},
{
decimals: [18],
displayName: 'SORA Network',
network: 'sora',
prefix: 69,
standardAccount: '*25519',
symbols: ['XOR'],
website: 'https://sora.org'
},
{
decimals: [10],
displayName: 'Zeitgeist',
network: 'zeitgeist',
prefix: 73,
standardAccount: '*25519',
symbols: ['ZTG'],
website: 'https://zeitgeist.pm'
},
{
decimals: [12],
displayName: 'Manta network',
network: 'manta',
prefix: 77,
standardAccount: '*25519',
symbols: ['MA'],
website: 'https://manta.network'
},
{
decimals: [12],
displayName: 'Calamari: Manta Canary Network',
network: 'calamari',
prefix: 78,
standardAccount: '*25519',
symbols: ['KMA'],
website: 'https://manta.network'
},
{
decimals: [12],
displayName: 'Polkadex Mainnet',
network: 'polkadex',
prefix: 88,
standardAccount: '*25519',
symbols: ['PDEX'],
website: 'https://polkadex.trade'
},
{
decimals: [18],
displayName: 'PolkaSmith Canary Network',
network: 'polkasmith',
prefix: 98,
standardAccount: '*25519',
symbols: ['PKS'],
website: 'https://polkafoundry.com'
},
{
decimals: [18],
displayName: 'PolkaFoundry Network',
network: 'polkafoundry',
prefix: 99,
standardAccount: '*25519',
symbols: ['PKF'],
website: 'https://polkafoundry.com'
},
{
decimals: [18],
displayName: 'OriginTrail Parachain',
network: 'origintrail-parachain',
prefix: 101,
standardAccount: 'secp256k1',
symbols: ['TRAC'],
website: 'https://origintrail.io'
},
{
decimals: [10],
displayName: 'Pontem Network',
network: 'pontem-network',
prefix: 105,
standardAccount: '*25519',
symbols: ['PONT'],
website: 'https://pontem.network'
},
{
decimals: [12],
displayName: 'Heiko',
network: 'heiko',
prefix: 110,
standardAccount: '*25519',
symbols: ['HKO'],
website: 'https://parallel.fi/'
},
{
decimals: null,
displayName: 'Integritee Incognito',
network: 'integritee-incognito',
prefix: 113,
standardAccount: '*25519',
symbols: null,
website: 'https://integritee.network'
},
{
decimals: [18],
displayName: 'Clover Finance',
network: 'clover',
prefix: 128,
standardAccount: '*25519',
symbols: ['CLV'],
website: 'https://clover.finance'
},
{
decimals: [18],
displayName: 'Altair',
network: 'altair',
prefix: 136,
standardAccount: '*25519',
symbols: ['AIR'],
website: 'https://centrifuge.io/'
},
{
decimals: [12],
displayName: 'Parallel',
network: 'parallel',
prefix: 172,
standardAccount: '*25519',
symbols: ['PARA'],
website: 'https://parallel.fi/'
},
{
decimals: [18],
displayName: 'Social Network',
network: 'social-network',
prefix: 252,
standardAccount: '*25519',
symbols: ['NET'],
website: 'https://social.network'
},
{
decimals: [15],
displayName: 'QUARTZ by UNIQUE',
network: 'quartz_mainnet',
prefix: 255,
standardAccount: '*25519',
symbols: ['QTZ'],
website: 'https://unique.network'
},
{
decimals: [18],
displayName: 'Pioneer Network by Bit.Country',
network: 'pioneer_network',
prefix: 268,
standardAccount: '*25519',
symbols: ['NEER'],
website: 'https://bit.country'
},
{
decimals: [18],
displayName: 'Moonbeam',
network: 'moonbeam',
prefix: 1284,
standardAccount: 'secp256k1',
symbols: ['GLMR'],
website: 'https://moonbeam.network'
},
{
decimals: [18],
displayName: 'Moonriver',
network: 'moonriver',
prefix: 1285,
standardAccount: 'secp256k1',
symbols: ['MOVR'],
website: 'https://moonbeam.network'
},
{
decimals: [12],
displayName: 'Kapex',
network: 'kapex',
prefix: 2007,
standardAccount: '*25519',
symbols: ['KAPEX'],
website: 'https://totemaccounting.com'
},
{
decimals: [18],
displayName: 'Subspace testnet',
network: 'subspace_testnet',
prefix: 2254,
standardAccount: '*25519',
symbols: ['tSSC'],
website: 'https://subspace.network'
},
{
decimals: [18],
displayName: 'Subspace',
network: 'subspace',
prefix: 6094,
standardAccount: '*25519',
symbols: ['SSC'],
website: 'https://subspace.network'
},
{
decimals: [12],
displayName: 'Basilisk',
network: 'basilisk',
prefix: 10041,
standardAccount: '*25519',
symbols: ['BSX'],
website: 'https://bsx.fi'
},
{
decimals: [12],
displayName: 'CESS Testnet',
network: 'cess-testnet',
prefix: 10042,
standardAccount: '*25519',
symbols: ['TCESS'],
website: 'https://cess.cloud'
},
{
decimals: [12],
displayName: 'CESS',
network: 'cess',
prefix: 10043,
standardAccount: '*25519',
symbols: ['CESS'],
website: 'https://cess.cloud'
},
{
decimals: [18],
displayName: 'Automata ContextFree',
network: 'contextfree',
prefix: 11820,
standardAccount: '*25519',
symbols: ['CTX'],
website: 'https://ata.network'
}
];
File diff suppressed because it is too large Load Diff
+5 -11
View File
@@ -1,17 +1,9 @@
// Copyright 2017-2021 @polkadot/keyring authors & contributors
// Copyright 2017-2022 @polkadot/keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
import type { RegistryEntry } from '@substrate/ss58-registry';
export interface KnownSubstrate {
decimals: number[] | null,
displayName: string;
network: string | null;
prefix: number;
standardAccount: '*25519' | 'Ed25519' | 'Sr25519' | 'secp256k1' | null;
symbols: string[] | null;
website: string | null;
}
export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
export type KnownIcon = Record<string, Icon>;
@@ -19,6 +11,8 @@ export type KnownLedger = Record<string, number>;
export type KnownGenesis = Record<string, string[]>;
export type KnownSubstrate = RegistryEntry;
export type KnownTestnet = Record<string, true>;
export interface SubstrateNetwork extends KnownSubstrate {
+18
View File
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"resolveJsonModule": true,
"rootDir": "./src"
},
"include": [
"**/src/*.ts",
"**/test/*.json"
],
"references": [
{ "path": "../hw-ledger/tsconfig.build.json" },
{ "path": "../util/tsconfig.build.json" },
{ "path": "../x-fetch/tsconfig.build.json" }
]
}
+16 -17
View File
@@ -1,9 +1,6 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/common/issues",
"bundledDependencies": [
"@noble/hashes"
],
"contributors": [],
"description": "A collection of useful crypto utilities for @polkadot",
"engines": {
@@ -25,27 +22,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.0.2",
"version": "8.4.1",
"browser": {
"crypto": false,
"stream": false
},
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@noble/hashes": "0.4.1",
"@polkadot/networks": "8.0.2",
"@polkadot/util": "8.0.2",
"@polkadot/wasm-crypto": "^4.4.1",
"@polkadot/x-randomvalues": "8.0.2",
"bn.js": "^4.12.0",
"@babel/runtime": "^7.17.2",
"@noble/hashes": "1.0.0",
"@noble/secp256k1": "1.5.2",
"@polkadot/networks": "8.4.1",
"@polkadot/util": "8.4.1",
"@polkadot/wasm-crypto": "^4.5.1",
"@polkadot/x-bigint": "8.4.1",
"@polkadot/x-randomvalues": "8.4.1",
"@scure/base": "1.0.0",
"ed2curve": "^0.3.0",
"elliptic": "^6.5.4",
"micro-base": "^0.9.0",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@types/bn.js": "^4.11.6",
"@types/ed2curve": "^0.2.2",
"@types/elliptic": "^6.4.14"
"@types/ed2curve": "^0.2.2"
},
"peerDependencies": {
"@polkadot/util": "8.0.2"
"@polkadot/util": "8.4.1"
}
}
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { hexToU8a } from '@polkadot/util';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { checkAddress } from '.';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { base58Decode } from '../base58';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { sshash } from './sshash';
@@ -1,23 +1,17 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { hexToU8a, stringToU8a, u8aToHex } from '@polkadot/util';
import { createTestPairs, TestKeyringMap } from '../../../keyring/src/testingPairs';
import { ALICE_PUBLIC_SR } from './encode.spec';
import { decodeAddress } from '.';
describe('decodeAddress', (): void => {
let keyring: TestKeyringMap;
beforeAll((): void => {
keyring = createTestPairs({ type: 'sr25519' });
});
it('decodes an address', (): void => {
expect(
decodeAddress('5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY')
).toEqual(
keyring.alice.publicKey
ALICE_PUBLIC_SR
);
});
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Network } from '@polkadot/networks/types';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { waitReady } from '@polkadot/wasm-crypto';

Some files were not shown because too many files have changed in this diff Show More