@atomicport/evm
Version:
Support Cross-Chain-Swap with HTLC on any blockchains
22 lines (21 loc) • 955 B
TypeScript
import { BaseHTLCService } from './models/BaseHtlc';
import { LockOptions } from './models/Core';
import { HTLCERC20MintResult, HTLCERC20WithDrawResult } from './models/Contract';
/**
* HTLC operations on the Ethereum Test Net.
* Passing a value to the constructor will overwrite the specified value.
*/
export declare class EvmErc20Htlc extends BaseHTLCService {
private readonly contractAddress;
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, tokenAddress: string, options?: LockOptions): Promise<HTLCERC20MintResult>;
/**
* Receive tokens stored under the key at the time of HTLC generation
*/
withDraw(contractId: string, senderAddress: string, proof: string, gasLimit?: number): Promise<{
result: HTLCERC20WithDrawResult;
}>;
}