import { PublicKey } from '@solana/web3.js';
import { Program } from '@project-serum/anchor';
import { utils } from '@wormhole-foundation/connect-sdk-solana';
import { idl } from '../';
export function createTokenMessengerProgramInterface(programId, provider) {
    return new Program(idl.TokenMessengerIdl, new PublicKey(programId), provider === undefined ? { connection: null } : provider);
}
export function createReadOnlyTokenMessengerProgramInterface(programId, connection) {
    return createTokenMessengerProgramInterface(programId, utils.createReadOnlyProvider(connection));
}
export function createMessageTransmitterProgramInterface(programId, provider) {
    return new Program(idl.MessageTransmitterIdl, new PublicKey(programId), provider === undefined ? { connection: null } : provider);
}
export function createReadOnlyMessageTransmitterProgramInterface(programId, connection) {
    return createMessageTransmitterProgramInterface(programId, utils.createReadOnlyProvider(connection));
}
//# sourceMappingURL=program.js.map