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", 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)