///
///
import { Buffer } from "buffer";
import { PublicKey, Connection } from "@solana/web3.js";
export declare const NAME_OFFERS_ID: PublicKey;
export declare class FavouriteDomain {
tag: number;
nameAccount: PublicKey;
static schema: {
struct: {
tag: string;
nameAccount: {
array: {
type: string;
len: number;
};
};
};
};
constructor(obj: {
tag: number;
nameAccount: Uint8Array;
});
/**
* This function can be used to deserialize a Buffer into a FavouriteDomain object
* @param data The buffer to deserialize
* @returns
*/
static deserialize(data: Buffer): FavouriteDomain;
/**
* This function can be used to retrieve and deserialize a favorite domain
* @param connection The Solana RPC connection object
* @param key The favorite account key
* @returns
*/
static retrieve(connection: Connection, key: PublicKey): Promise;
/**
* This function can be used to derive the key of a favorite domain
* @param programId The name offer program ID
* @param owner The owner to retrieve the favorite domain for
* @returns
*/
static getKey(programId: PublicKey, owner: PublicKey): Promise<[PublicKey, number]>;
/**
* This function can be used to derive the key of a favorite domain
* @param programId The name offer program ID
* @param owner The owner to retrieve the favorite domain for
* @returns
*/
static getKeySync(programId: PublicKey, owner: PublicKey): [PublicKey, number];
}
export { FavouriteDomain as PrimaryDomain };
/**
* This function can be used to retrieve the favorite domain of a user
* @param connection The Solana RPC connection object
* @param owner The owner you want to retrieve the favorite domain for
* @returns
*/
export declare const getFavoriteDomain: (connection: Connection, owner: PublicKey) => Promise<{
domain: PublicKey;
reverse: string;
stale: boolean;
}>;
export { getFavoriteDomain as getPrimaryDomain };
/**
* This function can be used to retrieve the favorite domains for multiple wallets, up to a maximum of 100.
* If a wallet does not have a favorite domain, the result will be 'undefined' instead of the human readable domain as a string.
* This function is optimized for network efficiency, making only four RPC calls, three of which are executed in parallel using Promise.all, thereby reducing the overall execution time.
* @param connection The Solana RPC connection object
* @param wallets An array of PublicKeys representing the wallets
* @returns A promise that resolves to an array of strings or undefined, representing the favorite domains or lack thereof for each wallet
*/
export declare const getMultipleFavoriteDomains: (connection: Connection, wallets: PublicKey[]) => Promise<(string | undefined)[]>;
export { getMultipleFavoriteDomains as getMultiplePrimaryDomains };