File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ mod peer_store;
33
33
mod tests;
34
34
mod wallet;
35
35
36
- pub use error:: Error ;
36
+ pub use error:: Error as LdkLiteError ;
37
+ use error:: Error ;
37
38
pub use event:: Event ;
38
39
use event:: { EventHandler , EventQueue } ;
39
40
use peer_store:: { PeerInfo , PeerInfoStorage } ;
Original file line number Diff line number Diff line change @@ -7,29 +7,29 @@ interface Builder {
7
7
};
8
8
9
9
interface LdkLite {
10
- [Throws=Error ]
10
+ [Throws=LdkLiteError ]
11
11
void start();
12
- [Throws=Error ]
12
+ [Throws=LdkLiteError ]
13
13
void stop();
14
14
Event next_event();
15
15
void event_handled();
16
- [Throws=Error ]
16
+ [Throws=LdkLiteError ]
17
17
PublicKey node_id();
18
- [Throws=Error ]
18
+ [Throws=LdkLiteError ]
19
19
Address new_funding_address();
20
- [Throws=Error ]
20
+ [Throws=LdkLiteError ]
21
21
void connect_open_channel([ByRef]string node_pubkey_and_address, u64 channel_amount_sats, boolean announce_channel);
22
- [Throws=Error ]
22
+ [Throws=LdkLiteError ]
23
23
PaymentHash send_payment(Invoice invoice);
24
- [Throws=Error ]
24
+ [Throws=LdkLiteError ]
25
25
PaymentHash send_spontaneous_payment(u64 amount_msat, [ByRef]string node_id);
26
- [Throws=Error ]
26
+ [Throws=LdkLiteError ]
27
27
Invoice receive_payment(u64? amount_msat, [ByRef]string description, u32 expiry_secs);
28
28
// TODO: payment_info()
29
29
};
30
30
31
31
[Error]
32
- enum Error {
32
+ enum LdkLiteError {
33
33
"AlreadyRunning",
34
34
"NotRunning",
35
35
"FundingTxCreationFailed",
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- uniffi-bindgen generate uniffi/ldk_lite.udl --language swift
3
2
uniffi-bindgen generate uniffi/ldk_lite.udl --language python
4
3
uniffi-bindgen generate uniffi/ldk_lite.udl --language kotlin
4
+
5
+ uniffi-bindgen generate uniffi/ldk_lite.udl --language swift
6
+ # swiftc -module-name ldk_lite -emit-library -o libldk_lite.dylib -emit-module -emit-module-path ./uniffi -parse-as-library -L ./target/release/ -lldk_lite -Xcc -fmodule-map-file=./uniffi/ldk_liteFFI.modulemap ./uniffi/ldk_lite.swift -v
You can’t perform that action at this time.
0 commit comments