Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36d8f6c922 | ||
|
|
8224beb85d | ||
|
|
ae6856f124 | ||
|
|
6953e22168 | ||
|
|
8c815ac601 | ||
|
|
9f1f5c9f5f | ||
|
|
b4acb2afa8 | ||
|
|
7287e746e3 | ||
|
|
ea4d5ab2e9 | ||
|
|
0dbc359f07 | ||
|
|
1e380ca1eb | ||
|
|
6bbe961a0f | ||
|
|
0fa8484208 | ||
|
|
30d5f5c118 | ||
|
|
3bcd1d17f6 | ||
|
|
befdfca6b2 | ||
|
|
c9b9f80987 | ||
|
|
0eae8fb0f7 | ||
|
|
903c3b120f | ||
|
|
6f8ffcbb99 | ||
|
|
2563a0ac3d | ||
|
|
d73ca5805a | ||
|
|
1e20b7725b | ||
|
|
97ec9e6626 | ||
|
|
120d5304f1 | ||
|
|
7c59232204 | ||
|
|
0df0bf094e | ||
|
|
5b16f0cf36 | ||
|
|
c1b7cd5885 | ||
|
|
ec7bae841e | ||
|
|
06fba7bdca | ||
|
|
b3f19247d5 | ||
|
|
5e562d7a59 | ||
|
|
b4479f3747 | ||
|
|
6dc79a0b7c | ||
|
|
e2aa034843 | ||
|
|
e99bc1163b | ||
|
|
a29dae61c5 | ||
|
|
777a04cc64 | ||
|
|
1f22566934 | ||
|
|
0011e5219a | ||
|
|
ce331bf6bd | ||
|
|
60d795f480 | ||
|
|
75a5f2fe48 | ||
|
|
dfda191c8b | ||
|
|
de09a2aa90 | ||
|
|
5e7cb9db9e | ||
|
|
61eca6100b | ||
|
|
4ef36d51ad | ||
|
|
880f560613 | ||
|
|
3f21278634 | ||
|
|
3c1e3573c9 | ||
|
|
6f8b14759d | ||
|
|
057e233cbf | ||
|
|
5dcc12e94d | ||
|
|
17886d60c0 | ||
|
|
b40fca79cb | ||
|
|
c04a228100 | ||
|
|
b3b1c7622c | ||
|
|
06f0813f2f | ||
|
|
5e086d6579 | ||
|
|
6fef3e0b2e | ||
|
|
7a7ee378c8 | ||
|
|
6fd2edcd76 | ||
|
|
73d17faaaa | ||
|
|
47bed3a2ba |
@@ -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 }}
|
||||
@@ -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 }}
|
||||
Vendored
-768
File diff suppressed because one or more lines are too long
+785
File diff suppressed because one or more lines are too long
+1
-1
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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'
|
||||
]
|
||||
};
|
||||
@@ -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'
|
||||
};
|
||||
@@ -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';
|
||||
@@ -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
|
||||
};
|
||||
@@ -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",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"**/src/*.ts",
|
||||
"**/src/**/*.ts",
|
||||
"**/test/*.json"
|
||||
],
|
||||
"references": [
|
||||
|
||||
@@ -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,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
|
||||
// });
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
Reference in New Issue
Block a user