Skip to content

Commit

Permalink
Prepare v3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed Apr 10, 2024
1 parent ec18dad commit 58f984e
Show file tree
Hide file tree
Showing 140 changed files with 33,670 additions and 26,442 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-dragons-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bitauth/libauth': minor
---

Add usage guides and API overview
7 changes: 7 additions & 0 deletions .changeset/dry-geese-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@bitauth/libauth': patch
---

`generateRandomBytes`: always verify unique results across two runs

Fixes [#119](https://github.com/bitauth/libauth/issues/119). Old behavior is available at `generateRandomBytesUnchecked`.
11 changes: 11 additions & 0 deletions .changeset/grumpy-seals-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@bitauth/libauth': major
---

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).
18 changes: 18 additions & 0 deletions .changeset/old-islands-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@bitauth/libauth': minor
---

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).
7 changes: 7 additions & 0 deletions .changeset/pink-hotels-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@bitauth/libauth': minor
---

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.
9 changes: 9 additions & 0 deletions .changeset/serious-camels-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@bitauth/libauth': major
---

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.
40 changes: 40 additions & 0 deletions .changeset/smooth-sheep-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
'@bitauth/libauth': major
---

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)
5 changes: 5 additions & 0 deletions .changeset/three-readers-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bitauth/libauth': minor
---

Add support for `decodeTransactionOutputs`
15 changes: 14 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@
"CHECKSEQUENCEVERIFY",
"CHECKSIG",
"CHECKSIGVERIFY",
"checksummed",
"chipnet",
"chuhai",
"codecov",
"codepoint",
"CODESEPARATOR",
"coinbase",
"Coldcard's",
"combinator",
"combinators",
"convertbits",
Expand Down Expand Up @@ -156,6 +158,7 @@
"seckey",
"secp",
"secp256k1",
"secretkey",
"sidechain",
"sigchecks",
"sighash",
Expand Down Expand Up @@ -183,6 +186,7 @@
"Uint",
"uncompress",
"unintuitive",
"UNROT",
"unspendable",
"untrusted",
"utxo",
Expand Down Expand Up @@ -221,7 +225,16 @@
{
"name": "cash-address-format",
"pattern": "/:[qpzry9x8gf2tvdw0s3jn54khce6mua7l]+/g"
},
{
"name": "secret-key-format",
"pattern": "/secret-key:[-qpzry9x8gf2tvdw0s3jn54khce6mua7l]+/g"
}
],
"ignoreRegExpList": ["Base64", "HexValues", "cash-address-format"]
"ignoreRegExpList": [
"Base64",
"HexValues",
"cash-address-format",
"secret-key-format"
]
}
Loading

0 comments on commit 58f984e

Please sign in to comment.