naracli 1.0.66 → 1.0.68
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 +200 -63
- package/package.json +2 -2
- package/src/cli/commands/agent.ts +19 -11
- package/src/cli/commands/quest.ts +6 -3
package/dist/nara-cli-bundle.cjs
CHANGED
|
@@ -60810,10 +60810,10 @@ var require_dist3 = __commonJS({
|
|
|
60810
60810
|
}
|
|
60811
60811
|
});
|
|
60812
60812
|
|
|
60813
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
60813
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
60814
60814
|
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;
|
|
60815
60815
|
var init_constants2 = __esm({
|
|
60816
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
60816
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
60817
60817
|
DEFAULT_RPC_URL = process.env.RPC_URL || "https://mainnet-api.nara.build/";
|
|
60818
60818
|
DEFAULT_QUEST_RELAY_URL = process.env.QUEST_RELAY_URL || "https://quest-api.nara.build/";
|
|
60819
60819
|
DEFAULT_QUEST_PROGRAM_ID = process.env.QUEST_PROGRAM_ID || "Quest11111111111111111111111111111111111111";
|
|
@@ -60824,7 +60824,7 @@ var init_constants2 = __esm({
|
|
|
60824
60824
|
}
|
|
60825
60825
|
});
|
|
60826
60826
|
|
|
60827
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
60827
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
60828
60828
|
function getAltAddress() {
|
|
60829
60829
|
if (_overrideAltAddresses !== null) return _overrideAltAddresses;
|
|
60830
60830
|
if (!DEFAULT_ALT_ADDRESS) return [];
|
|
@@ -60950,7 +60950,7 @@ async function sendTx(connection, payer, instructions, signers, opts) {
|
|
|
60950
60950
|
}
|
|
60951
60951
|
var import_web388, _cachedAlts, _cachedAltKey, _overrideAltAddresses, _globalSkipPreflight;
|
|
60952
60952
|
var init_tx = __esm({
|
|
60953
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
60953
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
60954
60954
|
import_web388 = __toESM(require_index_cjs(), 1);
|
|
60955
60955
|
init_constants2();
|
|
60956
60956
|
_cachedAlts = [];
|
|
@@ -77205,10 +77205,10 @@ var require_cjs2 = __commonJS({
|
|
|
77205
77205
|
}
|
|
77206
77206
|
});
|
|
77207
77207
|
|
|
77208
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
77208
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
77209
77209
|
var nara_quest_default;
|
|
77210
77210
|
var init_nara_quest = __esm({
|
|
77211
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
77211
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
77212
77212
|
nara_quest_default = {
|
|
77213
77213
|
address: "Quest11111111111111111111111111111111111111",
|
|
77214
77214
|
metadata: {
|
|
@@ -79054,10 +79054,10 @@ var init_nara_quest = __esm({
|
|
|
79054
79054
|
}
|
|
79055
79055
|
});
|
|
79056
79056
|
|
|
79057
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
79057
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
79058
79058
|
var nara_agent_registry_default;
|
|
79059
79059
|
var init_nara_agent_registry = __esm({
|
|
79060
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
79060
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
79061
79061
|
nara_agent_registry_default = {
|
|
79062
79062
|
address: "AgentRegistry111111111111111111111111111111",
|
|
79063
79063
|
metadata: {
|
|
@@ -82350,11 +82350,11 @@ var init_nara_agent_registry = __esm({
|
|
|
82350
82350
|
],
|
|
82351
82351
|
args: [
|
|
82352
82352
|
{
|
|
82353
|
-
name: "
|
|
82353
|
+
name: "referral_discount_bps",
|
|
82354
82354
|
type: "u64"
|
|
82355
82355
|
},
|
|
82356
82356
|
{
|
|
82357
|
-
name: "
|
|
82357
|
+
name: "referral_share_bps",
|
|
82358
82358
|
type: "u64"
|
|
82359
82359
|
},
|
|
82360
82360
|
{
|
|
@@ -82405,7 +82405,19 @@ var init_nara_agent_registry = __esm({
|
|
|
82405
82405
|
],
|
|
82406
82406
|
args: [
|
|
82407
82407
|
{
|
|
82408
|
-
name: "
|
|
82408
|
+
name: "fee",
|
|
82409
|
+
type: "u64"
|
|
82410
|
+
},
|
|
82411
|
+
{
|
|
82412
|
+
name: "fee_7",
|
|
82413
|
+
type: "u64"
|
|
82414
|
+
},
|
|
82415
|
+
{
|
|
82416
|
+
name: "fee_6",
|
|
82417
|
+
type: "u64"
|
|
82418
|
+
},
|
|
82419
|
+
{
|
|
82420
|
+
name: "fee_5",
|
|
82409
82421
|
type: "u64"
|
|
82410
82422
|
}
|
|
82411
82423
|
]
|
|
@@ -83214,6 +83226,32 @@ var init_nara_agent_registry = __esm({
|
|
|
83214
83226
|
74,
|
|
83215
83227
|
39
|
|
83216
83228
|
]
|
|
83229
|
+
},
|
|
83230
|
+
{
|
|
83231
|
+
name: "TwitterBindRequested",
|
|
83232
|
+
discriminator: [
|
|
83233
|
+
251,
|
|
83234
|
+
254,
|
|
83235
|
+
188,
|
|
83236
|
+
154,
|
|
83237
|
+
25,
|
|
83238
|
+
126,
|
|
83239
|
+
76,
|
|
83240
|
+
169
|
|
83241
|
+
]
|
|
83242
|
+
},
|
|
83243
|
+
{
|
|
83244
|
+
name: "TwitterBindResult",
|
|
83245
|
+
discriminator: [
|
|
83246
|
+
4,
|
|
83247
|
+
160,
|
|
83248
|
+
91,
|
|
83249
|
+
219,
|
|
83250
|
+
142,
|
|
83251
|
+
73,
|
|
83252
|
+
75,
|
|
83253
|
+
215
|
|
83254
|
+
]
|
|
83217
83255
|
}
|
|
83218
83256
|
],
|
|
83219
83257
|
errors: [
|
|
@@ -83446,6 +83484,11 @@ var init_nara_agent_registry = __esm({
|
|
|
83446
83484
|
code: 6045,
|
|
83447
83485
|
name: "TweetAlreadyApproved",
|
|
83448
83486
|
msg: "Tweet has already been approved"
|
|
83487
|
+
},
|
|
83488
|
+
{
|
|
83489
|
+
code: 6046,
|
|
83490
|
+
name: "AgentIdReserved",
|
|
83491
|
+
msg: "Agent ID length <= 4 is reserved for admin only"
|
|
83449
83492
|
}
|
|
83450
83493
|
],
|
|
83451
83494
|
types: [
|
|
@@ -83735,11 +83778,11 @@ var init_nara_agent_registry = __esm({
|
|
|
83735
83778
|
type: "u64"
|
|
83736
83779
|
},
|
|
83737
83780
|
{
|
|
83738
|
-
name: "
|
|
83781
|
+
name: "referral_discount_bps",
|
|
83739
83782
|
type: "u64"
|
|
83740
83783
|
},
|
|
83741
83784
|
{
|
|
83742
|
-
name: "
|
|
83785
|
+
name: "referral_share_bps",
|
|
83743
83786
|
type: "u64"
|
|
83744
83787
|
},
|
|
83745
83788
|
{
|
|
@@ -83778,6 +83821,18 @@ var init_nara_agent_registry = __esm({
|
|
|
83778
83821
|
name: "tweet_verify_points",
|
|
83779
83822
|
type: "u64"
|
|
83780
83823
|
},
|
|
83824
|
+
{
|
|
83825
|
+
name: "register_fee_7",
|
|
83826
|
+
type: "u64"
|
|
83827
|
+
},
|
|
83828
|
+
{
|
|
83829
|
+
name: "register_fee_6",
|
|
83830
|
+
type: "u64"
|
|
83831
|
+
},
|
|
83832
|
+
{
|
|
83833
|
+
name: "register_fee_5",
|
|
83834
|
+
type: "u64"
|
|
83835
|
+
},
|
|
83781
83836
|
{
|
|
83782
83837
|
name: "_reserved",
|
|
83783
83838
|
type: {
|
|
@@ -83795,15 +83850,6 @@ var init_nara_agent_registry = __esm({
|
|
|
83795
83850
|
96
|
|
83796
83851
|
]
|
|
83797
83852
|
}
|
|
83798
|
-
},
|
|
83799
|
-
{
|
|
83800
|
-
name: "_reserved3",
|
|
83801
|
-
type: {
|
|
83802
|
-
array: [
|
|
83803
|
-
"u8",
|
|
83804
|
-
24
|
|
83805
|
-
]
|
|
83806
|
-
}
|
|
83807
83853
|
}
|
|
83808
83854
|
]
|
|
83809
83855
|
}
|
|
@@ -83967,6 +84013,78 @@ var init_nara_agent_registry = __esm({
|
|
|
83967
84013
|
]
|
|
83968
84014
|
}
|
|
83969
84015
|
},
|
|
84016
|
+
{
|
|
84017
|
+
name: "TwitterBindRequested",
|
|
84018
|
+
type: {
|
|
84019
|
+
kind: "struct",
|
|
84020
|
+
fields: [
|
|
84021
|
+
{
|
|
84022
|
+
name: "agent_id",
|
|
84023
|
+
type: "string"
|
|
84024
|
+
},
|
|
84025
|
+
{
|
|
84026
|
+
name: "authority",
|
|
84027
|
+
type: "pubkey"
|
|
84028
|
+
},
|
|
84029
|
+
{
|
|
84030
|
+
name: "username",
|
|
84031
|
+
type: "string"
|
|
84032
|
+
},
|
|
84033
|
+
{
|
|
84034
|
+
name: "fee",
|
|
84035
|
+
type: "u64"
|
|
84036
|
+
},
|
|
84037
|
+
{
|
|
84038
|
+
name: "is_first_bind",
|
|
84039
|
+
type: "bool"
|
|
84040
|
+
},
|
|
84041
|
+
{
|
|
84042
|
+
name: "timestamp",
|
|
84043
|
+
type: "i64"
|
|
84044
|
+
}
|
|
84045
|
+
]
|
|
84046
|
+
}
|
|
84047
|
+
},
|
|
84048
|
+
{
|
|
84049
|
+
name: "TwitterBindResult",
|
|
84050
|
+
type: {
|
|
84051
|
+
kind: "struct",
|
|
84052
|
+
fields: [
|
|
84053
|
+
{
|
|
84054
|
+
name: "agent_id",
|
|
84055
|
+
type: "string"
|
|
84056
|
+
},
|
|
84057
|
+
{
|
|
84058
|
+
name: "authority",
|
|
84059
|
+
type: "pubkey"
|
|
84060
|
+
},
|
|
84061
|
+
{
|
|
84062
|
+
name: "username",
|
|
84063
|
+
type: "string"
|
|
84064
|
+
},
|
|
84065
|
+
{
|
|
84066
|
+
name: "approved",
|
|
84067
|
+
type: "bool"
|
|
84068
|
+
},
|
|
84069
|
+
{
|
|
84070
|
+
name: "fee_refunded",
|
|
84071
|
+
type: "u64"
|
|
84072
|
+
},
|
|
84073
|
+
{
|
|
84074
|
+
name: "reward",
|
|
84075
|
+
type: "u64"
|
|
84076
|
+
},
|
|
84077
|
+
{
|
|
84078
|
+
name: "points",
|
|
84079
|
+
type: "u64"
|
|
84080
|
+
},
|
|
84081
|
+
{
|
|
84082
|
+
name: "timestamp",
|
|
84083
|
+
type: "i64"
|
|
84084
|
+
}
|
|
84085
|
+
]
|
|
84086
|
+
}
|
|
84087
|
+
},
|
|
83970
84088
|
{
|
|
83971
84089
|
name: "TwitterHandle",
|
|
83972
84090
|
serialization: "bytemuck",
|
|
@@ -83997,7 +84115,7 @@ var init_nara_agent_registry = __esm({
|
|
|
83997
84115
|
}
|
|
83998
84116
|
});
|
|
83999
84117
|
|
|
84000
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
84118
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
84001
84119
|
var agent_registry_exports = {};
|
|
84002
84120
|
__export(agent_registry_exports, {
|
|
84003
84121
|
approveTweet: () => approveTweet,
|
|
@@ -84272,9 +84390,9 @@ async function getConfig(connection, options) {
|
|
|
84272
84390
|
offset += 8;
|
|
84273
84391
|
const pointsReferral = Number(buf.readBigUInt64LE(offset));
|
|
84274
84392
|
offset += 8;
|
|
84275
|
-
const
|
|
84393
|
+
const referralDiscountBps = Number(buf.readBigUInt64LE(offset));
|
|
84276
84394
|
offset += 8;
|
|
84277
|
-
const
|
|
84395
|
+
const referralShareBps = Number(buf.readBigUInt64LE(offset));
|
|
84278
84396
|
offset += 8;
|
|
84279
84397
|
const referralRegisterPoints = Number(buf.readBigUInt64LE(offset));
|
|
84280
84398
|
offset += 8;
|
|
@@ -84293,7 +84411,13 @@ async function getConfig(connection, options) {
|
|
|
84293
84411
|
const tweetVerifyReward = Number(buf.readBigUInt64LE(offset));
|
|
84294
84412
|
offset += 8;
|
|
84295
84413
|
const tweetVerifyPoints = Number(buf.readBigUInt64LE(offset));
|
|
84296
|
-
|
|
84414
|
+
offset += 8;
|
|
84415
|
+
const registerFee7 = Number(buf.readBigUInt64LE(offset));
|
|
84416
|
+
offset += 8;
|
|
84417
|
+
const registerFee6 = Number(buf.readBigUInt64LE(offset));
|
|
84418
|
+
offset += 8;
|
|
84419
|
+
const registerFee5 = Number(buf.readBigUInt64LE(offset));
|
|
84420
|
+
return { admin, feeVault, pointMint, refereeMint, refereeActivityMint, registerFee, pointsSelf, pointsReferral, referralDiscountBps, referralShareBps, referralRegisterPoints, activityReward, referralActivityReward, twitterVerifier, twitterVerificationFee, twitterVerificationReward, twitterVerificationPoints, tweetVerifyReward, tweetVerifyPoints, registerFee7, registerFee6, registerFee5 };
|
|
84297
84421
|
}
|
|
84298
84422
|
async function registerAgent(connection, wallet, agentId, options) {
|
|
84299
84423
|
if (/[A-Z]/.test(agentId)) {
|
|
@@ -84570,10 +84694,13 @@ async function withdrawFees(connection, wallet, amount, options) {
|
|
|
84570
84694
|
const ix = await program3.methods.withdrawFees(amt).accounts({ admin: wallet.publicKey }).instruction();
|
|
84571
84695
|
return sendTx(connection, wallet, [ix]);
|
|
84572
84696
|
}
|
|
84573
|
-
async function updateRegisterFee(connection, wallet,
|
|
84697
|
+
async function updateRegisterFee(connection, wallet, fee, fee7, fee6, fee5, options) {
|
|
84574
84698
|
const program3 = createProgram(connection, wallet, options?.programId);
|
|
84575
|
-
const
|
|
84576
|
-
const
|
|
84699
|
+
const f = typeof fee === "number" ? new import_bn.default(fee) : fee;
|
|
84700
|
+
const f7 = typeof fee7 === "number" ? new import_bn.default(fee7) : fee7;
|
|
84701
|
+
const f6 = typeof fee6 === "number" ? new import_bn.default(fee6) : fee6;
|
|
84702
|
+
const f5 = typeof fee5 === "number" ? new import_bn.default(fee5) : fee5;
|
|
84703
|
+
const ix = await program3.methods.updateRegisterFee(f, f7, f6, f5).accounts({ admin: wallet.publicKey }).instruction();
|
|
84577
84704
|
return sendTx(connection, wallet, [ix]);
|
|
84578
84705
|
}
|
|
84579
84706
|
async function updatePointsConfig(connection, wallet, pointsSelf, pointsReferral, options) {
|
|
@@ -84583,12 +84710,12 @@ async function updatePointsConfig(connection, wallet, pointsSelf, pointsReferral
|
|
|
84583
84710
|
const ix = await program3.methods.updatePointsConfig(ps, pr).accounts({ admin: wallet.publicKey }).instruction();
|
|
84584
84711
|
return sendTx(connection, wallet, [ix]);
|
|
84585
84712
|
}
|
|
84586
|
-
async function updateReferralConfig(connection, wallet,
|
|
84713
|
+
async function updateReferralConfig(connection, wallet, referralDiscountBps, referralShareBps, referralRegisterPoints, options) {
|
|
84587
84714
|
const program3 = createProgram(connection, wallet, options?.programId);
|
|
84588
|
-
const
|
|
84589
|
-
const share = typeof
|
|
84715
|
+
const discount = typeof referralDiscountBps === "number" ? new import_bn.default(referralDiscountBps) : referralDiscountBps;
|
|
84716
|
+
const share = typeof referralShareBps === "number" ? new import_bn.default(referralShareBps) : referralShareBps;
|
|
84590
84717
|
const pts = typeof referralRegisterPoints === "number" ? new import_bn.default(referralRegisterPoints) : referralRegisterPoints;
|
|
84591
|
-
const ix = await program3.methods.updateReferralConfig(
|
|
84718
|
+
const ix = await program3.methods.updateReferralConfig(discount, share, pts).accounts({ admin: wallet.publicKey }).instruction();
|
|
84592
84719
|
return sendTx(connection, wallet, [ix]);
|
|
84593
84720
|
}
|
|
84594
84721
|
async function updateActivityConfig(connection, wallet, activityReward, referralActivityReward, options) {
|
|
@@ -84814,7 +84941,7 @@ async function rejectTweet(connection, wallet, agentId, options) {
|
|
|
84814
84941
|
}
|
|
84815
84942
|
var import_web389, anchor, import_anchor, import_bn, DEFAULT_CHUNK_SIZE, BUFFER_HEADER_SIZE, MEMORY_HEADER_SIZE, BIO_META_HEADER_SIZE;
|
|
84816
84943
|
var init_agent_registry = __esm({
|
|
84817
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
84944
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
84818
84945
|
import_web389 = __toESM(require_index_cjs(), 1);
|
|
84819
84946
|
anchor = __toESM(require_cjs2(), 1);
|
|
84820
84947
|
import_anchor = __toESM(require_cjs2(), 1);
|
|
@@ -164575,7 +164702,7 @@ var init_main3 = __esm({
|
|
|
164575
164702
|
}
|
|
164576
164703
|
});
|
|
164577
164704
|
|
|
164578
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
164705
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
164579
164706
|
var quest_exports = {};
|
|
164580
164707
|
__export(quest_exports, {
|
|
164581
164708
|
adjustFreeStake: () => adjustFreeStake,
|
|
@@ -165064,7 +165191,7 @@ async function adjustFreeStake(connection, wallet, user, delta, reason, options)
|
|
|
165064
165191
|
}
|
|
165065
165192
|
var import_web390, anchor2, import_anchor2, import_bn2, import_meta, BN254_FIELD, WSOL_MINT;
|
|
165066
165193
|
var init_quest = __esm({
|
|
165067
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
165194
|
+
"node_modules/.pnpm/nara-sdk@1.0.65_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"() {
|
|
165068
165195
|
import_web390 = __toESM(require_index_cjs(), 1);
|
|
165069
165196
|
init_esm2();
|
|
165070
165197
|
anchor2 = __toESM(require_cjs2(), 1);
|
|
@@ -165371,7 +165498,7 @@ var esm_default = base;
|
|
|
165371
165498
|
var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
165372
165499
|
var esm_default2 = esm_default(ALPHABET);
|
|
165373
165500
|
|
|
165374
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165501
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
165375
165502
|
var import_web387 = __toESM(require_index_cjs(), 1);
|
|
165376
165503
|
var NaraSDK = class {
|
|
165377
165504
|
connection;
|
|
@@ -165386,10 +165513,10 @@ var NaraSDK = class {
|
|
|
165386
165513
|
}
|
|
165387
165514
|
};
|
|
165388
165515
|
|
|
165389
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165516
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
165390
165517
|
init_constants2();
|
|
165391
165518
|
|
|
165392
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165519
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
165393
165520
|
var import_tweetnacl = __toESM(require_nacl_fast(), 1);
|
|
165394
165521
|
function buildSignMessage(params) {
|
|
165395
165522
|
return Object.keys(params).filter((k2) => k2 !== "sign").sort().map((k2) => `${k2}=${params[k2]}`).join("&");
|
|
@@ -165417,17 +165544,17 @@ function signUrl(baseUrl, wallet, params) {
|
|
|
165417
165544
|
return url.toString();
|
|
165418
165545
|
}
|
|
165419
165546
|
|
|
165420
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165547
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
165421
165548
|
init_tx();
|
|
165422
165549
|
init_quest();
|
|
165423
165550
|
|
|
165424
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165551
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
165425
165552
|
var import_web391 = __toESM(require_index_cjs(), 1);
|
|
165426
165553
|
var anchor3 = __toESM(require_cjs2(), 1);
|
|
165427
165554
|
var import_anchor3 = __toESM(require_cjs2(), 1);
|
|
165428
165555
|
init_constants2();
|
|
165429
165556
|
|
|
165430
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
165557
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
165431
165558
|
var nara_skills_hub_default = {
|
|
165432
165559
|
address: "SkiLLHub11111111111111111111111111111111111",
|
|
165433
165560
|
metadata: {
|
|
@@ -166407,7 +166534,7 @@ var nara_skills_hub_default = {
|
|
|
166407
166534
|
{
|
|
166408
166535
|
code: 6e3,
|
|
166409
166536
|
name: "NameTooShort",
|
|
166410
|
-
msg: "Name too short: min
|
|
166537
|
+
msg: "Name too short: min 4 bytes"
|
|
166411
166538
|
},
|
|
166412
166539
|
{
|
|
166413
166540
|
code: 6001,
|
|
@@ -166789,7 +166916,7 @@ var nara_skills_hub_default = {
|
|
|
166789
166916
|
{
|
|
166790
166917
|
name: "name",
|
|
166791
166918
|
docs: [
|
|
166792
|
-
"Globally unique name (min
|
|
166919
|
+
"Globally unique name (min 4 bytes, max 32 bytes)."
|
|
166793
166920
|
],
|
|
166794
166921
|
type: {
|
|
166795
166922
|
array: [
|
|
@@ -166825,7 +166952,7 @@ var nara_skills_hub_default = {
|
|
|
166825
166952
|
]
|
|
166826
166953
|
};
|
|
166827
166954
|
|
|
166828
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
166955
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
166829
166956
|
init_tx();
|
|
166830
166957
|
var DEFAULT_CHUNK_SIZE2 = 800;
|
|
166831
166958
|
var BUFFER_HEADER_SIZE2 = 144;
|
|
@@ -167060,7 +167187,7 @@ async function uploadSkillContent(connection, wallet, name, content, options) {
|
|
|
167060
167187
|
}
|
|
167061
167188
|
}
|
|
167062
167189
|
|
|
167063
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
167190
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
167064
167191
|
var import_web392 = __toESM(require_index_cjs(), 1);
|
|
167065
167192
|
var anchor4 = __toESM(require_cjs2(), 1);
|
|
167066
167193
|
var import_anchor4 = __toESM(require_cjs2(), 1);
|
|
@@ -167070,7 +167197,7 @@ var import_bn3 = __toESM(require_bn(), 1);
|
|
|
167070
167197
|
init_constants2();
|
|
167071
167198
|
init_tx();
|
|
167072
167199
|
|
|
167073
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
167200
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
167074
167201
|
var nara_zk_default = {
|
|
167075
167202
|
address: "ZKidentity111111111111111111111111111111111",
|
|
167076
167203
|
metadata: {
|
|
@@ -168281,7 +168408,7 @@ var nara_zk_default = {
|
|
|
168281
168408
|
]
|
|
168282
168409
|
};
|
|
168283
168410
|
|
|
168284
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
168411
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_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
|
|
168285
168412
|
var import_meta2 = {};
|
|
168286
168413
|
var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
168287
168414
|
var MERKLE_LEVELS = 64;
|
|
@@ -168628,7 +168755,7 @@ async function transferZkIdByCommitment(connection, payer, name, currentIdSecret
|
|
|
168628
168755
|
return sendTx(connection, payer, [ix]);
|
|
168629
168756
|
}
|
|
168630
168757
|
|
|
168631
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
168758
|
+
// node_modules/.pnpm/nara-sdk@1.0.65_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
168632
168759
|
init_agent_registry();
|
|
168633
168760
|
var import_web393 = __toESM(require_index_cjs(), 1);
|
|
168634
168761
|
var import_bn4 = __toESM(require_bn(), 1);
|
|
@@ -169502,6 +169629,8 @@ async function handleQuestGet(options) {
|
|
|
169502
169629
|
);
|
|
169503
169630
|
if (stakeRequired) {
|
|
169504
169631
|
console.log(` Stake requirement: ${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA (decays ${quest.stakeHigh} \u2192 ${quest.stakeLow})`);
|
|
169632
|
+
} else if (options.verbose) {
|
|
169633
|
+
console.log(` Stake requirement: none (${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA, decays ${quest.stakeHigh} \u2192 ${quest.stakeLow})`);
|
|
169505
169634
|
} else {
|
|
169506
169635
|
console.log(` Stake requirement: none`);
|
|
169507
169636
|
}
|
|
@@ -169764,10 +169893,10 @@ function handleSubmitError(err) {
|
|
|
169764
169893
|
}
|
|
169765
169894
|
function registerQuestCommands(program3) {
|
|
169766
169895
|
const quest = program3.command("quest").description("PoMI quest commands \u2014 mine NARA by answering on-chain quests with ZK proofs");
|
|
169767
|
-
quest.command("get").description("Get current quest info (question, deadline, difficulty, stake requirement)").action(async (
|
|
169896
|
+
quest.command("get").description("Get current quest info (question, deadline, difficulty, stake requirement)").option("-v, --verbose", "Show stake details even when not required").action(async (opts, cmd) => {
|
|
169768
169897
|
try {
|
|
169769
169898
|
const globalOpts = cmd.optsWithGlobals();
|
|
169770
|
-
await handleQuestGet(globalOpts);
|
|
169899
|
+
await handleQuestGet({ ...globalOpts, verbose: opts.verbose });
|
|
169771
169900
|
} catch (error) {
|
|
169772
169901
|
printError(error.message);
|
|
169773
169902
|
process.exit(1);
|
|
@@ -172227,7 +172356,7 @@ async function handleAgentGet(agentId, options) {
|
|
|
172227
172356
|
if (tv) {
|
|
172228
172357
|
tweetVerifyData = {
|
|
172229
172358
|
tweetId: tv.tweetId.toString(),
|
|
172230
|
-
status:
|
|
172359
|
+
status: TWEET_VERIFY_STATUS[tv.status] ?? `unknown(${tv.status})`,
|
|
172231
172360
|
submittedAt: tv.submittedAt ? new Date(tv.submittedAt * 1e3).toISOString() : null,
|
|
172232
172361
|
lastRewardedAt: tv.lastRewardedAt ? new Date(tv.lastRewardedAt * 1e3).toISOString() : null
|
|
172233
172362
|
};
|
|
@@ -172263,7 +172392,8 @@ async function handleAgentGet(agentId, options) {
|
|
|
172263
172392
|
console.log(` Twitter: (none)`);
|
|
172264
172393
|
}
|
|
172265
172394
|
if (tweetVerifyData) {
|
|
172266
|
-
|
|
172395
|
+
const verified = tweetVerifyData.lastRewardedAt ? "verified" : "unverified";
|
|
172396
|
+
console.log(` Tweet: ${tweetVerifyData.tweetId} (${verified})`);
|
|
172267
172397
|
if (tweetVerifyData.lastRewardedAt) console.log(` Tweet last rewarded: ${tweetVerifyData.lastRewardedAt}`);
|
|
172268
172398
|
}
|
|
172269
172399
|
console.log("");
|
|
@@ -172272,16 +172402,16 @@ async function handleAgentGet(agentId, options) {
|
|
|
172272
172402
|
const lastRewarded = new Date(tweetVerifyData.lastRewardedAt).getTime();
|
|
172273
172403
|
const hoursAgo = (Date.now() - lastRewarded) / (1e3 * 60 * 60);
|
|
172274
172404
|
if (hoursAgo >= 24) {
|
|
172275
|
-
|
|
172276
|
-
console.log(`
|
|
172405
|
+
const h2 = Math.floor(hoursAgo);
|
|
172406
|
+
console.log(` Tip: Last tweet verified ${h2}h ago (>24h). You can submit a new tweet to earn more stake-free credits.`);
|
|
172277
172407
|
} else {
|
|
172278
172408
|
const hoursLeft = Math.ceil(24 - hoursAgo);
|
|
172279
172409
|
console.log(` Tip: Next tweet verification available in ~${hoursLeft}h.`);
|
|
172280
172410
|
}
|
|
172281
172411
|
} else {
|
|
172282
172412
|
console.log(` Tip: Submit a tweet to earn stake-free PoMI mining credits!`);
|
|
172283
|
-
console.log(` npx naracli agent submit-tweet <tweet-url>`);
|
|
172284
172413
|
}
|
|
172414
|
+
console.log(` npx naracli agent submit-tweet <tweet-url>`);
|
|
172285
172415
|
console.log(` Stake-free credits are based on tweet likes, bookmarks, retweets, and quotes.`);
|
|
172286
172416
|
console.log("");
|
|
172287
172417
|
} else {
|
|
@@ -172466,6 +172596,7 @@ async function handleAgentClear(options) {
|
|
|
172466
172596
|
}
|
|
172467
172597
|
}
|
|
172468
172598
|
var TWITTER_STATUS = { 0: "none", 1: "pending", 2: "verified", 3: "rejected" };
|
|
172599
|
+
var TWEET_VERIFY_STATUS = { 0: "ready", 1: "pending", 2: "approved", 3: "rejected" };
|
|
172469
172600
|
function parseTweetUrl(url) {
|
|
172470
172601
|
const m = url.match(/^https?:\/\/(?:x\.com|twitter\.com)\/([A-Za-z0-9_]+)\/status\/(\d+)/);
|
|
172471
172602
|
if (!m) {
|
|
@@ -172525,8 +172656,11 @@ async function handleAgentConfig(options) {
|
|
|
172525
172656
|
const config = await getConfig(connection);
|
|
172526
172657
|
const data = {
|
|
172527
172658
|
registerFee: config.registerFee / DECIMALS,
|
|
172528
|
-
|
|
172529
|
-
|
|
172659
|
+
registerFee7: config.registerFee7 / DECIMALS,
|
|
172660
|
+
registerFee6: config.registerFee6 / DECIMALS,
|
|
172661
|
+
registerFee5: config.registerFee5 / DECIMALS,
|
|
172662
|
+
referralDiscountBps: config.referralDiscountBps,
|
|
172663
|
+
referralShareBps: config.referralShareBps,
|
|
172530
172664
|
activityReward: config.activityReward / DECIMALS,
|
|
172531
172665
|
referralActivityReward: config.referralActivityReward / DECIMALS,
|
|
172532
172666
|
pointsSelf: config.pointsSelf,
|
|
@@ -172542,9 +172676,12 @@ async function handleAgentConfig(options) {
|
|
|
172542
172676
|
formatOutput(data, true);
|
|
172543
172677
|
} else {
|
|
172544
172678
|
console.log("");
|
|
172545
|
-
console.log(` Register Fee:
|
|
172546
|
-
console.log(`
|
|
172547
|
-
console.log(`
|
|
172679
|
+
console.log(` Register Fee (8+ chars): ${data.registerFee} NARA (${config.registerFee} lamports)`);
|
|
172680
|
+
console.log(` Register Fee (7 chars): ${data.registerFee7} NARA (${config.registerFee7} lamports)`);
|
|
172681
|
+
console.log(` Register Fee (6 chars): ${data.registerFee6} NARA (${config.registerFee6} lamports)`);
|
|
172682
|
+
console.log(` Register Fee (5 chars): ${data.registerFee5} NARA (${config.registerFee5} lamports)`);
|
|
172683
|
+
console.log(` Referral Discount: ${config.referralDiscountBps / 100}% (${config.referralDiscountBps} BPS)`);
|
|
172684
|
+
console.log(` Referral Share: ${config.referralShareBps / 100}% (${config.referralShareBps} BPS)`);
|
|
172548
172685
|
console.log(` Activity Reward: ${data.activityReward} NARA (${config.activityReward} lamports)`);
|
|
172549
172686
|
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA (${config.referralActivityReward} lamports)`);
|
|
172550
172687
|
console.log(` Points (self): ${data.pointsSelf}`);
|
|
@@ -172560,7 +172697,7 @@ async function handleAgentConfig(options) {
|
|
|
172560
172697
|
}
|
|
172561
172698
|
function registerAgentCommands(program3) {
|
|
172562
172699
|
const agent = program3.command("agent").description("Agent Registry \u2014 register an on-chain AI agent identity to earn extra rewards and points from PoMI mining");
|
|
172563
|
-
agent.command("register <agent-id>").description("Register a new agent on-chain (
|
|
172700
|
+
agent.command("register <agent-id>").description("Register a new agent on-chain (free for 8+ char IDs, shorter IDs cost NARA, 50% off with referral \u2014 see 'agent config'). Lowercase alphanumeric with hyphens.").option("--referral <agent-id>", "Referral agent ID \u2014 saves 50% on registration fee").action(async (agentId, opts, cmd) => {
|
|
172564
172701
|
try {
|
|
172565
172702
|
const globalOpts = cmd.optsWithGlobals();
|
|
172566
172703
|
await handleAgentRegister(agentId, { ...globalOpts, ...opts });
|
|
@@ -173053,7 +173190,7 @@ function registerCommands(program3) {
|
|
|
173053
173190
|
}
|
|
173054
173191
|
|
|
173055
173192
|
// bin/nara-cli.ts
|
|
173056
|
-
var version2 = true ? "1.0.
|
|
173193
|
+
var version2 = true ? "1.0.68" : "dev";
|
|
173057
173194
|
var program2 = new Command();
|
|
173058
173195
|
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);
|
|
173059
173196
|
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.68",
|
|
4
4
|
"description": "CLI for the Nara chain (Solana-compatible)",
|
|
5
5
|
"homepage": "https://nara.build",
|
|
6
6
|
"repository": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"bs58": "^6.0.0",
|
|
64
64
|
"commander": "^12.1.0",
|
|
65
65
|
"ed25519-hd-key": "^1.3.0",
|
|
66
|
-
"nara-sdk": "^1.0.
|
|
66
|
+
"nara-sdk": "^1.0.65",
|
|
67
67
|
"picocolors": "^1.1.1"
|
|
68
68
|
},
|
|
69
69
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
|
@@ -126,7 +126,7 @@ async function handleAgentGet(agentId: string, options: GlobalOptions) {
|
|
|
126
126
|
if (tv) {
|
|
127
127
|
tweetVerifyData = {
|
|
128
128
|
tweetId: tv.tweetId.toString(),
|
|
129
|
-
status:
|
|
129
|
+
status: TWEET_VERIFY_STATUS[tv.status] ?? `unknown(${tv.status})`,
|
|
130
130
|
submittedAt: tv.submittedAt ? new Date(tv.submittedAt * 1000).toISOString() : null,
|
|
131
131
|
lastRewardedAt: tv.lastRewardedAt ? new Date(tv.lastRewardedAt * 1000).toISOString() : null,
|
|
132
132
|
};
|
|
@@ -167,7 +167,8 @@ async function handleAgentGet(agentId: string, options: GlobalOptions) {
|
|
|
167
167
|
}
|
|
168
168
|
// Tweet verification
|
|
169
169
|
if (tweetVerifyData) {
|
|
170
|
-
|
|
170
|
+
const verified = tweetVerifyData.lastRewardedAt ? "verified" : "unverified";
|
|
171
|
+
console.log(` Tweet: ${tweetVerifyData.tweetId} (${verified})`);
|
|
171
172
|
if (tweetVerifyData.lastRewardedAt) console.log(` Tweet last rewarded: ${tweetVerifyData.lastRewardedAt}`);
|
|
172
173
|
}
|
|
173
174
|
console.log("");
|
|
@@ -177,16 +178,16 @@ async function handleAgentGet(agentId: string, options: GlobalOptions) {
|
|
|
177
178
|
const lastRewarded = new Date(tweetVerifyData.lastRewardedAt).getTime();
|
|
178
179
|
const hoursAgo = (Date.now() - lastRewarded) / (1000 * 60 * 60);
|
|
179
180
|
if (hoursAgo >= 24) {
|
|
180
|
-
|
|
181
|
-
console.log(`
|
|
181
|
+
const h = Math.floor(hoursAgo);
|
|
182
|
+
console.log(` Tip: Last tweet verified ${h}h ago (>24h). You can submit a new tweet to earn more stake-free credits.`);
|
|
182
183
|
} else {
|
|
183
184
|
const hoursLeft = Math.ceil(24 - hoursAgo);
|
|
184
185
|
console.log(` Tip: Next tweet verification available in ~${hoursLeft}h.`);
|
|
185
186
|
}
|
|
186
187
|
} else {
|
|
187
188
|
console.log(` Tip: Submit a tweet to earn stake-free PoMI mining credits!`);
|
|
188
|
-
console.log(` npx naracli agent submit-tweet <tweet-url>`);
|
|
189
189
|
}
|
|
190
|
+
console.log(` npx naracli agent submit-tweet <tweet-url>`);
|
|
190
191
|
console.log(` Stake-free credits are based on tweet likes, bookmarks, retweets, and quotes.`);
|
|
191
192
|
console.log("");
|
|
192
193
|
} else {
|
|
@@ -415,6 +416,7 @@ async function handleAgentClear(options: GlobalOptions) {
|
|
|
415
416
|
// ─── Twitter handlers ────────────────────────────────────────────
|
|
416
417
|
|
|
417
418
|
const TWITTER_STATUS: Record<number, string> = { 0: "none", 1: "pending", 2: "verified", 3: "rejected" };
|
|
419
|
+
const TWEET_VERIFY_STATUS: Record<number, string> = { 0: "ready", 1: "pending", 2: "approved", 3: "rejected" };
|
|
418
420
|
|
|
419
421
|
/** Parse tweet URL and extract username + tweetId. Accepts https://x.com/<username>/status/<id> or https://twitter.com/<username>/status/<id>. */
|
|
420
422
|
function parseTweetUrl(url: string): { username: string; tweetId: bigint; tweetUrl: string } {
|
|
@@ -490,8 +492,11 @@ async function handleAgentConfig(options: GlobalOptions) {
|
|
|
490
492
|
|
|
491
493
|
const data = {
|
|
492
494
|
registerFee: config.registerFee / DECIMALS,
|
|
493
|
-
|
|
494
|
-
|
|
495
|
+
registerFee7: config.registerFee7 / DECIMALS,
|
|
496
|
+
registerFee6: config.registerFee6 / DECIMALS,
|
|
497
|
+
registerFee5: config.registerFee5 / DECIMALS,
|
|
498
|
+
referralDiscountBps: config.referralDiscountBps,
|
|
499
|
+
referralShareBps: config.referralShareBps,
|
|
495
500
|
activityReward: config.activityReward / DECIMALS,
|
|
496
501
|
referralActivityReward: config.referralActivityReward / DECIMALS,
|
|
497
502
|
pointsSelf: config.pointsSelf,
|
|
@@ -508,9 +513,12 @@ async function handleAgentConfig(options: GlobalOptions) {
|
|
|
508
513
|
formatOutput(data, true);
|
|
509
514
|
} else {
|
|
510
515
|
console.log("");
|
|
511
|
-
console.log(` Register Fee:
|
|
512
|
-
console.log(`
|
|
513
|
-
console.log(`
|
|
516
|
+
console.log(` Register Fee (8+ chars): ${data.registerFee} NARA (${config.registerFee} lamports)`);
|
|
517
|
+
console.log(` Register Fee (7 chars): ${data.registerFee7} NARA (${config.registerFee7} lamports)`);
|
|
518
|
+
console.log(` Register Fee (6 chars): ${data.registerFee6} NARA (${config.registerFee6} lamports)`);
|
|
519
|
+
console.log(` Register Fee (5 chars): ${data.registerFee5} NARA (${config.registerFee5} lamports)`);
|
|
520
|
+
console.log(` Referral Discount: ${config.referralDiscountBps / 100}% (${config.referralDiscountBps} BPS)`);
|
|
521
|
+
console.log(` Referral Share: ${config.referralShareBps / 100}% (${config.referralShareBps} BPS)`);
|
|
514
522
|
console.log(` Activity Reward: ${data.activityReward} NARA (${config.activityReward} lamports)`);
|
|
515
523
|
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA (${config.referralActivityReward} lamports)`);
|
|
516
524
|
console.log(` Points (self): ${data.pointsSelf}`);
|
|
@@ -554,7 +562,7 @@ export function registerAgentCommands(program: Command): void {
|
|
|
554
562
|
// agent register
|
|
555
563
|
agent
|
|
556
564
|
.command("register <agent-id>")
|
|
557
|
-
.description("Register a new agent on-chain (
|
|
565
|
+
.description("Register a new agent on-chain (free for 8+ char IDs, shorter IDs cost NARA, 50% off with referral — see 'agent config'). Lowercase alphanumeric with hyphens.")
|
|
558
566
|
.option("--referral <agent-id>", "Referral agent ID — saves 50% on registration fee")
|
|
559
567
|
.action(async (agentId: string, opts: { referral?: string }, cmd: Command) => {
|
|
560
568
|
try {
|
|
@@ -80,7 +80,7 @@ function formatTimeRemaining(seconds: number): string {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// ─── Command: quest get ──────────────────────────────────────────
|
|
83
|
-
async function handleQuestGet(options: GlobalOptions) {
|
|
83
|
+
async function handleQuestGet(options: GlobalOptions & { verbose?: boolean }) {
|
|
84
84
|
const rpcUrl = getRpcUrl(options.rpcUrl);
|
|
85
85
|
const connection = new Connection(rpcUrl, "confirmed");
|
|
86
86
|
|
|
@@ -162,6 +162,8 @@ async function handleQuestGet(options: GlobalOptions) {
|
|
|
162
162
|
);
|
|
163
163
|
if (stakeRequired) {
|
|
164
164
|
console.log(` Stake requirement: ${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA (decays ${quest.stakeHigh} → ${quest.stakeLow})`);
|
|
165
|
+
} else if (options.verbose) {
|
|
166
|
+
console.log(` Stake requirement: none (${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA, decays ${quest.stakeHigh} → ${quest.stakeLow})`);
|
|
165
167
|
} else {
|
|
166
168
|
console.log(` Stake requirement: none`);
|
|
167
169
|
}
|
|
@@ -483,10 +485,11 @@ export function registerQuestCommands(program: Command): void {
|
|
|
483
485
|
quest
|
|
484
486
|
.command("get")
|
|
485
487
|
.description("Get current quest info (question, deadline, difficulty, stake requirement)")
|
|
486
|
-
.
|
|
488
|
+
.option("-v, --verbose", "Show stake details even when not required")
|
|
489
|
+
.action(async (opts: any, cmd: Command) => {
|
|
487
490
|
try {
|
|
488
491
|
const globalOpts = cmd.optsWithGlobals() as GlobalOptions;
|
|
489
|
-
await handleQuestGet(globalOpts);
|
|
492
|
+
await handleQuestGet({ ...globalOpts, verbose: opts.verbose });
|
|
490
493
|
} catch (error: any) {
|
|
491
494
|
printError(error.message);
|
|
492
495
|
process.exit(1);
|