Skip to content

Commit 5a54064

Browse files
Uniffi dart integration test (#3)
* Initialize payjoin_dart * Add initial dart tests to prove out the utilization of uniffi-dart Minimizing the import I was able to get rid of all errors introduced by uniffi-dart and built a successful uniffi binding. These tests are just the barebones of what is built but proves out that we have some functioning bindings when creating a minimal build. * Add persistence unit tests * Specify the language to create bindings at the bindings creation step I've included support for including --language args beyond those explicitly supported in uniffi-rs with a match block that passes the chosen language to chose what binding cargo package to use. * Add dart bindings generation scripts * Add dart github workflow * [WIP] integration tests * [WIP] almost done * determine proposal return type * fix type defs * spellcheck * add http dep * fix Record constructors The constructors are public as of uniffi-dart db4eed7 * Fix directory arg the FFI create_session method takes a String, not a URL. * remove null placeholders uniffi-dart empty sequence handling was fixed in 8536f95 * fix some null pointers * state machine function return types * use asString() for URLs toString() isn't defined due to Display trait not yet implemented in uniffi-dart, so use asString() instead which is defined. * Fix build_sweep_psbt Pass the "psbt" value as parameter, and return a String instead of a bitcoin.Psbt * s/Uri.https/Uri/parse Uri.https() expects only the host portion, not a complete URL. Use Uri.parse() instead. * Fix process_receiver_proposal * Fix response bytes * Fix RPC calls * Fix test assertions --------- Co-authored-by: spacebear <git@spacebear.dev>
1 parent 8839e52 commit 5a54064

2 files changed

Lines changed: 408 additions & 0 deletions

File tree

payjoin-ffi/dart/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ dependencies:
99
ffi: ^2.1.4
1010
dev_dependencies:
1111
test: ^1.26.2
12+
http: ^1.4.0

0 commit comments

Comments
 (0)