mycomesh-consumer 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.mjs +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycomesh-consumer",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MycoMesh V11 Consumer: a custodied deposit, relay-blind encrypted requests to any Provider, and a local OpenAI-compatible endpoint.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/cli.mjs CHANGED
@@ -70,8 +70,8 @@ export async function main(argv = process.argv.slice(2), { stdout = process.stdo
70
70
  return 0;
71
71
  }
72
72
  const network = loadNetwork(values.network || process.env.MYCOMESH_NETWORK || DEFAULT_NETWORK);
73
- const keyPrivate = paymentKey(dir);
74
73
  if (command === "setup") {
74
+ const keyPrivate = paymentKey(dir);
75
75
  const owner = readKey(values["owner-key-file"]);
76
76
  const deposit = BigInt(values.deposit);
77
77
  const limit = BigInt(values["max-per-request"] || values["max-fee"]);
@@ -117,6 +117,7 @@ export async function main(argv = process.argv.slice(2), { stdout = process.stdo
117
117
  report_id: reportId(record.settlement_key, addressOf(owner), digest), relays_accepted: accepted })}\n`);
118
118
  return accepted.length ? 0 : 2;
119
119
  }
120
+ const keyPrivate = paymentKey(dir);
120
121
  const consumer = new Consumer({ network, keyPrivate, maxFee: Number(values["max-fee"]), journalDir: dir });
121
122
  if (command === "request") {
122
123
  const { response, receipt } = await consumer.request({