wttp-core
Version:
Core contracts, interfaces, and TypeScript types for the Web3 Transfer Protocol (WTTP).
52 lines • 2.02 kB
TypeScript
/**
* WTTP Gateway Deployment Information and Utilities
*
* Re-exports wttp.deployments.ts with additional utility functions
*/
import { IWTTPGateway } from '../src';
import { ethers } from 'ethers';
import * as esp from '@tw3/esp';
export { wttpDeployments, default } from '../wttp.deployments';
export interface LocalDeploymentData {
chainId: number;
gateway: {
contractAddress: string;
deployerAddress: string;
txHash?: string;
deployedAt?: string;
};
}
export declare function getContractAddress(chainId: number, contract?: ContractTypes): string | undefined;
type ContractTypes = 'gateway' | 'dps' | 'dpr';
export declare function getDeploymentInfo(chainId: number, contract?: ContractTypes): any;
export declare function getSupportedChainIds(): number[];
export declare function isSupportedChain(chainId: number): boolean;
export declare function loadContract(chainId: number, contract?: ContractTypes, provider?: ethers.Provider | null): IWTTPGateway | esp.DataPointStorage | esp.DataPointRegistry | undefined;
/**
* Add a localhost deployment to your local package copy
* This allows testing with your own deployed contracts without testnet tokens
*
* @param deploymentData - The deployment information to add
* @param options - Configuration options
*/
export declare function addLocalhostDeployment(deploymentData: LocalDeploymentData, options?: {
overwrite?: boolean;
description?: string;
}): void;
/**
* Remove a localhost deployment from your local package copy
*
* @param chainId - The chain ID to remove (must be localhost: 31337 or 1337)
*/
export declare function removeLocalhostDeployment(chainId: number): void;
/**
* List all deployments including any localhost ones you've added
*/
export declare function listAllDeployments(): {
[chainId: number]: any;
};
/**
* Check if a localhost deployment exists
*/
export declare function hasLocalhostDeployment(chainId?: number): boolean;
//# sourceMappingURL=deployments.d.ts.map