import { HYPERLANE_SVM_PROGRAM_BYTES } from '../hyperlane/program-bytes.js';
import { SvmMailboxReader, SvmMailboxWriter } from './mailbox.js';
export class SvmMailboxArtifactManager {
    rpc;
    domainId;
    constructor(rpc, domainId) {
        this.rpc = rpc;
        this.domainId = domainId;
    }
    async readMailbox(address) {
        const reader = this.createReader('mailbox');
        return reader.read(address);
    }
    createReader(_type) {
        return new SvmMailboxReader(this.rpc);
    }
    createWriter(_type, signer) {
        return new SvmMailboxWriter({
            program: { programBytes: HYPERLANE_SVM_PROGRAM_BYTES.mailbox },
            domainId: this.domainId,
        }, this.rpc, signer);
    }
}
//# sourceMappingURL=mailbox-artifact-manager.js.map