From 68fd614f8cb404904e1939ab711f7c7ba4350c32 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 5 Aug 2026 12:24:03 -0700 Subject: hal speaks pver 5: preimages prove their size, and fees round up as one 0.6.0 servers require the new hashlock clauses (OP_SIZE 32 guard) for Lightning and rounds. New policies/transitions carry the v1 scripts and type bytes; _v0 variants keep old vtxos reconstructing and exiting. The retired third-party HTLC policy is dropped (upstream took 0x08). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01M5kFodm9azZJVTQxnkDdKe --- src/ark/board.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ark/board.js') diff --git a/src/ark/board.js b/src/ark/board.js index f71c0b3..7544353 100644 --- a/src/ark/board.js +++ b/src/ark/board.js @@ -23,8 +23,9 @@ const u64le = (n) => { // Fee fields are absent when zero (proto3) — e.g. Second's signet server // boards for free — so every term defaults to 0. +// pver >= 4 rounds the ppm component UP to the satoshi (server-side calculate()). export const boardFee = (amountSat, fees = {}) => - Math.max(fees.minFeeSat || 0, (fees.baseFeeSat || 0) + Math.floor((amountSat * (fees.ppm || 0)) / 1_000_000)); + Math.max(fees.minFeeSat || 0, (fees.baseFeeSat || 0) + Math.ceil((amountSat * (fees.ppm || 0)) / 1_000_000)); export const p2trAddress = (programXOnly, hrp = 'bcrt') => bech32m.encode(hrp, [1, ...bech32m.toWords(programXOnly)], 1023); -- cgit v1.2.3