@1sat/cli 0.1.0 → 0.1.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.
- package/dist/cli.js +2 -5
- package/package.json +10 -10
- package/src/commands/action.ts +0 -10
- package/src/commands/opns.ts +2 -2
package/dist/cli.js
CHANGED
|
@@ -666,9 +666,6 @@ Run '1sat action' to list available actions.`);
|
|
|
666
666
|
try {
|
|
667
667
|
const result = await action.execute(ctx, input);
|
|
668
668
|
output(result, opts);
|
|
669
|
-
if (actionName === "cancelOwnedListings" && result !== null && typeof result === "object" && "errors" in result && Array.isArray(result.errors) && result.errors.length > 0) {
|
|
670
|
-
process.exitCode = 1;
|
|
671
|
-
}
|
|
672
669
|
} finally {
|
|
673
670
|
await destroy();
|
|
674
671
|
}
|
|
@@ -2691,7 +2688,7 @@ import {
|
|
|
2691
2688
|
sellOpns,
|
|
2692
2689
|
sendOpns
|
|
2693
2690
|
} from "@1sat/actions";
|
|
2694
|
-
import { P1SAT_PROTOCOL } from "@1sat/types";
|
|
2691
|
+
import { ORDLOCK_V2_TAG, P1SAT_PROTOCOL } from "@1sat/types";
|
|
2695
2692
|
import { confirm as confirm4, isCancel as isCancel5 } from "@clack/prompts";
|
|
2696
2693
|
async function handleOpnsCommand(args, opts) {
|
|
2697
2694
|
const [subcommand, ...rest] = args;
|
|
@@ -2808,7 +2805,7 @@ async function opnsLookup(args, opts) {
|
|
|
2808
2805
|
const nameTag = getDisplayValue(o, "name", "name") ?? "";
|
|
2809
2806
|
const publishedTag = o.tags?.find((t) => t === "opns:published");
|
|
2810
2807
|
const status = publishedTag ? "registered" : "unregistered";
|
|
2811
|
-
const price = o.tags?.some((t) => t ===
|
|
2808
|
+
const price = o.tags?.some((t) => t === ORDLOCK_V2_TAG) ? o.tags?.find((t) => t.startsWith("price:"))?.slice("price:".length) ?? "?" : undefined;
|
|
2812
2809
|
const listed = price ? ` ${formatLabel(`listed @ ${price}`)}` : "";
|
|
2813
2810
|
console.log(` ${formatValue(id)} ${formatValue(o.outpoint)} ${nameTag ? formatValue(nameTag) : ""} ${formatLabel(status)}${listed}`);
|
|
2814
2811
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "CLI for 1Sat Ordinals SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@1sat/actions": "0.1.
|
|
31
|
-
"@1sat/client": "0.1.
|
|
32
|
-
"@1sat/types": "0.1.
|
|
33
|
-
"@1sat/wallet": "0.1.
|
|
34
|
-
"@1sat/wallet-node": "0.1.
|
|
35
|
-
"@1sat/wallet-server": "0.1.
|
|
30
|
+
"@1sat/actions": "0.1.1",
|
|
31
|
+
"@1sat/client": "0.1.1",
|
|
32
|
+
"@1sat/types": "0.1.1",
|
|
33
|
+
"@1sat/wallet": "0.1.1",
|
|
34
|
+
"@1sat/wallet-node": "0.1.1",
|
|
35
|
+
"@1sat/wallet-server": "0.1.1",
|
|
36
36
|
"@bopen-io/messagebox-server": "^1.3.2",
|
|
37
|
-
"@bsv/sdk": "
|
|
38
|
-
"@bsv/wallet-toolbox": "
|
|
39
|
-
"@bsv/wallet-toolbox-client": "
|
|
37
|
+
"@bsv/sdk": "^4.0.0",
|
|
38
|
+
"@bsv/wallet-toolbox": "^2.15.0",
|
|
39
|
+
"@bsv/wallet-toolbox-client": "^2.15.0",
|
|
40
40
|
"@clack/prompts": "^0.8.0",
|
|
41
41
|
"bitcoin-backup": "^0.0.11",
|
|
42
42
|
"chalk": "^5.0.0",
|
package/src/commands/action.ts
CHANGED
|
@@ -73,16 +73,6 @@ export async function handleActionCommand(
|
|
|
73
73
|
try {
|
|
74
74
|
const result = await action.execute(ctx, input)
|
|
75
75
|
output(result, opts)
|
|
76
|
-
if (
|
|
77
|
-
actionName === 'cancelOwnedListings' &&
|
|
78
|
-
result !== null &&
|
|
79
|
-
typeof result === 'object' &&
|
|
80
|
-
'errors' in result &&
|
|
81
|
-
Array.isArray(result.errors) &&
|
|
82
|
-
result.errors.length > 0
|
|
83
|
-
) {
|
|
84
|
-
process.exitCode = 1
|
|
85
|
-
}
|
|
86
76
|
} finally {
|
|
87
77
|
await destroy()
|
|
88
78
|
}
|
package/src/commands/opns.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
sellOpns,
|
|
14
14
|
sendOpns,
|
|
15
15
|
} from '@1sat/actions'
|
|
16
|
-
import { P1SAT_PROTOCOL } from '@1sat/types'
|
|
16
|
+
import { ORDLOCK_V2_TAG, P1SAT_PROTOCOL } from '@1sat/types'
|
|
17
17
|
import { confirm, isCancel } from '@clack/prompts'
|
|
18
18
|
import type { GlobalFlags } from '../args.js'
|
|
19
19
|
import { extractFlag } from '../args.js'
|
|
@@ -160,7 +160,7 @@ async function opnsLookup(args: string[], opts: GlobalFlags): Promise<void> {
|
|
|
160
160
|
const nameTag = getDisplayValue(o, 'name', 'name') ?? ''
|
|
161
161
|
const publishedTag = o.tags?.find((t) => t === 'opns:published')
|
|
162
162
|
const status = publishedTag ? 'registered' : 'unregistered'
|
|
163
|
-
const price = o.tags?.some((t) => t ===
|
|
163
|
+
const price = o.tags?.some((t) => t === ORDLOCK_V2_TAG)
|
|
164
164
|
? (o.tags
|
|
165
165
|
?.find((t) => t.startsWith('price:'))
|
|
166
166
|
?.slice('price:'.length) ?? '?')
|