@stable-io/cctp-sdk-definitions
Version:
Definitions for the CCTP SDK
57 lines • 2.51 kB
TypeScript
import type { SuppressExpansion } from "@stable-io/utils";
import { Aliased, DomainAliases } from "../../registry.js";
export declare const domains: readonly ["Ethereum", "Avalanche", "Optimism", "Arbitrum", "Noble", "Solana", "Base", "Polygon", "Sui", "Aptos", "Unichain", "Linea", "Codex", "Sonic", "Worldchain"];
export type ExpandedDomain = typeof domains[number];
export interface AllDomains extends SuppressExpansion<ExpandedDomain> {
}
declare module "../../registry.js" {
interface DomainAliases {
AllDomains: [ExpandedDomain, AllDomains];
}
}
export type SimplifyDomain<D extends ExpandedDomain> = Aliased<DomainAliases, D>;
export type Domain = SimplifyDomain<ExpandedDomain>;
declare const domainIds: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
export type DomainId = typeof domainIds[number];
export declare const domainIdOf: (<const K1 extends "Ethereum" | "Avalanche" | "Optimism" | "Arbitrum" | "Noble" | "Solana" | "Base" | "Polygon" | "Sui" | "Aptos" | "Unichain" | "Linea" | "Codex" | "Sonic" | "Worldchain">(args_0: K1) => {
readonly Ethereum: 0;
readonly Avalanche: 1;
readonly Optimism: 2;
readonly Arbitrum: 3;
readonly Noble: 4;
readonly Solana: 5;
readonly Base: 6;
readonly Polygon: 7;
readonly Sui: 8;
readonly Aptos: 9;
readonly Unichain: 10;
readonly Linea: 11;
readonly Codex: 12;
readonly Sonic: 13;
readonly Worldchain: 14;
}[K1 extends bigint ? `bigint(${K1})` : K1 extends boolean ? `boolean(${K1})` : K1]) & {
readonly has: (args_0: string) => boolean;
readonly get: (args_0: string) => (0 | 2 | 1 | 11 | 5 | 6 | 3 | 4 | 14 | 7 | 8 | 9 | 10 | 12 | 13) | undefined;
};
export declare const domainOf: (<const K1 extends 0 | 2 | 1 | 11 | 5 | 6 | 3 | 4 | 14 | 7 | 8 | 9 | 10 | 12 | 13>(args_0: K1) => {
0: "Ethereum";
1: "Avalanche";
2: "Optimism";
3: "Arbitrum";
4: "Noble";
5: "Solana";
6: "Base";
7: "Polygon";
8: "Sui";
9: "Aptos";
10: "Unichain";
11: "Linea";
12: "Codex";
13: "Sonic";
14: "Worldchain";
}[K1 extends bigint ? `bigint(${K1})` : K1 extends boolean ? `boolean(${K1})` : K1]) & {
readonly has: (args_0: number) => boolean;
readonly get: (args_0: number) => ("Ethereum" | "Avalanche" | "Optimism" | "Arbitrum" | "Noble" | "Solana" | "Base" | "Polygon" | "Sui" | "Aptos" | "Unichain" | "Linea" | "Codex" | "Sonic" | "Worldchain") | undefined;
};
export {};
//# sourceMappingURL=domains.d.ts.map