Commit fbb2e9a
committed
feat(wip): uniffi wrapper for payment preimage
In a bid to create a uniffi wrapper for PaymentPreimage,
we also create bindings-specific variants for the ffg types:
LightningBalance, PaymentKind, and Event, all of which have
fields that hold object/interface instances - PaymentPreimage,
ConfirmationStatus and ClosureReason.
We implement type conversion for the types created.
Unfortunately the build does not compile.
According to the uniffi docs:
"When you want to ... store object instances as fields in records,
the underlying Rust code will need to work with Arc<T> directly,
to ensure that the code behaves in the way that UniFFI expects."
Arc-ing the fields that hold PaymentPreimage, ConfirmationStatus,
& ClosureReason is not sufficient to circumvent the error
associated with objects not being supported in enum variants.1 parent 45a1a73 commit fbb2e9a
2 files changed
Lines changed: 651 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
806 | 811 | | |
807 | 812 | | |
808 | 813 | | |
| |||
830 | 835 | | |
831 | 836 | | |
832 | 837 | | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | 838 | | |
837 | 839 | | |
838 | 840 | | |
| |||
0 commit comments