UNPKG

@nomad-xyz/sdk-bridge

Version:
77 lines 2.81 kB
import { Contracts } from '@nomad-xyz/multi-provider'; import { BridgeRouter, TokenRegistry, ETHHelper, NFTAccountant } from '@nomad-xyz/contracts-bridge'; import * as config from '@nomad-xyz/configuration'; import { BridgeContext } from './BridgeContext'; import { BigNumber, BigNumberish } from 'ethers'; export interface NftInfo { _holder: string; _isAllowed: boolean; _uri: string; _asset: string; _originalAmount: BigNumber; _originalUser: string; _recovered: BigNumber; _recoverable: BigNumber; } export interface AccountantAsset { _totalAffected: BigNumber; _totalMinted: BigNumber; _totalCollected: BigNumber; _totalRecovered: BigNumber; } export declare class BridgeContracts extends Contracts<config.Domain, BridgeContext> { protected conf: config.EthereumBridgeDeploymentInfo; constructor(context: BridgeContext, domain: string, conf: config.EthereumBridgeDeploymentInfo); get deployHeight(): number; /** * Get the BridgeRouter associated with this bridge. * * WARNING: do not hold references to this contract, as it will not be * reconnected in the event the chain connection changes. * * @throws if there is no connection for this network */ get bridgeRouter(): BridgeRouter; /** * Get the TokenRegistry associated with this bridge. * * WARNING: do not hold references to this contract, as it will not be * reconnected in the event the chain connection changes. * * @throws if there is no connection for this network */ get tokenRegistry(): TokenRegistry; /** * Get the EthHelper associated with this bridge (if any). * * WARNING: do not hold references to this contract, as it will not be * reconnected in the event the chain connection changes. * * @throws if there is no connection for this network */ get ethHelper(): ETHHelper | undefined; /** * Get the Accountant associated with this bridge (if any). * * WARNING: do not hold references to this contract, as it will not be * reconnected in the event the chain connection changes. * * @throws if there is no connection for this network */ get accountant(): NFTAccountant | undefined; /** * Get the info associated with the NFT ID, if any. * * @param id The numerical NFT ID * @throws if there is no connection for this network */ nftInfo(id: BigNumberish): Promise<NftInfo | undefined>; /** * Get the info associated with the NFT ID, if any. * * @param token The numerical NFT ID * @throws if there is no connection for this network */ assetInfo(token: string): Promise<AccountantAsset | undefined>; } //# sourceMappingURL=BridgeContracts.d.ts.map