@boostxyz/cli 1.1.0-alpha.37 → 1.2.0

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.
@@ -1,4 +1,4 @@
1
- import { B as p, y as m, z as y, A as k, D as b, E, F as L, G as O, H as h, n as x } from "./utils-CX1JpbvX.js";
1
+ import { B as p, y as m, z as y, A as k, D as b, E, F as L, G as O, H as h, n as x } from "./utils-CbGtTEVk.js";
2
2
  class M extends p {
3
3
  constructor({ callbackSelector: r, cause: e, data: o, extraData: c, sender: d, urls: a }) {
4
4
  var i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-C7UotnrC.cjs");class w extends e.BaseError{constructor({callbackSelector:o,cause:t,data:n,extraData:i,sender:u,urls:a}){var f;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(f=t.metaMessages)!=null&&f.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(d=>` ${e.getUrl(d)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${o}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class k extends e.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(o)}`],name:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`],name:"OffchainLookupSenderMismatchError"})}}const E="0x556f1830",h={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function L(c,{blockNumber:o,blockTag:t,data:n,to:i}){const{args:u}=e.decodeErrorResult({data:n,abi:[h]}),[a,f,d,r,s]=u,{ccipRead:l}=c,m=l&&typeof(l==null?void 0:l.request)=="function"?l.request:y;try{if(!e.isAddressEqual(i,a))throw new b({sender:a,to:i});const p=await m({data:d,sender:a,urls:f}),{data:g}=await e.call(c,{blockNumber:o,blockTag:t,data:e.concat([r,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return g}catch(p){throw new w({callbackSelector:r,cause:p,data:n,extraData:s,sender:a,urls:f})}}async function y({data:c,sender:o,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],f=a.includes("{data}")?"GET":"POST",d=f==="POST"?{data:c,sender:o}:void 0;try{const r=await fetch(a.replace("{sender}",o).replace("{data}",c),{body:JSON.stringify(d),method:f});let s;if((i=r.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await r.json()).data:s=await r.text(),!r.ok){n=new e.HttpRequestError({body:d,details:s!=null&&s.error?e.stringify(s.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!e.isHex(s)){n=new k({result:s,url:a});continue}return s}catch(r){n=new e.HttpRequestError({body:d,details:r.message,url:a})}}throw n}exports.ccipRequest=y;exports.offchainLookup=L;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-CQC0lDOX.cjs");class w extends e.BaseError{constructor({callbackSelector:o,cause:t,data:n,extraData:i,sender:u,urls:a}){var f;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(f=t.metaMessages)!=null&&f.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(d=>` ${e.getUrl(d)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${o}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class k extends e.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(o)}`],name:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`],name:"OffchainLookupSenderMismatchError"})}}const E="0x556f1830",h={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function L(c,{blockNumber:o,blockTag:t,data:n,to:i}){const{args:u}=e.decodeErrorResult({data:n,abi:[h]}),[a,f,d,r,s]=u,{ccipRead:l}=c,m=l&&typeof(l==null?void 0:l.request)=="function"?l.request:y;try{if(!e.isAddressEqual(i,a))throw new b({sender:a,to:i});const p=await m({data:d,sender:a,urls:f}),{data:g}=await e.call(c,{blockNumber:o,blockTag:t,data:e.concat([r,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return g}catch(p){throw new w({callbackSelector:r,cause:p,data:n,extraData:s,sender:a,urls:f})}}async function y({data:c,sender:o,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],f=a.includes("{data}")?"GET":"POST",d=f==="POST"?{data:c,sender:o}:void 0;try{const r=await fetch(a.replace("{sender}",o).replace("{data}",c),{body:JSON.stringify(d),method:f});let s;if((i=r.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await r.json()).data:s=await r.text(),!r.ok){n=new e.HttpRequestError({body:d,details:s!=null&&s.error?e.stringify(s.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!e.isHex(s)){n=new k({result:s,url:a});continue}return s}catch(r){n=new e.HttpRequestError({body:d,details:r.message,url:a})}}throw n}exports.ccipRequest=y;exports.offchainLookup=L;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=E;
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const w=require("node:fs/promises"),_=require("node:path"),y=require("./utils-C7UotnrC.cjs"),S=require("./index.cjs"),N=Symbol("arg flag");class l extends Error{constructor(o,f){super(o),this.name="ArgError",this.code=f,Object.setPrototypeOf(this,l.prototype)}}function v(r,{argv:o=process.argv.slice(2),permissive:f=!1,stopAtPositional:t=!1}={}){if(!r)throw new l("argument specification object is required","ARG_CONFIG_NO_SPEC");const a={_:[]},p={},d={};for(const e of Object.keys(r)){if(!e)throw new l("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(e[0]!=="-")throw new l(`argument key must start with '-' but found: '${e}'`,"ARG_CONFIG_NONOPT_KEY");if(e.length===1)throw new l(`argument key must have a name; singular '-' keys are not allowed: ${e}`,"ARG_CONFIG_NONAME_KEY");if(typeof r[e]=="string"){p[e]=r[e];continue}let n=r[e],c=!1;if(Array.isArray(n)&&n.length===1&&typeof n[0]=="function"){const[h]=n;n=(u,i,m=[])=>(m.push(h(u,i,m[m.length-1])),m),c=h===Boolean||h[N]===!0}else if(typeof n=="function")c=n===Boolean||n[N]===!0;else throw new l(`type missing or not a function or valid array type: ${e}`,"ARG_CONFIG_VAD_TYPE");if(e[1]!=="-"&&e.length>2)throw new l(`short argument keys (with a single hyphen) must have only one character: ${e}`,"ARG_CONFIG_SHORTOPT_TOOLONG");d[e]=[n,c]}for(let e=0,n=o.length;e<n;e++){const c=o[e];if(t&&a._.length>0){a._=a._.concat(o.slice(e));break}if(c==="--"){a._=a._.concat(o.slice(e+1));break}if(c.length>1&&c[0]==="-"){const h=c[1]==="-"||c.length===2?[c]:c.slice(1).split("").map(u=>`-${u}`);for(let u=0;u<h.length;u++){const i=h[u],[m,b]=i[1]==="-"?i.split(/=(.*)/,2):[i,void 0];let s=m;for(;s in p;)s=p[s];if(!(s in d))if(f){a._.push(i);continue}else throw new l(`unknown or unexpected option: ${m}`,"ARG_UNKNOWN_OPTION");const[g,A]=d[s];if(!A&&u+1<h.length)throw new l(`option requires argument (but was followed by another short argument): ${m}`,"ARG_MISSING_REQUIRED_SHORTARG");if(A)a[s]=g(!0,s,a[s]);else if(b===void 0){if(o.length<e+2||o[e+1].length>1&&o[e+1][0]==="-"&&!(o[e+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(g===Number||typeof BigInt<"u"&&g===BigInt))){const G=m===s?"":` (alias for ${s})`;throw new l(`option requires argument: ${m}${G}`,"ARG_MISSING_REQUIRED_LONGARG")}a[s]=g(o[e+1],s,a[s]),++e}else a[s]=g(b,s,a[s])}}else a._.push(c)}return a}v.flag=r=>(r[N]=!0,r);v.COUNT=v.flag((r,o,f)=>(f||0)+1);v.ArgError=l;var R=v;const $=y.getDefaultExportFromCjs(R),k="2.0.0-alpha.35",D="1.1.0-alpha.37",E=`
2
+ "use strict";const w=require("node:fs/promises"),_=require("node:path"),y=require("./utils-CQC0lDOX.cjs"),S=require("./index.cjs"),N=Symbol("arg flag");class l extends Error{constructor(o,f){super(o),this.name="ArgError",this.code=f,Object.setPrototypeOf(this,l.prototype)}}function v(r,{argv:o=process.argv.slice(2),permissive:f=!1,stopAtPositional:t=!1}={}){if(!r)throw new l("argument specification object is required","ARG_CONFIG_NO_SPEC");const a={_:[]},d={},g={};for(const e of Object.keys(r)){if(!e)throw new l("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(e[0]!=="-")throw new l(`argument key must start with '-' but found: '${e}'`,"ARG_CONFIG_NONOPT_KEY");if(e.length===1)throw new l(`argument key must have a name; singular '-' keys are not allowed: ${e}`,"ARG_CONFIG_NONAME_KEY");if(typeof r[e]=="string"){d[e]=r[e];continue}let n=r[e],c=!1;if(Array.isArray(n)&&n.length===1&&typeof n[0]=="function"){const[h]=n;n=(u,i,m=[])=>(m.push(h(u,i,m[m.length-1])),m),c=h===Boolean||h[N]===!0}else if(typeof n=="function")c=n===Boolean||n[N]===!0;else throw new l(`type missing or not a function or valid array type: ${e}`,"ARG_CONFIG_VAD_TYPE");if(e[1]!=="-"&&e.length>2)throw new l(`short argument keys (with a single hyphen) must have only one character: ${e}`,"ARG_CONFIG_SHORTOPT_TOOLONG");g[e]=[n,c]}for(let e=0,n=o.length;e<n;e++){const c=o[e];if(t&&a._.length>0){a._=a._.concat(o.slice(e));break}if(c==="--"){a._=a._.concat(o.slice(e+1));break}if(c.length>1&&c[0]==="-"){const h=c[1]==="-"||c.length===2?[c]:c.slice(1).split("").map(u=>`-${u}`);for(let u=0;u<h.length;u++){const i=h[u],[m,b]=i[1]==="-"?i.split(/=(.*)/,2):[i,void 0];let s=m;for(;s in d;)s=d[s];if(!(s in g))if(f){a._.push(i);continue}else throw new l(`unknown or unexpected option: ${m}`,"ARG_UNKNOWN_OPTION");const[p,A]=g[s];if(!A&&u+1<h.length)throw new l(`option requires argument (but was followed by another short argument): ${m}`,"ARG_MISSING_REQUIRED_SHORTARG");if(A)a[s]=p(!0,s,a[s]);else if(b===void 0){if(o.length<e+2||o[e+1].length>1&&o[e+1][0]==="-"&&!(o[e+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(p===Number||typeof BigInt<"u"&&p===BigInt))){const G=m===s?"":` (alias for ${s})`;throw new l(`option requires argument: ${m}${G}`,"ARG_MISSING_REQUIRED_LONGARG")}a[s]=p(o[e+1],s,a[s]),++e}else a[s]=p(b,s,a[s])}}else a._.push(c)}return a}v.flag=r=>(r[N]=!0,r);v.COUNT=v.flag((r,o,f)=>(f||0)+1);v.ArgError=l;var R=v;const $=y.getDefaultExportFromCjs(R),k="2.0.0",D="1.2.0",E=`
3
3
  Deploy Boost Protocol V2, and retrieve base implementation addresses.
4
4
 
5
5
  Usage: boost <COMMAND>
@@ -24,4 +24,4 @@ Options:
24
24
  --cacheDir Path to artifact cache directory
25
25
  --force Bypass cache for given command and configuration, re-running any tasks and re-generating cache artifacts
26
26
  --format Specify command output format, either env or json
27
- `;BigInt.prototype.toJSON=function(){return Number(this)};const O=$({"--help":Boolean,"--version":Boolean,"--chain":String,"--privateKey":String,"--mnemonic":String,"--rpcUrl":String,"--out":String,"--cacheDir":String,"--force":Boolean,"--format":String,"--from":String,"-h":"--help","-v":"--version"});async function I(){var c,h,u;const{_:r,...o}=O,f=r.at(0);if(O["--version"])return console.log(D),0;if(O["--help"])return console.log(E),0;if(!f||!S.commands[f])return console.log(E),127;const t={help:o["--help"],version:o["--version"],chain:o["--chain"],privateKey:o["--privateKey"],mnemonic:o["--mnemonic"],rpcUrl:o["--rpcUrl"],out:o["--out"],cacheDir:o["--cacheDir"],force:o["--force"],format:o["--format"]};t.format||(t.format="env");const a=(c=t.cacheDir)!=null&&c.startsWith("./")?_.resolve(process.cwd(),t.cacheDir):t.cacheDir||_.resolve(process.cwd(),"./.boost"),p=`${r.join("-")}-v${k.split(".").slice(0,2).join("-")}-${t.chain}-${t!=null&&t.privateKey?(h=t.privateKey)==null?void 0:h.slice(t.privateKey.length-5):((u=t.mnemonic)==null?void 0:u.split(" ").at(-1))||""}`,d=_.resolve(a,p);async function e(){const i=await S.commands[f](r.slice(1),t);return f==="seed"&&r.includes("generate")&&(t.format="json"),t.format==="env"?y.objectToEnv(i):JSON.stringify(i,null,2)}let n;if(t.force)n=await e();else try{n=await w.readFile(d,{encoding:"utf-8"});const i=y.validateJson(n);t.format==="json"&&i===!1&&(n=JSON.stringify(y.envToObject(n),null,2)),t.format==="env"&&i!==!1&&(n=y.objectToEnv(i))}catch(i){if(i instanceof Error&&i.message.includes("ENOENT"))n=await e();else throw i}if(typeof n==null)throw new Error("No result found after cache and command operations. This shouldn't happen.");t.out?(await w.mkdir(t.out,{recursive:!0}),await w.writeFile(t.out,n,{encoding:"utf8"}),console.log(`Succesfully wrote result to ${t.out}`)):console.log(n)}I().then((r=0)=>process.exit(r)).catch(r=>{console.error(r),process.exit(1)});
27
+ `;BigInt.prototype.toJSON=function(){return Number(this)};const O=$({"--help":Boolean,"--version":Boolean,"--chain":String,"--privateKey":String,"--mnemonic":String,"--rpcUrl":String,"--out":String,"--cacheDir":String,"--force":Boolean,"--format":String,"--from":String,"-h":"--help","-v":"--version"});async function I(){var c,h,u;const{_:r,...o}=O,f=r.at(0);if(O["--version"])return console.log(D),0;if(O["--help"])return console.log(E),0;if(!f||!S.commands[f])return console.log(E),127;const t={help:o["--help"],version:o["--version"],chain:o["--chain"],privateKey:o["--privateKey"],mnemonic:o["--mnemonic"],rpcUrl:o["--rpcUrl"],out:o["--out"],cacheDir:o["--cacheDir"],force:o["--force"],format:o["--format"]};t.format||(t.format="env");const a=(c=t.cacheDir)!=null&&c.startsWith("./")?_.resolve(process.cwd(),t.cacheDir):t.cacheDir||_.resolve(process.cwd(),"./.boost"),d=`${r.join("-")}-v${k.split(".").slice(0,2).join("-")}-${t.chain}-${t!=null&&t.privateKey?(h=t.privateKey)==null?void 0:h.slice(t.privateKey.length-5):((u=t.mnemonic)==null?void 0:u.split(" ").at(-1))||""}`,g=_.resolve(a,d);async function e(){const i=await S.commands[f](r.slice(1),t);return f==="seed"&&r.includes("generate")&&(t.format="json"),t.format==="env"?y.objectToEnv(i):JSON.stringify(i,null,2)}let n;if(t.force)n=await e();else try{n=await w.readFile(g,{encoding:"utf-8"});const i=y.validateJson(n);t.format==="json"&&i===!1&&(n=JSON.stringify(y.envToObject(n),null,2)),t.format==="env"&&i!==!1&&(n=y.objectToEnv(i))}catch(i){if(i instanceof Error&&i.message.includes("ENOENT"))n=await e();else throw i}if(typeof n==null)throw new Error("No result found after cache and command operations. This shouldn't happen.");t.out?(await w.mkdir(t.out,{recursive:!0}),await w.writeFile(t.out,n,{encoding:"utf8"}),console.log(`Succesfully wrote result to ${t.out}`)):console.log(n)}I().then((r=0)=>process.exit(r)).catch(r=>{console.error(r),process.exit(1)});
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import v from "node:fs/promises";
3
3
  import w from "node:path";
4
- import { g as E, v as $, e as k, o as A } from "./utils-CX1JpbvX.js";
4
+ import { g as E, v as $, e as k, o as A } from "./utils-CbGtTEVk.js";
5
5
  import { commands as S } from "./index.js";
6
6
  const O = Symbol("arg flag");
7
7
  class l extends Error {
@@ -42,8 +42,8 @@ function y(r, {
42
42
  }
43
43
  let n = r[e], c = !1;
44
44
  if (Array.isArray(n) && n.length === 1 && typeof n[0] == "function") {
45
- const [h] = n;
46
- n = (f, i, m = []) => (m.push(h(f, i, m[m.length - 1])), m), c = h === Boolean || h[O] === !0;
45
+ const [m] = n;
46
+ n = (f, i, h = []) => (h.push(m(f, i, h[h.length - 1])), h), c = m === Boolean || m[O] === !0;
47
47
  } else if (typeof n == "function")
48
48
  c = n === Boolean || n[O] === !0;
49
49
  else
@@ -69,10 +69,10 @@ function y(r, {
69
69
  break;
70
70
  }
71
71
  if (c.length > 1 && c[0] === "-") {
72
- const h = c[1] === "-" || c.length === 2 ? [c] : c.slice(1).split("").map((f) => `-${f}`);
73
- for (let f = 0; f < h.length; f++) {
74
- const i = h[f], [m, N] = i[1] === "-" ? i.split(/=(.*)/, 2) : [i, void 0];
75
- let s = m;
72
+ const m = c[1] === "-" || c.length === 2 ? [c] : c.slice(1).split("").map((f) => `-${f}`);
73
+ for (let f = 0; f < m.length; f++) {
74
+ const i = m[f], [h, N] = i[1] === "-" ? i.split(/=(.*)/, 2) : [i, void 0];
75
+ let s = h;
76
76
  for (; s in p; )
77
77
  s = p[s];
78
78
  if (!(s in g))
@@ -81,13 +81,13 @@ function y(r, {
81
81
  continue;
82
82
  } else
83
83
  throw new l(
84
- `unknown or unexpected option: ${m}`,
84
+ `unknown or unexpected option: ${h}`,
85
85
  "ARG_UNKNOWN_OPTION"
86
86
  );
87
87
  const [d, b] = g[s];
88
- if (!b && f + 1 < h.length)
88
+ if (!b && f + 1 < m.length)
89
89
  throw new l(
90
- `option requires argument (but was followed by another short argument): ${m}`,
90
+ `option requires argument (but was followed by another short argument): ${h}`,
91
91
  "ARG_MISSING_REQUIRED_SHORTARG"
92
92
  );
93
93
  if (b)
@@ -95,9 +95,9 @@ function y(r, {
95
95
  else if (N === void 0) {
96
96
  if (o.length < e + 2 || o[e + 1].length > 1 && o[e + 1][0] === "-" && !(o[e + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (d === Number || // eslint-disable-next-line no-undef
97
97
  typeof BigInt < "u" && d === BigInt))) {
98
- const R = m === s ? "" : ` (alias for ${s})`;
98
+ const R = h === s ? "" : ` (alias for ${s})`;
99
99
  throw new l(
100
- `option requires argument: ${m}${R}`,
100
+ `option requires argument: ${h}${R}`,
101
101
  "ARG_MISSING_REQUIRED_LONGARG"
102
102
  );
103
103
  }
@@ -114,7 +114,7 @@ y.flag = (r) => (r[O] = !0, r);
114
114
  y.COUNT = y.flag((r, o, u) => (u || 0) + 1);
115
115
  y.ArgError = l;
116
116
  var D = y;
117
- const I = /* @__PURE__ */ E(D), T = "2.0.0-alpha.35", C = "1.1.0-alpha.37", G = `
117
+ const I = /* @__PURE__ */ E(D), T = "2.0.0", C = "1.2.0", G = `
118
118
  Deploy Boost Protocol V2, and retrieve base implementation addresses.
119
119
 
120
120
  Usage: boost <COMMAND>
@@ -159,7 +159,7 @@ const _ = I({
159
159
  "-v": "--version"
160
160
  });
161
161
  async function P() {
162
- var c, h, f;
162
+ var c, m, f;
163
163
  const { _: r, ...o } = _, u = r.at(0);
164
164
  if (_["--version"])
165
165
  return console.log(C), 0;
@@ -180,7 +180,7 @@ async function P() {
180
180
  format: o["--format"]
181
181
  };
182
182
  t.format || (t.format = "env");
183
- const a = (c = t.cacheDir) != null && c.startsWith("./") ? w.resolve(process.cwd(), t.cacheDir) : t.cacheDir || w.resolve(process.cwd(), "./.boost"), p = `${r.join("-")}-v${T.split(".").slice(0, 2).join("-")}-${t.chain}-${t != null && t.privateKey ? (h = t.privateKey) == null ? void 0 : h.slice(t.privateKey.length - 5) : ((f = t.mnemonic) == null ? void 0 : f.split(" ").at(-1)) || ""}`, g = w.resolve(a, p);
183
+ const a = (c = t.cacheDir) != null && c.startsWith("./") ? w.resolve(process.cwd(), t.cacheDir) : t.cacheDir || w.resolve(process.cwd(), "./.boost"), p = `${r.join("-")}-v${T.split(".").slice(0, 2).join("-")}-${t.chain}-${t != null && t.privateKey ? (m = t.privateKey) == null ? void 0 : m.slice(t.privateKey.length - 5) : ((f = t.mnemonic) == null ? void 0 : f.split(" ").at(-1)) || ""}`, g = w.resolve(a, p);
184
184
  async function e() {
185
185
  const i = await S[u](r.slice(1), t);
186
186
  return u === "seed" && r.includes("generate") && (t.format = "json"), t.format === "env" ? A(i) : JSON.stringify(i, null, 2);