Small endpoint location renames (#7517)
* Small endpoint location renames * Undo path renames
This commit is contained in:
parent
251f0790ef
commit
f1db8ef17d
@ -6,16 +6,13 @@ import type { LinkOption } from './types';
|
||||
|
||||
import { defaultT } from '../util';
|
||||
import { createCustom, createDev, createOwn } from './development';
|
||||
import { createProduction } from './production';
|
||||
import { createKusamaRelay, createPolkadotRelay } from './productionRelays';
|
||||
import { createTesting } from './testing';
|
||||
import { createRococoRelay, createWestendRelay } from './testingRelays';
|
||||
import { prodChains, prodRelayKusama, prodRelayPolkadot } from './production';
|
||||
import { testChains, testRelayRococo, testRelayWestend } from './testing';
|
||||
import { expandEndpoints } from './util';
|
||||
|
||||
export { CUSTOM_ENDPOINT_KEY } from './development';
|
||||
export { prodChains } from './production';
|
||||
export { prodParasKusama, prodParasKusamaCommon, prodParasPolkadot, prodParasPolkadotCommon } from './productionRelays';
|
||||
export { testChains } from './testing';
|
||||
export { testParasRococo, testParasRococoCommon, testParasWestend, testParasWestendCommon } from './testingRelays';
|
||||
export * from './production';
|
||||
export * from './testing';
|
||||
|
||||
export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, withSort = true): LinkOption[] {
|
||||
return [
|
||||
@ -28,7 +25,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createPolkadotRelay(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, [prodRelayPolkadot], firstOnly, withSort),
|
||||
{
|
||||
isDisabled: false,
|
||||
isHeader: true,
|
||||
@ -36,7 +33,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createKusamaRelay(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, [prodRelayKusama], firstOnly, withSort),
|
||||
{
|
||||
isDisabled: false,
|
||||
isHeader: true,
|
||||
@ -45,7 +42,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createWestendRelay(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, [testRelayWestend], firstOnly, withSort),
|
||||
{
|
||||
isDisabled: false,
|
||||
isHeader: true,
|
||||
@ -53,7 +50,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createRococoRelay(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, [testRelayRococo], firstOnly, withSort),
|
||||
{
|
||||
isDisabled: false,
|
||||
isHeader: true,
|
||||
@ -62,7 +59,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createProduction(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, prodChains, firstOnly, withSort),
|
||||
{
|
||||
isDisabled: false,
|
||||
isHeader: true,
|
||||
@ -70,7 +67,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
|
||||
textBy: '',
|
||||
value: ''
|
||||
},
|
||||
...createTesting(t, firstOnly, withSort),
|
||||
...expandEndpoints(t, testChains, firstOnly, withSort),
|
||||
{
|
||||
isDevelopment: true,
|
||||
isDisabled: false,
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption, LinkOption } from './types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { expandEndpoints } from './util';
|
||||
export * from './productionRelayKusama';
|
||||
export * from './productionRelayPolkadot';
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
@ -12,9 +12,9 @@ import { expandEndpoints } from './util';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const prodChains: EndpointOption[] = [
|
||||
{
|
||||
info: 'aleph',
|
||||
@ -318,8 +318,3 @@ export const prodChains: EndpointOption[] = [
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// alphabetical based on chain name
|
||||
export function createProduction (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, prodChains, firstOnly, withSort);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { KUSAMA_GENESIS } from '../api/constants';
|
||||
@ -12,9 +11,9 @@ import { KUSAMA_GENESIS } from '../api/constants';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const prodParasKusama: EndpointOption[] = [
|
||||
{
|
||||
info: 'altair',
|
||||
@ -459,26 +458,23 @@ export const prodParasKusamaCommon: EndpointOption[] = [
|
||||
}
|
||||
];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function createKusama (t: TFunction): EndpointOption {
|
||||
return {
|
||||
dnslink: 'kusama',
|
||||
genesisHash: KUSAMA_GENESIS,
|
||||
info: 'kusama',
|
||||
text: 'Kusama',
|
||||
providers: {
|
||||
Parity: 'wss://kusama-rpc.polkadot.io',
|
||||
OnFinality: 'wss://kusama.api.onfinality.io/public-ws',
|
||||
// 'Geometry Labs': 'wss://kusama.geometry.io/websockets', // https://github.com/polkadot-js/apps/pull/6746
|
||||
Dwellir: 'wss://kusama-rpc.dwellir.com',
|
||||
RadiumBlock: 'wss://kusama.public.curie.radiumblock.co/ws',
|
||||
'light client': 'light://substrate-connect/kusama'
|
||||
// Pinknode: 'wss://rpc.pinknode.io/kusama/explorer' // https://github.com/polkadot-js/apps/issues/5721
|
||||
},
|
||||
teleport: [1000, 1001],
|
||||
linked: [
|
||||
...prodParasKusamaCommon,
|
||||
...prodParasKusama
|
||||
]
|
||||
};
|
||||
}
|
||||
export const prodRelayKusama: EndpointOption = {
|
||||
dnslink: 'kusama',
|
||||
genesisHash: KUSAMA_GENESIS,
|
||||
info: 'kusama',
|
||||
text: 'Kusama',
|
||||
providers: {
|
||||
Parity: 'wss://kusama-rpc.polkadot.io',
|
||||
OnFinality: 'wss://kusama.api.onfinality.io/public-ws',
|
||||
Dwellir: 'wss://kusama-rpc.dwellir.com',
|
||||
RadiumBlock: 'wss://kusama.public.curie.radiumblock.co/ws',
|
||||
// 'Geometry Labs': 'wss://kusama.geometry.io/websockets', // https://github.com/polkadot-js/apps/pull/6746
|
||||
// Pinknode: 'wss://rpc.pinknode.io/kusama/explorer' // https://github.com/polkadot-js/apps/issues/5721
|
||||
'light client': 'light://substrate-connect/kusama'
|
||||
},
|
||||
teleport: [1000, 1001],
|
||||
linked: [
|
||||
...prodParasKusamaCommon,
|
||||
...prodParasKusama
|
||||
]
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { POLKADOT_GENESIS } from '../api/constants';
|
||||
@ -12,9 +11,9 @@ import { POLKADOT_GENESIS } from '../api/constants';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const prodParasPolkadot: EndpointOption[] = [
|
||||
{
|
||||
info: 'acala',
|
||||
@ -306,24 +305,21 @@ export const prodParasPolkadotCommon: EndpointOption[] = [
|
||||
}
|
||||
];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function createPolkadot (t: TFunction): EndpointOption {
|
||||
return {
|
||||
dnslink: 'polkadot',
|
||||
genesisHash: POLKADOT_GENESIS,
|
||||
info: 'polkadot',
|
||||
text: 'Polkadot',
|
||||
providers: {
|
||||
Parity: 'wss://rpc.polkadot.io',
|
||||
OnFinality: 'wss://polkadot.api.onfinality.io/public-ws',
|
||||
// 'Geometry Labs': 'wss://polkadot.geometry.io/websockets', // https://github.com/polkadot-js/apps/pull/6746
|
||||
Dwellir: 'wss://polkadot-rpc.dwellir.com',
|
||||
'light client': 'light://substrate-connect/polkadot'
|
||||
// Pinknode: 'wss://rpc.pinknode.io/polkadot/explorer' // https://github.com/polkadot-js/apps/issues/5721
|
||||
},
|
||||
linked: [
|
||||
...prodParasPolkadotCommon,
|
||||
...prodParasPolkadot
|
||||
]
|
||||
};
|
||||
}
|
||||
export const prodRelayPolkadot: EndpointOption = {
|
||||
dnslink: 'polkadot',
|
||||
genesisHash: POLKADOT_GENESIS,
|
||||
info: 'polkadot',
|
||||
text: 'Polkadot',
|
||||
providers: {
|
||||
Parity: 'wss://rpc.polkadot.io',
|
||||
OnFinality: 'wss://polkadot.api.onfinality.io/public-ws',
|
||||
Dwellir: 'wss://polkadot-rpc.dwellir.com',
|
||||
// 'Geometry Labs': 'wss://polkadot.geometry.io/websockets', // https://github.com/polkadot-js/apps/pull/6746
|
||||
// Pinknode: 'wss://rpc.pinknode.io/polkadot/explorer' // https://github.com/polkadot-js/apps/issues/5721
|
||||
'light client': 'light://substrate-connect/polkadot'
|
||||
},
|
||||
linked: [
|
||||
...prodParasPolkadotCommon,
|
||||
...prodParasPolkadot
|
||||
]
|
||||
};
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { LinkOption } from './types';
|
||||
|
||||
import { createKusama } from './productionRelayKusama';
|
||||
import { createPolkadot } from './productionRelayPolkadot';
|
||||
import { expandEndpoints } from './util';
|
||||
|
||||
export { prodParasKusama, prodParasKusamaCommon } from './productionRelayKusama';
|
||||
export { prodParasPolkadot, prodParasPolkadotCommon } from './productionRelayPolkadot';
|
||||
|
||||
export function createKusamaRelay (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, [createKusama(t)], firstOnly, withSort);
|
||||
}
|
||||
|
||||
export function createPolkadotRelay (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, [createPolkadot(t)], firstOnly, withSort);
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption, LinkOption } from './types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { expandEndpoints } from './util';
|
||||
export * from './testingRelayRococo';
|
||||
export * from './testingRelayWestend';
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
@ -12,9 +12,9 @@ import { expandEndpoints } from './util';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const testChains: EndpointOption[] = [
|
||||
{
|
||||
info: 'ajuna',
|
||||
@ -588,7 +588,3 @@ export const testChains: EndpointOption[] = [
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export function createTesting (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, testChains, firstOnly, withSort);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { ROCOCO_GENESIS } from '../api/constants';
|
||||
@ -12,9 +11,9 @@ import { ROCOCO_GENESIS } from '../api/constants';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const testParasRococo: EndpointOption[] = [
|
||||
{
|
||||
info: 'arctic',
|
||||
@ -220,25 +219,21 @@ export const testParasRococoCommon: EndpointOption[] = [
|
||||
}
|
||||
];
|
||||
|
||||
// Based on history, this will expand so keep it as a singular chunk
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function createRococo (t: TFunction): EndpointOption {
|
||||
return {
|
||||
dnslink: 'rococo',
|
||||
genesisHash: ROCOCO_GENESIS,
|
||||
info: 'rococo',
|
||||
text: 'Rococo',
|
||||
providers: {
|
||||
Parity: 'wss://rococo-rpc.polkadot.io',
|
||||
'light client': 'light://substrate-connect/rococo'
|
||||
// OnFinality: 'wss://rococo.api.onfinality.io/public-ws', // After reset, node misses host functions
|
||||
// Pinknode: 'wss://rpc.pinknode.io/rococo/explorer' // After reset, syncs to old chain
|
||||
// 'Ares Protocol': 'wss://rococo.aresprotocol.com' // https://github.com/polkadot-js/apps/issues/5767
|
||||
},
|
||||
teleport: [1000, 1002],
|
||||
linked: [
|
||||
...testParasRococoCommon,
|
||||
...testParasRococo
|
||||
]
|
||||
};
|
||||
}
|
||||
export const testRelayRococo: EndpointOption = {
|
||||
dnslink: 'rococo',
|
||||
genesisHash: ROCOCO_GENESIS,
|
||||
info: 'rococo',
|
||||
text: 'Rococo',
|
||||
providers: {
|
||||
Parity: 'wss://rococo-rpc.polkadot.io',
|
||||
// OnFinality: 'wss://rococo.api.onfinality.io/public-ws', // After reset, node misses host functions
|
||||
// Pinknode: 'wss://rpc.pinknode.io/rococo/explorer' // After reset, syncs to old chain
|
||||
// 'Ares Protocol': 'wss://rococo.aresprotocol.com' // https://github.com/polkadot-js/apps/issues/5767
|
||||
'light client': 'light://substrate-connect/rococo'
|
||||
},
|
||||
teleport: [1000, 1002],
|
||||
linked: [
|
||||
...testParasRococoCommon,
|
||||
...testParasRococo
|
||||
]
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { EndpointOption } from './types';
|
||||
|
||||
import { WESTEND_GENESIS } from '../api/constants';
|
||||
@ -12,9 +11,9 @@ import { WESTEND_GENESIS } from '../api/constants';
|
||||
// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor
|
||||
// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks)
|
||||
// text: The text to display on the dropdown
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
// providers: The actual hosted secure websocket endpoint
|
||||
//
|
||||
// Alpahebtical based on text
|
||||
// IMPORTANT: Alphabetical based on text
|
||||
export const testParasWestend: EndpointOption[] = [
|
||||
{
|
||||
info: 'basilisk',
|
||||
@ -128,26 +127,22 @@ export const testParasWestendCommon: EndpointOption[] = [
|
||||
}
|
||||
];
|
||||
|
||||
// Based on history, this will expand so keep it as a singular chunk
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function createWestend (t: TFunction): EndpointOption {
|
||||
return {
|
||||
dnslink: 'westend',
|
||||
genesisHash: WESTEND_GENESIS,
|
||||
info: 'westend',
|
||||
text: 'Westend',
|
||||
providers: {
|
||||
Parity: 'wss://westend-rpc.polkadot.io',
|
||||
OnFinality: 'wss://westend.api.onfinality.io/public-ws',
|
||||
Pinknode: 'wss://rpc.pinknode.io/westend/explorer',
|
||||
Dwellir: 'wss://westend-rpc.dwellir.com',
|
||||
'light client': 'light://substrate-connect/westend'
|
||||
// 'NodeFactory(Vedran)': 'wss://westend.vedran.nodefactory.io/ws', // https://github.com/polkadot-js/apps/issues/5580
|
||||
},
|
||||
teleport: [1000],
|
||||
linked: [
|
||||
...testParasWestendCommon,
|
||||
...testParasWestend
|
||||
]
|
||||
};
|
||||
}
|
||||
export const testRelayWestend: EndpointOption = {
|
||||
dnslink: 'westend',
|
||||
genesisHash: WESTEND_GENESIS,
|
||||
info: 'westend',
|
||||
text: 'Westend',
|
||||
providers: {
|
||||
Parity: 'wss://westend-rpc.polkadot.io',
|
||||
OnFinality: 'wss://westend.api.onfinality.io/public-ws',
|
||||
Pinknode: 'wss://rpc.pinknode.io/westend/explorer',
|
||||
Dwellir: 'wss://westend-rpc.dwellir.com',
|
||||
// 'NodeFactory(Vedran)': 'wss://westend.vedran.nodefactory.io/ws', // https://github.com/polkadot-js/apps/issues/5580
|
||||
'light client': 'light://substrate-connect/westend'
|
||||
},
|
||||
teleport: [1000],
|
||||
linked: [
|
||||
...testParasWestendCommon,
|
||||
...testParasWestend
|
||||
]
|
||||
};
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from '../types';
|
||||
import type { LinkOption } from './types';
|
||||
|
||||
import { createRococo } from './testingRelayRococo';
|
||||
import { createWestend } from './testingRelayWestend';
|
||||
import { expandEndpoints } from './util';
|
||||
|
||||
export { testParasRococo, testParasRococoCommon } from './testingRelayRococo';
|
||||
export { testParasWestend, testParasWestendCommon } from './testingRelayWestend';
|
||||
|
||||
export function createRococoRelay (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, [createRococo(t)], firstOnly, withSort);
|
||||
}
|
||||
|
||||
export function createWestendRelay (t: TFunction, firstOnly: boolean, withSort: boolean): LinkOption[] {
|
||||
return expandEndpoints(t, [createWestend(t)], firstOnly, withSort);
|
||||
}
|
||||
@ -17,7 +17,7 @@ export interface EndpointOption {
|
||||
providers: Record<string, string>;
|
||||
summary?: string;
|
||||
teleport?: number[];
|
||||
text: React.ReactNode;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface LinkOption extends Option {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user