@flaunch/sdk
Version:
Flaunch SDK to easily interact with the Flaunch protocol
72 lines • 2.55 kB
TypeScript
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter } from "@delvtech/drift";
import { TokenImporterAbi } from "../abi/TokenImporter";
import { Verifier } from "../types";
export type TokenImporterABI = typeof TokenImporterAbi;
/**
* Base client for interacting with the TokenImporter contract in read-only mode
* Provides basic contract initialization
*/
export declare class ReadTokenImporter {
drift: Drift;
chainId: number;
readonly contract: ReadContract<TokenImporterABI>;
constructor(chainId: number, address: Address, drift?: Drift);
/**
* Verifies if a memecoin is valid for importing
* @param memecoin - The address of the memecoin to import
* @returns Promise<{ isValid: boolean; verifier: Address }> - The result of the verification
*/
verifyMemecoin(memecoin: Address): Promise<{
isValid: boolean;
verifier: Address;
}>;
/**
* Returns the address of a verifier
*/
verifierAddress(verifier: Verifier): `0x${string}`;
}
/**
* Extended client for interacting with the TokenImporter contract with write capabilities
*/
export declare class ReadWriteTokenImporter extends ReadTokenImporter {
contract: ReadWriteContract<TokenImporterABI>;
constructor(chainId: number, address: Address, drift?: Drift<ReadWriteAdapter>);
initialize(params: {
coinAddress: Address;
creatorFeeAllocationPercent: number;
initialMarketCapUSD: number;
verifier?: Verifier;
tokenSupply?: bigint;
} | {
coinAddress: Address;
creatorFeeAllocationPercent: number;
initialPriceUSD: number;
verifier?: Verifier;
tokenSupply?: bigint;
}): Promise<`0x${string}`>;
getInitializeParams(params: {
coinAddress: Address;
creatorFeeAllocationPercent: number;
initialMarketCapUSD: number;
verifier?: Verifier;
tokenSupply?: bigint;
} | {
coinAddress: Address;
creatorFeeAllocationPercent: number;
initialPriceUSD: number;
verifier?: Verifier;
tokenSupply?: bigint;
}): Promise<{
_memecoin: `0x${string}`;
_creatorFeeAllocation: number;
_initialMarketCap: bigint;
_verifier: `0x${string}`;
} | {
_totalSupply: bigint;
_memecoin: `0x${string}`;
_creatorFeeAllocation: number;
_initialMarketCap: bigint;
_verifier: `0x${string}`;
}>;
}
//# sourceMappingURL=TokenImporter.d.ts.map