# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.0.1] 2023-02-09

### Changed
- Use backend API v3 by default

## [6.0.0] 2023-02-05

### Changed

- The listTransactions method now accepts limit and offset directly, instead of requiring a paginationOptions object

## [5.2.5] 2023-12-19

### Fixed

- Websocket connection in experimentalStreamProject will now automatically reconnect and keep the last-event-id in mind

## [5.2.4] 2023-12-19

### Fixed

- Websocket connection in experimentalStreamProject will now automatically reconnect and keep the last-event-id in mind

## [5.2.3] 2023-10-19

### Fixed

- Import issues with p-queue

## [5.2.2] 2023-10-13

### Fixed

- Import issues with p-queue

## [5.2.1] 2023-10-03

### Fixed

- Import issues with p-queue

## [5.2.0] 2023-09-29

### Added

- ASM and base64 encoding support for script values

## [5.1.0] 2023-09-28

## Added

- queryTransactions() is a new function that enables detailed querying for transactions, including querying based on earlier provided metadata

## [5.0.1] 2023-09-18

## Added

- Reintroduced login() function, to instantiate SDK with email and password

## [5.0.0] 2023-09-14

## Breaking change

getTransaction() now returns a TransactionWithRawTx instead of parsed outputs. To include the parsed outputs set { parse: true } in the function arguments.
The parsed outputs will then be returned in the 'outputs' field of the result.

## [4.4.6] 2023-09-11

## Added

- React hook is now importable from '@mintblue/sdk/react'

## [4.4.4] 2023-09-08

## Removed

- React hook: useMintblue() is no longer exported by default.

## [4.4.0] 2023-08-31

## Added

- React hook: useMintblue()

## [4.3.0] 2023-08-31

### Added

- Feature: State Machines (beta)
  - See example: [https://gitlab.com/mintBlue/sdk/-/tree/master/examples/machine](https://gitlab.com/mintBlue/sdk/-/tree/master/examples/machine?ref_type=heads)
- New SDK functions:
  - createEventListener
  - getEventListener
  - listEventListeners

### Improved

- Types
- Typedoc documentation (see [https://mintblue.gitlab.io/sdk/](https://mintblue.gitlab.io/sdk/)

### Removed

- Mintblue::login() was removed

## [4.2.1] 2023-08-25

- Reimplemented experimentalStreamProject() to use WebSocket intead of Server-Sent Events

## [4.2.0] 2023-08-24

### Added

- New experimental feature: experimentalStreamProject()

## [4.0.1] 2023-08-15

### Fixed

- Fixed a bug that caused the rawtx option of the createTransaction to not be forwarded

## [4.0.0] 2023-08-09

### Changed

Functions which have more than one argument have been reworked to only use 1 argument in the form of an object with named parameters.
Functions that already had single arguments in the form of an object are not affected. (createTransaction)

For example:

In 3.x getTransaction( txid, secret )

in 4.x getTransaction( { txid, secret } )

## [3.0.3] - 2022-05-18

### Fixed

- Improvements to Hash Output type

### Depcrecated

- version 3.0.2 has been deprecated

## [3.0.2] - 2022-05-17

No changes

## [3.0.1] - 2022-05-17

### Deprecated

- Version 3.0.0 has been deprecated in npm

### Fixed

- HashOutput protocol id is now mB:hash1

## [3.0.0] - 2022-05-17

### Changed

- DocV1Output now has type: 'doc'
- HashOutput now has type: 'hash'

## [2.0.0] - 2022-05-11

### Added

- Hash Envelope: Convenient wrapper to save file hashes on chain without saving the entire file

### Changed

- Uses mintBlue API v2 by default.

## [1.4.0] - 2022-05-02

### Fixed

- Improved packaging:
  - commonjs and esm version for node runtimes
  - esm version and umd version for browser

### Removed

- Pigi V1 envelope

## [1.3.10] - 2022-04-28

Browser build is now included in npm package

## [1.3.9] - 2022-04-26

No changes

## [1.3.8] - 2022-04-26

### Fixed

- CommonJS build is now included in npm package

## [1.3.7] - 2022-04-26

### Fixed

- CommonJS is now supported again

## [1.3.5] - 2022-04-21

No changes

## [1.3.4] - 2022-04-21

### Fixed

- Fixed main entrypoint in package json

## [1.3.3] - 2022-04-21

### Added

- All types are now exported from the main entrypoint

## [1.3.2] - 2022-04-20

### Fixed

- Fixed an issue with importing the library in commonjs format

## [1.3.1] - 2022-04-20

### Fixed

- Fixed an issue with importing the library in commonjs format

## [1.3.0] - 2022-04-20

### Added

- Browser builds with webpack
- Doc v1 envelope type
- Shared browser/nodejs tests

### Fixed

- Various bugs in browser related to envelopes

## [1.2.6] - 2022-03-30

### Fixed

- Fixed a padding issue with uncompressed keys

### Added

- Added TransactionStatus type

## [1.2.6] - 2022-03-30

### Fixed

- Fixed issue causing listTransactions to fail when no dates were supplied in the options

## [1.2.5] - 2022-03-29

### Fixed

- Fixed issue when creating Peppol v1 output via createTransaction

## [1.2.4] - 2022-03-29

### Fixed

- Fixed issue when creating Peppol v1 output

## [1.2.3] - 2022-03-28

### Fixed

- Some Transaction fields were Date but are actually ISO Strings

## [1.2.2] - 2022-03-28

### Fixed

- Improve typings of listTransactions and createTransaction

## [1.2.1] - 2022-12-08

### Added

- Alternative Key fingerprint using SHA1 for KVK

## [1.2.0] - 2022-12-07

### Fixed

- Improve types

### Added

- Support for compressed keys in Peppol outputs
- experimentalGetKeyInfo functions now also return compressedPublicKey, jwk, kid and info

## [1.1.0] - 2022-10-12

### Added

- recoverUserKeyAttributes() regenerates userKeyAttributes from a recovery key and a new password

## [1.0.8] - 2022-10-12

No significant changes

Added experimental KVK key

## [1.0.7] - 2022-10-12

Updated README

# [1.0.6] - 2022-10-12

Version bump to keep in sync with @mintblue/sdk-server

## [1.0.5] - 2022-10-12

### Fixed

- Decryption of Peppol outputs in browser
- Peppol output type now correctly returs pubKey after parsing

## [1.0.1] - 2022-09-19

### Fixed

- Missing dependency 'form-data'

## [1.0.0] - 2022-09-13

### Added

- Ability to instantiate Mintblue SDK with SDK token
- utilities related to key management
- Encrypted envelope for Yuki v1, Yuki v2, Peppol v1
- Create projects
- Create transactions
