Skip to content

Commit 8f0afa6

Browse files
authored
Regenerating SDKs following introspection of schemas. (#57)
1 parent 8cdabd8 commit 8f0afa6

23 files changed

+88
-28
lines changed

lightspark-remote-signing/src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Handler {
6262
SigningRequest::ReleaseCounterpartyPerCommitmentSecretRequest(_) => None,
6363
};
6464

65-
Ok(response.map(|r| Some(r.graphql_response())).flatten())
65+
Ok(response.map(|r| r.graphql_response()))
6666
}
6767
}
6868

lightspark/src/objects/account.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,8 @@ impl Account {
17521752
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
17531753
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
17541754
}
1755+
invoice_is_uma: is_uma
1756+
invoice_is_lnurl: is_lnurl
17551757
}
17561758
}
17571759
}

lightspark/src/objects/account_to_nodes_connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2+
use crate::objects::connection::Connection;
23
use crate::objects::lightspark_node::LightsparkNodeEnum;
34
use crate::objects::page_info::PageInfo;
45
use serde::{Deserialize, Serialize};
56
use std::vec::Vec;
67

7-
use crate::objects::connection::Connection;
8-
98
/// A connection between an account and the nodes it manages.
109
#[derive(Debug, Clone, Deserialize, Serialize)]
1110
pub struct AccountToNodesConnection {

lightspark/src/objects/account_to_payment_requests_connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2+
use crate::objects::connection::Connection;
23
use crate::objects::page_info::PageInfo;
34
use crate::objects::payment_request::PaymentRequestEnum;
45
use serde::{Deserialize, Serialize};
5-
6-
use crate::objects::connection::Connection;
76
use std::vec::Vec;
87

98
#[derive(Debug, Clone, Deserialize, Serialize)]

lightspark/src/objects/account_to_transactions_connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2+
use crate::objects::connection::Connection;
23
use crate::objects::currency_amount::CurrencyAmount;
34
use crate::objects::page_info::PageInfo;
45
use crate::objects::transaction::TransactionEnum;
56
use serde::{Deserialize, Serialize};
6-
7-
use crate::objects::connection::Connection;
87
use std::vec::Vec;
98

109
#[derive(Debug, Clone, Deserialize, Serialize)]

lightspark/src/objects/create_uma_invoice_input.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ use serde::{Deserialize, Serialize};
33

44
#[derive(Debug, Clone, Deserialize, Serialize)]
55
pub struct CreateUmaInvoiceInput {
6+
/// The node from which to create the invoice.
67
pub node_id: String,
78

9+
/// The amount for which the invoice should be created, in millisatoshis.
810
pub amount_msats: i64,
911

12+
/// The SHA256 hash of the UMA metadata payload. This will be present in the h-tag (SHA256 purpose of payment) of the resulting Bolt 11 invoice.
1013
pub metadata_hash: String,
1114

15+
/// The expiry of the invoice in seconds. Default value is 86400 (1 day).
1216
pub expiry_secs: Option<i64>,
1317

18+
/// An optional, monthly-rotated, unique hashed identifier corresponding to the receiver of the payment.
1419
pub receiver_hash: Option<String>,
1520
}

lightspark/src/objects/currency_unit.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ pub enum CurrencyUnit {
2222
2323
#[serde(rename = "USD")]
2424
Usd,
25+
/// Mexican Peso.
26+
27+
#[serde(rename = "MXN")]
28+
Mxn,
2529
/// 0.000000001 (10e-9) Bitcoin or a billionth of a Bitcoin. We recommend using the Satoshi unit instead when possible.
2630
2731
#[serde(rename = "NANOBITCOIN")]
@@ -49,6 +53,7 @@ impl fmt::Display for CurrencyUnit {
4953
Self::Satoshi => write!(f, "SATOSHI"),
5054
Self::Millisatoshi => write!(f, "MILLISATOSHI"),
5155
Self::Usd => write!(f, "USD"),
56+
Self::Mxn => write!(f, "MXN"),
5257
Self::Nanobitcoin => write!(f, "NANOBITCOIN"),
5358
Self::Microbitcoin => write!(f, "MICROBITCOIN"),
5459
Self::Millibitcoin => write!(f, "MILLIBITCOIN"),

lightspark/src/objects/fund_node_input.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ pub struct FundNodeInput {
66
pub node_id: String,
77

88
pub amount_sats: Option<i64>,
9+
10+
pub funding_address: Option<String>,
911
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2+
use crate::objects::transaction_status::TransactionStatus;
3+
use serde::{Deserialize, Serialize};
4+
use std::vec::Vec;
5+
6+
#[derive(Debug, Clone, Deserialize, Serialize)]
7+
pub struct IncomingPaymentsForPaymentHashQueryInput {
8+
/// The 32-byte hash of the payment preimage for which to fetch payments
9+
pub payment_hash: String,
10+
11+
/// An optional filter to only query incoming payments of given statuses.
12+
pub statuses: Option<Vec<TransactionStatus>>,
13+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2+
use crate::objects::incoming_payment::IncomingPayment;
3+
use serde::{Deserialize, Serialize};
4+
use std::vec::Vec;
5+
6+
#[derive(Debug, Clone, Deserialize, Serialize)]
7+
pub struct IncomingPaymentsForPaymentHashQueryOutput {
8+
#[serde(rename = "incoming_payments_for_payment_hash_query_output_payments")]
9+
pub payments: Vec<IncomingPayment>,
10+
}
11+
12+
pub const FRAGMENT: &str = "
13+
fragment IncomingPaymentsForPaymentHashQueryOutputFragment on IncomingPaymentsForPaymentHashQueryOutput {
14+
__typename
15+
incoming_payments_for_payment_hash_query_output_payments: payments {
16+
id
17+
}
18+
}
19+
";

0 commit comments

Comments
 (0)