naracli 1.0.90 → 1.0.92
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/nara-cli-bundle.cjs +87 -46
- package/package.json +2 -2
- package/src/cli/commands/quest.ts +13 -6
package/dist/nara-cli-bundle.cjs
CHANGED
|
@@ -66721,10 +66721,10 @@ var require_dist3 = __commonJS({
|
|
|
66721
66721
|
}
|
|
66722
66722
|
});
|
|
66723
66723
|
|
|
66724
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
66724
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts
|
|
66725
66725
|
var DEFAULT_RPC_URL, DEFAULT_QUEST_RELAY_URL, DEFAULT_QUEST_PROGRAM_ID, DEFAULT_SKILLS_PROGRAM_ID, DEFAULT_ZKID_PROGRAM_ID, DEFAULT_AGENT_REGISTRY_PROGRAM_ID, DEFAULT_ALT_ADDRESS, DEFAULT_BRIDGE_FEE_BPS, BRIDGE_FEE_BPS_DENOMINATOR, DEFAULT_BRIDGE_FEE_RECIPIENT_SOLANA, DEFAULT_BRIDGE_FEE_RECIPIENT_NARA;
|
|
66726
66726
|
var init_constants2 = __esm({
|
|
66727
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
66727
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts"() {
|
|
66728
66728
|
DEFAULT_RPC_URL = process.env.RPC_URL || "https://mainnet-api.nara.build/";
|
|
66729
66729
|
DEFAULT_QUEST_RELAY_URL = process.env.QUEST_RELAY_URL || "https://quest-api.nara.build/";
|
|
66730
66730
|
DEFAULT_QUEST_PROGRAM_ID = process.env.QUEST_PROGRAM_ID || "Quest11111111111111111111111111111111111111";
|
|
@@ -66739,7 +66739,7 @@ var init_constants2 = __esm({
|
|
|
66739
66739
|
}
|
|
66740
66740
|
});
|
|
66741
66741
|
|
|
66742
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
66742
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts
|
|
66743
66743
|
function getAltAddress() {
|
|
66744
66744
|
if (_overrideAltAddresses !== null) return _overrideAltAddresses;
|
|
66745
66745
|
if (!DEFAULT_ALT_ADDRESS) return [];
|
|
@@ -66861,7 +66861,7 @@ async function sendTx(connection, payer, instructions, signers, opts) {
|
|
|
66861
66861
|
}
|
|
66862
66862
|
var import_web394, _cachedAlts, _cachedAltKey, _overrideAltAddresses, _globalSkipPreflight;
|
|
66863
66863
|
var init_tx = __esm({
|
|
66864
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
66864
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts"() {
|
|
66865
66865
|
import_web394 = __toESM(require_index_cjs(), 1);
|
|
66866
66866
|
init_constants2();
|
|
66867
66867
|
_cachedAlts = [];
|
|
@@ -83116,10 +83116,10 @@ var require_cjs2 = __commonJS({
|
|
|
83116
83116
|
}
|
|
83117
83117
|
});
|
|
83118
83118
|
|
|
83119
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
83119
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json
|
|
83120
83120
|
var nara_quest_default;
|
|
83121
83121
|
var init_nara_quest = __esm({
|
|
83122
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
83122
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json"() {
|
|
83123
83123
|
nara_quest_default = {
|
|
83124
83124
|
address: "Quest11111111111111111111111111111111111111",
|
|
83125
83125
|
metadata: {
|
|
@@ -83883,6 +83883,10 @@ var init_nara_quest = __esm({
|
|
|
83883
83883
|
{
|
|
83884
83884
|
name: "max_reward_count",
|
|
83885
83885
|
type: "u32"
|
|
83886
|
+
},
|
|
83887
|
+
{
|
|
83888
|
+
name: "free_stake_multiplier",
|
|
83889
|
+
type: "u32"
|
|
83886
83890
|
}
|
|
83887
83891
|
]
|
|
83888
83892
|
},
|
|
@@ -85032,6 +85036,11 @@ var init_nara_quest = __esm({
|
|
|
85032
85036
|
code: 6022,
|
|
85033
85037
|
name: "InsufficientAirdrop",
|
|
85034
85038
|
msg: "Airdrop fund has insufficient balance"
|
|
85039
|
+
},
|
|
85040
|
+
{
|
|
85041
|
+
code: 6023,
|
|
85042
|
+
name: "InvalidMultiplier",
|
|
85043
|
+
msg: "Multiplier must be >= 1"
|
|
85035
85044
|
}
|
|
85036
85045
|
],
|
|
85037
85046
|
types: [
|
|
@@ -85128,12 +85137,16 @@ var init_nara_quest = __esm({
|
|
|
85128
85137
|
name: "max_airdrop_count",
|
|
85129
85138
|
type: "u32"
|
|
85130
85139
|
},
|
|
85140
|
+
{
|
|
85141
|
+
name: "free_stake_multiplier",
|
|
85142
|
+
type: "u32"
|
|
85143
|
+
},
|
|
85131
85144
|
{
|
|
85132
85145
|
name: "_padding",
|
|
85133
85146
|
type: {
|
|
85134
85147
|
array: [
|
|
85135
85148
|
"u8",
|
|
85136
|
-
|
|
85149
|
+
16
|
|
85137
85150
|
]
|
|
85138
85151
|
}
|
|
85139
85152
|
}
|
|
@@ -85171,15 +85184,15 @@ var init_nara_quest = __esm({
|
|
|
85171
85184
|
type: "u64"
|
|
85172
85185
|
},
|
|
85173
85186
|
{
|
|
85174
|
-
name: "
|
|
85187
|
+
name: "stake_reward_count",
|
|
85175
85188
|
type: "u32"
|
|
85176
85189
|
},
|
|
85177
85190
|
{
|
|
85178
|
-
name: "
|
|
85191
|
+
name: "stake_reward_per_winner",
|
|
85179
85192
|
type: "u64"
|
|
85180
85193
|
},
|
|
85181
85194
|
{
|
|
85182
|
-
name: "
|
|
85195
|
+
name: "stake_winner_count",
|
|
85183
85196
|
type: "u32"
|
|
85184
85197
|
},
|
|
85185
85198
|
{
|
|
@@ -85202,12 +85215,24 @@ var init_nara_quest = __esm({
|
|
|
85202
85215
|
name: "avg_participant_stake",
|
|
85203
85216
|
type: "u64"
|
|
85204
85217
|
},
|
|
85218
|
+
{
|
|
85219
|
+
name: "free_reward_count",
|
|
85220
|
+
type: "u32"
|
|
85221
|
+
},
|
|
85222
|
+
{
|
|
85223
|
+
name: "free_reward_per_winner",
|
|
85224
|
+
type: "u64"
|
|
85225
|
+
},
|
|
85226
|
+
{
|
|
85227
|
+
name: "free_winner_count",
|
|
85228
|
+
type: "u32"
|
|
85229
|
+
},
|
|
85205
85230
|
{
|
|
85206
85231
|
name: "_padding",
|
|
85207
85232
|
type: {
|
|
85208
85233
|
array: [
|
|
85209
85234
|
"u8",
|
|
85210
|
-
|
|
85235
|
+
48
|
|
85211
85236
|
]
|
|
85212
85237
|
}
|
|
85213
85238
|
}
|
|
@@ -85273,10 +85298,10 @@ var init_nara_quest = __esm({
|
|
|
85273
85298
|
}
|
|
85274
85299
|
});
|
|
85275
85300
|
|
|
85276
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
85301
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json
|
|
85277
85302
|
var nara_agent_registry_default;
|
|
85278
85303
|
var init_nara_agent_registry = __esm({
|
|
85279
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
85304
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json"() {
|
|
85280
85305
|
nara_agent_registry_default = {
|
|
85281
85306
|
address: "AgentRegistry111111111111111111111111111111",
|
|
85282
85307
|
metadata: {
|
|
@@ -90793,7 +90818,7 @@ var init_nara_agent_registry = __esm({
|
|
|
90793
90818
|
}
|
|
90794
90819
|
});
|
|
90795
90820
|
|
|
90796
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
90821
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts
|
|
90797
90822
|
var agent_registry_exports = {};
|
|
90798
90823
|
__export(agent_registry_exports, {
|
|
90799
90824
|
approveRejectedTwitter: () => approveRejectedTwitter,
|
|
@@ -91700,7 +91725,7 @@ async function rejectTweet(connection, wallet, agentId, options) {
|
|
|
91700
91725
|
}
|
|
91701
91726
|
var import_web395, anchor, import_anchor, import_bn, DEFAULT_CHUNK_SIZE, BUFFER_HEADER_SIZE, MEMORY_HEADER_SIZE, BIO_META_HEADER_SIZE;
|
|
91702
91727
|
var init_agent_registry = __esm({
|
|
91703
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
91728
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts"() {
|
|
91704
91729
|
import_web395 = __toESM(require_index_cjs(), 1);
|
|
91705
91730
|
anchor = __toESM(require_cjs2(), 1);
|
|
91706
91731
|
import_anchor = __toESM(require_cjs2(), 1);
|
|
@@ -171461,7 +171486,7 @@ var init_main3 = __esm({
|
|
|
171461
171486
|
}
|
|
171462
171487
|
});
|
|
171463
171488
|
|
|
171464
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
171489
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts
|
|
171465
171490
|
var quest_exports = {};
|
|
171466
171491
|
__export(quest_exports, {
|
|
171467
171492
|
adjustFreeStake: () => adjustFreeStake,
|
|
@@ -171652,16 +171677,24 @@ async function getQuestInfo(connection, wallet, options) {
|
|
|
171652
171677
|
decayMs,
|
|
171653
171678
|
nowMs
|
|
171654
171679
|
);
|
|
171680
|
+
const stakeRewardCount = pool.stakeRewardCount;
|
|
171681
|
+
const stakeWinnerCount = pool.stakeWinnerCount;
|
|
171682
|
+
const creditRewardCount = pool.freeRewardCount;
|
|
171683
|
+
const creditWinnerCount = pool.freeWinnerCount;
|
|
171655
171684
|
return {
|
|
171656
171685
|
active,
|
|
171657
171686
|
round: pool.round.toString(),
|
|
171658
171687
|
question: pool.question,
|
|
171659
171688
|
answerHash: Array.from(pool.answerHash),
|
|
171660
|
-
rewardPerWinner: pool.rewardPerWinner.toNumber() / import_web396.LAMPORTS_PER_SOL,
|
|
171661
171689
|
totalReward: pool.rewardAmount.toNumber() / import_web396.LAMPORTS_PER_SOL,
|
|
171662
|
-
|
|
171663
|
-
|
|
171664
|
-
|
|
171690
|
+
stakeRewardCount,
|
|
171691
|
+
stakeWinnerCount,
|
|
171692
|
+
stakeRewardPerWinner: pool.stakeRewardPerWinner.toNumber() / import_web396.LAMPORTS_PER_SOL,
|
|
171693
|
+
stakeRemainingSlots: Math.max(0, stakeRewardCount - stakeWinnerCount),
|
|
171694
|
+
creditRewardCount,
|
|
171695
|
+
creditWinnerCount,
|
|
171696
|
+
creditRewardPerWinner: pool.freeRewardPerWinner.toNumber() / import_web396.LAMPORTS_PER_SOL,
|
|
171697
|
+
creditRemainingSlots: Math.max(0, creditRewardCount - creditWinnerCount),
|
|
171665
171698
|
difficulty: pool.difficulty,
|
|
171666
171699
|
deadline,
|
|
171667
171700
|
timeRemaining: secsLeft,
|
|
@@ -171900,9 +171933,9 @@ async function initializeQuest(connection, wallet, options) {
|
|
|
171900
171933
|
const ix = await program3.methods.initialize().accounts({ authority: wallet.publicKey }).instruction();
|
|
171901
171934
|
return sendTx(connection, wallet, [ix]);
|
|
171902
171935
|
}
|
|
171903
|
-
async function setRewardConfig(connection, wallet, minRewardCount, maxRewardCount, options) {
|
|
171936
|
+
async function setRewardConfig(connection, wallet, minRewardCount, maxRewardCount, freeStakeMultiplier, options) {
|
|
171904
171937
|
const program3 = createProgram2(connection, wallet, options?.programId);
|
|
171905
|
-
const ix = await program3.methods.setRewardConfig(minRewardCount, maxRewardCount).accounts({ authority: wallet.publicKey }).instruction();
|
|
171938
|
+
const ix = await program3.methods.setRewardConfig(minRewardCount, maxRewardCount, freeStakeMultiplier).accounts({ authority: wallet.publicKey }).instruction();
|
|
171906
171939
|
return sendTx(connection, wallet, [ix]);
|
|
171907
171940
|
}
|
|
171908
171941
|
async function setStakeConfig(connection, wallet, bpsHigh, bpsLow, decayMs, options) {
|
|
@@ -171955,7 +171988,8 @@ async function getQuestConfig(connection, options) {
|
|
|
171955
171988
|
extraReward: Number(config2.extraReward.toString()),
|
|
171956
171989
|
stakeAuthority: config2.stakeAuthority,
|
|
171957
171990
|
airdropAmount: Number(config2.airdropAmount.toString()),
|
|
171958
|
-
maxAirdropCount: config2.maxAirdropCount
|
|
171991
|
+
maxAirdropCount: config2.maxAirdropCount,
|
|
171992
|
+
freeStakeMultiplier: config2.freeStakeMultiplier
|
|
171959
171993
|
};
|
|
171960
171994
|
}
|
|
171961
171995
|
async function setStakeAuthority(connection, wallet, newStakeAuthority, options) {
|
|
@@ -171984,7 +172018,7 @@ async function setAirdropConfig(connection, wallet, airdropAmount, maxAirdropCou
|
|
|
171984
172018
|
}
|
|
171985
172019
|
var import_web396, anchor2, import_anchor2, import_bn2, import_meta, BN254_FIELD, WSOL_MINT;
|
|
171986
172020
|
var init_quest = __esm({
|
|
171987
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
172021
|
+
"node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts"() {
|
|
171988
172022
|
import_web396 = __toESM(require_index_cjs(), 1);
|
|
171989
172023
|
init_esm4();
|
|
171990
172024
|
anchor2 = __toESM(require_cjs2(), 1);
|
|
@@ -266630,7 +266664,7 @@ var esm_default = base;
|
|
|
266630
266664
|
var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
266631
266665
|
var esm_default2 = esm_default(ALPHABET);
|
|
266632
266666
|
|
|
266633
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266667
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/client.ts
|
|
266634
266668
|
var import_web393 = __toESM(require_index_cjs(), 1);
|
|
266635
266669
|
var NaraSDK = class {
|
|
266636
266670
|
connection;
|
|
@@ -266645,10 +266679,10 @@ var NaraSDK = class {
|
|
|
266645
266679
|
}
|
|
266646
266680
|
};
|
|
266647
266681
|
|
|
266648
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266682
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
266649
266683
|
init_constants2();
|
|
266650
266684
|
|
|
266651
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266685
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/sign.ts
|
|
266652
266686
|
var import_tweetnacl = __toESM(require_nacl_fast(), 1);
|
|
266653
266687
|
function buildSignMessage(params) {
|
|
266654
266688
|
return Object.keys(params).filter((k2) => k2 !== "sign").sort().map((k2) => `${k2}=${params[k2]}`).join("&");
|
|
@@ -266676,17 +266710,17 @@ function signUrl(baseUrl, wallet, params) {
|
|
|
266676
266710
|
return url.toString();
|
|
266677
266711
|
}
|
|
266678
266712
|
|
|
266679
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266713
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
266680
266714
|
init_tx();
|
|
266681
266715
|
init_quest();
|
|
266682
266716
|
|
|
266683
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266717
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
|
|
266684
266718
|
var import_web397 = __toESM(require_index_cjs(), 1);
|
|
266685
266719
|
var anchor3 = __toESM(require_cjs2(), 1);
|
|
266686
266720
|
var import_anchor3 = __toESM(require_cjs2(), 1);
|
|
266687
266721
|
init_constants2();
|
|
266688
266722
|
|
|
266689
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
266723
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_skills_hub.json
|
|
266690
266724
|
var nara_skills_hub_default = {
|
|
266691
266725
|
address: "SkiLLHub11111111111111111111111111111111111",
|
|
266692
266726
|
metadata: {
|
|
@@ -268084,7 +268118,7 @@ var nara_skills_hub_default = {
|
|
|
268084
268118
|
]
|
|
268085
268119
|
};
|
|
268086
268120
|
|
|
268087
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
268121
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
|
|
268088
268122
|
init_tx();
|
|
268089
268123
|
var DEFAULT_CHUNK_SIZE2 = 800;
|
|
268090
268124
|
var BUFFER_HEADER_SIZE2 = 144;
|
|
@@ -268314,7 +268348,7 @@ async function uploadSkillContent(connection, wallet, name, content, options) {
|
|
|
268314
268348
|
}
|
|
268315
268349
|
}
|
|
268316
268350
|
|
|
268317
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
268351
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
|
|
268318
268352
|
var import_web398 = __toESM(require_index_cjs(), 1);
|
|
268319
268353
|
var anchor4 = __toESM(require_cjs2(), 1);
|
|
268320
268354
|
var import_anchor4 = __toESM(require_cjs2(), 1);
|
|
@@ -268324,7 +268358,7 @@ var import_bn3 = __toESM(require_bn(), 1);
|
|
|
268324
268358
|
init_constants2();
|
|
268325
268359
|
init_tx();
|
|
268326
268360
|
|
|
268327
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
268361
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_zk.json
|
|
268328
268362
|
var nara_zk_default = {
|
|
268329
268363
|
address: "ZKidentity111111111111111111111111111111111",
|
|
268330
268364
|
metadata: {
|
|
@@ -269535,7 +269569,7 @@ var nara_zk_default = {
|
|
|
269535
269569
|
]
|
|
269536
269570
|
};
|
|
269537
269571
|
|
|
269538
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
269572
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
|
|
269539
269573
|
var import_meta2 = {};
|
|
269540
269574
|
var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
269541
269575
|
var MERKLE_LEVELS = 64;
|
|
@@ -269897,10 +269931,10 @@ async function transferZkIdByCommitment(connection, payer, name, currentIdSecret
|
|
|
269897
269931
|
return sendTx(connection, payer, [ix]);
|
|
269898
269932
|
}
|
|
269899
269933
|
|
|
269900
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
269934
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
269901
269935
|
init_agent_registry();
|
|
269902
269936
|
|
|
269903
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
269937
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/bridge.ts
|
|
269904
269938
|
var import_web399 = __toESM(require_index_cjs(), 1);
|
|
269905
269939
|
init_esm4();
|
|
269906
269940
|
init_constants2();
|
|
@@ -270392,7 +270426,7 @@ async function scanValidator(folder, messageId, maxScan) {
|
|
|
270392
270426
|
};
|
|
270393
270427
|
}
|
|
270394
270428
|
|
|
270395
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
270429
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx_parser.ts
|
|
270396
270430
|
var import_web3100 = __toESM(require_index_cjs(), 1);
|
|
270397
270431
|
init_esm4();
|
|
270398
270432
|
init_constants2();
|
|
@@ -270516,7 +270550,7 @@ function buildAnchorDiscriminators() {
|
|
|
270516
270550
|
}
|
|
270517
270551
|
var anchorDiscs = buildAnchorDiscriminators();
|
|
270518
270552
|
|
|
270519
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
270553
|
+
// node_modules/.pnpm/nara-sdk@1.0.84_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
270520
270554
|
var import_web3101 = __toESM(require_index_cjs(), 1);
|
|
270521
270555
|
var import_bn4 = __toESM(require_bn(), 1);
|
|
270522
270556
|
|
|
@@ -271354,10 +271388,13 @@ async function handleQuestGet(options) {
|
|
|
271354
271388
|
round: quest.round,
|
|
271355
271389
|
question: quest.question,
|
|
271356
271390
|
difficulty: quest.difficulty,
|
|
271357
|
-
rewardPerWinner: `${quest.rewardPerWinner} NARA`,
|
|
271358
271391
|
totalReward: `${quest.totalReward} NARA`,
|
|
271359
|
-
|
|
271360
|
-
|
|
271392
|
+
stakeRewardPerWinner: `${quest.stakeRewardPerWinner} NARA`,
|
|
271393
|
+
stakeRewardSlots: `${quest.stakeWinnerCount}/${quest.stakeRewardCount}`,
|
|
271394
|
+
stakeRemainingSlots: quest.stakeRemainingSlots,
|
|
271395
|
+
creditRewardPerWinner: `${quest.creditRewardPerWinner} NARA`,
|
|
271396
|
+
creditRewardSlots: `${quest.creditWinnerCount}/${quest.creditRewardCount}`,
|
|
271397
|
+
creditRemainingSlots: quest.creditRemainingSlots,
|
|
271361
271398
|
deadline: new Date(quest.deadline * 1e3).toLocaleString(),
|
|
271362
271399
|
timeRemaining: formatTimeRemaining(quest.timeRemaining),
|
|
271363
271400
|
expired: quest.expired,
|
|
@@ -271375,10 +271412,12 @@ async function handleQuestGet(options) {
|
|
|
271375
271412
|
console.log(` Question: ${quest.question}`);
|
|
271376
271413
|
console.log(` Round: #${quest.round}`);
|
|
271377
271414
|
console.log(` Difficulty: ${quest.difficulty}`);
|
|
271378
|
-
console.log(` Reward per winner: ${quest.rewardPerWinner} NARA`);
|
|
271379
271415
|
console.log(` Total reward: ${quest.totalReward} NARA`);
|
|
271380
271416
|
console.log(
|
|
271381
|
-
`
|
|
271417
|
+
` Stake reward: ${quest.stakeRewardPerWinner} NARA/winner, ${quest.stakeWinnerCount}/${quest.stakeRewardCount} (${quest.stakeRemainingSlots} remaining)`
|
|
271418
|
+
);
|
|
271419
|
+
console.log(
|
|
271420
|
+
` Boost reward: ${quest.creditRewardPerWinner} NARA/winner, ${quest.creditWinnerCount}/${quest.creditRewardCount} (${quest.creditRemainingSlots} remaining)`
|
|
271382
271421
|
);
|
|
271383
271422
|
if (stakeRequired) {
|
|
271384
271423
|
console.log(` Stake requirement: ${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA (decays ${quest.stakeHigh} \u2192 ${quest.stakeLow})`);
|
|
@@ -271387,7 +271426,7 @@ async function handleQuestGet(options) {
|
|
|
271387
271426
|
} else {
|
|
271388
271427
|
console.log(` Stake requirement: none`);
|
|
271389
271428
|
}
|
|
271390
|
-
console.log(`
|
|
271429
|
+
console.log(` Boost credits: ${freeCredits}`);
|
|
271391
271430
|
console.log(` Deadline: ${new Date(quest.deadline * 1e3).toLocaleString()}`);
|
|
271392
271431
|
if (quest.timeRemaining > 0) {
|
|
271393
271432
|
console.log(` Time remaining: ${formatTimeRemaining(quest.timeRemaining)}`);
|
|
@@ -271423,7 +271462,8 @@ async function handleQuestConfig(options) {
|
|
|
271423
271462
|
stakeBpsHigh,
|
|
271424
271463
|
stakeBpsLow,
|
|
271425
271464
|
decayMs: config2.decayMs,
|
|
271426
|
-
minQuestInterval: config2.minQuestInterval
|
|
271465
|
+
minQuestInterval: config2.minQuestInterval,
|
|
271466
|
+
freeStakeMultiplier: config2.freeStakeMultiplier
|
|
271427
271467
|
};
|
|
271428
271468
|
if (options.json) {
|
|
271429
271469
|
formatOutput(data, true);
|
|
@@ -271437,6 +271477,7 @@ async function handleQuestConfig(options) {
|
|
|
271437
271477
|
console.log(` Stake BPS Low: ${stakeBpsLow / 100}% (${stakeBpsLow} BPS)`);
|
|
271438
271478
|
console.log(` Decay (ms): ${data.decayMs}`);
|
|
271439
271479
|
console.log(` Min Quest Interval: ${data.minQuestInterval}s`);
|
|
271480
|
+
console.log(` Free Stake Multiplier: ${data.freeStakeMultiplier}x`);
|
|
271440
271481
|
console.log("");
|
|
271441
271482
|
}
|
|
271442
271483
|
}
|
|
@@ -276898,7 +276939,7 @@ function registerCommands(program3) {
|
|
|
276898
276939
|
}
|
|
276899
276940
|
|
|
276900
276941
|
// bin/nara-cli.ts
|
|
276901
|
-
var version2 = true ? "1.0.
|
|
276942
|
+
var version2 = true ? "1.0.92" : "dev";
|
|
276902
276943
|
var program2 = new Command();
|
|
276903
276944
|
program2.name("naracli").description("CLI for the Nara chain. Native coin is NARA (not SOL). Mine NARA for free via PoMI quests, manage wallets, register agents, and more. Run 'naracli <command> --help' for details on any command.").version(version2);
|
|
276904
276945
|
program2.option("-r, --rpc-url <url>", "RPC endpoint (default: https://mainnet-api.nara.build/)").option("-w, --wallet <path>", "Path to wallet keypair JSON file (default: ~/.config/nara/id.json)").option("-j, --json", "Output in JSON format");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naracli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.92",
|
|
4
4
|
"description": "CLI for the Nara chain (Solana-compatible)",
|
|
5
5
|
"homepage": "https://nara.build",
|
|
6
6
|
"repository": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"bs58": "^6.0.0",
|
|
68
68
|
"commander": "^12.1.0",
|
|
69
69
|
"ed25519-hd-key": "^1.3.0",
|
|
70
|
-
"nara-sdk": "^1.0.
|
|
70
|
+
"nara-sdk": "^1.0.84",
|
|
71
71
|
"picocolors": "^1.1.1"
|
|
72
72
|
},
|
|
73
73
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
|
@@ -125,10 +125,13 @@ async function handleQuestGet(options: GlobalOptions & { verbose?: boolean }) {
|
|
|
125
125
|
round: quest.round,
|
|
126
126
|
question: quest.question,
|
|
127
127
|
difficulty: quest.difficulty,
|
|
128
|
-
rewardPerWinner: `${quest.rewardPerWinner} NARA`,
|
|
129
128
|
totalReward: `${quest.totalReward} NARA`,
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
stakeRewardPerWinner: `${quest.stakeRewardPerWinner} NARA`,
|
|
130
|
+
stakeRewardSlots: `${quest.stakeWinnerCount}/${quest.stakeRewardCount}`,
|
|
131
|
+
stakeRemainingSlots: quest.stakeRemainingSlots,
|
|
132
|
+
creditRewardPerWinner: `${quest.creditRewardPerWinner} NARA`,
|
|
133
|
+
creditRewardSlots: `${quest.creditWinnerCount}/${quest.creditRewardCount}`,
|
|
134
|
+
creditRemainingSlots: quest.creditRemainingSlots,
|
|
132
135
|
deadline: new Date(quest.deadline * 1000).toLocaleString(),
|
|
133
136
|
timeRemaining: formatTimeRemaining(quest.timeRemaining),
|
|
134
137
|
expired: quest.expired,
|
|
@@ -147,10 +150,12 @@ async function handleQuestGet(options: GlobalOptions & { verbose?: boolean }) {
|
|
|
147
150
|
console.log(` Question: ${quest.question}`);
|
|
148
151
|
console.log(` Round: #${quest.round}`);
|
|
149
152
|
console.log(` Difficulty: ${quest.difficulty}`);
|
|
150
|
-
console.log(` Reward per winner: ${quest.rewardPerWinner} NARA`);
|
|
151
153
|
console.log(` Total reward: ${quest.totalReward} NARA`);
|
|
152
154
|
console.log(
|
|
153
|
-
`
|
|
155
|
+
` Stake reward: ${quest.stakeRewardPerWinner} NARA/winner, ${quest.stakeWinnerCount}/${quest.stakeRewardCount} (${quest.stakeRemainingSlots} remaining)`
|
|
156
|
+
);
|
|
157
|
+
console.log(
|
|
158
|
+
` Boost reward: ${quest.creditRewardPerWinner} NARA/winner, ${quest.creditWinnerCount}/${quest.creditRewardCount} (${quest.creditRemainingSlots} remaining)`
|
|
154
159
|
);
|
|
155
160
|
if (stakeRequired) {
|
|
156
161
|
console.log(` Stake requirement: ${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA (decays ${quest.stakeHigh} → ${quest.stakeLow})`);
|
|
@@ -159,7 +164,7 @@ async function handleQuestGet(options: GlobalOptions & { verbose?: boolean }) {
|
|
|
159
164
|
} else {
|
|
160
165
|
console.log(` Stake requirement: none`);
|
|
161
166
|
}
|
|
162
|
-
console.log(`
|
|
167
|
+
console.log(` Boost credits: ${freeCredits}`);
|
|
163
168
|
console.log(` Deadline: ${new Date(quest.deadline * 1000).toLocaleString()}`);
|
|
164
169
|
if (quest.timeRemaining > 0) {
|
|
165
170
|
console.log(` Time remaining: ${formatTimeRemaining(quest.timeRemaining)}`);
|
|
@@ -201,6 +206,7 @@ async function handleQuestConfig(options: GlobalOptions) {
|
|
|
201
206
|
stakeBpsLow,
|
|
202
207
|
decayMs: config.decayMs,
|
|
203
208
|
minQuestInterval: config.minQuestInterval,
|
|
209
|
+
freeStakeMultiplier: config.freeStakeMultiplier,
|
|
204
210
|
};
|
|
205
211
|
|
|
206
212
|
if (options.json) {
|
|
@@ -215,6 +221,7 @@ async function handleQuestConfig(options: GlobalOptions) {
|
|
|
215
221
|
console.log(` Stake BPS Low: ${stakeBpsLow / 100}% (${stakeBpsLow} BPS)`);
|
|
216
222
|
console.log(` Decay (ms): ${data.decayMs}`);
|
|
217
223
|
console.log(` Min Quest Interval: ${data.minQuestInterval}s`);
|
|
224
|
+
console.log(` Free Stake Multiplier: ${data.freeStakeMultiplier}x`);
|
|
218
225
|
console.log("");
|
|
219
226
|
}
|
|
220
227
|
}
|