UNPKG

@celo/contractkit

Version:

Celo's ContractKit to interact with Celo network

27 lines (26 loc) 902 B
import { StrongAddress } from '@celo/base/lib/address'; import { Connection } from '@celo/connect'; import { CeloContract } from './base'; export declare const REGISTRY_CONTRACT_ADDRESS = "0x000000000000000000000000000000000000ce10"; export declare class UnregisteredError extends Error { constructor(contract: CeloContract); } /** * Celo Core Contract's Address Registry * * @param connection – an instance of @celo/connect {@link Connection} */ export declare class AddressRegistry { readonly connection: Connection; private readonly registry; private readonly cache; constructor(connection: Connection); /** * Get the address for a `CeloContract` */ addressFor(contract: CeloContract): Promise<StrongAddress>; /** * Get the address mapping for known registered contracts */ addressMapping(): Promise<Map<CeloContract, `0x${string}`>>; }