From 17aaaad3893db5e9c9b7c82fb9072fe749ce35f6 Mon Sep 17 00:00:00 2001 From: sirdeggen Date: Sun, 29 Dec 2024 15:07:15 -0600 Subject: [PATCH 1/2] =?UTF-8?q?You=E2=80=99re=20allowed=20to=20have=20zero?= =?UTF-8?q?=20value=20op=20return=20outputs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sirdeggen --- src/transaction/Transaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction/Transaction.ts b/src/transaction/Transaction.ts index 7987cf6..25935bc 100644 --- a/src/transaction/Transaction.ts +++ b/src/transaction/Transaction.ts @@ -439,7 +439,7 @@ export default class Transaction { this.cachedHash = undefined if (!output.change) { if (typeof output.satoshis === 'undefined') throw new Error('either satoshis must be defined or change must be set to true') - if (output.satoshis <= 0) throw new Error('satoshis must be a positive integer or zero') + if (output.satoshis < 0) throw new Error('satoshis must be a positive integer or zero') } if (!output.lockingScript) throw new Error('lockingScript must be defined') this.outputs.push(output) From bd8e49d4d9c40252c5030c3bfa40fabc16d5e3d9 Mon Sep 17 00:00:00 2001 From: sirdeggen Date: Sun, 29 Dec 2024 15:10:05 -0600 Subject: [PATCH 2/2] 1.2.20 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4601cc..09bd90d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bsv/sdk", - "version": "1.2.19", + "version": "1.2.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@bsv/sdk", - "version": "1.2.19", + "version": "1.2.20", "license": "SEE LICENSE IN LICENSE.txt", "devDependencies": { "@types/jest": "^29.5.14", diff --git a/package.json b/package.json index 37cee72..31766af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bsv/sdk", - "version": "1.2.19", + "version": "1.2.20", "type": "module", "description": "BSV Blockchain Software Development Kit", "main": "dist/cjs/mod.js",