naracli 1.0.61 → 1.0.63
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 +209 -40
- package/package.json +2 -2
- package/src/cli/commands/agent.ts +8 -8
- package/src/cli/commands/quest.ts +17 -4
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.57_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.57_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.57_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.57_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.57_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
|
|
77209
77209
|
var nara_agent_registry_default;
|
|
77210
77210
|
var init_nara_agent_registry = __esm({
|
|
77211
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
77211
|
+
"node_modules/.pnpm/nara-sdk@1.0.57_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"() {
|
|
77212
77212
|
nara_agent_registry_default = {
|
|
77213
77213
|
address: "AgentRegistry111111111111111111111111111111",
|
|
77214
77214
|
metadata: {
|
|
@@ -81947,7 +81947,7 @@ var init_nara_agent_registry = __esm({
|
|
|
81947
81947
|
}
|
|
81948
81948
|
});
|
|
81949
81949
|
|
|
81950
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
81950
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
81951
81951
|
var agent_registry_exports = {};
|
|
81952
81952
|
__export(agent_registry_exports, {
|
|
81953
81953
|
approveTweet: () => approveTweet,
|
|
@@ -82647,7 +82647,7 @@ async function rejectTweet(connection, wallet, agentId, options) {
|
|
|
82647
82647
|
}
|
|
82648
82648
|
var import_web389, anchor, import_anchor, DEFAULT_CHUNK_SIZE, BUFFER_HEADER_SIZE, MEMORY_HEADER_SIZE, BIO_META_HEADER_SIZE;
|
|
82649
82649
|
var init_agent_registry = __esm({
|
|
82650
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
82650
|
+
"node_modules/.pnpm/nara-sdk@1.0.57_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"() {
|
|
82651
82651
|
import_web389 = __toESM(require_index_cjs(), 1);
|
|
82652
82652
|
anchor = __toESM(require_cjs2(), 1);
|
|
82653
82653
|
import_anchor = __toESM(require_cjs2(), 1);
|
|
@@ -127022,7 +127022,7 @@ var esm_default = base;
|
|
|
127022
127022
|
var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
127023
127023
|
var esm_default2 = esm_default(ALPHABET);
|
|
127024
127024
|
|
|
127025
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127025
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
127026
127026
|
var import_web387 = __toESM(require_index_cjs(), 1);
|
|
127027
127027
|
var NaraSDK = class {
|
|
127028
127028
|
connection;
|
|
@@ -127037,10 +127037,10 @@ var NaraSDK = class {
|
|
|
127037
127037
|
}
|
|
127038
127038
|
};
|
|
127039
127039
|
|
|
127040
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127040
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
127041
127041
|
init_constants2();
|
|
127042
127042
|
|
|
127043
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127043
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
127044
127044
|
var import_tweetnacl = __toESM(require_nacl_fast(), 1);
|
|
127045
127045
|
function buildSignMessage(params) {
|
|
127046
127046
|
return Object.keys(params).filter((k2) => k2 !== "sign").sort().map((k2) => `${k2}=${params[k2]}`).join("&");
|
|
@@ -127068,10 +127068,10 @@ function signUrl(baseUrl, wallet, params) {
|
|
|
127068
127068
|
return url.toString();
|
|
127069
127069
|
}
|
|
127070
127070
|
|
|
127071
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127071
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
127072
127072
|
init_tx();
|
|
127073
127073
|
|
|
127074
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127074
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
127075
127075
|
var import_web390 = __toESM(require_index_cjs(), 1);
|
|
127076
127076
|
init_esm2();
|
|
127077
127077
|
var anchor2 = __toESM(require_cjs2(), 1);
|
|
@@ -127080,7 +127080,7 @@ var import_bn = __toESM(require_bn(), 1);
|
|
|
127080
127080
|
init_constants2();
|
|
127081
127081
|
init_tx();
|
|
127082
127082
|
|
|
127083
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
127083
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
127084
127084
|
var nara_quest_default = {
|
|
127085
127085
|
address: "Quest11111111111111111111111111111111111111",
|
|
127086
127086
|
metadata: {
|
|
@@ -127090,6 +127090,95 @@ var nara_quest_default = {
|
|
|
127090
127090
|
description: "Created with Anchor"
|
|
127091
127091
|
},
|
|
127092
127092
|
instructions: [
|
|
127093
|
+
{
|
|
127094
|
+
name: "adjust_free_stake",
|
|
127095
|
+
discriminator: [
|
|
127096
|
+
21,
|
|
127097
|
+
111,
|
|
127098
|
+
164,
|
|
127099
|
+
64,
|
|
127100
|
+
220,
|
|
127101
|
+
115,
|
|
127102
|
+
26,
|
|
127103
|
+
60
|
|
127104
|
+
],
|
|
127105
|
+
accounts: [
|
|
127106
|
+
{
|
|
127107
|
+
name: "game_config",
|
|
127108
|
+
pda: {
|
|
127109
|
+
seeds: [
|
|
127110
|
+
{
|
|
127111
|
+
kind: "const",
|
|
127112
|
+
value: [
|
|
127113
|
+
113,
|
|
127114
|
+
117,
|
|
127115
|
+
101,
|
|
127116
|
+
115,
|
|
127117
|
+
116,
|
|
127118
|
+
95,
|
|
127119
|
+
99,
|
|
127120
|
+
111,
|
|
127121
|
+
110,
|
|
127122
|
+
102,
|
|
127123
|
+
105,
|
|
127124
|
+
103
|
|
127125
|
+
]
|
|
127126
|
+
}
|
|
127127
|
+
]
|
|
127128
|
+
}
|
|
127129
|
+
},
|
|
127130
|
+
{
|
|
127131
|
+
name: "stake_record",
|
|
127132
|
+
writable: true,
|
|
127133
|
+
pda: {
|
|
127134
|
+
seeds: [
|
|
127135
|
+
{
|
|
127136
|
+
kind: "const",
|
|
127137
|
+
value: [
|
|
127138
|
+
113,
|
|
127139
|
+
117,
|
|
127140
|
+
101,
|
|
127141
|
+
115,
|
|
127142
|
+
116,
|
|
127143
|
+
95,
|
|
127144
|
+
115,
|
|
127145
|
+
116,
|
|
127146
|
+
97,
|
|
127147
|
+
107,
|
|
127148
|
+
101
|
|
127149
|
+
]
|
|
127150
|
+
},
|
|
127151
|
+
{
|
|
127152
|
+
kind: "account",
|
|
127153
|
+
path: "user"
|
|
127154
|
+
}
|
|
127155
|
+
]
|
|
127156
|
+
}
|
|
127157
|
+
},
|
|
127158
|
+
{
|
|
127159
|
+
name: "user"
|
|
127160
|
+
},
|
|
127161
|
+
{
|
|
127162
|
+
name: "caller",
|
|
127163
|
+
writable: true,
|
|
127164
|
+
signer: true
|
|
127165
|
+
},
|
|
127166
|
+
{
|
|
127167
|
+
name: "system_program",
|
|
127168
|
+
address: "11111111111111111111111111111111"
|
|
127169
|
+
}
|
|
127170
|
+
],
|
|
127171
|
+
args: [
|
|
127172
|
+
{
|
|
127173
|
+
name: "delta",
|
|
127174
|
+
type: "i32"
|
|
127175
|
+
},
|
|
127176
|
+
{
|
|
127177
|
+
name: "reason",
|
|
127178
|
+
type: "string"
|
|
127179
|
+
}
|
|
127180
|
+
]
|
|
127181
|
+
},
|
|
127093
127182
|
{
|
|
127094
127183
|
name: "create_question",
|
|
127095
127184
|
discriminator: [
|
|
@@ -127545,6 +127634,56 @@ var nara_quest_default = {
|
|
|
127545
127634
|
}
|
|
127546
127635
|
]
|
|
127547
127636
|
},
|
|
127637
|
+
{
|
|
127638
|
+
name: "set_stake_authority",
|
|
127639
|
+
discriminator: [
|
|
127640
|
+
202,
|
|
127641
|
+
75,
|
|
127642
|
+
225,
|
|
127643
|
+
146,
|
|
127644
|
+
240,
|
|
127645
|
+
65,
|
|
127646
|
+
15,
|
|
127647
|
+
60
|
|
127648
|
+
],
|
|
127649
|
+
accounts: [
|
|
127650
|
+
{
|
|
127651
|
+
name: "game_config",
|
|
127652
|
+
writable: true,
|
|
127653
|
+
pda: {
|
|
127654
|
+
seeds: [
|
|
127655
|
+
{
|
|
127656
|
+
kind: "const",
|
|
127657
|
+
value: [
|
|
127658
|
+
113,
|
|
127659
|
+
117,
|
|
127660
|
+
101,
|
|
127661
|
+
115,
|
|
127662
|
+
116,
|
|
127663
|
+
95,
|
|
127664
|
+
99,
|
|
127665
|
+
111,
|
|
127666
|
+
110,
|
|
127667
|
+
102,
|
|
127668
|
+
105,
|
|
127669
|
+
103
|
|
127670
|
+
]
|
|
127671
|
+
}
|
|
127672
|
+
]
|
|
127673
|
+
}
|
|
127674
|
+
},
|
|
127675
|
+
{
|
|
127676
|
+
name: "authority",
|
|
127677
|
+
signer: true
|
|
127678
|
+
}
|
|
127679
|
+
],
|
|
127680
|
+
args: [
|
|
127681
|
+
{
|
|
127682
|
+
name: "new_stake_authority",
|
|
127683
|
+
type: "pubkey"
|
|
127684
|
+
}
|
|
127685
|
+
]
|
|
127686
|
+
},
|
|
127548
127687
|
{
|
|
127549
127688
|
name: "set_stake_config",
|
|
127550
127689
|
discriminator: [
|
|
@@ -128552,6 +128691,16 @@ var nara_quest_default = {
|
|
|
128552
128691
|
code: 6015,
|
|
128553
128692
|
name: "InvalidRewardPerShare",
|
|
128554
128693
|
msg: "Invalid reward config: reward_per_share and extra_reward cannot both be 0"
|
|
128694
|
+
},
|
|
128695
|
+
{
|
|
128696
|
+
code: 6016,
|
|
128697
|
+
name: "InvalidDelta",
|
|
128698
|
+
msg: "Delta must not be zero"
|
|
128699
|
+
},
|
|
128700
|
+
{
|
|
128701
|
+
code: 6017,
|
|
128702
|
+
name: "FreeCreditsOverflow",
|
|
128703
|
+
msg: "Free credits overflow"
|
|
128555
128704
|
}
|
|
128556
128705
|
],
|
|
128557
128706
|
types: [
|
|
@@ -128636,12 +128785,16 @@ var nara_quest_default = {
|
|
|
128636
128785
|
name: "extra_reward",
|
|
128637
128786
|
type: "u64"
|
|
128638
128787
|
},
|
|
128788
|
+
{
|
|
128789
|
+
name: "stake_authority",
|
|
128790
|
+
type: "pubkey"
|
|
128791
|
+
},
|
|
128639
128792
|
{
|
|
128640
128793
|
name: "_padding",
|
|
128641
128794
|
type: {
|
|
128642
128795
|
array: [
|
|
128643
128796
|
"u8",
|
|
128644
|
-
|
|
128797
|
+
32
|
|
128645
128798
|
]
|
|
128646
128799
|
}
|
|
128647
128800
|
}
|
|
@@ -128731,12 +128884,16 @@ var nara_quest_default = {
|
|
|
128731
128884
|
name: "stake_round",
|
|
128732
128885
|
type: "u64"
|
|
128733
128886
|
},
|
|
128887
|
+
{
|
|
128888
|
+
name: "free_credits",
|
|
128889
|
+
type: "u32"
|
|
128890
|
+
},
|
|
128734
128891
|
{
|
|
128735
128892
|
name: "_padding",
|
|
128736
128893
|
type: {
|
|
128737
128894
|
array: [
|
|
128738
128895
|
"u8",
|
|
128739
|
-
|
|
128896
|
+
60
|
|
128740
128897
|
]
|
|
128741
128898
|
}
|
|
128742
128899
|
}
|
|
@@ -128767,7 +128924,7 @@ var nara_quest_default = {
|
|
|
128767
128924
|
]
|
|
128768
128925
|
};
|
|
128769
128926
|
|
|
128770
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
128927
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
128771
128928
|
var import_meta = {};
|
|
128772
128929
|
var BN254_FIELD = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
128773
128930
|
async function resolveDefaultZkPaths() {
|
|
@@ -129123,7 +129280,8 @@ async function getStakeInfo(connection, user, options) {
|
|
|
129123
129280
|
}
|
|
129124
129281
|
return {
|
|
129125
129282
|
amount,
|
|
129126
|
-
stakeRound: record.stakeRound.toNumber()
|
|
129283
|
+
stakeRound: record.stakeRound.toNumber(),
|
|
129284
|
+
freeCredits: record.freeCredits
|
|
129127
129285
|
};
|
|
129128
129286
|
} catch {
|
|
129129
129287
|
return null;
|
|
@@ -129149,17 +129307,18 @@ async function getQuestConfig(connection, options) {
|
|
|
129149
129307
|
questAuthority: config.questAuthority,
|
|
129150
129308
|
minQuestInterval: Number(config.minQuestInterval.toString()),
|
|
129151
129309
|
rewardPerShare: Number(config.rewardPerShare.toString()),
|
|
129152
|
-
extraReward: Number(config.extraReward.toString())
|
|
129310
|
+
extraReward: Number(config.extraReward.toString()),
|
|
129311
|
+
stakeAuthority: config.stakeAuthority
|
|
129153
129312
|
};
|
|
129154
129313
|
}
|
|
129155
129314
|
|
|
129156
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
129315
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
129157
129316
|
var import_web391 = __toESM(require_index_cjs(), 1);
|
|
129158
129317
|
var anchor3 = __toESM(require_cjs2(), 1);
|
|
129159
129318
|
var import_anchor3 = __toESM(require_cjs2(), 1);
|
|
129160
129319
|
init_constants2();
|
|
129161
129320
|
|
|
129162
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
129321
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
129163
129322
|
var nara_skills_hub_default = {
|
|
129164
129323
|
address: "SkiLLHub11111111111111111111111111111111111",
|
|
129165
129324
|
metadata: {
|
|
@@ -130557,7 +130716,7 @@ var nara_skills_hub_default = {
|
|
|
130557
130716
|
]
|
|
130558
130717
|
};
|
|
130559
130718
|
|
|
130560
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
130719
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
130561
130720
|
init_tx();
|
|
130562
130721
|
var DEFAULT_CHUNK_SIZE2 = 800;
|
|
130563
130722
|
var BUFFER_HEADER_SIZE2 = 144;
|
|
@@ -130792,7 +130951,7 @@ async function uploadSkillContent(connection, wallet, name, content, options) {
|
|
|
130792
130951
|
}
|
|
130793
130952
|
}
|
|
130794
130953
|
|
|
130795
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
130954
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
130796
130955
|
var import_web392 = __toESM(require_index_cjs(), 1);
|
|
130797
130956
|
var anchor4 = __toESM(require_cjs2(), 1);
|
|
130798
130957
|
var import_anchor4 = __toESM(require_cjs2(), 1);
|
|
@@ -130802,7 +130961,7 @@ var import_bn2 = __toESM(require_bn(), 1);
|
|
|
130802
130961
|
init_constants2();
|
|
130803
130962
|
init_tx();
|
|
130804
130963
|
|
|
130805
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
130964
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
130806
130965
|
var nara_zk_default = {
|
|
130807
130966
|
address: "ZKidentity111111111111111111111111111111111",
|
|
130808
130967
|
metadata: {
|
|
@@ -132013,7 +132172,7 @@ var nara_zk_default = {
|
|
|
132013
132172
|
]
|
|
132014
132173
|
};
|
|
132015
132174
|
|
|
132016
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
132175
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_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
|
|
132017
132176
|
var import_meta2 = {};
|
|
132018
132177
|
var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
132019
132178
|
var MERKLE_LEVELS = 64;
|
|
@@ -132360,7 +132519,7 @@ async function transferZkIdByCommitment(connection, payer, name, currentIdSecret
|
|
|
132360
132519
|
return sendTx(connection, payer, [ix]);
|
|
132361
132520
|
}
|
|
132362
132521
|
|
|
132363
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
132522
|
+
// node_modules/.pnpm/nara-sdk@1.0.57_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
|
|
132364
132523
|
init_agent_registry();
|
|
132365
132524
|
var import_web393 = __toESM(require_index_cjs(), 1);
|
|
132366
132525
|
var import_bn3 = __toESM(require_bn(), 1);
|
|
@@ -133151,6 +133310,14 @@ async function handleQuestGet(options) {
|
|
|
133151
133310
|
}
|
|
133152
133311
|
} catch {
|
|
133153
133312
|
}
|
|
133313
|
+
let freeCredits = 0;
|
|
133314
|
+
try {
|
|
133315
|
+
const stakeInfo = await getStakeInfo(connection, wallet.publicKey);
|
|
133316
|
+
if (stakeInfo) {
|
|
133317
|
+
freeCredits = stakeInfo.freeCredits;
|
|
133318
|
+
}
|
|
133319
|
+
} catch {
|
|
133320
|
+
}
|
|
133154
133321
|
const data = {
|
|
133155
133322
|
round: quest.round,
|
|
133156
133323
|
question: quest.question,
|
|
@@ -133166,7 +133333,8 @@ async function handleQuestGet(options) {
|
|
|
133166
133333
|
stakeRequirement: stakeRequired ? `${quest.effectiveStakeRequirement.toFixed(9).replace(/\.?0+$/, "")} NARA` : "0 NARA",
|
|
133167
133334
|
stakeHigh: `${quest.stakeHigh} NARA`,
|
|
133168
133335
|
stakeLow: `${quest.stakeLow} NARA`,
|
|
133169
|
-
avgParticipantStake: `${quest.avgParticipantStake} NARA
|
|
133336
|
+
avgParticipantStake: `${quest.avgParticipantStake} NARA`,
|
|
133337
|
+
freeCredits
|
|
133170
133338
|
};
|
|
133171
133339
|
if (options.json) {
|
|
133172
133340
|
formatOutput(data, true);
|
|
@@ -133185,6 +133353,7 @@ async function handleQuestGet(options) {
|
|
|
133185
133353
|
} else {
|
|
133186
133354
|
console.log(` Stake requirement: none`);
|
|
133187
133355
|
}
|
|
133356
|
+
console.log(` Stake-free credits: ${freeCredits}`);
|
|
133188
133357
|
console.log(` Deadline: ${new Date(quest.deadline * 1e3).toLocaleString()}`);
|
|
133189
133358
|
if (quest.timeRemaining > 0) {
|
|
133190
133359
|
console.log(` Time remaining: ${formatTimeRemaining(quest.timeRemaining)}`);
|
|
@@ -133228,10 +133397,10 @@ async function handleQuestConfig(options) {
|
|
|
133228
133397
|
console.log("");
|
|
133229
133398
|
console.log(` Min Reward Count: ${data.minRewardCount}`);
|
|
133230
133399
|
console.log(` Max Reward Count: ${data.maxRewardCount}`);
|
|
133231
|
-
console.log(` Reward Per Share: ${rewardPerShare} NARA`);
|
|
133232
|
-
console.log(` Extra Reward: ${extraReward} NARA`);
|
|
133233
|
-
console.log(` Stake BPS High: ${stakeBpsHigh / 100}
|
|
133234
|
-
console.log(` Stake BPS Low: ${stakeBpsLow / 100}
|
|
133400
|
+
console.log(` Reward Per Share: ${rewardPerShare} NARA (${config.rewardPerShare} lamports)`);
|
|
133401
|
+
console.log(` Extra Reward: ${extraReward} NARA (${config.extraReward} lamports)`);
|
|
133402
|
+
console.log(` Stake BPS High: ${stakeBpsHigh / 100}% (${stakeBpsHigh} BPS)`);
|
|
133403
|
+
console.log(` Stake BPS Low: ${stakeBpsLow / 100}% (${stakeBpsLow} BPS)`);
|
|
133235
133404
|
console.log(` Decay (ms): ${data.decayMs}`);
|
|
133236
133405
|
console.log(` Min Quest Interval: ${data.minQuestInterval}s`);
|
|
133237
133406
|
console.log("");
|
|
@@ -136181,18 +136350,18 @@ async function handleAgentConfig(options) {
|
|
|
136181
136350
|
formatOutput(data, true);
|
|
136182
136351
|
} else {
|
|
136183
136352
|
console.log("");
|
|
136184
|
-
console.log(` Register Fee: ${data.registerFee} NARA`);
|
|
136185
|
-
console.log(` Referral Register Fee: ${data.referralRegisterFee} NARA`);
|
|
136186
|
-
console.log(` Referral Fee Share: ${data.referralFeeShare} NARA`);
|
|
136187
|
-
console.log(` Activity Reward: ${data.activityReward} NARA`);
|
|
136188
|
-
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA`);
|
|
136353
|
+
console.log(` Register Fee: ${data.registerFee} NARA (${config.registerFee} lamports)`);
|
|
136354
|
+
console.log(` Referral Register Fee: ${data.referralRegisterFee} NARA (${config.referralRegisterFee} lamports)`);
|
|
136355
|
+
console.log(` Referral Fee Share: ${data.referralFeeShare} NARA (${config.referralFeeShare} lamports)`);
|
|
136356
|
+
console.log(` Activity Reward: ${data.activityReward} NARA (${config.activityReward} lamports)`);
|
|
136357
|
+
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA (${config.referralActivityReward} lamports)`);
|
|
136189
136358
|
console.log(` Points (self): ${data.pointsSelf}`);
|
|
136190
136359
|
console.log(` Points (referral): ${data.pointsReferral}`);
|
|
136191
136360
|
console.log(` Referral Register Points: ${data.referralRegisterPoints}`);
|
|
136192
|
-
console.log(` Twitter Verify Fee: ${data.twitterVerificationFee} NARA`);
|
|
136193
|
-
console.log(` Twitter Verify Reward: ${data.twitterVerificationReward} NARA`);
|
|
136361
|
+
console.log(` Twitter Verify Fee: ${data.twitterVerificationFee} NARA (${config.twitterVerificationFee} lamports)`);
|
|
136362
|
+
console.log(` Twitter Verify Reward: ${data.twitterVerificationReward} NARA (${config.twitterVerificationReward} lamports)`);
|
|
136194
136363
|
console.log(` Twitter Verify Points: ${data.twitterVerificationPoints}`);
|
|
136195
|
-
console.log(` Tweet Verify Reward: ${data.tweetVerifyReward} NARA`);
|
|
136364
|
+
console.log(` Tweet Verify Reward: ${data.tweetVerifyReward} NARA (${config.tweetVerifyReward} lamports)`);
|
|
136196
136365
|
console.log(` Tweet Verify Points: ${data.tweetVerifyPoints}`);
|
|
136197
136366
|
console.log("");
|
|
136198
136367
|
}
|
|
@@ -136630,7 +136799,7 @@ function registerCommands(program3) {
|
|
|
136630
136799
|
}
|
|
136631
136800
|
|
|
136632
136801
|
// bin/nara-cli.ts
|
|
136633
|
-
var version2 = true ? "1.0.
|
|
136802
|
+
var version2 = true ? "1.0.63" : "dev";
|
|
136634
136803
|
var program2 = new Command();
|
|
136635
136804
|
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);
|
|
136636
136805
|
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.63",
|
|
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.57",
|
|
67
67
|
"picocolors": "^1.1.1"
|
|
68
68
|
},
|
|
69
69
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
|
@@ -454,18 +454,18 @@ async function handleAgentConfig(options: GlobalOptions) {
|
|
|
454
454
|
formatOutput(data, true);
|
|
455
455
|
} else {
|
|
456
456
|
console.log("");
|
|
457
|
-
console.log(` Register Fee: ${data.registerFee} NARA`);
|
|
458
|
-
console.log(` Referral Register Fee: ${data.referralRegisterFee} NARA`);
|
|
459
|
-
console.log(` Referral Fee Share: ${data.referralFeeShare} NARA`);
|
|
460
|
-
console.log(` Activity Reward: ${data.activityReward} NARA`);
|
|
461
|
-
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA`);
|
|
457
|
+
console.log(` Register Fee: ${data.registerFee} NARA (${config.registerFee} lamports)`);
|
|
458
|
+
console.log(` Referral Register Fee: ${data.referralRegisterFee} NARA (${config.referralRegisterFee} lamports)`);
|
|
459
|
+
console.log(` Referral Fee Share: ${data.referralFeeShare} NARA (${config.referralFeeShare} lamports)`);
|
|
460
|
+
console.log(` Activity Reward: ${data.activityReward} NARA (${config.activityReward} lamports)`);
|
|
461
|
+
console.log(` Referral Activity Reward: ${data.referralActivityReward} NARA (${config.referralActivityReward} lamports)`);
|
|
462
462
|
console.log(` Points (self): ${data.pointsSelf}`);
|
|
463
463
|
console.log(` Points (referral): ${data.pointsReferral}`);
|
|
464
464
|
console.log(` Referral Register Points: ${data.referralRegisterPoints}`);
|
|
465
|
-
console.log(` Twitter Verify Fee: ${data.twitterVerificationFee} NARA`);
|
|
466
|
-
console.log(` Twitter Verify Reward: ${data.twitterVerificationReward} NARA`);
|
|
465
|
+
console.log(` Twitter Verify Fee: ${data.twitterVerificationFee} NARA (${config.twitterVerificationFee} lamports)`);
|
|
466
|
+
console.log(` Twitter Verify Reward: ${data.twitterVerificationReward} NARA (${config.twitterVerificationReward} lamports)`);
|
|
467
467
|
console.log(` Twitter Verify Points: ${data.twitterVerificationPoints}`);
|
|
468
|
-
console.log(` Tweet Verify Reward: ${data.tweetVerifyReward} NARA`);
|
|
468
|
+
console.log(` Tweet Verify Reward: ${data.tweetVerifyReward} NARA (${config.tweetVerifyReward} lamports)`);
|
|
469
469
|
console.log(` Tweet Verify Points: ${data.tweetVerifyPoints}`);
|
|
470
470
|
console.log("");
|
|
471
471
|
}
|
|
@@ -118,6 +118,17 @@ async function handleQuestGet(options: GlobalOptions) {
|
|
|
118
118
|
// If config fetch fails, fall back to showing stake as-is
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
// Fetch free credits (stake-free answer quota)
|
|
122
|
+
let freeCredits = 0;
|
|
123
|
+
try {
|
|
124
|
+
const stakeInfo = await getStakeInfo(connection, wallet.publicKey);
|
|
125
|
+
if (stakeInfo) {
|
|
126
|
+
freeCredits = stakeInfo.freeCredits;
|
|
127
|
+
}
|
|
128
|
+
} catch {
|
|
129
|
+
// Ignore — wallet may not have a stake record
|
|
130
|
+
}
|
|
131
|
+
|
|
121
132
|
const data: Record<string, any> = {
|
|
122
133
|
round: quest.round,
|
|
123
134
|
question: quest.question,
|
|
@@ -134,6 +145,7 @@ async function handleQuestGet(options: GlobalOptions) {
|
|
|
134
145
|
stakeHigh: `${quest.stakeHigh} NARA`,
|
|
135
146
|
stakeLow: `${quest.stakeLow} NARA`,
|
|
136
147
|
avgParticipantStake: `${quest.avgParticipantStake} NARA`,
|
|
148
|
+
freeCredits,
|
|
137
149
|
};
|
|
138
150
|
|
|
139
151
|
if (options.json) {
|
|
@@ -153,6 +165,7 @@ async function handleQuestGet(options: GlobalOptions) {
|
|
|
153
165
|
} else {
|
|
154
166
|
console.log(` Stake requirement: none`);
|
|
155
167
|
}
|
|
168
|
+
console.log(` Stake-free credits: ${freeCredits}`);
|
|
156
169
|
console.log(` Deadline: ${new Date(quest.deadline * 1000).toLocaleString()}`);
|
|
157
170
|
if (quest.timeRemaining > 0) {
|
|
158
171
|
console.log(` Time remaining: ${formatTimeRemaining(quest.timeRemaining)}`);
|
|
@@ -202,10 +215,10 @@ async function handleQuestConfig(options: GlobalOptions) {
|
|
|
202
215
|
console.log("");
|
|
203
216
|
console.log(` Min Reward Count: ${data.minRewardCount}`);
|
|
204
217
|
console.log(` Max Reward Count: ${data.maxRewardCount}`);
|
|
205
|
-
console.log(` Reward Per Share: ${rewardPerShare} NARA`);
|
|
206
|
-
console.log(` Extra Reward: ${extraReward} NARA`);
|
|
207
|
-
console.log(` Stake BPS High: ${stakeBpsHigh / 100}
|
|
208
|
-
console.log(` Stake BPS Low: ${stakeBpsLow / 100}
|
|
218
|
+
console.log(` Reward Per Share: ${rewardPerShare} NARA (${config.rewardPerShare} lamports)`);
|
|
219
|
+
console.log(` Extra Reward: ${extraReward} NARA (${config.extraReward} lamports)`);
|
|
220
|
+
console.log(` Stake BPS High: ${stakeBpsHigh / 100}% (${stakeBpsHigh} BPS)`);
|
|
221
|
+
console.log(` Stake BPS Low: ${stakeBpsLow / 100}% (${stakeBpsLow} BPS)`);
|
|
209
222
|
console.log(` Decay (ms): ${data.decayMs}`);
|
|
210
223
|
console.log(` Min Quest Interval: ${data.minQuestInterval}s`);
|
|
211
224
|
console.log("");
|