Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
79d8fad
Use WALLY_TXHASH_LEN for tx hash lengths.
jgriffiths Jul 1, 2020
fabb45b
transaction: Use GET_TX_B_FIXED instead of mostly duplicated GET_TX_A…
jgriffiths Jul 1, 2020
995245d
Java: Add missing tx_input_get_txhash wrapper
jgriffiths Jul 1, 2020
67c9132
bech32: Prevent witness version wrap-around bypassing allowed range c…
jgriffiths Jul 1, 2020
bbb17be
blech32: Add witness version check as per bech32
jgriffiths Jul 2, 2020
eebe38a
blech32: Formatting consistency nits
jgriffiths Jul 2, 2020
1ddc85a
pytest: Don't use built-in function 'input' as a variable name
jgriffiths Jul 1, 2020
897768f
pytest: Remove hashlib use from test_sign.py
jgriffiths Jul 1, 2020
dffd215
Docs: received -> receive
jgriffiths Jul 1, 2020
3ebb7d9
docs: Add symmetric docs with minor fixes
jgriffiths Jul 1, 2020
d8bacc3
symmetric: Add java wrappers + test, pass given len
jgriffiths Jul 1, 2020
01c690f
wally_asset_blinding_key_from_seed: remove redundant goto
jgriffiths Jul 1, 2020
4574c82
wally_asset_blinding_key_to_ec_private_key: simplify logic
jgriffiths Jul 1, 2020
9ae32e9
docs: Fix function refs in Liquid developer guide
jgriffiths Jul 1, 2020
aebd386
docs: Fix sphinx warning
jgriffiths Jul 1, 2020
3a1f622
elements: Remove redundant goto's
jgriffiths Jul 1, 2020
4280519
tests: Actually check pubkey recovery results
jgriffiths Jul 1, 2020
5d7f840
docs: Fix sphinx warning
jgriffiths Jul 1, 2020
91b84a0
ecdh: Use priv_key for param name, fix docs, expose nicely to Java
jgriffiths Jul 1, 2020
fe605a6
elements: Use wally for hashing in get_nonce_hash()
jgriffiths Jul 1, 2020
1003309
SWIG: Add missing nonce_hash to Java bindings
jgriffiths Jul 1, 2020
a281961
SWIG: Silence JS wrapper build warnings
jgriffiths Jul 1, 2020
d2c5d2c
tests: Remove hashbangs from python tests
jgriffiths Jul 1, 2020
73cdf0a
address.c: Remove unused includes
jgriffiths Jul 1, 2020
2203ec3
wally_bip32_key_to_addr_segwit: Clear witness program before returning
jgriffiths Jul 2, 2020
118cc76
SWIG: Java wrapper and test for ec_public_key_negate()
jgriffiths Jul 2, 2020
333edf1
Compare return codes to WALLY_OK for consistency
jgriffiths Jul 2, 2020
52cdf7c
pegin_contract_script_from_bytes: Don't use 'written' as a general va…
jgriffiths Jul 2, 2020
e312d47
address_to_scriptpubkey: Use common variable name for consistency
jgriffiths Jul 2, 2020
5af7358
scriptpubkey_to_address: Don't ignore base58 errors
jgriffiths Jul 2, 2020
ec215ea
clone_tx: Simplify, constify, ensure input is valid
jgriffiths Jul 2, 2020
e4c4ae9
clone_tx: expose as wally_tx_clone, add tests
jgriffiths Jul 2, 2020
89ee3a3
key_strip_private_key: Use single impl, expose to Java and C++
jgriffiths Jul 2, 2020
80c49bd
CHANGES: Remove non-API changes from CHANGES.md
jgriffiths Jul 2, 2020
9c7e48e
witness_p2wpkh_from_x: Simplify
jgriffiths Jul 2, 2020
576235a
SWIG: Expose wally_address_to_scriptpubkey to Java
jgriffiths Jul 2, 2020
cd85f67
tests: Move scriptpubkey tests to cffi and de-duplicate
jgriffiths Jul 2, 2020
437e6c9
psbt: Move FINGERPRINT_LEN to wally_bip32.h where it belongs
jgriffiths Jul 3, 2020
fc33a40
bip32: rename FINGERPRINT_LEN to BIP32_KEY_FINGERPRINT_LEN
jgriffiths Jul 3, 2020
f24fe1a
bip32: Expose key_get_fingerprint to Java and C++
jgriffiths Jul 3, 2020
49b6095
scriptpubkey_to_address: Expose to C++
jgriffiths Jul 3, 2020
619d7c4
SWIG: Fix psbt_get_length to allow python bindings to work
jgriffiths Jul 3, 2020
05d27ae
ec_sig_from_bytes: Prevent uninitialised read
jgriffiths Jul 3, 2020
57f28ac
ec_sig_from_bytes: Simplify parameter checking logic
jgriffiths Jul 3, 2020
a67df5d
psbt: In wally_combine_psbts, don't leak result if merge_unknowns_int…
jgriffiths Jul 5, 2020
dc6968f
add WALLY_DISABLE_OP_CODE guard
k-matsuzawa Mar 10, 2020
0d819a0
psbt: return ENOMEM for any wally_malloc failures
niftynei Jun 22, 2020
6546dc0
psbt: Initial simplification of wally_psbt_init_alloc
jgriffiths Jul 5, 2020
9e3c743
psbt: Remove unneded saves/restores of num_items members
jgriffiths Jul 5, 2020
ab0a52e
psbt: Don't set allocation len if allocation fails
jgriffiths Jul 5, 2020
d198791
psbt: Doc fixes
jgriffiths Jul 6, 2020
485f1c0
docs: wally_crypto doc fixes
jgriffiths Jul 6, 2020
a48ba99
psbt: Add missing output checks
jgriffiths Jul 6, 2020
dbdd55d
psbt: constify wally_extract_psbt input and fix docs
jgriffiths Jul 6, 2020
1477353
psbt: Add missing checks to and simplify extract_psbt
jgriffiths Jul 6, 2020
bbe3865
psbt: Fix input and output leaks, clear data when freeing
jgriffiths Jul 6, 2020
df4c3b2
travis: don't explicitly list what tests in tools/travis_build.sh
rustyrussell May 29, 2020
0d5a029
psbt: add a simple test case, by copying some of BIP 0174.
rustyrussell May 29, 2020
d217fc3
psbt: close some leaks.
rustyrussell May 29, 2020
ae048c5
psbt: improve constness.
rustyrussell May 29, 2020
c876b07
pullpush: add routines for safe marshal / unmarshal.
rustyrussell May 29, 2020
6cc7dac
psbt: use push functions for converting input to bytes.
rustyrussell May 29, 2020
21899c5
psbt: make output_to_bytes use push.
rustyrussell May 29, 2020
c17bc17
wally_psbt: make wally_psbt_to_bytes use push itself.
rustyrussell May 29, 2020
5803c09
psbt: make psbt_input_get_length use the same code as psbt_input_to_b…
rustyrussell May 29, 2020
d86c6e2
psbt: use pull_ functions to parse input section.
rustyrussell May 29, 2020
ae9e33e
psbt: use pull_ functions to parse output section.
rustyrussell May 29, 2020
db45865
psbt: convert count_psbt_parts to use pull_ code.
rustyrussell May 29, 2020
4fbabb0
psbt: convert wally_psbt_from_bytes to use pull_code.
rustyrussell May 29, 2020
2c46db9
psbt: add test for marshal/unmarshal limits.
rustyrussell May 29, 2020
aff3380
psbt: add limit testing to unmarshalling as well.
rustyrussell May 29, 2020
bed73fe
psbt: Delete redundant struct wally_key_origin_info
jgriffiths Jul 6, 2020
af9a19d
transaction: Declare vars up front
jgriffiths Jul 6, 2020
c0bfe23
docs: Add missing docs to cleanup.sh
jgriffiths Jul 6, 2020
0994166
transaction: Expose wally_tx_get_txid
jgriffiths Jul 6, 2020
c965976
psbt: Remove unneeded casts
jgriffiths Jul 6, 2020
b07ade3
docs: Update coverage report instructions
jgriffiths Jul 6, 2020
a9eff8e
elements: Remove redundant parameter checks
jgriffiths Jul 6, 2020
39adabc
symmetric: Add tests
jgriffiths Jul 6, 2020
e1c94f5
symmetric: Remove SYMMETRIC_KEY_LEN from the public interface
jgriffiths Jul 6, 2020
76f74a8
transaction: Allow serialisation of partial transactions
jgriffiths Jul 7, 2020
cdc41b4
elements: Remove redundant vars and simplify code
jgriffiths Jul 7, 2020
8a94332
psbt: Allow partial transactions
jgriffiths Jul 7, 2020
3b167a2
psbt: Avoid magic numbers
jgriffiths Jul 7, 2020
ee19063
Check that pointers are non-null rather than length is non-zero
achow101 May 29, 2020
0c0602d
Implement psbt global version type
achow101 May 29, 2020
9984d20
Add wally_psbt_elements_input_init_alloc and elements fields setters
achow101 May 14, 2020
acce49a
psbt: Avoid bool type in public interface
jgriffiths Jul 8, 2020
9f79a72
Add wally_psbt_elements_output_init_alloc and field setters
achow101 May 15, 2020
9510033
Have the PSBT store it's magic to distinguish between psbt and pset
achow101 May 15, 2020
2754727
psbt: Don't pass arrays by value in the public interface
jgriffiths Jul 8, 2020
96867cb
Implement Elements psbt de/serialization as a proprietary type
achow101 May 30, 2020
5ec3942
psbt: Pass in correct flags for elements tx parsing
jgriffiths Jul 9, 2020
b290245
.gitignore: ignore ctags
niftynei Jul 8, 2020
138ca4c
pset: use correct serialization for witness_utxo
niftynei Jul 8, 2020
4c49458
pset: Don't leak witness_utxo elements
jgriffiths Jul 9, 2020
1324313
pset: fixup key parsing for prefix + subtype
niftynei Jul 8, 2020
cf17982
pset: fixup serialization of proprietary elements keys
niftynei Jul 8, 2020
48c208a
pset: include length of amount in value for WALLY_PSBT_IN_ELEMENTS_VA…
niftynei Jul 8, 2020
55c7ee7
pset: add canonical pset example from elementsd
niftynei Jul 8, 2020
b7e0f27
configure: wouldn't compile MAP_ANON on Ubuntu 20.04 LTS
niftynei Jul 2, 2020
5eb22ef
transaction: expose wally_tx_output_clone
niftynei Jul 8, 2020
155c635
psbt: clone passed in tx_output, makes us pset compatible
niftynei Jul 8, 2020
ef5c5ca
psbt: Always allow identification of elements psets
jgriffiths Jul 9, 2020
9ccf2f5
psbt: Update docs
jgriffiths Jul 9, 2020
808ab78
gitignore: Ignore swp files
jgriffiths Jul 9, 2020
e68567b
pbst: Move test data file to the common data file location
jgriffiths Jul 9, 2020
e2937a4
readme: add easier to skim notes for running the tests + formatter
niftynei May 29, 2020
8be1b7b
psbt: Replace asserts with error returns
jgriffiths Jul 9, 2020
32f8290
tests: enable non swig elements tests even when swig not enabled
niftynei Jul 7, 2020
ae6cc50
psbt: Avoid magic numbers
jgriffiths Jul 9, 2020
b942b99
transaction: Generalise replace_script to replace_bytes
jgriffiths Jul 9, 2020
575cca0
psbt: Add helpers to simplify pubkey length checks
jgriffiths Jul 9, 2020
5481866
psbt: Use replace_bytes to implement elements outputs setters
jgriffiths Jul 9, 2020
37375f4
tests: Use wally_free_string to free wally allocated string
jgriffiths Jul 9, 2020
f7fd0f7
psbt: Fix leak in clone_unknowns_map
jgriffiths Jul 9, 2020
0549546
psbt: share code to set the unknown map member in inputs and outputs
jgriffiths Jul 9, 2020
4fa985d
psbt: remove redundant checks before clear_and_free
jgriffiths Jul 9, 2020
4fc58e9
psbt: Use replace_bytes to implement elements inputs setters
jgriffiths Jul 9, 2020
cd32396
psbt: merge replace_unknowns with clone_unknowns_map
jgriffiths Jul 9, 2020
b394f13
psbt: Share keypath setting code like the updated unknowns code
jgriffiths Jul 9, 2020
4005620
psbt: Don't leak peg_in_tx when setting it on inputs
jgriffiths Jul 9, 2020
c055e7b
psbt: Share partial sigs setting code like the updated unknowns code
jgriffiths Jul 9, 2020
5d86311
psbt: psbt_input_set_final_witness: Add checks, allow NULL witness
jgriffiths Jul 9, 2020
20cfc34
psbt: psbt_input_set_non_witness_utxo: Add input check
jgriffiths Jul 9, 2020
b44db6c
psbt: Share code to grow array members
jgriffiths Jul 9, 2020
db7dc3c
psbt: add_new_keypath: Check parameters, clear on failure
jgriffiths Jul 9, 2020
14ff61a
psbt: add_new_partial_sig: Check parameters, clear on failure, fix co…
jgriffiths Jul 9, 2020
fac7a56
psbt: add_new_unknown: Check parameters, don't leak on failure
jgriffiths Jul 9, 2020
3ca0bad
psbt: Rename some psbt functions to follow library standards
jgriffiths Jul 10, 2020
d5a1ac6
psbt: final input/output review updates
jgriffiths Jul 10, 2020
2b219df
psbt: Only copy magic if psbt allocation succeeds
jgriffiths Jul 10, 2020
4015632
internal: Implement an internal calloc to simplify code
jgriffiths Jul 10, 2020
f353588
psbt: set_global_tx: Don't leak inputs if output allocation fails
jgriffiths Jul 10, 2020
624035c
psbt: Remove redundant pre-iteration of data when deserializing
jgriffiths Jul 10, 2020
30c4123
psbt: optimise to avoid cloning the parsed global tx
jgriffiths Jul 10, 2020
6d39d35
psbt: psbt_to_bytes: Follow the library convention for too short buffers
jgriffiths Jul 11, 2020
eb72804
docs: Add docs for return codes and variable output buffers
jgriffiths Jul 11, 2020
d040caf
psbt: Standardise param name in order to correct doc generation
jgriffiths Jul 11, 2020
cf338a9
psbt: fix warnings building without elements support
jgriffiths Jul 11, 2020
e0166c2
Java: use consistent method prologues
jgriffiths Jul 11, 2020
7f0c48b
psbt: Clear decoded base64 data after unserialising
jgriffiths Jul 11, 2020
f8b2707
psbt: Clean up test, use wally for hex conversion
jgriffiths Jul 11, 2020
1a7afc7
psbt: constify psbt function parameters
jgriffiths Jul 12, 2020
7d1f40e
psbt: Don't use C++ stdlib types for parameter names
jgriffiths Jul 12, 2020
e1d0f55
psbt: Use the same parameter names as other calls for consistency
jgriffiths Jul 12, 2020
9f8a295
psbt: Expose functions to C++
jgriffiths Jul 12, 2020
e60de16
psbt: Add flags to serialisation calls for future use
jgriffiths Jul 12, 2020
26e8b7e
pset: quick hack to create elements tx hash for signing
jgriffiths Jul 13, 2020
960ae3e
psbt: Add find functions for psbt map types
jgriffiths Jul 13, 2020
c34e871
psbt: ignore duplicate keys when adding to maps
jgriffiths Jul 13, 2020
fb188e5
psbt: Use find to prevent dupes when reading, add unknowns check
jgriffiths Jul 13, 2020
60291f1
psbt: Use find to check for existing input signature when signing
jgriffiths Jul 13, 2020
5af755e
psbt: Use find to match keypaths when signing
jgriffiths Jul 13, 2020
0fb9781
psbt: Change psbt_combine to just combine two psbts together.
jgriffiths Jul 13, 2020
94bd308
psbt: Remove duplicated code around merging unknown maps
jgriffiths Jul 13, 2020
ba303f8
psbt: Remove duplicated code around merging keypath maps
jgriffiths Jul 13, 2020
22f492a
psbt: Add pubkeys with the correct length
jgriffiths Jul 13, 2020
c99fbe7
psbt: simplify push_psbt_key_with_pubkey
jgriffiths Jul 13, 2020
9542d62
psbt: Add elements support for psbt_combine, clean up
jgriffiths Jul 13, 2020
cf000b1
psbt: Allow clearing value and struct members of pbst inputs/outputs
jgriffiths Jul 13, 2020
e29322e
Revert "elements: don't fail silently if the buffer is too small"
jgriffiths Jul 14, 2020
6f5a803
elements: Document elements_pegout_script_from_bytes change
jgriffiths Jul 14, 2020
b57e0c7
elements: asset_pak_whitelistproof: Update and use correct return sem…
jgriffiths Jul 14, 2020
81a070b
Add security issue reporting information
jgriffiths Dec 7, 2018
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bld
*.pyc
*.swp
src/test/__pycache__/
*~
*.class
Expand Down Expand Up @@ -43,6 +44,7 @@ src/test_bech32*
src/test_blech32*
src/test_clear*
src/test_tx*
src/test_psbt*
src/test_elements_tx*
src/test-suite.log
src/swig_java/swig_java_wrap.c
Expand Down Expand Up @@ -82,10 +84,14 @@ docs/source/core.rst
docs/source/crypto.rst
docs/source/psbt.rst
docs/source/script.rst
docs/source/symmetric.rst
docs/source/transaction.rst
docs/source/elements.rst
.idea/

# ctags
tags

# MacOS
**/.DS_Store

Expand Down
54 changes: 30 additions & 24 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
# Changes

## Version 0.7.9

- elements_pegout_script_from_bytes, asset_pak_whitelistproof and
psbt_to_bytes now follow the library convention for too-short buffers
instead of returning WALLY_EINVAL. See the generated API documentation
section "Variable Length Output Buffers" for details.

- psbt_combine has been changed to only combine one PSBT into another.

- psbt_to_bytes, psbt_get_length and psbt_to_base64 now take a flags argument.

- FINGERPRINT_LEN was renamed to BIP32_KEY_FINGERPRINT_LEN for
consistency - You should change any references in your source when upgrading.

- The following PSBT functions have been renamed for consistency:
- wally_add_new_keypath -> wally_keypath_map_add
- wally_add_new_partial_sig -> wally_partial_sigs_map_add
- wally_add_new_unknown -> wally_unknowns_map_add
- wally_extract_psbt -> wally_psbt_extract
- wally_finalize_psbt -> wally_psbt_finalize
- wally_sign_psbt -> wally_psbt_sign
- wally_combine_psbts -> wally_psbt_combine

## Version 0.7.8

- Deprecate Python 2 wheels
- Honor CFLAGS, default to O2
- Bug fixing
- Python 2 wheels are now deprecated. Users should move to Python 3 as soon as possible.

## Version 0.7.7

- Expose wally_psbt_get_length
- Add wally_scriptpubkey_to_address
- Return written bytes in asset_pak_whitelistproof
- Elements bug fixes
- API change of wally_asset_pak_whitelistproof to return the number of bytes written.

## Version 0.7.6

- Add flag to sort multisig keys (BIP67)
- Add bip32_key_get_fingerprint
- Add Liquid developer guide
- Add liquid support to address_to_scriptpubkey
- No API changes

## Version 0.7.5

- Add support for P2PKH, P2SH-P2WPKH, P2WPKH address derivation from BIP32 key
- Add support for P2KH and P2SH address parsing
- Add support for PSBT
- Add support for blech32
- Add support for pegin and pegout
- Bug fixing, build updates and improvements
- No API changes

## Version 0.7.4

- Add support for recoverable signatures
- Generalize Elements function to use external nonces
- Expose blinding key functions to js wrapper
- doc improvement and bugs fixing
- No API changes

## Version 0.7.3

- Exposed ECDH, added py3.7 x86_64 linux wheels to released artifacts, updated
JS bindings to support latest nodejs, doc typos and bug fixing.
- No API changes

## Version 0.7.2

- API change of wally_tx_to_bytes and wally_tx_to_hex to not accept
WALLY_TX_FLAG_USE_ELEMENTS bit set in flags. You should remove such flag when
WALLY_TX_FLAG_USE_ELEMENTS set in flags. You should remove this flag when
upgrading. This change affects elements transactions only.

## Version 0.6.5
Expand Down
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Read the API documentation at https://wally.readthedocs.io.

Note that library interfaces may change slightly while the library design matures. Please see the [CHANGES](./CHANGES.md) file to determine if the API has changed when upgrading.

Please report bugs and submit patches to https://github.com/ElementsProject/libwally-core.
Please report bugs and submit patches to [Our github repository](https://github.com/ElementsProject/libwally-core). If you wish to report a security issue, please read [Our security reporting guidelines](./SECURITY.md).

[![Build Status](https://travis-ci.org/ElementsProject/libwally-core.svg?branch=master)](https://travis-ci.org/ElementsProject/libwally-core)

Expand Down Expand Up @@ -149,8 +149,22 @@ should format your changes using [uncrustify](https://github.com/uncrustify/uncr
version 0.60 or later. The script `./tools/uncrustify` will reformat all C
sources in the library as needed, with the currently chosen uncrustify options.

To reformat a single source file, use e.g.:
```
$ ./tools/uncrustify src/transaction.c
```

Or to reformat all source files, pass no arguments:
```
$ ./tools/uncrustify
```

You should also make sure the existing tests pass and if possible write tests
covering any new functionality, following the existing style.
covering any new functionality, following the existing style. You can run the
tests via:
```
$ make check
```

## Generating a coverage report

Expand All @@ -159,15 +173,15 @@ To generate an HTML coverage report, install `lcov` and use:
```
$ ./tools/cleanup.sh
$ ./tools/autogen.sh
$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-swig-java --enable-coverage
$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-swig-java --enable-js_wrappers --enable-coverage
$ make
$ ./tools/coverage.sh clean
$ make check
$ ./tools/coverage.sh
```

The coverage report can then be viewed at `src/lcov/index.html`. Patches to
increase the test coverage are welcome.
The coverage report can then be viewed at `./src/lcov/src/index.html`. Patches
to increase the test coverage are welcome.

## Users of libwally-core

Expand Down
Loading