@sherwoodagent/cli 0.73.3 → 0.73.4
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 +9 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5709,14 +5709,9 @@ function safeCall(fn) {
|
|
|
5709
5709
|
return null;
|
|
5710
5710
|
}
|
|
5711
5711
|
}
|
|
5712
|
-
var API_URLS = {
|
|
5713
|
-
"base": "https://app.sherwood.sh",
|
|
5714
|
-
"base-sepolia": "https://testnet.app.sherwood.sh"
|
|
5715
|
-
};
|
|
5716
5712
|
function getApiBaseUrl() {
|
|
5717
5713
|
if (process.env.SHERWOOD_API_URL) return process.env.SHERWOOD_API_URL;
|
|
5718
|
-
|
|
5719
|
-
return API_URLS[chain.testnet ? "base-sepolia" : "base"] || API_URLS["base"];
|
|
5714
|
+
return getChain().testnet ? "https://testnet.sherwood.sh" : "https://www.sherwood.sh";
|
|
5720
5715
|
}
|
|
5721
5716
|
async function simulateViaApi(vault, calls) {
|
|
5722
5717
|
const baseUrl = getApiBaseUrl();
|
|
@@ -10340,7 +10335,7 @@ try {
|
|
|
10340
10335
|
} catch {
|
|
10341
10336
|
}
|
|
10342
10337
|
var require2 = createRequire(import.meta.url);
|
|
10343
|
-
var CLI_VERSION = "0.73.
|
|
10338
|
+
var CLI_VERSION = "0.73.4";
|
|
10344
10339
|
async function loadXmtp() {
|
|
10345
10340
|
return import("./xmtp-6US7GH3Z.js");
|
|
10346
10341
|
}
|
|
@@ -10360,6 +10355,10 @@ function validateAddress(value, name) {
|
|
|
10360
10355
|
}
|
|
10361
10356
|
return value;
|
|
10362
10357
|
}
|
|
10358
|
+
function fundShareUrl(subdomain, refParam) {
|
|
10359
|
+
const host = isTestnet() ? "https://testnet.sherwood.sh" : "https://sherwood.sh";
|
|
10360
|
+
return `${host}/fund/${subdomain}${refParam}`;
|
|
10361
|
+
}
|
|
10363
10362
|
function resolveVault(opts) {
|
|
10364
10363
|
if (opts.vault) {
|
|
10365
10364
|
setVaultAddress(validateAddress(opts.vault, "vault"));
|
|
@@ -10560,7 +10559,7 @@ fund.command("create").description("Create a new fund via the factory (interacti
|
|
|
10560
10559
|
console.log(W6(` ENS: ${G6(`${subdomain}.sherwoodagent.eth`)}`));
|
|
10561
10560
|
console.log(W6(` Chat: ${DIM6(`sherwood chat ${subdomain}`)}`));
|
|
10562
10561
|
const refParam2 = getAgentId() ? `?ref=${getAgentId()}` : "";
|
|
10563
|
-
console.log(W6(` Share: ${G6(
|
|
10562
|
+
console.log(W6(` Share: ${G6(fundShareUrl(subdomain, refParam2))}`));
|
|
10564
10563
|
SEP6();
|
|
10565
10564
|
console.log(G6(" \u2713 Fund saved to ~/.sherwood/config.json (set as primary)"));
|
|
10566
10565
|
console.log();
|
|
@@ -10628,7 +10627,7 @@ fund.command("create").description("Create a new fund via the factory (interacti
|
|
|
10628
10627
|
console.log(W6(` Explorer: ${DIM6(getExplorerUrl(result.hash))}`));
|
|
10629
10628
|
console.log(W6(` Chat: ${DIM6(`sherwood chat ${subdomain}`)}`));
|
|
10630
10629
|
const refParam = getAgentId() ? `?ref=${getAgentId()}` : "";
|
|
10631
|
-
console.log(W6(` Share: ${G6(
|
|
10630
|
+
console.log(W6(` Share: ${G6(fundShareUrl(subdomain, refParam))}`));
|
|
10632
10631
|
SEP6();
|
|
10633
10632
|
console.log(G6(" \u2713 Fund saved to ~/.sherwood/config.json (set as primary)"));
|
|
10634
10633
|
console.log();
|
|
@@ -11010,7 +11009,7 @@ fund.command("share").description("Print the shareable dashboard URL for your fu
|
|
|
11010
11009
|
const fundInfo = await resolveFund(subdomain);
|
|
11011
11010
|
const agentId = getAgentId();
|
|
11012
11011
|
const refParam = agentId ? `?ref=${agentId}` : "";
|
|
11013
|
-
const dashboardUrl =
|
|
11012
|
+
const dashboardUrl = fundShareUrl(subdomain, refParam);
|
|
11014
11013
|
console.log();
|
|
11015
11014
|
console.log(LABEL5(" \u25C6 Share Your Fund"));
|
|
11016
11015
|
SEP6();
|