@cogcoin/client 0.5.6 → 0.5.7
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/README.md +11 -2
- package/dist/bitcoind/bootstrap/getblock-archive.d.ts +39 -0
- package/dist/bitcoind/bootstrap/getblock-archive.js +548 -0
- package/dist/bitcoind/bootstrap.d.ts +1 -0
- package/dist/bitcoind/bootstrap.js +1 -0
- package/dist/bitcoind/client/factory.js +84 -30
- package/dist/bitcoind/client/managed-client.js +2 -1
- package/dist/bitcoind/client/sync-engine.js +7 -0
- package/dist/bitcoind/errors.js +18 -0
- package/dist/bitcoind/indexer-daemon-main.js +78 -0
- package/dist/bitcoind/indexer-daemon.d.ts +3 -1
- package/dist/bitcoind/indexer-daemon.js +13 -6
- package/dist/bitcoind/node.js +2 -0
- package/dist/bitcoind/progress/constants.d.ts +1 -0
- package/dist/bitcoind/progress/constants.js +1 -0
- package/dist/bitcoind/progress/controller.d.ts +22 -0
- package/dist/bitcoind/progress/controller.js +48 -23
- package/dist/bitcoind/progress/formatting.js +25 -0
- package/dist/bitcoind/progress/render-policy.d.ts +35 -0
- package/dist/bitcoind/progress/render-policy.js +81 -0
- package/dist/bitcoind/service-paths.js +2 -6
- package/dist/bitcoind/service.d.ts +5 -1
- package/dist/bitcoind/service.js +93 -54
- package/dist/bitcoind/testing.d.ts +1 -1
- package/dist/bitcoind/testing.js +1 -1
- package/dist/bitcoind/types.d.ts +35 -1
- package/dist/cli/commands/follow.js +2 -0
- package/dist/cli/commands/getblock-archive-restart.d.ts +5 -0
- package/dist/cli/commands/getblock-archive-restart.js +15 -0
- package/dist/cli/commands/mining-admin.js +4 -0
- package/dist/cli/commands/mining-read.js +8 -5
- package/dist/cli/commands/mining-runtime.js +4 -0
- package/dist/cli/commands/status.js +2 -0
- package/dist/cli/commands/sync.js +2 -0
- package/dist/cli/commands/wallet-admin.js +29 -3
- package/dist/cli/commands/wallet-mutation.js +57 -4
- package/dist/cli/commands/wallet-read.js +2 -0
- package/dist/cli/context.js +5 -3
- package/dist/cli/mutation-command-groups.d.ts +2 -1
- package/dist/cli/mutation-command-groups.js +5 -0
- package/dist/cli/mutation-json.d.ts +18 -2
- package/dist/cli/mutation-json.js +47 -0
- package/dist/cli/mutation-success.d.ts +1 -0
- package/dist/cli/mutation-success.js +2 -2
- package/dist/cli/output.js +84 -1
- package/dist/cli/parse.d.ts +1 -1
- package/dist/cli/parse.js +127 -3
- package/dist/cli/preview-json.d.ts +10 -1
- package/dist/cli/preview-json.js +30 -0
- package/dist/cli/prompt.js +1 -1
- package/dist/cli/runner.js +3 -0
- package/dist/cli/types.d.ts +11 -4
- package/dist/cli/wallet-format.js +6 -0
- package/dist/wallet/lifecycle.d.ts +15 -1
- package/dist/wallet/lifecycle.js +147 -83
- package/dist/wallet/mining/visualizer.d.ts +11 -6
- package/dist/wallet/mining/visualizer.js +32 -15
- package/dist/wallet/reset.js +39 -27
- package/dist/wallet/runtime.d.ts +12 -1
- package/dist/wallet/runtime.js +53 -11
- package/dist/wallet/state/provider.d.ts +1 -0
- package/dist/wallet/state/provider.js +119 -3
- package/dist/wallet/state/seed-index.d.ts +43 -0
- package/dist/wallet/state/seed-index.js +151 -0
- package/dist/wallet/tx/anchor.d.ts +22 -0
- package/dist/wallet/tx/anchor.js +215 -8
- package/dist/wallet/tx/index.d.ts +1 -1
- package/dist/wallet/tx/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,11 +6,13 @@ import { createSuccessEnvelope, describeCanonicalCommand, writeJsonValue } from
|
|
|
6
6
|
export async function runStatusCommand(parsed, context) {
|
|
7
7
|
const dbPath = parsed.dbPath ?? context.resolveDefaultClientDatabasePath();
|
|
8
8
|
const dataDir = parsed.dataDir ?? context.resolveDefaultBitcoindDataDir();
|
|
9
|
+
const runtimePaths = context.resolveWalletRuntimePaths(parsed.seedName);
|
|
9
10
|
await context.ensureDirectory(dirname(dbPath));
|
|
10
11
|
const readContext = await context.openWalletReadContext({
|
|
11
12
|
dataDir,
|
|
12
13
|
databasePath: dbPath,
|
|
13
14
|
secretProvider: context.walletSecretProvider,
|
|
15
|
+
paths: runtimePaths,
|
|
14
16
|
});
|
|
15
17
|
try {
|
|
16
18
|
if (parsed.outputMode === "json") {
|
|
@@ -4,6 +4,7 @@ import { resolveWalletRootIdFromLocalArtifacts } from "../../wallet/root-resolut
|
|
|
4
4
|
import { writeLine } from "../io.js";
|
|
5
5
|
import { classifyCliError } from "../output.js";
|
|
6
6
|
import { createStopSignalWatcher, waitForCompletionOrStop } from "../signals.js";
|
|
7
|
+
import { confirmGetblockArchiveRestart } from "./getblock-archive-restart.js";
|
|
7
8
|
export async function runSyncCommand(parsed, context) {
|
|
8
9
|
const dbPath = parsed.dbPath ?? context.resolveDefaultClientDatabasePath();
|
|
9
10
|
const dataDir = parsed.dataDir ?? context.resolveDefaultBitcoindDataDir();
|
|
@@ -24,6 +25,7 @@ export async function runSyncCommand(parsed, context) {
|
|
|
24
25
|
dataDir,
|
|
25
26
|
walletRootId: walletRoot.walletRootId,
|
|
26
27
|
progressOutput: parsed.progressOutput,
|
|
28
|
+
confirmGetblockArchiveRestart: async (options) => confirmGetblockArchiveRestart(parsed, context, options),
|
|
27
29
|
});
|
|
28
30
|
storeOwned = false;
|
|
29
31
|
const stopWatcher = createStopSignalWatcher(context.signalSource, context.stderr, client, context.forceExit);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseUnlockDurationToMs } from "../../wallet/lifecycle.js";
|
|
2
|
-
import { buildInitMutationData, buildResetMutationData, buildRestoreMutationData, buildUnlockMutationData, buildRepairMutationData, buildWalletExportMutationData, buildWalletImportMutationData, buildWalletLockMutationData, } from "../mutation-json.js";
|
|
2
|
+
import { buildInitMutationData, buildResetMutationData, buildRestoreMutationData, buildWalletDeleteMutationData, buildUnlockMutationData, buildRepairMutationData, buildWalletExportMutationData, buildWalletImportMutationData, buildWalletLockMutationData, } from "../mutation-json.js";
|
|
3
3
|
import { buildResetPreviewData, buildRepairPreviewData, buildWalletLockPreviewData, } from "../preview-json.js";
|
|
4
4
|
import { writeLine } from "../io.js";
|
|
5
5
|
import { createTerminalPrompter } from "../prompt.js";
|
|
@@ -82,7 +82,7 @@ function formatResetResultText(result) {
|
|
|
82
82
|
return parts.join("\n\n");
|
|
83
83
|
}
|
|
84
84
|
export async function runWalletAdminCommand(parsed, context) {
|
|
85
|
-
const runtimePaths = context.resolveWalletRuntimePaths();
|
|
85
|
+
const runtimePaths = context.resolveWalletRuntimePaths(parsed.seedName);
|
|
86
86
|
const stopWatcher = createOwnedLockCleanupSignalWatcher(context.signalSource, context.forceExit, [
|
|
87
87
|
runtimePaths.walletControlLockPath,
|
|
88
88
|
runtimePaths.miningControlLockPath,
|
|
@@ -99,6 +99,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
99
99
|
dataDir,
|
|
100
100
|
provider,
|
|
101
101
|
prompter,
|
|
102
|
+
paths: runtimePaths,
|
|
102
103
|
});
|
|
103
104
|
const nextSteps = getInitNextSteps();
|
|
104
105
|
if (parsed.outputMode === "json") {
|
|
@@ -125,6 +126,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
125
126
|
dataDir,
|
|
126
127
|
provider,
|
|
127
128
|
prompter,
|
|
129
|
+
paths: runtimePaths,
|
|
128
130
|
});
|
|
129
131
|
const nextSteps = getRestoreNextSteps();
|
|
130
132
|
const explanations = ["Managed Bitcoin/indexer bootstrap is deferred until you run `cogcoin sync`."];
|
|
@@ -136,7 +138,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
136
138
|
}));
|
|
137
139
|
return 0;
|
|
138
140
|
}
|
|
139
|
-
writeLine(context.stdout,
|
|
141
|
+
writeLine(context.stdout, `Wallet seed "${result.seedName}" restored from mnemonic.`);
|
|
140
142
|
writeLine(context.stdout, `Wallet root: ${result.walletRootId}`);
|
|
141
143
|
writeLine(context.stdout, `Funding address: ${result.fundingAddress}`);
|
|
142
144
|
writeLine(context.stdout, `Unlocked until: ${new Date(result.unlockUntilUnixMs).toISOString()}`);
|
|
@@ -149,11 +151,30 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
149
151
|
}
|
|
150
152
|
return 0;
|
|
151
153
|
}
|
|
154
|
+
if (parsed.command === "wallet-delete") {
|
|
155
|
+
const dataDir = parsed.dataDir ?? context.resolveDefaultBitcoindDataDir();
|
|
156
|
+
const prompter = createCommandPrompter(parsed, context);
|
|
157
|
+
const result = await context.deleteImportedWalletSeed({
|
|
158
|
+
dataDir,
|
|
159
|
+
provider,
|
|
160
|
+
prompter,
|
|
161
|
+
assumeYes: parsed.assumeYes,
|
|
162
|
+
paths: runtimePaths,
|
|
163
|
+
});
|
|
164
|
+
if (parsed.outputMode === "json") {
|
|
165
|
+
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), "deleted", buildWalletDeleteMutationData(result)));
|
|
166
|
+
return 0;
|
|
167
|
+
}
|
|
168
|
+
writeLine(context.stdout, `Imported wallet seed "${result.seedName}" deleted.`);
|
|
169
|
+
writeLine(context.stdout, `Wallet root: ${result.walletRootId}`);
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
152
172
|
if (parsed.command === "wallet-show-mnemonic") {
|
|
153
173
|
const prompter = createCommandPrompter(parsed, context);
|
|
154
174
|
await context.showWalletMnemonic({
|
|
155
175
|
provider,
|
|
156
176
|
prompter,
|
|
177
|
+
paths: runtimePaths,
|
|
157
178
|
});
|
|
158
179
|
return 0;
|
|
159
180
|
}
|
|
@@ -163,6 +184,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
163
184
|
const result = await context.unlockWallet({
|
|
164
185
|
provider,
|
|
165
186
|
unlockDurationMs: durationMs,
|
|
187
|
+
paths: runtimePaths,
|
|
166
188
|
});
|
|
167
189
|
if (parsed.outputMode === "json") {
|
|
168
190
|
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), "unlocked", buildUnlockMutationData(result)));
|
|
@@ -208,6 +230,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
208
230
|
databasePath: dbPath,
|
|
209
231
|
provider,
|
|
210
232
|
prompter,
|
|
233
|
+
paths: runtimePaths,
|
|
211
234
|
});
|
|
212
235
|
if (parsed.outputMode === "json") {
|
|
213
236
|
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), "exported", buildWalletExportMutationData(result)));
|
|
@@ -227,6 +250,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
227
250
|
databasePath: dbPath,
|
|
228
251
|
provider,
|
|
229
252
|
prompter,
|
|
253
|
+
paths: runtimePaths,
|
|
230
254
|
});
|
|
231
255
|
if (parsed.outputMode === "json") {
|
|
232
256
|
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), "imported", buildWalletImportMutationData(result)));
|
|
@@ -243,6 +267,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
243
267
|
const result = await context.lockWallet({
|
|
244
268
|
dataDir,
|
|
245
269
|
provider,
|
|
270
|
+
paths: runtimePaths,
|
|
246
271
|
});
|
|
247
272
|
if (parsed.outputMode === "preview-json") {
|
|
248
273
|
writeJsonValue(context.stdout, createPreviewSuccessEnvelope(resolvePreviewJsonSchema(parsed), describeCanonicalCommand(parsed), "locked", buildWalletLockPreviewData(result)));
|
|
@@ -263,6 +288,7 @@ export async function runWalletAdminCommand(parsed, context) {
|
|
|
263
288
|
databasePath: dbPath,
|
|
264
289
|
provider,
|
|
265
290
|
assumeYes: parsed.assumeYes,
|
|
291
|
+
paths: runtimePaths,
|
|
266
292
|
});
|
|
267
293
|
if (parsed.outputMode === "preview-json") {
|
|
268
294
|
writeJsonValue(context.stdout, createPreviewSuccessEnvelope(resolvePreviewJsonSchema(parsed), describeCanonicalCommand(parsed), "completed", buildRepairPreviewData(result), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseCogAmountToCogtoshi, } from "../../wallet/tx/index.js";
|
|
2
|
-
import { buildAnchorMutationData, buildCogMutationData, buildDomainAdminMutationData, buildDomainMarketMutationData, buildFieldMutationData, buildRegisterMutationData, buildReputationMutationData, } from "../mutation-json.js";
|
|
3
|
-
import { buildAnchorPreviewData, buildCogPreviewData, buildDomainAdminPreviewData, buildDomainMarketPreviewData, buildFieldPreviewData, buildRegisterPreviewData, buildReputationPreviewData, } from "../preview-json.js";
|
|
4
|
-
import { isAnchorMutationCommand, isBuyMutationCommand, isClaimMutationCommand, isReclaimMutationCommand, isRegisterMutationCommand, isReputationMutationCommand, isSellOrUnsellMutationCommand, isSendMutationCommand, isTransferMutationCommand, isUnsellMutationCommand, isWalletMutationCommand, } from "../mutation-command-groups.js";
|
|
2
|
+
import { buildAnchorMutationData, buildAnchorClearMutationData, buildCogMutationData, buildDomainAdminMutationData, buildDomainMarketMutationData, buildFieldMutationData, buildRegisterMutationData, buildReputationMutationData, } from "../mutation-json.js";
|
|
3
|
+
import { buildAnchorPreviewData, buildAnchorClearPreviewData, buildCogPreviewData, buildDomainAdminPreviewData, buildDomainMarketPreviewData, buildFieldPreviewData, buildRegisterPreviewData, buildReputationPreviewData, } from "../preview-json.js";
|
|
4
|
+
import { isAnchorClearMutationCommand, isAnchorMutationCommand, isBuyMutationCommand, isClaimMutationCommand, isReclaimMutationCommand, isRegisterMutationCommand, isReputationMutationCommand, isSellOrUnsellMutationCommand, isSendMutationCommand, isTransferMutationCommand, isUnsellMutationCommand, isWalletMutationCommand, } from "../mutation-command-groups.js";
|
|
5
5
|
import { commandMutationNextSteps, workflowMutationNextSteps, writeMutationCommandSuccess, } from "../mutation-success.js";
|
|
6
6
|
import { writeLine } from "../io.js";
|
|
7
7
|
import { formatBuyBuyerSummary, formatBuySellerSummary, formatBuySettlementSummary, formatCogClaimPath, formatCogSenderSummary, formatDomainAdminEffect, formatDomainAdminPayloadSummary, formatDomainAdminSenderSummary, formatDomainAdminTargetSummary, formatDomainMarketEconomicEffect, formatDomainMarketRecipientSummary, formatDomainMarketSenderSummary, formatFieldEffect, formatFieldPath, formatFieldSenderSummary, formatFieldValueSummary, formatRegisterEconomicEffect, formatRegisterSenderSummary, formatReputationEffect, formatReputationReviewSummary, formatReputationSenderSummary, } from "../mutation-text-format.js";
|
|
@@ -31,7 +31,7 @@ function createCommandPrompter(parsed, context) {
|
|
|
31
31
|
: context.createPrompter();
|
|
32
32
|
}
|
|
33
33
|
export async function runWalletMutationCommand(parsed, context) {
|
|
34
|
-
const runtimePaths = context.resolveWalletRuntimePaths();
|
|
34
|
+
const runtimePaths = context.resolveWalletRuntimePaths(parsed.seedName);
|
|
35
35
|
const stopWatcher = createOwnedLockCleanupSignalWatcher(context.signalSource, context.forceExit, [
|
|
36
36
|
runtimePaths.walletControlLockPath,
|
|
37
37
|
runtimePaths.miningControlLockPath,
|
|
@@ -47,6 +47,38 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
47
47
|
const dataDir = parsed.dataDir ?? context.resolveDefaultBitcoindDataDir();
|
|
48
48
|
const dbPath = parsed.dbPath ?? context.resolveDefaultClientDatabasePath();
|
|
49
49
|
const prompter = createCommandPrompter(parsed, context);
|
|
50
|
+
if (isAnchorClearMutationCommand(parsed.command)) {
|
|
51
|
+
const result = await context.clearPendingAnchor({
|
|
52
|
+
domainName: parsed.args[0],
|
|
53
|
+
dataDir,
|
|
54
|
+
databasePath: dbPath,
|
|
55
|
+
provider: context.walletSecretProvider,
|
|
56
|
+
prompter,
|
|
57
|
+
assumeYes: parsed.assumeYes,
|
|
58
|
+
paths: runtimePaths,
|
|
59
|
+
});
|
|
60
|
+
const nextSteps = result.cleared
|
|
61
|
+
? workflowMutationNextSteps([`cogcoin show ${result.domainName}`, `cogcoin anchor ${result.domainName}`])
|
|
62
|
+
: commandMutationNextSteps(`cogcoin show ${result.domainName}`);
|
|
63
|
+
return writeMutationCommandSuccess(parsed, context, {
|
|
64
|
+
data: buildAnchorClearMutationData(result),
|
|
65
|
+
previewData: buildAnchorClearPreviewData(result),
|
|
66
|
+
reusedExisting: false,
|
|
67
|
+
reusedMessage: "",
|
|
68
|
+
outcome: result.cleared ? "cleared" : "noop",
|
|
69
|
+
nextSteps,
|
|
70
|
+
text: {
|
|
71
|
+
heading: result.cleared ? "Pending anchor cleared." : "No pending anchor to clear.",
|
|
72
|
+
fields: [
|
|
73
|
+
{ label: "Domain", value: result.domainName },
|
|
74
|
+
{ label: "Cleared", value: result.cleared ? "yes" : "no" },
|
|
75
|
+
{ label: "Previous status", value: result.previousFamilyStatus ?? "", when: result.previousFamilyStatus !== null },
|
|
76
|
+
{ label: "Previous step", value: result.previousFamilyStep ?? "", when: result.previousFamilyStep !== null },
|
|
77
|
+
{ label: "Released dedicated index", value: String(result.releasedDedicatedIndex), when: result.releasedDedicatedIndex !== null },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
50
82
|
if (isAnchorMutationCommand(parsed.command)) {
|
|
51
83
|
const result = await context.anchorDomain({
|
|
52
84
|
domainName: parsed.args[0],
|
|
@@ -55,6 +87,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
55
87
|
databasePath: dbPath,
|
|
56
88
|
provider: context.walletSecretProvider,
|
|
57
89
|
prompter,
|
|
90
|
+
paths: runtimePaths,
|
|
58
91
|
});
|
|
59
92
|
const nextSteps = getAnchorNextSteps(result.domainName);
|
|
60
93
|
return writeMutationCommandSuccess(parsed, context, {
|
|
@@ -89,6 +122,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
89
122
|
provider: context.walletSecretProvider,
|
|
90
123
|
prompter,
|
|
91
124
|
assumeYes: parsed.assumeYes,
|
|
125
|
+
paths: runtimePaths,
|
|
92
126
|
});
|
|
93
127
|
const nextSteps = getRegisterNextSteps(result.domainName, result.registerKind);
|
|
94
128
|
return writeMutationCommandSuccess(parsed, context, {
|
|
@@ -126,6 +160,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
126
160
|
provider: context.walletSecretProvider,
|
|
127
161
|
prompter,
|
|
128
162
|
assumeYes: parsed.assumeYes,
|
|
163
|
+
paths: runtimePaths,
|
|
129
164
|
});
|
|
130
165
|
return writeMutationCommandSuccess(parsed, context, {
|
|
131
166
|
data: buildDomainMarketMutationData(result, {
|
|
@@ -162,6 +197,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
162
197
|
provider: context.walletSecretProvider,
|
|
163
198
|
prompter,
|
|
164
199
|
assumeYes: parsed.assumeYes,
|
|
200
|
+
paths: runtimePaths,
|
|
165
201
|
});
|
|
166
202
|
return writeMutationCommandSuccess(parsed, context, {
|
|
167
203
|
data: buildDomainMarketMutationData(result, {
|
|
@@ -200,6 +236,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
200
236
|
provider: context.walletSecretProvider,
|
|
201
237
|
prompter,
|
|
202
238
|
assumeYes: parsed.assumeYes,
|
|
239
|
+
paths: runtimePaths,
|
|
203
240
|
})
|
|
204
241
|
: await context.clearDomainEndpoint({
|
|
205
242
|
domainName: parsed.args[0],
|
|
@@ -208,6 +245,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
208
245
|
provider: context.walletSecretProvider,
|
|
209
246
|
prompter,
|
|
210
247
|
assumeYes: parsed.assumeYes,
|
|
248
|
+
paths: runtimePaths,
|
|
211
249
|
});
|
|
212
250
|
return writeMutationCommandSuccess(parsed, context, {
|
|
213
251
|
data: buildDomainAdminMutationData(result, {
|
|
@@ -242,6 +280,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
242
280
|
provider: context.walletSecretProvider,
|
|
243
281
|
prompter,
|
|
244
282
|
assumeYes: parsed.assumeYes,
|
|
283
|
+
paths: runtimePaths,
|
|
245
284
|
})
|
|
246
285
|
: await context.clearDomainDelegate({
|
|
247
286
|
domainName: parsed.args[0],
|
|
@@ -250,6 +289,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
250
289
|
provider: context.walletSecretProvider,
|
|
251
290
|
prompter,
|
|
252
291
|
assumeYes: parsed.assumeYes,
|
|
292
|
+
paths: runtimePaths,
|
|
253
293
|
});
|
|
254
294
|
return writeMutationCommandSuccess(parsed, context, {
|
|
255
295
|
data: buildDomainAdminMutationData(result, {
|
|
@@ -284,6 +324,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
284
324
|
provider: context.walletSecretProvider,
|
|
285
325
|
prompter,
|
|
286
326
|
assumeYes: parsed.assumeYes,
|
|
327
|
+
paths: runtimePaths,
|
|
287
328
|
})
|
|
288
329
|
: await context.clearDomainMiner({
|
|
289
330
|
domainName: parsed.args[0],
|
|
@@ -292,6 +333,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
292
333
|
provider: context.walletSecretProvider,
|
|
293
334
|
prompter,
|
|
294
335
|
assumeYes: parsed.assumeYes,
|
|
336
|
+
paths: runtimePaths,
|
|
295
337
|
});
|
|
296
338
|
return writeMutationCommandSuccess(parsed, context, {
|
|
297
339
|
data: buildDomainAdminMutationData(result, {
|
|
@@ -324,6 +366,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
324
366
|
provider: context.walletSecretProvider,
|
|
325
367
|
prompter,
|
|
326
368
|
assumeYes: parsed.assumeYes,
|
|
369
|
+
paths: runtimePaths,
|
|
327
370
|
});
|
|
328
371
|
return writeMutationCommandSuccess(parsed, context, {
|
|
329
372
|
data: buildDomainAdminMutationData(result, {
|
|
@@ -363,6 +406,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
363
406
|
provider: context.walletSecretProvider,
|
|
364
407
|
prompter,
|
|
365
408
|
assumeYes: parsed.assumeYes,
|
|
409
|
+
paths: runtimePaths,
|
|
366
410
|
});
|
|
367
411
|
return writeMutationCommandSuccess(parsed, context, {
|
|
368
412
|
data: buildFieldMutationData(result),
|
|
@@ -399,6 +443,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
399
443
|
provider: context.walletSecretProvider,
|
|
400
444
|
prompter,
|
|
401
445
|
assumeYes: parsed.assumeYes,
|
|
446
|
+
paths: runtimePaths,
|
|
402
447
|
});
|
|
403
448
|
return writeMutationCommandSuccess(parsed, context, {
|
|
404
449
|
data: buildFieldMutationData(result),
|
|
@@ -429,6 +474,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
429
474
|
provider: context.walletSecretProvider,
|
|
430
475
|
prompter,
|
|
431
476
|
assumeYes: parsed.assumeYes,
|
|
477
|
+
paths: runtimePaths,
|
|
432
478
|
});
|
|
433
479
|
return writeMutationCommandSuccess(parsed, context, {
|
|
434
480
|
data: buildFieldMutationData(result),
|
|
@@ -459,6 +505,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
459
505
|
provider: context.walletSecretProvider,
|
|
460
506
|
prompter,
|
|
461
507
|
assumeYes: parsed.assumeYes,
|
|
508
|
+
paths: runtimePaths,
|
|
462
509
|
});
|
|
463
510
|
return writeMutationCommandSuccess(parsed, context, {
|
|
464
511
|
data: buildCogMutationData(result, {
|
|
@@ -497,6 +544,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
497
544
|
provider: context.walletSecretProvider,
|
|
498
545
|
prompter,
|
|
499
546
|
assumeYes: parsed.assumeYes,
|
|
547
|
+
paths: runtimePaths,
|
|
500
548
|
});
|
|
501
549
|
return writeMutationCommandSuccess(parsed, context, {
|
|
502
550
|
data: buildCogMutationData(result, {
|
|
@@ -536,6 +584,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
536
584
|
databasePath: dbPath,
|
|
537
585
|
provider: context.walletSecretProvider,
|
|
538
586
|
prompter,
|
|
587
|
+
paths: runtimePaths,
|
|
539
588
|
});
|
|
540
589
|
return writeMutationCommandSuccess(parsed, context, {
|
|
541
590
|
data: buildCogMutationData(result, {
|
|
@@ -569,6 +618,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
569
618
|
databasePath: dbPath,
|
|
570
619
|
provider: context.walletSecretProvider,
|
|
571
620
|
prompter,
|
|
621
|
+
paths: runtimePaths,
|
|
572
622
|
});
|
|
573
623
|
return writeMutationCommandSuccess(parsed, context, {
|
|
574
624
|
data: buildCogMutationData(result, {
|
|
@@ -607,6 +657,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
607
657
|
provider: context.walletSecretProvider,
|
|
608
658
|
prompter,
|
|
609
659
|
assumeYes: parsed.assumeYes,
|
|
660
|
+
paths: runtimePaths,
|
|
610
661
|
})
|
|
611
662
|
: await context.revokeReputation({
|
|
612
663
|
sourceDomainName: parsed.args[0],
|
|
@@ -618,6 +669,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
618
669
|
provider: context.walletSecretProvider,
|
|
619
670
|
prompter,
|
|
620
671
|
assumeYes: parsed.assumeYes,
|
|
672
|
+
paths: runtimePaths,
|
|
621
673
|
});
|
|
622
674
|
return writeMutationCommandSuccess(parsed, context, {
|
|
623
675
|
data: buildReputationMutationData(result),
|
|
@@ -649,6 +701,7 @@ export async function runWalletMutationCommand(parsed, context) {
|
|
|
649
701
|
provider: context.walletSecretProvider,
|
|
650
702
|
prompter,
|
|
651
703
|
assumeYes: parsed.assumeYes,
|
|
704
|
+
paths: runtimePaths,
|
|
652
705
|
});
|
|
653
706
|
return writeMutationCommandSuccess(parsed, context, {
|
|
654
707
|
data: buildDomainMarketMutationData(result, {
|
|
@@ -39,11 +39,13 @@ function emitJson(context, parsed, schema, result) {
|
|
|
39
39
|
export async function runWalletReadCommand(parsed, context) {
|
|
40
40
|
const dbPath = parsed.dbPath ?? context.resolveDefaultClientDatabasePath();
|
|
41
41
|
const dataDir = parsed.dataDir ?? context.resolveDefaultBitcoindDataDir();
|
|
42
|
+
const runtimePaths = context.resolveWalletRuntimePaths(parsed.seedName);
|
|
42
43
|
await context.ensureDirectory(dirname(dbPath));
|
|
43
44
|
const readContext = await context.openWalletReadContext({
|
|
44
45
|
dataDir,
|
|
45
46
|
databasePath: dbPath,
|
|
46
47
|
secretProvider: context.walletSecretProvider,
|
|
48
|
+
paths: runtimePaths,
|
|
47
49
|
});
|
|
48
50
|
try {
|
|
49
51
|
switch (parsed.command) {
|
package/dist/cli/context.js
CHANGED
|
@@ -6,7 +6,7 @@ import { resolveDefaultBitcoindDataDirForTesting, resolveDefaultClientDatabasePa
|
|
|
6
6
|
import { openManagedBitcoindClient } from "../bitcoind/index.js";
|
|
7
7
|
import { inspectPassiveClientStatus } from "../passive-status.js";
|
|
8
8
|
import { openSqliteStore } from "../sqlite/index.js";
|
|
9
|
-
import { exportWallet, importWallet, initializeWallet, lockWallet, previewResetWallet, repairWallet, resetWallet, restoreWalletFromMnemonic, showWalletMnemonic, unlockWallet, } from "../wallet/lifecycle.js";
|
|
9
|
+
import { exportWallet, importWallet, initializeWallet, deleteImportedWalletSeed, lockWallet, previewResetWallet, repairWallet, resetWallet, restoreWalletFromMnemonic, showWalletMnemonic, unlockWallet, } from "../wallet/lifecycle.js";
|
|
10
10
|
import { resolveWalletRuntimePathsForTesting } from "../wallet/runtime.js";
|
|
11
11
|
import { openWalletReadContext } from "../wallet/read/index.js";
|
|
12
12
|
import { loadWalletExplicitLock } from "../wallet/state/explicit-lock.js";
|
|
@@ -14,7 +14,7 @@ import { loadUnlockSession } from "../wallet/state/session.js";
|
|
|
14
14
|
import { loadRawWalletStateEnvelope, loadWalletState } from "../wallet/state/storage.js";
|
|
15
15
|
import { disableMiningHooks, enableMiningHooks, followMiningLog, inspectMiningControlPlane, readMiningLog, runForegroundMining, setupBuiltInMining, startBackgroundMining, stopBackgroundMining, } from "../wallet/mining/index.js";
|
|
16
16
|
import { createLazyDefaultWalletSecretProvider } from "../wallet/state/provider.js";
|
|
17
|
-
import { anchorDomain, buyDomain, claimCogLock, clearDomainDelegate, clearDomainEndpoint, clearDomainMiner, clearField, createField, giveReputation, lockCogToDomain, registerDomain, reclaimCogLock, revokeReputation, sendCog, setField, setDomainCanonical, setDomainDelegate, setDomainEndpoint, setDomainMiner, sellDomain, transferDomain, } from "../wallet/tx/index.js";
|
|
17
|
+
import { anchorDomain, clearPendingAnchor, buyDomain, claimCogLock, clearDomainDelegate, clearDomainEndpoint, clearDomainMiner, clearField, createField, giveReputation, lockCogToDomain, registerDomain, reclaimCogLock, revokeReputation, sendCog, setField, setDomainCanonical, setDomainDelegate, setDomainEndpoint, setDomainMiner, sellDomain, transferDomain, } from "../wallet/tx/index.js";
|
|
18
18
|
import { createTerminalPrompter } from "./prompt.js";
|
|
19
19
|
export async function readPackageVersionFromDisk() {
|
|
20
20
|
const raw = await readFile(new URL("../../package.json", import.meta.url), "utf8");
|
|
@@ -39,11 +39,13 @@ export function createDefaultContext(overrides = {}) {
|
|
|
39
39
|
previewResetWallet: overrides.previewResetWallet ?? previewResetWallet,
|
|
40
40
|
exportWallet: overrides.exportWallet ?? exportWallet,
|
|
41
41
|
importWallet: overrides.importWallet ?? importWallet,
|
|
42
|
+
deleteImportedWalletSeed: overrides.deleteImportedWalletSeed ?? deleteImportedWalletSeed,
|
|
42
43
|
showWalletMnemonic: overrides.showWalletMnemonic ?? showWalletMnemonic,
|
|
43
44
|
unlockWallet: overrides.unlockWallet ?? unlockWallet,
|
|
44
45
|
lockWallet: overrides.lockWallet ?? lockWallet,
|
|
45
46
|
registerDomain: overrides.registerDomain ?? registerDomain,
|
|
46
47
|
anchorDomain: overrides.anchorDomain ?? anchorDomain,
|
|
48
|
+
clearPendingAnchor: overrides.clearPendingAnchor ?? clearPendingAnchor,
|
|
47
49
|
transferDomain: overrides.transferDomain ?? transferDomain,
|
|
48
50
|
sellDomain: overrides.sellDomain ?? sellDomain,
|
|
49
51
|
buyDomain: overrides.buyDomain ?? buyDomain,
|
|
@@ -94,6 +96,6 @@ export function createDefaultContext(overrides = {}) {
|
|
|
94
96
|
loadWalletExplicitLock: overrides.loadWalletExplicitLock ?? loadWalletExplicitLock,
|
|
95
97
|
resolveDefaultBitcoindDataDir: overrides.resolveDefaultBitcoindDataDir ?? resolveDefaultBitcoindDataDirForTesting,
|
|
96
98
|
resolveDefaultClientDatabasePath: overrides.resolveDefaultClientDatabasePath ?? resolveDefaultClientDatabasePathForTesting,
|
|
97
|
-
resolveWalletRuntimePaths: overrides.resolveWalletRuntimePaths ?? resolveWalletRuntimePathsForTesting,
|
|
99
|
+
resolveWalletRuntimePaths: overrides.resolveWalletRuntimePaths ?? ((seedName) => resolveWalletRuntimePathsForTesting({ seedName })),
|
|
98
100
|
};
|
|
99
101
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { CommandName } from "./types.js";
|
|
2
|
-
export declare const walletMutationCommands: readonly ["anchor", "domain-anchor", "register", "domain-register", "transfer", "domain-transfer", "sell", "domain-sell", "unsell", "domain-unsell", "buy", "domain-buy", "domain-endpoint-set", "domain-endpoint-clear", "domain-delegate-set", "domain-delegate-clear", "domain-miner-set", "domain-miner-clear", "domain-canonical", "field-create", "field-set", "field-clear", "send", "cog-send", "claim", "cog-claim", "reclaim", "cog-reclaim", "cog-lock", "rep-give", "rep-revoke"];
|
|
2
|
+
export declare const walletMutationCommands: readonly ["anchor", "anchor-clear", "domain-anchor", "domain-anchor-clear", "register", "domain-register", "transfer", "domain-transfer", "sell", "domain-sell", "unsell", "domain-unsell", "buy", "domain-buy", "domain-endpoint-set", "domain-endpoint-clear", "domain-delegate-set", "domain-delegate-clear", "domain-miner-set", "domain-miner-clear", "domain-canonical", "field-create", "field-set", "field-clear", "send", "cog-send", "claim", "cog-claim", "reclaim", "cog-reclaim", "cog-lock", "rep-give", "rep-revoke"];
|
|
3
3
|
export type WalletMutationCommand = (typeof walletMutationCommands)[number];
|
|
4
4
|
export declare function isWalletMutationCommand(command: CommandName | null): command is WalletMutationCommand;
|
|
5
5
|
export declare function isAnchorMutationCommand(command: CommandName | null): command is "anchor" | "domain-anchor";
|
|
6
|
+
export declare function isAnchorClearMutationCommand(command: CommandName | null): command is "anchor-clear" | "domain-anchor-clear";
|
|
6
7
|
export declare function isRegisterMutationCommand(command: CommandName | null): command is "register" | "domain-register";
|
|
7
8
|
export declare function isTransferMutationCommand(command: CommandName | null): command is "transfer" | "domain-transfer";
|
|
8
9
|
export declare function isSellMutationCommand(command: CommandName | null): command is "sell" | "domain-sell";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export const walletMutationCommands = [
|
|
2
2
|
"anchor",
|
|
3
|
+
"anchor-clear",
|
|
3
4
|
"domain-anchor",
|
|
5
|
+
"domain-anchor-clear",
|
|
4
6
|
"register",
|
|
5
7
|
"domain-register",
|
|
6
8
|
"transfer",
|
|
@@ -39,6 +41,9 @@ export function isWalletMutationCommand(command) {
|
|
|
39
41
|
export function isAnchorMutationCommand(command) {
|
|
40
42
|
return command === "anchor" || command === "domain-anchor";
|
|
41
43
|
}
|
|
44
|
+
export function isAnchorClearMutationCommand(command) {
|
|
45
|
+
return command === "anchor-clear" || command === "domain-anchor-clear";
|
|
46
|
+
}
|
|
42
47
|
export function isRegisterMutationCommand(command) {
|
|
43
48
|
return command === "register" || command === "domain-register";
|
|
44
49
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnchorDomainResult, CogMutationResult, DomainAdminMutationResult, DomainMarketMutationResult, FieldMutationResult, RegisterDomainResult, ReputationMutationResult } from "../wallet/tx/index.js";
|
|
2
|
-
import type { WalletInitializationResult, WalletExportResult, WalletImportResult, WalletRepairResult, WalletResetResult, WalletRestoreResult, WalletUnlockResult } from "../wallet/lifecycle.js";
|
|
1
|
+
import type { AnchorDomainResult, ClearPendingAnchorResult, CogMutationResult, DomainAdminMutationResult, DomainMarketMutationResult, FieldMutationResult, RegisterDomainResult, ReputationMutationResult } from "../wallet/tx/index.js";
|
|
2
|
+
import type { WalletInitializationResult, WalletExportResult, WalletImportResult, WalletDeleteResult, WalletRepairResult, WalletResetResult, WalletRestoreResult, WalletUnlockResult } from "../wallet/lifecycle.js";
|
|
3
3
|
export declare function buildSingleTxMutationData(options: {
|
|
4
4
|
kind: string;
|
|
5
5
|
localStatus: string;
|
|
@@ -222,6 +222,15 @@ export declare function buildAnchorMutationData(result: AnchorDomainResult, opti
|
|
|
222
222
|
};
|
|
223
223
|
intent: Record<string, unknown>;
|
|
224
224
|
};
|
|
225
|
+
export declare function buildAnchorClearMutationData(result: ClearPendingAnchorResult): {
|
|
226
|
+
resultType: "state-change";
|
|
227
|
+
stateChange: {
|
|
228
|
+
kind: string;
|
|
229
|
+
before: Record<string, unknown> | null;
|
|
230
|
+
after: Record<string, unknown> | null;
|
|
231
|
+
};
|
|
232
|
+
state: Record<string, unknown>;
|
|
233
|
+
};
|
|
225
234
|
export declare function buildResetMutationData(result: WalletResetResult): {
|
|
226
235
|
resultType: "operation";
|
|
227
236
|
operation: {
|
|
@@ -229,6 +238,13 @@ export declare function buildResetMutationData(result: WalletResetResult): {
|
|
|
229
238
|
};
|
|
230
239
|
state: Record<string, unknown> | null;
|
|
231
240
|
};
|
|
241
|
+
export declare function buildWalletDeleteMutationData(result: WalletDeleteResult): {
|
|
242
|
+
resultType: "operation";
|
|
243
|
+
operation: {
|
|
244
|
+
kind: string;
|
|
245
|
+
};
|
|
246
|
+
state: Record<string, unknown> | null;
|
|
247
|
+
};
|
|
232
248
|
export declare function buildDomainAdminMutationData(result: DomainAdminMutationResult, options: {
|
|
233
249
|
commandKind: "domain-endpoint-set" | "domain-endpoint-clear" | "domain-delegate-set" | "domain-delegate-clear" | "domain-miner-set" | "domain-miner-clear" | "domain-canonical";
|
|
234
250
|
}): {
|
|
@@ -140,6 +140,36 @@ export function buildAnchorMutationData(result, options) {
|
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
+
export function buildAnchorClearMutationData(result) {
|
|
144
|
+
const before = result.cleared
|
|
145
|
+
? {
|
|
146
|
+
localAnchorIntent: "reserved",
|
|
147
|
+
dedicatedIndex: result.releasedDedicatedIndex,
|
|
148
|
+
familyStatus: result.previousFamilyStatus,
|
|
149
|
+
familyStep: result.previousFamilyStep,
|
|
150
|
+
}
|
|
151
|
+
: null;
|
|
152
|
+
const after = result.cleared
|
|
153
|
+
? {
|
|
154
|
+
localAnchorIntent: "none",
|
|
155
|
+
dedicatedIndex: null,
|
|
156
|
+
familyStatus: "canceled",
|
|
157
|
+
familyStep: result.previousFamilyStep,
|
|
158
|
+
}
|
|
159
|
+
: null;
|
|
160
|
+
return buildStateChangeData({
|
|
161
|
+
kind: "anchor-clear",
|
|
162
|
+
state: {
|
|
163
|
+
domainName: result.domainName,
|
|
164
|
+
cleared: result.cleared,
|
|
165
|
+
previousFamilyStatus: result.previousFamilyStatus,
|
|
166
|
+
previousFamilyStep: result.previousFamilyStep,
|
|
167
|
+
releasedDedicatedIndex: result.releasedDedicatedIndex,
|
|
168
|
+
},
|
|
169
|
+
before,
|
|
170
|
+
after,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
143
173
|
export function buildResetMutationData(result) {
|
|
144
174
|
return buildOperationData({
|
|
145
175
|
kind: "reset",
|
|
@@ -171,6 +201,21 @@ export function buildResetMutationData(result) {
|
|
|
171
201
|
},
|
|
172
202
|
});
|
|
173
203
|
}
|
|
204
|
+
export function buildWalletDeleteMutationData(result) {
|
|
205
|
+
return buildOperationData({
|
|
206
|
+
kind: "wallet-delete",
|
|
207
|
+
state: {
|
|
208
|
+
seedName: result.seedName,
|
|
209
|
+
walletRootId: result.walletRootId,
|
|
210
|
+
deleted: result.deleted,
|
|
211
|
+
},
|
|
212
|
+
operation: {
|
|
213
|
+
seedName: result.seedName,
|
|
214
|
+
walletRootId: result.walletRootId,
|
|
215
|
+
deleted: result.deleted,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
174
219
|
export function buildDomainAdminMutationData(result, options) {
|
|
175
220
|
const data = buildSingleTxMutationData({
|
|
176
221
|
kind: options.commandKind,
|
|
@@ -261,6 +306,7 @@ export function buildWalletLockMutationData(result) {
|
|
|
261
306
|
}
|
|
262
307
|
export function buildInitMutationData(result) {
|
|
263
308
|
const after = {
|
|
309
|
+
seedName: "main",
|
|
264
310
|
walletRootId: result.walletRootId,
|
|
265
311
|
fundingAddress: result.fundingAddress,
|
|
266
312
|
unlockUntilUnixMs: result.unlockUntilUnixMs,
|
|
@@ -275,6 +321,7 @@ export function buildInitMutationData(result) {
|
|
|
275
321
|
}
|
|
276
322
|
export function buildRestoreMutationData(result) {
|
|
277
323
|
const after = {
|
|
324
|
+
seedName: result.seedName ?? null,
|
|
278
325
|
walletRootId: result.walletRootId,
|
|
279
326
|
fundingAddress: result.fundingAddress,
|
|
280
327
|
unlockUntilUnixMs: result.unlockUntilUnixMs,
|
|
@@ -21,7 +21,7 @@ function reuseExplanation(reusedExisting, message) {
|
|
|
21
21
|
}
|
|
22
22
|
export function writeMutationCommandSuccess(parsed, context, options) {
|
|
23
23
|
if (parsed.outputMode === "preview-json") {
|
|
24
|
-
writeJsonValue(context.stdout, createPreviewSuccessEnvelope(resolvePreviewJsonSchema(parsed), describeCanonicalCommand(parsed), mutationOutcome(options.reusedExisting), options.previewData ?? options.data, {
|
|
24
|
+
writeJsonValue(context.stdout, createPreviewSuccessEnvelope(resolvePreviewJsonSchema(parsed), describeCanonicalCommand(parsed), options.outcome ?? mutationOutcome(options.reusedExisting), options.previewData ?? options.data, {
|
|
25
25
|
explanations: reuseExplanation(options.reusedExisting, options.reusedMessage),
|
|
26
26
|
nextSteps: options.nextSteps.json,
|
|
27
27
|
warnings: options.warnings,
|
|
@@ -29,7 +29,7 @@ export function writeMutationCommandSuccess(parsed, context, options) {
|
|
|
29
29
|
return 0;
|
|
30
30
|
}
|
|
31
31
|
if (parsed.outputMode === "json") {
|
|
32
|
-
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), mutationOutcome(options.reusedExisting), options.data, {
|
|
32
|
+
writeJsonValue(context.stdout, createMutationSuccessEnvelope(resolveStableMutationJsonSchema(parsed), describeCanonicalCommand(parsed), options.outcome ?? mutationOutcome(options.reusedExisting), options.data, {
|
|
33
33
|
explanations: reuseExplanation(options.reusedExisting, options.reusedMessage),
|
|
34
34
|
nextSteps: options.nextSteps.json,
|
|
35
35
|
warnings: options.warnings,
|