proof-of-take-sdk 3.1.2 → 3.1.3

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.
@@ -46,6 +46,12 @@ async function confirmedPostOnX(options) {
46
46
  feePayer: options.feePayer,
47
47
  admin: options.adminKey,
48
48
  });
49
+ // Safety: confirmations should always be paid by the admin wallet.
50
+ // If a caller accidentally sets the user as fee payer (common in bots),
51
+ // the tx will fail when users have 0 SOL.
52
+ if (!feePayer.equals(options.adminKey)) {
53
+ throw new Error("confirmedPostOnX: feePayer must be adminKey (admin pays tx fees for confirmations)");
54
+ }
49
55
  const signers = (0, signerHelpers_1.buildSigners)([(0, signerHelpers_1.asAdminSigner)(options.adminKey)], feePayer);
50
56
  // OPTIMISTIC UPDATES
51
57
  let updatedAccounts = undefined;
@@ -55,8 +55,7 @@ export type CreateMiztakeResult = StandardInstructionResultWithPdasAndAccounts<C
55
55
  * Create a new miztake
56
56
  *
57
57
  * Requires dual signature: user + admin
58
- * User pays for miztake, user_stats, and user_window_participation accounts
59
- * Admin pays for reward_window account (if needed)
58
+ * Admin pays for all account creations (miztake, user_stats, user_window_participation, reward_window)
60
59
  *
61
60
  * @param options - Create miztake options
62
61
  * @returns Instructions, signers, PDAs, and optimistically updated accounts
@@ -15,8 +15,7 @@ const enumHelpers_1 = require("../utils/enumHelpers");
15
15
  * Create a new miztake
16
16
  *
17
17
  * Requires dual signature: user + admin
18
- * User pays for miztake, user_stats, and user_window_participation accounts
19
- * Admin pays for reward_window account (if needed)
18
+ * Admin pays for all account creations (miztake, user_stats, user_window_participation, reward_window)
20
19
  *
21
20
  * @param options - Create miztake options
22
21
  * @returns Instructions, signers, PDAs, and optimistically updated accounts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proof-of-take-sdk",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "TypeScript SDK for Proof of Take Solana program",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",