Skip to content

Commit cf2eb34

Browse files
committed
Release v2.1.0 on npm
1 parent 8cbcf4d commit cf2eb34

File tree

3 files changed

+43
-44
lines changed

3 files changed

+43
-44
lines changed

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
release:
1212
name: Release
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
id-token: write
1417
steps:
1518
- name: Checkout Repo
1619
uses: actions/checkout@v4

CHANGELOG-v1-to-v2.md

-39
This file was deleted.

CHANGELOG.md

+40-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
1-
# Changelog
1+
# `@bitauth/libauth`
22

33
## 2.1.0
44

55
### Minor Changes
66

7-
- [#117](https://github.com/bitauth/libauth/pull/117) [`51c7ee3`](https://github.com/bitauth/libauth/commit/51c7ee36e2e8f14a1a18a54b4b8c770498c788cf) Thanks [@bitjson](https://github.com/bitjson)! - Use `@changesets/cli`, remove `standard-version`
7+
- [#117](https://github.com/bitauth/libauth/pull/109) [`8e032c2`](https://github.com/bitauth/libauth/commits/8e032c2f9878d6f20cf805be6b21274534622d56) Thanks [@jimtendo](https://github.com/jimtendo)! - Add PBKDF2 and BIP39 Support
88

99
### Patch Changes
1010

11+
- [#117](https://github.com/bitauth/libauth/pull/117) [`51c7ee3`](https://github.com/bitauth/libauth/commit/51c7ee36e2e8f14a1a18a54b4b8c770498c788cf) Thanks [@bitjson](https://github.com/bitjson)! - Use `@changesets/cli`, remove `standard-version`
1112
- [#117](https://github.com/bitauth/libauth/pull/117) [`7ddad21`](https://github.com/bitauth/libauth/commit/7ddad21d062ab9af6407f6fb3037cf8ed19fc080) Thanks [@bitjson](https://github.com/bitjson)! - Publish with provenance via GitHub Actions
1213

13-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
14+
## 2.0.0
15+
16+
Libauth is now a [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c), simplifying the developer experience by allowing WASM crypto to be instantiated internally/automatically by default 🎉. This refactor also simplifies the usage of and types surrounding Libauth virtual machines and compilers, and several other APIs have been improved.
17+
18+
New, dedicated Telegram channels are also available for [Libauth release announcements](https://t.me/libauth) and [Libauth developer discussions](https://t.me/libauth_devs).
19+
20+
### Simplified Virtual Machine Types
21+
22+
Previously, Libauth VMs were very strictly-typed such that error messages and opcodes used chain-specific enums (e.g. `AuthenticationErrorBCH` and `OpcodesBCH`). While this configuration did ensure that VMs and VM results were strictly-typed with chain information, the configuration ultimately made library components much harder to remix without deep knowledge of TypeScript's type system. In both cases, such type information rarely catches downstream implementation bugs:
23+
24+
- Differing opcode enums effectively only narrow the real-time type from `number` to `0 | 1 | 2 | ... | 254 | 255`.
25+
- Differing error enums only offer a slight benefit in making error matching slightly simpler, and they present a significant disadvantage in that they preclude the contextualization of errors – each error string must be fully defined at compile time.
26+
27+
In both cases, the differing types offer only very marginal benefit at the cost of exceptional added complexity (widespread proliferation of generic types throughout the codebase). This refactor migrates the opcode type to `number` and the error type to `string | undefined`, leaving the opcode and error enums primarily as a form of documentation.
28+
29+
### Simplified VM Usage
30+
31+
Transaction validation infrastructure is now a part of each VM instance, so transaction validation is as simple as `vm.verify({ transaction, sourceOutputs })` (returning either `true` or an error `string`). This behavior offers individual VMs full control of transaction parsing and validation, allowing Libauth VMs to implement proposals for significant modifications like new transaction formats or high-level transaction validation changes.
32+
33+
### Simplified VM Operations and Instruction Sets
34+
35+
Beginning with this version, Libauth will no longer maintain support for defunct VM versions. For example, `BCH_2019_05` was an upgrade which enabled Schnorr signature support in CHECKSIG and CHECKDATASIG and a clean-stack exception for SegWit recovery. The `BCH_2019_05` VM was replaced without a network split by the `BCH_2019_11` upgrade, meaning `BCH_2019_05` is no longer in use by any public network. As such, relevant code paths, flags, and other VM-specific functionality for `BCH_2019_05` has been removed to simplify currently supported Libauth VMs. (Of course, historical implementations will always remain available in previously-released versions of Libauth.)
36+
37+
With this change, the existing VM implementations have been significantly simplified, removing unused code and reducing type complexity. Built-in VM instruction sets are now specified in a single file, making them easier to review and copy.
38+
39+
### Additional Changes
1440

15-
## [2.1.0-beta.1](https://github.com/bitauth/libauth/compare/v2.1.0-beta.0...v2.1.0-beta.1) (2024-02-23)
41+
Several other improvements have been made:
1642

17-
## [2.1.0-beta.0](https://github.com/bitauth/libauth/compare/v2.0.0...v2.1.0-beta.0) (2024-02-23)
43+
- **Default crypto interface instances** – because Libauth is now pure ESM, all of Libauth's WebAssembly cryptography implementations can now be automatically instantiated internally by the library. All Libauth methods that require crypto now use these automatically-instantiated implementations by default (as a default parameter), but consumers can opt-out of the behavior by providing a replacement implementation (and build tools that support dead code elimination/tree shaking of default parameters can automatically drop the unused crypto implementations.) To support this functionality, the parameter ordering of many functions have been modified to shift crypto implementations to the end (as optional parameters).
44+
- **`Secp256k1` doesn't throw** - the `Secp256k1` interface previously threw errors, breaking from Libauth's convention of well-typed errors. All `Secp256k1` methods now return error messages as `string`s where applicable.
45+
- **CashAssembly** – is the new name for Bitauth Templating Language (BTL), the simple language used within Libauth templates.
46+
- **Consistent capitalization, miscellaneous corrections** – some exports have been renamed to consistently use camelCase (for functions) or PascalCase (for types/interfaces), respectively. Several exports have been renamed for discoverability and consistency with other exports.
47+
- **Expanded state available to VMs and compilers** – VM and compiler operations can now access all raw contents of transactions and source outputs.
48+
- **Expanded capabilities of template scenarios** – scenarios can now represent any transaction shape and generate full, serializable transactions.
49+
- **New VM bytecode test vector generation** – Libauth includes a new `vmb_tests` test vector generation system to produce sets of cross-implementation test vectors as serialized transactions; this allows for sets of test vectors that fully test all transaction validation infrastructure without making assumptions about implementation internals.
50+
- **Improved CashAddress utilities** – cash address utilities no longer require enums, hash lengths are measured in bytes rather than bits, and `type` is distinguished from `typeBit`.
51+
- **More consistent [encoding/decoding utilities](./docs/encodings-and-formats.md)** – Several decoding methods have been renamed and refactored to use the new ReadPosition API.
52+
- **More consistent [error handling](./docs/errors.md)** – all possible errors are surfaced in type signatures as `string`s.
1853

1954
## [2.0.0](https://github.com/bitauth/libauth/compare/v2.0.0-alpha.8...v2.0.0) (2024-01-12)
2055

0 commit comments

Comments
 (0)