UNPKG

@wuwei-labs/srsly

Version:
64 lines 6.68 kB
"use strict"; /** * PDA (Program Derived Address) derivation utilities * * This module provides helper functions for deriving PDAs across multiple Solana programs: * - SRSLY: Contract, rental, borrower state, and config PDAs * - SAGE: Player profiles, starbase, and faction PDAs * - Antegen: Thread PDAs for automated payments * - Token: Associated Token Account (ATA) derivation * * @module pda */ Object.defineProperty(exports, "__esModule", { value: true }); exports.deriveLookupTable = exports.deriveVault = exports.deriveAssociatedTokenAccount = exports.deriveFiber = exports.deriveContractThread = exports.deriveGameAccounts = exports.deriveStarbasePlayer = exports.deriveStarbase = exports.deriveSagePlayerProfile = exports.deriveProfileFaction = exports.deriveConfig = exports.deriveBorrowerState = exports.deriveRentalAuthority = exports.deriveQueuedRental = exports.deriveActiveRental = exports.deriveContract = exports.getFactionCoordinates = exports.getFactionName = exports.isValidFactionName = exports.ANTEGEN_FIBER_PROGRAM = exports.ANTEGEN_THREAD_PROGRAM = exports.THREAD_SEED = exports.QUEUED_RENTAL_SEED = exports.ACTIVE_RENTAL_SEED = exports.CONFIG_SEED = exports.BORROWER_STATE_SEED = exports.RENTAL_AUTHORITY_SEED = exports.RENTAL_SEED = exports.CONTRACT_SEED = exports.PROFILE_FACTION_SEED = exports.SAGE_PLAYER_PROFILE_SEED = exports.STARBASE_PLAYER_SEED = exports.STARBASE_SEED = exports.FACTION_MAPPING = exports.FACTION_COORDINATES = void 0; // Export constants var constants_1 = require("./constants"); Object.defineProperty(exports, "FACTION_COORDINATES", { enumerable: true, get: function () { return constants_1.FACTION_COORDINATES; } }); Object.defineProperty(exports, "FACTION_MAPPING", { enumerable: true, get: function () { return constants_1.FACTION_MAPPING; } }); Object.defineProperty(exports, "STARBASE_SEED", { enumerable: true, get: function () { return constants_1.STARBASE_SEED; } }); Object.defineProperty(exports, "STARBASE_PLAYER_SEED", { enumerable: true, get: function () { return constants_1.STARBASE_PLAYER_SEED; } }); Object.defineProperty(exports, "SAGE_PLAYER_PROFILE_SEED", { enumerable: true, get: function () { return constants_1.SAGE_PLAYER_PROFILE_SEED; } }); Object.defineProperty(exports, "PROFILE_FACTION_SEED", { enumerable: true, get: function () { return constants_1.PROFILE_FACTION_SEED; } }); Object.defineProperty(exports, "CONTRACT_SEED", { enumerable: true, get: function () { return constants_1.CONTRACT_SEED; } }); Object.defineProperty(exports, "RENTAL_SEED", { enumerable: true, get: function () { return constants_1.RENTAL_SEED; } }); Object.defineProperty(exports, "RENTAL_AUTHORITY_SEED", { enumerable: true, get: function () { return constants_1.RENTAL_AUTHORITY_SEED; } }); Object.defineProperty(exports, "BORROWER_STATE_SEED", { enumerable: true, get: function () { return constants_1.BORROWER_STATE_SEED; } }); Object.defineProperty(exports, "CONFIG_SEED", { enumerable: true, get: function () { return constants_1.CONFIG_SEED; } }); Object.defineProperty(exports, "ACTIVE_RENTAL_SEED", { enumerable: true, get: function () { return constants_1.ACTIVE_RENTAL_SEED; } }); Object.defineProperty(exports, "QUEUED_RENTAL_SEED", { enumerable: true, get: function () { return constants_1.QUEUED_RENTAL_SEED; } }); Object.defineProperty(exports, "THREAD_SEED", { enumerable: true, get: function () { return constants_1.THREAD_SEED; } }); Object.defineProperty(exports, "ANTEGEN_THREAD_PROGRAM", { enumerable: true, get: function () { return constants_1.ANTEGEN_THREAD_PROGRAM; } }); Object.defineProperty(exports, "ANTEGEN_FIBER_PROGRAM", { enumerable: true, get: function () { return constants_1.ANTEGEN_FIBER_PROGRAM; } }); Object.defineProperty(exports, "isValidFactionName", { enumerable: true, get: function () { return constants_1.isValidFactionName; } }); Object.defineProperty(exports, "getFactionName", { enumerable: true, get: function () { return constants_1.getFactionName; } }); Object.defineProperty(exports, "getFactionCoordinates", { enumerable: true, get: function () { return constants_1.getFactionCoordinates; } }); // Export SRSLY program PDAs var srsly_1 = require("./srsly"); Object.defineProperty(exports, "deriveContract", { enumerable: true, get: function () { return srsly_1.deriveContract; } }); Object.defineProperty(exports, "deriveActiveRental", { enumerable: true, get: function () { return srsly_1.deriveActiveRental; } }); Object.defineProperty(exports, "deriveQueuedRental", { enumerable: true, get: function () { return srsly_1.deriveQueuedRental; } }); Object.defineProperty(exports, "deriveRentalAuthority", { enumerable: true, get: function () { return srsly_1.deriveRentalAuthority; } }); Object.defineProperty(exports, "deriveBorrowerState", { enumerable: true, get: function () { return srsly_1.deriveBorrowerState; } }); Object.defineProperty(exports, "deriveConfig", { enumerable: true, get: function () { return srsly_1.deriveConfig; } }); // Export SAGE program PDAs var sage_1 = require("./sage"); Object.defineProperty(exports, "deriveProfileFaction", { enumerable: true, get: function () { return sage_1.deriveProfileFaction; } }); Object.defineProperty(exports, "deriveSagePlayerProfile", { enumerable: true, get: function () { return sage_1.deriveSagePlayerProfile; } }); Object.defineProperty(exports, "deriveStarbase", { enumerable: true, get: function () { return sage_1.deriveStarbase; } }); Object.defineProperty(exports, "deriveStarbasePlayer", { enumerable: true, get: function () { return sage_1.deriveStarbasePlayer; } }); Object.defineProperty(exports, "deriveGameAccounts", { enumerable: true, get: function () { return sage_1.deriveGameAccounts; } }); // Export Antegen thread PDAs var thread_1 = require("./thread"); Object.defineProperty(exports, "deriveContractThread", { enumerable: true, get: function () { return thread_1.deriveContractThread; } }); Object.defineProperty(exports, "deriveFiber", { enumerable: true, get: function () { return thread_1.deriveFiber; } }); // Export token account utilities var token_1 = require("./token"); Object.defineProperty(exports, "deriveAssociatedTokenAccount", { enumerable: true, get: function () { return token_1.deriveAssociatedTokenAccount; } }); // Export Slyvault PDAs var slyvault_1 = require("./slyvault"); Object.defineProperty(exports, "deriveVault", { enumerable: true, get: function () { return slyvault_1.deriveVault; } }); // Export Address Lookup Table utilities var lookupTable_1 = require("./lookupTable"); Object.defineProperty(exports, "deriveLookupTable", { enumerable: true, get: function () { return lookupTable_1.deriveLookupTable; } }); //# sourceMappingURL=index.js.map