pyre-world-kit 1.0.10 → 1.0.12
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.
- package/dist/actions.d.ts +5 -1
- package/dist/actions.js +73 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -2
- package/dist/types.d.ts +16 -0
- package/package.json +1 -1
- package/src/actions.ts +82 -1
- package/src/index.ts +4 -0
- package/src/types.ts +18 -0
package/dist/actions.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Connection, PublicKey } from '@solana/web3.js';
|
|
8
8
|
import type { BuyQuoteResult, SellQuoteResult, TransactionResult, SaidVerification, ConfirmResult } from 'torchsdk';
|
|
9
|
-
import type { FactionListParams, FactionListResult, FactionDetail, MembersResult, CommsResult, Stronghold, AgentLink, WarChest, WarLoan, WarLoanQuote, AllWarLoansResult, LaunchFactionParams, JoinFactionParams, DirectJoinFactionParams, DefectParams, RallyParams, RequestWarLoanParams, RepayWarLoanParams, SiegeParams, TradeOnDexParams, ClaimSpoilsParams, CreateStrongholdParams, FundStrongholdParams, WithdrawFromStrongholdParams, RecruitAgentParams, ExileAgentParams, CoupParams, WithdrawAssetsParams, AscendParams, RazeParams, TitheParams, ConvertTitheParams, JoinFactionResult, LaunchFactionResult } from './types';
|
|
9
|
+
import type { FactionListParams, FactionListResult, FactionDetail, MembersResult, CommsResult, Stronghold, AgentLink, WarChest, WarLoan, WarLoanQuote, AllWarLoansResult, 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 } from './types';
|
|
10
10
|
/** Add mints to the blacklist (call at startup with old mints) */
|
|
11
11
|
export declare function blacklistMints(mints: string[]): void;
|
|
12
12
|
/** Check if a mint is blacklisted */
|
|
@@ -57,6 +57,10 @@ export declare function joinFaction(connection: Connection, params: JoinFactionP
|
|
|
57
57
|
export declare function directJoinFaction(connection: Connection, params: DirectJoinFactionParams): Promise<JoinFactionResult>;
|
|
58
58
|
/** Defect from a faction (sell tokens) */
|
|
59
59
|
export declare function defect(connection: Connection, params: DefectParams): Promise<TransactionResult>;
|
|
60
|
+
/** "Said in" — micro buy (0.001 SOL) + message. Routes through bonding curve or DEX automatically. */
|
|
61
|
+
export declare function messageFaction(connection: Connection, params: MessageFactionParams): Promise<TransactionResult>;
|
|
62
|
+
/** "Argued in" — micro sell (100 tokens) + negative message. Routes through bonding curve or DEX automatically. */
|
|
63
|
+
export declare function fudFaction(connection: Connection, params: FudFactionParams): Promise<TransactionResult>;
|
|
60
64
|
/** Rally support for a faction (star) */
|
|
61
65
|
export declare function rally(connection: Connection, params: RallyParams): Promise<TransactionResult>;
|
|
62
66
|
/** Request a war loan (borrow SOL against token collateral) */
|
package/dist/actions.js
CHANGED
|
@@ -30,6 +30,8 @@ exports.launchFaction = launchFaction;
|
|
|
30
30
|
exports.joinFaction = joinFaction;
|
|
31
31
|
exports.directJoinFaction = directJoinFaction;
|
|
32
32
|
exports.defect = defect;
|
|
33
|
+
exports.messageFaction = messageFaction;
|
|
34
|
+
exports.fudFaction = fudFaction;
|
|
33
35
|
exports.rally = rally;
|
|
34
36
|
exports.requestWarLoan = requestWarLoan;
|
|
35
37
|
exports.repayWarLoan = repayWarLoan;
|
|
@@ -59,7 +61,32 @@ const vanity_1 = require("./vanity");
|
|
|
59
61
|
// ─── Blacklist ──────────────────────────────────────────────────────
|
|
60
62
|
// Mints from previous swarm runs. Agents should skip these and only
|
|
61
63
|
// interact with freshly launched factions.
|
|
62
|
-
const
|
|
64
|
+
const DEFAULT_BLACKLIST = [
|
|
65
|
+
'E1SgYPW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DmwgcVHoJxKeRiij5LtedY9LWDpqoqa3hGfUyVgBkgpy', 'GUGz1Em5KZ57aKFqEBSd4Y4Vb6WxBd3H2b16fPCC6upy',
|
|
87
|
+
'6ZWY3Bau5zw1j7vMQQ1czSw4rjBJrExHQ8Renor2vLpy',
|
|
88
|
+
];
|
|
89
|
+
const BLACKLISTED_MINTS = new Set(DEFAULT_BLACKLIST);
|
|
63
90
|
/** Add mints to the blacklist (call at startup with old mints) */
|
|
64
91
|
function blacklistMints(mints) {
|
|
65
92
|
for (const m of mints)
|
|
@@ -308,6 +335,51 @@ async function defect(connection, params) {
|
|
|
308
335
|
vault: params.stronghold,
|
|
309
336
|
});
|
|
310
337
|
}
|
|
338
|
+
/** "Said in" — micro buy (0.001 SOL) + message. Routes through bonding curve or DEX automatically. */
|
|
339
|
+
async function messageFaction(connection, params) {
|
|
340
|
+
const MICRO_BUY_LAMPORTS = 1_000; // 0.001 SOL
|
|
341
|
+
if (params.ascended) {
|
|
342
|
+
return (0, torchsdk_1.buildVaultSwapTransaction)(connection, {
|
|
343
|
+
mint: params.mint,
|
|
344
|
+
signer: params.agent,
|
|
345
|
+
vault_creator: params.stronghold,
|
|
346
|
+
amount_in: MICRO_BUY_LAMPORTS,
|
|
347
|
+
minimum_amount_out: 1,
|
|
348
|
+
is_buy: true,
|
|
349
|
+
message: params.message,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
const result = await (0, torchsdk_1.buildBuyTransaction)(connection, {
|
|
353
|
+
mint: params.mint,
|
|
354
|
+
buyer: params.agent,
|
|
355
|
+
amount_sol: MICRO_BUY_LAMPORTS,
|
|
356
|
+
message: params.message,
|
|
357
|
+
vault: params.stronghold,
|
|
358
|
+
});
|
|
359
|
+
return (0, mappers_1.mapBuyResult)(result);
|
|
360
|
+
}
|
|
361
|
+
/** "Argued in" — micro sell (100 tokens) + negative message. Routes through bonding curve or DEX automatically. */
|
|
362
|
+
async function fudFaction(connection, params) {
|
|
363
|
+
const MICRO_SELL_TOKENS = 100;
|
|
364
|
+
if (params.ascended) {
|
|
365
|
+
return (0, torchsdk_1.buildVaultSwapTransaction)(connection, {
|
|
366
|
+
mint: params.mint,
|
|
367
|
+
signer: params.agent,
|
|
368
|
+
vault_creator: params.stronghold,
|
|
369
|
+
amount_in: MICRO_SELL_TOKENS,
|
|
370
|
+
minimum_amount_out: 1,
|
|
371
|
+
is_buy: false,
|
|
372
|
+
message: params.message,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
return (0, torchsdk_1.buildSellTransaction)(connection, {
|
|
376
|
+
mint: params.mint,
|
|
377
|
+
seller: params.agent,
|
|
378
|
+
amount_tokens: MICRO_SELL_TOKENS,
|
|
379
|
+
message: params.message,
|
|
380
|
+
vault: params.stronghold,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
311
383
|
/** Rally support for a faction (star) */
|
|
312
384
|
async function rally(connection, params) {
|
|
313
385
|
return (0, torchsdk_1.buildStarTransaction)(connection, {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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, 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, } from './types';
|
|
9
|
-
export { getFactions, getFaction, getMembers, getComms, getJoinQuote, getDefectQuote, getStronghold, getStrongholdForAgent, getAgentLink, getWarChest, getWarLoan, getAllWarLoans, getMaxWarLoan, blacklistMints, isBlacklistedMint, getBlacklistedMints, launchFaction, joinFaction, directJoinFaction, defect, rally, requestWarLoan, repayWarLoan, tradeOnDex, claimSpoils, createStronghold, fundStronghold, withdrawFromStronghold, recruitAgent, exileAgent, coup, withdrawAssets, siege, ascend, raze, tithe, convertTithe, verifyAgent, confirmAction, createEphemeralAgent, getDexPool, getDexVaults, } from './actions';
|
|
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, } from './types';
|
|
9
|
+
export { getFactions, getFaction, getMembers, getComms, getJoinQuote, getDefectQuote, getStronghold, getStrongholdForAgent, getAgentLink, 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
10
|
export { getFactionPower, getFactionLeaderboard, detectAlliances, getFactionRivals, getAgentProfile, getAgentFactions, getWorldFeed, getWorldStats, } from './intel';
|
|
11
11
|
export { isPyreMint, grindPyreMint } from './vanity';
|
|
12
12
|
export { PROGRAM_ID, LAMPORTS_PER_SOL, TOKEN_MULTIPLIER, TOTAL_SUPPLY } from 'torchsdk';
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* so agents think in factions, not tokens.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.TOTAL_SUPPLY = exports.TOKEN_MULTIPLIER = exports.LAMPORTS_PER_SOL = exports.PROGRAM_ID = exports.grindPyreMint = exports.isPyreMint = void 0;
|
|
10
|
+
exports.getAgentFactions = 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.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.grindPyreMint = exports.isPyreMint = exports.getWorldStats = exports.getWorldFeed = void 0;
|
|
12
12
|
// ─── Actions ───────────────────────────────────────────────────────
|
|
13
13
|
var actions_1 = require("./actions");
|
|
14
14
|
// Read operations
|
|
@@ -34,6 +34,8 @@ Object.defineProperty(exports, "launchFaction", { enumerable: true, get: functio
|
|
|
34
34
|
Object.defineProperty(exports, "joinFaction", { enumerable: true, get: function () { return actions_1.joinFaction; } });
|
|
35
35
|
Object.defineProperty(exports, "directJoinFaction", { enumerable: true, get: function () { return actions_1.directJoinFaction; } });
|
|
36
36
|
Object.defineProperty(exports, "defect", { enumerable: true, get: function () { return actions_1.defect; } });
|
|
37
|
+
Object.defineProperty(exports, "messageFaction", { enumerable: true, get: function () { return actions_1.messageFaction; } });
|
|
38
|
+
Object.defineProperty(exports, "fudFaction", { enumerable: true, get: function () { return actions_1.fudFaction; } });
|
|
37
39
|
Object.defineProperty(exports, "rally", { enumerable: true, get: function () { return actions_1.rally; } });
|
|
38
40
|
Object.defineProperty(exports, "requestWarLoan", { enumerable: true, get: function () { return actions_1.requestWarLoan; } });
|
|
39
41
|
Object.defineProperty(exports, "repayWarLoan", { enumerable: true, get: function () { return actions_1.repayWarLoan; } });
|
package/dist/types.d.ts
CHANGED
|
@@ -186,6 +186,22 @@ export interface DefectParams {
|
|
|
186
186
|
message?: string;
|
|
187
187
|
stronghold?: string;
|
|
188
188
|
}
|
|
189
|
+
/** "Said in" — micro buy + message (costs 0.001 SOL) */
|
|
190
|
+
export interface MessageFactionParams {
|
|
191
|
+
mint: string;
|
|
192
|
+
agent: string;
|
|
193
|
+
message: string;
|
|
194
|
+
stronghold: string;
|
|
195
|
+
ascended?: boolean;
|
|
196
|
+
}
|
|
197
|
+
/** "Argued in" — micro sell + negative message (sells 100 tokens) */
|
|
198
|
+
export interface FudFactionParams {
|
|
199
|
+
mint: string;
|
|
200
|
+
agent: string;
|
|
201
|
+
message: string;
|
|
202
|
+
stronghold: string;
|
|
203
|
+
ascended?: boolean;
|
|
204
|
+
}
|
|
189
205
|
export interface RallyParams {
|
|
190
206
|
mint: string;
|
|
191
207
|
agent: string;
|
package/package.json
CHANGED
package/src/actions.ts
CHANGED
|
@@ -67,6 +67,8 @@ import type {
|
|
|
67
67
|
JoinFactionParams,
|
|
68
68
|
DirectJoinFactionParams,
|
|
69
69
|
DefectParams,
|
|
70
|
+
MessageFactionParams,
|
|
71
|
+
FudFactionParams,
|
|
70
72
|
RallyParams,
|
|
71
73
|
RequestWarLoanParams,
|
|
72
74
|
RepayWarLoanParams,
|
|
@@ -110,7 +112,33 @@ import { buildCreateFactionTransaction, isPyreMint } from './vanity';
|
|
|
110
112
|
// Mints from previous swarm runs. Agents should skip these and only
|
|
111
113
|
// interact with freshly launched factions.
|
|
112
114
|
|
|
113
|
-
const
|
|
115
|
+
const DEFAULT_BLACKLIST = [
|
|
116
|
+
'E1SgYPW6JXhw5BabrvJkr6L2PyvfFenYaoCTePazyNpy','6jWsyDC87RmfrZZRjuxSAxvUxE665HGZwZ2Z8j5z9epy',
|
|
117
|
+
'6J8PLgFxHb98cNURP2Yt2SKwgnUeEXpN6Us2kxaMz1py','5A297UyPQstxWpJyydDnFvn2zN8whCEYdqvnfB5bF9py',
|
|
118
|
+
'8XdWfSKLJusAcRrYzK3bWJ7dy46AkbU8qxF3B55uSfpy','7ZYrKcJbFFbG36keCYRvfc1j1HScQmJW1zRV3wVVD4py',
|
|
119
|
+
'ERQPyG2oqx5bdyuY2Nnm5ZbZY2zcB46TfUxqpzYWH5py','JCvpK3kTnh2EdQG71mqE8ZXcvzLU5EJNG5vgGZme4wpy',
|
|
120
|
+
'9RDFkGSjKpjHtXZ25uuug2MN5P7oSjzkLg16HcrKy3py','2kWcX1ZetV4jUtBPbKKk265q4gS4nuut2kc1MbaZDfpy',
|
|
121
|
+
'3r9FnQim6GToR7NkY5om8igUNu7gfpq5fk2qtv3bV5py','2498F79s1Ghyj3J4VhV1qy5hhznnM53ZwzTXM9iscopy',
|
|
122
|
+
'5VpotyDyc8QKKqLuzu8pfhtEa9gsRG1ww58DbqJUgTpy','GXi1opahTkavPfAqfUhkoUJRBjPoAmAMVW87kdbDwNpy',
|
|
123
|
+
'GKFAokGiyhXGXxUPgwQEo8fE5nBjRdJcVX6LVj7SgPpy','EKFVwfNk1xzqhpyFJSMNw8KDcLRemvqxiGoSyfRtBspy',
|
|
124
|
+
'GsZLHVt3mTwus5krUcifBWS52xMQSuXSy3RpPhEFtvpy','9azKjXnt2w4RB5ykVcyaicWSssmxoapZ9SSQLMZc4Epy',
|
|
125
|
+
'BaLwryyMrqhtsMrELkrTSdWF9UYuNdjW4413hrQqbtpy','5p9ibszMVe79mm95M8uubS6WttXem2xZfh3mWmBdvUpy',
|
|
126
|
+
'CTvoAmTggJcBTnbxcfy91Y1c6t6fU5xq3SRtYh3TgEpy','2kqVCdQS9KSv2kxLiytGZfcLsx5xwKQT6rHTg4V18hpy',
|
|
127
|
+
'zV7XZcvY8DVk4scKUiw7GGN4L3eBPSXuD7Q1NPxfspy','3UhzKfdU1wgnEN2VCykRURw88qVVqeu3ejRkUnjmhRpy',
|
|
128
|
+
'FRaS3dAdr1zo6u811XBVGUp9K2mSdQ2yG8qW4qP5hapy','4NHzWVP7hzZhd9LhTrbyxzsSnT8EmNSYVP1DpAKXHYpy',
|
|
129
|
+
'Yt2rdfp6uzS7L52df3LPmetLoy3GvKChYJ4Lmvk6gpy','9Ejju29KHPWMpda4WpFsJ6ZDHVUqNWyMZHteEisgw9py',
|
|
130
|
+
'2zPC4A7WR2cMNDfBzERp49fEbTBCyqXPKhcrgz3hWcpy','7jBAriydb1qRy7Wg4WAz8woHP4pVxZJSnF7vw95tVQpy',
|
|
131
|
+
'HvPWKuMFpG3zAdkPMbaadyo78VoJbAMtpXaBYMK1Aqpy','GyNw9bkqz2rhR66Xx7P4p11PFBrjPi2r6XoCg5gPAdpy',
|
|
132
|
+
'6HveNEes9xtkkchb76JgjWWQ61sbXjESy2vr3A7Maipy','8E3GETvTkTTaCLpzkyHJTnuNMfmGvzUEgAYnurZuLZpy',
|
|
133
|
+
'AeApaJqppwjW9S2KeZGPZpmg1kAdxZHkFRnXPZc8Kjpy','8FfteyAMQm96upu4w6cJvE5T8RcMKRf5keJMdXbukXpy',
|
|
134
|
+
'BrEj2Q9XE13WesRU1u8USiprv2DkpBcJfaqQeqQ6grpy','Dtki37mAB3DiTW1bp8LnZQyv54UuC68Yo5pGZkPdVSpy',
|
|
135
|
+
'77UzTntZ7ThyXhN4hVvSx7m6tjit8uCw6U2LVQHPSqpy','ASV9kiC6vEpZy3X7xVExuyG257KHKd3Hutbji8AVRUpy',
|
|
136
|
+
'Fc1V6KcxSriJkUNeDLqz8w5Sm4mp1s8gxornZVLcHEpy','FEizyHEUoYenqfpF87kqiGnq3w1R2TReodEfsnTrrfpy',
|
|
137
|
+
'DmwgcVHoJxKeRiij5LtedY9LWDpqoqa3hGfUyVgBkgpy','GUGz1Em5KZ57aKFqEBSd4Y4Vb6WxBd3H2b16fPCC6upy',
|
|
138
|
+
'6ZWY3Bau5zw1j7vMQQ1czSw4rjBJrExHQ8Renor2vLpy',
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
const BLACKLISTED_MINTS = new Set<string>(DEFAULT_BLACKLIST);
|
|
114
142
|
|
|
115
143
|
/** Add mints to the blacklist (call at startup with old mints) */
|
|
116
144
|
export function blacklistMints(mints: string[]): void {
|
|
@@ -466,6 +494,59 @@ export async function defect(
|
|
|
466
494
|
});
|
|
467
495
|
}
|
|
468
496
|
|
|
497
|
+
/** "Said in" — micro buy (0.001 SOL) + message. Routes through bonding curve or DEX automatically. */
|
|
498
|
+
export async function messageFaction(
|
|
499
|
+
connection: Connection,
|
|
500
|
+
params: MessageFactionParams,
|
|
501
|
+
): Promise<TransactionResult> {
|
|
502
|
+
const MICRO_BUY_LAMPORTS = 1_000; // 0.001 SOL
|
|
503
|
+
if (params.ascended) {
|
|
504
|
+
return buildVaultSwapTransaction(connection, {
|
|
505
|
+
mint: params.mint,
|
|
506
|
+
signer: params.agent,
|
|
507
|
+
vault_creator: params.stronghold,
|
|
508
|
+
amount_in: MICRO_BUY_LAMPORTS,
|
|
509
|
+
minimum_amount_out: 1,
|
|
510
|
+
is_buy: true,
|
|
511
|
+
message: params.message,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
const result = await buildBuyTransaction(connection, {
|
|
515
|
+
mint: params.mint,
|
|
516
|
+
buyer: params.agent,
|
|
517
|
+
amount_sol: MICRO_BUY_LAMPORTS,
|
|
518
|
+
message: params.message,
|
|
519
|
+
vault: params.stronghold,
|
|
520
|
+
});
|
|
521
|
+
return mapBuyResult(result);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/** "Argued in" — micro sell (100 tokens) + negative message. Routes through bonding curve or DEX automatically. */
|
|
525
|
+
export async function fudFaction(
|
|
526
|
+
connection: Connection,
|
|
527
|
+
params: FudFactionParams,
|
|
528
|
+
): Promise<TransactionResult> {
|
|
529
|
+
const MICRO_SELL_TOKENS = 100;
|
|
530
|
+
if (params.ascended) {
|
|
531
|
+
return buildVaultSwapTransaction(connection, {
|
|
532
|
+
mint: params.mint,
|
|
533
|
+
signer: params.agent,
|
|
534
|
+
vault_creator: params.stronghold,
|
|
535
|
+
amount_in: MICRO_SELL_TOKENS,
|
|
536
|
+
minimum_amount_out: 1,
|
|
537
|
+
is_buy: false,
|
|
538
|
+
message: params.message,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
return buildSellTransaction(connection, {
|
|
542
|
+
mint: params.mint,
|
|
543
|
+
seller: params.agent,
|
|
544
|
+
amount_tokens: MICRO_SELL_TOKENS,
|
|
545
|
+
message: params.message,
|
|
546
|
+
vault: params.stronghold,
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
|
|
469
550
|
/** Rally support for a faction (star) */
|
|
470
551
|
export async function rally(
|
|
471
552
|
connection: Connection,
|
package/src/index.ts
CHANGED
|
@@ -35,6 +35,8 @@ export type {
|
|
|
35
35
|
JoinFactionParams,
|
|
36
36
|
DirectJoinFactionParams,
|
|
37
37
|
DefectParams,
|
|
38
|
+
MessageFactionParams,
|
|
39
|
+
FudFactionParams,
|
|
38
40
|
RallyParams,
|
|
39
41
|
RequestWarLoanParams,
|
|
40
42
|
RepayWarLoanParams,
|
|
@@ -100,6 +102,8 @@ export {
|
|
|
100
102
|
joinFaction,
|
|
101
103
|
directJoinFaction,
|
|
102
104
|
defect,
|
|
105
|
+
messageFaction,
|
|
106
|
+
fudFaction,
|
|
103
107
|
rally,
|
|
104
108
|
requestWarLoan,
|
|
105
109
|
repayWarLoan,
|
package/src/types.ts
CHANGED
|
@@ -224,6 +224,24 @@ export interface DefectParams {
|
|
|
224
224
|
stronghold?: string;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
/** "Said in" — micro buy + message (costs 0.001 SOL) */
|
|
228
|
+
export interface MessageFactionParams {
|
|
229
|
+
mint: string;
|
|
230
|
+
agent: string;
|
|
231
|
+
message: string;
|
|
232
|
+
stronghold: string;
|
|
233
|
+
ascended?: boolean;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** "Argued in" — micro sell + negative message (sells 100 tokens) */
|
|
237
|
+
export interface FudFactionParams {
|
|
238
|
+
mint: string;
|
|
239
|
+
agent: string;
|
|
240
|
+
message: string;
|
|
241
|
+
stronghold: string;
|
|
242
|
+
ascended?: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
227
245
|
export interface RallyParams {
|
|
228
246
|
mint: string;
|
|
229
247
|
agent: string;
|