@1sat/actions 0.0.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/balance/index.d.ts +41 -0
- package/dist/balance/index.d.ts.map +1 -0
- package/dist/balance/index.js +111 -0
- package/dist/balance/index.js.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/inscriptions/index.d.ts +26 -0
- package/dist/inscriptions/index.d.ts.map +1 -0
- package/dist/inscriptions/index.js +116 -0
- package/dist/inscriptions/index.js.map +1 -0
- package/dist/locks/index.d.ts +48 -0
- package/dist/locks/index.d.ts.map +1 -0
- package/dist/locks/index.js +296 -0
- package/dist/locks/index.js.map +1 -0
- package/dist/ordinals/index.d.ts +118 -0
- package/dist/ordinals/index.d.ts.map +1 -0
- package/dist/ordinals/index.js +850 -0
- package/dist/ordinals/index.js.map +1 -0
- package/dist/payments/index.d.ts +49 -0
- package/dist/payments/index.d.ts.map +1 -0
- package/dist/payments/index.js +194 -0
- package/dist/payments/index.js.map +1 -0
- package/dist/registry.d.ts +62 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +75 -0
- package/dist/registry.js.map +1 -0
- package/dist/signing/index.d.ts +36 -0
- package/dist/signing/index.d.ts.map +1 -0
- package/dist/signing/index.js +82 -0
- package/dist/signing/index.js.map +1 -0
- package/dist/sweep/index.d.ts +38 -0
- package/dist/sweep/index.d.ts.map +1 -0
- package/dist/sweep/index.js +748 -0
- package/dist/sweep/index.js.map +1 -0
- package/dist/sweep/types.d.ts +79 -0
- package/dist/sweep/types.d.ts.map +1 -0
- package/dist/sweep/types.js +5 -0
- package/dist/sweep/types.js.map +1 -0
- package/dist/tokens/index.d.ts +88 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +548 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locks Module
|
|
3
|
+
*
|
|
4
|
+
* Actions for time-locking BSV.
|
|
5
|
+
*/
|
|
6
|
+
import { Hash, PublicKey, Script, Transaction, TransactionSignature, Utils, } from '@bsv/sdk';
|
|
7
|
+
import { LOCK_BASKET, LOCK_PREFIX, LOCK_SUFFIX, MIN_UNLOCK_SATS, } from '../constants';
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Constants
|
|
10
|
+
// ============================================================================
|
|
11
|
+
const LOCK_PROTOCOL = [1, 'lock'];
|
|
12
|
+
const LOCK_KEY_ID = 'lock';
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Internal helpers
|
|
15
|
+
// ============================================================================
|
|
16
|
+
function buildLockScript(address, until) {
|
|
17
|
+
const pkh = Utils.fromBase58Check(address).data;
|
|
18
|
+
return new Script()
|
|
19
|
+
.writeScript(Script.fromHex(LOCK_PREFIX))
|
|
20
|
+
.writeBin(pkh)
|
|
21
|
+
.writeNumber(until)
|
|
22
|
+
.writeScript(Script.fromHex(LOCK_SUFFIX));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get lock data summary.
|
|
26
|
+
*/
|
|
27
|
+
export const getLockData = {
|
|
28
|
+
meta: {
|
|
29
|
+
name: 'getLockData',
|
|
30
|
+
description: 'Get summary of time-locked BSV (total, unlockable, next unlock height)',
|
|
31
|
+
category: 'locks',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
async execute(ctx) {
|
|
38
|
+
const lockData = { totalLocked: 0, unlockable: 0, nextUnlock: 0 };
|
|
39
|
+
if (!ctx.services)
|
|
40
|
+
return lockData;
|
|
41
|
+
const currentHeight = await ctx.services.chaintracks.currentHeight();
|
|
42
|
+
const result = await ctx.wallet.listOutputs({
|
|
43
|
+
basket: LOCK_BASKET,
|
|
44
|
+
includeTags: true,
|
|
45
|
+
limit: 10000,
|
|
46
|
+
});
|
|
47
|
+
const outputs = result.outputs;
|
|
48
|
+
for (const o of outputs) {
|
|
49
|
+
const untilTag = o.tags?.find((t) => t.startsWith('until:'));
|
|
50
|
+
if (!untilTag)
|
|
51
|
+
continue;
|
|
52
|
+
const until = Number.parseInt(untilTag.slice(6), 10);
|
|
53
|
+
lockData.totalLocked += o.satoshis;
|
|
54
|
+
if (until <= currentHeight) {
|
|
55
|
+
lockData.unlockable += o.satoshis;
|
|
56
|
+
}
|
|
57
|
+
else if (!lockData.nextUnlock || until < lockData.nextUnlock) {
|
|
58
|
+
lockData.nextUnlock = until;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (lockData.unlockable < MIN_UNLOCK_SATS * outputs.length) {
|
|
62
|
+
lockData.unlockable = 0;
|
|
63
|
+
}
|
|
64
|
+
return lockData;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Lock BSV until a block height.
|
|
69
|
+
*/
|
|
70
|
+
export const lockBsv = {
|
|
71
|
+
meta: {
|
|
72
|
+
name: 'lockBsv',
|
|
73
|
+
description: 'Lock BSV until a specific block height',
|
|
74
|
+
category: 'locks',
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
requests: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
description: 'Array of lock requests',
|
|
81
|
+
items: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: {
|
|
84
|
+
satoshis: {
|
|
85
|
+
type: 'integer',
|
|
86
|
+
description: 'Amount in satoshis to lock',
|
|
87
|
+
},
|
|
88
|
+
until: {
|
|
89
|
+
type: 'integer',
|
|
90
|
+
description: 'Block height until which to lock',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ['satoshis', 'until'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
required: ['requests'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
async execute(ctx, input) {
|
|
101
|
+
try {
|
|
102
|
+
const { requests } = input;
|
|
103
|
+
if (!requests || requests.length === 0) {
|
|
104
|
+
return { error: 'no-lock-requests' };
|
|
105
|
+
}
|
|
106
|
+
const { publicKey } = await ctx.wallet.getPublicKey({
|
|
107
|
+
protocolID: LOCK_PROTOCOL,
|
|
108
|
+
keyID: LOCK_KEY_ID,
|
|
109
|
+
counterparty: 'self',
|
|
110
|
+
forSelf: true,
|
|
111
|
+
});
|
|
112
|
+
const lockAddress = PublicKey.fromString(publicKey).toAddress();
|
|
113
|
+
const outputs = [];
|
|
114
|
+
for (const req of requests) {
|
|
115
|
+
if (req.satoshis <= 0)
|
|
116
|
+
return { error: 'invalid-satoshis' };
|
|
117
|
+
if (req.until <= 0)
|
|
118
|
+
return { error: 'invalid-block-height' };
|
|
119
|
+
const lockingScript = buildLockScript(lockAddress, req.until);
|
|
120
|
+
outputs.push({
|
|
121
|
+
lockingScript: lockingScript.toHex(),
|
|
122
|
+
satoshis: req.satoshis,
|
|
123
|
+
outputDescription: `Lock ${req.satoshis} sats until block ${req.until}`,
|
|
124
|
+
basket: LOCK_BASKET,
|
|
125
|
+
tags: [`until:${req.until}`],
|
|
126
|
+
customInstructions: JSON.stringify({
|
|
127
|
+
protocolID: LOCK_PROTOCOL,
|
|
128
|
+
keyID: LOCK_KEY_ID,
|
|
129
|
+
}),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const result = await ctx.wallet.createAction({
|
|
133
|
+
description: `Lock BSV in ${requests.length} output(s)`,
|
|
134
|
+
outputs,
|
|
135
|
+
options: { signAndProcess: true, acceptDelayedBroadcast: false },
|
|
136
|
+
});
|
|
137
|
+
if (!result.txid) {
|
|
138
|
+
return { error: 'no-txid-returned' };
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
txid: result.txid,
|
|
142
|
+
rawtx: result.tx ? Utils.toHex(result.tx) : undefined,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
console.error('[lockBsv]', error);
|
|
147
|
+
return {
|
|
148
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Unlock matured BSV locks.
|
|
155
|
+
*/
|
|
156
|
+
export const unlockBsv = {
|
|
157
|
+
meta: {
|
|
158
|
+
name: 'unlockBsv',
|
|
159
|
+
description: 'Unlock all matured time-locked BSV',
|
|
160
|
+
category: 'locks',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
async execute(ctx) {
|
|
167
|
+
try {
|
|
168
|
+
if (!ctx.services)
|
|
169
|
+
return { error: 'services-required' };
|
|
170
|
+
const currentHeight = await ctx.services.chaintracks.currentHeight();
|
|
171
|
+
const result = await ctx.wallet.listOutputs({
|
|
172
|
+
basket: LOCK_BASKET,
|
|
173
|
+
includeTags: true,
|
|
174
|
+
includeCustomInstructions: true,
|
|
175
|
+
include: 'locking scripts',
|
|
176
|
+
limit: 10000,
|
|
177
|
+
});
|
|
178
|
+
const maturedLocks = [];
|
|
179
|
+
for (const o of result.outputs) {
|
|
180
|
+
const untilTag = o.tags?.find((t) => t.startsWith('until:'));
|
|
181
|
+
if (!untilTag)
|
|
182
|
+
continue;
|
|
183
|
+
const until = Number.parseInt(untilTag.slice(6), 10);
|
|
184
|
+
let protocolID = LOCK_PROTOCOL;
|
|
185
|
+
let keyID = LOCK_KEY_ID;
|
|
186
|
+
if (o.customInstructions) {
|
|
187
|
+
const instructions = JSON.parse(o.customInstructions);
|
|
188
|
+
protocolID = instructions.protocolID ?? LOCK_PROTOCOL;
|
|
189
|
+
keyID = instructions.keyID ?? LOCK_KEY_ID;
|
|
190
|
+
}
|
|
191
|
+
if (until <= currentHeight) {
|
|
192
|
+
maturedLocks.push({ output: o, until, protocolID, keyID });
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (maturedLocks.length === 0) {
|
|
196
|
+
return { error: 'no-matured-locks' };
|
|
197
|
+
}
|
|
198
|
+
const totalSats = maturedLocks.reduce((sum, l) => sum + l.output.satoshis, 0);
|
|
199
|
+
if (totalSats < MIN_UNLOCK_SATS * maturedLocks.length) {
|
|
200
|
+
return { error: 'insufficient-unlock-amount' };
|
|
201
|
+
}
|
|
202
|
+
const maxUntil = Math.max(...maturedLocks.map((l) => l.until));
|
|
203
|
+
const createResult = await ctx.wallet.createAction({
|
|
204
|
+
description: `Unlock ${maturedLocks.length} lock(s)`,
|
|
205
|
+
inputs: maturedLocks.map((l) => ({
|
|
206
|
+
outpoint: l.output.outpoint,
|
|
207
|
+
inputDescription: 'Locked BSV',
|
|
208
|
+
unlockingScriptLength: 180,
|
|
209
|
+
sequenceNumber: 0,
|
|
210
|
+
})),
|
|
211
|
+
outputs: [
|
|
212
|
+
{
|
|
213
|
+
lockingScript: '',
|
|
214
|
+
satoshis: 0,
|
|
215
|
+
outputDescription: 'Unlocked BSV',
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
lockTime: maxUntil,
|
|
219
|
+
options: { signAndProcess: false },
|
|
220
|
+
});
|
|
221
|
+
if ('error' in createResult && createResult.error) {
|
|
222
|
+
return { error: String(createResult.error) };
|
|
223
|
+
}
|
|
224
|
+
if (!createResult.signableTransaction) {
|
|
225
|
+
return { error: 'no-signable-transaction' };
|
|
226
|
+
}
|
|
227
|
+
const tx = Transaction.fromBEEF(createResult.signableTransaction.tx);
|
|
228
|
+
const spends = {};
|
|
229
|
+
for (let i = 0; i < maturedLocks.length; i++) {
|
|
230
|
+
const lock = maturedLocks[i];
|
|
231
|
+
const input = tx.inputs[i];
|
|
232
|
+
if (!lock.output.lockingScript || !input.sourceTXID) {
|
|
233
|
+
return { error: 'missing-lock-data' };
|
|
234
|
+
}
|
|
235
|
+
const lockingScript = Script.fromHex(lock.output.lockingScript);
|
|
236
|
+
const preimage = TransactionSignature.format({
|
|
237
|
+
sourceTXID: input.sourceTXID,
|
|
238
|
+
sourceOutputIndex: input.sourceOutputIndex,
|
|
239
|
+
sourceSatoshis: lock.output.satoshis,
|
|
240
|
+
transactionVersion: tx.version,
|
|
241
|
+
otherInputs: tx.inputs.filter((_, idx) => idx !== i),
|
|
242
|
+
outputs: tx.outputs,
|
|
243
|
+
inputIndex: i,
|
|
244
|
+
subscript: lockingScript,
|
|
245
|
+
inputSequence: 0,
|
|
246
|
+
lockTime: tx.lockTime,
|
|
247
|
+
scope: TransactionSignature.SIGHASH_ALL |
|
|
248
|
+
TransactionSignature.SIGHASH_ANYONECANPAY |
|
|
249
|
+
TransactionSignature.SIGHASH_FORKID,
|
|
250
|
+
});
|
|
251
|
+
const sighash = Hash.sha256(Hash.sha256(preimage));
|
|
252
|
+
const { signature } = await ctx.wallet.createSignature({
|
|
253
|
+
protocolID: lock.protocolID,
|
|
254
|
+
keyID: lock.keyID,
|
|
255
|
+
counterparty: 'self',
|
|
256
|
+
hashToDirectlySign: Array.from(sighash),
|
|
257
|
+
});
|
|
258
|
+
const { publicKey } = await ctx.wallet.getPublicKey({
|
|
259
|
+
protocolID: lock.protocolID,
|
|
260
|
+
keyID: lock.keyID,
|
|
261
|
+
counterparty: 'self',
|
|
262
|
+
forSelf: true,
|
|
263
|
+
});
|
|
264
|
+
const unlockingScript = new Script()
|
|
265
|
+
.writeBin(signature)
|
|
266
|
+
.writeBin(Utils.toArray(publicKey, 'hex'))
|
|
267
|
+
.writeBin(Array.from(preimage));
|
|
268
|
+
spends[i] = { unlockingScript: unlockingScript.toHex() };
|
|
269
|
+
}
|
|
270
|
+
const signResult = await ctx.wallet.signAction({
|
|
271
|
+
reference: createResult.signableTransaction.reference,
|
|
272
|
+
spends,
|
|
273
|
+
options: { acceptDelayedBroadcast: false },
|
|
274
|
+
});
|
|
275
|
+
if ('error' in signResult) {
|
|
276
|
+
return { error: String(signResult.error) };
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
txid: signResult.txid,
|
|
280
|
+
rawtx: signResult.tx ? Utils.toHex(signResult.tx) : undefined,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
catch (error) {
|
|
284
|
+
console.error('[unlockBsv]', error);
|
|
285
|
+
return {
|
|
286
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
// ============================================================================
|
|
292
|
+
// Module exports
|
|
293
|
+
// ============================================================================
|
|
294
|
+
/** All lock actions for registry */
|
|
295
|
+
export const locksActions = [getLockData, lockBsv, unlockBsv];
|
|
296
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEN,IAAI,EACJ,SAAS,EACT,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,KAAK,GAEL,MAAM,UAAU,CAAA;AACjB,OAAO,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,GACf,MAAM,cAAc,CAAA;AAGrB,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,aAAa,GAAwB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AACtD,MAAM,WAAW,GAAG,MAAM,CAAA;AA4B1B,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,SAAS,eAAe,CAAC,OAAe,EAAE,KAAa;IACtD,MAAM,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC,OAAO,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AO,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAA;YAC3C,CAAC;YAED,OAAO;gBACN,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;aAC7D,CAAA;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;YACnC,OAAO;gBACN,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAC/D,CAAA;QACF,CAAC;IACF,CAAC;CACD,CAAA;AAED,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ordinals Module
|
|
3
|
+
*
|
|
4
|
+
* Actions for managing ordinals/inscriptions.
|
|
5
|
+
* Returns WalletOutput[] directly from the SDK - no custom mapping needed.
|
|
6
|
+
*/
|
|
7
|
+
import { type CreateActionArgs, type WalletOutput } from '@bsv/sdk';
|
|
8
|
+
import type { Action, OneSatContext } from '../types';
|
|
9
|
+
type PubKeyHex = string;
|
|
10
|
+
export interface TransferItem {
|
|
11
|
+
/** The ordinal output to transfer (from listOutputs) */
|
|
12
|
+
ordinal: WalletOutput;
|
|
13
|
+
/** Recipient's identity public key (preferred) */
|
|
14
|
+
counterparty?: PubKeyHex;
|
|
15
|
+
/** Raw P2PKH address */
|
|
16
|
+
address?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TransferOrdinalsRequest {
|
|
19
|
+
/** Ordinals to transfer with their destinations */
|
|
20
|
+
transfers: TransferItem[];
|
|
21
|
+
/** BEEF data from listOutputs (include: 'entire transactions') */
|
|
22
|
+
inputBEEF: number[];
|
|
23
|
+
}
|
|
24
|
+
export interface ListOrdinalRequest {
|
|
25
|
+
/** The ordinal output to list (from listOutputs) */
|
|
26
|
+
ordinal: WalletOutput;
|
|
27
|
+
/** BEEF data from listOutputs (include: 'entire transactions') */
|
|
28
|
+
inputBEEF: number[];
|
|
29
|
+
/** Price in satoshis */
|
|
30
|
+
price: number;
|
|
31
|
+
/** Address that receives payment on purchase (BRC-29 receive address) */
|
|
32
|
+
payAddress: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PurchaseOrdinalRequest {
|
|
35
|
+
/** Outpoint of listing to purchase */
|
|
36
|
+
outpoint: string;
|
|
37
|
+
/** Marketplace address for fees */
|
|
38
|
+
marketplaceAddress?: string;
|
|
39
|
+
/** Marketplace fee rate (0-1) */
|
|
40
|
+
marketplaceRate?: number;
|
|
41
|
+
/** Optional content type - looked up from ordfs API if not provided */
|
|
42
|
+
contentType?: string;
|
|
43
|
+
/** Optional origin outpoint - looked up from ordfs API if not provided */
|
|
44
|
+
origin?: string;
|
|
45
|
+
/** Optional name from MAP metadata - looked up from ordfs API if not provided */
|
|
46
|
+
name?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface OrdinalOperationResponse {
|
|
49
|
+
txid?: string;
|
|
50
|
+
rawtx?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build CreateActionArgs for transferring one or more ordinals.
|
|
55
|
+
* Does NOT execute - returns params for createAction.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildTransferOrdinals(ctx: OneSatContext, request: TransferOrdinalsRequest): Promise<CreateActionArgs | {
|
|
58
|
+
error: string;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* Build CreateActionArgs for listing an ordinal for sale.
|
|
62
|
+
* Does NOT execute - returns params for createAction.
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildListOrdinal(ctx: OneSatContext, request: ListOrdinalRequest): Promise<CreateActionArgs | {
|
|
65
|
+
error: string;
|
|
66
|
+
}>;
|
|
67
|
+
/** Input for getOrdinals action */
|
|
68
|
+
export interface GetOrdinalsInput {
|
|
69
|
+
/** Max number of ordinals to return */
|
|
70
|
+
limit?: number;
|
|
71
|
+
/** Offset for pagination */
|
|
72
|
+
offset?: number;
|
|
73
|
+
}
|
|
74
|
+
/** Result from getOrdinals action */
|
|
75
|
+
export interface GetOrdinalsResult {
|
|
76
|
+
outputs: WalletOutput[];
|
|
77
|
+
BEEF?: number[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get ordinals from the wallet with BEEF for spending.
|
|
81
|
+
*/
|
|
82
|
+
export declare const getOrdinals: Action<GetOrdinalsInput, GetOrdinalsResult>;
|
|
83
|
+
/** Input for deriveCancelAddress action */
|
|
84
|
+
export interface DeriveCancelAddressInput {
|
|
85
|
+
/** Outpoint of the ordinal listing */
|
|
86
|
+
outpoint: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Derive a cancel address for an ordinal listing.
|
|
90
|
+
*/
|
|
91
|
+
export declare const deriveCancelAddress: Action<DeriveCancelAddressInput, string>;
|
|
92
|
+
/**
|
|
93
|
+
* Transfer an ordinal to a new owner.
|
|
94
|
+
*/
|
|
95
|
+
export declare const transferOrdinals: Action<TransferOrdinalsRequest, OrdinalOperationResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* List an ordinal for sale on the global orderbook.
|
|
98
|
+
*/
|
|
99
|
+
export declare const listOrdinal: Action<ListOrdinalRequest, OrdinalOperationResponse>;
|
|
100
|
+
/** Input for cancelListing action */
|
|
101
|
+
export interface CancelListingInput {
|
|
102
|
+
/** The listing output to cancel (from listOutputs, must include lockingScript) */
|
|
103
|
+
listing: WalletOutput;
|
|
104
|
+
/** BEEF data from listOutputs (include: 'entire transactions') */
|
|
105
|
+
inputBEEF: number[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Cancel an ordinal listing.
|
|
109
|
+
*/
|
|
110
|
+
export declare const cancelListing: Action<CancelListingInput, OrdinalOperationResponse>;
|
|
111
|
+
/**
|
|
112
|
+
* Purchase an ordinal from the global orderbook.
|
|
113
|
+
*/
|
|
114
|
+
export declare const purchaseOrdinal: Action<PurchaseOrdinalRequest, OrdinalOperationResponse>;
|
|
115
|
+
/** All ordinals actions for registry */
|
|
116
|
+
export declare const ordinalsActions: (Action<GetOrdinalsInput, GetOrdinalsResult> | Action<DeriveCancelAddressInput, string> | Action<TransferOrdinalsRequest, OrdinalOperationResponse> | Action<ListOrdinalRequest, OrdinalOperationResponse> | Action<CancelListingInput, OrdinalOperationResponse> | Action<PurchaseOrdinalRequest, OrdinalOperationResponse>)[];
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ordinals/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAGN,KAAK,gBAAgB,EAWrB,KAAK,YAAY,EAEjB,MAAM,UAAU,CAAA;AAOjB,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AA2FrD,KAAK,SAAS,GAAG,MAAM,CAAA;AAEvB,MAAM,WAAW,YAAY;IAC5B,wDAAwD;IACxD,OAAO,EAAE,YAAY,CAAA;IACrB,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACvC,mDAAmD;IACnD,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,kEAAkE;IAClE,SAAS,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,kBAAkB;IAClC,oDAAoD;IACpD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