nara-sdk 1.0.86 → 1.0.87
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/package.json +1 -1
- package/src/quest.ts +1 -20
package/package.json
CHANGED
package/src/quest.ts
CHANGED
|
@@ -105,13 +105,6 @@ export interface QuestOptions {
|
|
|
105
105
|
circuitWasmPath?: string | Uint8Array;
|
|
106
106
|
/** File path (Node.js), URL string, or pre-loaded Uint8Array (browser) */
|
|
107
107
|
zkeyPath?: string | Uint8Array;
|
|
108
|
-
/**
|
|
109
|
-
* @deprecated Boost PoMI no longer gates on stake; credits are the sole admission ticket.
|
|
110
|
-
* If set, a legacy `stake` instruction is still bundled before `submit_answer`:
|
|
111
|
-
* - number: stake the exact NARA amount
|
|
112
|
-
* - "auto": no-op (kept for API compatibility)
|
|
113
|
-
*/
|
|
114
|
-
stake?: "auto" | number;
|
|
115
108
|
}
|
|
116
109
|
|
|
117
110
|
export interface ActivityLog {
|
|
@@ -454,24 +447,12 @@ export async function submitAnswer(
|
|
|
454
447
|
);
|
|
455
448
|
}
|
|
456
449
|
|
|
457
|
-
// Legacy optional stake instruction (staking channel is closed but still callable)
|
|
458
|
-
let stakeIx: any = null;
|
|
459
|
-
if (typeof options?.stake === "number" && options.stake > 0) {
|
|
460
|
-
const stakeLamports = new BN(Math.round(options.stake * LAMPORTS_PER_SOL));
|
|
461
|
-
stakeIx = await program.methods
|
|
462
|
-
.stake(stakeLamports)
|
|
463
|
-
.accounts({ user: wallet.publicKey } as any)
|
|
464
|
-
.instruction();
|
|
465
|
-
}
|
|
466
|
-
|
|
467
450
|
const submitIx = await program.methods
|
|
468
451
|
.submitAnswer(proof.proofA as any, proof.proofB as any, proof.proofC as any, agent, model)
|
|
469
452
|
.accounts({ user: wallet.publicKey, payer: wallet.publicKey })
|
|
470
453
|
.instruction();
|
|
471
454
|
|
|
472
|
-
const ixs = [];
|
|
473
|
-
if (stakeIx) ixs.push(stakeIx);
|
|
474
|
-
ixs.push(submitIx);
|
|
455
|
+
const ixs = [submitIx];
|
|
475
456
|
|
|
476
457
|
if (activityLog) {
|
|
477
458
|
const { makeLogActivityIx, makeLogActivityWithReferralIx } = await import("./agent_registry");
|