import { Pda } from '../../types';
/**
 * This client allows you to build PDAs related to the Token module.
 *
 * @see {@link TokenClient}
 * @group Module Pdas
 */
export class TokenPdasClient {
    constructor(metaplex) {
        this.metaplex = metaplex;
    }
    /** Finds the address of the Associated Token Account. */
    associatedTokenAccount({ mint, owner, programs, }) {
        const tokenProgram = this.metaplex.programs().getToken(programs);
        const associatedTokenProgram = this.metaplex
            .programs()
            .getAssociatedToken(programs);
        return Pda.find(associatedTokenProgram.address, [
            owner.toBuffer(),
            tokenProgram.address.toBuffer(),
            mint.toBuffer(),
        ]);
    }
}
//# sourceMappingURL=TokenPdasClient.js.map