Fix change output and default locking script function

This commit is contained in:
2026-05-04 10:00:49 +00:00
parent 7ffb5c44b5
commit 2f2e515d72

View File

@@ -19,6 +19,7 @@ import { EventEmitter } from "../utils/event-emitter.js";
import { createHash } from "crypto"; import { createHash } from "crypto";
import { p2pkhTemplate } from "@xo-cash/templates"; import { p2pkhTemplate } from "@xo-cash/templates";
import { hexToBin } from "@bitauth/libauth"; import { hexToBin } from "@bitauth/libauth";
import { parseTemplate } from "@xo-cash/engine";
export type AppEventMap = { export type AppEventMap = {
"invitation-added": Invitation; "invitation-added": Invitation;
@@ -95,7 +96,7 @@ export class AppService extends EventEmitter<AppEventMap> {
// To my knowledge, this doesnt generate any lockscript, so discovery of funds will not work automatically. // To my knowledge, this doesnt generate any lockscript, so discovery of funds will not work automatically.
// TODO: Add discovery for funds in the first index? Or until we return 0 TXs? // TODO: Add discovery for funds in the first index? Or until we return 0 TXs?
await engine.setDefaultLockingParameters( await engine.setDefaultLockingParameters(
generateTemplateIdentifier(p2pkhTemplate), generateTemplateIdentifier(parseTemplate(p2pkhTemplate)),
"receiveOutput", "receiveOutput",
"receiver", "receiver",
); );