@johnhenry/browsermesh-core 0.0.0 → 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/package.json +1 -1
- package/src/peer-tools.mjs +3 -3
package/package.json
CHANGED
package/src/peer-tools.mjs
CHANGED
|
@@ -407,7 +407,7 @@ export class EscrowCreateTool extends BrowserTool {
|
|
|
407
407
|
const mgr = peerToolsContext.getEscrowManager()
|
|
408
408
|
if (!mgr) return { success: false, output: '', error: 'Escrow manager not initialized.' }
|
|
409
409
|
try {
|
|
410
|
-
const contract = mgr.
|
|
410
|
+
const contract = mgr.create({ payerPodId: payer, payeePodId: payee, amount, description, conditions })
|
|
411
411
|
return { success: true, output: `Escrow created: ${contract.id} (${amount} from ${payer} to ${payee})` }
|
|
412
412
|
} catch (err) {
|
|
413
413
|
return { success: false, output: '', error: err.message }
|
|
@@ -460,7 +460,7 @@ export class EscrowReleaseTool extends BrowserTool {
|
|
|
460
460
|
const mgr = peerToolsContext.getEscrowManager()
|
|
461
461
|
if (!mgr) return { success: false, output: '', error: 'Escrow manager not initialized.' }
|
|
462
462
|
try {
|
|
463
|
-
mgr.
|
|
463
|
+
mgr.release(contractId)
|
|
464
464
|
return { success: true, output: `Escrow ${contractId} released.` }
|
|
465
465
|
} catch (err) {
|
|
466
466
|
return { success: false, output: '', error: err.message }
|
|
@@ -743,7 +743,7 @@ export class TorrentSeedTool extends BrowserTool {
|
|
|
743
743
|
const tm = peerToolsContext.getTorrentManager()
|
|
744
744
|
if (!tm) return { success: false, output: '', error: 'Torrent manager not initialized.' }
|
|
745
745
|
try {
|
|
746
|
-
const result = await tm.seed(
|
|
746
|
+
const result = await tm.seed(data, { name })
|
|
747
747
|
return { success: true, output: `Seeding: ${result?.infoHash || name}` }
|
|
748
748
|
} catch (err) {
|
|
749
749
|
return { success: false, output: '', error: err.message }
|