"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findLocalTokenPda = findLocalTokenPda;
var tslib_1 = require("tslib");
var kit_1 = require("@solana/kit");
function findLocalTokenPda(seeds_1) {
    return tslib_1.__awaiter(this, arguments, void 0, function (seeds, config) {
        var _a, programAddress;
        if (config === void 0) { config = {}; }
        return tslib_1.__generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    _a = config.programAddress, programAddress = _a === void 0 ? "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe" : _a;
                    return [4, (0, kit_1.getProgramDerivedAddress)({
                            programAddress: programAddress,
                            seeds: [
                                (0, kit_1.getBytesEncoder)().encode(new Uint8Array([108, 111, 99, 97, 108, 95, 116, 111, 107, 101, 110])),
                                (0, kit_1.getAddressEncoder)().encode(seeds.localTokenMint),
                            ],
                        })];
                case 1: return [2, _b.sent()];
            }
        });
    });
}
//# sourceMappingURL=localToken.js.map