@baking-bad/tezos-etherlink-bridge-sdk
Version:
SDK designed for building token bridge applications between Tezos (L1) and Etherlink (L2)
36 lines (35 loc) • 2.07 kB
TypeScript
import type { ethers, Contract, ContractTransaction, ContractTransactionResponse, Signer } from 'ethers';
import { type EtherlinkBridgeBlockchainService, type WithdrawNativeTokenParams, type WithdrawNativeTokenResult, type WithdrawNonNativeTokenParams, type WithdrawNonNativeTokenResult, type CreateWithdrawNativeTokenOperationParams, type CreateWithdrawNonNativeTokenOperationParams } from '../etherlinkBridgeBlockchainService';
export interface EthersEtherlinkBridgeBlockchainServiceOptions {
ethers: typeof ethers;
signer: Signer;
kernelAddress?: string;
nativeTokenBridgePrecompileAddress?: string;
nonNativeTokenBridgePrecompileAddress?: string;
}
export declare class EthersEtherlinkBridgeBlockchainService implements EtherlinkBridgeBlockchainService<{
tx: ContractTransactionResponse;
}, {
tx: ContractTransactionResponse;
}, ContractTransaction, ContractTransaction> {
readonly ethers: typeof ethers;
protected readonly nativeTokenBridgePrecompiledAddress: string;
protected readonly nonNativeTokenBridgePrecompiledAddress: string;
protected readonly nativeTokenBridgePrecompile: Contract;
protected readonly nonNativeTokenBridgePrecompile: Contract;
private _signer;
constructor(options: EthersEtherlinkBridgeBlockchainServiceOptions);
get signer(): ethers.Signer;
getSignerAddress(): Promise<string | undefined>;
withdrawNativeToken(params: WithdrawNativeTokenParams): Promise<WithdrawNativeTokenResult & {
tx: ContractTransactionResponse;
}>;
withdrawNonNativeToken(params: WithdrawNonNativeTokenParams): Promise<WithdrawNonNativeTokenResult & {
tx: ContractTransactionResponse;
}>;
createWithdrawNativeTokenOperation(params: CreateWithdrawNativeTokenOperationParams): Promise<ethers.ContractTransaction>;
createWithdrawNonNativeTokenOperation(params: CreateWithdrawNonNativeTokenOperationParams): Promise<ethers.ContractTransaction>;
setSigner(signer: Signer): void;
protected getCurrentTransactionTimestamp(): string;
private withdrawToken;
}