Compare commits

...
36 Commits
Author SHA1 Message Date
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
63 changed files with 587 additions and 512 deletions
+2
View File
@@ -26,3 +26,5 @@
8.0.5 8.0.5
8.1.2 8.1.2
8.2.2 8.2.2
8.3.2
8.3.3
+2
View File
@@ -1 +1,3 @@
Jaco <jacogr@gmail.com> 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>
+15
View File
@@ -1,5 +1,20 @@
# CHANGELOG # CHANGELOG
## 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 ## 8.3.1 Jan 9, 2022
Changes: Changes:
+45 -45
View File
@@ -1,45 +1,45 @@
1228 Jaco 1246 Jaco 8.3.3 (#1390)
9 Antoine Estienne 9 Antoine Estienne Add eth uri keyring test (#1291)
6 Amaury Martiny 6 Amaury Martiny Add tests from Rust (#283)
5 kwingram25 5 kwingram25 Add BN consts and timeToString (#610)
4 Adam Dossa 4 Adam Dossa Update Polymesh Genesis Hash (#1193)
3 Jakub Pánik 3 Jakub Pánik HydraDX Snakenet Gen3-1 (#977)
3 Luke Schoen 3 Luke Schoen docs: Fix example in readme since we use default imports (#243)
2 AndreasGassmann 2 AndreasGassmann feat(dependencies): remove moment.js (#530)
2 Gav Wood 2 Gav Wood Fix stake:unstake (#182)
2 Hyungsuk Kang 2 Hyungsuk Kang Add cross client Encryption/Decryption (#496)
2 Jared Norris 2 Jared Norris Add Sora network (#1306)
2 Nantian 2 Nantian fix bigint type (#1079)
2 pan 2 pan add bifrost (#1296)
2 Stefanie Doll 2 Stefanie Doll Add missing dependencies to util-crypto (#424)
1 Agustinus Theodorus 1 Agustinus Theodorus docs: fix typo in naclSeal docs. (#1005)
1 Alexander Krupenkin 1 Alexander Krupenkin Added ECDSA keypair support (#589)
1 alexdniep 1 alexdniep added equilibrium slip44; added equilibrium genesis hash (#984)
1 amphineko 1 amphineko chore: fix typo in versionDetect messages (#941)
1 Axel Chalon 1 Axel Chalon Simplify @polkadot/keyring KeyringPair (#419)
1 Brad Larson 1 Brad Larson [FIX] Adjust error message (#646)
1 Eliott Teissonniere 1 Eliott Teissonniere add nodle ledger specs (#1089)
1 h4x3rotab 1 h4x3rotab Throws an error when signing with a locked keypair (#578)
1 Harry Liu 1 Harry Liu Update README.md (#446)
1 Hussein Ait-Lahcen 1 Hussein Ait-Lahcen Add Picasso Genesis Hash (#1261)
1 Igor 1 Igor Support genshiro network (#1148)
1 Jake Naviasky 1 Jake Naviasky Add evmToAddress and addressToEvm crypto utils. (#705)
1 JesseAbram 1 JesseAbram added check if valid address to docs (#440)
1 joe petrowski 1 joe petrowski Add example for multisig address creation (#590)
1 Lezek123 1 Lezek123 logger - wildcard include/exclude with DEBUG env (#932)
1 Lovesh Harchandani 1 Lovesh Harchandani Add Dock network id for address generation (#640)
1 Mario Neises 1 Mario Neises remove redudant export (#257)
1 Miguel Hervas 1 Miguel Hervas Add CFG Ledger Support (#1057)
1 nahuseyoum 1 nahuseyoum Reserving 65 for Aventus based on the new extended range (#871)
1 qwer951123 1 qwer951123 Add acala genesis (#1161)
1 Raoul Millais 1 Raoul Millais Fix yarn add instructions in x-global README (#873)
1 Raymond Zhong 1 Raymond Zhong Add Edgeware ledger app (#1006)
1 Reto Trinkler 1 Reto Trinkler Adding 4 as address type of ss58 for Katal Chain (#639)
1 Rocco Musolino 1 Rocco Musolino remove doc broken link (#697)
1 Song Zhou 1 Song Zhou Add in ability to encrypt/decrypt msg with keyring (#1070)
1 Thibaut Sardan 1 Thibaut Sardan add hasLedgerSupport prop to networks (#835)
1 Tomokazu Kozuma 1 Tomokazu Kozuma fix comment (#1119)
1 Tore19 1 Tore19 Add stafi genesis hash (#1096)
1 Wei Tang 1 Wei Tang ss58: add Kulupu prefix to the list (#595)
1 WoeOm 1 WoeOm Handing high precision scenes (#450)
1 Yuri 1 Yuri Extra check for process for browser bundles (#923)
+4 -4
View File
@@ -10,7 +10,7 @@
"url": "https://github.com/polkadot-js/common.git" "url": "https://github.com/polkadot-js/common.git"
}, },
"sideEffects": false, "sideEffects": false,
"version": "8.3.1", "version": "8.3.3",
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
@@ -28,11 +28,11 @@
"test:one": "polkadot-dev-run-test --runInBand" "test:one": "polkadot-dev-run-test --runInBand"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.16.7", "@babel/core": "^7.16.12",
"@polkadot/dev": "^0.65.23", "@polkadot/dev": "^0.65.43",
"@types/jest": "^27.4.0" "@types/jest": "^27.4.0"
}, },
"resolutions": { "resolutions": {
"typescript": "^4.5.3" "typescript": "^4.5.5"
} }
} }
+3 -3
View File
@@ -16,7 +16,7 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
@@ -25,9 +25,9 @@
"@ledgerhq/hw-transport": "^6.20.0", "@ledgerhq/hw-transport": "^6.20.0",
"@ledgerhq/hw-transport-webhid": "^6.20.0", "@ledgerhq/hw-transport-webhid": "^6.20.0",
"@ledgerhq/hw-transport-webusb": "^6.20.0", "@ledgerhq/hw-transport-webusb": "^6.20.0",
"@polkadot/util": "8.3.1" "@polkadot/util": "8.3.3"
}, },
"optionalDependencies": { "optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.20.0" "@ledgerhq/hw-transport-node-hid-singleton": "^6.23.1"
} }
} }
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,6 +6,6 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../util" } { "path": "../util/tsconfig.build.json" }
] ]
} }
+3 -3
View File
@@ -19,13 +19,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@ledgerhq/hw-transport": "^6.20.0", "@ledgerhq/hw-transport": "^6.20.0",
"@polkadot/hw-ledger-transports": "8.3.1", "@polkadot/hw-ledger-transports": "8.3.3",
"@polkadot/util": "8.3.1", "@polkadot/util": "8.3.3",
"@zondax/ledger-substrate": "^0.24.0" "@zondax/ledger-substrate": "^0.24.0"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,7 +6,7 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../util" }, { "path": "../hw-ledger-transports/tsconfig.build.json" },
{ "path": "../util-crypto" } { "path": "../util/tsconfig.build.json" }
] ]
} }
+5 -5
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/util": "8.3.1", "@polkadot/util": "8.3.3",
"@polkadot/util-crypto": "8.3.1" "@polkadot/util-crypto": "8.3.3"
}, },
"peerDependencies": { "peerDependencies": {
"@polkadot/util": "8.3.1", "@polkadot/util": "8.3.3",
"@polkadot/util-crypto": "8.3.1" "@polkadot/util-crypto": "8.3.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,7 +6,7 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../hw-ledger-transports" }, { "path": "../util/tsconfig.build.json" },
{ "path": "../util" } { "path": "../util-crypto/tsconfig.build.json" }
] ]
} }
+4 -4
View File
@@ -17,14 +17,14 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/util": "8.3.1" "@polkadot/util": "8.3.3"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/hw-ledger": "8.3.1", "@polkadot/hw-ledger": "8.3.3",
"@polkadot/x-fetch": "8.3.1" "@polkadot/x-fetch": "8.3.3"
} }
} }
+1
View File
@@ -62,6 +62,7 @@ export const knownGenesis: KnownGenesis = {
'0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063' '0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
], ],
rococo: [ rococo: [
'0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897',
'0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770', '0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770',
'0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff', '0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff',
'0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a', '0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a',
+20 -2
View File
@@ -6,9 +6,14 @@ import type { SubstrateNetwork } from './types';
import { knownGenesis, knownIcon, knownLedger, knownTestnet } from './defaults'; import { knownGenesis, knownIcon, knownLedger, knownTestnet } from './defaults';
import { allNetworks, availableNetworks, selectableNetworks } from '.'; import { allNetworks, availableNetworks, selectableNetworks } from '.';
describe('selectableNetworks', (): void => { describe('availableNetworks', (): void => {
it('has the correct starting order', (): 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 => { it('has no ignored networks', (): void => {
@@ -62,7 +67,9 @@ describe('selectableNetworks', (): void => {
) )
).toEqual([]); ).toEqual([]);
}); });
});
describe('allNetworks', (): void => {
it('has no ss58 duplicates', (): void => { it('has no ss58 duplicates', (): void => {
const dupes: SubstrateNetwork[] = []; const dupes: SubstrateNetwork[] = [];
const uniques: SubstrateNetwork[] = []; const uniques: SubstrateNetwork[] = [];
@@ -78,3 +85,14 @@ describe('selectableNetworks', (): void => {
expect(dupes).toEqual([]); 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');
});
});
+4 -4
View File
@@ -43,12 +43,12 @@ function sortNetworks (a: Network, b: Network): number {
const isUnSortedB = UNSORTED.includes(b.prefix); const isUnSortedB = UNSORTED.includes(b.prefix);
return isUnSortedA === isUnSortedB return isUnSortedA === isUnSortedB
? 0 ? isUnSortedA
? 0
: a.displayName.localeCompare(b.displayName)
: isUnSortedA : isUnSortedA
? -1 ? -1
: isUnSortedB : 1;
? 1
: a.displayName.localeCompare(b.displayName);
} }
// This is all the Substrate networks with our additional information // This is all the Substrate networks with our additional information
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.3.3' };
+32 -5
View File
@@ -63,13 +63,13 @@ export const knownSubstrate: KnownSubstrate[] = [
website: null website: null
}, },
{ {
decimals: [15], decimals: [18],
displayName: 'Plasm Network', displayName: 'Astar Network',
network: 'plasm', network: 'astar',
prefix: 5, prefix: 5,
standardAccount: '*25519', standardAccount: '*25519',
symbols: ['PLM'], symbols: ['ASTR'],
website: 'https://plasmnet.io' website: 'https://astar.network'
}, },
{ {
decimals: [12], decimals: [12],
@@ -629,6 +629,15 @@ export const knownSubstrate: KnownSubstrate[] = [
symbols: ['CLV'], symbols: ['CLV'],
website: 'https://clover.finance' website: 'https://clover.finance'
}, },
{
decimals: [12],
displayName: 'Litmus Network',
network: 'litmus',
prefix: 131,
standardAccount: '*25519',
symbols: ['LIT'],
website: 'https://litentry.com/'
},
{ {
decimals: [18], decimals: [18],
displayName: 'Altair', displayName: 'Altair',
@@ -674,6 +683,15 @@ export const knownSubstrate: KnownSubstrate[] = [
symbols: ['NEER'], symbols: ['NEER'],
website: 'https://bit.country' 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], decimals: [18],
displayName: 'Efinity', displayName: 'Efinity',
@@ -701,6 +719,15 @@ export const knownSubstrate: KnownSubstrate[] = [
symbols: ['MOVR'], symbols: ['MOVR'],
website: 'https://moonbeam.network' website: 'https://moonbeam.network'
}, },
{
decimals: [12],
displayName: 'Ajuna Network',
network: 'ajuna',
prefix: 1337,
standardAccount: 'Sr25519',
symbols: ['AJUN'],
website: 'https://ajuna.io'
},
{ {
decimals: [12], decimals: [12],
displayName: 'Kapex', displayName: 'Kapex',
@@ -6,8 +6,8 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../hw-ledger" }, { "path": "../hw-ledger/tsconfig.build.json" },
{ "path": "../util" }, { "path": "../util/tsconfig.build.json" },
{ "path": "../x-fetch" } { "path": "../x-fetch/tsconfig.build.json" }
] ]
} }
+6 -6
View File
@@ -22,7 +22,7 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": { "browser": {
"crypto": false, "crypto": false,
"stream": false "stream": false
@@ -32,11 +32,11 @@
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@noble/hashes": "0.5.7", "@noble/hashes": "0.5.7",
"@noble/secp256k1": "1.3.4", "@noble/secp256k1": "1.3.4",
"@polkadot/networks": "8.3.1", "@polkadot/networks": "8.3.3",
"@polkadot/util": "8.3.1", "@polkadot/util": "8.3.3",
"@polkadot/wasm-crypto": "^4.5.1", "@polkadot/wasm-crypto": "^4.5.1",
"@polkadot/x-bigint": "8.3.1", "@polkadot/x-bigint": "8.3.3",
"@polkadot/x-randomvalues": "8.3.1", "@polkadot/x-randomvalues": "8.3.3",
"ed2curve": "^0.3.0", "ed2curve": "^0.3.0",
"micro-base": "^0.10.2", "micro-base": "^0.10.2",
"tweetnacl": "^1.0.3" "tweetnacl": "^1.0.3"
@@ -45,6 +45,6 @@
"@types/ed2curve": "^0.2.2" "@types/ed2curve": "^0.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"@polkadot/util": "8.3.1" "@polkadot/util": "8.3.3"
} }
} }
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
describe('cryptoWaitReady', (): void => {
it('should return false when it cannot initialize', async (): Promise<void> => {
const old = global.WebAssembly;
global.WebAssembly = null as unknown as typeof WebAssembly;
const { cryptoWaitReady } = await import('./crypto');
expect(await cryptoWaitReady()).toBe(false);
global.WebAssembly = old;
});
});
+6 -5
View File
@@ -1,16 +1,17 @@
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors // Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { assert } from '@polkadot/util';
import { isReady, waitReady } from '@polkadot/wasm-crypto'; import { isReady, waitReady } from '@polkadot/wasm-crypto';
export const cryptoIsReady = isReady; export const cryptoIsReady = isReady;
export function cryptoWaitReady (): Promise<boolean> { export function cryptoWaitReady (): Promise<boolean> {
return waitReady() return waitReady()
.then((): boolean => true) .then((): boolean => {
.catch((error): boolean => { assert(isReady(), 'Unable to initialize @polkadot/util-crypto');
console.error('Unable to initialize @polkadot/util-crypto', error);
return false; return true;
}); })
.catch(() => false);
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '8.3.3' };
+14
View File
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../networks/tsconfig.build.json" },
{ "path": "../util/tsconfig.build.json" },
{ "path": "../x-bigint/tsconfig.build.json" },
{ "path": "../x-randomvalues/tsconfig.build.json" }
]
}
-14
View File
@@ -1,14 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../networks" },
{ "path": "../util" },
{ "path": "../x-bigint" },
{ "path": "../x-randomvalues" }
]
}
+6 -6
View File
@@ -34,19 +34,19 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-bigint": "8.3.1", "@polkadot/x-bigint": "8.3.3",
"@polkadot/x-global": "8.3.1", "@polkadot/x-global": "8.3.3",
"@polkadot/x-textdecoder": "8.3.1", "@polkadot/x-textdecoder": "8.3.3",
"@polkadot/x-textencoder": "8.3.1", "@polkadot/x-textencoder": "8.3.3",
"@types/bn.js": "^4.11.6", "@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0", "bn.js": "^4.12.0",
"ip-regex": "^4.3.0" "ip-regex": "^4.3.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/x-randomvalues": "8.3.1" "@polkadot/x-randomvalues": "8.3.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '8.3.3' };
+15
View File
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-bigint/tsconfig.build.json" },
{ "path": "../x-global/tsconfig.build.json" },
{ "path": "../x-randomvalues/tsconfig.build.json" },
{ "path": "../x-textdecoder/tsconfig.build.json" },
{ "path": "../x-textencoder/tsconfig.build.json" }
]
}
-15
View File
@@ -1,15 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-bigint" },
{ "path": "../x-global" },
{ "path": "../x-randomvalues" },
{ "path": "../x-textdecoder" },
{ "path": "../x-textencoder" }
]
}
+2 -2
View File
@@ -20,9 +20,9 @@
"./shim.cjs" "./shim.cjs"
], ],
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1" "@polkadot/x-global": "8.3.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,6 +6,6 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../x-global" } { "path": "../x-global/tsconfig.build.json" }
] ]
} }
+2 -2
View File
@@ -17,11 +17,11 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/util": "8.3.1", "@polkadot/util": "8.3.3",
"buffer-es6": "^4.9.3" "buffer-es6": "^4.9.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,6 +6,6 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../util" } { "path": "../util/tsconfig.build.json" }
] ]
} }
+3 -3
View File
@@ -17,14 +17,14 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1", "@polkadot/x-global": "8.3.3",
"@types/node-fetch": "^2.5.12", "@types/node-fetch": "^2.5.12",
"node-fetch": "^2.6.6" "node-fetch": "^2.6.7"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -6,6 +6,6 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"references": [ "references": [
{ "path": "../x-global" } { "path": "../x-global/tsconfig.build.json" }
] ]
} }
+1 -1
View File
@@ -17,7 +17,7 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7" "@babel/runtime": "^7.16.7"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '8.3.3' };
+3 -3
View File
@@ -17,15 +17,15 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1" "@polkadot/x-global": "8.3.3"
}, },
"devDependencies": { "devDependencies": {
"@types/react-native": "^0.66.11" "@types/react-native": "^0.66.15"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global/tsconfig.build.json" }
]
}
-11
View File
@@ -1,11 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global" }
]
}
+2 -2
View File
@@ -17,12 +17,12 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1" "@polkadot/x-global": "8.3.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global/tsconfig.build.json" }
]
}
-11
View File
@@ -1,11 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global" }
]
}
+2 -2
View File
@@ -17,12 +17,12 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1" "@polkadot/x-global": "8.3.3"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '8.3.3' };
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global/tsconfig.build.json" }
]
}
-11
View File
@@ -1,11 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global" }
]
}
+2 -2
View File
@@ -17,13 +17,13 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.3.1", "version": "8.3.3",
"browser": "browser.js", "browser": "browser.js",
"main": "node.js", "main": "node.js",
"react-native": "react-native.js", "react-native": "react-native.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.16.7",
"@polkadot/x-global": "8.3.1", "@polkadot/x-global": "8.3.3",
"@types/websocket": "^1.0.4", "@types/websocket": "^1.0.4",
"websocket": "^1.0.34" "websocket": "^1.0.34"
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '8.3.1' }; export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '8.3.3' };
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global/tsconfig.build.json" }
]
}
-11
View File
@@ -1,11 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../x-global" }
]
}
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"composite": true
},
"files": [],
"references": [
{ "path": "./packages/hw-ledger/tsconfig.build.json" },
{ "path": "./packages/hw-ledger-transports/tsconfig.build.json" },
{ "path": "./packages/keyring/tsconfig.build.json" },
{ "path": "./packages/networks/tsconfig.build.json" },
{ "path": "./packages/util/tsconfig.build.json" },
{ "path": "./packages/util-crypto/tsconfig.build.json" },
{ "path": "./packages/x-bigint/tsconfig.build.json" },
{ "path": "./packages/x-bundle/tsconfig.build.json" },
{ "path": "./packages/x-fetch/tsconfig.build.json" },
{ "path": "./packages/x-global/tsconfig.build.json" },
{ "path": "./packages/x-randomvalues/tsconfig.build.json" },
{ "path": "./packages/x-textdecoder/tsconfig.build.json" },
{ "path": "./packages/x-textencoder/tsconfig.build.json" },
{ "path": "./packages/x-ws/tsconfig.build.json" }
]
}
+2 -1
View File
@@ -1,7 +1,8 @@
{ {
"extends": "./tsconfig.base.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": "./packages" "baseUrl": "./packages",
"composite": false
}, },
"include": [ "include": [
"packages/**/src/**/*", "packages/**/src/**/*",
+8 -17
View File
@@ -1,22 +1,13 @@
{ {
"extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"composite": true "baseUrl": "./packages",
"composite": false
}, },
"files": [], "include": [
"references": [ "packages/**/src/**/*"
{ "path": "./packages/hw-ledger" }, ],
{ "path": "./packages/hw-ledger-transports" }, "exclude": [
{ "path": "./packages/keyring" }, "**/node_modules/**/*"
{ "path": "./packages/networks" },
{ "path": "./packages/util" },
{ "path": "./packages/util-crypto" },
{ "path": "./packages/x-bigint" },
{ "path": "./packages/x-bundle" },
{ "path": "./packages/x-fetch" },
{ "path": "./packages/x-global" },
{ "path": "./packages/x-randomvalues" },
{ "path": "./packages/x-textdecoder" },
{ "path": "./packages/x-textencoder" },
{ "path": "./packages/x-ws" },
] ]
} }
+265 -286
View File
File diff suppressed because it is too large Load Diff