@atomicport/evm
Version:
Support Cross-Chain-Swap with HTLC on any blockchains
29 lines (28 loc) • 1.15 kB
TypeScript
import { BaseHTLCService } from './models/BaseHtlc';
import { HTLCERC721MintResult, HTLCERC721WithDrawResult } from './models/Contract';
import { LockOptions } from './models/Core';
/**
* HTLC operations on the Ethereum Test Net.
* Passing a value to the constructor will overwrite the specified value.
*/
export declare class EvmErc721Htlc 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, tokenId: number, tokenAddress: string, options?: LockOptions): Promise<HTLCERC721MintResult>;
/**
* Receive tokens stored under the key at the time of HTLC generation
*/
withDraw(contractId: string, senderAddress: string, proof: string, gasLimit?: number): Promise<{
result: HTLCERC721WithDrawResult;
}>;
/**
* for development
* create erc721 token
*/
createToken(tokenAddress: string, senderAddress: string, tokenId: number): Promise<{
tokenId: string;
}>;
}