@myria/airdrop-js
Version:
Airdrop in L1 with claim based approach
110 lines (109 loc) • 3.74 kB
TypeScript
/**
* Config module.
* @module Config
*/
import { ConfigOptions, ExtraGasOptions, SupportingChain } from '../type';
/**
* Centralize your configuration in Config class
* @class
*/
export declare class Config {
private static instance;
private tokenAddress;
private airdropAddress;
private selectedChain;
private extraGasOptions;
private thirdwebClientId;
private thirdwebClientSecret;
private debug;
/**
* private constructor follow singleton design pattern
*
* @param {ConfigOptions} options - optional config object to initialize once if you want
*/
private constructor();
/**
* Single entry point to let consumer initial or access the shared access with singleton pattern
*
* @param {ConfigOptions} configOptions - optional config object to initialize once if you want
* @returns {Config} - Return the exiting or create a new one
*/
static getInstance(configOptions?: ConfigOptions): Config;
/**
* Set the tokenAddress
* @param {string} tokenAddress - The token smart contract address
* @returns {Config} - Return the current instance
*/
setTokenAddress(tokenAddress: string): Config;
/**
* Set the airdropAddress
* @param {string} airdropAddress - The airdrop smart contract address
* @returns {Config} - Return the current instance
*/
setAirdropAddress(airdropAddress: string): Config;
/**
* Set the selectedChain
* @param {SupportingChain} selectedChain - The selected chain
* @returns {Config} - Return the current instance
*/
setSelectedChain(selectedChain: SupportingChain): Config;
/**
* Set the thirdwebClientId
* @param {string} thirdwebClientId - The thirdweb client id
* @returns {Config} - Return the current instance
*/
setThirdwebClientId(thirdwebClientId: string): Config;
/**
* Set the thirdwebClientSecret
* @param {string} thirdwebClientSecret - The thirdweb client secret key
* @returns {Config} - Return the current instance
*/
setThirdwebClientSecret(thirdwebClientSecret: string): Config;
/**
* Set the debug
* @param {boolean} debug - Whether turn on the log to debug or not
* @returns {Config} - Return the current instance
*/
setDebug(debug: boolean): Config;
/**
* Set the extraGasOptions
* @param {ExtraGasOptions} extraGasOptions - Configure the ExtraGasOptions when submitting a transaction
* @returns {Config} - Return the current instance
*/
setExtraGasOptions(extraGasOptions: ExtraGasOptions): Config;
/**
* Get the tokenAddress
* @returns {string} - Return the current tokenAddress
*/
getTokenAddress(): string | undefined;
/**
* Get the airdropAddress
* @returns {string} - Return the current airdropAddress
*/
getAirdropAddress(): string | undefined;
/**
* Get the extraGasOptions
* @returns {ExtraGasOptions} - Return the current extraGasOptions
*/
getExtraGasOptions(): ExtraGasOptions | undefined;
/**
* Get the selectedChain
* @returns {SupportingChain} - Return the current selectedChain
*/
getSelectedChain(): SupportingChain | undefined;
/**
* Get the thirdwebClientId
* @returns {string} - Return the current thirdwebClientId
*/
getThirdwebClientId(): string | undefined;
/**
* Get the thirdwebClientSecret
* @returns {string} - Return the current thirdwebClientSecret
*/
getThirdwebClientSecret(): string | undefined;
/**
* Get the debug
* @returns {boolean} - Return the current debug mode
*/
getDebug(): boolean | undefined;
}