Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.0.0 #128

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/chilly-dragons-burn.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/dry-geese-whisper.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/grumpy-seals-grow.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/old-islands-scream.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/pink-hotels-admire.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/serious-camels-help.md

This file was deleted.

40 changes: 0 additions & 40 deletions .changeset/smooth-sheep-fly.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/three-readers-unite.md

This file was deleted.

86 changes: 86 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
# `@bitauth/libauth`

## 3.0.0

### Major Changes

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Add support for relative BIP32 derivation

Relative BIP32 Hierarchical Deterministic (HD) derivation is now supported via the [`deriveHdPathRelative`](https://libauth.org/functions/deriveHdPathRelative.html) utility, and the Libauth compiler has been updated to explicitly use relative derivation by default for `HdKey`s. Absolute derivation has also been enhanced to validate the expected depth of provided HD keys.

If you application relies on relative derivation but uses [`deriveHdPath`](https://libauth.org/functions/deriveHdPath.html), you'll need to switch to using the new [`deriveHdPathRelative`](https://libauth.org/functions/deriveHdPathRelative.html), as absolute derivation will now fail if provided with a non-zero depth HD key.

Fixes [#49](https://github.com/bitauth/libauth/issues/49).

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - CashAssembly: `.signature` is now `.ecdsa_signature`

All CashAssembly scripts using the `.signature` operation should instead call `.ecdsa_signature` or switch to `.schnorr_signature`.

Additionally, `signing_serialization.token_prefix` is now available.

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Unify object parameters and error handling across library

A number of existing Libauth utilities have been modified to adhere to Libauth's object parameter and error handling conventions:

- CashAddress utilities:
- [`encodeCashAddress`](https://libauth.org/functions/encodeCashAddress.html)/[`decodeCashAddress`](https://libauth.org/functions/decodeCashAddress.html)
- [`lockingBytecodeToCashAddress`](https://libauth.org/functions/lockingBytecodeToCashAddress.html)/[`cashAddressToLockingBytecode`](https://libauth.org/functions/cashAddressToLockingBytecode.html)
- [`encodeCashAddressFormat`](https://libauth.org/functions/encodeCashAddressFormat.html)/[`decodeCashAddressFormat`](https://libauth.org/functions/decodeCashAddressFormat.html)
- BIP32 (HD Key) utilities:
- [`crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode`](https://libauth.org/functions/crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode.html)
- [`decodeHdKey`](https://libauth.org/functions/decodeHdKey.html) ([`decodeHdKeyUnchecked`](https://libauth.org/functions/decodeHdKeyUnchecked.html))
- [`decodeHdPrivateKey`](https://libauth.org/functions/decodeHdPrivateKey.html)/[`encodeHdPrivateKey`](https://libauth.org/functions/encodeHdPrivateKey.html)
- [`decodeHdPublicKey`](https://libauth.org/functions/decodeHdPublicKey.html)/[`encodeHdPrivateKey`](https://libauth.org/functions/encodeHdPrivateKey.html)
- [`deriveHdPath`](https://libauth.org/functions/deriveHdPath.html)
- [`deriveHdPathRelative`](https://libauth.org/functions/deriveHdPathRelative.html)
- [`deriveHdPrivateNodeFromSeed`](https://libauth.org/functions/deriveHdPrivateNodeFromSeed.html)
- [`deriveHdPrivateNodeIdentifier`](https://libauth.org/functions/deriveHdPrivateNodeIdentifier.html)/[`deriveHdPublicNodeIdentifier`](https://libauth.org/functions/deriveHdPublicNodeIdentifier.html)
- [`deriveHdPrivateNodeChild`](https://libauth.org/functions/deriveHdPrivateNodeChild.html)/[`deriveHdPublicNodeChild`](https://libauth.org/functions/deriveHdPublicNodeChild.html)
- [`deriveHdPublicKey`](https://libauth.org/functions/deriveHdPublicKey.html)
- [`deriveHdPublicNode`](https://libauth.org/functions/deriveHdPublicNode.html)
- [`hdKeyVersionIsPrivateKey`](https://libauth.org/functions/hdKeyVersionIsPrivateKey.html)/[`hdKeyVersionIsPublicKey`](https://libauth.org/functions/hdKeyVersionIsPublicKey.html)
- [`hdPrivateKeyToIdentifier`](https://libauth.org/functions/hdPrivateKeyToIdentifier.html)/[`hdPublicKeyToIdentifier`](https://libauth.org/functions/hdPublicKeyToIdentifier.html)
- BIP39 (Mnemonic Phrase) Utilities:
- [`deriveHdPrivateNodeFromBip39Mnemonic`](https://libauth.org/functions/deriveHdPrivateNodeFromBip39Mnemonic.html)
- [`deriveSeedFromBip39Mnemonic`](https://libauth.org/functions/deriveSeedFromBip39Mnemonic.html)
- [`encodeBip39Mnemonic`](https://libauth.org/functions/encodeBip39Mnemonic.html)/[`decodeBip39Mnemonic`](https://libauth.org/functions/decodeBip39Mnemonic.html)
- [`generateBip39Mnemonic`](https://libauth.org/functions/generateBip39Mnemonic.html)
- Key Utilities:
- [`generateDeterministicEntropy`](https://libauth.org/functions/generateDeterministicEntropy.html)

Please see the relevant guide(s) for usage examples:

- [Handling Errors](https://github.com/bitauth/libauth/blob/master/docs/errors.md)
- [Keys](https://github.com/bitauth/libauth/blob/master/docs/keys.md)
- [Addresses](https://github.com/bitauth/libauth/blob/master/docs/addresses.md)
- [Wallets & Transaction Creation](https://github.com/bitauth/libauth/blob/master/docs/wallets.md)

### Minor Changes

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Add usage guides and API overview

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Add P2PKH CashAddress utilities

The following utilities are now available:

- [`hdPrivateKeyToP2pkhLockingBytecode`](https://libauth.org/functions/hdPrivateKeyToP2pkhLockingBytecode.html)
- [`hdPrivateKeyToP2pkhCashAddress`](https://libauth.org/functions/hdPrivateKeyToP2pkhCashAddress.html)
- [`hdPublicKeyToP2pkhLockingBytecode`](https://libauth.org/functions/hdPublicKeyToP2pkhLockingBytecode.html)
- [`hdPublicKeyToP2pkhCashAddress`](https://libauth.org/functions/hdPublicKeyToP2pkhCashAddress.html)
- [`privateKeyToP2pkhLockingBytecode`](https://libauth.org/functions/privateKeyToP2pkhLockingBytecode.html)
- [`privateKeyToP2pkhCashAddress`](https://libauth.org/functions/privateKeyToP2pkhCashAddress.html)
- [`publicKeyToP2pkhLockingBytecode`](https://libauth.org/functions/publicKeyToP2pkhLockingBytecode.html)
- [`publicKeyToP2pkhCashAddress`](https://libauth.org/functions/publicKeyToP2pkhCashAddress.html)

For usage examples, see [`wallets.md`](https://github.com/bitauth/libauth/blob/master/docs/wallets.md).

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Validate all keys prior to compilation, expose `validateCompilationData`

The compiler now validates all compilation data (i.e. validate all public and private keys), prior to compilation, regardless of whether or not the offending public or private key material is used. This is intended to surface software defects (particularly in the software used by counterparties) as early as possible.

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - Add support for `decodeTransactionOutputs`

### Patch Changes

- [#127](https://github.com/bitauth/libauth/pull/127) [`e5c275f`](https://github.com/bitauth/libauth/commit/e5c275fdc8c9007a443958454346c46e647cf26c) Thanks [@bitjson](https://github.com/bitjson)! - `generateRandomBytes`: always verify unique results across two runs

Fixes [#119](https://github.com/bitauth/libauth/issues/119). Old behavior is available at `generateRandomBytesUnchecked`.

## 2.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitauth/libauth",
"version": "2.1.0",
"version": "3.0.0",
"description": "ultra-lightweight library for Bitcoin Cash, Bitcoin, and Bitauth",
"type": "module",
"main": "./build/index.js",
Expand Down
Loading