UNPKG

@baking-bad/tezos-etherlink-bridge-sdk

Version:

SDK designed for building token bridge applications between Tezos (L1) and Etherlink (L2)

34 lines (33 loc) 2.34 kB
import type { Web3, TransactionReceipt } from 'web3'; import type { NonPayableMethodObject, PayableMethodObject } from 'web3-eth-contract'; import type { NativeTokenBridgePrecompile, NonNativeTokenBridgePrecompile } from './precompiles'; import { type EtherlinkBridgeBlockchainService, type WithdrawNativeTokenParams, type WithdrawNativeTokenResult, type WithdrawNonNativeTokenParams, type WithdrawNonNativeTokenResult, type CreateWithdrawNativeTokenOperationParams, type CreateWithdrawNonNativeTokenOperationParams } from '../etherlinkBridgeBlockchainService'; export interface Web3EtherlinkBridgeBlockchainServiceOptions { web3: Web3; kernelAddress?: string; nativeTokenBridgePrecompileAddress?: string; nonNativeTokenBridgePrecompileAddress?: string; } export declare class Web3EtherlinkBridgeBlockchainService implements EtherlinkBridgeBlockchainService<{ receipt: TransactionReceipt; }, { receipt: TransactionReceipt; }, PayableMethodObject, NonPayableMethodObject> { protected readonly web3: Web3; protected readonly nativeTokenBridgePrecompiledAddress: string; protected readonly nonNativeTokenBridgePrecompiledAddress: string; protected readonly nativeTokenBridgePrecompile: NativeTokenBridgePrecompile; protected readonly nonNativeTokenBridgePrecompile: NonNativeTokenBridgePrecompile; constructor(options: Web3EtherlinkBridgeBlockchainServiceOptions); getSignerAddress(): Promise<string | undefined>; withdrawNativeToken(params: WithdrawNativeTokenParams): Promise<WithdrawNativeTokenResult & { receipt: TransactionReceipt; }>; withdrawNonNativeToken(params: WithdrawNonNativeTokenParams): Promise<WithdrawNonNativeTokenResult & { receipt: TransactionReceipt; }>; createWithdrawNativeTokenOperation(params: CreateWithdrawNativeTokenOperationParams): Promise<PayableMethodObject<[string], void>>; createWithdrawNonNativeTokenOperation(params: CreateWithdrawNonNativeTokenOperationParams): Promise<NonPayableMethodObject<[string, import("web3").MatchPrimitiveType<"bytes", unknown>, import("web3").MatchPrimitiveType<"uint256", unknown>, import("web3").MatchPrimitiveType<"bytes22", unknown>, import("web3").MatchPrimitiveType<"bytes", unknown>], void>>; protected getCurrentTransactionTimestamp(): string; private withdrawToken; }