import { AuctionExt, Info, Token, Types } from "../../../declarations"; import { RegistrarActor } from '../..'; /** * ICNS Registrar Canister Controller. * This class is responsible for handling all the requests related to the ICNS registrar canister. */ export declare class ICNSRegistrarController { private registrarActor; info: Info | null; /** * Create an instance that communicates with icns registrar canister. * Some of the functions uses the actor agent identity to identify the user that is interacting. * @param {RegistrarActor} registrarActor actor or an anonymous will be used */ constructor(registrarActor?: RegistrarActor); /** * Get the Common Info from registrar canister. * @returns {Promise} */ getRegistrarInfo(): Promise; /** * Verify domain available or not. * @param {string} domain Represents domain name. * @returns {Promise} */ domainIsAvailable(domain: string): Promise; /** * Get auction state. * @param {string} domain Represents domain name. * @returns {Promise<[] | [AuctionExt]>} Return auction state. */ getAuciton(domain: string): Promise<[] | [AuctionExt]>; /** * Get one token balance for a given principal id (wicp as default). * @param {string} principalId Represents user identity. * @returns {Promise} Return balance. */ getUserBalance(principalId: string): Promise; /** * Get the principal of the agent. * It is going to throw if the principal is anonymous. * @internal * @returns {Promise} */ private getAgentPrincipal; /** * Approve transfers from token to registrar canister. * This function uses the actor agent identity. * This function needs to be called before operate with registrar canister. * @param {string | undefined} tokenId the canister id of the token to be approved. * @param {Types.Amount} amount the amount of the token to be approved. * @returns {Promise} Return void promise. */ approve(tokenId: string | undefined, amount: Types.Amount): Promise; /** * Place Bid into canister. * This function uses the actor agent identity. * @param {Types.Amount} amount the amount of this bid. * @param {string} domian domain name, 'hello' for example. * @returns {Promise} Return void promise. */ placeBid(domain: string, amount: Types.Amount): Promise; /** * Renew into canister. * This function uses the actor agent identity. * @param {Types.Number} duration duration of this renew, 1 for 1 year. * @param {string} domain domain name to be renewed, 'hello' for example. * @returns {Promise} Return void promise. */ renew(domain: string, duration: Types.Number): Promise; /** * Claim into canister. * This function uses the actor agent identity. * @param {String} domain domain name to be claimed. * @returns {Promise} Return void promise. */ claim(domain: string): Promise; /** * Withdraw wicp tokens from registrar canister. * This function uses the actor agent identity. * @returns {Promise} Return void promise */ withdraw(): Promise; }