Add Light client support for Shiden and Astar (#8262)

* Add Light client support for Shiden and Astar

* Polkadot example
This commit is contained in:
Gregory Luneau 2022-10-21 02:28:12 -05:00 committed by GitHub
parent 1f41e9e83e
commit 248876acb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7765 additions and 4 deletions

View File

@ -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
}
},
{

View File

@ -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
}
},
{

View File

@ -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`;

View File

@ -1,5 +1,5 @@
{
"name": "GM Parachain",
"name": "GM",
"id": "its_a_lifestyle",
"chainType": "Live",
"bootNodes": [

View File

@ -6,5 +6,6 @@
// e.g. light://substrate-connect/kusama/gm
export const specs: string[] = [
'gm',
'shiden',
'tinkernet'
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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'
];