@1sat/actions 0.0.72 → 0.0.74
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/mnee/index.d.ts +124 -0
- package/dist/mnee/index.d.ts.map +1 -0
- package/dist/mnee/index.js +565 -0
- package/dist/mnee/index.js.map +1 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACN,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,aAAa,GACb,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAGhF,cAAc,aAAa,CAAA;AAG3B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACN,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,GACpB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACN,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,GACd,MAAM,6BAA6B,CAAA;AAGpC,YAAY,EACX,eAAe,EACf,aAAa,GACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EACN,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACrB,MAAM,yBAAyB,CAAA;AAGhC,cAAc,aAAa,CAAA;AAC3B,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c,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AAGvB,cAAc,QAAQ,CAAA;AAGtB,cAAc,YAAY,CAAA;AAoC1B,YAAY,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,YAAY,GACZ,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export * from './signing';
|
|
|
28
28
|
export * from './social';
|
|
29
29
|
export * from './identity';
|
|
30
30
|
export * from './opns';
|
|
31
|
+
export * from './mnee';
|
|
31
32
|
// Export sweep module (uses external signing, not action-based)
|
|
32
33
|
export * from './sweep';
|
|
33
34
|
// Export sync module
|
|
@@ -48,6 +49,7 @@ import { socialActions } from './social';
|
|
|
48
49
|
import { sweepActions } from './sweep';
|
|
49
50
|
import { syncActions } from './sync';
|
|
50
51
|
import { tokensActions } from './tokens';
|
|
52
|
+
import { mneeActions } from './mnee';
|
|
51
53
|
actionRegistry.registerAll([
|
|
52
54
|
...addressesActions,
|
|
53
55
|
...collectionsActions,
|
|
@@ -62,5 +64,6 @@ actionRegistry.registerAll([
|
|
|
62
64
|
...sweepActions,
|
|
63
65
|
...opnsActions,
|
|
64
66
|
...syncActions,
|
|
67
|
+
...mneeActions,
|
|
65
68
|
]);
|
|
66
69
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kCAAkC;AAClC,OAAO,EAQN,aAAa,G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
|
+
*
|
|
4
|
+
* Actions for querying and transferring MNEE stablecoin.
|
|
5
|
+
* Uses the MNEE API for balance/UTXO queries and transaction submission.
|
|
6
|
+
* Addresses are derived from the wallet's BRC-29 "yours" prefix (indices 0-4).
|
|
7
|
+
*/
|
|
8
|
+
import type { MneeUtxo, MneeTransferStatus, MneeConfig } from '@1sat/client';
|
|
9
|
+
import { type AddressDerivation } from '@1sat/types';
|
|
10
|
+
import type { Action } from '../types';
|
|
11
|
+
export interface GetMneeBalanceInput {
|
|
12
|
+
/** Addresses to query for MNEE balance */
|
|
13
|
+
addresses: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface MneeAddressBalance {
|
|
16
|
+
address: string;
|
|
17
|
+
/** Balance in atomic units */
|
|
18
|
+
amount: number;
|
|
19
|
+
/** Balance in MNEE (decimal) */
|
|
20
|
+
decimalAmount: number;
|
|
21
|
+
}
|
|
22
|
+
export interface GetMneeBalanceResult {
|
|
23
|
+
/** Per-address balances */
|
|
24
|
+
balances: MneeAddressBalance[];
|
|
25
|
+
/** Total balance in MNEE (decimal) */
|
|
26
|
+
totalDecimal: number;
|
|
27
|
+
/** Total balance in atomic units */
|
|
28
|
+
totalAtomic: number;
|
|
29
|
+
}
|
|
30
|
+
export interface GetMneeUtxosInput {
|
|
31
|
+
/** Addresses to query for MNEE UTXOs */
|
|
32
|
+
addresses: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface GetMneeUtxosResult {
|
|
35
|
+
utxos: MneeUtxo[];
|
|
36
|
+
}
|
|
37
|
+
export interface GetMneeConfigInput {
|
|
38
|
+
}
|
|
39
|
+
export interface GetMneeHistoryInput {
|
|
40
|
+
/** Addresses to query history for */
|
|
41
|
+
addresses: string[];
|
|
42
|
+
/** Pagination cursor */
|
|
43
|
+
fromScore?: number;
|
|
44
|
+
/** Max results (default 50) */
|
|
45
|
+
limit?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface SendMneeInput {
|
|
48
|
+
/** Recipients */
|
|
49
|
+
recipients: Array<{
|
|
50
|
+
address: string;
|
|
51
|
+
amount: number;
|
|
52
|
+
}>;
|
|
53
|
+
/** Source address derivations (address + keyID for signing) */
|
|
54
|
+
derivations: AddressDerivation[];
|
|
55
|
+
/** Change address. If omitted, change goes back to the first input's address. */
|
|
56
|
+
changeAddress?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface GetMneeTxStatusInput {
|
|
59
|
+
ticketId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface MneeTxHistory {
|
|
62
|
+
txid: string;
|
|
63
|
+
height: number;
|
|
64
|
+
type: 'send' | 'receive';
|
|
65
|
+
status: 'confirmed' | 'unconfirmed';
|
|
66
|
+
/** Amount in atomic units sent/received (excluding fees and self-change) */
|
|
67
|
+
amount: number;
|
|
68
|
+
/** Fee in atomic units (only for sends) */
|
|
69
|
+
fee: number;
|
|
70
|
+
/** Pagination cursor */
|
|
71
|
+
score: number;
|
|
72
|
+
/** Counterparty addresses and amounts */
|
|
73
|
+
counterparties: Array<{
|
|
74
|
+
address: string;
|
|
75
|
+
amount: number;
|
|
76
|
+
}>;
|
|
77
|
+
}
|
|
78
|
+
export interface GetMneeHistoryResult {
|
|
79
|
+
history: MneeTxHistory[];
|
|
80
|
+
/** Pass this as fromScore in the next call for pagination */
|
|
81
|
+
nextScore?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get MNEE balance across all yours wallet addresses.
|
|
85
|
+
*/
|
|
86
|
+
export declare const getMneeBalance: Action<GetMneeBalanceInput, GetMneeBalanceResult>;
|
|
87
|
+
/**
|
|
88
|
+
* Get MNEE UTXOs across all yours wallet addresses.
|
|
89
|
+
*/
|
|
90
|
+
export declare const getMneeUtxos: Action<GetMneeUtxosInput, GetMneeUtxosResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Get MNEE service configuration (cosigner, fees, etc).
|
|
93
|
+
*/
|
|
94
|
+
export declare const getMneeConfig: Action<GetMneeConfigInput, MneeConfig>;
|
|
95
|
+
/**
|
|
96
|
+
* Get MNEE transaction history for an address.
|
|
97
|
+
*/
|
|
98
|
+
export declare const getMneeHistory: Action<GetMneeHistoryInput, GetMneeHistoryResult>;
|
|
99
|
+
/**
|
|
100
|
+
* Get the status of an MNEE transfer by ticket ID.
|
|
101
|
+
*/
|
|
102
|
+
export declare const getMneeTxStatus: Action<GetMneeTxStatusInput, MneeTransferStatus>;
|
|
103
|
+
export interface SendMneeRecipient {
|
|
104
|
+
address: string;
|
|
105
|
+
/** Amount in MNEE (decimal, e.g. 1.5 = $1.50) */
|
|
106
|
+
amount: number;
|
|
107
|
+
}
|
|
108
|
+
export interface SendMneeInput {
|
|
109
|
+
recipients: SendMneeRecipient[];
|
|
110
|
+
/** Change address. If omitted, change goes back to the first input's address. */
|
|
111
|
+
changeAddress?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface SendMneeResult {
|
|
114
|
+
txid?: string;
|
|
115
|
+
ticketId?: string;
|
|
116
|
+
error?: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Send MNEE stablecoin. Builds the transaction, signs with BRC-29 keys,
|
|
120
|
+
* and submits to MNEE API for cosigner signature + broadcast.
|
|
121
|
+
*/
|
|
122
|
+
export declare const sendMnee: Action<SendMneeInput, SendMneeResult>;
|
|
123
|
+
export declare const mneeActions: (Action<GetMneeBalanceInput, GetMneeBalanceResult> | Action<GetMneeUtxosInput, GetMneeUtxosResult> | Action<GetMneeConfigInput, MneeConfig> | Action<GetMneeHistoryInput, GetMneeHistoryResult> | Action<GetMneeTxStatusInput, MneeTransferStatus> | Action<SendMneeInput, SendMneeResult>)[];
|
|
124
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mnee/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEX,QAAQ,EAER,kBAAkB,EAElB,UAAU,EAEV,MAAM,cAAc,CAAA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,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,aAAa,EAAE,cAAc,CAgM1D,CAAA;AAgBD,eAAO,MAAM,WAAW,+RAOvB,CAAA"}
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MNEE Module
|
|
3
|
+
*
|
|
4
|
+
* Actions for querying and transferring MNEE stablecoin.
|
|
5
|
+
* Uses the MNEE API for balance/UTXO queries and transaction submission.
|
|
6
|
+
* Addresses are derived from the wallet's BRC-29 "yours" prefix (indices 0-4).
|
|
7
|
+
*/
|
|
8
|
+
import { Cosign, Inscription as InscriptionTemplate } from '@1sat/templates';
|
|
9
|
+
import { BRC29_PROTOCOL_ID } from '@1sat/types';
|
|
10
|
+
import { Hash, LockingScript, OP, PublicKey, Script, Transaction, TransactionSignature, UnlockingScript, Utils, } from '@bsv/sdk';
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Helpers
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/** Build a map of address → BRC-29 keyID for signing */
|
|
15
|
+
function buildAddressKeyMap(derivations) {
|
|
16
|
+
const map = new Map();
|
|
17
|
+
for (const d of derivations) {
|
|
18
|
+
const keyID = `${d.derivationPrefix} ${d.derivationSuffix}`;
|
|
19
|
+
map.set(d.address, keyID);
|
|
20
|
+
}
|
|
21
|
+
return map;
|
|
22
|
+
}
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// CosignTemplate (ported from mnee@3.1.0)
|
|
25
|
+
// ============================================================================
|
|
26
|
+
function cosignLock(userAddress, approverPubKey) {
|
|
27
|
+
const hash = Utils.fromBase58Check(userAddress);
|
|
28
|
+
const pkhash = hash.data;
|
|
29
|
+
const script = new LockingScript();
|
|
30
|
+
script
|
|
31
|
+
.writeOpCode(OP.OP_DUP)
|
|
32
|
+
.writeOpCode(OP.OP_HASH160)
|
|
33
|
+
.writeBin(pkhash)
|
|
34
|
+
.writeOpCode(OP.OP_EQUALVERIFY)
|
|
35
|
+
.writeOpCode(OP.OP_CHECKSIGVERIFY)
|
|
36
|
+
.writeBin(approverPubKey.encode(true))
|
|
37
|
+
.writeOpCode(OP.OP_CHECKSIG);
|
|
38
|
+
return script;
|
|
39
|
+
}
|
|
40
|
+
function applyInscription(lockingScript, inscription) {
|
|
41
|
+
const ordHex = Utils.toHex(Utils.toArray('ord', 'utf8'));
|
|
42
|
+
const fileBytes = Utils.toArray(inscription.dataB64, 'base64');
|
|
43
|
+
const fileHex = Utils.toHex(fileBytes);
|
|
44
|
+
const mimeHex = Utils.toHex(Utils.toArray(inscription.contentType, 'utf8'));
|
|
45
|
+
const ordAsm = `OP_0 OP_IF ${ordHex} OP_1 ${mimeHex} OP_0 ${fileHex} OP_ENDIF`;
|
|
46
|
+
return LockingScript.fromASM(`${ordAsm} ${lockingScript.toASM()}`);
|
|
47
|
+
}
|
|
48
|
+
function createInscriptionOutput(recipient, atomicAmount, config) {
|
|
49
|
+
const inscriptionData = {
|
|
50
|
+
p: 'bsv-20',
|
|
51
|
+
op: 'transfer',
|
|
52
|
+
id: config.tokenId,
|
|
53
|
+
amt: atomicAmount.toString(),
|
|
54
|
+
};
|
|
55
|
+
const dataB64 = Utils.toBase64(Utils.toArray(JSON.stringify(inscriptionData), 'utf8'));
|
|
56
|
+
const cosignScript = cosignLock(recipient, PublicKey.fromString(config.approver));
|
|
57
|
+
return {
|
|
58
|
+
lockingScript: applyInscription(cosignScript, {
|
|
59
|
+
dataB64,
|
|
60
|
+
contentType: 'application/bsv-20',
|
|
61
|
+
}),
|
|
62
|
+
satoshis: 1,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** Extract the user address from a cosign locking script */
|
|
66
|
+
function extractAddressFromCosignScript(script) {
|
|
67
|
+
return Cosign.decode(script)?.address ?? undefined;
|
|
68
|
+
}
|
|
69
|
+
/** Parse BSV-20 inscription amount from a locking script */
|
|
70
|
+
function parseInscriptionAmount(script) {
|
|
71
|
+
for (let i = 0; i < script.chunks.length; i++) {
|
|
72
|
+
const chunk = script.chunks[i];
|
|
73
|
+
if (chunk.data?.length === 3 &&
|
|
74
|
+
Utils.toUTF8(chunk.data) === 'ord' &&
|
|
75
|
+
i >= 2 &&
|
|
76
|
+
script.chunks[i - 1].op === OP.OP_IF &&
|
|
77
|
+
script.chunks[i - 2].op === OP.OP_FALSE) {
|
|
78
|
+
// Find the data chunk (after OP_0 following content type)
|
|
79
|
+
for (let j = i + 1; j < script.chunks.length; j++) {
|
|
80
|
+
if (script.chunks[j].op === OP.OP_ENDIF)
|
|
81
|
+
break;
|
|
82
|
+
if (script.chunks[j].op === OP.OP_0 &&
|
|
83
|
+
j + 1 < script.chunks.length &&
|
|
84
|
+
script.chunks[j + 1].data) {
|
|
85
|
+
try {
|
|
86
|
+
const json = JSON.parse(Utils.toUTF8(script.chunks[j + 1].data));
|
|
87
|
+
if (json.amt)
|
|
88
|
+
return Number.parseInt(json.amt, 10);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// not JSON
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return 0;
|
|
98
|
+
}
|
|
99
|
+
/** Sign a cosign input using BRC-29 key derivation */
|
|
100
|
+
async function signCosignInput(ctx, tx, inputIndex, keyID) {
|
|
101
|
+
const input = tx.inputs[inputIndex];
|
|
102
|
+
const sourceLockingScript = input.sourceTransaction?.outputs[input.sourceOutputIndex]?.lockingScript;
|
|
103
|
+
if (!sourceLockingScript)
|
|
104
|
+
throw new Error(`Missing source locking script for input ${inputIndex}`);
|
|
105
|
+
const sourceTXID = input.sourceTXID ?? input.sourceTransaction?.id('hex');
|
|
106
|
+
if (!sourceTXID)
|
|
107
|
+
throw new Error(`Missing source TXID for input ${inputIndex}`);
|
|
108
|
+
const sourceSatoshis = input.sourceTransaction?.outputs[input.sourceOutputIndex]?.satoshis ?? 1;
|
|
109
|
+
const scope = TransactionSignature.SIGHASH_ALL |
|
|
110
|
+
TransactionSignature.SIGHASH_ANYONECANPAY |
|
|
111
|
+
TransactionSignature.SIGHASH_FORKID;
|
|
112
|
+
const preimage = TransactionSignature.format({
|
|
113
|
+
sourceTXID,
|
|
114
|
+
sourceOutputIndex: input.sourceOutputIndex,
|
|
115
|
+
sourceSatoshis,
|
|
116
|
+
transactionVersion: tx.version,
|
|
117
|
+
otherInputs: tx.inputs
|
|
118
|
+
.filter((_, idx) => idx !== inputIndex)
|
|
119
|
+
.map((inp) => ({
|
|
120
|
+
sourceTXID: inp.sourceTXID ?? inp.sourceTransaction?.id('hex') ?? '',
|
|
121
|
+
sourceOutputIndex: inp.sourceOutputIndex,
|
|
122
|
+
sequence: inp.sequence ?? 0xffffffff,
|
|
123
|
+
})),
|
|
124
|
+
inputIndex,
|
|
125
|
+
outputs: tx.outputs,
|
|
126
|
+
inputSequence: input.sequence ?? 0xffffffff,
|
|
127
|
+
subscript: sourceLockingScript,
|
|
128
|
+
lockTime: tx.lockTime,
|
|
129
|
+
scope,
|
|
130
|
+
});
|
|
131
|
+
const sighash = Hash.sha256(Hash.sha256(preimage));
|
|
132
|
+
const { signature } = await ctx.wallet.createSignature({
|
|
133
|
+
protocolID: BRC29_PROTOCOL_ID,
|
|
134
|
+
keyID,
|
|
135
|
+
counterparty: 'self',
|
|
136
|
+
hashToDirectlySign: Array.from(sighash),
|
|
137
|
+
});
|
|
138
|
+
const { publicKey } = await ctx.wallet.getPublicKey({
|
|
139
|
+
protocolID: BRC29_PROTOCOL_ID,
|
|
140
|
+
keyID,
|
|
141
|
+
forSelf: true,
|
|
142
|
+
});
|
|
143
|
+
const sigWithHashtype = [...signature, scope];
|
|
144
|
+
return new UnlockingScript()
|
|
145
|
+
.writeBin(sigWithHashtype)
|
|
146
|
+
.writeBin(Utils.toArray(publicKey, 'hex'))
|
|
147
|
+
.toHex();
|
|
148
|
+
}
|
|
149
|
+
function getMneeClient(ctx) {
|
|
150
|
+
if (!ctx.services?.mnee) {
|
|
151
|
+
throw new Error('MNEE client not available — services required');
|
|
152
|
+
}
|
|
153
|
+
return ctx.services.mnee;
|
|
154
|
+
}
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// History parsing (ported from mnee@3.1.0 parseSyncToTxHistory)
|
|
157
|
+
// ============================================================================
|
|
158
|
+
function parseSyncToTxHistory(sync, address, config) {
|
|
159
|
+
const txType = sync.senders.includes(address)
|
|
160
|
+
? 'send'
|
|
161
|
+
: 'receive';
|
|
162
|
+
const txStatus = sync.height > 0 ? 'confirmed' : 'unconfirmed';
|
|
163
|
+
if (!sync.rawtx)
|
|
164
|
+
return null;
|
|
165
|
+
const txArray = Utils.toArray(sync.rawtx, 'base64');
|
|
166
|
+
const txHex = Utils.toHex(txArray);
|
|
167
|
+
const tx = Transaction.fromHex(txHex);
|
|
168
|
+
// Parse each output for cosign address and inscription amount
|
|
169
|
+
const outputData = tx.outputs.map((output) => {
|
|
170
|
+
const cosign = Cosign.decode(output.lockingScript);
|
|
171
|
+
const inscription = InscriptionTemplate.decode(output.lockingScript);
|
|
172
|
+
let amount = 0;
|
|
173
|
+
if (inscription?.file?.content) {
|
|
174
|
+
try {
|
|
175
|
+
const json = JSON.parse(Utils.toUTF8(Array.from(inscription.file.content)));
|
|
176
|
+
if (json.p === 'bsv-20' && json.id === config.tokenId && json.amt) {
|
|
177
|
+
amount = Number.parseInt(json.amt, 10);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
// not valid JSON inscription
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return { address: cosign?.address, amount };
|
|
185
|
+
});
|
|
186
|
+
const feeAddressIndex = outputData.findIndex((o) => o.address === config.feeAddress);
|
|
187
|
+
const sender = sync.senders[0];
|
|
188
|
+
let fee = 0;
|
|
189
|
+
const counterpartyAmounts = new Map();
|
|
190
|
+
for (let i = 0; i < outputData.length; i++) {
|
|
191
|
+
const { address: outAddr, amount } = outputData[i];
|
|
192
|
+
if (!outAddr || amount <= 0)
|
|
193
|
+
continue;
|
|
194
|
+
if (feeAddressIndex === i && sender === address) {
|
|
195
|
+
fee += amount;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
counterpartyAmounts.set(outAddr, (counterpartyAmounts.get(outAddr) ?? 0) + amount);
|
|
199
|
+
}
|
|
200
|
+
const amountSentToAddress = counterpartyAmounts.get(address) ?? 0;
|
|
201
|
+
if (txType === 'send') {
|
|
202
|
+
const senderAmt = counterpartyAmounts.get(sender) ?? 0;
|
|
203
|
+
counterpartyAmounts.set(sender, senderAmt - amountSentToAddress);
|
|
204
|
+
}
|
|
205
|
+
let counterparties;
|
|
206
|
+
if (txType === 'receive') {
|
|
207
|
+
counterparties = [{ address: sender, amount: amountSentToAddress }];
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
counterparties = Array.from(counterpartyAmounts.entries())
|
|
211
|
+
.map(([addr, amt]) => ({ address: addr, amount: amt }))
|
|
212
|
+
.filter((cp) => cp.address !== address &&
|
|
213
|
+
cp.address !== config.feeAddress &&
|
|
214
|
+
cp.amount > 0);
|
|
215
|
+
}
|
|
216
|
+
const totalCounterpartyAmount = counterparties.reduce((sum, cp) => sum + cp.amount, 0);
|
|
217
|
+
return {
|
|
218
|
+
txid: sync.txid,
|
|
219
|
+
height: sync.height,
|
|
220
|
+
type: txType,
|
|
221
|
+
status: txStatus,
|
|
222
|
+
amount: totalCounterpartyAmount,
|
|
223
|
+
fee,
|
|
224
|
+
score: sync.score,
|
|
225
|
+
counterparties,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
// ============================================================================
|
|
229
|
+
// Actions
|
|
230
|
+
// ============================================================================
|
|
231
|
+
/**
|
|
232
|
+
* Get MNEE balance across all yours wallet addresses.
|
|
233
|
+
*/
|
|
234
|
+
export const getMneeBalance = {
|
|
235
|
+
meta: {
|
|
236
|
+
name: 'getMneeBalance',
|
|
237
|
+
description: 'Get MNEE stablecoin balance across yours wallet addresses',
|
|
238
|
+
category: 'payments',
|
|
239
|
+
requiresServices: true,
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
addresses: {
|
|
244
|
+
type: 'array',
|
|
245
|
+
description: 'Specific addresses to query (omit to use yours wallet addresses)',
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
async execute(ctx, input) {
|
|
251
|
+
const mnee = getMneeClient(ctx);
|
|
252
|
+
const rawBalances = await mnee.getBalances(input.addresses);
|
|
253
|
+
const balances = rawBalances.map((b) => ({
|
|
254
|
+
address: b.address,
|
|
255
|
+
amount: b.amt,
|
|
256
|
+
decimalAmount: b.precised,
|
|
257
|
+
}));
|
|
258
|
+
const totalAtomic = balances.reduce((sum, b) => sum + b.amount, 0);
|
|
259
|
+
const totalDecimal = balances.reduce((sum, b) => sum + b.decimalAmount, 0);
|
|
260
|
+
return { balances, totalDecimal, totalAtomic };
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Get MNEE UTXOs across all yours wallet addresses.
|
|
265
|
+
*/
|
|
266
|
+
export const getMneeUtxos = {
|
|
267
|
+
meta: {
|
|
268
|
+
name: 'getMneeUtxos',
|
|
269
|
+
description: 'Get MNEE UTXOs across yours wallet addresses',
|
|
270
|
+
category: 'payments',
|
|
271
|
+
requiresServices: true,
|
|
272
|
+
inputSchema: {
|
|
273
|
+
type: 'object',
|
|
274
|
+
properties: {
|
|
275
|
+
addresses: {
|
|
276
|
+
type: 'array',
|
|
277
|
+
description: 'Specific addresses to query (omit to use yours wallet addresses)',
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
async execute(ctx, input) {
|
|
283
|
+
const mnee = getMneeClient(ctx);
|
|
284
|
+
const utxos = await mnee.getAllUtxos(input.addresses);
|
|
285
|
+
return { utxos };
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Get MNEE service configuration (cosigner, fees, etc).
|
|
290
|
+
*/
|
|
291
|
+
export const getMneeConfig = {
|
|
292
|
+
meta: {
|
|
293
|
+
name: 'getMneeConfig',
|
|
294
|
+
description: 'Get MNEE service configuration including cosigner and fee structure',
|
|
295
|
+
category: 'payments',
|
|
296
|
+
requiresServices: true,
|
|
297
|
+
inputSchema: {
|
|
298
|
+
type: 'object',
|
|
299
|
+
properties: {},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
async execute(ctx) {
|
|
303
|
+
const mnee = getMneeClient(ctx);
|
|
304
|
+
return mnee.getConfig();
|
|
305
|
+
},
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Get MNEE transaction history for an address.
|
|
309
|
+
*/
|
|
310
|
+
export const getMneeHistory = {
|
|
311
|
+
meta: {
|
|
312
|
+
name: 'getMneeHistory',
|
|
313
|
+
description: 'Get MNEE transaction history with parsed amounts and counterparties',
|
|
314
|
+
category: 'payments',
|
|
315
|
+
requiresServices: true,
|
|
316
|
+
inputSchema: {
|
|
317
|
+
type: 'object',
|
|
318
|
+
properties: {
|
|
319
|
+
address: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
description: 'Address to query (omit for all yours addresses)',
|
|
322
|
+
},
|
|
323
|
+
fromScore: {
|
|
324
|
+
type: 'number',
|
|
325
|
+
description: 'Pagination cursor',
|
|
326
|
+
},
|
|
327
|
+
limit: {
|
|
328
|
+
type: 'number',
|
|
329
|
+
description: 'Max results (default 50)',
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
async execute(ctx, input) {
|
|
335
|
+
const mnee = getMneeClient(ctx);
|
|
336
|
+
const queryAddress = input.addresses[0];
|
|
337
|
+
const config = await mnee.getConfig();
|
|
338
|
+
const syncEntries = await mnee.getTxHistory(input.addresses, input.fromScore, input.limit);
|
|
339
|
+
const history = [];
|
|
340
|
+
for (const entry of syncEntries) {
|
|
341
|
+
const parsed = parseSyncToTxHistory(entry, queryAddress, config);
|
|
342
|
+
if (parsed)
|
|
343
|
+
history.push(parsed);
|
|
344
|
+
}
|
|
345
|
+
const nextScore = syncEntries.length > 0
|
|
346
|
+
? syncEntries[syncEntries.length - 1].score
|
|
347
|
+
: undefined;
|
|
348
|
+
return { history, nextScore };
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Get the status of an MNEE transfer by ticket ID.
|
|
353
|
+
*/
|
|
354
|
+
export const getMneeTxStatus = {
|
|
355
|
+
meta: {
|
|
356
|
+
name: 'getMneeTxStatus',
|
|
357
|
+
description: 'Get the status of an MNEE transfer',
|
|
358
|
+
category: 'payments',
|
|
359
|
+
requiresServices: true,
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: 'object',
|
|
362
|
+
properties: {
|
|
363
|
+
ticketId: {
|
|
364
|
+
type: 'string',
|
|
365
|
+
description: 'Ticket ID from a transfer response',
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
required: ['ticketId'],
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
async execute(ctx, input) {
|
|
372
|
+
const mnee = getMneeClient(ctx);
|
|
373
|
+
return mnee.getTxStatus(input.ticketId);
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Send MNEE stablecoin. Builds the transaction, signs with BRC-29 keys,
|
|
378
|
+
* and submits to MNEE API for cosigner signature + broadcast.
|
|
379
|
+
*/
|
|
380
|
+
export const sendMnee = {
|
|
381
|
+
meta: {
|
|
382
|
+
name: 'sendMnee',
|
|
383
|
+
description: 'Send MNEE stablecoin to one or more recipients',
|
|
384
|
+
category: 'payments',
|
|
385
|
+
requiresServices: true,
|
|
386
|
+
inputSchema: {
|
|
387
|
+
type: 'object',
|
|
388
|
+
properties: {
|
|
389
|
+
recipients: {
|
|
390
|
+
type: 'array',
|
|
391
|
+
description: 'Recipients with address and amount in MNEE',
|
|
392
|
+
},
|
|
393
|
+
changeAddress: {
|
|
394
|
+
type: 'string',
|
|
395
|
+
description: 'Change address (defaults to first input address)',
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
required: ['recipients', 'derivations'],
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
async execute(ctx, input) {
|
|
402
|
+
try {
|
|
403
|
+
const mnee = getMneeClient(ctx);
|
|
404
|
+
const { recipients, derivations, changeAddress } = input;
|
|
405
|
+
if (!recipients.length)
|
|
406
|
+
return { error: 'no-recipients' };
|
|
407
|
+
if (!derivations.length)
|
|
408
|
+
return { error: 'no-derivations' };
|
|
409
|
+
// 1. Build address→keyID map from caller-provided derivations
|
|
410
|
+
const addresses = derivations.map((d) => d.address);
|
|
411
|
+
const addressKeyMap = buildAddressKeyMap(derivations);
|
|
412
|
+
// 2. Get MNEE config
|
|
413
|
+
const config = await mnee.getConfig();
|
|
414
|
+
if (!config?.approver)
|
|
415
|
+
return { error: 'failed-to-get-mnee-config' };
|
|
416
|
+
// 3. Calculate total amount needed
|
|
417
|
+
const totalAmount = recipients.reduce((sum, r) => sum + r.amount, 0);
|
|
418
|
+
if (totalAmount <= 0)
|
|
419
|
+
return { error: 'invalid-amount' };
|
|
420
|
+
const totalAtomic = MneeClientStatic.toAtomicAmount(totalAmount);
|
|
421
|
+
// 4. Calculate fee
|
|
422
|
+
const fee = recipients.some((r) => r.address === config.burnAddress)
|
|
423
|
+
? 0
|
|
424
|
+
: config.fees.find((f) => totalAtomic >= f.min && totalAtomic <= f.max)?.fee;
|
|
425
|
+
if (fee === undefined)
|
|
426
|
+
return { error: 'fee-ranges-inadequate' };
|
|
427
|
+
// 5. Get enough UTXOs across all addresses
|
|
428
|
+
const allUtxos = await mnee.getAllUtxos(addresses);
|
|
429
|
+
let tokensNeeded = totalAtomic + fee;
|
|
430
|
+
const selectedUtxos = [];
|
|
431
|
+
let tokensIn = 0;
|
|
432
|
+
for (const utxo of allUtxos) {
|
|
433
|
+
if (tokensIn >= tokensNeeded)
|
|
434
|
+
break;
|
|
435
|
+
const amt = utxo.data.bsv21?.amt ?? 0;
|
|
436
|
+
if (amt <= 0)
|
|
437
|
+
continue;
|
|
438
|
+
selectedUtxos.push(utxo);
|
|
439
|
+
tokensIn += amt;
|
|
440
|
+
}
|
|
441
|
+
if (tokensIn < tokensNeeded) {
|
|
442
|
+
return {
|
|
443
|
+
error: `Insufficient MNEE. Have: ${MneeClientStatic.fromAtomicAmount(tokensIn)}, Need: ${MneeClientStatic.fromAtomicAmount(tokensNeeded)}`,
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
// 6. Fetch source transactions and build the tx
|
|
447
|
+
const tx = new Transaction(1, [], [], 0);
|
|
448
|
+
for (const utxo of selectedUtxos) {
|
|
449
|
+
// Fetch source transaction from MNEE API or 1Sat services
|
|
450
|
+
let sourceTx;
|
|
451
|
+
try {
|
|
452
|
+
const beef = await ctx.services.getBeefForTxid(utxo.txid);
|
|
453
|
+
const beefTx = beef.findTxid(utxo.txid);
|
|
454
|
+
if (beefTx?.tx)
|
|
455
|
+
sourceTx = beefTx.tx;
|
|
456
|
+
}
|
|
457
|
+
catch {
|
|
458
|
+
// Fallback: try raw tx fetch
|
|
459
|
+
}
|
|
460
|
+
if (!sourceTx) {
|
|
461
|
+
return { error: `failed-to-fetch-source-tx: ${utxo.txid}` };
|
|
462
|
+
}
|
|
463
|
+
tx.addInput({
|
|
464
|
+
sourceTXID: utxo.txid,
|
|
465
|
+
sourceOutputIndex: utxo.vout,
|
|
466
|
+
sourceTransaction: sourceTx,
|
|
467
|
+
unlockingScript: new UnlockingScript(),
|
|
468
|
+
sequence: 0xffffffff,
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
// 7. Add recipient outputs
|
|
472
|
+
for (const r of recipients) {
|
|
473
|
+
const out = createInscriptionOutput(r.address, MneeClientStatic.toAtomicAmount(r.amount), config);
|
|
474
|
+
tx.addOutput(out);
|
|
475
|
+
}
|
|
476
|
+
// 8. Add fee output
|
|
477
|
+
if (fee > 0) {
|
|
478
|
+
tx.addOutput(createInscriptionOutput(config.feeAddress, fee, config));
|
|
479
|
+
}
|
|
480
|
+
// 9. Add change output
|
|
481
|
+
const change = tokensIn - totalAtomic - fee;
|
|
482
|
+
if (change > 0) {
|
|
483
|
+
const changeAddr = changeAddress ??
|
|
484
|
+
extractAddressFromCosignScript(selectedUtxos[0]
|
|
485
|
+
? Script.fromHex(selectedUtxos[0].script)
|
|
486
|
+
: tx.inputs[0].sourceTransaction.outputs[tx.inputs[0].sourceOutputIndex].lockingScript) ??
|
|
487
|
+
addresses[0];
|
|
488
|
+
tx.addOutput(createInscriptionOutput(changeAddr, change, config));
|
|
489
|
+
}
|
|
490
|
+
// 10. Sign each input with the matching BRC-29 key
|
|
491
|
+
for (let i = 0; i < tx.inputs.length; i++) {
|
|
492
|
+
const utxo = selectedUtxos[i];
|
|
493
|
+
const ownerAddress = utxo.owners?.[0];
|
|
494
|
+
const keyID = addressKeyMap.get(ownerAddress);
|
|
495
|
+
if (!keyID) {
|
|
496
|
+
return {
|
|
497
|
+
error: `No key found for address ${ownerAddress} — not a yours wallet address`,
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
const unlockingHex = await signCosignInput(ctx, tx, i, keyID);
|
|
501
|
+
tx.inputs[i].unlockingScript =
|
|
502
|
+
UnlockingScript.fromHex(unlockingHex);
|
|
503
|
+
}
|
|
504
|
+
// 11. Submit to MNEE for cosigner signature + broadcast
|
|
505
|
+
const rawTx = tx.toHex();
|
|
506
|
+
const submitResult = await mnee.submitRawTx(rawTx, { broadcast: true });
|
|
507
|
+
if (!submitResult.ticketId) {
|
|
508
|
+
return { error: 'no-ticket-id-returned' };
|
|
509
|
+
}
|
|
510
|
+
// 12. Poll for txid until MNEE confirms the transaction
|
|
511
|
+
const ticketId = submitResult.ticketId;
|
|
512
|
+
const maxAttempts = 30;
|
|
513
|
+
const pollIntervalMs = 2000;
|
|
514
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
515
|
+
await new Promise((r) => setTimeout(r, pollIntervalMs));
|
|
516
|
+
try {
|
|
517
|
+
const status = await mnee.getTxStatus(ticketId);
|
|
518
|
+
if (status.status === 'FAILED') {
|
|
519
|
+
return {
|
|
520
|
+
ticketId,
|
|
521
|
+
error: status.errors ?? 'transaction-failed',
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
if (status.status === 'SUCCESS' ||
|
|
525
|
+
status.status === 'MINED') {
|
|
526
|
+
return { txid: status.tx_id, ticketId };
|
|
527
|
+
}
|
|
528
|
+
// BROADCASTING — keep polling
|
|
529
|
+
}
|
|
530
|
+
catch {
|
|
531
|
+
// Ignore transient poll errors, keep trying
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
// Timed out waiting — return ticketId so caller can check later
|
|
535
|
+
return { ticketId, error: 'timeout-waiting-for-txid' };
|
|
536
|
+
}
|
|
537
|
+
catch (error) {
|
|
538
|
+
console.error('[sendMnee]', error);
|
|
539
|
+
return {
|
|
540
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
};
|
|
545
|
+
// Static helpers re-exported for convenience
|
|
546
|
+
const MneeClientStatic = {
|
|
547
|
+
toAtomicAmount(mneeAmount) {
|
|
548
|
+
return Math.round(mneeAmount * 100_000);
|
|
549
|
+
},
|
|
550
|
+
fromAtomicAmount(atomicAmount) {
|
|
551
|
+
return atomicAmount / 100_000;
|
|
552
|
+
},
|
|
553
|
+
};
|
|
554
|
+
// ============================================================================
|
|
555
|
+
// Module exports
|
|
556
|
+
// ============================================================================
|
|
557
|
+
export const mneeActions = [
|
|
558
|
+
getMneeBalance,
|
|
559
|
+
getMneeUtxos,
|
|
560
|
+
getMneeConfig,
|
|
561
|
+
getMneeHistory,
|
|
562
|
+
getMneeTxStatus,
|
|
563
|
+
sendMnee,
|
|
564
|
+
];
|
|
565
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mnee/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,OAAO,EAAE,MAAM,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAA;AACvE,OAAO,EACN,IAAI,EACJ,aAAa,EACb,EAAE,EACF,SAAS,EACT,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,KAAK,GACL,MAAM,UAAU,CAAA;AAOjB,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,wDAAwD;AACxD,SAAS,kBAAkB,CAC1B,WAAgC;IAEhC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAA;IACrC,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAA;QAC3D,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAC1B,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC;AAED,+EAA+E;AAC/E,0CAA0C;AAC1C,+EAA+E;AAE/E,SAAS,UAAU,CAClB,WAAmB,EACnB,cAAyB;IAEzB,MAAM,IAAI,GAAG,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC,CAAA;IAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAgB,CAAA;IACpC,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAA;IAClC,MAAM;SACJ,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC;SACtB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC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AAO,CAAC,CAAC,CAAC,eAAe;aAC/D,CAAA;QACF,CAAC;IACF,CAAC;CACD,CAAA;AAED,6CAA6C;AAC7C,MAAM,gBAAgB,GAAG;IACxB,cAAc,CAAC,UAAkB;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,gBAAgB,CAAC,YAAoB;QACpC,OAAO,YAAY,GAAG,OAAO,CAAA;IAC9B,CAAC;CACD,CAAA;AAED,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,cAAc;IACd,YAAY;IACZ,aAAa;IACb,cAAc;IACd,eAAe;IACf,QAAQ;CACR,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/actions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"description": "Action definitions for the 1Sat SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"keywords": ["1sat", "bsv", "actions", "wallet", "ordinals"],
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@1sat/client": "0.0.
|
|
24
|
+
"@1sat/client": "0.0.19",
|
|
25
25
|
"@1sat/types": "0.0.14",
|
|
26
26
|
"@1sat/utils": "0.0.12",
|
|
27
|
-
"@1sat/wallet": "0.0.
|
|
28
|
-
"@1sat/templates": "0.0.
|
|
27
|
+
"@1sat/wallet": "0.0.38",
|
|
28
|
+
"@1sat/templates": "0.0.5"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@bsv/sdk": "^2.0.6"
|