Compare commits

..
66 Commits
Author SHA1 Message Date
github-actions[bot] 36d8f6c922 [CI Skip] release/stable 8.7.1
skip-checks: true
2022-03-27 07:22:56 +00:00
Jaco 8224beb85d 8.7.1 (#1449) 2022-03-27 10:17:39 +03:00
github-actions[bot] ae6856f124 [CI Skip] release/beta 8.6.2-6
skip-checks: true
2022-03-27 06:27:30 +00:00
Jaco 6953e22168 Bump TypeScript (#1448) 2022-03-27 09:23:26 +03:00
github-actions[bot] 8c815ac601 [CI Skip] release/beta 8.6.2-5
skip-checks: true
2022-03-26 20:00:08 +00:00
Jaco 9f1f5c9f5f Re-add browser entry for util-crypto (#1447) 2022-03-26 21:56:05 +02:00
github-actions[bot] b4acb2afa8 [CI Skip] release/beta 8.6.2-4
skip-checks: true
2022-03-26 16:12:55 +00:00
Jaco 7287e746e3 Bump dev deps (#1446) 2022-03-26 18:08:40 +02:00
github-actions[bot] ea4d5ab2e9 [CI Skip] release/beta 8.6.2-3
skip-checks: true
2022-03-26 15:13:34 +00:00
Jaco 0dbc359f07 s/cryptoInit/bundleInit/ (#1445)
* s/cryptoInit/bundleInit/

* Adjust imports
2022-03-26 17:09:34 +02:00
github-actions[bot] 1e380ca1eb [CI Skip] release/beta 8.6.2-2
skip-checks: true
2022-03-26 11:22:32 +00:00
Jaco 6bbe961a0f Adjust browser entry (#1444) 2022-03-26 13:18:30 +02:00
github-actions[bot] 0fa8484208 [CI Skip] release/beta 8.6.2-1
skip-checks: true
2022-03-23 12:22:19 +00:00
Jaco 30d5f5c118 Additional BN & BigInt negative tests (#1443) 2022-03-23 14:18:14 +02:00
github-actions[bot] 3bcd1d17f6 [CI Skip] release/beta 8.6.2-0
skip-checks: true
2022-03-23 05:19:18 +00:00
Jaco befdfca6b2 Bump dev (#1442) 2022-03-23 07:15:12 +02:00
github-actions[bot] c9b9f80987 [CI Skip] release/stable 8.6.1
skip-checks: true
2022-03-19 07:57:33 +00:00
Jaco 0eae8fb0f7 8.6.1 (#1439)
* 8.6.1

* CHANGELOG
2022-03-19 09:53:48 +02:00
github-actions[bot] 903c3b120f [CI Skip] release/beta 8.5.2-9
skip-checks: true
2022-03-19 07:20:08 +00:00
Jaco 6f8ffcbb99 Bump deps & CHANGELOG (#1438) 2022-03-19 09:16:02 +02:00
github-actions[bot] 2563a0ac3d [CI Skip] release/beta 8.5.2-8
skip-checks: true
2022-03-19 07:03:23 +00:00
Jaco d73ca5805a Fail on invalid secp256k1 publicKey generation (#1437) 2022-03-19 08:59:31 +02:00
github-actions[bot] 1e20b7725b [CI Skip] release/beta 8.5.2-7
skip-checks: true
2022-03-18 14:14:26 +00:00
Lovesh Harchandani 97ec9e6626 Update genesis hash of Dock mainnet (#1436)
Signed-off-by: lovesh <lovesh.bond@gmail.com>
2022-03-18 16:09:24 +02:00
github-actions[bot] 120d5304f1 [CI Skip] release/beta 8.5.2-6
skip-checks: true
2022-03-16 19:15:14 +00:00
Jaco 7c59232204 Bump @polkadot/dev (#1434) 2022-03-16 20:55:13 +02:00
github-actions[bot] 0df0bf094e [CI Skip] release/beta 8.5.2-5
skip-checks: true
2022-03-16 07:22:49 +00:00
Jaco 5b16f0cf36 Bump dev (#1433)
* Bump dev

* Bump dev
2022-03-16 09:17:26 +02:00
github-actions[bot] c1b7cd5885 [CI Skip] release/beta 8.5.2-4
skip-checks: true
2022-03-15 18:25:20 +00:00
Jaco ec7bae841e Bump dev (w/ CJS react-native key) (#1432)
* Bump dev (w/ CJS react-native key)

* Latest dev
2022-03-15 20:21:13 +02:00
github-actions[bot] 06fba7bdca [CI Skip] release/beta 8.5.2-3
skip-checks: true
2022-03-15 17:24:51 +00:00
Jaco b3f19247d5 Cater for Expo v41+ in getRandomValues (#1431) 2022-03-15 19:20:44 +02:00
github-actions[bot] 5e562d7a59 [CI Skip] release/beta 8.5.2-2
skip-checks: true
2022-03-15 10:52:18 +00:00
Jaco b4479f3747 Aplit and organize network defaults (#1430)
* Aplit and organize network defaults

* Update include paths
2022-03-15 12:47:22 +02:00
github-actions[bot] 6dc79a0b7c [CI Skip] release/beta 8.5.2-1
skip-checks: true
2022-03-15 08:33:25 +00:00
Kami e2aa034843 Adding Westend genesis. (#1429)
* Update README.md

ss58-registry.json link is updated the previous link does not work.

* Adding Westend genesis.

We are working on projects that utilize this package, In our projects we need to have Westend testnet, to let the community to try and learn Polkadot ecosystem.

Sometimes Developers have issues adding this manually as asked here: w3f/Grant-Milestone-Delivery#387 (comment),
hence merging this pull request will help a lot.

Thank you.

* Update genesis.ts
2022-03-15 10:28:29 +02:00
github-actions[bot] e99bc1163b [CI Skip] release/beta 8.5.2-0
skip-checks: true
2022-03-15 06:53:18 +00:00
Kami a29dae61c5 Update README.md (#1427)
ss58-registry.json link is updated the previous link does not work.
2022-03-15 08:48:07 +02:00
github-actions[bot] 777a04cc64 [CI Skip] release/stable 8.5.1
skip-checks: true
2022-03-12 08:12:28 +00:00
Jaco 1f22566934 8.5.1 (#1426)
* 8.5.1

* Update test expectations
2022-03-12 10:08:09 +02:00
github-actions[bot] 0011e5219a [CI Skip] release/beta 8.4.2-12
skip-checks: true
2022-03-10 07:39:12 +00:00
Jaco ce331bf6bd Bump deps (& yarn 3.2.0) (#1425) 2022-03-10 09:35:02 +02:00
github-actions[bot] 60d795f480 [CI Skip] release/beta 8.4.2-11
skip-checks: true
2022-03-07 08:13:22 +00:00
Jaco 75a5f2fe48 Support bundlers where import.meta.url is undefined (#1423) 2022-03-07 10:08:38 +02:00
github-actions[bot] dfda191c8b [CI Skip] release/beta 8.4.2-10
skip-checks: true
2022-03-03 13:26:38 +00:00
Jaco de09a2aa90 Rename auto step (#1421) 2022-03-03 15:23:00 +02:00
github-actions[bot] 5e7cb9db9e [CI Skip] release/beta 8.4.2-9
skip-checks: true
2022-03-03 09:32:42 +00:00
Jaco 61eca6100b Remove checkout from auto-{approve, merge} actions (#1420) 2022-03-03 11:27:34 +02:00
github-actions[bot] 4ef36d51ad [CI Skip] release/beta 8.4.2-8
skip-checks: true
2022-03-02 05:18:25 +00:00
Jaco 880f560613 Replace mergify with action (#1419) 2022-03-02 05:13:32 +00:00
github-actions[bot] 3f21278634 [CI Skip] release/beta 8.4.2-7
skip-checks: true
2022-03-01 10:20:56 +00:00
Jaco 3c1e3573c9 Bump TS (#1417) 2022-03-01 10:16:17 +00:00
github-actions[bot] 6f8b14759d [CI Skip] release/beta 8.4.2-6
skip-checks: true
2022-02-27 17:45:01 +00:00
Jaco 057e233cbf Approve action adjust (#1416)
* Approve action adjust

* Only labelled
2022-02-27 17:40:23 +00:00
github-actions[bot] 5dcc12e94d [CI Skip] release/beta 8.4.2-5
skip-checks: true
2022-02-26 08:24:03 +00:00
Jaco 17886d60c0 Dev bump (#1415) 2022-02-26 08:19:32 +00:00
github-actions[bot] b40fca79cb [CI Skip] release/beta 8.4.2-4
skip-checks: true
2022-02-23 10:38:26 +00:00
Jaco c04a228100 Skip job on non-local repo 2022-02-23 12:33:35 +02:00
github-actions[bot] b3b1c7622c [CI Skip] release/beta 8.4.2-3
skip-checks: true
2022-02-23 10:03:20 +00:00
Jaco 06f0813f2f Use jacogr/action-approve (#1412) 2022-02-23 11:58:15 +02:00
github-actions[bot] 5e086d6579 [CI Skip] release/beta 8.4.2-2
skip-checks: true
2022-02-21 10:31:13 +00:00
Jaco 6fef3e0b2e Bump deps (#1411)
* Bump deps

* Bump @noble/secp256k1
2022-02-21 10:27:20 +00:00
github-actions[bot] 7a7ee378c8 [CI Skip] release/beta 8.4.2-1
skip-checks: true
2022-02-15 18:22:10 +00:00
Jaco 6fd2edcd76 Bump deps (#1410) 2022-02-15 18:17:55 +00:00
github-actions[bot] 73d17faaaa [CI Skip] release/beta 8.4.2-0
skip-checks: true
2022-02-15 07:49:34 +00:00
Jaco 47bed3a2ba Add mergify (#1409) 2022-02-15 09:45:31 +02:00
58 changed files with 1501 additions and 1349 deletions
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
approve:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-approve@master
with:
authors: jacogr
labels: -auto
token: ${{ secrets.GH_PAT_BOT }}
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
with:
checks: build,lint,test
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
-768
View File
File diff suppressed because one or more lines are too long
+785
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.1.1.cjs
yarnPath: .yarn/releases/yarn-3.2.0.cjs
+37
View File
@@ -1,5 +1,42 @@
# CHANGELOG
## 8.7.1 Mar 27, 2022
Changes:
- Fix race-condition with wasm overrides, make `cryptoWaitReady` lazy
- Additional tests for `BN` & `BigInt` negative conversions
- Upgrade to `@polkadot/wasm-crypto` 5.1.1
## 8.6.1 Mar 19, 2022
**Important** This contains an upgraded version of `@polkadot/wasm-crypto`. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1
Contributed:
- Add aditional Dock mainnet genesis (Thanks to https://github.com/lovesh)
- Add Westend genesis (Thanks to https://github.com/Nick-1979)
- Update README with ss58 links (Thanks to https://github.com/Nick-197)
Changes:
- Ensure invalid secp256k1 publicKeys are not returned
- Cater for Expo v41+ in RN random value generation
- Fixed for RN environment imports
- Internal split of details in `@polkadot/networks`
- Additional workaround for Vite bundling
- Upgrade to `@polkadot/wasm-crypto` 5.0.1
## 8.5.1 Mar 12, 2022
Changes:
- Adjust for bundlers where `import.meta.url` is undefined
- Upgrade dependencies to latest stable versions
## 8.4.1 Feb 14, 2022
Changes:
+3 -2
View File
@@ -1,4 +1,4 @@
1258 Jaco 8.4.1 (#1408)
1288 Jaco 8.7.1 (#1449)
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)
@@ -9,6 +9,8 @@
2 Gav Wood Fix stake:unstake (#182)
2 Hyungsuk Kang Add cross client Encryption/Decryption (#496)
2 Jared Norris Add Sora network (#1306)
2 Kami Adding Westend genesis. (#1429)
2 Lovesh Harchandani Update genesis hash of Dock mainnet (#1436)
2 Nantian fix bigint type (#1079)
2 pan add bifrost (#1296)
2 Stefanie Doll Add missing dependencies to util-crypto (#424)
@@ -28,7 +30,6 @@
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)
+6 -6
View File
@@ -3,14 +3,14 @@
"bugs": "https://github.com/polkadot-js/common/issues",
"homepage": "https://github.com/polkadot-js/common#readme",
"license": "Apache-2.0",
"packageManager": "yarn@3.0.1",
"packageManager": "yarn@3.2.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/polkadot-js/common.git"
},
"sideEffects": false,
"version": "8.4.1",
"version": "8.7.1",
"workspaces": [
"packages/*"
],
@@ -27,11 +27,11 @@
"test:one": "polkadot-dev-run-test --runInBand"
},
"devDependencies": {
"@babel/core": "^7.17.2",
"@polkadot/dev": "^0.65.56",
"@types/jest": "^27.4.0"
"@babel/core": "^7.17.8",
"@polkadot/dev": "^0.65.101",
"@types/jest": "^27.4.1"
},
"resolutions": {
"typescript": "^4.5.5"
"typescript": "^4.6.3"
}
}
+4 -4
View File
@@ -16,18 +16,18 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@babel/runtime": "^7.17.8",
"@ledgerhq/hw-transport": "^6.24.1",
"@ledgerhq/hw-transport-webhid": "^6.24.1",
"@ledgerhq/hw-transport-webusb": "^6.24.1",
"@polkadot/util": "8.4.1"
"@polkadot/util": "8.7.1"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.24.1"
"@ledgerhq/hw-transport-node-hid-singleton": "^6.26.0"
}
}
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '8.7.1' };
+4 -4
View File
@@ -19,13 +19,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@babel/runtime": "^7.17.8",
"@ledgerhq/hw-transport": "^6.24.1",
"@polkadot/hw-ledger-transports": "8.4.1",
"@polkadot/util": "8.4.1",
"@polkadot/hw-ledger-transports": "8.7.1",
"@polkadot/util": "8.7.1",
"@zondax/ledger-substrate": "^0.24.0"
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ import type { SubstrateApp } 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
// These match up with the keys of the knownLedger object in the @polkadot/networks/defaults/ledger.ts
export const ledgerApps: Record<string, (transport: Transport) => SubstrateApp> = {
bifrost: newBifrostApp,
centrifuge: newCentrifugeApp,
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '8.7.1' };
+6 -6
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/util": "8.4.1",
"@polkadot/util-crypto": "8.4.1"
"@babel/runtime": "^7.17.8",
"@polkadot/util": "8.7.1",
"@polkadot/util-crypto": "8.7.1"
},
"peerDependencies": {
"@polkadot/util": "8.4.1",
"@polkadot/util-crypto": "8.4.1"
"@polkadot/util": "8.7.1",
"@polkadot/util-crypto": "8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '8.7.1' };
+3 -1
View File
@@ -65,7 +65,9 @@ describe('testingPairs', (): void => {
delete ring.nobody;
Object.keys(ring).forEach((testKeyring, i) => {
if (i < 6) { expect(u8aToHex(ring[testKeyring].publicKey)).toEqual(u8aToHex(keyring.createFromUri(privKeys[i]).publicKey)); }
if (i < 6) {
expect(u8aToHex(ring[testKeyring].publicKey)).toEqual(u8aToHex(keyring.createFromUri(privKeys[i]).publicKey));
}
});
});
});
+1 -1
View File
@@ -2,4 +2,4 @@
A list of all available Substrate networks and their applicable prefixes.
This list is periodically checked against the master list available at https://github.com/paritytech/substrate/blob/master/ss58-registry.json
This list is periodically checked against the master list available at https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json
+6 -6
View File
@@ -17,15 +17,15 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/util": "8.4.1",
"@substrate/ss58-registry": "^1.14.0"
"@babel/runtime": "^7.17.8",
"@polkadot/util": "8.7.1",
"@substrate/ss58-registry": "^1.17.0"
},
"devDependencies": {
"@polkadot/hw-ledger": "8.4.1",
"@polkadot/x-fetch": "8.4.1"
"@polkadot/hw-ledger": "8.7.1",
"@polkadot/x-fetch": "8.7.1"
}
}
+2 -2
View File
@@ -8,9 +8,9 @@ import fs from 'fs';
import { objectKeys, stringify } from '@polkadot/util';
import { fetch } from '@polkadot/x-fetch';
import { substrateRegistry } from './defaults';
import { allNetworks } from './';
const REGISTRY = 'https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json';
const OUTPUT = './.github/ss58-check.md';
function assertAndLog (check: boolean, error: string): void {
@@ -28,7 +28,7 @@ describe('check latest Substrate ss58 registry', (): void => {
let original: Ss58Registry;
beforeAll(async (): Promise<void> => {
original = (await (await fetch(substrateRegistry)).json()) as Ss58Registry;
original = (await (await fetch(REGISTRY)).json()) as Ss58Registry;
});
it('has the same number as the original', (): void => {
-48
View File
@@ -1,48 +0,0 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
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';
// these are icon overrides
export const knownIcon: KnownIcon = {
centrifuge: 'polkadot',
kusama: 'polkadot',
polkadot: 'polkadot',
sora: 'polkadot',
statemine: 'polkadot',
statemint: 'polkadot',
westmint: 'polkadot'
};
// These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
// 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,
equilibrium: 0x05f5e0fd,
genshiro: 0x05f5e0fc,
kusama: 0x000001b2,
'nodle-chain': 0x000003eb,
polkadot: 0x00000162,
polymesh: 0x00000253,
sora: 0x00000269,
statemine: 0x000001b2 // common-good on Kusama, shares derivation
};
// testnets should not allow selection
export const knownTestnet: KnownTestnet = {
'': true, // this is the default non-network entry
'cess-testnet': true,
'dock-testnet': true,
jupiter: true,
'mathchain-testnet': true,
subspace_testnet: true,
'zero-alphaville': true
};
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownGenesis } from './types';
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
@@ -24,6 +24,7 @@ export const knownGenesis: KnownGenesis = {
'0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'
],
'dock-mainnet': [
'0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae',
'0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'
],
edgeware: [
@@ -88,5 +89,8 @@ export const knownGenesis: KnownGenesis = {
],
subsocial: [
'0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'
],
westend: [
'0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e'
]
};
+15
View File
@@ -0,0 +1,15 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownIcon } from '../types';
// these are icon overrides
export const knownIcon: KnownIcon = {
centrifuge: 'polkadot',
kusama: 'polkadot',
polkadot: 'polkadot',
sora: 'polkadot',
statemine: 'polkadot',
statemint: 'polkadot',
westmint: 'polkadot'
};
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { knownGenesis } from './genesis';
export { knownIcon } from './icons';
export { knownLedger } from './ledger';
export { knownTestnet } from './testnets';
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownLedger } from '../types';
// These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
// and maps to the known slip44 (minus the `0x8` hard derivation flag)
//
// NOTE: Any network here needs to have a genesisHash attached in the ./genesis.ts config
export const knownLedger: KnownLedger = {
bifrost: 0x00000314,
centrifuge: 0x000002eb,
'dock-mainnet': 0x00000252,
edgeware: 0x0000020b,
equilibrium: 0x05f5e0fd,
genshiro: 0x05f5e0fc,
kusama: 0x000001b2,
'nodle-chain': 0x000003eb,
polkadot: 0x00000162,
polymesh: 0x00000253,
sora: 0x00000269,
statemine: 0x000001b2 // common-good on Kusama, shares derivation
};
@@ -0,0 +1,15 @@
// Copyright 2017-2022 @polkadot/networks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KnownTestnet } from '../types';
// testnets should not allow selection
export const knownTestnet: KnownTestnet = {
'': true, // this is the default non-network entry
'cess-testnet': true,
'dock-testnet': true,
jupiter: true,
'mathchain-testnet': true,
subspace_testnet: true,
'zero-alphaville': true
};
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '8.7.1' };
@@ -232,19 +232,6 @@
"standardAccount": "*25519",
"website": "https://darwinia.network/"
},
{
"prefix": 19,
"network": "geek",
"displayName": "GeekCash",
"symbols": [
"GEEK"
],
"decimals": [
12
],
"standardAccount": "*25519",
"website": "https://geekcash.org"
},
{
"prefix": 20,
"network": "stafi",
@@ -633,6 +620,32 @@
"standardAccount": "*25519",
"website": "https://oak.tech"
},
{
"prefix": 52,
"network": "KICO",
"displayName": "KICO",
"symbols": [
"KICO"
],
"decimals": [
14
],
"standardAccount": "*25519",
"website": "https://dico.io"
},
{
"prefix": 53,
"network": "DICO",
"displayName": "DICO",
"symbols": [
"DICO"
],
"decimals": [
14
],
"standardAccount": "*25519",
"website": "https://dico.io"
},
{
"prefix": 55,
"network": "xxnetwork",
@@ -958,6 +971,19 @@
"standardAccount": "*25519",
"website": "https://sora.org"
},
{
"prefix": 789,
"network": "geek",
"displayName": "GEEK Network",
"symbols": [
"GEEK"
],
"decimals": [
18
],
"standardAccount": "*25519",
"website": "https://geek.gl"
},
{
"prefix": 1110,
"network": "efinity",
@@ -1075,6 +1101,19 @@
"standardAccount": "*25519",
"website": "https://subspace.network"
},
{
"prefix": 7391,
"network": "unique_mainnet",
"displayName": "Unique Network",
"symbols": [
"UNQ"
],
"decimals": [
18
],
"standardAccount": "*25519",
"website": "https://unique.network"
},
{
"prefix": 10041,
"network": "basilisk",
+1 -1
View File
@@ -7,7 +7,7 @@
"rootDir": "./src"
},
"include": [
"**/src/*.ts",
"**/src/**/*.ts",
"**/test/*.json"
],
"references": [
+11 -11
View File
@@ -16,27 +16,27 @@
"url": "https://github.com/polkadot-js/common.git"
},
"sideEffects": [
"./cryptoInit.js",
"./cryptoInit.cjs",
"./bundleInit.js",
"./bundleInit.cjs",
"./detectPackage.js",
"./detectPackage.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": {
"crypto": false,
"stream": false
},
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@babel/runtime": "^7.17.8",
"@noble/hashes": "1.0.0",
"@noble/secp256k1": "1.5.2",
"@polkadot/networks": "8.4.1",
"@polkadot/util": "8.4.1",
"@polkadot/wasm-crypto": "^4.5.1",
"@polkadot/x-bigint": "8.4.1",
"@polkadot/x-randomvalues": "8.4.1",
"@noble/secp256k1": "1.5.5",
"@polkadot/networks": "8.7.1",
"@polkadot/util": "8.7.1",
"@polkadot/wasm-crypto": "^5.1.1",
"@polkadot/x-bigint": "8.7.1",
"@polkadot/x-randomvalues": "8.7.1",
"@scure/base": "1.0.0",
"ed2curve": "^0.3.0",
"tweetnacl": "^1.0.3"
@@ -45,6 +45,6 @@
"@types/ed2curve": "^0.2.2"
},
"peerDependencies": {
"@polkadot/util": "8.4.1"
"@polkadot/util": "8.7.1"
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './cryptoInit';
import './bundleInit';
export { packageInfo } from './packageInfo';
@@ -7,7 +7,7 @@ import { utils as utilsNobleSecp256k1 } from '@noble/secp256k1';
import { u8aConcat } from '@polkadot/util';
import { cryptoWaitReady } from './crypto';
// import { cryptoWaitReady } from './crypto';
import { hmacSha256AsU8a } from './hmac';
// Set overrides on the secp256k1 utils
@@ -15,7 +15,7 @@ import { hmacSha256AsU8a } from './hmac';
utilsNobleSecp256k1.hmacSha256Sync = (key: Uint8Array, ...messages: Uint8Array[]) =>
hmacSha256AsU8a(key, u8aConcat(...messages));
// start init process immediately
cryptoWaitReady().catch((): void => {
// shouldn't happen, logged above
});
// // start init process immediately
// cryptoWaitReady().catch((): void => {
// // shouldn't happen, logged above
// });
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '8.7.1' };
@@ -5,7 +5,7 @@ import type { Keypair } from '../../types';
import { getPublicKey } from '@noble/secp256k1';
import { assert, hasBigInt } from '@polkadot/util';
import { assert, hasBigInt, u8aEmpty } from '@polkadot/util';
import { isReady, secp256k1FromSeed } from '@polkadot/wasm-crypto';
/**
@@ -17,9 +17,16 @@ export function secp256k1PairFromSeed (seed: Uint8Array, onlyJs?: boolean): Keyp
if (!hasBigInt || (!onlyJs && isReady())) {
const full = secp256k1FromSeed(seed);
const publicKey = full.slice(32);
// There is an issue with the secp256k1 when running in an ASM.js environment where
// it seems that the lazy static section yields invalid results on the _first_ run.
// If this happens, fail outright, we cannot allow invalid return values
// https://github.com/polkadot-js/wasm/issues/307
assert(!u8aEmpty(publicKey), 'Invalid publicKey generated from WASM interface');
return {
publicKey: full.slice(32),
publicKey,
secretKey: full.slice(0, 32)
};
}
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../cryptoInit';
import '../bundleInit';
import { stringToU8a } from '@polkadot/util';
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../cryptoInit';
import '../bundleInit';
import { hexToU8a } from '@polkadot/util';
import { waitReady } from '@polkadot/wasm-crypto';
+3 -1
View File
@@ -67,7 +67,9 @@ function verifyMultisig (result: VerifyResult, { message, publicKey, signature }
result.isValid = {
ecdsa: () => verifyDetect(result, { message, publicKey, signature: signature.subarray(1) }, VERIFIERS_ECDSA).isValid,
ed25519: () => ed25519Verify(message, signature.subarray(1), publicKey),
none: () => { throw Error('no verify for `none` crypto type'); },
none: () => {
throw Error('no verify for `none` crypto type');
},
sr25519: () => sr25519Verify(message, signature.subarray(1), publicKey)
}[type]();
} catch (error) {
+7 -7
View File
@@ -34,19 +34,19 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-bigint": "8.4.1",
"@polkadot/x-global": "8.4.1",
"@polkadot/x-textdecoder": "8.4.1",
"@polkadot/x-textencoder": "8.4.1",
"@babel/runtime": "^7.17.8",
"@polkadot/x-bigint": "8.7.1",
"@polkadot/x-global": "8.7.1",
"@polkadot/x-textdecoder": "8.7.1",
"@polkadot/x-textencoder": "8.7.1",
"@types/bn.js": "^5.1.0",
"bn.js": "^5.2.0",
"ip-regex": "^4.3.0"
},
"devDependencies": {
"@polkadot/x-randomvalues": "8.4.1"
"@polkadot/x-randomvalues": "8.7.1"
}
}
+7 -1
View File
@@ -50,12 +50,18 @@ describe('bnToU8a', (): void => {
).toEqual(new Uint8Array([251, 46]));
});
it('converts negative numbers (bitLength)', (): void => {
it('converts negative numbers (LE)', (): void => {
expect(
bnToU8a(new BN(-1234), { bitLength: 32, isNegative: true })
).toEqual(new Uint8Array([46, 251, 255, 255]));
});
it('converts negative numbers (LE, bitLength)', (): void => {
expect(
bnToU8a(new BN(-123456), { bitLength: 32, isNegative: true })
).toEqual(new Uint8Array([192, 29, 254, 255]));
});
it('handles backwards compatibility', (): void => {
expect(
bnToU8a(new BN(1234), 32, false)
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '8.7.1' };
+2 -2
View File
@@ -42,10 +42,10 @@ describe('u8aToBigInt', (): void => {
it('handles negative numbers (little-endian)', (): void => {
expect(
u8aToBigInt(
new Uint8Array([46, 251]),
new Uint8Array([192, 29, 254]),
{ isLe: true, isNegative: true }
)
).toEqual(-1234n);
).toEqual(-123456n);
});
it('handles negative numbers (big-endian)', (): void => {
+3 -3
View File
@@ -20,9 +20,9 @@
"./shim.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1"
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '8.7.1' };
+3 -3
View File
@@ -17,11 +17,11 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/util": "8.4.1",
"@babel/runtime": "^7.17.8",
"@polkadot/util": "8.7.1",
"buffer-es6": "^4.9.3"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '8.7.1' };
+4 -4
View File
@@ -17,14 +17,14 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1",
"@types/node-fetch": "^2.5.12",
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1",
"@types/node-fetch": "^2.6.1",
"node-fetch": "^2.6.7"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '8.7.1' };
+2 -2
View File
@@ -17,9 +17,9 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2"
"@babel/runtime": "^7.17.8"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '8.7.1' };
+4 -4
View File
@@ -17,15 +17,15 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1"
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1"
},
"devDependencies": {
"@types/react-native": "^0.66.15"
"@types/react-native": "^0.67.3"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '8.7.1' };
+6 -1
View File
@@ -16,6 +16,9 @@ import { insecureRandomValues } from './fallback';
export { packageInfo } from './packageInfo';
interface RNExt {
ExpoRandom: {
getRandomBase64String: (length: number) => string;
};
RNGetRandomValues: {
getRandomBase64: (length: number) => string;
}
@@ -27,7 +30,9 @@ interface GlobalExt extends Window {
function getRandomValuesNative <T extends Uint8Array> (output: T): T {
const bytes = base64Decode(
(NativeModules as RNExt).RNGetRandomValues.getRandomBase64(output.length)
(NativeModules as RNExt).RNGetRandomValues
? (NativeModules as RNExt).RNGetRandomValues.getRandomBase64(output.length)
: (NativeModules as RNExt).ExpoRandom.getRandomBase64String(output.length)
);
for (let i = 0; i < bytes.length; i++) {
+3 -3
View File
@@ -17,12 +17,12 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1"
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '8.7.1' };
+3 -3
View File
@@ -17,12 +17,12 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1"
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '8.7.1' };
+3 -3
View File
@@ -17,13 +17,13 @@
},
"sideEffects": false,
"type": "module",
"version": "8.4.1",
"version": "8.7.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/x-global": "8.4.1",
"@babel/runtime": "^7.17.8",
"@polkadot/x-global": "8.7.1",
"@types/websocket": "^1.0.5",
"websocket": "^1.0.34"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '8.4.1' };
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '8.7.1' };
+400 -412
View File
File diff suppressed because it is too large Load Diff