@api3/contracts
Version:
Contracts through which API3 services are delivered
348 lines • 10.2 kB
TypeScript
import { z } from 'zod';
export declare const chainExplorerAPIKeySchema: z.ZodObject<{
required: z.ZodBoolean;
hardhatEtherscanAlias: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}>;
export declare const chainExplorerAPISchema: z.ZodObject<{
key: z.ZodObject<{
required: z.ZodBoolean;
hardhatEtherscanAlias: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}>;
export declare const chainExplorerSchema: z.ZodObject<{
api: z.ZodOptional<z.ZodObject<{
key: z.ZodObject<{
required: z.ZodBoolean;
hardhatEtherscanAlias: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}>>;
browserUrl: z.ZodString;
}, "strip", z.ZodTypeAny, {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
}, {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
}>;
export declare const chainProviderSchema: z.ZodEffects<z.ZodObject<{
alias: z.ZodString;
homepageUrl: z.ZodOptional<z.ZodString>;
rpcUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>;
export declare const chainProvidersSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
alias: z.ZodString;
homepageUrl: z.ZodOptional<z.ZodString>;
rpcUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>, "many">, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[], {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[]>;
export declare const hardhatConfigOverrides: z.ZodObject<{
networks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
networks?: Record<string, any> | undefined;
}, {
networks?: Record<string, any> | undefined;
}>;
export declare const chainSchema: z.ZodObject<{
alias: z.ZodString;
decimals: z.ZodNumber;
explorer: z.ZodObject<{
api: z.ZodOptional<z.ZodObject<{
key: z.ZodObject<{
required: z.ZodBoolean;
hardhatEtherscanAlias: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}, {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
}>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}, {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
}>>;
browserUrl: z.ZodString;
}, "strip", z.ZodTypeAny, {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
}, {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
}>;
hardhatConfigOverrides: z.ZodOptional<z.ZodObject<{
networks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
networks?: Record<string, any> | undefined;
}, {
networks?: Record<string, any> | undefined;
}>>;
id: z.ZodString;
name: z.ZodString;
providers: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
alias: z.ZodString;
homepageUrl: z.ZodOptional<z.ZodString>;
rpcUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}>, "many">, {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[], {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[]>;
skipProviderCheck: z.ZodOptional<z.ZodBoolean>;
symbol: z.ZodString;
testnet: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
symbol: string;
name: string;
decimals: number;
alias: string;
explorer: {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
};
id: string;
providers: {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[];
testnet: boolean;
hardhatConfigOverrides?: {
networks?: Record<string, any> | undefined;
} | undefined;
skipProviderCheck?: boolean | undefined;
}, {
symbol: string;
name: string;
decimals: number;
alias: string;
explorer: {
browserUrl: string;
api?: {
key: {
required: boolean;
hardhatEtherscanAlias?: string | undefined;
};
url: string;
} | undefined;
};
id: string;
providers: {
alias: string;
homepageUrl?: string | undefined;
rpcUrl?: string | undefined;
}[];
testnet: boolean;
hardhatConfigOverrides?: {
networks?: Record<string, any> | undefined;
} | undefined;
skipProviderCheck?: boolean | undefined;
}>;
export type Chain = z.infer<typeof chainSchema>;
export type ChainExplorer = z.infer<typeof chainExplorerSchema>;
export type ChainExplorerAPI = z.infer<typeof chainExplorerAPISchema>;
export type ChainExplorerAPIKey = z.infer<typeof chainExplorerAPIKeySchema>;
export type ChainHardhatConfigOverrides = z.infer<typeof hardhatConfigOverrides>;
export type ChainProviders = z.infer<typeof chainProvidersSchema>;
export type ChainProvider = z.infer<typeof chainProviderSchema>;
export interface HardhatNetworksConfig {
[key: string]: {
accounts: {
mnemonic: string;
};
chainId: number;
url: string;
};
}
export interface HardhatEtherscanCustomChain {
network: string;
chainId: number;
urls: {
apiURL: string;
browserURL: string;
};
}
export interface HardhatEtherscanConfig {
apiKey: {
[alias: string]: string;
};
customChains: HardhatEtherscanCustomChain[];
}
export declare const aliasSchema: z.ZodString;
export type Alias = z.infer<typeof aliasSchema>;
export declare const chainAlias: z.ZodEffects<z.ZodString, string, string>;
export type ChainAlias = z.infer<typeof chainAlias>;
export declare const dappSchema: z.ZodObject<{
aliases: z.ZodRecord<z.ZodString, z.ZodObject<{
chains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
chains: string[];
title: string;
description?: string | undefined;
}, {
chains: string[];
title: string;
description?: string | undefined;
}>>;
homepageUrl: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
aliases: Record<string, {
chains: string[];
title: string;
description?: string | undefined;
}>;
homepageUrl?: string | undefined;
}, {
aliases: Record<string, {
chains: string[];
title: string;
description?: string | undefined;
}>;
homepageUrl?: string | undefined;
}>;
export type Dapp = z.infer<typeof dappSchema>;
//# sourceMappingURL=types.d.ts.map