Compare commits

..
205 Commits
Author SHA1 Message Date
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
646 changed files with 5607 additions and 8778 deletions
+6 -1
View File
@@ -21,4 +21,9 @@
7.8.2
7.9.2
8.0.2
8.0.3
8.0.3
8.0.4
8.0.5
8.1.2
8.2.2
8.3.2
+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: {
+1 -1
View File
@@ -2,7 +2,7 @@ name: 'Lock Threads'
on:
schedule:
- cron: '15 1 * * *'
- cron: '15 1/3 * * *'
jobs:
lock:
+1
View File
@@ -15,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
+1 -1
View File
@@ -1,7 +1,7 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '50 1 * * *'
- cron: '50 1/3 * * *'
jobs:
stale:
+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
+80 -1
View File
@@ -1,11 +1,90 @@
# CHANGELOG
## 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 `stringCaleCase` for all-caps parts
- Adjust `stringCamelCase` for all-caps parts
## 8.0.2 Nov 26, 2021
+45
View File
@@ -0,0 +1,45 @@
1241 Jaco 8.3.2 (#1382)
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)
3 Jakub Pánik HydraDX Snakenet Gen3-1 (#977)
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 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'
}
});
+5 -6
View File
@@ -10,7 +10,7 @@
"url": "https://github.com/polkadot-js/common.git"
},
"sideEffects": false,
"version": "8.0.3",
"version": "8.3.2",
"workspaces": [
"packages/*"
],
@@ -28,12 +28,11 @@
"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.16.7",
"@polkadot/dev": "^0.65.37",
"@types/jest": "^27.4.0"
},
"resolutions": {
"typescript": "^4.5.2"
"typescript": "^4.5.3"
}
}
+7 -6
View File
@@ -16,17 +16,18 @@
},
"sideEffects": false,
"type": "module",
"version": "8.0.3",
"version": "8.3.2",
"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.16.7",
"@ledgerhq/hw-transport": "^6.20.0",
"@ledgerhq/hw-transport-webhid": "^6.20.0",
"@ledgerhq/hw-transport-webusb": "^6.20.0",
"@polkadot/util": "8.3.2"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.11.2"
"@ledgerhq/hw-transport-node-hid-singleton": "^6.23.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 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.3' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.3.2' };
@@ -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.3",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@polkadot/hw-ledger-transports": "8.0.3",
"@polkadot/util": "8.0.3",
"@zondax/ledger-substrate": "^0.18.0"
"@babel/runtime": "^7.16.7",
"@ledgerhq/hw-transport": "^6.20.0",
"@polkadot/hw-ledger-transports": "8.3.2",
"@polkadot/util": "8.3.2",
"@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.3' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.3.2' };
+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.3",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@polkadot/util": "8.0.3",
"@polkadot/util-crypto": "8.0.3"
"@babel/runtime": "^7.16.7",
"@polkadot/util": "8.3.2",
"@polkadot/util-crypto": "8.3.2"
},
"peerDependencies": {
"@polkadot/util": "8.0.3",
"@polkadot/util-crypto": "8.0.3"
"@polkadot/util": "8.3.2",
"@polkadot/util-crypto": "8.3.2"
}
}
+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.3' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.3.2' };
+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" }
]
}
+5 -4
View File
@@ -17,13 +17,14 @@
},
"sideEffects": false,
"type": "module",
"version": "8.0.3",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3"
"@babel/runtime": "^7.16.7",
"@polkadot/util": "8.3.2"
},
"devDependencies": {
"@polkadot/util": "8.0.3",
"@polkadot/x-fetch": "8.0.3"
"@polkadot/hw-ledger": "8.3.2",
"@polkadot/x-fetch": "8.3.2"
}
}
+2 -2
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 fs from 'fs';
@@ -40,7 +40,7 @@ async function getSubstrateRegistry () {
getSubstrateRegistry()
.then((entries) => {
fs.writeFileSync('packages/networks/src/substrate.ts', `// Copyright 2017-2021 @polkadot/networks authors & contributors
fs.writeFileSync('packages/networks/src/substrate.ts', `// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
//
+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);
+88
View File
@@ -0,0 +1,88 @@
// 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'
],
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'
],
plasm: [
'0x3e86364d4b4894021cb2a0390bcf2feb5517d5292f2de2bb9404227e908b0b8b'
],
polkadot: [
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
],
polymesh: [
'0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
],
rococo: [
'0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770',
'0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff',
'0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a',
'0x5fce687da39305dfe682b117f0820b319348e8bb37eb16cf34acbf6a202de9d9',
'0xe7c3d5edde7db964317cd9b51a3a059d7cd99f81bdbce14990047354334c9779',
'0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215',
'0x343442f12fa715489a8714e79a7b264ea88c0d5b8c66b684a7788a516032f6b9',
'0x78bcd530c6b3a068bc17473cf5d2aff9c287102bed9af3ae3c41c33b9d6c6147',
'0x47381ee0697153d64404fc578392c8fd5cba9073391908f46c888498415647bd',
'0x19c0e4fa8ab75f5ac7865e0b8f74ff91eb9a100d336f423cd013a8befba40299'
],
sora: [
'0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'
],
stafi: [
'0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'
],
statemine: [
'0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'
],
subsocial: [
'0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'
]
};
+21 -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 => {
@@ -62,7 +67,9 @@ describe('selectableNetworks', (): void => {
)
).toEqual([]);
});
});
describe('allNetworks', (): void => {
it('has no ss58 duplicates', (): void => {
const dupes: SubstrateNetwork[] = [];
const uniques: SubstrateNetwork[] = [];
@@ -78,3 +85,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';
+5 -5
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 { KnownSubstrate, Network, SubstrateNetwork } from './types';
@@ -43,12 +43,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.3' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.3.2' };
+59 -14
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
//
@@ -63,13 +63,13 @@ export const knownSubstrate: KnownSubstrate[] = [
website: null
},
{
decimals: [15],
displayName: 'Plasm Network',
network: 'plasm',
decimals: [18],
displayName: 'Astar Network',
network: 'astar',
prefix: 5,
standardAccount: '*25519',
symbols: ['PLM'],
website: 'https://plasmnet.io'
symbols: ['ASTR'],
website: 'https://astar.network'
},
{
decimals: [12],
@@ -504,12 +504,21 @@ export const knownSubstrate: KnownSubstrate[] = [
website: 'https://crust.network'
},
{
decimals: [0, 9, 9, 9, 9, 9, 9, 9],
displayName: 'Equilibrium Network',
network: 'equilibrium',
decimals: [9, 9, 9],
displayName: 'Genshiro Network',
network: 'genshiro',
prefix: 67,
standardAccount: '*25519',
symbols: ['Unknown', 'USD', 'EQ', 'ETH', 'BTC', 'EOS', 'DOT', 'CRV'],
symbols: ['GENS', 'EQD', 'LPT0'],
website: 'https://genshiro.equilibrium.io'
},
{
decimals: [9],
displayName: 'Equilibrium Network',
network: 'equilibrium',
prefix: 68,
standardAccount: '*25519',
symbols: ['EQ'],
website: 'https://equilibrium.io'
},
{
@@ -531,12 +540,12 @@ export const knownSubstrate: KnownSubstrate[] = [
website: 'https://zeitgeist.pm'
},
{
decimals: [12],
decimals: [18],
displayName: 'Manta network',
network: 'manta',
prefix: 77,
standardAccount: '*25519',
symbols: ['MA'],
symbols: ['MANTA'],
website: 'https://manta.network'
},
{
@@ -665,6 +674,24 @@ export const knownSubstrate: KnownSubstrate[] = [
symbols: ['NEER'],
website: 'https://bit.country'
},
{
decimals: [18],
displayName: 'SORA Kusama Parachain',
network: 'sora_kusama_para',
prefix: 420,
standardAccount: '*25519',
symbols: ['XOR'],
website: 'https://sora.org'
},
{
decimals: [18],
displayName: 'Efinity',
network: 'efinity',
prefix: 1110,
standardAccount: 'Sr25519',
symbols: ['EFI'],
website: 'https://efinity.io/'
},
{
decimals: [18],
displayName: 'Moonbeam',
@@ -692,6 +719,24 @@ export const knownSubstrate: KnownSubstrate[] = [
symbols: ['KAPEX'],
website: 'https://totemaccounting.com'
},
{
decimals: [10],
displayName: 'Interlay',
network: 'interlay',
prefix: 2032,
standardAccount: '*25519',
symbols: ['INTR'],
website: 'https://interlay.io/'
},
{
decimals: [12],
displayName: 'Kintsugi',
network: 'kintsugi',
prefix: 2092,
standardAccount: '*25519',
symbols: ['KINT'],
website: 'https://interlay.io/'
},
{
decimals: [18],
displayName: 'Subspace testnet',
@@ -723,7 +768,7 @@ export const knownSubstrate: KnownSubstrate[] = [
decimals: [12],
displayName: 'CESS Testnet',
network: 'cess-testnet',
prefix: 10042,
prefix: 11330,
standardAccount: '*25519',
symbols: ['TCESS'],
website: 'https://cess.cloud'
@@ -732,7 +777,7 @@ export const knownSubstrate: KnownSubstrate[] = [
decimals: [12],
displayName: 'CESS',
network: 'cess',
prefix: 10043,
prefix: 11331,
standardAccount: '*25519',
symbols: ['CESS'],
website: 'https://cess.cloud'
+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 type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
+13
View File
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"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.3",
"version": "8.3.2",
"browser": {
"crypto": false,
"stream": false
},
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@noble/hashes": "0.4.1",
"@polkadot/networks": "8.0.3",
"@polkadot/util": "8.0.3",
"@polkadot/wasm-crypto": "^4.4.1",
"@polkadot/x-randomvalues": "8.0.3",
"bn.js": "^4.12.0",
"@babel/runtime": "^7.16.7",
"@noble/hashes": "0.5.7",
"@noble/secp256k1": "1.3.4",
"@polkadot/networks": "8.3.2",
"@polkadot/util": "8.3.2",
"@polkadot/wasm-crypto": "^4.5.1",
"@polkadot/x-bigint": "8.3.2",
"@polkadot/x-randomvalues": "8.3.2",
"ed2curve": "^0.3.0",
"elliptic": "^6.5.4",
"micro-base": "^0.9.0",
"micro-base": "^0.10.2",
"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.3"
"@polkadot/util": "8.3.2"
}
}
@@ -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';
+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';
+11 -11
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { createTestPairs } from '@polkadot/keyring/testingPairs';
import { encodeAddress } from '.';
const keyring = createTestPairs({ type: 'ed25519' }, false);
export const ALICE_PUBLIC_SR = new Uint8Array([212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]);
export const ALICE_PUBLIC_ED = new Uint8Array([209, 114, 167, 76, 218, 76, 134, 89, 18, 195, 43, 160, 168, 10, 87, 174, 105, 171, 174, 65, 14, 92, 203, 89, 222, 232, 78, 47, 68, 50, 219, 79]);
const SUBKEY = [
{
@@ -69,7 +69,7 @@ const SUBKEY = [
describe('encode', (): void => {
it('encodes an address to a valid value', (): void => {
expect(
keyring.alice.address
encodeAddress(ALICE_PUBLIC_ED)
).toEqual('5GoKvZWG5ZPYL1WUovuHW3zJBWBP5eT8CbqjdRY4Q6iMaQua');
});
@@ -88,7 +88,7 @@ describe('encode', (): void => {
it('fails when non-valid publicKey provided', (): void => {
expect(
(): string => encodeAddress(
keyring.alice.publicKey.slice(0, 30)
ALICE_PUBLIC_ED.slice(0, 30)
)
).toThrow(/Expected a valid key/);
});
@@ -141,7 +141,7 @@ describe('encode', (): void => {
it('encodes with 2 byte prefix', (): void => {
expect(
encodeAddress(keyring.alice.publicKey, 255)
encodeAddress(ALICE_PUBLIC_ED, 255)
).toEqual('yGHU8YKprxHbHdEv7oUK4rzMZXtsdhcXVG2CAMyC9WhzhjH2k');
});
@@ -155,19 +155,19 @@ describe('encode', (): void => {
it('does not encode for > 16,383, < 0', (): void => {
expect(
() => encodeAddress(keyring.alice.publicKey, -1)
() => encodeAddress(ALICE_PUBLIC_ED, -1)
).toThrow(/range ss58Format specified/);
expect(
() => encodeAddress(keyring.alice.publicKey, 16384)
() => encodeAddress(ALICE_PUBLIC_ED, 16384)
).toThrow(/range ss58Format specified/);
});
it('does not encode reserved', (): void => {
expect(
() => encodeAddress(keyring.alice.publicKey, 46)
() => encodeAddress(ALICE_PUBLIC_ED, 46)
).toThrow(/range ss58Format specified/);
expect(
() => encodeAddress(keyring.alice.publicKey, 47)
() => encodeAddress(ALICE_PUBLIC_ED, 47)
).toThrow(/range ss58Format specified/);
});
});
+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 { encodeDerivedAddress } from '.';
@@ -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 { BN } 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 { encodeMultiAddress } from '.';

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