ldk-java
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

3 years agoFix optimized build
Matt Corallo [Sat, 24 Oct 2020 00:55:44 +0000 (20:55 -0400)]
Fix optimized build

3 years agoWrite tuple getters (and test them, exposing memory leak)
Matt Corallo [Fri, 23 Oct 2020 21:04:45 +0000 (17:04 -0400)]
Write tuple getters (and test them, exposing memory leak)

3 years agoAdd ability to get serialized transaction bytes
Matt Corallo [Fri, 23 Oct 2020 20:55:57 +0000 (16:55 -0400)]
Add ability to get serialized transaction bytes

3 years agoExpand the human object test somewhat
Matt Corallo [Fri, 23 Oct 2020 20:29:02 +0000 (16:29 -0400)]
Expand the human object test somewhat

3 years agoEnable more C build-time warnings
Matt Corallo [Fri, 23 Oct 2020 20:28:47 +0000 (16:28 -0400)]
Enable more C build-time warnings

3 years agoFinish compacting giant type-conversion-strings if tree, updating to new upstream...
Matt Corallo [Fri, 23 Oct 2020 00:28:10 +0000 (20:28 -0400)]
Finish compacting giant type-conversion-strings if tree, updating to new upstream and fixing bugs on the way

3 years agoCompact giant type-conversion-strings if tree somewhat
Matt Corallo [Thu, 22 Oct 2020 23:57:18 +0000 (19:57 -0400)]
Compact giant type-conversion-strings if tree somewhat

3 years agoSkip fewer fn's, support trait-contained objects
Matt Corallo [Thu, 22 Oct 2020 21:33:42 +0000 (17:33 -0400)]
Skip fewer fn's, support trait-contained objects

3 years agoProvide human versions of trait interfaces, with a bunch of fixes to make it work
Matt Corallo [Thu, 22 Oct 2020 04:09:49 +0000 (00:09 -0400)]
Provide human versions of trait interfaces, with a bunch of fixes to make it work

Sadly gave up trying to get returns to be sane, so now returning an
object from a trait implies that object is now unusable :(.

3 years agoRely on pointers even less in HumanObject testing
Matt Corallo [Wed, 21 Oct 2020 18:15:45 +0000 (14:15 -0400)]
Rely on pointers even less in HumanObject testing

3 years agoExpose human functions that use Result objects
Matt Corallo [Wed, 21 Oct 2020 18:09:56 +0000 (14:09 -0400)]
Expose human functions that use Result objects

3 years agoProperly free Vec<u8>s after conversion to byte[].
Matt Corallo [Wed, 21 Oct 2020 18:08:50 +0000 (14:08 -0400)]
Properly free Vec<u8>s after conversion to byte[].

This fixes a memory leak in basically all of the *_write
serialization functions.

3 years agoMake complex enums more complete, track reference-or-ownership by callsite
Matt Corallo [Tue, 20 Oct 2020 19:27:34 +0000 (15:27 -0400)]
Make complex enums more complete, track reference-or-ownership by callsite

3 years agoRewrite the world, with several interdependant changes (but several still WIP)
Matt Corallo [Tue, 20 Oct 2020 01:45:23 +0000 (01:45 +0000)]
Rewrite the world, with several interdependant changes (but several still WIP)

3 years agoProperly set CVec_u8Z to a byte[] which adds a ton more fn's
Matt Corallo [Thu, 15 Oct 2020 21:57:49 +0000 (17:57 -0400)]
Properly set CVec_u8Z to a byte[] which adds a ton more fn's

3 years agoFigure out java human types conversion stuff when doing all conv
Matt Corallo [Thu, 15 Oct 2020 20:58:18 +0000 (16:58 -0400)]
Figure out java human types conversion stuff when doing all conv

3 years agoSplit get_inner into get_ok/_err so that we can map the type being returned
Matt Corallo [Thu, 15 Oct 2020 00:01:35 +0000 (20:01 -0400)]
Split get_inner into get_ok/_err so that we can map the type being returned

3 years agoUse AutoCloseable for structs named Locked*
Matt Corallo [Wed, 14 Oct 2020 00:06:11 +0000 (20:06 -0400)]
Use AutoCloseable for structs named Locked*

3 years agoexplode to constructor args when we cant clone but need to
Matt Corallo [Tue, 13 Oct 2020 23:47:13 +0000 (19:47 -0400)]
explode to constructor args when we cant clone but need to

3 years agoDrop the _call insertion
Matt Corallo [Tue, 13 Oct 2020 20:25:37 +0000 (16:25 -0400)]
Drop the _call insertion

3 years agoSkip methods we can't use anyway
Matt Corallo [Tue, 13 Oct 2020 20:23:59 +0000 (16:23 -0400)]
Skip methods we can't use anyway

3 years agoUpdate to support None
Matt Corallo [Tue, 13 Oct 2020 19:06:44 +0000 (15:06 -0400)]
Update to support None

3 years agoConvert slices - requires some machinery to call Release, but otherwise not bad
Matt Corallo [Tue, 13 Oct 2020 18:00:26 +0000 (14:00 -0400)]
Convert slices - requires some machinery to call Release, but otherwise not bad

3 years agoClean up assertions, new Clone impls, ThreeBytes
Matt Corallo [Mon, 12 Oct 2020 22:13:01 +0000 (18:13 -0400)]
Clean up assertions, new Clone impls, ThreeBytes

3 years agoExpose signatures as byte[], check array lengths in C.
Matt Corallo [Mon, 12 Oct 2020 21:32:11 +0000 (17:32 -0400)]
Expose signatures as byte[], check array lengths in C.

3 years agoExpose SecretKey as byte[32], expose trait call fns in human structs
Matt Corallo [Mon, 12 Oct 2020 21:20:23 +0000 (17:20 -0400)]
Expose SecretKey as byte[32], expose trait call fns in human structs

3 years agoCreate structs and traits that are (a bit) more human-friendly!
Matt Corallo [Mon, 12 Oct 2020 20:56:10 +0000 (16:56 -0400)]
Create structs and traits that are (a bit) more human-friendly!

3 years agoDrop stale jni header files
Matt Corallo [Mon, 12 Oct 2020 20:53:44 +0000 (16:53 -0400)]
Drop stale jni header files

3 years agoAgressively clone when passing to rust
Matt Corallo [Mon, 12 Oct 2020 20:50:00 +0000 (16:50 -0400)]
Agressively clone when passing to rust

3 years agoNew upstream bindings that generate _clone fns
Matt Corallo [Mon, 12 Oct 2020 20:47:00 +0000 (16:47 -0400)]
New upstream bindings that generate _clone fns

3 years agoUse weak references to JCalls objects.
Matt Corallo [Mon, 12 Oct 2020 20:51:16 +0000 (16:51 -0400)]
Use weak references to JCalls objects.

This fixes a future usability issue where its easy to create a
lambda which ends up referencing a high-level struct's owning class
and then have the high-level struct hold a global reference to the
lambda, creating a reference cycle that java can't see into.

instead, we require the user hold a reference to the lambda as
long as the parent exists, something which we can automate on the
java bindings end.

3 years agoSend a payment!
Matt Corallo [Sun, 11 Oct 2020 01:11:59 +0000 (21:11 -0400)]
Send a payment!

3 years agoConvert pubkeys to byte arrays, fix assertions, fix result inner fetch, fix java...
Matt Corallo [Sun, 11 Oct 2020 01:00:04 +0000 (21:00 -0400)]
Convert pubkeys to byte arrays, fix assertions, fix result inner fetch, fix java garbage

3 years agoFully open and confirm a channel in Java!
Matt Corallo [Sat, 10 Oct 2020 22:49:51 +0000 (18:49 -0400)]
Fully open and confirm a channel in Java!

3 years agoA bunch of updates:
Matt Corallo [Sat, 10 Oct 2020 22:21:53 +0000 (18:21 -0400)]
A bunch of updates:

 * Switch to passing inner pointers across JNI, not pointers to
   opaque structs. This is more effecient, and the low bit is always
   0.
 * Use bitcoinj to create a block in test and connect it (!)

3 years agoIntercept all malloc/free, even in Rust!
Matt Corallo [Sat, 10 Oct 2020 22:05:33 +0000 (18:05 -0400)]
Intercept all malloc/free, even in Rust!

3 years agoMap tuples and ThirtyTwoBytes into array.
Matt Corallo [Fri, 9 Oct 2020 22:22:50 +0000 (18:22 -0400)]
Map tuples and ThirtyTwoBytes into array.

3 years agoMove enum mapping to functions
Matt Corallo [Thu, 8 Oct 2020 21:54:22 +0000 (17:54 -0400)]
Move enum mapping to functions

3 years agoConvert LDKThirtyTwoBytes to byte[32] instead of taking a ptr
Matt Corallo [Thu, 8 Oct 2020 20:51:09 +0000 (16:51 -0400)]
Convert LDKThirtyTwoBytes to byte[32] instead of taking a ptr

3 years agoMore statics and limit exports to Java methods at link
Matt Corallo [Thu, 8 Oct 2020 17:05:38 +0000 (13:05 -0400)]
More statics and limit exports to Java methods at link

3 years agoMap Rust enums with inner fields
Matt Corallo [Thu, 8 Oct 2020 02:10:11 +0000 (22:10 -0400)]
Map Rust enums with inner fields

3 years agoCache enum fields
Matt Corallo [Wed, 7 Oct 2020 23:55:37 +0000 (19:55 -0400)]
Cache enum fields

3 years agoMove enums into their own (non-impl) folder
Matt Corallo [Wed, 7 Oct 2020 21:39:05 +0000 (17:39 -0400)]
Move enums into their own (non-impl) folder

3 years agoAdd ability to fetch all Vec details in one call.
Matt Corallo [Wed, 7 Oct 2020 20:42:49 +0000 (16:42 -0400)]
Add ability to fetch all Vec details in one call.

3 years agoGo all the way through to channel creation in PeerTest
Matt Corallo [Tue, 6 Oct 2020 23:25:17 +0000 (19:25 -0400)]
Go all the way through to channel creation in PeerTest

3 years agoAdd constructors for None opaque struct mappings
Matt Corallo [Tue, 6 Oct 2020 23:21:38 +0000 (19:21 -0400)]
Add constructors for None opaque struct mappings

3 years agoUpdate PeerTest to test most of the new stuff
Matt Corallo [Tue, 6 Oct 2020 22:43:22 +0000 (18:43 -0400)]
Update PeerTest to test most of the new stuff

3 years agoMake slice-vec-len generic
Matt Corallo [Tue, 6 Oct 2020 22:42:38 +0000 (18:42 -0400)]
Make slice-vec-len generic

3 years agoMacro-ize assert to handle side-effects, fix JavaVM access, util fns
Matt Corallo [Tue, 6 Oct 2020 21:07:12 +0000 (17:07 -0400)]
Macro-ize assert to handle side-effects, fix JavaVM access, util fns

3 years agoAdd missing JCalls parameter conversion
Matt Corallo [Tue, 6 Oct 2020 19:46:49 +0000 (15:46 -0400)]
Add missing JCalls parameter conversion

3 years agoDont auto-free slices passed to Rust
Matt Corallo [Tue, 6 Oct 2020 17:35:27 +0000 (13:35 -0400)]
Dont auto-free slices passed to Rust