Skip to content

Commit f947c9f

Browse files
committed
fix cln lib export
1 parent b370cd6 commit f947c9f

File tree

8 files changed

+13201
-7210
lines changed

8 files changed

+13201
-7210
lines changed

bindings/lni_react_native/LniFramework.xcframework/Info.plist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<key>BinaryPath</key>
99
<string>liblni_uniffi.a</string>
1010
<key>LibraryIdentifier</key>
11-
<string>ios-arm64</string>
11+
<string>ios-arm64-simulator</string>
1212
<key>LibraryPath</key>
1313
<string>liblni_uniffi.a</string>
1414
<key>SupportedArchitectures</key>
@@ -17,12 +17,14 @@
1717
</array>
1818
<key>SupportedPlatform</key>
1919
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
2022
</dict>
2123
<dict>
2224
<key>BinaryPath</key>
2325
<string>liblni_uniffi.a</string>
2426
<key>LibraryIdentifier</key>
25-
<string>ios-arm64-simulator</string>
27+
<string>ios-arm64</string>
2628
<key>LibraryPath</key>
2729
<string>liblni_uniffi.a</string>
2830
<key>SupportedArchitectures</key>
@@ -31,8 +33,6 @@
3133
</array>
3234
<key>SupportedPlatform</key>
3335
<string>ios</string>
34-
<key>SupportedPlatformVariant</key>
35-
<string>simulator</string>
3636
</dict>
3737
</array>
3838
<key>CFBundlePackageType</key>

bindings/lni_react_native/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ yarn ubrn:checkout
44
yarn
55
# yarn ubrn:android
66
yarn ubrn:ios
7-
yarn clean

bindings/lni_react_native/example/src/App.tsx

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
PhoenixdNode,
55
InvoiceType,
66
type ListTransactionsParams,
7-
Db,
87
} from '../../src';
98
import {
109
PHOENIXD_URL,
@@ -22,14 +21,19 @@ export default function App() {
2221
const [payment, setPayment] = useState<any>('');
2322

2423
const main = async () => {
24+
phoenixd();
25+
cln();
26+
};
27+
28+
async function phoenixd() {
2529
try {
2630
const node = new PhoenixdNode({
2731
url: PHOENIXD_URL,
2832
password: PHOENIXD_PASSWORD,
2933
});
3034

31-
const info = await node.getInfo();
32-
setPubKey(info.pubkey);
35+
//const info = await node.getInfo();
36+
// setPubKey(info.pubkey);
3337

3438
const offerResp = await node.makeInvoice({
3539
invoiceType: InvoiceType.Bolt12,
@@ -48,26 +52,11 @@ export default function App() {
4852
let txnParams: ListTransactionsParams = {
4953
from: BigInt(0),
5054
limit: BigInt(10),
51-
payment_hash: null,
55+
paymentHash: undefined, // TODO figure out how to exclude this instead of passing in undefined
5256
};
5357
const txns = await node.listTransactions(txnParams);
5458
setTxns(JSON.stringify(txns[0], bigIntReplacer));
5559

56-
// const path = `${RNFS.DocumentDirectoryPath}/test.json`;
57-
// const db = new Db('test.json');
58-
// db.writePayment({
59-
// paymentId: '1',
60-
// circId: '1',
61-
// round: BigInt(1),
62-
// relayFingerprint: '1',
63-
// updatedAt: BigInt(1),
64-
// amountMsats: BigInt(1),
65-
// });
66-
// db.save();
67-
68-
// const paymentRes = db.lookupPayment('1');
69-
// setPayment(JSON.stringify(paymentRes, bigIntReplacer));
70-
7160
const paymentResp = await node.payOffer(
7261
TEST_RECEIVER_OFFER,
7362
BigInt(3000),
@@ -78,7 +67,8 @@ export default function App() {
7867
} catch (e) {
7968
console.error('Error', e);
8069
}
81-
};
70+
}
71+
function cln() {}
8272

8373
useEffect(() => {
8474
setTimeout(() => {

bindings/lni_react_native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
],
3939
"scripts": {
4040
"start": "yarn example start",
41-
"ubrn:ios": "ubrn build ios --config ubrn.config.yaml --and-generate && (cd example/ios && pod install)",
41+
"ubrn:ios": "ubrn build ios --config ubrn.config.yaml --and-generate && (cd example/ios && pod install)",
4242
"ubrn:android": "ubrn build android --config ubrn.config.yaml --and-generate",
4343
"ubrn:checkout": "ubrn checkout --config ubrn.config.yaml",
4444
"ubrn:clean": "rm -Rf cpp/ android/src/main/java ios/ src/Native* src/generated/ src/index.ts*",
@@ -206,6 +206,6 @@
206206
"version": "0.45.5"
207207
},
208208
"dependencies": {
209-
"uniffi-bindgen-react-native": "^0.28.3-1"
209+
"uniffi-bindgen-react-native": "^0.28.3-3"
210210
}
211211
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
rust:
33
repo: https://github.com/lightning-node-interface/lni
4-
branch: master
4+
branch: cln
55
manifestPath: bindings/lni_uniffi/Cargo.toml

0 commit comments

Comments
 (0)