Skip to content

Commit

Permalink
chore: v0.1.2 (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioAnongba authored Oct 22, 2024
1 parent 65844ab commit 88de4d7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 37 deletions.
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ If you like what we do, consider starring, sharing and contributing!
- `JWT` token authentication` (tested with Auth0, Supabase).
- `RBAC`. Fine grained authorization per route.
- Data availability through pagination and advanced search.
- API keys authentication

Numeraire SwissKnife ships with a [Dashboard](https://github.com/bitcoin-numeraire/swissknife-dashboard).

Expand All @@ -47,6 +48,10 @@ SwissKnife allows direct Lightning integration, supporting the most used node im
- Non-custodial
- Automatic node management.
- Automatic liquidity management via LSPs (user can switch LSPs)
- [`LND`](https://github.com/lightningnetwork/lnd)
- Non-custodial
- Run your own node
- Manage your own liquidity

## Documentation

Expand All @@ -57,10 +62,9 @@ Extended documentation is available [here](https://docs.numeraire.tech/swissknif
#### Features

- [ ] Webhooks
- [x] API keys authentication
- [ ] BOLT12 (offers)
- [ ] Notifications (Email, SMS by Twilio)
- [ ] Dockerhub images
- [x] Dockerhub images
- [ ] Desktop applications
- [ ] Helm Charts

Expand All @@ -74,10 +78,6 @@ Extended documentation is available [here](https://docs.numeraire.tech/swissknif
- Custodial
- Automatic node management
- Automatic liquidity management via Lightspark
- [ ] [`LND`](https://github.com/lightningnetwork/lnd)
- Non-custodial
- Run your own node
- Manage your own liquidity

#### Smart contracts

Expand Down
2 changes: 1 addition & 1 deletion src/infra/lightning/cln/cln_grpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl LnClient for ClnGrpcClient {
label: Some(Uuid::new_v4().to_string()),
maxfeepercent: self.maxfeepercent,
retry_for: self.retry_for,
exemptfee: self.payment_exemptfee.clone(),
exemptfee: self.payment_exemptfee,
..Default::default()
})
.await
Expand Down
2 changes: 1 addition & 1 deletion src/infra/lightning/cln/cln_grpc_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl From<PayResponse> for Payment {
ledger: Ledger::Lightning,
payment_hash: Some(val.payment_hash.to_hex()),
payment_preimage: Some(val.payment_preimage.to_hex()),
amount_msat: val.amount_sent_msat.clone().unwrap().msat,
amount_msat: val.amount_sent_msat.unwrap().msat,
fee_msat: Some(val.amount_sent_msat.unwrap().msat - val.amount_msat.unwrap().msat),
payment_time: Some(Utc.timestamp_opt(seconds, nanoseconds).unwrap()),
error,
Expand Down
2 changes: 1 addition & 1 deletion src/infra/lightning/lnd/lnd_rest_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl LnClient for LndRestClient {
};

if deschashonly {
payload.description_hash = sha256::Hash::hash(&description.as_bytes()).to_string();
payload.description_hash = sha256::Hash::hash(description.as_bytes()).to_string();
}

let response: AddInvoiceResponse = self
Expand Down
7 changes: 3 additions & 4 deletions src/infra/lightning/lnd/lnd_websocket_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,13 @@ async fn process_message(text: &str, ln_events: Arc<dyn LnEventsUseCases>) -> an

if let Some(event) = value.get("result") {
match serde_json::from_value::<InvoiceResponse>(event.clone()) {
Ok(invoice) => match invoice.state.as_str() {
"SETTLED" => {
Ok(invoice) => {
if invoice.state.as_str() == "SETTLED" {
if let Err(err) = ln_events.invoice_paid(invoice.into()).await {
warn!(%err, "Failed to process incoming payment");
}
}
_ => {}
},
}
Err(err) => {
error!(%err, "Failed to parse SubscribeInvoices event");
}
Expand Down

0 comments on commit 88de4d7

Please sign in to comment.