@1sat/cli 0.0.82 → 0.0.83
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/package.json +1 -1
- package/src/commands/opns.ts +10 -6
- package/src/help.ts +5 -0
package/package.json
CHANGED
package/src/commands/opns.ts
CHANGED
|
@@ -225,6 +225,7 @@ async function opnsCancelListing(
|
|
|
225
225
|
async function opnsSell(args: string[], opts: GlobalFlags): Promise<void> {
|
|
226
226
|
const outpoint = extractFlag(args, '--outpoint')
|
|
227
227
|
const priceStr = extractFlag(args, '--price')
|
|
228
|
+
const payAddressFlag = extractFlag(args, '--pay-address')
|
|
228
229
|
|
|
229
230
|
if (!outpoint) fatal('Missing --outpoint <txid.vout>')
|
|
230
231
|
if (!priceStr) fatal('Missing --price <satoshis>')
|
|
@@ -255,13 +256,16 @@ async function opnsSell(args: string[], opts: GlobalFlags): Promise<void> {
|
|
|
255
256
|
fatal(`OpNS name not found in wallet: ${outpoint}`)
|
|
256
257
|
}
|
|
257
258
|
|
|
258
|
-
|
|
259
|
-
prefix: '1sat',
|
|
260
|
-
count: 1,
|
|
261
|
-
})
|
|
262
|
-
const payAddress = addressResult.derivations[0]?.address
|
|
259
|
+
let payAddress = payAddressFlag
|
|
263
260
|
if (!payAddress) {
|
|
264
|
-
|
|
261
|
+
const addressResult = await deriveDepositAddresses.execute(ctx, {
|
|
262
|
+
prefix: '1sat',
|
|
263
|
+
count: 1,
|
|
264
|
+
})
|
|
265
|
+
payAddress = addressResult.derivations[0]?.address
|
|
266
|
+
if (!payAddress) {
|
|
267
|
+
fatal('Failed to derive pay address')
|
|
268
|
+
}
|
|
265
269
|
}
|
|
266
270
|
|
|
267
271
|
const result = await listOrdinal.execute(ctx, {
|
package/src/help.ts
CHANGED
|
@@ -515,6 +515,11 @@ export const COMMANDS: CommandSpec[] = [
|
|
|
515
515
|
args: [
|
|
516
516
|
{ flag: '--outpoint', values: '<txid.vout>', required: true },
|
|
517
517
|
{ flag: '--price', values: '<satoshis>', required: true },
|
|
518
|
+
{
|
|
519
|
+
flag: '--pay-address',
|
|
520
|
+
values: '<address>',
|
|
521
|
+
required: false,
|
|
522
|
+
},
|
|
518
523
|
],
|
|
519
524
|
},
|
|
520
525
|
{
|