Add Light client support for Shiden and Astar (#8262)
* Add Light client support for Shiden and Astar * Polkadot example
This commit is contained in:
parent
1f41e9e83e
commit
248876acb9
@ -421,7 +421,9 @@ export const prodParasKusama: EndpointOption[] = [
|
||||
Blast: 'wss://shiden.public.blastapi.io',
|
||||
Dwellir: 'wss://shiden-rpc.dwellir.com',
|
||||
OnFinality: 'wss://shiden.api.onfinality.io/public-ws',
|
||||
Pinknode: 'wss://public-rpc.pinknode.io/shiden'
|
||||
Pinknode: 'wss://public-rpc.pinknode.io/shiden',
|
||||
// NOTE: Keep this as the last entry, nothing after it
|
||||
'light client': 'light://substrate-connect/kusama/shiden' // NOTE: Keep last
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -61,7 +61,9 @@ export const prodParasPolkadot: EndpointOption[] = [
|
||||
Dwellir: 'wss://astar-rpc.dwellir.com',
|
||||
OnFinality: 'wss://astar.api.onfinality.io/public-ws',
|
||||
Pinknode: 'wss://public-rpc.pinknode.io/astar',
|
||||
'Automata 1RPC': 'wss://1rpc.io/astr'
|
||||
'Automata 1RPC': 'wss://1rpc.io/astr',
|
||||
// NOTE: Keep this as the last entry, nothing after it
|
||||
'light client': 'light://substrate-connect/polkadot/astar' // NOTE: Keep last
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -4,10 +4,11 @@
|
||||
import { ScProvider } from '@polkadot/api';
|
||||
|
||||
import { specs as kusama } from './kusama';
|
||||
import { specs as polkadot } from './polkadot';
|
||||
|
||||
export const lightSpecs: Record<string, Record<string, string>> =
|
||||
Object
|
||||
.entries({ kusama })
|
||||
.entries({ kusama, polkadot })
|
||||
.reduce((all: Record<string, Record<string, string>>, [r, v]) => {
|
||||
all[r] = v.reduce((specs: Record<string, string>, k) => {
|
||||
specs[k] = `./light/${r}/${k}.json`;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "GM Parachain",
|
||||
"name": "GM",
|
||||
"id": "its_a_lifestyle",
|
||||
"chainType": "Live",
|
||||
"bootNodes": [
|
||||
|
||||
@ -6,5 +6,6 @@
|
||||
// e.g. light://substrate-connect/kusama/gm
|
||||
export const specs: string[] = [
|
||||
'gm',
|
||||
'shiden',
|
||||
'tinkernet'
|
||||
];
|
||||
|
||||
7647
packages/react-api/src/light/kusama/shiden.json
Normal file
7647
packages/react-api/src/light/kusama/shiden.json
Normal file
File diff suppressed because one or more lines are too long
99
packages/react-api/src/light/polkadot/astar.json
Normal file
99
packages/react-api/src/light/polkadot/astar.json
Normal file
File diff suppressed because one or more lines are too long
9
packages/react-api/src/light/polkadot/index.ts
Normal file
9
packages/react-api/src/light/polkadot/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2017-2022 @polkadot/react-api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Add your imported spec here in alphabetical order.
|
||||
// The key here reflects the URL of the light client endpoint.
|
||||
// e.g. light://substrate-connect/polkadot/astar
|
||||
export const specs: string[] = [
|
||||
'astar'
|
||||
];
|
||||
Loading…
Reference in New Issue
Block a user