@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
34 lines (33 loc) • 1.14 kB
TypeScript
import { ApiPromise } from '@polkadot/api';
import { Text, Vec } from '@polkadot/types';
import { HttpError } from 'http-errors';
import { AssetHubInfo } from '../../src/apiRegistry';
export declare class EtheuremAddressNotSupported extends Error implements HttpError {
readonly status: number;
readonly statusCode: number;
readonly expose: boolean;
readonly name: string;
constructor(msg: string);
}
export declare abstract class AbstractService {
protected specName: string;
constructor(specName: string);
/**
* Process metadata documention.
*
* @param docs metadata doucumentation array
*/
protected sanitizeDocs(docs: Vec<Text>): string;
/**
* Returns HttpError with the correct err message for querying accounts balances.
*
* @function
* @param {string} address Address that was queried
* @param {Error} err Error returned from the promise
* @returns {HttpError}
*/
protected createHttpErrorForAddr(address: string, err: Error): HttpError;
get api(): ApiPromise;
get assetHubInfo(): AssetHubInfo;
getSpecName(): string;
}