Add @polkadot/networks (#707)

* Add @polkadot/networks

* Update .github/workflows/ss58-registry.yml

* Use prefixes from @polkadot/network

* Update packages/networks/src/checkLatest.spec.ts

* Cleanups

* Auto-check fields based on schema

* typo

* language
This commit is contained in:
Jaco Greeff
2020-10-14 14:52:29 +02:00
committed by GitHub
parent 95f4702e26
commit 3447cd40bf
16 changed files with 797 additions and 26 deletions
+2 -2
View File
@@ -1,13 +1,13 @@
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { allowedSS58 } from './ss58';
import { prefixes } from '@polkadot/networks';
const defaults = {
allowedDecodedLengths: [1, 2, 4, 8, 32, 33],
// publicKey has prefix + 2 checksum bytes, short only prefix + 1 checksum byte
allowedEncodedLengths: [3, 4, 6, 10, 35, 36],
allowedPrefix: allowedSS58,
allowedPrefix: prefixes,
prefix: 42
};
-21
View File
@@ -1,21 +0,0 @@
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
export const allowedSS58 = [
// Polkadot
0, 1,
// Kusama
2, 3,
// Katal Chain
4,
// Kulupu
16, 17,
// Dothereum
20,
// Dock testnet and mainnet
21, 22,
// Substrate default
42, 43,
// Substrate BBQ (deprecated)
68, 69
];