import { AccountRole } from '@solana/kit';
export function readonlyAccount(address) {
    return { address, role: AccountRole.READONLY };
}
export function writableAccount(address) {
    return { address, role: AccountRole.WRITABLE };
}
export function readonlySigner(signer) {
    return { address: signer.address, role: AccountRole.READONLY_SIGNER, signer };
}
/**
 * Marks an address as a required readonly signer without embedding a keypair.
 * Use this for update instructions where signing is deferred to the caller.
 */
export function readonlySignerAddress(address) {
    return { address, role: AccountRole.READONLY_SIGNER };
}
/**
 * Marks an address as a required writable signer without embedding a keypair.
 * Use this when the account must both sign and be mutated, but the keypair is
 * managed by the caller (e.g. the transaction payer for a SOL transfer).
 */
export function writableSignerAddress(address) {
    return { address, role: AccountRole.WRITABLE_SIGNER };
}
export function writableSigner(signer) {
    return { address: signer.address, role: AccountRole.WRITABLE_SIGNER, signer };
}
export function buildInstruction(programAddress, accounts, data) {
    return {
        programAddress,
        accounts,
        data,
    };
}
//# sourceMappingURL=utils.js.map