import * as EQNext from "@equilab/api/eq-next/types";
import * as EQ from "@equilab/api/equilibrium/types";
import { createApi as createEqApi, createApiRx as createEqRxApi, } from "@equilab/api/equilibrium";
import { createApi as createEqNextApi, createApiRx as createEqNextApiRx, } from "@equilab/api/eq-next";
import { createApi as createGensApi, createApiRx as createGensRxApi, } from "@equilab/api/genshiro";
import * as util from "@polkadot/util";
import * as utilCrypto from "@polkadot/util-crypto";
import * as CONSTS from "./constants";
import ApiLite from "./lite/class";
export { ApiPromise, ApiRx } from "@polkadot/api";
export { WsProvider } from "@polkadot/rpc-provider";
export const isApi = (api, apiType) => {
    return api?._type === apiType;
};
export const getApiCreator = (apiType) => {
    if (apiType === "Eq") {
        return createEqApi;
    }
    else if (apiType === "EqNext") {
        return createEqNextApi;
    }
    else {
        return createGensApi;
    }
};
export const getApiCreatorRx = (apiType) => {
    if (apiType === "Eq") {
        return createEqRxApi;
    }
    else if (apiType === "EqNext") {
        return createEqNextApiRx;
    }
    else {
        return createGensRxApi;
    }
};
export * from "./util";
export { CONSTS, util, utilCrypto, ApiLite };
export const getSigMessage = (test, address, stamenent = false) => {
    const prfx = test ? CONSTS.TEST_PREFIX : CONSTS.PREFIX;
    const stmt = CONSTS.STATEMENT.toString();
    let message = prfx + util.u8aToHex(utilCrypto.decodeAddress(address), -1, false);
    if (stamenent) {
        message += stmt;
    }
    return message;
};
//# sourceMappingURL=index.js.map