ldk-java
3 years agoUpdate bindings v0.0.1
Matt Corallo [Tue, 2 Feb 2021 22:45:37 +0000 (17:45 -0500)]
Update bindings

3 years agoHandle `uintptr_t`s better in JNI bindings
Matt Corallo [Wed, 3 Feb 2021 01:28:01 +0000 (20:28 -0500)]
Handle `uintptr_t`s better in JNI bindings

This fixes bugs building for 32-bit platforms as the JNI functions
would expect `uintptr_t`s (32-bit) but Java expects a long (64-bit).
We can't just replace them all with int64_ts as we need to have
`uintptr_t`s still in _jcalls functions which we pass function
pointers to C.

3 years agoBe explicit about C return type returning pointers to Java
Matt Corallo [Tue, 2 Feb 2021 22:45:11 +0000 (17:45 -0500)]
Be explicit about C return type returning pointers to Java

3 years agoAdd workarounds for Android JNI quirks
Matt Corallo [Tue, 2 Feb 2021 22:37:06 +0000 (17:37 -0500)]
Add workarounds for Android JNI quirks

3 years agobindings updates
Matt Corallo [Tue, 2 Feb 2021 03:02:01 +0000 (22:02 -0500)]
bindings updates

3 years agoProperly free C tuples when the inner fields are dropped
Matt Corallo [Tue, 2 Feb 2021 02:18:29 +0000 (21:18 -0500)]
Properly free C tuples when the inner fields are dropped

Previously for the full test suite (incl 64 HumanObjectPeerTest runs):
 `991 allocations remained for 32165 bytes.`
After for the full test suite (incl 64 HumanObjectPeerTest runs):
 `179 allocations remained for 5369 bytes.`

3 years agoSmall tweaks to NioPeerHandler
Matt Corallo [Tue, 2 Feb 2021 01:26:00 +0000 (20:26 -0500)]
Small tweaks to NioPeerHandler

3 years agoAdd basic README describing status
Matt Corallo [Mon, 1 Feb 2021 23:05:18 +0000 (18:05 -0500)]
Add basic README describing status

3 years agoBindings updates for latest upstream, check in .so
Matt Corallo [Mon, 1 Feb 2021 21:56:18 +0000 (16:56 -0500)]
Bindings updates for latest upstream, check in .so

3 years agoAdd NioPeerHandler and associated test
Matt Corallo [Mon, 1 Feb 2021 05:40:15 +0000 (00:40 -0500)]
Add NioPeerHandler and associated test

3 years agoBindings updates
Matt Corallo [Sat, 30 Jan 2021 04:25:00 +0000 (23:25 -0500)]
Bindings updates

3 years agoUpdate for upstream with new -lm requirement for debug
Matt Corallo [Mon, 1 Feb 2021 05:36:58 +0000 (00:36 -0500)]
Update for upstream with new -lm requirement for debug

3 years agoFix missing-ptrs_to error by working around it in test
Matt Corallo [Mon, 1 Feb 2021 21:01:49 +0000 (16:01 -0500)]
Fix missing-ptrs_to error by working around it in test

3 years agoUpdate HumanObjectPeerTest for upstream changes, to reload nodes
Matt Corallo [Sat, 30 Jan 2021 23:09:11 +0000 (18:09 -0500)]
Update HumanObjectPeerTest for upstream changes, to reload nodes

3 years agoAdd additional reference tags, drop some now-redundant clones
Matt Corallo [Mon, 1 Feb 2021 00:55:07 +0000 (19:55 -0500)]
Add additional reference tags, drop some now-redundant clones

3 years agoWipe Java objects when we move them into rust (only for features)
Matt Corallo [Mon, 1 Feb 2021 00:36:46 +0000 (19:36 -0500)]
Wipe Java objects when we move them into rust (only for features)

3 years agoVarious straightforward cleanups
Matt Corallo [Mon, 1 Feb 2021 00:36:00 +0000 (19:36 -0500)]
Various straightforward cleanups

3 years agoTrack byte count in leak detection in java debug mode
Matt Corallo [Sun, 31 Jan 2021 19:02:55 +0000 (14:02 -0500)]
Track byte count in leak detection in java debug mode

3 years agoStandardize warning clone comment
Matt Corallo [Sat, 30 Jan 2021 23:07:41 +0000 (18:07 -0500)]
Standardize warning clone comment

3 years agoAdd util methods file for methods not associated with a known struct
Matt Corallo [Sat, 30 Jan 2021 04:23:03 +0000 (23:23 -0500)]
Add util methods file for methods not associated with a known struct

3 years agoAdd a reference low bit for non-opaque types to tag dont-free refs
Matt Corallo [Sat, 30 Jan 2021 04:21:27 +0000 (23:21 -0500)]
Add a reference low bit for non-opaque types to tag dont-free refs

3 years agoHandle clones upstream instead of creating clone fns
Matt Corallo [Sat, 30 Jan 2021 04:11:06 +0000 (23:11 -0500)]
Handle clones upstream instead of creating clone fns

3 years agoFix leak in manual memory management in PeerTest
Matt Corallo [Thu, 28 Jan 2021 23:23:11 +0000 (18:23 -0500)]
Fix leak in manual memory management in PeerTest

3 years agoBindings updates
Matt Corallo [Thu, 28 Jan 2021 23:12:43 +0000 (18:12 -0500)]
Bindings updates

3 years agoUpdate TS strings and commit (broken) test updates
Matt Corallo [Thu, 28 Jan 2021 23:11:51 +0000 (18:11 -0500)]
Update TS strings and commit (broken) test updates

3 years agoDirty hack to avoid freeing TxOuts inside of Tuples
Matt Corallo [Thu, 28 Jan 2021 23:10:58 +0000 (18:10 -0500)]
Dirty hack to avoid freeing TxOuts inside of Tuples

3 years agoClone objects returned from jcalls before returning to rust
Matt Corallo [Thu, 28 Jan 2021 23:10:23 +0000 (18:10 -0500)]
Clone objects returned from jcalls before returning to rust

3 years agoAdd test HTML file demonstrating linking and calling
Matt Corallo [Thu, 28 Jan 2021 17:03:41 +0000 (12:03 -0500)]
Add test HTML file demonstrating linking and calling

Import fixes from Arik

3 years agoUpdate bindings (for new upstream based on updated rust-bitcoin)
Matt Corallo [Thu, 28 Jan 2021 04:34:00 +0000 (23:34 -0500)]
Update bindings (for new upstream based on updated rust-bitcoin)

3 years agoTurn on warnings on typescript builds again
Matt Corallo [Thu, 28 Jan 2021 04:33:34 +0000 (23:33 -0500)]
Turn on warnings on typescript builds again

3 years agoBindings updates
Matt Corallo [Thu, 28 Jan 2021 00:55:38 +0000 (19:55 -0500)]
Bindings updates

3 years agoDrop stale Java call semantic bits from TS bindings
Matt Corallo [Thu, 28 Jan 2021 03:07:52 +0000 (22:07 -0500)]
Drop stale Java call semantic bits from TS bindings

3 years agoRedo arrays/strings in TS to be uint32_ts, call trait functions
Matt Corallo [Thu, 28 Jan 2021 00:54:37 +0000 (19:54 -0500)]
Redo arrays/strings in TS to be uint32_ts, call trait functions

3 years agore-fix whitespace bugs
Matt Corallo [Wed, 27 Jan 2021 23:13:42 +0000 (18:13 -0500)]
re-fix whitespace bugs

3 years agoRe-fix whitespace errors
Matt Corallo [Wed, 27 Jan 2021 23:08:23 +0000 (18:08 -0500)]
Re-fix whitespace errors

3 years agomerge Matt's array codec mechanism
Arik Sosman [Wed, 27 Jan 2021 22:58:18 +0000 (14:58 -0800)]
merge Matt's array codec mechanism

3 years agoMerge branch 'master' of https://git.bitcoin.ninja/ldk-java into typescript_conversion
Arik Sosman [Wed, 27 Jan 2021 22:48:01 +0000 (14:48 -0800)]
Merge branch 'master' of https://git.bitcoin.ninja/ldk-java into typescript_conversion

\ 1 Conflicts:
\ 1 typescript_strings.py

3 years agomake typescript bindings rely on wasm type codec methods
Arik Sosman [Wed, 27 Jan 2021 09:21:17 +0000 (01:21 -0800)]
make typescript bindings rely on wasm type codec methods

3 years agoAdd js-wasm.h from arik's repo
Matt Corallo [Wed, 27 Jan 2021 03:21:14 +0000 (22:21 -0500)]
Add js-wasm.h from arik's repo

3 years agodon't return values for void types
Arik Sosman [Wed, 27 Jan 2021 19:18:23 +0000 (11:18 -0800)]
don't return values for void types

3 years agoenable async wasm initialization
Arik Sosman [Wed, 27 Jan 2021 18:36:26 +0000 (10:36 -0800)]
enable async wasm initialization

3 years agomake typescript bindings rely on wasm type codec methods
Arik Sosman [Wed, 27 Jan 2021 09:21:17 +0000 (01:21 -0800)]
make typescript bindings rely on wasm type codec methods

3 years agoBindings updates
Matt Corallo [Wed, 27 Jan 2021 03:21:06 +0000 (22:21 -0500)]
Bindings updates

3 years agoMove TS Arrays to a single pointer
Matt Corallo [Wed, 27 Jan 2021 03:20:52 +0000 (22:20 -0500)]
Move TS Arrays to a single pointer

3 years agoBindings updates
Matt Corallo [Mon, 25 Jan 2021 21:03:23 +0000 (16:03 -0500)]
Bindings updates

3 years agoDo array conv in per-lang files, handle object arrays in TS
Matt Corallo [Tue, 26 Jan 2021 21:55:21 +0000 (16:55 -0500)]
Do array conv in per-lang files, handle object arrays in TS

3 years agoHandle uintptr_t slightly better in C conversion
Matt Corallo [Mon, 25 Jan 2021 22:45:22 +0000 (17:45 -0500)]
Handle uintptr_t slightly better in C conversion

3 years agoMove native string conversion to per-lang files
Matt Corallo [Mon, 25 Jan 2021 22:22:21 +0000 (17:22 -0500)]
Move native string conversion to per-lang files

3 years agoMore TS C trait conversion + drop unused get_obj_from_jcalls
Matt Corallo [Mon, 25 Jan 2021 22:03:53 +0000 (17:03 -0500)]
More TS C trait conversion + drop unused get_obj_from_jcalls

3 years agoTypescript C build and string updates
Matt Corallo [Mon, 25 Jan 2021 21:50:11 +0000 (16:50 -0500)]
Typescript C build and string updates

3 years agoRemove commented-out code
Matt Corallo [Mon, 25 Jan 2021 18:15:11 +0000 (13:15 -0500)]
Remove commented-out code

3 years agoUnify naming of type lookups in c_type_map dict
Matt Corallo [Mon, 25 Jan 2021 18:10:25 +0000 (13:10 -0500)]
Unify naming of type lookups in c_type_map dict

3 years agoFix some whitespace bugs
Matt Corallo [Mon, 25 Jan 2021 18:08:21 +0000 (13:08 -0500)]
Fix some whitespace bugs

3 years agoFix short, push trait struct refcnt increment down to lang
Matt Corallo [Wed, 13 Jan 2021 04:48:24 +0000 (23:48 -0500)]
Fix short, push trait struct refcnt increment down to lang

3 years agomove util.ts file to ts directory
Arik Sosman [Mon, 25 Jan 2021 18:16:34 +0000 (10:16 -0800)]
move util.ts file to ts directory

3 years agofix pointer types in Typescript
Arik Sosman [Tue, 19 Jan 2021 23:16:58 +0000 (15:16 -0800)]
fix pointer types in Typescript

3 years agomap opaque struct header
Arik Sosman [Sat, 16 Jan 2021 11:46:13 +0000 (03:46 -0800)]
map opaque struct header

3 years agoextract map_type functionality into separate file (it took up too much space)
Arik Sosman [Sat, 16 Jan 2021 11:17:59 +0000 (03:17 -0800)]
extract map_type functionality into separate file (it took up too much space)

3 years agomake target argument optional for typescript inputs (undocumented)
Arik Sosman [Sat, 16 Jan 2021 10:04:19 +0000 (02:04 -0800)]
make target argument optional for typescript inputs (undocumented)

3 years agoadd node wasm import to bindings
Arik Sosman [Sat, 16 Jan 2021 09:48:29 +0000 (01:48 -0800)]
add node wasm import to bindings

3 years agoclean up bindings trait output
Arik Sosman [Sat, 16 Jan 2021 08:41:17 +0000 (00:41 -0800)]
clean up bindings trait output

3 years agouse templates for human type conversions
Arik Sosman [Sat, 16 Jan 2021 01:25:22 +0000 (17:25 -0800)]
use templates for human type conversions

3 years agofix argument/type order in interface method override declaration
Arik Sosman [Fri, 15 Jan 2021 00:02:36 +0000 (16:02 -0800)]
fix argument/type order in interface method override declaration

3 years agoinch towards more map_trait cleanup for Typescript
Arik Sosman [Thu, 14 Jan 2021 18:52:11 +0000 (10:52 -0800)]
inch towards more map_trait cleanup for Typescript

3 years agoadd typescript tuple generics
Arik Sosman [Thu, 14 Jan 2021 11:17:14 +0000 (03:17 -0800)]
add typescript tuple generics

3 years agoexpand c type conversions to other integer array types
Arik Sosman [Thu, 14 Jan 2021 11:14:32 +0000 (03:14 -0800)]
expand c type conversions to other integer array types

3 years agoinitiate language-dependent type mappings from C
Arik Sosman [Thu, 14 Jan 2021 11:10:01 +0000 (03:10 -0800)]
initiate language-dependent type mappings from C

3 years agooverride CommonBase file, and make private constructor work for mapped traits
Arik Sosman [Wed, 13 Jan 2021 10:43:04 +0000 (02:43 -0800)]
override CommonBase file, and make private constructor work for mapped traits

3 years agobindings updates
Matt Corallo [Wed, 13 Jan 2021 00:04:57 +0000 (19:04 -0500)]
bindings updates

3 years ago[double-free, with XXX] More conv for traits
Matt Corallo [Wed, 13 Jan 2021 00:04:24 +0000 (19:04 -0500)]
[double-free, with XXX] More conv for traits

3 years agoauto-generated bindings updates
Matt Corallo [Tue, 12 Jan 2021 19:19:25 +0000 (14:19 -0500)]
auto-generated bindings updates

3 years agoParse complex enum fields prior to per-language logic, drop java-isms in TS
Matt Corallo [Tue, 12 Jan 2021 19:18:55 +0000 (14:18 -0500)]
Parse complex enum fields prior to per-language logic, drop java-isms in TS

3 years agoTS bindings
Matt Corallo [Tue, 12 Jan 2021 16:56:00 +0000 (11:56 -0500)]
TS bindings

3 years agoFix file extension for typescript
Matt Corallo [Tue, 12 Jan 2021 16:58:35 +0000 (11:58 -0500)]
Fix file extension for typescript

3 years agoComplex enum mappings
Arik Sosman [Tue, 12 Jan 2021 16:43:06 +0000 (11:43 -0500)]
Complex enum mappings

3 years agoRevert "Somewhat redundant changes (new file_ext, arg parse, etc)" - this breaks...
Matt Corallo [Tue, 12 Jan 2021 16:53:32 +0000 (11:53 -0500)]
Revert "Somewhat redundant changes (new file_ext, arg parse, etc)" - this breaks genbindings.sh

This reverts commit ca0405752b09a0fb820d4be6f1e14a346614f21d.

3 years agoSomewhat redundant changes (new file_ext, arg parse, etc)
Arik Sosman [Tue, 12 Jan 2021 16:40:47 +0000 (11:40 -0500)]
Somewhat redundant changes (new file_ext, arg parse, etc)

3 years agoUse file_ext everywhere, common base/header for TS files
Arik Sosman [Tue, 12 Jan 2021 16:26:26 +0000 (11:26 -0500)]
Use file_ext everywhere, common base/header for TS files

3 years agoJava bindings updates with new generator, with no functional changes
Matt Corallo [Sun, 10 Jan 2021 01:46:04 +0000 (20:46 -0500)]
Java bindings updates with new generator, with no functional changes

3 years agoAdd TS bindings generation, with per-lang strings in their own file
Matt Corallo [Fri, 8 Jan 2021 20:05:57 +0000 (15:05 -0500)]
Add TS bindings generation, with per-lang strings in their own file

3 years agobindings updates
Matt Corallo [Sun, 10 Jan 2021 03:58:07 +0000 (22:58 -0500)]
bindings updates

3 years agoWalk back some of the clone updates, with comments to fix later
Matt Corallo [Fri, 8 Jan 2021 20:05:47 +0000 (15:05 -0500)]
Walk back some of the clone updates, with comments to fix later

3 years agoupdated bindings
Matt Corallo [Fri, 8 Jan 2021 05:24:32 +0000 (00:24 -0500)]
updated bindings

3 years agoRewrite clone handling to manually-define them for types, though almost unused
Matt Corallo [Fri, 8 Jan 2021 05:22:12 +0000 (00:22 -0500)]
Rewrite clone handling to manually-define them for types, though almost unused

3 years agoUpdated bindings
Matt Corallo [Fri, 8 Jan 2021 04:33:25 +0000 (23:33 -0500)]
Updated bindings

3 years agoupdate to new upstream
Matt Corallo [Fri, 8 Jan 2021 04:29:01 +0000 (23:29 -0500)]
update to new upstream

3 years agoFix write method generation w/ upstream changes
Matt Corallo [Tue, 27 Oct 2020 01:48:28 +0000 (21:48 -0400)]
Fix write method generation w/ upstream changes

3 years agoFix race in tests
Matt Corallo [Mon, 26 Oct 2020 01:56:02 +0000 (21:56 -0400)]
Fix race in tests

3 years agoOptionally use a ChainMonitor instead of custom Watch in testing
Matt Corallo [Sun, 25 Oct 2020 23:32:19 +0000 (19:32 -0400)]
Optionally use a ChainMonitor instead of custom Watch in testing

3 years agoclone traits before passing to jcalls and map to human types
Matt Corallo [Sun, 25 Oct 2020 23:06:15 +0000 (19:06 -0400)]
clone traits before passing to jcalls and map to human types

3 years agoUpdate Human object test to use SocketDescriptor traits (which worked the first time!)
Matt Corallo [Sun, 25 Oct 2020 16:26:56 +0000 (12:26 -0400)]
Update Human object test to use SocketDescriptor traits (which worked the first time!)

3 years agoFix returning traits in trait calls, move towards clone on return
Matt Corallo [Sun, 25 Oct 2020 04:36:05 +0000 (00:36 -0400)]
Fix returning traits in trait calls, move towards clone on return

3 years agoStop masking the owned bit on a freshly-cloned object
Matt Corallo [Sun, 25 Oct 2020 02:03:31 +0000 (22:03 -0400)]
Stop masking the owned bit on a freshly-cloned object

3 years agoMap Transactions as byte[] instead of trying to keep a ptr
Matt Corallo [Sun, 25 Oct 2020 01:43:44 +0000 (21:43 -0400)]
Map Transactions as byte[] instead of trying to keep a ptr

3 years agoRework holds_ref and clone logic somewhat
Matt Corallo [Sat, 24 Oct 2020 23:53:50 +0000 (19:53 -0400)]
Rework holds_ref and clone logic somewhat

3 years agoFix tests for new API
Matt Corallo [Sat, 24 Oct 2020 23:55:57 +0000 (19:55 -0400)]
Fix tests for new API

3 years agoProperly handle java refs in traits returning traits
Matt Corallo [Sat, 24 Oct 2020 22:11:18 +0000 (18:11 -0400)]
Properly handle java refs in traits returning traits

3 years agoClone before passing to java + new clone upstream
Matt Corallo [Sat, 24 Oct 2020 22:10:19 +0000 (18:10 -0400)]
Clone before passing to java + new clone upstream

3 years agoFix opaque struct ptr ret-conv, used in jcall arg passing
Matt Corallo [Sat, 24 Oct 2020 20:53:04 +0000 (16:53 -0400)]
Fix opaque struct ptr ret-conv, used in jcall arg passing

3 years agoFix ObjectArray (array-of-arrays) creation
Matt Corallo [Sat, 24 Oct 2020 01:45:16 +0000 (21:45 -0400)]
Fix ObjectArray (array-of-arrays) creation