@pezkuwi/networks 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts ADDED
@@ -0,0 +1,43 @@
1
+ // Copyright 2017-2025 @polkadot/keyring authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import type { RegistryEntry } from '@substrate/ss58-registry';
5
+ import type { HexString } from '@pezkuwi/util/types';
6
+
7
+ export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
8
+
9
+ export type KnownIcon = Record<string, Icon>;
10
+
11
+ export type KnownLedger = Record<string, number>;
12
+
13
+ export type KnownGenesis = Record<string, HexString[]>;
14
+
15
+ export type KnownSubstrate = RegistryEntry;
16
+
17
+ export type KnownTestnet = Record<string, true>;
18
+
19
+ export interface SubstrateNetwork extends KnownSubstrate {
20
+ /** The genesisHash for the chain */
21
+ genesisHash: HexString[];
22
+ /** Does the chain has support for Ledger devices */
23
+ hasLedgerSupport: boolean;
24
+ /** The IdentityIcon to use for the chain */
25
+ icon: Icon;
26
+ /** Flag set when we don't include this chain */
27
+ isIgnored: boolean;
28
+ /** Flag to indicate a testnet */
29
+ isTestnet: boolean;
30
+ /** The Ledger-specific/required slip44 for the chain */
31
+ slip44?: number | null;
32
+ }
33
+
34
+ export interface Network extends SubstrateNetwork {
35
+ /** The network assigned to this chain */
36
+ network: string;
37
+ }
38
+
39
+ export interface Ss58Registry {
40
+ registry: KnownSubstrate[];
41
+ specification: string;
42
+ schema: Record<keyof KnownSubstrate, string>;
43
+ }