Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 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
6c69970
ec_sig_from_bytes: Prevent uninitialised read
jgriffiths Jul 3, 2020
6cd87b5
ec_sig_from_bytes: Simplify parameter checking logic
jgriffiths Jul 3, 2020
b41fe01
psbt: In wally_combine_psbts, don't leak result if merge_unknowns_int…
jgriffiths Jul 5, 2020
dfe7cd6
add WALLY_DISABLE_OP_CODE guard
k-matsuzawa Mar 10, 2020
deb4873
psbt: return ENOMEM for any wally_malloc failures
niftynei Jun 22, 2020
63cf542
psbt: Initial simplification of wally_psbt_init_alloc
jgriffiths Jul 5, 2020
bef7403
psbt: Remove unneded saves/restores of num_items members
jgriffiths Jul 5, 2020
2a1e487
psbt: Don't set allocation len if allocation fails
jgriffiths Jul 5, 2020
612802d
psbt: Doc fixes
jgriffiths Jul 6, 2020
7c84ed1
docs: wally_crypto doc fixes
jgriffiths Jul 6, 2020
df1bb25
psbt: Add missing output checks
jgriffiths Jul 6, 2020
4504a4a
psbt: constify wally_extract_psbt input and fix docs
jgriffiths Jul 6, 2020
7ff892e
psbt: Add missing checks to and simplify extract_psbt
jgriffiths Jul 6, 2020
336e56d
psbt: Fix input and output leaks, clear data when freeing
jgriffiths Jul 6, 2020
0b3cdf4
travis: don't explicitly list what tests in tools/travis_build.sh
rustyrussell May 29, 2020
cd6af40
psbt: add a simple test case, by copying some of BIP 0174.
rustyrussell May 29, 2020
d638793
psbt: close some leaks.
rustyrussell May 29, 2020
b12804e
psbt: improve constness.
rustyrussell May 29, 2020
7f2b5e9
pullpush: add routines for safe marshal / unmarshal.
rustyrussell May 29, 2020
a23aba6
psbt: use push functions for converting input to bytes.
rustyrussell May 29, 2020
8aa08b0
psbt: make output_to_bytes use push.
rustyrussell May 29, 2020
274de27
wally_psbt: make wally_psbt_to_bytes use push itself.
rustyrussell May 29, 2020
372b70b
psbt: make psbt_input_get_length use the same code as psbt_input_to_b…
rustyrussell May 29, 2020
87293c6
psbt: use pull_ functions to parse input section.
rustyrussell May 29, 2020
6c055c1
psbt: use pull_ functions to parse output section.
rustyrussell May 29, 2020
155c6eb
psbt: convert count_psbt_parts to use pull_ code.
rustyrussell May 29, 2020
c3a424f
psbt: convert wally_psbt_from_bytes to use pull_code.
rustyrussell May 29, 2020
3430c11
psbt: add test for marshal/unmarshal limits.
rustyrussell May 29, 2020
cd24ad8
psbt: add limit testing to unmarshalling as well.
rustyrussell May 29, 2020
666877c
psbt: Delete redundant struct wally_key_origin_info
jgriffiths Jul 6, 2020
c142302
transaction: Declare vars up front
jgriffiths Jul 6, 2020
ead83de
docs: Add missing docs to cleanup.sh
jgriffiths Jul 6, 2020
009516a
transaction: Expose wally_tx_get_txid
jgriffiths Jul 6, 2020
05802b7
psbt: Remove unneeded casts
jgriffiths Jul 6, 2020
0f8e932
docs: Update coverage report instructions
jgriffiths Jul 6, 2020
b9c731d
elements: Remove redundant parameter checks
jgriffiths Jul 6, 2020
d550c93
symmetric: Add tests
jgriffiths Jul 6, 2020
c0352cb
symmetric: Remove SYMMETRIC_KEY_LEN from the public interface
jgriffiths Jul 6, 2020
0031609
transaction: Allow serialisation of partial transactions
jgriffiths Jul 7, 2020
ac78bdc
elements: Remove redundant vars and simplify code
jgriffiths Jul 7, 2020
d92caca
psbt: Allow partial transactions
jgriffiths Jul 7, 2020
076ccc6
psbt: Avoid magic numbers
jgriffiths Jul 7, 2020
b5cde6e
Check that pointers are non-null rather than length is non-zero
achow101 May 29, 2020
7b6ac5c
Implement psbt global version type
achow101 May 29, 2020
2860e25
Add wally_psbt_elements_input_init_alloc and elements fields setters
achow101 May 14, 2020
edf37aa
psbt: Avoid bool type in public interface
jgriffiths Jul 8, 2020
34982cb
Add wally_psbt_elements_output_init_alloc and field setters
achow101 May 15, 2020
c69504a
Have the PSBT store it's magic to distinguish between psbt and pset
achow101 May 15, 2020
b9914e5
psbt: Don't pass arrays by value in the public interface
jgriffiths Jul 8, 2020
0cae125
Implement Elements psbt de/serialization as a proprietary type
achow101 May 30, 2020
05a55d2
psbt: Pass in correct flags for elements tx parsing
jgriffiths Jul 9, 2020
2f3aa8c
.gitignore: ignore ctags
niftynei Jul 8, 2020
8351fb6
pset: use correct serialization for witness_utxo
niftynei Jul 8, 2020
b40274c
pset: Don't leak witness_utxo elements
jgriffiths Jul 9, 2020
5337ca3
pset: fixup key parsing for prefix + subtype
niftynei Jul 8, 2020
8c04554
pset: fixup serialization of proprietary elements keys
niftynei Jul 8, 2020
8c4e6fc
pset: include length of amount in value for WALLY_PSBT_IN_ELEMENTS_VA…
niftynei Jul 8, 2020
beb5ac5
pset: add canonical pset example from elementsd
niftynei Jul 8, 2020
158a0f7
configure: wouldn't compile MAP_ANON on Ubuntu 20.04 LTS
niftynei Jul 2, 2020
d04bc33
transaction: expose wally_tx_output_clone
niftynei Jul 8, 2020
21f2c1f
psbt: clone passed in tx_output, makes us pset compatible
niftynei Jul 8, 2020
e9e095f
psbt: Always allow identification of elements psets
jgriffiths Jul 9, 2020
5b83e31
psbt: Update docs
jgriffiths Jul 9, 2020
c182992
gitignore: Ignore swp files
jgriffiths Jul 9, 2020
161e5cc
psbt: Move test data file to the common data file location
jgriffiths Jul 9, 2020
f1fa4b6
readme: add easier to skim notes for running the tests + formatter
niftynei May 29, 2020
376f232
psbt: Replace asserts with error returns
jgriffiths Jul 9, 2020
acdc40c
tests: enable non swig elements tests even when swig not enabled
niftynei Jul 7, 2020
b6e2920
psbt: Avoid magic numbers
jgriffiths Jul 9, 2020
e46ea79
transaction: Generalise replace_script to replace_bytes
jgriffiths Jul 9, 2020
3d3ab8e
psbt: Add helpers to simplify pubkey length checks
jgriffiths Jul 9, 2020
abcf7d4
psbt: Use replace_bytes to implement elements outputs setters
jgriffiths Jul 9, 2020
fdff995
tests: Use wally_free_string to free wally allocated string
jgriffiths Jul 9, 2020
dd35068
psbt: Fix leak in clone_unknowns_map
jgriffiths Jul 9, 2020
8ed09e5
psbt: share code to set the unknown map member in inputs and outputs
jgriffiths Jul 9, 2020
5b835cf
psbt: remove redundant checks before clear_and_free
jgriffiths Jul 9, 2020
bdd087b
psbt: Use replace_bytes to implement elements inputs setters
jgriffiths Jul 9, 2020
6bd19a8
psbt: merge replace_unknowns with clone_unknowns_map
jgriffiths Jul 9, 2020
a722cbd
psbt: Share keypath setting code like the updated unknowns code
jgriffiths Jul 9, 2020
33d2807
psbt: Don't leak peg_in_tx when setting it on inputs
jgriffiths Jul 9, 2020
2f42da2
psbt: Share partial sigs setting code like the updated unknowns code
jgriffiths Jul 9, 2020
679c876
psbt: psbt_input_set_final_witness: Add checks, allow NULL witness
jgriffiths Jul 9, 2020
5ce62dd
psbt: psbt_input_set_non_witness_utxo: Add input check
jgriffiths Jul 9, 2020
422f452
psbt: Share code to grow array members
jgriffiths Jul 9, 2020
f8f9310
psbt: add_new_keypath: Check parameters, clear on failure
jgriffiths Jul 9, 2020
8950a6a
psbt: add_new_partial_sig: Check parameters, clear on failure, fix co…
jgriffiths Jul 9, 2020
4991ee1
psbt: add_new_unknown: Check parameters, don't leak on failure
jgriffiths Jul 9, 2020
12ba10e
psbt: Rename some psbt functions to follow library standards
jgriffiths Jul 10, 2020
1375e09
psbt: final input/output review updates
jgriffiths Jul 10, 2020
d59b4a9
psbt: Only copy magic if psbt allocation succeeds
jgriffiths Jul 10, 2020
dfd5097
internal: Implement an internal calloc to simplify code
jgriffiths Jul 10, 2020
1d615a6
psbt: set_global_tx: Don't leak inputs if output allocation fails
jgriffiths Jul 10, 2020
7d8ac1b
psbt: Remove redundant pre-iteration of data when deserializing
jgriffiths Jul 10, 2020
14ec80b
psbt: optimise to avoid cloning the parsed global tx
jgriffiths Jul 10, 2020
842e0f2
psbt: psbt_to_bytes: Follow the library convention for too short buffers
jgriffiths Jul 11, 2020
a5e7f47
docs: Add docs for return codes and variable output buffers
jgriffiths Jul 11, 2020
854df83
psbt: Standardise param name in order to correct doc generation
jgriffiths Jul 11, 2020
423d9d6
psbt: fix warnings building without elements support
jgriffiths Jul 11, 2020
7a7916f
Java: use consistent method prologues
jgriffiths Jul 11, 2020
e383d75
psbt: Clear decoded base64 data after unserialising
jgriffiths Jul 11, 2020
f1f70d9
psbt: Clean up test, use wally for hex conversion
jgriffiths Jul 11, 2020
78409c7
psbt: constify psbt function parameters
jgriffiths Jul 12, 2020
44fee6c
psbt: Don't use C++ stdlib types for parameter names
jgriffiths Jul 12, 2020
5f1b62b
psbt: Use the same parameter names as other calls for consistency
jgriffiths Jul 12, 2020
bbcc4f8
psbt: Expose functions to C++
jgriffiths Jul 12, 2020
ef20e84
psbt: Add flags to serialisation calls for future use
jgriffiths Jul 12, 2020
f7303ef
pset: quick hack to create elements tx hash for signing
jgriffiths Jul 13, 2020
55ca566
psbt: Add find functions for psbt map types
jgriffiths Jul 13, 2020
ae83283
psbt: ignore duplicate keys when adding to maps
jgriffiths Jul 13, 2020
49b7027
psbt: Use find to prevent dupes when reading, add unknowns check
jgriffiths Jul 13, 2020
4933da1
psbt: Use find to check for existing input signature when signing
jgriffiths Jul 13, 2020
339a970
psbt: Use find to match keypaths when signing
jgriffiths Jul 13, 2020
5f71525
psbt: Change psbt_combine to just combine two psbts together.
jgriffiths Jul 13, 2020
f538834
psbt: Remove duplicated code around merging unknown maps
jgriffiths Jul 13, 2020
c52d034
psbt: Remove duplicated code around merging keypath maps
jgriffiths Jul 13, 2020
de0b08e
psbt: Add pubkeys with the correct length
jgriffiths Jul 13, 2020
58f381c
psbt: simplify push_psbt_key_with_pubkey
jgriffiths Jul 13, 2020
cbd800b
psbt: Add elements support for psbt_combine, clean up
jgriffiths Jul 13, 2020
1527796
psbt: Allow clearing value and struct members of psbt inputs/outputs
jgriffiths Jul 13, 2020
5b723ca
Revert "elements: don't fail silently if the buffer is too small"
jgriffiths Jul 14, 2020
fe3ac1d
elements: Document elements_pegout_script_from_bytes change
jgriffiths Jul 14, 2020
2a26b05
elements: asset_pak_whitelistproof: Update and use correct return sem…
jgriffiths Jul 14, 2020
da87f5c
Add security issue reporting information
jgriffiths Dec 7, 2018
e109ac3
elements: make wally_is_elements_build take a size_t output
jgriffiths Jul 14, 2020
e372dc7
docs: Document asset_unblind_with_nonce
jgriffiths Jul 14, 2020
22abab9
python: Add a script to auto-generate the CFFI function list
jgriffiths Jul 14, 2020
57eddc5
python: Update the CFFI test wrapper
jgriffiths Jul 14, 2020
92bfd30
script: Fix multisig limit for scriptpubkeys/scriptsigs to 15, update…
jgriffiths Jul 16, 2020
213ef33
psbt: check script length as well as script when deserialising
jgriffiths Jul 16, 2020
fcbfc65
fix: mnemonic_w memory leak. and wordlist init/free memory leak.
k-matsuzawa Mar 10, 2020
d922969
pullpush: Address review nit
jgriffiths Jul 19, 2020
d8461a1
c++: Update wally.hpp with missing/incorrect functions
jgriffiths Jul 16, 2020
2cc28c1
script: Update function layout to match others
jgriffiths Jul 20, 2020
0325ab9
pullpush: remove unused LE16 functions
jgriffiths Jul 20, 2020
a37ef06
tests: Remove internal header from elements C test
jgriffiths Jul 20, 2020
2d9b761
psbt: create empty inputs and outputs when setting the global tx
jgriffiths Jul 20, 2020
cab172e
transaction: Don't expose analyse_tx now that psbt doesnt need it
jgriffiths Jul 20, 2020
5c9d805
transaction: Make clear_and_free available and use it internally
jgriffiths Jul 20, 2020
af29018
transaction: Expose tx_witness_stack_clone
jgriffiths Jul 20, 2020
d10846b
general: Use wally_calloc in more places to simplify code
jgriffiths Jul 20, 2020
e1aa193
psbt: Initial SWIG python wrapper implementation
jgriffiths Jul 20, 2020
c9ac89e
psbt: Add combining to psbt ctest for valgrind checking
jgriffiths Jul 20, 2020
942c009
psbt: remove unused pull_psbt_key_start function
jgriffiths Jul 20, 2020
1abd2a0
tests: fix clang warning
jgriffiths Jul 20, 2020
71ffd97
psbt: Windows build fixes
jgriffiths Jul 20, 2020
384947f
psbt: Add non-elements swig setters, with tests
jgriffiths Jul 21, 2020
204419a
symmetric: Add missing symmetric header to install list
jgriffiths Jul 21, 2020
467165b
psbt: Remove input and output allocation and free functions
jgriffiths Jul 21, 2020
ee4f030
psbt: Don't expose psbt input/output direct setters to SWIG
jgriffiths Jul 21, 2020
d1ebc72
psbt: push pubkey keys directly
jgriffiths Jul 22, 2020
c1ea199
psbt: Add a FIXME for adding validation to getters/setters
jgriffiths Jul 22, 2020
d74863e
psbt: Take the version in psbt_init_alloc for future compatibility
jgriffiths Jul 22, 2020
36ed6c8
psbt: use BIP32_KEY_FINGERPRINT_LEN per review
jgriffiths Jul 22, 2020
b9b1897
psbt: rename elements input/output getters/setters
jgriffiths Jul 22, 2020
1b61666
psbt: Update CHANGES.md to a simpler message for the next release
jgriffiths Jul 22, 2020
6a9b309
transaction: update docs for allowed value lengths
jgriffiths Jul 22, 2020
87e45e0
elements: use the correct constant for blinding factor lengths
jgriffiths Jul 22, 2020
24e4db9
psbt: Expose output setters to python, with tests
jgriffiths Jul 22, 2020
d20c66b
psbt: Simplify input/output pull logic
jgriffiths Jul 22, 2020
846a4d8
psbt: cleanup code for and validate field lengths when reading in psbts
jgriffiths Jul 22, 2020
f6ef719
psbt: Expose input setters to python, with tests
jgriffiths Jul 23, 2020
b396b85
psbt: Allow the caller to control sig grinding when signing
jgriffiths Jul 23, 2020
c9c45b6
psbt: Don't normalise signatures after signing
jgriffiths Jul 23, 2020
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
46 changes: 22 additions & 24 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
# Changes

## Version 0.7.9

- wally_is_elements_build now takes a size_t output instead of uin64_t.

- 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.

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

- Almost all functions comprising the PSBT interface have changed name,
arguments, semantics or all three. Users can consider the new interface final.

## 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
Comment thread
jgriffiths marked this conversation as resolved.
- 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