Skip to content

Latest commit

 

History

History
484 lines (343 loc) · 16.6 KB

CHANGELOG.md

File metadata and controls

484 lines (343 loc) · 16.6 KB

CHANGELOG for @bsv/sdk

All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Table of Contents

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security


[1.2.21] - 2025-01-03

Added

  • Implemented a Mutual Authentication and Service Monetization Framework

[1.2.19] - 2024-12-19

Added

  • new method on the interface for ChainTrackers which returns the current height of the blockchain.
  • Implemented a Coinbase specific MerklePath .verify conditional block which ensures the input is spendable if it's a coinbase output.

[1.2.18] - 2024-12-19

Added

  • Enumerated constants for the tx data type in beef encoded transaction lists.

Removed

  • Removed the idea of "V1" and "V2" beef. There is already a version number which is encoded in the bytes, I think it's clearer if we stick to one.
  • Removed the V1 capability to use txidOnly.

Fixed

  • There was a slice of the BeefTxs array in Beef which should be a splice (remove a tx)

Changed

  • Refactored a bunch of functions on advice from Sonar Qube which suggested they were a little to dense for most people to follow.
  • Refactored for loops into for-of loops where possible.
  • Refactored loops where the loop counter is updated within the loop which is advised against.

[1.2.17] - 2024-12-18

Added

Beef addComputedLeaves MerklePath.fromReader and MerklePath constructor legalOffsetsOnly optional argument

Fixed

Beef toBinaryAtomic now prunes transactions newer than target txid. Beef mergeBeefTx error if both isTxidOnly Bug #162


[1.2.15] - 2024-12-16

Added

  • A helper function for most commonly used output type. tx.addP2PKHOutput(address, satoshis)
  • Make sure to check the provided hash is 20 bytes.

[1.2.14] - 2024-12-14

Added

  • fromCoinbaseTxidAndHeight method to the MerklePath class for that special case
  • added test demonstrating how to validate scripts only for one tx even when you don't have a merkle path for the previous tx.
    // merklePath just has to be set to any object.
    sourceTransaction.merklePath = { assumeValid: true }
    tx.inputs[0].sourceTransaction = sourceTransaction
    await tx.verify('scripts only')

[1.2.13] - 2024-12-13

Added

  • JSON HTTP substrate, with corresponding swagger-ui documentation.
  • Example args and responses to the swagger-ui

Added

  • PrivateKey test linter errors

[1.2.12] - 2024-12-12

Added

  • Added optional broadcastMany to Broadcaster interface.

[1.2.11] - 2024-12-10

Added

  • Added a fix to ensure PrivateKeys as hex are always 64 chars in length ensuring 256 bit keys.

[1.2.10] - 2024-12-10

Added

Beef makeTxidOnly

Fixed

Beef sortTx fix for partially valid and txidOnly data.

Security


[1.2.9] - 2024-12-06

Added

  • Added support for returning coinsRemoved in an overlay Submitted Transaction Execution AcKnowledgment (STEAK) message.

[1.2.8] - 2024-12-02

Added

  • Stop people inadvertently creating corrupted public keys.

[1.2.7] - 2024-12-02

Added

  • Define the security level of protocolIDs as a type so that we can attach a JSDoc explaining what each value means.

Added

  • Use a default value in the async fee() function when no args are used rather than requiring a value and then setting if undefined.

[1.2.6] - 2024-11-30

Added

  • revealSpecificKeyLinkage requires a counterparty.
  • ProtoWallet now correctly implements the wallet interface.

[1.2.5] - 2024-11-30

Added

  • Testnet capabilities & config override for node to function without error to defaultBroadcaster
  • broadcastMany function to ARCBroadcaster

[1.2.4] - 2024-11-29

Added

  • A "random" distributioun mode for change allocation which approximates Benford's Law in attempt to distribute the remainder of: (inputSats - knownOutputSats - txFee) across the outputs marked "change: true".

[1.2.3] - 2024-11-26

Added

  • Added support for Overlay broadcast and lookup timeouts.

[1.2.2] - 2024-11-26

Added

  • Updated the default ShipBroadcast config, tests, and docs.

[1.2.1] - 2024-11-25

Added


[1.2.0] - 2024-11-25

Added

  • Implement BRC-100 wallet interface
  • Add PushDrop token template
  • SHIP and SLAP overlay tooling including broadcaster and lookup

[1.1.33] - 2024-11-22

Added

Beef.toBinaryAtomic(txid: string) to serialize Beef with AtomicBEEF header.

Fixed

Transaction.fromAtomicBEEF

  1. Test for all required dependencies was ignoring BUMP hashes.
  2. Test for unused transactions required additional fix.

[1.1.32] - 2024-11-22

Added

  1. allowPartial optional argument to Transaction toBEEF and toAtomicBEEF to avoid errors on missing sourceTransactions.
  2. findBump, findTransactionForSigning, findAtomicTransaction to Beef class.
  3. mergeBeefFromParty to BeefParty
  4. isValid to BeefTx, used by new sortTx.
  5. Add serialized AtomicBEEF deserialization to Beef class.
  6. Add atomicTxid property to Beef class.

Fixed

  1. sortTxs of Beef class fixed to handle incompletely valid data, order now matches spec for isValid true BEEF.

Removed

  1. degree property from BeefTx class, was used only by original sortTxs algorithm.

[1.1.30] - 2024-11-02

Added

  • Feature - Schorr class which allows ZKP creation and verification. BRC-94 and BRC-100 related.

Changed

  • electrumEncrypt correctly allows fromPrivateKey to be omitted

[1.1.29] - 2024-10-23

Fixed

  • ECIES ElectrumDecrypt counterparty decryption bug

[1.1.28] - 2024-10-23

Added

  • UMD support added for use in non-standard environments.

[1.1.26] - 2024-10-22

Added

  • Atomic BEEF serializer and deserializer for Transaction class
  • Ability to select a TXID from a BEEF when construction a Transaction.fromBEEF()

[1.1.25] - 2024-10-21

Added

  • Beef, BeefTx, and BeefParty classes

[1.1.24] - 2024-10-04

Fixed

  • Addressed #125
  • Optimized SPV verification

[1.1.22] - 2024-09-02

Added

  • Base64 mode support for BSM

[1.1.21] - 2024-09-02

Added

  • Broadcaster types have been updated to better align with Arc
  • Added some convenience functions for toDER and fromDER on the point and pubkey classes where missing.

Changed

  • In the PublicKey class pubkey.toDER() to defaults to return a number[] rather than string. If a string is desired .toString() or .toDER('hex') have equivalent functionality.

[1.1.17] - 2024-08-21

Added

Transaction static fromReader method is now public.

[1.1.14] - 2024-07-30

Added

Ability to split a private key into shares using Shamir's Secret Sharing Scheme. Use like this:

const key = PrivateKey.fromRandom()
const recovery = key.split(2, 5)
const sameKey = PrivateKey.fromShares(recovery.shares, recovery.threshold)

[1.1.13] - 2024-07-19

Fixed

Transaction SPV verification now correctly returns true for "scripts only" verification when a merkle proof is found.

[1.1.10] - 2024-06-28

Fixed

ARC Broadcaster correctly parses status -> code, details -> description. Adds optional txid and more to error response if provided.

[1.1.8] - 2024-06-19

Added

TOTP class which allows the generation of time based pass codes. Use varies but originally included for validating shared secrets between remote counterparties over a secure channel.

[1.1.6] - 2024-06-12

Added

  • Allow Fees in historic transaction to be validated against a FeeModel.

[1.1.5] - 2024-06-11

Fixed

  • Unnecessary Buffer.from in pbkdf2 function has been removed.

[1.1.4] - 2024-05-10

Added

  • MerklePath trim function which removes data if it can be calculated. Backported from go-sdk by tonesnotes. Only affects compound Merkle paths which are not yet widely used.

Changed

  • The corresponding error messages associated with invalid MerklePaths which no longer check empty levels if they are above level 0.

[1.1.0] - 2024-05-06

Added

  • Ability to create TransactionInputs from a utxo, creating a partial sourceTransaction. Use is like so:
const input = fromUtxo({
    txid: '434555433eaca96dff6e71a4d02febd0dd3832e5ca4e5734623ca914522e17d5',
    vout: 0,
    script: '76a914d01b0b702ee90e00944342f97c772a8be83e42a288ac',
    satoshis: 1234
}, new P2PKH().unlock(key))

tx.addInput(input)
  • Ability to create a transaction from Extended Format bytes or hex. The result being a partial sourceTransaction in each input.
const tx = Transaction.fromHexEF('020000000000000000ef01b2faffe1e1d3c88f4092f34646c060ea2b6a93acc3010484c747ed4c051c2555080000006a4730440220392bcec91f190ce38db9bf53d03886ab63d9bd24fcf7174e8a8df21d23382ba7022038f20c1f3f6583951d01af0be30612a6c0b46d949b4aae60f42644ce513f3e55412103ea0ff49ec6fbb9cbc942d9c1fce9c04e12a91c1209b239466e0a29147da55db1ffffffff01f45500000000001976a914de337957f543c8d1fad2cfff0b57bb5b4264d91788ac0390010000000000001976a9144d255baa50a14bef4cce1eb8012a02768e8ffaa888acd3600000000000001976a91447e22d8011bb446cc3f606179e333f64a9b6206b88ac04915500000000001976a914d24cb016397008a85c88b1278a36434fdd4e801f88ac00000000')

Removed

  • Use of sourceSatoshis as a parameter of TransactionInput type.

Fixed

  • Increase default maxNumSize to MAX_SAFE_INJTEGER to resolve OP_BIN2NUM execution failures. by @tonesnotes in #20
  • Docs examples by @ty-everett in #21
  • Allow BigNumber constructor to accept a BigNumber. by @tonesnotes in #22
  • Hash enc digest hex by @tonesnotes in #27
  • [feature] helper function to allow Address => Locking Script by @sirdeggen in #24
  • [chore] npm run doc by @sirdeggen in #26
  • CRITICAL FIX for BigNumber fromSm by @tonesnotes in #30
  • [feature]: Block Header Service api by @sirdeggen in #23
  • Tone bug 31 by @tonesnotes in #33
  • Low Level Docs by @ty-everett in #32
  • push(...x) fails for large array x values by @tonesnotes in #36
  • [fix] length must be that of the data, not the original argument. by @sirdeggen in #37
  • [chore] ts-standard and linter stuff by @sirdeggen in #38
  • [feature] compact sigs by @sirdeggen in #39
  • controversial stuff by @sirdeggen in #40
  • Avoid requiring sourceTransaction on inputs. by @tonesnotes in #41
  • [fix] Enforce signature length in compact sigs by @sirdeggen in #44
  • Concept-level documentation by @ty-everett in #45
  • refactor: add more static factory methods to HD class and use them in examples by @dorzepowski in #48
  • refactor: replace returned type union with method overloading for transaction id. by @dorzepowski in #50
  • [docs] HOW_TX.md review and edits. Note: A topic worth discussing is c… by @jonesjBSV in #53
  • [chore] remove redundant line by @sirdeggen in #56
  • I suspect it should be this - see ts-paymail for more suggestions by @sirdeggen in #60
  • [fix] adding startsWith OP_ seems to fix the ASM parsing bug by @sirdeggen in #58
  • Add Transaction.parseScriptOffsets by @tonesnotes in #59
  • [fix] Compact SIgnatures Pubkey Recovery function precision. by @sirdeggen in #63
  • feat(#65): configure ARC with custom http client by @dorzepowski in #66
  • feat: default broadcaster and chain tracker by @dorzepowski in #67
  • Fixed fee model by @tiagolr in #70
  • toAddress() string prefix support by @tiagolr in #72
  • Addional input field sourceSatoshis to be used in fee calculation by @tiagolr in #71
  • Tone key length by @tonesnotes in #79
  • Improve JSON content type detection by @oskarszoon in #80
  • example-utxos-tx.md by @tiagolr in #75
  • Allow ARC config to set CallbackURL and other headers as required by @sirdeggen in #81
  • Tone overlay1 by @tonesnotes in #82

New Contributors

  • @tonesnotes made their first contribution in #20
  • @dorzepowski made their first contribution in #48
  • @jonesjBSV made their first contribution in #53
  • @tiagolr made their first contribution in #70
  • @oskarszoon made their first contribution in #80

[1.0.0] - 2024-02-10

Added

  • Initial release of the BSV Blockchain Libraries Project SDK.
  • Sound Cryptographic Primitives for key management, signature computations, and encryption protocols.
  • Script Level Constructs with network-compliant script interpreter.
  • Comprehensive Transaction Construction and Signing API.
  • Mechanisms for Transaction Broadcast Management.
  • Tools for Merkle Proof Verification and representation.
  • Structures and interfaces for full Serializable SPV Structures.
  • Enhanced mechanisms for Secure Encryption and Signed Messages.

Template for New Releases:

Replace X.X.X with the new version number and YYYY-MM-DD with the release date:

## [X.X.X] - YYYY-MM-DD

### Added
- 

### Changed
- 

### Deprecated
- 

### Removed
- 

### Fixed
- 

### Security
- 

Use this template as the starting point for each new version. Always update the "Unreleased" section with changes as they're implemented, and then move them under the new version header when that version is released.