@bountyagents/bountyagents-task 2026.3.116 → 2026.3.117
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/index.js +15 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55907,54 +55907,44 @@ function register(api3) {
|
|
|
55907
55907
|
});
|
|
55908
55908
|
api3.registerCli(({ program }) => {
|
|
55909
55909
|
program.command("upclaw").description("UpClaw Bounty Agents CLI").argument("[action]", "action: status, init, reset, etc.", "status").option("-v, --verbose", "verbose output").action((action, options) => {
|
|
55910
|
-
console.log("Action:", action);
|
|
55911
55910
|
if (options.verbose)
|
|
55912
55911
|
console.log("Verbose mode");
|
|
55913
55912
|
if (action === "status") {
|
|
55914
55913
|
const address = getWalletAddress();
|
|
55915
55914
|
if (!address) {
|
|
55916
|
-
|
|
55917
|
-
|
|
55918
|
-
});
|
|
55915
|
+
console.log("Status: Wallet not initialized, run `openclaw upclaw init` to initialize");
|
|
55916
|
+
return;
|
|
55919
55917
|
}
|
|
55920
|
-
|
|
55921
|
-
|
|
55922
|
-
|
|
55923
|
-
});
|
|
55918
|
+
console.log("Status: Wallet initialized");
|
|
55919
|
+
console.log("Wallet Address:", address);
|
|
55920
|
+
return;
|
|
55924
55921
|
}
|
|
55925
55922
|
if (action === "init") {
|
|
55926
55923
|
try {
|
|
55927
55924
|
if (!fs2.existsSync(KEY_PATH)) {
|
|
55928
55925
|
const pk = generatePrivateKey();
|
|
55929
55926
|
fs2.writeFileSync(KEY_PATH, pk, "utf-8");
|
|
55930
|
-
|
|
55931
|
-
|
|
55932
|
-
});
|
|
55927
|
+
console.log(`Initialized new EVM private key and saved to ${KEY_PATH}`);
|
|
55928
|
+
return;
|
|
55933
55929
|
} else {
|
|
55934
|
-
|
|
55935
|
-
|
|
55936
|
-
});
|
|
55930
|
+
console.log(`EVM private key already exists at ${KEY_PATH}, if you want to use a different key, run 'openclaw upclaw reset' first to initialize a new key`);
|
|
55931
|
+
return;
|
|
55937
55932
|
}
|
|
55938
55933
|
} catch (error48) {
|
|
55939
|
-
|
|
55940
|
-
|
|
55941
|
-
error: error48.message
|
|
55942
|
-
});
|
|
55934
|
+
console.error("Failed to initialize key:", error48.message);
|
|
55935
|
+
return;
|
|
55943
55936
|
}
|
|
55944
55937
|
}
|
|
55945
55938
|
if (action === "reset") {
|
|
55946
55939
|
try {
|
|
55947
55940
|
if (fs2.existsSync(KEY_PATH)) {
|
|
55948
55941
|
fs2.unlinkSync(KEY_PATH);
|
|
55949
|
-
|
|
55950
|
-
|
|
55951
|
-
});
|
|
55942
|
+
console.log(`Reset EVM private key and deleted ${KEY_PATH}`);
|
|
55943
|
+
return;
|
|
55952
55944
|
}
|
|
55953
55945
|
} catch (error48) {
|
|
55954
|
-
|
|
55955
|
-
|
|
55956
|
-
error: error48.message
|
|
55957
|
-
});
|
|
55946
|
+
console.error("Failed to reset key:", error48.message);
|
|
55947
|
+
return;
|
|
55958
55948
|
}
|
|
55959
55949
|
}
|
|
55960
55950
|
});
|