UNPKG

@atomicport/evm

Version:

Support Cross-Chain-Swap with HTLC on any blockchains

21 lines (20 loc) 870 B
import { BaseHTLCService } from './models/BaseHtlc'; import { LockOptions } from './models/Core'; import { HTLCMintResult, HTLCWithDrawResult } from './models/Contract'; /** * HTLC operations on the Ethereum Test Net. * Passing a value to the constructor will overwrite the specified value. */ export declare class EvmHtlc extends BaseHTLCService { constructor(providerEndpoint: string, contractAddress: string); /** * Issue HTLC and obtain the key at the time of issue */ lock(recipientAddress: string, senderAddress: string, secret: string, amount: number, options?: LockOptions): Promise<HTLCMintResult>; /** * Receive tokens stored under the key at the time of HTLC generation */ withDraw(contractId: string, senderAddress: string, proof: string, gasLimit?: number): Promise<{ result: HTLCWithDrawResult; }>; }