"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deriveTokenTransferMessageAddress = void 0;
const connect_sdk_solana_1 = require("@wormhole-foundation/connect-sdk-solana");
const web3_js_1 = require("@solana/web3.js");
const connect_sdk_1 = require("@wormhole-foundation/connect-sdk");
function deriveTokenTransferMessageAddress(programId, payer, sequence) {
    return connect_sdk_solana_1.utils.deriveAddress([
        Buffer.from('bridged'),
        new web3_js_1.PublicKey(payer).toBuffer(),
        Buffer.from(connect_sdk_1.encoding.bignum.toBytes(BigInt(sequence.toString()), 8)),
    ], programId);
}
exports.deriveTokenTransferMessageAddress = deriveTokenTransferMessageAddress;
//# sourceMappingURL=tokenTransferMessage.js.map