UNPKG

@myria/airdrop-js

Version:

Airdrop in L1 with claim based approach

39 lines (38 loc) 1.86 kB
/** * Collection of utils functions use for internal * DO NOT export for our consumers use. Otherwise, Move to core or wrapper instead */ import { Chain, SendTransactionOptions } from 'thirdweb'; import { TransactionReceipt } from 'thirdweb/transaction'; import { SupportingChain } from '../type'; /** * Log with start time to keep track * * @param {string} functionName - The source's function name invoke this function * @returns {number} the current start time in milliseconds */ export declare const logFunctionTrackStartTime: (functionName: string) => number; /** * Log function's duration to keep track * * @param {string} functionName - The source's function name invoke this function * @param {number} startTime - The start time in milliseconds when you perform the same functionName */ export declare const logFunctionDuration: (functionName: string, startTime: number) => void; /** * Retrieve thirdweb chain from a supporting chain in our sdk * * @param {SupportingChain} supportingChain - The selected chain by invoker. * @returns {Chain} A thirdweb chain. */ export declare const getThirdWebChain: (supportingChain: SupportingChain) => Chain; /** * Private method Sends a transaction using the provided wallet. * * @param {SendTransactionOptions} options - The options for sending the transaction. * @param {transactionCallback} callback - The callback that handles the post-submit state. * @param {boolean} isLogResult - Whether to log the result or not. Default true. * @returns {Promise<TransactionReceipt>} A promise that resolves to the confirmed transaction receipt. * @throws An error if the wallet is not connected. */ export declare const doSubmitTransaction: (options: SendTransactionOptions, callback?: ((result: TransactionReceipt) => void) | undefined, isLogResult?: boolean) => Promise<TransactionReceipt>;