Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rohenaz committed Oct 18, 2024
1 parent 29c34cb commit 392572b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. The format

## Table of Contents

- [1.1.10 - 2024-10-18](#119---2024-10-18)
- [1.1.9 - 2024-10-01](#118---2024-10-01)
- [1.1.8 - 2024-09-17](#118---2024-09-17)
- [1.1.7 - 2024-09-10](#117---2024-09-10)
Expand All @@ -16,6 +17,23 @@ All notable changes to this project will be documented in this file. The format
- [1.1.0 - 2024-08-19](#110---2024-08-19)
- [1.0.0 - 2024-06-06](#100---2024-06-06)

## [1.1.10] - 2024-10-18
Big thanks for contributions from @wregulski and @siggi

### Changed
- `pubKey.ToDER()` now returns bytes
- `pubKey.ToHash()` is now `pubKey.Hash()`
- `pubKey.SerializeCompressed()` is now `pubKey.Compressed()`
- `pubKey.SerializeHybrid()` is now `pubKey.Hybrid()`

### Added
- `publickey.ToDERHex()` returns a hex encoded public key
- `script.Chunks` helper method for `DecodeScript(scriptBytes)`
- `script.PubKey` returns a `*ec.PublicKey`
- `script.PubKeyHex`
- `script.Address`
- Example - get address and p2pkh pubkey from script

## [1.1.9] - 2024-10-01
### Changed
- Updated readme
Expand Down
1 change: 1 addition & 0 deletions transaction/fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type FeeModel interface {
ComputeFee(tx *Transaction) (uint64, error)
}

// Fee computes the fee for the transaction.
func (tx *Transaction) Fee(f FeeModel, changeDistribution ChangeDistribution) error {
fee, err := f.ComputeFee(tx)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion transaction/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (tx *Transaction) AddMerkleProof(bump *MerklePath) error {
return nil
}

// Fee returns the fee of the transaction.
// Sign signs the transaction with the unlocking script.
func (tx *Transaction) Sign() error {
err := tx.checkFeeComputed()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions transaction/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestNewTransaction(t *testing.T) {
// Create a new P2PKH unlocker from the private key
unlocker, err := p2pkh.Unlock(priv, nil)
require.NoError(t, err)

// Add an input
tx.AddInputFromTx(sourceTransaction, 0, unlocker)

Expand Down

0 comments on commit 392572b

Please sign in to comment.