pyre-world-kit 2.0.12 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.prettierrc.json +6 -0
  2. package/dist/index.d.ts +46 -4
  3. package/dist/index.js +105 -85
  4. package/dist/providers/action.provider.d.ts +46 -0
  5. package/dist/providers/action.provider.js +331 -0
  6. package/dist/providers/intel.provider.d.ts +29 -0
  7. package/dist/providers/intel.provider.js +363 -0
  8. package/dist/providers/mapper.provider.d.ts +197 -0
  9. package/dist/providers/mapper.provider.js +158 -0
  10. package/dist/providers/registry.provider.d.ts +25 -0
  11. package/dist/providers/registry.provider.js +229 -0
  12. package/dist/providers/state.provider.d.ts +42 -0
  13. package/dist/providers/state.provider.js +348 -0
  14. package/dist/pyre_world.json +34 -229
  15. package/dist/types/action.types.d.ts +41 -0
  16. package/dist/types/action.types.js +2 -0
  17. package/dist/types/intel.types.d.ts +20 -0
  18. package/dist/types/intel.types.js +2 -0
  19. package/dist/types/mapper.types.d.ts +27 -0
  20. package/dist/types/mapper.types.js +22 -0
  21. package/dist/types/registry.types.d.ts +0 -0
  22. package/dist/types/registry.types.js +1 -0
  23. package/dist/types/state.types.d.ts +112 -0
  24. package/dist/types/state.types.js +2 -0
  25. package/dist/types.d.ts +8 -24
  26. package/dist/util.d.ts +29 -0
  27. package/dist/util.js +144 -0
  28. package/dist/vanity.d.ts +3 -3
  29. package/dist/vanity.js +18 -15
  30. package/package.json +4 -2
  31. package/readme.md +184 -142
  32. package/src/index.ts +133 -92
  33. package/src/providers/action.provider.ts +443 -0
  34. package/src/providers/intel.provider.ts +383 -0
  35. package/src/providers/mapper.provider.ts +195 -0
  36. package/src/providers/registry.provider.ts +277 -0
  37. package/src/providers/state.provider.ts +357 -0
  38. package/src/pyre_world.json +35 -230
  39. package/src/types/action.types.ts +76 -0
  40. package/src/types/intel.types.ts +22 -0
  41. package/src/types/mapper.types.ts +84 -0
  42. package/src/types/registry.types.ts +0 -0
  43. package/src/types/state.types.ts +144 -0
  44. package/src/types.ts +329 -333
  45. package/src/util.ts +148 -0
  46. package/src/vanity.ts +27 -14
  47. package/tests/test_e2e.ts +339 -172
  48. package/src/actions.ts +0 -719
  49. package/src/intel.ts +0 -521
  50. package/src/mappers.ts +0 -302
  51. package/src/registry.ts +0 -317
  52. package/tests/test_devnet_e2e.ts +0 -401
  53. package/tests/test_sim.ts +0 -458
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "printWidth": 100
6
+ }
package/dist/index.d.ts CHANGED
@@ -5,9 +5,51 @@
5
5
  * This kit translates protocol primitives into faction warfare language
6
6
  * so agents think in factions, not tokens.
7
7
  */
8
- export type { FactionStatus, FactionTier, Strategy, AgentHealth, FactionSummary, FactionDetail, Stronghold, AgentLink, Comms, WarChest, WarLoan, WarLoanWithAgent, Member, FactionListResult, MembersResult, CommsResult, AllWarLoansResult, WarLoanQuote, LaunchFactionParams, JoinFactionParams, DirectJoinFactionParams, DefectParams, MessageFactionParams, FudFactionParams, RallyParams, RequestWarLoanParams, RepayWarLoanParams, SiegeParams, TradeOnDexParams, ClaimSpoilsParams, CreateStrongholdParams, FundStrongholdParams, WithdrawFromStrongholdParams, RecruitAgentParams, ExileAgentParams, CoupParams, WithdrawAssetsParams, AscendParams, RazeParams, TitheParams, ConvertTitheParams, JoinFactionResult, LaunchFactionResult, TransactionResult, EphemeralAgent, SaidVerification, ConfirmResult, FactionSortOption, FactionStatusFilter, FactionListParams, FactionPower, AllianceCluster, RivalFaction, AgentProfile, AgentFactionPosition, WorldEventType, WorldEvent, WorldStats, RegistryProfile, RegistryWalletLink, CheckpointParams, RegisterAgentParams, LinkAgentWalletParams, UnlinkAgentWalletParams, TransferAgentAuthorityParams, } from './types';
9
- export { getFactions, getFaction, getMembers, getComms, getJoinQuote, getDefectQuote, getStronghold, getStrongholdForAgent, getAgentLink, getLinkedAgents, getWarChest, getWarLoan, getAllWarLoans, getMaxWarLoan, blacklistMints, isBlacklistedMint, getBlacklistedMints, launchFaction, joinFaction, directJoinFaction, defect, messageFaction, fudFaction, rally, requestWarLoan, repayWarLoan, tradeOnDex, claimSpoils, createStronghold, fundStronghold, withdrawFromStronghold, recruitAgent, exileAgent, coup, withdrawAssets, siege, ascend, raze, tithe, convertTithe, verifyAgent, confirmAction, createEphemeralAgent, getDexPool, getDexVaults, } from './actions';
10
- export { getFactionPower, getFactionLeaderboard, detectAlliances, getFactionRivals, getAgentProfile, getAgentFactions, getWorldFeed, getWorldStats, getAgentSolLamports, startVaultPnlTracker, } from './intel';
8
+ import { Connection } from '@solana/web3.js';
9
+ import { ActionProvider } from './providers/action.provider';
10
+ import { IntelProvider } from './providers/intel.provider';
11
+ import { RegistryProvider } from './providers/registry.provider';
12
+ import { StateProvider } from './providers/state.provider';
13
+ import type { Action } from './types/action.types';
14
+ import type { Intel } from './types/intel.types';
15
+ import type { CheckpointConfig } from './types/state.types';
16
+ export declare class PyreKit {
17
+ readonly actions: ActionProvider;
18
+ readonly intel: IntelProvider;
19
+ readonly registry: RegistryProvider;
20
+ readonly state: StateProvider;
21
+ constructor(connection: Connection, publicKey: string);
22
+ /** Callback fired when checkpoint interval is reached */
23
+ onCheckpointDue: (() => void) | null;
24
+ /** Configure auto-checkpoint behavior */
25
+ setCheckpointConfig(config: CheckpointConfig): void;
26
+ /**
27
+ * Execute an action with deferred state tracking.
28
+ * On first call, initializes state from chain instead of executing.
29
+ *
30
+ * Returns { result, confirm }. Call confirm() after the transaction
31
+ * is signed and confirmed on-chain. This records the action in state
32
+ * (tick, sentiment, holdings, auto-checkpoint).
33
+ *
34
+ * For read-only methods (getFactions, getComms, etc.), confirm is a no-op.
35
+ */
36
+ exec<T extends 'actions' | 'intel'>(provider: T, method: T extends 'actions' ? keyof Action : keyof Intel, ...args: any[]): Promise<{
37
+ result: any;
38
+ confirm: () => Promise<void>;
39
+ }>;
40
+ /** Map action method names to tracked action types */
41
+ private methodToAction;
42
+ }
43
+ export type { FactionStatus, Strategy, AgentHealth, FactionSummary, FactionDetail, Stronghold, AgentLink, Comms, WarChest, WarLoan, WarLoanWithAgent, Member, FactionListResult, MembersResult, CommsResult, AllWarLoansResult, WarLoanQuote, LaunchFactionParams, JoinFactionParams, DefectParams, MessageFactionParams, FudFactionParams, RallyParams, RequestWarLoanParams, RepayWarLoanParams, SiegeParams, ClaimSpoilsParams, CreateStrongholdParams, FundStrongholdParams, WithdrawFromStrongholdParams, RecruitAgentParams, ExileAgentParams, CoupParams, WithdrawAssetsParams, AscendParams, RazeParams, TitheParams, JoinFactionResult, LaunchFactionResult, TransactionResult, EphemeralAgent, FactionSortOption, FactionStatusFilter, FactionListParams, FactionPower, AllianceCluster, RivalFaction, AgentProfile, AgentFactionPosition, WorldEventType, WorldEvent, WorldStats, RegistryProfile, RegistryWalletLink, CheckpointParams, RegisterAgentParams, LinkAgentWalletParams, UnlinkAgentWalletParams, TransferAgentAuthorityParams, } from './types';
44
+ export type { Action } from './types/action.types';
45
+ export type { Intel } from './types/intel.types';
46
+ export type { Mapper } from './types/mapper.types';
47
+ export type { State, AgentGameState, SerializedGameState, TrackedAction, CheckpointConfig, } from './types/state.types';
48
+ export { ActionProvider } from './providers/action.provider';
49
+ export { IntelProvider } from './providers/intel.provider';
50
+ export { MapperProvider } from './providers/mapper.provider';
51
+ export { StateProvider } from './providers/state.provider';
52
+ export { RegistryProvider, REGISTRY_PROGRAM_ID, getAgentProfilePda, getAgentWalletLinkPda, } from './providers/registry.provider';
53
+ export { blacklistMints, isBlacklistedMint, getBlacklistedMints, createEphemeralAgent, getDexPool, getDexVaults, startVaultPnlTracker, } from './util';
11
54
  export { isPyreMint, grindPyreMint } from './vanity';
12
- export { REGISTRY_PROGRAM_ID, getAgentProfilePda, getAgentWalletLinkPda, getRegistryProfile, getRegistryWalletLink, buildRegisterAgentTransaction, buildCheckpointTransaction, buildLinkAgentWalletTransaction, buildUnlinkAgentWalletTransaction, buildTransferAgentAuthorityTransaction, } from './registry';
13
55
  export { PROGRAM_ID, LAMPORTS_PER_SOL, TOKEN_MULTIPLIER, TOTAL_SUPPLY } from 'torchsdk';
package/dist/index.js CHANGED
@@ -7,94 +7,114 @@
7
7
  * so agents think in factions, not tokens.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getAgentProfile = exports.getFactionRivals = exports.detectAlliances = exports.getFactionLeaderboard = exports.getFactionPower = exports.getDexVaults = exports.getDexPool = exports.createEphemeralAgent = exports.confirmAction = exports.verifyAgent = exports.convertTithe = exports.tithe = exports.raze = exports.ascend = exports.siege = exports.withdrawAssets = exports.coup = exports.exileAgent = exports.recruitAgent = exports.withdrawFromStronghold = exports.fundStronghold = exports.createStronghold = exports.claimSpoils = exports.tradeOnDex = exports.repayWarLoan = exports.requestWarLoan = exports.rally = exports.fudFaction = exports.messageFaction = exports.defect = exports.directJoinFaction = exports.joinFaction = exports.launchFaction = exports.getBlacklistedMints = exports.isBlacklistedMint = exports.blacklistMints = exports.getMaxWarLoan = exports.getAllWarLoans = exports.getWarLoan = exports.getWarChest = exports.getLinkedAgents = exports.getAgentLink = exports.getStrongholdForAgent = exports.getStronghold = exports.getDefectQuote = exports.getJoinQuote = exports.getComms = exports.getMembers = exports.getFaction = exports.getFactions = void 0;
11
- exports.TOTAL_SUPPLY = exports.TOKEN_MULTIPLIER = exports.LAMPORTS_PER_SOL = exports.PROGRAM_ID = exports.buildTransferAgentAuthorityTransaction = exports.buildUnlinkAgentWalletTransaction = exports.buildLinkAgentWalletTransaction = exports.buildCheckpointTransaction = exports.buildRegisterAgentTransaction = exports.getRegistryWalletLink = exports.getRegistryProfile = exports.getAgentWalletLinkPda = exports.getAgentProfilePda = exports.REGISTRY_PROGRAM_ID = exports.grindPyreMint = exports.isPyreMint = exports.startVaultPnlTracker = exports.getAgentSolLamports = exports.getWorldStats = exports.getWorldFeed = exports.getAgentFactions = void 0;
12
- // ─── Actions ───────────────────────────────────────────────────────
13
- var actions_1 = require("./actions");
14
- // Read operations
15
- Object.defineProperty(exports, "getFactions", { enumerable: true, get: function () { return actions_1.getFactions; } });
16
- Object.defineProperty(exports, "getFaction", { enumerable: true, get: function () { return actions_1.getFaction; } });
17
- Object.defineProperty(exports, "getMembers", { enumerable: true, get: function () { return actions_1.getMembers; } });
18
- Object.defineProperty(exports, "getComms", { enumerable: true, get: function () { return actions_1.getComms; } });
19
- Object.defineProperty(exports, "getJoinQuote", { enumerable: true, get: function () { return actions_1.getJoinQuote; } });
20
- Object.defineProperty(exports, "getDefectQuote", { enumerable: true, get: function () { return actions_1.getDefectQuote; } });
21
- Object.defineProperty(exports, "getStronghold", { enumerable: true, get: function () { return actions_1.getStronghold; } });
22
- Object.defineProperty(exports, "getStrongholdForAgent", { enumerable: true, get: function () { return actions_1.getStrongholdForAgent; } });
23
- Object.defineProperty(exports, "getAgentLink", { enumerable: true, get: function () { return actions_1.getAgentLink; } });
24
- Object.defineProperty(exports, "getLinkedAgents", { enumerable: true, get: function () { return actions_1.getLinkedAgents; } });
25
- Object.defineProperty(exports, "getWarChest", { enumerable: true, get: function () { return actions_1.getWarChest; } });
26
- Object.defineProperty(exports, "getWarLoan", { enumerable: true, get: function () { return actions_1.getWarLoan; } });
27
- Object.defineProperty(exports, "getAllWarLoans", { enumerable: true, get: function () { return actions_1.getAllWarLoans; } });
28
- Object.defineProperty(exports, "getMaxWarLoan", { enumerable: true, get: function () { return actions_1.getMaxWarLoan; } });
29
- // Blacklist
30
- Object.defineProperty(exports, "blacklistMints", { enumerable: true, get: function () { return actions_1.blacklistMints; } });
31
- Object.defineProperty(exports, "isBlacklistedMint", { enumerable: true, get: function () { return actions_1.isBlacklistedMint; } });
32
- Object.defineProperty(exports, "getBlacklistedMints", { enumerable: true, get: function () { return actions_1.getBlacklistedMints; } });
33
- // Faction operations
34
- Object.defineProperty(exports, "launchFaction", { enumerable: true, get: function () { return actions_1.launchFaction; } });
35
- Object.defineProperty(exports, "joinFaction", { enumerable: true, get: function () { return actions_1.joinFaction; } });
36
- Object.defineProperty(exports, "directJoinFaction", { enumerable: true, get: function () { return actions_1.directJoinFaction; } });
37
- Object.defineProperty(exports, "defect", { enumerable: true, get: function () { return actions_1.defect; } });
38
- Object.defineProperty(exports, "messageFaction", { enumerable: true, get: function () { return actions_1.messageFaction; } });
39
- Object.defineProperty(exports, "fudFaction", { enumerable: true, get: function () { return actions_1.fudFaction; } });
40
- Object.defineProperty(exports, "rally", { enumerable: true, get: function () { return actions_1.rally; } });
41
- Object.defineProperty(exports, "requestWarLoan", { enumerable: true, get: function () { return actions_1.requestWarLoan; } });
42
- Object.defineProperty(exports, "repayWarLoan", { enumerable: true, get: function () { return actions_1.repayWarLoan; } });
43
- Object.defineProperty(exports, "tradeOnDex", { enumerable: true, get: function () { return actions_1.tradeOnDex; } });
44
- Object.defineProperty(exports, "claimSpoils", { enumerable: true, get: function () { return actions_1.claimSpoils; } });
45
- // Stronghold operations
46
- Object.defineProperty(exports, "createStronghold", { enumerable: true, get: function () { return actions_1.createStronghold; } });
47
- Object.defineProperty(exports, "fundStronghold", { enumerable: true, get: function () { return actions_1.fundStronghold; } });
48
- Object.defineProperty(exports, "withdrawFromStronghold", { enumerable: true, get: function () { return actions_1.withdrawFromStronghold; } });
49
- Object.defineProperty(exports, "recruitAgent", { enumerable: true, get: function () { return actions_1.recruitAgent; } });
50
- Object.defineProperty(exports, "exileAgent", { enumerable: true, get: function () { return actions_1.exileAgent; } });
51
- Object.defineProperty(exports, "coup", { enumerable: true, get: function () { return actions_1.coup; } });
52
- Object.defineProperty(exports, "withdrawAssets", { enumerable: true, get: function () { return actions_1.withdrawAssets; } });
53
- // Permissionless operations
54
- Object.defineProperty(exports, "siege", { enumerable: true, get: function () { return actions_1.siege; } });
55
- Object.defineProperty(exports, "ascend", { enumerable: true, get: function () { return actions_1.ascend; } });
56
- Object.defineProperty(exports, "raze", { enumerable: true, get: function () { return actions_1.raze; } });
57
- Object.defineProperty(exports, "tithe", { enumerable: true, get: function () { return actions_1.tithe; } });
58
- Object.defineProperty(exports, "convertTithe", { enumerable: true, get: function () { return actions_1.convertTithe; } });
59
- // SAID operations
60
- Object.defineProperty(exports, "verifyAgent", { enumerable: true, get: function () { return actions_1.verifyAgent; } });
61
- Object.defineProperty(exports, "confirmAction", { enumerable: true, get: function () { return actions_1.confirmAction; } });
62
- // Utility
63
- Object.defineProperty(exports, "createEphemeralAgent", { enumerable: true, get: function () { return actions_1.createEphemeralAgent; } });
64
- Object.defineProperty(exports, "getDexPool", { enumerable: true, get: function () { return actions_1.getDexPool; } });
65
- Object.defineProperty(exports, "getDexVaults", { enumerable: true, get: function () { return actions_1.getDexVaults; } });
66
- // ─── Intel ─────────────────────────────────────────────────────────
67
- var intel_1 = require("./intel");
68
- Object.defineProperty(exports, "getFactionPower", { enumerable: true, get: function () { return intel_1.getFactionPower; } });
69
- Object.defineProperty(exports, "getFactionLeaderboard", { enumerable: true, get: function () { return intel_1.getFactionLeaderboard; } });
70
- Object.defineProperty(exports, "detectAlliances", { enumerable: true, get: function () { return intel_1.detectAlliances; } });
71
- Object.defineProperty(exports, "getFactionRivals", { enumerable: true, get: function () { return intel_1.getFactionRivals; } });
72
- Object.defineProperty(exports, "getAgentProfile", { enumerable: true, get: function () { return intel_1.getAgentProfile; } });
73
- Object.defineProperty(exports, "getAgentFactions", { enumerable: true, get: function () { return intel_1.getAgentFactions; } });
74
- Object.defineProperty(exports, "getWorldFeed", { enumerable: true, get: function () { return intel_1.getWorldFeed; } });
75
- Object.defineProperty(exports, "getWorldStats", { enumerable: true, get: function () { return intel_1.getWorldStats; } });
76
- Object.defineProperty(exports, "getAgentSolLamports", { enumerable: true, get: function () { return intel_1.getAgentSolLamports; } });
77
- Object.defineProperty(exports, "startVaultPnlTracker", { enumerable: true, get: function () { return intel_1.startVaultPnlTracker; } });
78
- // ─── Vanity ─────────────────────────────────────────────────────────
10
+ exports.TOTAL_SUPPLY = exports.TOKEN_MULTIPLIER = exports.LAMPORTS_PER_SOL = exports.PROGRAM_ID = exports.grindPyreMint = exports.isPyreMint = exports.startVaultPnlTracker = exports.getDexVaults = exports.getDexPool = exports.createEphemeralAgent = exports.getBlacklistedMints = exports.isBlacklistedMint = exports.blacklistMints = exports.getAgentWalletLinkPda = exports.getAgentProfilePda = exports.REGISTRY_PROGRAM_ID = exports.RegistryProvider = exports.StateProvider = exports.MapperProvider = exports.IntelProvider = exports.ActionProvider = exports.PyreKit = void 0;
11
+ const action_provider_1 = require("./providers/action.provider");
12
+ const intel_provider_1 = require("./providers/intel.provider");
13
+ const registry_provider_1 = require("./providers/registry.provider");
14
+ const state_provider_1 = require("./providers/state.provider");
15
+ // ─── Top-level Kit ────────────────────────────────────────────────
16
+ class PyreKit {
17
+ actions;
18
+ intel;
19
+ registry;
20
+ state;
21
+ constructor(connection, publicKey) {
22
+ this.registry = new registry_provider_1.RegistryProvider(connection);
23
+ this.state = new state_provider_1.StateProvider(connection, publicKey, this.registry);
24
+ this.actions = new action_provider_1.ActionProvider(connection);
25
+ this.intel = new intel_provider_1.IntelProvider(connection, this.actions);
26
+ // Wire auto-checkpoint callback
27
+ this.state.onCheckpointDue = () => this.onCheckpointDue?.();
28
+ }
29
+ /** Callback fired when checkpoint interval is reached */
30
+ onCheckpointDue = null;
31
+ /** Configure auto-checkpoint behavior */
32
+ setCheckpointConfig(config) {
33
+ this.state.setCheckpointConfig(config);
34
+ }
35
+ /**
36
+ * Execute an action with deferred state tracking.
37
+ * On first call, initializes state from chain instead of executing.
38
+ *
39
+ * Returns { result, confirm }. Call confirm() after the transaction
40
+ * is signed and confirmed on-chain. This records the action in state
41
+ * (tick, sentiment, holdings, auto-checkpoint).
42
+ *
43
+ * For read-only methods (getFactions, getComms, etc.), confirm is a no-op.
44
+ */
45
+ async exec(provider, method, ...args) {
46
+ // First exec: initialize state
47
+ if (!this.state.initialized) {
48
+ await this.state.init();
49
+ return { result: null, confirm: async () => { } };
50
+ }
51
+ const target = provider === 'actions' ? this.actions : this.intel;
52
+ const fn = target[method];
53
+ if (typeof fn !== 'function')
54
+ throw new Error(`Unknown method: ${provider}.${String(method)}`);
55
+ const result = await fn.call(target, ...args);
56
+ // Build confirm callback for state-mutating actions
57
+ const trackedAction = provider === 'actions' ? this.methodToAction(method) : null;
58
+ const confirm = trackedAction
59
+ ? async () => {
60
+ const mint = args[0]?.mint;
61
+ const message = args[0]?.message;
62
+ const description = message
63
+ ? `${trackedAction} ${mint?.slice(0, 8) ?? '?'} "${message}"`
64
+ : `${trackedAction} ${mint?.slice(0, 8) ?? '?'}`;
65
+ await this.state.record(trackedAction, mint, description);
66
+ }
67
+ : async () => { }; // no-op for reads
68
+ return { result, confirm };
69
+ }
70
+ /** Map action method names to tracked action types */
71
+ methodToAction(method) {
72
+ const map = {
73
+ join: 'join',
74
+ defect: 'defect',
75
+ rally: 'rally',
76
+ launch: 'launch',
77
+ message: 'message',
78
+ fud: 'fud',
79
+ requestWarLoan: 'war_loan',
80
+ repayWarLoan: 'repay_loan',
81
+ siege: 'siege',
82
+ ascend: 'ascend',
83
+ raze: 'raze',
84
+ tithe: 'tithe',
85
+ };
86
+ return map[method] ?? null;
87
+ }
88
+ }
89
+ exports.PyreKit = PyreKit;
90
+ // ─── Providers ────────────────────────────────────────────────────
91
+ var action_provider_2 = require("./providers/action.provider");
92
+ Object.defineProperty(exports, "ActionProvider", { enumerable: true, get: function () { return action_provider_2.ActionProvider; } });
93
+ var intel_provider_2 = require("./providers/intel.provider");
94
+ Object.defineProperty(exports, "IntelProvider", { enumerable: true, get: function () { return intel_provider_2.IntelProvider; } });
95
+ var mapper_provider_1 = require("./providers/mapper.provider");
96
+ Object.defineProperty(exports, "MapperProvider", { enumerable: true, get: function () { return mapper_provider_1.MapperProvider; } });
97
+ var state_provider_2 = require("./providers/state.provider");
98
+ Object.defineProperty(exports, "StateProvider", { enumerable: true, get: function () { return state_provider_2.StateProvider; } });
99
+ var registry_provider_2 = require("./providers/registry.provider");
100
+ Object.defineProperty(exports, "RegistryProvider", { enumerable: true, get: function () { return registry_provider_2.RegistryProvider; } });
101
+ Object.defineProperty(exports, "REGISTRY_PROGRAM_ID", { enumerable: true, get: function () { return registry_provider_2.REGISTRY_PROGRAM_ID; } });
102
+ Object.defineProperty(exports, "getAgentProfilePda", { enumerable: true, get: function () { return registry_provider_2.getAgentProfilePda; } });
103
+ Object.defineProperty(exports, "getAgentWalletLinkPda", { enumerable: true, get: function () { return registry_provider_2.getAgentWalletLinkPda; } });
104
+ // ─── Utilities ────────────────────────────────────────────────────
105
+ var util_1 = require("./util");
106
+ Object.defineProperty(exports, "blacklistMints", { enumerable: true, get: function () { return util_1.blacklistMints; } });
107
+ Object.defineProperty(exports, "isBlacklistedMint", { enumerable: true, get: function () { return util_1.isBlacklistedMint; } });
108
+ Object.defineProperty(exports, "getBlacklistedMints", { enumerable: true, get: function () { return util_1.getBlacklistedMints; } });
109
+ Object.defineProperty(exports, "createEphemeralAgent", { enumerable: true, get: function () { return util_1.createEphemeralAgent; } });
110
+ Object.defineProperty(exports, "getDexPool", { enumerable: true, get: function () { return util_1.getDexPool; } });
111
+ Object.defineProperty(exports, "getDexVaults", { enumerable: true, get: function () { return util_1.getDexVaults; } });
112
+ Object.defineProperty(exports, "startVaultPnlTracker", { enumerable: true, get: function () { return util_1.startVaultPnlTracker; } });
113
+ // ─── Vanity ───────────────────────────────────────────────────────
79
114
  var vanity_1 = require("./vanity");
80
115
  Object.defineProperty(exports, "isPyreMint", { enumerable: true, get: function () { return vanity_1.isPyreMint; } });
81
116
  Object.defineProperty(exports, "grindPyreMint", { enumerable: true, get: function () { return vanity_1.grindPyreMint; } });
82
- // ─── Registry (pyre_world on-chain agent identity) ──────────────────
83
- var registry_1 = require("./registry");
84
- // Program ID & PDA helpers
85
- Object.defineProperty(exports, "REGISTRY_PROGRAM_ID", { enumerable: true, get: function () { return registry_1.REGISTRY_PROGRAM_ID; } });
86
- Object.defineProperty(exports, "getAgentProfilePda", { enumerable: true, get: function () { return registry_1.getAgentProfilePda; } });
87
- Object.defineProperty(exports, "getAgentWalletLinkPda", { enumerable: true, get: function () { return registry_1.getAgentWalletLinkPda; } });
88
- // Read operations
89
- Object.defineProperty(exports, "getRegistryProfile", { enumerable: true, get: function () { return registry_1.getRegistryProfile; } });
90
- Object.defineProperty(exports, "getRegistryWalletLink", { enumerable: true, get: function () { return registry_1.getRegistryWalletLink; } });
91
- // Transaction builders
92
- Object.defineProperty(exports, "buildRegisterAgentTransaction", { enumerable: true, get: function () { return registry_1.buildRegisterAgentTransaction; } });
93
- Object.defineProperty(exports, "buildCheckpointTransaction", { enumerable: true, get: function () { return registry_1.buildCheckpointTransaction; } });
94
- Object.defineProperty(exports, "buildLinkAgentWalletTransaction", { enumerable: true, get: function () { return registry_1.buildLinkAgentWalletTransaction; } });
95
- Object.defineProperty(exports, "buildUnlinkAgentWalletTransaction", { enumerable: true, get: function () { return registry_1.buildUnlinkAgentWalletTransaction; } });
96
- Object.defineProperty(exports, "buildTransferAgentAuthorityTransaction", { enumerable: true, get: function () { return registry_1.buildTransferAgentAuthorityTransaction; } });
97
- // ─── Re-export torchsdk constants for convenience ──────────────────
117
+ // ─── Re-export torchsdk constants for convenience ─────────────────
98
118
  var torchsdk_1 = require("torchsdk");
99
119
  Object.defineProperty(exports, "PROGRAM_ID", { enumerable: true, get: function () { return torchsdk_1.PROGRAM_ID; } });
100
120
  Object.defineProperty(exports, "LAMPORTS_PER_SOL", { enumerable: true, get: function () { return torchsdk_1.LAMPORTS_PER_SOL; } });
@@ -0,0 +1,46 @@
1
+ import { Connection } from '@solana/web3.js';
2
+ import { Action } from '../types/action.types';
3
+ import { BuyQuoteResult, SellQuoteResult, TransactionResult } from 'torchsdk';
4
+ import { AgentLink, AllWarLoansResult, AscendParams, ClaimSpoilsParams, CommsResult, CoupParams, CreateStrongholdParams, DefectParams, ExileAgentParams, FactionDetail, FactionListParams, FactionListResult, FactionStatus, FudFactionParams, FundStrongholdParams, JoinFactionParams, JoinFactionResult, LaunchFactionParams, LaunchFactionResult, MembersResult, MessageFactionParams, RallyParams, RazeParams, RecruitAgentParams, RepayWarLoanParams, RequestWarLoanParams, SiegeParams, Stronghold, TitheParams, WarChest, WarLoan, WarLoanQuote, WithdrawAssetsParams, WithdrawFromStrongholdParams } from '../types';
5
+ export declare class ActionProvider implements Action {
6
+ private connection;
7
+ private mapper;
8
+ constructor(connection: Connection);
9
+ createStronghold(params: CreateStrongholdParams): Promise<TransactionResult>;
10
+ coup(params: CoupParams): Promise<TransactionResult>;
11
+ exileAgent(params: ExileAgentParams): Promise<TransactionResult>;
12
+ fundStronghold(params: FundStrongholdParams): Promise<TransactionResult>;
13
+ recruitAgent(params: RecruitAgentParams): Promise<TransactionResult>;
14
+ withdrawAssets(params: WithdrawAssetsParams): Promise<TransactionResult>;
15
+ withdrawFromStronghold(params: WithdrawFromStrongholdParams): Promise<TransactionResult>;
16
+ getAgentLink(wallet: string): Promise<AgentLink | undefined>;
17
+ getComms(mint: string, { limit, status }: {
18
+ limit?: number;
19
+ status?: FactionStatus;
20
+ }): Promise<CommsResult>;
21
+ getDefectQuote(mint: string, amountTokens: number): Promise<SellQuoteResult>;
22
+ getJoinQuote(mint: string, amountSolLamports: number): Promise<BuyQuoteResult>;
23
+ getFaction(mint: string): Promise<FactionDetail>;
24
+ getFactions(params?: FactionListParams): Promise<FactionListResult>;
25
+ getLinkedAgents(vaultAddress: string): Promise<AgentLink[]>;
26
+ getMembers(mint: string, limit?: number): Promise<MembersResult>;
27
+ getStronghold(creator: string): Promise<Stronghold | undefined>;
28
+ getStrongholdForAgent(wallet: string): Promise<Stronghold | undefined>;
29
+ getWarChest(mint: string): Promise<WarChest>;
30
+ getWarLoan(mint: string, wallet: string): Promise<WarLoan>;
31
+ getWarLoanQuote(mint: string, collateralAmount: number): Promise<WarLoanQuote>;
32
+ getWarLoansForFaction(mint: string): Promise<AllWarLoansResult>;
33
+ ascend(params: AscendParams): Promise<TransactionResult>;
34
+ claimSpoils(params: ClaimSpoilsParams): Promise<TransactionResult>;
35
+ defect(params: DefectParams): Promise<TransactionResult>;
36
+ fud(params: FudFactionParams): Promise<TransactionResult>;
37
+ join(params: JoinFactionParams): Promise<JoinFactionResult>;
38
+ launch(params: LaunchFactionParams): Promise<LaunchFactionResult>;
39
+ message(params: MessageFactionParams): Promise<TransactionResult>;
40
+ rally(params: RallyParams): Promise<TransactionResult>;
41
+ raze(params: RazeParams): Promise<TransactionResult>;
42
+ repayWarLoan(params: RepayWarLoanParams): Promise<TransactionResult>;
43
+ requestWarLoan(params: RequestWarLoanParams): Promise<TransactionResult>;
44
+ siege(params: SiegeParams): Promise<TransactionResult>;
45
+ tithe(params: TitheParams): Promise<TransactionResult>;
46
+ }