test-kohin-sdk
Version:
The Kohin JS is a comprehensive developer toolkit designed to integrate Kohin's decentralized insurance system seamlessly into your applications. It enables efficient interaction with Kohin smart contracts and backend APIs, facilitating management and ana
80 lines (79 loc) • 2.8 kB
TypeScript
import { polygon, polygonAmoy } from "viem/chains";
export type EnvMode = "test" | "preProd" | "prod";
export type constantsAll = "INSURANCE_POOL_ADDRESS" | "COMBO_PREMIUM_CALCULATOR_ADDRESS" | "SINGLE_PREMIUM_CALCULATOR_ADDRESS" | "TOKEN_ADDRESS" | "POLYGON_CHAIN" | "POLICY_MANAGER_ADDRESS" | "BASE_URL";
type Config = {
INSURANCE_POOL_ADDRESS: string;
COMBO_PREMIUM_CALCULATOR_ADDRESS: string;
SINGLE_PREMIUM_CALCULATOR_ADDRESS: string;
TOKEN_ADDRESS: string;
POLYGON_CHAIN: typeof polygon | typeof polygonAmoy;
BASE_URL: string;
POLICY_MANAGER_ADDRESS: string;
};
export declare const CONSTANTS: Record<EnvMode, Config>;
export declare const getEnvConstant: (address: constantsAll) => string | {
blockExplorers: {
readonly default: {
readonly name: "PolygonScan";
readonly url: "https://polygonscan.com";
readonly apiUrl: "https://api.polygonscan.com/api";
};
};
contracts: {
readonly multicall3: {
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
readonly blockCreated: 25770160;
};
};
id: 137;
name: "Polygon";
nativeCurrency: {
readonly name: "POL";
readonly symbol: "POL";
readonly decimals: 18;
};
rpcUrls: {
readonly default: {
readonly http: readonly ["https://polygon-rpc.com"];
};
};
sourceId?: number | undefined;
testnet?: boolean | undefined;
custom?: Record<string, unknown> | undefined;
fees?: import("viem").ChainFees<undefined> | undefined;
formatters?: undefined;
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
} | {
blockExplorers: {
readonly default: {
readonly name: "PolygonScan";
readonly url: "https://amoy.polygonscan.com";
readonly apiUrl: "https://api-amoy.polygonscan.com/api";
};
};
contracts: {
readonly multicall3: {
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
readonly blockCreated: 3127388;
};
};
id: 80002;
name: "Polygon Amoy";
nativeCurrency: {
readonly name: "POL";
readonly symbol: "POL";
readonly decimals: 18;
};
rpcUrls: {
readonly default: {
readonly http: readonly ["https://rpc-amoy.polygon.technology"];
};
};
sourceId?: number | undefined;
testnet: true;
custom?: Record<string, unknown> | undefined;
fees?: import("viem").ChainFees<undefined> | undefined;
formatters?: undefined;
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
};
export {};