UNPKG

@hyperlane-xyz/sdk

Version:

The official SDK for the Hyperlane Network

75 lines 2.82 kB
import type { BigNumber, Signer, ethers } from 'ethers'; import { z } from 'zod'; import type { AltVM, ProtocolType } from '@hyperlane-xyz/provider-sdk'; import type { Address, Domain } from '@hyperlane-xyz/utils'; import { MultiProvider } from './providers/MultiProvider.js'; import { ProtocolReceipt, ProtocolTransaction } from './providers/ProviderType.js'; export type ChainName = string; export type ChainMap<Value> = Record<ChainName, Value>; export type ProtocolMap<Value> = Partial<Record<ProtocolType, Value>>; export type ChainNameOrId = ChainName | Domain; export type Connection = ethers.providers.Provider | ethers.Signer; export declare const OwnableSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { owner: string; ownerOverrides?: Record<string, string> | undefined; }, { owner: string; ownerOverrides?: Record<string, string> | undefined; }>; export type OwnableConfig = z.infer<typeof OwnableSchema>; export declare const DeployedOwnableSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { address: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { owner: string; address?: string | undefined; ownerOverrides?: Record<string, string> | undefined; }, { owner: string; address?: string | undefined; ownerOverrides?: Record<string, string> | undefined; }>; export type DeployedOwnableConfig = z.infer<typeof DeployedOwnableSchema>; export declare const DerivedOwnableSchema: z.ZodObject<{ address: z.ZodString; owner: z.ZodString; }, "strip", z.ZodTypeAny, { address: string; owner: string; }, { address: string; owner: string; }>; export type DerivedOwnableConfig = z.infer<typeof DerivedOwnableSchema>; export declare const PausableSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { paused: z.ZodBoolean; }, "strip", z.ZodTypeAny, { owner: string; paused: boolean; ownerOverrides?: Record<string, string> | undefined; }, { owner: string; paused: boolean; ownerOverrides?: Record<string, string> | undefined; }>; export type PausableConfig = z.infer<typeof PausableSchema>; export type TypedSigner<T extends ProtocolType> = Signer | AltVM.ISigner<ProtocolTransaction<T>, ProtocolReceipt<T>>; export interface IMultiProtocolSignerManager { getMultiProvider(): Promise<MultiProvider>; getEVMSigner(chain: ChainName): Signer; getSignerAddress(chain: ChainName): Promise<Address>; getBalance(params: { address: Address; chain: ChainName; denom?: string; }): Promise<BigNumber>; } //# sourceMappingURL=types.d.ts.map