feat: initial Pezkuwi Apps rebrand from polkadot-apps

Rebranded terminology:
- Polkadot → Pezkuwi
- Kusama → Dicle
- Westend → Zagros
- Rococo → PezkuwiChain
- Substrate → Bizinikiwi
- parachain → teyrchain

Custom logos with Kurdistan brand colors (#e6007a → #86e62a):
- bizinikiwi-hexagon.svg
- sora-bizinikiwi.svg
- hezscanner.svg
- heztreasury.svg
- pezkuwiscan.svg
- pezkuwistats.svg
- pezkuwiassembly.svg
- pezkuwiholic.svg
This commit is contained in:
Kurdistan Tech Ministry committed 2026-01-07 13:05:27 +03:00
commit d21bfb1320
5867 files changed
+329019

No files matched your search

+396
View File
@@ -0,0 +1,396 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Blockchain } from '@acala-network/chopsticks-core';
import type { LinkOption } from '@pezkuwi/apps-config/endpoints/types';
import type { InjectedExtension } from '@pezkuwi/extension-inject/types';
import type { ChainProperties, ChainType } from '@pezkuwi/types/interfaces';
import type { KeyringStore } from '@pezkuwi/ui-keyring/types';
import type { ApiProps, ApiState, InjectedAccountExt } from './types.js';
import { ChopsticksProvider, setStorage } from '@acala-network/chopsticks-core';
import * as Sc from '@bizinikiwi/connect';
import React, { useEffect, useMemo, useState } from 'react';
import store from 'store';
import { ApiPromise, ScProvider, WsProvider } from '@pezkuwi/api';
import { deriveMapCache, setDeriveCache } from '@pezkuwi/api-derive/util';
import { ethereumChains, typesBundle } from '@pezkuwi/apps-config';
import { web3Accounts, web3Enable } from '@pezkuwi/extension-dapp';
import { TokenUnit } from '@pezkuwi/react-components/InputConsts/units';
import { useApiUrl, useCoretimeEndpoint, useEndpoint, usePeopleEndpoint, useQueue } from '@pezkuwi/react-hooks';
import { ApiCtx } from '@pezkuwi/react-hooks/ctx/Api';
import { ApiSigner } from '@pezkuwi/react-signer/signers';
import { keyring } from '@pezkuwi/ui-keyring';
import { settings } from '@pezkuwi/ui-settings';
import { formatBalance, isNumber, isTestChain, objectSpread, stringify } from '@pezkuwi/util';
import { defaults as addressDefaults } from '@pezkuwi/util-crypto/address/defaults';
import { lightSpecs, relaySpecs } from './light/index.js';
import { statics } from './statics.js';
import { decodeUrlTypes } from './urlTypes.js';
interface Props {
children: React.ReactNode;
apiUrl: string;
isElectron: boolean;
store?: KeyringStore;
beforeApiInit?: React.ReactNode
}
interface ChainData {
injectedAccounts: InjectedAccountExt[];
properties: ChainProperties;
systemChain: string;
systemChainType: ChainType;
systemName: string;
systemVersion: string;
}
interface CreateApiReturn {
types: Record<string, Record<string, string>>;
fork: Blockchain | null;
}
export const DEFAULT_DECIMALS = statics.registry.createType('u32', 12);
export const DEFAULT_SS58 = statics.registry.createType('u32', addressDefaults.prefix);
export const DEFAULT_AUX = ['Aux1', 'Aux2', 'Aux3', 'Aux4', 'Aux5', 'Aux6', 'Aux7', 'Aux8', 'Aux9'];
const DISALLOW_EXTENSIONS: string[] = [];
const EMPTY_STATE = { hasInjectedAccounts: false, isApiReady: false } as unknown as ApiState;
function isKeyringLoaded () {
try {
return !!keyring.keyring;
} catch {
return false;
}
}
function getDevTypes (): Record<string, Record<string, string>> {
const types = decodeUrlTypes() || store.get('types', {}) as Record<string, Record<string, string>>;
const names = Object.keys(types);
names.length && console.log('Injected types:', names.join(', '));
return types;
}
async function getInjectedAccounts (injectedPromise: Promise<InjectedExtension[]>): Promise<InjectedAccountExt[]> {
try {
await injectedPromise;
const accounts = await web3Accounts();
return accounts.map(({ address, meta, type }, whenCreated): InjectedAccountExt => ({
address,
meta: objectSpread({}, meta, {
name: `${meta.name || 'unknown'} (${meta.source === 'pezkuwi-js' ? 'extension' : meta.source})`,
whenCreated
}),
type: type || 'sr25519'
}));
} catch (error) {
console.error('web3Accounts', error);
return [];
}
}
function makeCreateLink (baseApiUrl: string, isElectron: boolean): (path: string) => string {
return (path: string, apiUrl?: string): string =>
`${isElectron
? 'https://pezkuwi.js.org/apps/'
: `${window.location.origin}${window.location.pathname}`
}?rpc=${encodeURIComponent(apiUrl || baseApiUrl)}#${path}`;
}
async function retrieve (api: ApiPromise, injectedPromise: Promise<InjectedExtension[]>): Promise<ChainData> {
const [systemChain, systemChainType, systemName, systemVersion, injectedAccounts] = await Promise.all([
api.rpc.system.chain(),
api.rpc.system.chainType
? api.rpc.system.chainType()
: Promise.resolve(statics.registry.createType('ChainType', 'Live')),
api.rpc.system.name(),
api.rpc.system.version(),
getInjectedAccounts(injectedPromise)
]);
return {
injectedAccounts: injectedAccounts.filter(({ meta: { source } }) =>
!DISALLOW_EXTENSIONS.includes(source)
),
properties: statics.registry.createType('ChainProperties', {
isEthereum: api.registry.chainIsEthereum,
ss58Format: api.registry.chainSS58,
tokenDecimals: api.registry.chainDecimals,
tokenSymbol: api.registry.chainTokens
}),
systemChain: (systemChain || '<unknown>').toString(),
systemChainType,
systemName: systemName.toString(),
systemVersion: systemVersion.toString()
};
}
async function loadOnReady (api: ApiPromise, endpoint: LinkOption | null, fork: Blockchain | null, injectedPromise: Promise<InjectedExtension[]>, store: KeyringStore | undefined, types: Record<string, Record<string, string>>, urlIsEthereum = false): Promise<ApiState> {
statics.registry.register(types);
const { injectedAccounts, properties, systemChain, systemChainType, systemName, systemVersion } = await retrieve(api, injectedPromise);
const chainSS58 = properties.ss58Format.unwrapOr(DEFAULT_SS58).toNumber();
const ss58Format = settings.prefix === -1
? chainSS58
: settings.prefix;
const tokenSymbol = properties.tokenSymbol.unwrapOr([formatBalance.getDefaults().unit, ...DEFAULT_AUX]);
const tokenDecimals = properties.tokenDecimals.unwrapOr([DEFAULT_DECIMALS]);
const isEthereum = properties.isEthereum.isTrue || ethereumChains.includes(api.runtimeVersion.specName.toString()) || urlIsEthereum;
const isDevelopment = (systemChainType.isDevelopment || systemChainType.isLocal || isTestChain(systemChain));
console.log(`chain: ${systemChain} (${systemChainType.toString()}), ${stringify(properties)}`);
// explicitly override the ss58Format as specified
statics.registry.setChainProperties(
statics.registry.createType('ChainProperties', {
isEthereum,
ss58Format,
tokenDecimals,
tokenSymbol
})
);
// first setup the UI helpers
formatBalance.setDefaults({
decimals: tokenDecimals.map((b) => b.toNumber()),
unit: tokenSymbol[0].toString()
});
TokenUnit.setAbbr(tokenSymbol[0].toString());
// finally load the keyring
isKeyringLoaded() || keyring.loadAll({
genesisHash: api.genesisHash,
genesisHashAdd: !isEthereum && endpoint && isNumber(endpoint.paraId) && (endpoint.paraId < 2000) && endpoint.genesisHashRelay
? [endpoint.genesisHashRelay]
: [],
isDevelopment,
ss58Format,
store,
type: isEthereum ? 'ethereum' : 'ed25519'
},
isEthereum
? injectedAccounts.map((account) => {
const copy = { ...account };
copy.type = 'ethereum';
return copy;
})
: injectedAccounts
);
const defaultSection = Object.keys(api.tx)[0];
const defaultMethod = Object.keys(api.tx[defaultSection])[0];
const apiDefaultTx = api.tx[defaultSection][defaultMethod];
const apiDefaultTxSudo = api.tx.system?.setCode || apiDefaultTx;
setDeriveCache(api.genesisHash.toHex(), deriveMapCache);
return {
apiDefaultTx,
apiDefaultTxSudo,
chainSS58,
fork,
hasInjectedAccounts: injectedAccounts.length !== 0,
isApiReady: true,
isDevelopment,
isEthereum,
specName: api.runtimeVersion.specName.toString(),
specVersion: api.runtimeVersion.specVersion.toString(),
systemChain,
systemName,
systemVersion
};
}
/**
* @internal
* Creates a ScProvider from a <relay>[/teyrchain] string
*/
async function getLightProvider (chain: string): Promise<ScProvider> {
const [sc, relayName, paraName] = chain.split('/');
if (sc !== 'bizinikiwi-connect') {
throw new Error(`Cannot connect to non bizinikiwi-connect protocol ${chain}`);
} else if (!relaySpecs[relayName] || (paraName && !lightSpecs[relayName]?.[paraName])) {
throw new Error(`Unable to construct light chain ${chain}`);
}
const relay = new ScProvider(Sc, relaySpecs[relayName]);
if (!paraName) {
return relay;
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const specMod = await import(`${lightSpecs[relayName][paraName]}`);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return new ScProvider(Sc, JSON.stringify(specMod.default), relay);
}
/**
* @internal
*/
async function createApi (apiUrl: string, signer: ApiSigner, isLocalFork: boolean, onError: (error: unknown) => void): Promise<CreateApiReturn> {
const types = getDevTypes();
const isLight = apiUrl.startsWith('light://');
let provider;
let chopsticksFork: Blockchain | null = null;
let chopsticksProvider;
let setupChopsticksSuccess = false;
if (isLocalFork) {
try {
chopsticksProvider = await ChopsticksProvider.fromEndpoint(apiUrl);
chopsticksFork = chopsticksProvider.chain;
await setStorage(chopsticksFork, {
System: {
Account: [
[['5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'], { data: { free: 5000 * 1e12 }, providers: 1 }]
]
}
});
setupChopsticksSuccess = true;
} catch (error) {
store.set('localFork', '');
const msg = `Local fork failed, please refresh to switch back to default API provider. This is likely due to chain not supported by chopsticks.
Please consider to send an issue to https://github.com/AcalaNetwork/chopsticks.`;
onError(new Error(msg));
throw error;
}
}
try {
if (isLight) {
provider = await getLightProvider(apiUrl.replace('light://', ''));
} else if (isLocalFork && setupChopsticksSuccess) {
provider = chopsticksProvider;
} else {
provider = new WsProvider(apiUrl);
}
statics.api = new ApiPromise({
provider,
registry: statics.registry,
signer,
types,
typesBundle
});
// See https://github.com/pezkuwi-js/api/pull/4672#issuecomment-1078843960
if (isLight) {
await provider?.connect();
}
} catch (error) {
onError(error);
}
return { fork: chopsticksFork, types };
}
export function ApiCtxRoot ({ apiUrl, beforeApiInit, children, isElectron, store: keyringStore }: Props): React.ReactElement<Props> | null {
const { queuePayload, queueSetTxStatus } = useQueue();
const [state, setState] = useState<ApiState>(EMPTY_STATE);
const [isApiConnected, setIsApiConnected] = useState(false);
const [isApiInitialized, setIsApiInitialized] = useState(false);
const [apiError, setApiError] = useState<null | string>(null);
const [extensions, setExtensions] = useState<InjectedExtension[] | undefined>();
const isLocalFork = useMemo(() => store.get('localFork') === apiUrl, [apiUrl]);
const apiEndpoint = useEndpoint(apiUrl);
const peopleEndpoint = usePeopleEndpoint(apiEndpoint?.relayName || apiEndpoint?.info);
const coreTimeEndpoint = useCoretimeEndpoint(apiEndpoint?.relayName || apiEndpoint?.info);
const relayUrls = useMemo(
() => (apiEndpoint?.valueRelay && isNumber(apiEndpoint.paraId) && (apiEndpoint.paraId < 2000))
? apiEndpoint.valueRelay
: null,
[apiEndpoint]
);
const peopleUrls = useMemo(
() => (peopleEndpoint?.isPeople && !apiEndpoint?.isPeople && peopleEndpoint?.providers && apiEndpoint?.isPeopleForIdentity)
? peopleEndpoint.providers
: null,
[apiEndpoint, peopleEndpoint]
);
const coretimeUrls = useMemo(
() => (coreTimeEndpoint?.providers)
? coreTimeEndpoint.providers
: null,
[coreTimeEndpoint]
);
const apiRelay = useApiUrl(relayUrls);
const apiCoretime = useApiUrl(coretimeUrls);
const apiSystemPeople = useApiUrl(peopleUrls);
const createLink = useMemo(
() => makeCreateLink(apiUrl, isElectron),
[apiUrl, isElectron]
);
const enableIdentity = apiEndpoint?.isPeople ||
// Ensure that teyrchains that don't have isPeopleForIdentity set, can access there own identity pallet.
(isNumber(apiEndpoint?.paraId) && (apiEndpoint?.paraId >= 2000) && !apiEndpoint?.isPeopleForIdentity) ||
// Ensure that when isPeopleForIdentity is set to false that it enables the identity pallet access.
(typeof apiEndpoint?.isPeopleForIdentity === 'boolean' && !apiEndpoint?.isPeopleForIdentity);
const value = useMemo<ApiProps>(
() => objectSpread({}, state, { api: statics.api, apiCoretime, apiEndpoint, apiError, apiIdentity: ((apiEndpoint?.isPeopleForIdentity && apiSystemPeople) || statics.api), apiRelay, apiSystemPeople, apiUrl, createLink, enableIdentity, extensions, isApiConnected, isApiInitialized, isElectron, isLocalFork, isWaitingInjected: !extensions }),
[apiError, createLink, extensions, isApiConnected, isApiInitialized, isElectron, isLocalFork, state, apiEndpoint, apiCoretime, apiRelay, apiUrl, apiSystemPeople, enableIdentity]
);
// initial initialization
useEffect((): void => {
const onError = (error: unknown): void => {
console.error(error);
setApiError((error as Error).message);
};
createApi(apiUrl, new ApiSigner(statics.registry, queuePayload, queueSetTxStatus), isLocalFork, onError)
.then(({ fork, types }): void => {
statics.api.on('connected', () => setIsApiConnected(true));
statics.api.on('disconnected', () => setIsApiConnected(false));
statics.api.on('error', onError);
statics.api.on('ready', (): void => {
const injectedPromise = web3Enable('pezkuwi-js/apps');
injectedPromise
.then(setExtensions)
.catch(console.error);
const urlIsEthereum = !!location.href.includes('keyring-type=ethereum');
loadOnReady(statics.api, apiEndpoint, fork, injectedPromise, keyringStore, types, urlIsEthereum)
.then(setState)
.catch(onError);
});
if (isLocalFork) {
// clear localFork from local storage onMount after api setup
store.set('localFork', '');
statics.api.connect()
.catch(onError);
}
setIsApiInitialized(true);
})
.catch(onError);
}, [apiEndpoint, apiUrl, queuePayload, queueSetTxStatus, keyringStore, isLocalFork]);
if (!value.isApiInitialized) {
return <>{beforeApiInit}</>;
}
return (
<ApiCtx.Provider value={value}>
{children}
</ApiCtx.Provider>
);
}
+38
View File
@@ -0,0 +1,38 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiProps, SubtractProps } from '../types.js';
import type { DefaultProps } from './types.js';
import React from 'react';
import { ApiCtx } from '@pezkuwi/react-hooks/ctx/Api';
import { assert } from '@pezkuwi/util';
export default function withApi <P extends ApiProps> (Inner: React.ComponentType<P>, defaultProps: DefaultProps = {}): React.ComponentType<any> {
class WithApi extends React.PureComponent<SubtractProps<P, ApiProps>> {
private component: any = React.createRef();
public override render (): React.ReactNode {
return (
<ApiCtx.Consumer>
{(apiProps?: ApiProps): React.ReactNode => {
assert(apiProps?.api, 'Application root must be wrapped inside \'react-api/Api\' to provide API context');
return (
<Inner
{...defaultProps}
{...(apiProps as any)}
{...this.props}
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
ref={this.component}
/>
);
}}
</ApiCtx.Consumer>
);
}
}
return WithApi;
}
+302
View File
@@ -0,0 +1,302 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// SInce this file is deemed deprecated (and awaiting removal), we just don't care
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import type { ApiProps, CallState as State, OnChangeCb, SubtractProps } from '../types.js';
import type { Options } from './types.js';
import React from 'react';
import { assert, isNull, isUndefined, nextTick } from '@pezkuwi/util';
import echoTransform from '../transform/echo.js';
import { isEqual, triggerChange } from '../util/index.js';
import withApi from './api.js';
// FIXME This is not correct, we need some junction of derive, query & consts
interface Method {
(...params: unknown[]): Promise<any>;
at: (hash: Uint8Array | string, ...params: unknown[]) => Promise<any>;
meta: any;
multi: (params: unknown[], cb: (value?: any) => void) => Promise<any>;
}
type ApiMethodInfo = [Method, unknown[], string];
const NOOP = (): void => {
// ignore
};
const NO_SKIP = (): boolean => false;
// a mapping of actual error messages that has already been shown
const errorred: Record<string, boolean> = {};
export default function withCall<P extends ApiProps> (endpoint: string, { at, atProp, callOnResult, fallbacks, isMulti = false, paramName, paramPick, paramValid = false, params = [], propName, skipIf = NO_SKIP, transform = echoTransform, withIndicator = false }: Options = {}): (Inner: React.ComponentType<ApiProps>) => React.ComponentType<any> {
return (Inner: React.ComponentType<ApiProps>): React.ComponentType<SubtractProps<P, ApiProps>> => {
class WithPromise extends React.Component<P, State> {
public override state: State = {
callResult: undefined,
callUpdated: false,
callUpdatedAt: 0
};
private destroy?: () => void;
private isActive = false;
private propName: string;
private timerId = -1;
constructor (props: P) {
super(props);
const [, section, method] = endpoint.split('.');
this.propName = `${section}_${method}`;
}
public override componentDidUpdate (prevProps: any): void {
const oldParams = this.getParams(prevProps);
const newParams = this.getParams(this.props);
if (this.isActive && !isEqual(newParams, oldParams)) {
this
.subscribe(newParams)
.then(NOOP)
.catch(NOOP);
}
}
public override componentDidMount (): void {
this.isActive = true;
if (withIndicator) {
this.timerId = window.setInterval((): void => {
const elapsed = Date.now() - (this.state.callUpdatedAt || 0);
const callUpdated = elapsed <= 1500;
if (callUpdated !== this.state.callUpdated) {
this.nextState({ callUpdated });
}
}, 500);
}
// The attachment takes time when a lot is available, set a timeout
// to first handle the current queue before subscribing
nextTick((): void => {
this
.subscribe(this.getParams(this.props))
.then(NOOP)
.catch(NOOP);
});
}
public override componentWillUnmount (): void {
this.isActive = false;
this.unsubscribe()
.then(NOOP)
.catch(NOOP);
if (this.timerId !== -1) {
clearInterval(this.timerId);
}
}
private nextState (state: Partial<State>): void {
if (this.isActive) {
this.setState(state as State);
}
}
private getParams (props: any): [boolean, unknown[]] {
const paramValue = paramPick
? paramPick(props)
: paramName
? props[paramName]
: undefined;
if (atProp) {
at = props[atProp];
}
// When we are specifying a param and have an invalid, don't use it. For 'params',
// we default to the original types, i.e. no validation (query app uses this)
if (!paramValid && paramName && (isUndefined(paramValue) || isNull(paramValue))) {
return [false, []];
}
const values = isUndefined(paramValue)
? params
: params.concat(
(Array.isArray(paramValue) && !(paramValue as any).toU8a)
? paramValue
: [paramValue]
);
return [true, values];
}
private constructApiSection = (endpoint: string): [Record<string, Method>, string, string, string] => {
const { api } = this.props;
const [area, section, method, ...others] = endpoint.split('.');
assert(area.length && section.length && method.length && others.length === 0, `Invalid API format, expected <area>.<section>.<method>, found ${endpoint}`);
assert(['consts', 'rpc', 'query', 'derive'].includes(area), `Unknown api.${area}, expected consts, rpc, query or derive`);
assert(!at || area === 'query', 'Only able to do an \'at\' query on the api.query interface');
const apiSection = (api as any)[area][section];
return [
apiSection,
area,
section,
method
];
};
private getApiMethod (newParams: unknown[]): ApiMethodInfo {
if (endpoint === 'subscribe') {
const [fn, ...params] = newParams;
return [
fn as Method,
params,
'subscribe'
];
}
const endpoints = [endpoint].concat(fallbacks || []);
const expanded = endpoints.map(this.constructApiSection);
const [apiSection, area, section, method] = expanded.find(([apiSection]): boolean =>
!!apiSection
) || [{}, expanded[0][1], expanded[0][2], expanded[0][3]];
assert(apiSection?.[method], `Unable to find api.${area}.${section}.${method}`);
const meta = apiSection[method].meta;
if (area === 'query' && meta?.type.isMap) {
const arg = newParams[0];
assert((!isUndefined(arg) && !isNull(arg)) || meta.type.asMap.kind.isLinkedMap, `${meta.name} expects one argument`);
}
return [
apiSection[method],
newParams,
method.startsWith('subscribe') ? 'subscribe' : area
];
}
private async subscribe ([isValid, newParams]: [boolean, unknown[]]): Promise<void> {
if (!isValid || skipIf(this.props)) {
return;
}
const { api } = this.props;
let info: ApiMethodInfo | undefined;
await api.isReady;
try {
assert(at || !atProp, 'Unable to perform query on non-existent at hash');
info = this.getApiMethod(newParams);
} catch (error) {
// don't flood the console with the same errors each time, just do it once, then
// ignore it going forward
if (!errorred[(error as Error).message]) {
console.warn(endpoint, '::', error);
errorred[(error as Error).message] = true;
}
}
if (!info) {
return;
}
const [apiMethod, params, area] = info;
const updateCb = (value?: any): void =>
this.triggerUpdate(this.props, value);
await this.unsubscribe();
try {
if (['derive', 'subscribe'].includes(area) || (area === 'query' && (!at && !atProp))) {
this.destroy = isMulti
? await apiMethod.multi(params, updateCb)
: await apiMethod(...params, updateCb);
} else if (area === 'consts') {
updateCb(apiMethod);
} else {
updateCb(
at
? await apiMethod.at(at, ...params)
: await apiMethod(...params)
);
}
} catch {
// ignore
}
}
// eslint-disable-next-line @typescript-eslint/require-await
private async unsubscribe (): Promise<void> {
if (this.destroy) {
this.destroy();
this.destroy = undefined;
}
}
private triggerUpdate (props: any, value?: any): void {
try {
const callResult = (props.transform || transform)(value);
if (!this.isActive || isEqual(callResult, this.state.callResult)) {
return;
}
triggerChange(callResult as OnChangeCb, callOnResult, props.callOnResult as OnChangeCb);
this.nextState({
callResult,
callUpdated: true,
callUpdatedAt: Date.now()
});
} catch {
// ignore
}
}
public override render (): React.ReactNode {
const { callResult, callUpdated, callUpdatedAt } = this.state;
const _props = {
...this.props,
callUpdated,
callUpdatedAt
};
if (!isUndefined(callResult)) {
(_props as any)[propName || this.propName] = callResult;
}
return (
<Inner {..._props} />
);
}
}
return withApi(WithPromise);
};
}
+32
View File
@@ -0,0 +1,32 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BaseProps } from '../types.js';
import type { DefaultProps, Options } from './types.js';
import React from 'react';
import withCall from './call.js';
interface Props<T> extends BaseProps<T> {
callResult?: T;
}
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export default function withCallDiv<T> (endpoint: string, options: Options = {}) {
return (render: (value?: T) => React.ReactNode, defaultProps: DefaultProps = {}): React.ComponentType<any> => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
function Inner ({ callResult, callUpdated, children, className = defaultProps.className, label = '' }: any): React.ReactElement<Props<T>> {
return (
<div
{...defaultProps}
className={[className || '', callUpdated ? 'rx--updated' : undefined].join(' ')}
>
{label}{render(callResult as T)}{children}
</div>
);
}
return withCall(endpoint, { ...options, propName: 'callResult' })(Inner);
};
}
+24
View File
@@ -0,0 +1,24 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
import type { ApiProps, SubtractProps } from '../types.js';
import type { Options } from './types.js';
import withCall from './call.js';
type Call = string | [string, Options];
export default function withCalls <P> (...calls: Call[]): (Component: React.ComponentType<P>) => React.ComponentType<SubtractProps<P, ApiProps>> {
return (Component: React.ComponentType<P>): React.ComponentType<any> => {
// NOTE: Order is reversed so it makes sense in the props, i.e. component
// after something can use the value of the preceding version
return calls
.reverse()
.reduce((Component, call): React.ComponentType<any> => {
return Array.isArray(call)
? withCall(...call)(Component as unknown as React.ComponentType<ApiProps>)
: withCall(call)(Component as unknown as React.ComponentType<ApiProps>);
}, Component);
};
}
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as withApi } from './api.js';
export { default as withCall } from './call.js';
export { default as withCallDiv } from './callDiv.js';
export { default as withCalls } from './calls.js';
export { default as withMulti } from './multi.js';
export { default as withObservable } from './observable.js';
export * from './onlyOn.js';
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
type HOC = (Component: React.ComponentType<any>) => React.ComponentType<any>;
export default function withMulti<T> (Component: React.ComponentType<T>, ...hocs: HOC[]): React.ComponentType<any> {
// NOTE: Order is reversed so it makes sense in the props, i.e. component
// after something can use the value of the preceding version
return hocs
.reverse()
.reduce((Component, hoc): React.ComponentType<any> =>
hoc(Component), Component
);
}
+93
View File
@@ -0,0 +1,93 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// TODO: Lots of duplicated code between this and withObservable, surely there is a better way of doing this?
import type { Observable, OperatorFunction } from 'rxjs';
import type { CallState } from '../types.js';
import type { DefaultProps, HOC, Options, RenderFn } from './types.js';
import React from 'react';
import { catchError, map, of } from 'rxjs';
import echoTransform from '../transform/echo.js';
import { intervalObservable, isEqual, triggerChange } from '../util/index.js';
interface State extends CallState {
subscriptions: { unsubscribe: () => void }[];
}
export default function withObservable<T, P> (observable: Observable<P>, { callOnResult, propName = 'value', transform = echoTransform }: Options = {}): HOC {
return (Inner: React.ComponentType<any>, defaultProps: DefaultProps = {}, render?: RenderFn): React.ComponentType<any> => {
class WithObservable extends React.Component<any, State> {
private isActive = true;
public override state: State = {
callResult: undefined,
callUpdated: false,
callUpdatedAt: 0,
subscriptions: []
};
public override componentDidMount (): void {
this.setState({
subscriptions: [
observable
.pipe(
map(transform) as OperatorFunction<P, any>,
catchError(() => of(undefined))
)
.subscribe((value) => this.triggerUpdate(this.props, value as T)),
intervalObservable(this)
]
});
}
public override componentWillUnmount (): void {
this.isActive = false;
this.state.subscriptions.forEach((subscription): void =>
subscription.unsubscribe()
);
}
private triggerUpdate = (props: P, callResult?: T): void => {
try {
if (!this.isActive || isEqual(callResult, this.state.callResult)) {
return;
}
triggerChange(callResult, callOnResult, (props as Options).callOnResult || defaultProps.callOnResult);
this.setState({
callResult,
callUpdated: true,
callUpdatedAt: Date.now()
});
} catch (error) {
console.error(this.props, error);
}
};
public override render (): React.ReactNode {
const { children } = this.props;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { callResult, callUpdated, callUpdatedAt } = this.state;
const _props = {
...defaultProps,
...this.props,
callUpdated,
callUpdatedAt,
[propName]: callResult
};
return (
<Inner {..._props}>
{render?.(callResult)}{children}
</Inner>
);
}
}
return WithObservable;
};
}
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2017-2025 @pezkuwi/app-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ComponentType } from 'react';
import type { Environment } from '../types.js';
import { getEnvironment } from '../util/index.js';
const onlyOn = (environment: Environment) => <T extends ComponentType<any>>(component: T): T | (() => null) => {
if (getEnvironment() === environment) {
return component;
}
// eslint-disable-next-line react/display-name
return () => null;
};
export const onlyOnWeb = onlyOn('web');
export const onlyOnApp = onlyOn('app');
+44
View File
@@ -0,0 +1,44 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
import type { OnChangeCb } from '../types.js';
export type Transform = (value: any, index: number) => any;
export interface DefaultProps {
callOnResult?: OnChangeCb;
[index: string]: any;
}
export interface Options {
at?: Uint8Array | string;
atProp?: string;
callOnResult?: OnChangeCb;
fallbacks?: string[];
isMulti?: boolean;
params?: unknown[];
paramName?: string;
paramPick?: (props: any) => unknown;
paramValid?: boolean;
propName?: string;
skipIf?: (props: any) => boolean;
transform?: Transform;
withIndicator?: boolean;
}
export type RenderFn = (value?: any) => any;
export type StorageTransform = (input: any, index: number) => unknown;
export type HOC = (Component: React.ComponentType<unknown>, defaultProps?: DefaultProps, render?: RenderFn) => React.ComponentType<unknown>;
export interface ApiMethod {
name: string;
section?: string;
}
export type ComponentRenderer = (render: RenderFn, defaultProps?: DefaultProps) => React.ComponentType<any>;
export type OmitProps<T, K> = Pick<T, Exclude<keyof T, K>>;
export type SubtractProps<T, K> = OmitProps<T, keyof K>;
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { ApiCtxRoot, DEFAULT_DECIMALS, DEFAULT_SS58 } from './Api.js';
export { withApi, withCallDiv, withCalls, withMulti, withObservable } from './hoc/index.js';
export { statics } from './statics.js';
+30
View File
@@ -0,0 +1,30 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
import fs from 'fs';
import path from 'path';
import process from 'process';
import { assert } from '@pezkuwi/util';
import { lightSpecs } from './light/index.js';
const srcRel = 'packages/react-api/src';
const specDir = path.join(process.cwd(), srcRel);
describe('lightSpecs', (): void => {
for (const [k, specs] of Object.entries(lightSpecs)) {
describe(`${k}`, (): void => {
for (const [k, info] of Object.entries(specs)) {
it(`${k}`, (): void => {
assert(
fs.existsSync(path.join(specDir, info)),
`${srcRel}/${info.slice(2)} does not exist`
);
});
}
});
}
});
@@ -0,0 +1,77 @@
{
"name": "GM",
"id": "its_a_lifestyle",
"chainType": "Live",
"bootNodes": [
"/ip4/136.243.93.11/tcp/30333/ws/p2p/12D3KooWHr2Qt2kfhR3YvcruVGfTrLcDG4AfuCmu7qq6n6w1Dtcn",
"/ip4/149.102.128.37/tcp/30333/ws/p2p/12D3KooWJqRDxZM7CeJ8ivpbLWSzmEe3AyEzo2Je9Ew9Mnaa9T1j",
"/ip4/95.217.87.220/tcp/30377/ws/p2p/12D3KooWP2Lr5pCrFZwHffJ5WuhtPgJ62QVDTAruEnSd3CRjWbBF"
],
"protocolId": "its_a_vibe",
"properties": {
"ss58Format": 7013,
"tokenDecimals": [12, 0, 0],
"tokenSymbol": ["FREN", "GM", "GN"]
},
"relay_chain": "ksmcc3",
"para_id": 2123,
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f": "0x4b080000",
"0x0d715f2646c8f85767b5d2764bb278264e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x15464cac3378d46f113cd5b7a4d71c84476f594316a7dfe49c1f352d95abdaf1": "0x00000000",
"0x15464cac3378d46f113cd5b7a4d71c844e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x15464cac3378d46f113cd5b7a4d71c845579297f4dfb9609e7e4c2ebab9ce40a": "0x08c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0x15464cac3378d46f113cd5b7a4d71c84579f5a43435b04a98d64da0cefe18505": "0x00a0acb9030000000000000000000000",
"0x1f8bdc55dc469e3071666b4d031a661a4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96": "0x000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746b4def25cfda6ef3a00000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da987ec8b6e73fbb6866c1df14dc5a0dc1dc2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da98e9a3da556013201ba77abe6f6da32075a5e219566f3f52fcf73ffd8c41aca1d8e3bf7dc82e03c2a8504c4e517c62538": "0x0000000000000000010000000000000000909c453d980ea22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9910959db7f296c88d769b3dc7fed6a031062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b90b2d54c61c35b15fe32196549aa2666d6f646c676d2f74727372790000000000000000000000000000000000000000": "0x0000000000000000010000000000000000ca9a3b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0c4874656d706c6174652d70617261636861696e",
"0x2aeddc77fe58c98d50bd37f1b90840f94e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3a63": "0x",
"0x3a636f6465": "0x52bc537646db8e0528b52ffd0058f4b904fea345a111501050cc281dc07b7e8715f4840f2fafc2da723ad61b9dc96050a0410f7d09f528b57b6270881ed441ad969595709c1c5f3841c3e298c523b4ebfeb230a3adfb4ecc8daee5dbee6f7b4bb2e59652ca9452ef1250103811ff340a6cef8adf560be0786efdb68468c113e0b7158418ff9c3518268bd519e4de47eeca8e0143e5fa2afd2198c24313d88ef81b855f6de8a83b7b5cf7ac0d1d4116ebdbe9cb1eb7783c85d9e3368fa7317bdceaf134665233b272bc1c4f374a29256c291f4b2927aa861d72fd8f03fa245e753f336ae0a0bfad2b69fca987ea94f9010f35d208e10c0faacd809e9fb236041bc5be8de28e877dbf22bd87cdda107749a02fb74fe96a476457fda5cfd6f6ddc0467515e97dc94f9da2febca75317bd30acab98971cbbb2edd7b74e5d983fa717c74fb14665ceda91d2c346655dcdbce417b79f7148ef31a7dccbafe6e2f629b75fc24ebf3e5f100faedafed91d527b7ebb2adf2ee42aff1103d62787148728ed6c35d931b7dcd3f6ddd4f950dbbec91ae5d3a8e7977ba39eaf36743dc9c1aef24b5f6ee37a36aab77f0eb97d9f2f08b2582c164bf51cb545de3ff7f912c720e8fafa54667daf0cdb3ab382b8a2ade8f97e6556ffb6b2fcf00c03dff0db5566fd73ba1af4e5aa28b1a9ab7fbe5ba442e749527ad81dd9fcfac2f1405f37cd0b3d0e66cb996063e7df6e619db523ffe7ab1d6dff3aa166568741df0b1b3b04b63ae39530dfdd27d8f3ecabbdb0b1ef43a6427701425b865a0f4257e5802b3dbc31b46168ea6800d1067d9dee06b66df970e653f86d61f9f27447b0418ffe7cd0b2248614e8f1aeebf1447fdeee439999c5d0c487165441be7e900349a7aa2fe954f589a15315d5a453759ba153f524d4a9ba621e3af4173ac50f1da853dbfaa18a87ce42074515f675df982bc6ccf575ed78e8dba9f8d5f415e8a10be9547dde0e1dd5a9c79304b2e0bfad9f35231b86c57aeea61ced1916eb91703efa9b82947dace1b929470cf8de21ec48f2d769fb74ea88d37c3be4a6ac23c98fce9a1226df1eb92313be7db923063cef10f6d51eb0faee7685f0a3517b61f5c593ecef3dae3e974e25574df0d1ad9ce0044957521b697f75f5f18bdf1532bbda5e7475f5f97a8d46a23f17eaa725791d8f92f6e7afab27f8f6fdd855fe7e1cbbd3e69e53d69008fdae909ab166a49ddd87da85fab9128e9d12f63e754a3af49e2b5c3e72cb0e5b2940e323171d42a7916340020984d3ac90f5c8719a5fed01ab2fbe592b645da823d7ac5f2d49dff0dca976e859a79e435f1fd815ed99df135691312be8fef6bc9d1d0555a0a04b33806eb67a3bda952d6838b0b5d7f9eff97bfede13f3efbdf79eafcf33caa18b77aabd1dd5a90abfdb7d3ac5df3968f9f6ac839eaabf0af9fedaf3eddb0e2485ee07b66de160c46f8b85e600bfad1bc6bc26d42e7d1d76eaf25fa717b72f397ebaa98dfff297b136245f585d4e594b22fdeaaa74e9b4b524db4b5f0d360afa6a43d1855afa6a8fae36bbbafae91757e7e542efe22afccb571b9a4e2fae3ae02fa7ab615db5e131bfb8baadbf5c72751b65430d333489e12fafdba8bae42faf12c993dc3ec61dbd3469d2a079e917575d78e894b38b830ec3f5d7e48eae975de5bfba234e93264d9aafab8f12e9317b353d4f7e80d0d599a3449703dbb66e687d9dbfad1bb2f8f5ac8358b57eead4b658687ebff6fcfafa2c03e80a698e9f397ed829f6dd879d6a5fa74c3963a79d2ddf2011828b46ed3f87defeb4a1ee766f900811a651fbec90db4635c7df1afb6aaf83ab0dcd46f57e73fcab4560b90bbadfbeedec759d6efbfa6b2fdad7edaa5902949d39086c2d5699aff0db27fb9cfb82b67feaf6ec757bc8fce475bff7dea953d09fd317fdc1183bc8f17757db5fd0466dd6a7fab76fa73ac5ced14d6debb051edac0d6db78daa73681bd52ed42d6ceceda74e3d8e7feb54bba953f071fbab41176aa1668e47c97cf6f9dcf12879cefe9c3b247ed8f9eb2a3fbb50af4f7745fe7bc2ea316f41f7d7a76edf4eb75395fd39f49d1e2a36f69a7d6fa3a01b60638781bde875db28d8d5f9ebccc1335f05c78633e6fa5b5f456af465bb45d8ebf36dd4faec54e57fbe4e1fb7c2f67c7db523dba80a7ffd75b351eb424d5fc6dc7bad8accca7c95ac668b4c61d61f31e0d9db5b8301b258cfce5a928df5ec59a7f6db574bc2ac6717eae57cba2bda7e4f583dee1fd06dba3f1bfbfa62740bb0b1af2f4677c8c6bebe1865df4ed575eeb651ebeb2b661dba2d1697df8b2e918d7d7db11e20f88b11c8947a78e871414f169e1ff0e4c1e3039e3a78bee069f1b88067063b63f014c1f3029e2c7858b013841d3b7684c0f365e7073b74ecf42088981d3276c0d809b373074f979d343b71ecdc6007083b6bec50b123c64e6ba78c1d337664b02386a7891d2976c0ec7cd9d98227079e2176b8d80184078b9d2576d2e0c16127901d2c76aed8518347899d2e76d0d8c962c70b9e2576bed8b16287892064ec8411c48c1d2f41d0081245902a824c11448a20490451224813a7239cec38d57142e2b4c489895313a72f271e4e419c9c38517102e254c4c90527224e439c5a7012e2f4c3c987d3969396130b4e3d9ca03845a183c5098c4e163a5e4e5c4e2b3849a163868e189d3274c8d01943278c0e191d38746ca01387ce1e3a7ae8f44087073a41d0914327073a45d0c94387083a677486a08387ce1d3a76e8084107083a75e8fc40c7073a74e898d1a981ce1b3a34d07143a70d9d313a6ce8aca1a3864e1a3a68e89ca1f3850e183a2d1d2e74bad0d142a7099d2f3a4fe838a17385ce169d1e7476d0619902311dc19403d30d4c624c6398a63071312161c2c19483e94a0e9a1c2e72689023460e193971e4b472ccc86923674cce1a3935c8c941ce193969e48c915326278c9c3272c2e4b891c346ce1b3973e4d820078d1c3972c8e4e020478d1c313970e4809173831c1de4dc90c3c2498313884d9a9215970b6eeab8f9c18d0f4c2cc80182ce10bcc7c908273f6e72c058db0d1beb148327c60cc2dc01bcc16ba286072f8ae98339c76646298a0d8d4d8b79c62690d9039b276c70602387cd0d6c72601387cd0e6cca6045b06102e3236e11b530a5b18102bba1660e9b1f788cb0f181e70c4f116e7608424567d163b418cc08566af8a811e2796937a40fd34c8d0b6a88d0f8d0f6a819a2a6053774687ae830518a014c02dac034038d0ed3169b3d6cf8d88183772061b04346226112820d9af745478b3442670625276411af0c9e20faca6bedf04076795cf024515383c6c2c608f205385de4122f06af0b9e15bc2572b6b039824ce28179509c64d033e0698154e2cd800706d205924b101cbc2d786e28356103c82b13b1e0e1f29cd8d9c1cbe2cda1f980078b56873c22c80d7888b0f1a354478908908e9b2094ae2855c15978874907Line truncated
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0x3c311d57d4daf52904616cf69648081e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3c311d57d4daf52904616cf69648081e5e0621c4869aa60c02be9adcc98a0d1d": "0x08c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0x3f1467a096bcd71a5b6a0c8155e208104e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x45323df7cc47150b3930e2666b0aa3134e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0x57f8dc2f5ab09467896f47300f0424384e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x57f8dc2f5ab09467896f47300f0424385e0621c4869aa60c02be9adcc98a0d1d": "0x08c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0x5c0d1176a568c1f92944340dbfed9e9c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x5c0d1176a568c1f92944340dbfed9e9c530ebca703c85910e7164cb7d1c9e47b": "0x5a5e219566f3f52fcf73ffd8c41aca1d8e3bf7dc82e03c2a8504c4e517c62538",
"0x6f90f7f374a081c4f7c5e6b64be8a12e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x79e2fe5d327165001f8232643023ed8b4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x7b3237373ffdfeb1cab4222e3b520d6b4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0x89d139e01a5eb2256f222e5fc5dbe6b34e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x99971b5749ac43e0235e41b0d37869184e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f308ce9615de0775a82f8a94dc3d285a1": "0x01",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x00909c453d980ea22500000000000000",
"0xcd5c1f6df63bc97f4a8ce37f14a50ca74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb32401cc9861edd6dfc2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a": "0xc2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb37f19357946ec16311062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375": "0x1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0xcec5070d609dd3497f72bde07fc96ba04e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa19505c964fe915c205dd6175726180c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a": "0xc2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa1950b2aa3c1f0ef2935561757261801062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375": "0x1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0xcec5070d609dd3497f72bde07fc96ba088dcde934c658227ee1dfafcd6e16903": "0x08c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0xcec5070d609dd3497f72bde07fc96ba0e0cdd062e6eaf24295ad4ccfc41d4609": "0x08c2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5ac2c5901e52435652425583b89e9e952db38669c2b50e1d2680ea3e8542251a5a1062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b3751062dae8afe9c63951651d01b76dec60c2d7eb095b8749bfed1fdb8c0ef4b375",
"0xd57bce545fb382c34570e5dfbf338f5e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xe38f185207498abb5c213d0fb059b3d84e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xe38f185207498abb5c213d0fb059b3d86323ae84c43568be0d1394d5d0d522c4": "0x02000000",
"0xf0c365c3cf59d671eb72da0e7a4113c44e7b9012096b41c4eb3aaf947f6ea429": "0x0000"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1,11 @@
// Copyright 2017-2025 @pezkuwi/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://bizinikiwi-connect/dicle/gm
export const specs: string[] = [
'gm',
'shiden',
'tinkernet'
];
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
{
"name": "InvArch Tinker Network",
"id": "invarch_tinker_dicle",
"chainType": "Live",
"bootNodes": [
"/ip4/34.207.236.237/tcp/30333/ws/p2p/12D3KooWJDBpFQ4x565XCffrwqNUueWSBjfC7mCPdZxtoofZhQqg",
"/ip4/34.202.164.131/tcp/30333/ws/p2p/12D3KooWKrxbPk5Mc3K6rWTfAxcfQhrcwptvqSx6UZkkhqMuqMe7",
"/ip4/54.237.108.155/tcp/30333/ws/p2p/12D3KooWEhSMWi5Twk4ZqxWahDknmQz5fXvi6GEg7FXN7Co8bSRW",
"/dns4/node-6968552592343965696-0.p2p.onfinality.io/tcp/25446/ws/p2p/12D3KooWHoRUQsPCcZFNLMRLk5aDSDkkEBeEc3TZnQe2rBi4H2S8"
],
"telemetryEndpoints": [],
"protocolId": null,
"properties": {
"ss58Format": 117,
"tokenDecimals": 12,
"tokenSymbol": "TNKR"
},
"relay_chain": "ksmcc3",
"para_id": 2125,
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f": "0x4d080000",
"0x0d715f2646c8f85767b5d2764bb278264e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x15464cac3378d46f113cd5b7a4d71c84476f594316a7dfe49c1f352d95abdaf1": "0x00000000",
"0x15464cac3378d46f113cd5b7a4d71c844e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x15464cac3378d46f113cd5b7a4d71c845579297f4dfb9609e7e4c2ebab9ce40a": "0x083c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0x15464cac3378d46f113cd5b7a4d71c84579f5a43435b04a98d64da0cefe18505": "0x0000514a8d0e00000000000000000000",
"0x1f8bdc55dc469e3071666b4d031a661a4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96": "0x000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746b4def25cfda6ef3a00000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9290b5c744b1943f8fa57cab0b1cb5e983c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da979daff7f8e8c62a5ef45658cc6a5a8f16d6f646c69612f74727372790000000000000000000000000000000000000000": "0x0000000000000000010000000000000000001258b6d586690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9ba6e88986932e53f58982e26a47a41ecea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9bbf3b2df0c9c0af7179ef6f63d0ac1e5f430c3461d19cded0bb3195af29d2b0379a96836c714ceb8e64d3f10902cec55": "0x000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9c4d6f811c49fc0acab87b8a9ff90c5b5725bf57f1243bf4b06e911a79eb954d1fe1003f697ef5db9640e64d6e30f9a42": "0x00000000000000000100000000000000008039c3cd5cd4380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x042c74696e6b65725f6e6f6465",
"0x3a63": "0x",
"0x3a636f6465": "0x52bc537646db8e0528b52ffd00584cac045ead05d3115320d4324a07c6fff19b88fc3aae87e140d2150c1104569a733f0bce333adffa795602289b76a6e84aaddcea79790d489fe3c4988ca0a2985d342cf608625c10add80b371b2a57f67ff7b7bde5de724b29654a295113701041114f082e2d2d2d2da59e9f36c9fbe7408f7164015d5fa0ca4bdfcbc2b6ce4b429cd166f47cbff252ffae6c28e3f9d95973c232fc769597fe395d0dfa72589adc54d53fdf4d52a1fb30c11e764837bfbe6a7cd0d75df3438f83d972593676fe6d14d65943f27fbe1ad2f6afe3a5de82be261b3b04b63aa3162ddfdd26f8f3ecab35d9d8f7215fa1ab00066cd969bd87ee37000733387871c0768dc9018a540b1bf475ba1bd876c5c3153f80df9516399e2e0936e8d1df0e689eacb0c3ea59d6f389febc9d872566b642141ebac014642b0548a8d0a8ea4f1a55815668543d456954dd5c6854350d35aa2e99870e1d028de2871ed4a85da560e9a19fd04231757ddd3373c9c0617ddd3a1efa362a7eddf91af4d08d34aa3e6f877e6ad4f3610297e0bfad979e9d35253b6669e9b9b382b46a96963e29e7a33f2b49d9c7179eb382c480ef3dc29e247f9d3650a39078cdb743ceca7a92fce8ac3581f2ed91431af2edcb2131e0798fb0aff600d577b76b841f8d1a0454593cc9fedef3a1a68fabcfa553c9d5137cf42c31c4a06429b592f657551fb3f85d23b3abed4656579fafd7a824faf3a17e1a93d7f934697ffeba1ac3b7efc7aef2f7e3d89d36f79cb2a6c2d0ef1aa9196b4adad99da87da89f37e1d835616f53a3a443ffa121cd476ed9e16a07177ce4a243e834729c843df6e0356b643d72bce6577b802a8befa535b23ed491eba55f8d49cbf0dca876e859a39e435f20d819ad9adf125491af28e80e6dcfdbd97358c2414d2f806ea67a40341acc7c9ddfeddddd61bebbbbdb17a8abd0e5c0d6ee8d7afefcd4a80aff3d076a14ffa381cb3fcf5ae8a5de57235f7ffef9f3e70bf43aa3a023ba52b65dcd10c4ef6a298f03fcae6430f3da50bbf475d828cb7f9d5adcbee4f8e9a2367ecb5fc61a918480ca72ca1a13e95657a54ba7ad31d95efa6ab04fd057238a3ed4d2577b74b5d955d54fb7b83a2d1f7a1657e15bbe1ad1746a71d5016f395dedea2a0c7fb9c5d55dbde592abdb27185e7021ca0a6f79dd3ed5276f79952a3cc9ed5f1cd25bb3664d1e2fdde26a0a0f9d726671d09d586f4d0ec97ad9557eab43e2356bd6acf9aafa28931eb3d79de7c92f09747b9ec0e87260db950cabaff3772543985fcf5a8853eba646ed6a298fdfaf3fbfbe40cb00ba469ae3678e1f368a7df761a3dad72953ced86967cb384cbc08a24ffbcfa1b73f8da8bb5d1c265e18d1a77d76c86d9f9ae36f8d7db5d7c1d588669fdaf79be35f4d02cb62e87efbb6b3d775baedebafdd685f37d4aae6095076e620b0ad96d27c85df3ed9e7dc27b45da46ecf5eb787cc2cbceef7de33350afa73faa23f1823e4f8bbabed4f68a3370b54fddbb751cfd7b751ec8fa38bdad6619fda5923da6efb5427d1f6a97da851d8d8db4d8d7a1cffd6a8f69d46c1c7edaf067da8879a399f26f3d9e773e7d3e439fb73ee92f861b71a13f6d7555ea0ee8cfcb704d563b682ee2f50ddbe9d6ea32afb73e840b8301b7bcdbeb74fd00db0b13b61377addf6097675fefa5053e6e06b990d16a9e6b1e4dc70c65cffeab1488dbe6c37097b7dbe7d5a9f8daafccfd7e9e30ab03d5f5f6dc9f6a9c25f7fddecd3fa50d39731f75edb245678e99118f058e4b3b7679bc40aa7792cd9b3b7db6c122bbcf4480c78f6f6d69cc0a5a567678dc9b6f4ec59a3f6db5763c24bcf3ed4433dd4433dd4cb6d9fd617a83ba3edb704d5e38e836ed32db2b1afef4597001bfbfa5e748f6ceceb7b51f66d545de76efbb4beae62f64177b5e4e5d7a28b64635fdf8b83018721c60f30ae0b27049783cfe144701f381dbe8573e144f81543caf0225c066e850331e48e21451842046f624810860061c80f849c31c4cc1031869031040f5fc2b90c7963081c43863004cd103143c61812c6103386a031848a2167b81343ac1832c590278674e15ddccb102fbc06af620813436ce039b80d43b418b21aa2862b31e48b21690cd96208190733048c21590c69428899216584a031c4092169082123040c2162846021a40c212c103286901e8444c1d303213a084181901d84e410a408426a10b20ac2461022842c057123481b426c08c245903541c604f942080e41c8040123881742b20832459030824021844b102c825011248a205708b921481541ee0812832045081913c488203b101246902082d4100487205c82d8f093c78f117ed6fc98f1b3c50f163e42f0c9c3c7083e7af820c1870d1f397c92f053834f1c3e76f8fcc0a70e1f3a7ce6f0f1818f1b3e3bf079c347073e3df0c981cf9a1f1a7a70f859eac9c174049f21f8f0e0474b4f103d40f4bca0e7871e1f7a5cd0a3444f123d33e859a2874ccf173d52f444d123a687899e267abce8e9a2674c0f173d5bf468d1b3eac9a2078b9e2b7aace8a9a2878a9e303d53f420d1f3a5e7881e19f418d153440f113d31e8f1d203839e217a84e851414f0f3d2be8d9a187871e1498f43021c1b48729093d3798de30b1615ac37486c98c690c5313263026204c3e98b6f00c8147083c70f0b811038f0f78dee04983a70c1e333c67f08cc163068f0e786ec0b3060f1a3c64f0c4c19386470e9e1df0b0c1d3060f0e7872c013064f143c52f04cc1a3044f179e1c7870e0b9e1e6871b1f7ea0f1630d0a041f4908724357d1645a8c1f5f74b250fae165270cfa868f307c30e143091f4bf8a0810f323ec0f8a8818f277cd0a101c126091d1d60774c2d6c76a05ae4c821a5b88a9033065683cd1bd614338dab8ecb8dc78317870e0cb2377e18b153c6bf3c329e186f0c0c8a2065e870c1495c30b86eb876b874b886b856701d71c9e032e2f27211711571c5e04ac1c582abcbf58259c6e5c385c3f5c325c4a5820b888b8779c63433cd98645c28b87ab872b85a7005318398424c2074b4d0d9e25a3d3a681072dad80143870a1e1e0459e984617911c40a9d229870e019501efc10c36ef00e380deb80dbe01c301b8c03be01afc168580db601a7c167180d3e83cd60335c0693c16370991f37f8c1e12787b7454f97f7c693e3a2c347173633a06bd02e5e180e8379a66bc8dcb0d1e181915307a607b685df9859c8283435b407340e8c8b0e11571e6f8d9c38ae1d501df0cce0b531a48ecea2ad90629a0aba7a39e07901c5c11585cf607af1638c23e142e4943164073f6c7867fc58e2a5b164786e3c33d40dda86101e5036289a1f455854f85863d28156073684216e3c38ae391c87eb0e9a031e2ede992174bc2f7486f01758523c2e5c07ea831f4b9616b9b2963c091b37e80d7476a0d386c780a6793d78636cf6b8a1213e318bd0de681bbc32de0d1e1b2f8d878367c6Line truncated
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0x3c311d57d4daf52904616cf69648081e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3c311d57d4daf52904616cf69648081e5e0621c4869aa60c02be9adcc98a0d1d": "0x083c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0x3db7a24cfdc9de785974746c14a99df94e7b9012096b41c4eb3aaf947f6ea429": "0x0300",
"0x3f1467a096bcd71a5b6a0c8155e208104e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x45323df7cc47150b3930e2666b0aa3134e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0x57f8dc2f5ab09467896f47300f0424384e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x57f8dc2f5ab09467896f47300f0424385e0621c4869aa60c02be9adcc98a0d1d": "0x083c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0x5bef2c5471aa9e955551dc810f5abb394e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x5c0d1176a568c1f92944340dbfed9e9c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x5c0d1176a568c1f92944340dbfed9e9c530ebca703c85910e7164cb7d1c9e47b": "0xf430c3461d19cded0bb3195af29d2b0379a96836c714ceb8e64d3f10902cec55",
"0x5e8a19e3cd1b7c148b33880c479c02814e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x5f27b51b5ec208ee9cb25b55d87282434e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x69b0cd37e17334d058ccf33c2291bd754e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x79e2fe5d327165001f8232643023ed8b4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x7b3237373ffdfeb1cab4222e3b520d6b4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0x89d139e01a5eb2256f222e5fc5dbe6b34e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xbd2a529379475088d3e29a918cd478724e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f308ce9615de0775a82f8a94dc3d285a1": "0x01",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x000012c002c05ea20000000000000000",
"0xcd5c1f6df63bc97f4a8ce37f14a50ca74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb3c87852424d0a2a33ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239": "0xea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb3f63729798a3b5c9d3c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49": "0x3c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49",
"0xcec5070d609dd3497f72bde07fc96ba04e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa195004248e1cebdb00f66175726180ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239": "0xea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa1950d0d7a002a99fa58d61757261803c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49": "0x3c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49",
"0xcec5070d609dd3497f72bde07fc96ba088dcde934c658227ee1dfafcd6e16903": "0x083c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0xcec5070d609dd3497f72bde07fc96ba0e0cdd062e6eaf24295ad4ccfc41d4609": "0x083c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a493c4679c868ee7edce446812310d0d952374157ea2f68a9d3afb0c0207b272a49ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239ea55d832eda0d27865866ef6b01c4edf6bf83bf6d33784e9bc03c8289d2e7239",
"0xd57bce545fb382c34570e5dfbf338f5e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xd8f314b7f4e6b095f0f8ee4656a448254e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xdb1cb4e33f2ba1297d9dde340195ff694e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xe38f185207498abb5c213d0fb059b3d84e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xe38f185207498abb5c213d0fb059b3d86323ae84c43568be0d1394d5d0d522c4": "0x02000000",
"0xf0c365c3cf59d671eb72da0e7a4113c44e7b9012096b41c4eb3aaf947f6ea429": "0x0000"
},
"childrenDefault": {}
}
}
}
+27
View File
@@ -0,0 +1,27 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { WellKnownChain } from '@bizinikiwi/connect';
import { specs as dicle } from './dicle/index.js';
import { specs as pezkuwi } from './pezkuwi/index.js';
export const lightSpecs: Record<string, Record<string, string>> =
Object
.entries({ dicle, pezkuwi })
.reduce((all: Record<string, Record<string, string>>, [r, v]) => {
all[r] = v.reduce((specs: Record<string, string>, k) => {
specs[k] = `./light/${r}/${k}.json`;
return specs;
}, {});
return all;
}, {});
export const relaySpecs: Record<string, string> = {
dicle: WellKnownChain.ksmcc3,
pezkuwi: WellKnownChain.pezkuwi,
pezkuwichain: WellKnownChain.pezkuwichain_v2_2,
zagros: WellKnownChain.zagros2
};
@@ -0,0 +1,99 @@
{
"name": "Astar",
"id": "astar",
"chainType": "Live",
"bootNodes": [
"/dns/astar-02.wss-bootnode.astar.network/tcp/443/wss/p2p/12D3KooWMfHf9G1Mtawz4qySe1EqaBmrieidqn2xnEYckUYkpe52",
"/dns/astar-03.wss-bootnode.astar.network/tcp/443/wss/p2p/12D3KooWHV4YxifTpBkLWPPaF8EfoMSXeGNWWxXqUokGsBGxwioK"
],
"protocolId": "astar",
"properties": {
"ss58Format": 5,
"tokenDecimals": 18,
"tokenSymbol": "ASTR"
},
"relay_chain": "pezkuwi",
"para_id": 2006,
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x2c914e0ef5de1e2fa3ad50f71eaf17ac4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x0d715f2646c8f85767b5d2764bb278264e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181adebd967895b9ecc56a92627e182fe5d70000000000000000000000000000000000000402": "0x1460006000fd",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746b4def25cfda6ef3a00000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa1950391c80dfcd87103c6175726180d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d": "0xfc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31e",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da99dfcb652cbdc3cff1b23908dd841b3c6b05baa9e0e377107eb98c687b60654c7448cc47d3385fa90cad02957522c1d3d": "0x000000000000000001000000000000000000001ee22cbc046283210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x5c0d1176a568c1f92944340dbfed9e9c530ebca703c85910e7164cb7d1c9e47b": "0xe8cd33672da831212e839cfebbed77d1e9c113f98522217468bca1cdb1ee124b",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a2726eb464e89f6cab87868382f27a4120000000000000000000000000000000000000007": "0x1460006000fd",
"0xd57bce545fb382c34570e5dfbf338f5e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3c311d57d4daf52904616cf69648081e5e0621c4869aa60c02be9adcc98a0d1d": "0x08d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181ad75f39e127a97394ebf2835cc683d1e20000000000000000000000000000000000000006": "0x1460006000fd",
"0x5f27b51b5ec208ee9cb25b55d8728243308ce9615de0775a82f8a94dc3d285a1": "0x01",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a3ebdc49cbf0537d0b0ca7b79f29d80ce0000000000000000000000000000000000000401": "0x1460006000fd",
"0x15464cac3378d46f113cd5b7a4d71c84579f5a43435b04a98d64da0cefe18505": "0x000000d05e29fc58a0a5020000000000",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a40236de2c05995147f84295c20eb3ce90000000000000000000000000000000000000400": "0x1460006000fd",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181afc43e1f1ae906840c403453baa200da30000000000000000000000000000000000000003": "0x1460006000fd",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da96a8b2d97fb13989c704d3dd3e8b68289e8cd33672da831212e839cfebbed77d1e9c113f98522217468bca1cdb1ee124b": "0x00000000000000000100000000000000000010632d5ec76b0500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x2013754dd003840aea66b349f8241e2582fbce236236c63b34351052f96f6751": "0x00",
"0x3f1467a096bcd71a5b6a0c8155e208104e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da91f9639bf8a4c3ac3cd1163435d38dd88f64ced91466c58604c2189132d95bcd6fd98422ec311ad5ed13e9eae6c00b52d": "0x000000000000000001000000000000000000003cc4597809c406430200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0xb05aff00023d246d41bea3f523d1417d4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x2013754dd003840aea66b349f8241e25b1ef0b108928f2a3c149728bbd19fb48": "0x00",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x2013754dd003840aea66b349f8241e25a44704b568d21667356a5a050c118746f52c63705dbee9f60000000000000000000000000000000000000000000000000000000000000000": "0x0d28a86ac0fe37871285bd1dac45d83a4b3833e01a37571a1ac4f0a44c64cdc2",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da955ae64f93fb405f19ba62a2369a2f2df6437f69810a4db79af3bdcadac1b7bb7d07c790e33e9a7738772ee1d6018c279": "0x000000000000000001000000000000000000001ee22cbc046283210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x15464cac3378d46f113cd5b7a4d71c845579297f4dfb9609e7e4c2ebab9ce40a": "0x08fc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31e76fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a4641bc91744d25607c804139a1541a7c0000000000000000000000000000000000005000": "0x1460006000fd",
"0x15464cac3378d46f113cd5b7a4d71c84476f594316a7dfe49c1f352d95abdaf1": "0xc8000000",
"0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96": "0x000000000000000000000000000000000000000000000000",
"0xf0c365c3cf59d671eb72da0e7a4113c44e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x2013754dd003840aea66b349f8241e254e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92798001a92759fc383d6a860040519c3005f7e308203b765bc0c7c0c832690681addab83c4824188533dceeed0a1dc37": "0x000000000000000001000000000000000000001ee22cbc046283210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x3a636f6465": "0x52bc537646db8e0528b52ffd0058243405ce920675144f108065950eb0abaeeeeaaeeeeaaeee0af60242172d76440174555dd188887651cb579e2449d8f568c90f903bb31b0f7a6134d4d0826427a6c753a6a3de0a37a0cdc2b58d6c42f69664cb2da59429c94715271420141aec6a2ad5d2e2e2b2bd5e5eb6577d534618d8300c93a134148a4b69ffbcb668381c10eef5aabbbbe3dfd51e6c86a71bf4af57f565a6aa6d149b3272b0f974e2c92a2b8e40a27fbd72b6b157ddf2041c7d2390e8d97fe0bf9e0cb96bfa93191f7a7cd8cd080165f7c3cff11f0f3bec2e73506ce6417d3db86785d2959ff96785d2133e5ad1e1de1284a0f89744062afe462f7c3b8e7f4b68c1d2472fbc1c1cde5e1987a30e3720fd4a70968f0eb704b40bf3a85d76f2cfb9e89fd77839d09feff072a63fb7f172327f7ee3e598fcf9eab172f8f31c2f07873fb779393cf8731d2fa7c69fdf3cd6ca9ffbf0726ef8f31e2fc7863ff7f17276f0e7acc7aae1cf735e0e0d7faef3723a7f0ec4cbb1fe1c008fe5fefc5fce0c7fee7a3932fcf9005e4e0c7f4e80c7a2f1e741bc9c197fcef37264fc79015e0e0c7f2ec463a9fcf9102fe7853f27e2e5c4f8f304bc1c187fae80c77af1e70d78392efedc012fa7c59f3fe0e5a4fc39041e8bf3e7147839287f5e819773f2e7415ecee6cf853c96e6cf8d7839d59ff7bc1c1b7f7e046c61fe3c09d8eac1c3ef5b62e9f0cb4248df7e695a0fd6dc3efa76ad5b6d046bdaa94b7f47f8e7fc749a0abe697ffe5e4e741ffcf2d03f7fb0e5c32f13fde3e293c4bf3950cf5d27198033baf1f6a68275debbd9e1dcdff8e56eba1ba7fc6da3ff1d5d12fedb7f9b8a6ff7c15258d3eec33e5873391c8e7ae5ed259d37e9bd01e98f5ee3f67af2604d3b6401c7deaec3d2f4aafd6daa5eb5abb608f4701e1dd04c03d8c5c3d9c5a31bd25c3d7c28ba9af0f027a8cb07c72cbb782b22ba7a744f388172f1f076fd0ed701e483e5c76387f3f6eac12b6b987daeb7bd88e0e13b5c470f37aec379d8f778ecd071a3a342db9fc33613de6a09563c9bf6697bcab369b7814dbebd4227be5dcbf2ed5b1dbefd44876f47714bdf9e82c3b7b7bce1db5d5ed6f0ed3058be3d460ddffe4265866f8751866f97b9f2ed333461f8f61860f8c2b7cff02cbedd6ee1db3b2d7c3b8d1a56f8f61db0f8761b55f8f61bab287c7b0d14aef8366d3c2fe9a7d7d82be899bd419ff9db5e99ef74274d6f7f2f0787dff87766db10af8a9f5d27f5cae4d071987a7b4ddf81997d49df490d2d3fb4efa7ed2a9e4d7b663b09cfa6dd645b09cfa63d87ed29bd6ac7a1f4ed3c34e1db6b9cf0edab277cfb0d297cbb0d2adfbec314bebd0615be9dc615bebdc3c2b7db2adfee59f8f6195cf876195df8f6185ef8761a2bdf3ea3c5b7cb88e1db618ce1db5564f8f61767f8f6982dbe1d060ddffe621faf6ea7e1db5dd8f0ed2d6df8f61417dfced9f756b7ddf0eda8387cfb490edfbef51cbe5deb2ebebddaf76c2e14fa76b8fde0efa467d3de00ee76d2b7d7d8fce0c9e43b9d41376593da4845afdaa54dfaf6b7fd901fbb28e5d9b44fe1d86f94f2ed556a47c016743dafad61b65dbc1920e89750fd8feaa7bf0d487c255e969ffed2e1b4efd9c8eec52ef60a766f73a8028efdfa77b4f28f06100c62200eaa01e220395f92eae3c14da4875e71b8e96f7b751a132cdf0e84bb5cf4d1d9de8ac301e97fcf26fadb12d0ae076beebbf2b1633bbdeddb5ef13da8bd4b3f36eb063de6ecaf5b14d660b6beadbb1bf4ed5cb36277f9a1df87e5a31f015bd263778d4cafd172bd823e2ded15f41f5cf40d88e63b6df4985fd5c377e56f4b79e8704b0074c92e0ec11ae82f8e7d0746fb1eb3f761f90b8dbe69afd831874e9b35fdb1eef2b3d7de5eb36b71d1e9bf2d6e41bc8fdd13e96f7b32e42ed901412257941921daa3c7ee0824fad8abae013b9f89f48f4650037150c378032e9cc8e2d287d02174081d4227a03c8410c21ad0487df409ce8a3a5899c2822dbe9d6a9c8f0a8f38f6d73e9e3fadbee75e921343deacf68eaa665dfff6f61acd8adf491ec0f2ed5ab7a02bfecdf14df3cf790792caceb689d4f7afc6e5bebdb243f60bd9a13f761fb8d3956d7fd22f991bdbf81b965fd282aaadb185bf2d999a955fa29d5e4e12167a2504f0eced6f1b220a093df370425ab3deb757d6decb61bfd069b36e85d607c70ffdf9db80c08ebe4d8897e5f9d957a33b1fee1f8d20c85d86fafe35ebb63f8f2e5389b876f6fbfcf5eaf52aba0faefd39f4b70dd1ee133bd8ed74507302ea7b2efa55bdf41dcdba14a759975b35ebee78e9d27b340bbeb4228b93974ed3ad7601f1d25fb3fa6f8e97ce35ab5dfa4bb3a04ba7cd7a2e5d6b16bbf45743763e2fe91f8d2066a0fafcd5b83b1e7a7d96bff2f68abde26e86fdfdfd811f9bb717773cd19f7d5febdb80cceefa4fa7bd3d4ec55e75f707bec955cdaa0e9da65958c5b2acbb999b3cc334ee9f73cdc21cfa4bb332875e31cb5f5faf34e70d087fec95d65dcd4d8ed9f79afd819f79e57e0c4faf57f7e59f63f67db5ef4d997dbdbaaa7f4e612b04ee7a5d037df572deb3b934ffba3b5d3af40a5f84d3be67fb7ad51eede55f22ff0a79dafdc87ffeb6d7eb5eafaef6edb5b6f6b6d9dda09fcef6d2677ff6d27f0eb7c7a95e3daf717b2fa5f5aa46afa063fe7ac5eebd82feb61706a78ddde55f02ff32f13ff0a73fcbf5aa9dedeb553b6fafd9bd5edd976f7f9bec68afda777aa7777aa7b966bd87ae6ad67be8d1bef7663d874e612b0a09090909b9a0af5e0e7ce8af59ecb7c6437f3560e7b3e31f8d20134b13d4a7c3bda40e60f12f4968e92ffd761ffe257560e82bead5b8feed6fcbe12efdf6972464e56ffcf69da6b0f5ba86bdfdc1d6eb9a4b9ffdd2bff4db1f6cbdaeb9dcb35fee2ffdf6d8ace7edaf59983f8fcd9afe9c36ebfdf33aed7bccf2d7c783abcf07ae428db717d6b5b8e9bdbda6bf2d88f7d3777aa72b6f3c98cfee628e79ed8d877bccdf167b15fd6d2fe93b5d599b16f3b741dfe99ddee99daef56d26a7f6d2a73e6de6263bc4f4acbbfcd3317b317fbda2be03a9bdf1a94feb93f9fbb7bd32afd45e02fcf4fa36da5dfad4a7bd2fe9a763f6de7befbd17f3d7ab1bc44f7fbdba44fcf4d7abfb809ffe7a7585fcf4d7ab7bc44f7fbdba49fcf4d7abcbc44f7fbd9abe03a9f5510266c99265e9a9bfc7ecfb692f101fbdb2466d74ccbe7fdb10383f7da7773ab34a604fbbcbbf04feec2e133fbdb286d9f76f9bdd0f7cd9bd5eddf8ec3bbdd3d1be5eb143fb7a755f9efdd5e8cec7ffd108ca3836a931b8e76f5619dcf337eb6b16fba5fffc35abfd796dcbcf963f368bfd7965adedfbd82ce9cf2b6f2fd9b538f6ca9ab4fc6f63afade170ed32958883de2e1d6e2fd9b538f60a3569f97b637f1bf49d7edbab7da7777aa777bab2c6f67d5bfeb721e03dfb4eef741033afa03e1fb88a7a352ef7d05fb762d7Line truncated
"0x3a657468657265756d5f736368656d61": "0x01",
"0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f": "0xd6070000",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x04146173746172",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da962947bd13eacf01007ccff32c700ac2452534322ae91fba7fc3b33583a3a036b02831f79f030d559a219dd046906e75f": "0x000000000000000001000000000000000000001ee22cbc046283210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x2aeddc77fe58c98d50bd37f1b90840f94e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3c311d57d4daf52904616cf69648081e4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9cd46335d54185ce95e6060aaa900de6dfc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31e": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x57f8dc2f5ab09467896f47300f0424385e0621c4869aa60c02be9adcc98a0d1d": "0x08d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
"0x5f27b51b5ec208ee9cb25b55d87282434e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f308ce9615de0775a82f8a94dc3d285a1": "0x01",
"0xcec5070d609dd3497f72bde07fc96ba0e0cdd062e6eaf24295ad4ccfc41d4609": "0x08fc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31ed43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d76fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9d646a2452dab63a719af21df754ea24de470631233212bfb8e10b6d56203d8f7580f5022a8f8207a1bb21c404dc68e6b": "0x00000000000000000100000000000000000000b44c0d691c4c14c90600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0xcec5070d609dd3497f72bde07fc96ba04e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x15464cac3378d46f113cd5b7a4d71c844e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da997fe19b0f23656e743b5ca86fe9c99c1549070865e5e582e73cd938454755b951559a45b32205acd01651f722ccb4934": "0x000000000000000001000000000000000000001ee22cbc046283210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a3df2b63750efed0dbc8a277c53ae86100000000000000000000000000000000000000001": "0x1460006000fd",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181aa286eda726b50fb510f9035fbd43113e0000000000000000000000000000000000000005": "0x1460006000fd",
"0x5c0d1176a568c1f92944340dbfed9e9c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x7474449cca95dc5d0c00e71735a6d17d4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a318fd280447a8c1ea6c1e9717059528a0000000000000000000000000000000000000008": "0x1460006000fd",
"0x2013754dd003840aea66b349f8241e25c8c156f8164e0465c74b8972ea68b4b3": "0x00000000000000000000000000000000000000000000000000000000000000001dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000000000000000000037572fc1c1545ee579dec6d4851ceb33f48afc62ff8550646bb824cc4e72ecda56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b42156e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0e1e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb3126a22c70f2cff7dfc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31e": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
"0xcec5070d609dd3497f72bde07fc96ba0726380404683fc89e8233450c8aa1950b1f8315351e09c7d61757261808eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x76fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a94074bf5572d7c53ae8a7553083d7c000000000000000000000000000000000000000002": "0x1460006000fd",
"0xcec5070d609dd3497f72bde07fc96ba088dcde934c658227ee1dfafcd6e16903": "0x08fc9fdcfb5f2fe429a593db45a236a78926561d3f9022609d8a0b53ec94b2a31e76fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9d2e2297bb05ca9a28dfcd14115585af1b86d5eea731b476a988138d1ece449c3d245ded80109dd81111610fe37bdc22b": "0x000000000000000001000000000000000000005aa686340e268a640300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x1da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a5d7a2ce26783c697d146d68ec9542fb00000000000000000000000000000000000000004": "0x1460006000fd",
"0x45323df7cc47150b3930e2666b0aa3134e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0xcec5070d609dd3497f72bde07fc96ba04c014e6bf8b8c2c011e7290b85696bb355efc9e0187d34e576fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b": "0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x000010bbd7df7acaad439e1600000000",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x57f8dc2f5ab09467896f47300f0424384e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9a7a89eb3fe4bed6dd2cfe78c60a27fa876fd4335dc809bf8eecc97c4bc2c362033ab6527711393bfd0366d0a32ec465b": "0x0000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x1da53b775b270400e7e61ed5cbc5a1464e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9c3ca4f569005ed1239142b234002c19872e6117b9e4eeb80c9b0791e806d3358f845e6811331b1f49d3f18346605c463": "0x000000000000000001000000000000000000003cc4597809c406430200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da90242679f54f5176a19a72e4f4eb68936844469091575bbf52de1234fa99962270f519d3d276b9562c49576fa54944306": "0x000000000000000001000000000000000000003cc4597809c406430200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1,10 @@
// Copyright 2017-2025 @pezkuwi/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://bizinikiwi-connect/pezkuwi/astar
export const specs: string[] = [
'astar',
'laos'
];
@@ -0,0 +1,24 @@
{
"name": "Laos Network",
"id": "laos_network",
"chainType": "Live",
"bootNodes": [
"/dns4/laos-boot-0.laosfoundation.io/tcp/30334/p2p/12D3KooWPwbNZK339oHX2BGrkp9UAkZ5XKaWkkejy4kj4ZU3aKM5",
"/dns4/laos-boot-1.laosfoundation.io/tcp/30334/p2p/12D3KooWH9tUB68tBwUfP54NJkGxwx7cxKmuoLX5gpHkHiESLoeJ",
"/dns4/laos-boot-2.laosfoundation.io/tcp/30334/p2p/12D3KooWEv926SQ6djXFEMMskZKKMuN3HwJYoCZKBHvymU8Dp5Qc",
"/dns4/bootnode1.laos.gorengine.com/tcp/443/wss/p2p/12D3KooWQtyzyDVMFi5bctjrTtqQNdodRSwGE5hhhz8iWgYBdUvT",
"/dns4/bootnode0.laos.gorengine.com/tcp/443/wss/p2p/12D3KooWPjWDdS8BNAsp2x5koLaFC4speG9J95eABWGU27ypfhAf"
],
"protocolId": "laos_network",
"properties": {
"ss58Format": 42,
"tokenDecimals": 18,
"tokenSymbol": "LAOS"
},
"relay_chain": "pezkuwi",
"para_id": 3370,
"codeSubstitutes": {},
"genesis": {
"stateRootHash": "0xd80e8c97286442f29e6bcb8a2d8e692099c15a1ab5fe3a337a7ddc8b4a62744f"
}
}
+17
View File
@@ -0,0 +1,17 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiPromise } from '@pezkuwi/api';
import { TypeRegistry } from '@pezkuwi/types/create';
interface Statics {
api: ApiPromise;
registry: TypeRegistry;
}
// NOTE We are assuming that the Api class _will_ set it correctly
export const statics = {
api: undefined,
registry: new TypeRegistry()
} as unknown as Statics;
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export default function echoTransform <T> (x: T, _index: number): T {
return x;
}
+98
View File
@@ -0,0 +1,98 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Blockchain } from '@acala-network/chopsticks-core';
import type React from 'react';
import type { ApiPromise } from '@pezkuwi/api';
import type { SubmittableExtrinsicFunction } from '@pezkuwi/api/promise/types';
import type { LinkOption } from '@pezkuwi/apps-config/endpoints/types';
import type { InjectedExtension } from '@pezkuwi/extension-inject/types';
import type { KeypairType } from '@pezkuwi/util-crypto/types';
// helpers for HOC props
export type OmitProps<T, K> = Pick<T, Exclude<keyof T, K>>;
export type SubtractProps<T, K> = OmitProps<T, keyof K>;
export interface BareProps {
className?: string;
}
export interface InjectedAccountExt {
address: string;
meta: {
name: string;
source: string;
whenCreated: number;
};
type: KeypairType;
}
export interface ApiState {
apiDefaultTx: SubmittableExtrinsicFunction;
apiDefaultTxSudo: SubmittableExtrinsicFunction;
chainSS58: number;
fork: Blockchain | null;
hasInjectedAccounts: boolean;
isApiReady: boolean;
isDevelopment: boolean;
isEthereum: boolean;
specName: string;
specVersion: string;
systemChain: string;
systemName: string;
systemVersion: string;
}
export interface ApiProps extends ApiState {
api: ApiPromise;
apiEndpoint: LinkOption | null;
apiError: string | null;
/**
* The identity api used for retrieving identities from the people chain.
*/
apiIdentity: ApiPromise;
/**
* Used for checking if tx.identity.* should be used. Can be used for other scenarios as well.
*/
enableIdentity: boolean;
apiCoretime: ApiPromise;
apiRelay: ApiPromise | null;
apiSystemPeople: ApiPromise | null;
apiUrl?: string;
createLink: (path: string, apiUrl?: string) => string;
extensions?: InjectedExtension[];
isApiConnected: boolean;
isApiInitialized: boolean;
isElectron: boolean;
isWaitingInjected: boolean;
isLocalFork?: boolean;
}
export interface OnChangeCbObs {
next: (value?: any) => any;
}
export type OnChangeCbFn = (value?: any) => any;
export type OnChangeCb = OnChangeCbObs | OnChangeCbFn;
export interface ChangeProps {
callOnResult?: OnChangeCb;
}
export interface CallState {
callResult?: unknown;
callUpdated?: boolean;
callUpdatedAt?: number;
}
export type CallProps = ApiProps & CallState;
export interface BaseProps<T> extends BareProps, CallProps, ChangeProps {
children?: React.ReactNode;
label?: string;
render?: (value?: T) => React.ReactNode;
}
export type Formatter = (value?: any) => string;
export type Environment = 'web' | 'app';
+37
View File
@@ -0,0 +1,37 @@
// Copyright 2017-2025 @pezkuwi/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { unzlibSync, zlibSync } from 'fflate';
import queryString from 'query-string';
import { settings } from '@pezkuwi/ui-settings';
import { assert, stringToU8a, u8aToString } from '@pezkuwi/util';
import { base64Decode, base64Encode } from '@pezkuwi/util-crypto';
export function decodeUrlTypes (): Record<string, any> | null {
const urlOptions = queryString.parse(location.href.split('?')[1]);
if (urlOptions.types) {
try {
assert(!Array.isArray(urlOptions.types), 'Expected a single type specification');
const parts = urlOptions.types.split('#');
const compressed = base64Decode(decodeURIComponent(parts[0]));
const uncompressed = unzlibSync(compressed);
return JSON.parse(u8aToString(uncompressed)) as Record<string, any>;
} catch (error) {
console.error(error);
}
}
return null;
}
export function encodeUrlTypes (types: Record<string, any>): string {
const jsonU8a = stringToU8a(JSON.stringify(types));
const compressed = zlibSync(jsonU8a, { level: 9 });
const encoded = base64Encode(compressed);
return `${window.location.origin}${window.location.pathname}?rpc=${encodeURIComponent(settings.apiUrl)}&types=${encodeURIComponent(encoded)}`;
}
@@ -0,0 +1,23 @@
// Copyright 2017-2025 @pezkuwi/app-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Environment } from '../types.js';
// https://github.com/electron/electron/issues/2288
function isElectron () {
if (process?.versions?.electron) {
return true;
} else if ((window?.process as unknown as (Record<string, string> | undefined))?.type === 'renderer') {
return true;
}
return navigator?.userAgent?.indexOf('Electron') >= 0;
}
export function getEnvironment (): Environment {
if (isElectron()) {
return 'app';
}
return 'web';
}
+15
View File
@@ -0,0 +1,15 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Hash } from '@pezkuwi/types/interfaces';
import type { Codec } from '@pezkuwi/types/types';
type AtQuery <I extends unknown[]> = (hash: string | Uint8Array, ...params: I) => Promise<Codec>;
export async function getHistoric <T extends Codec, I extends unknown[] = unknown[]> (atQuery: AtQuery<I>, params: I, hashes: Hash[]): Promise<[Hash, T][]> {
return Promise
.all(hashes.map((hash): Promise<T> => atQuery(hash, ...params) as Promise<T>))
.then((results): [Hash, T][] =>
results.map((value, index): [Hash, T] => [hashes[index], value])
);
}
+8
View File
@@ -0,0 +1,8 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { getEnvironment } from './getEnvironment.js';
export { getHistoric } from './historic.js';
export { intervalObservable } from './intervalObservable.js';
export { isEqual } from './isEqual.js';
export { triggerChange } from './triggerChange.js';
@@ -0,0 +1,23 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
import type { Subscription } from 'rxjs';
import type { CallState } from '../types.js';
import { interval } from 'rxjs';
const interval$ = interval(500);
export function intervalObservable<Props, State extends CallState> (that: React.Component<Props, State>): Subscription {
return interval$.subscribe((): void => {
const elapsed = Date.now() - (that.state.callUpdatedAt || 0);
const callUpdated = elapsed <= 1500;
if (callUpdated !== that.state.callUpdated) {
that.setState({
callUpdated
});
}
});
}
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
function flatten (_key: string | null, value?: unknown): unknown {
return !value
? value
: (value as Record<string, unknown>).$$typeof
? ''
: Array.isArray(value)
? value.map((item) => flatten(null, item))
: value;
}
export function isEqual <T> (a?: T, b?: T): boolean {
return JSON.stringify({ test: a }, flatten) === JSON.stringify({ test: b }, flatten);
}
@@ -0,0 +1,20 @@
// Copyright 2017-2025 @pezkuwi/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { OnChangeCb } from '../types.js';
import { isFunction, isObservable } from '@pezkuwi/util';
export function triggerChange (value?: unknown, ...callOnResult: (OnChangeCb | undefined)[]): void {
if (!callOnResult?.length) {
return;
}
callOnResult.forEach((callOnResult): void => {
if (isObservable(callOnResult)) {
callOnResult.next(value);
} else if (isFunction(callOnResult)) {
callOnResult(value);
}
});
}