@@ -995,6 +995,56 @@ pub struct GraphListNodesResponse {
995995 #[ prost( string, repeated, tag = "1" ) ]
996996 pub node_ids : :: prost:: alloc:: vec:: Vec < :: prost:: alloc:: string:: String > ,
997997}
998+ /// Send a payment given a BIP 21 URI or BIP 353 Human-Readable Name.
999+ ///
1000+ /// This method parses the provided URI string and attempts to send the payment. If the URI
1001+ /// has an offer and/or invoice, it will try to pay the offer first followed by the invoice.
1002+ /// If they both fail, the on-chain payment will be paid.
1003+ /// See more: <https://docs.rs/ldk-node/latest/ldk_node/payment/struct.UnifiedPayment.html#method.send>
1004+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1005+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
1006+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1007+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1008+ pub struct UnifiedSendRequest {
1009+ /// A BIP 21 URI or BIP 353 Human-Readable Name to pay.
1010+ #[ prost( string, tag = "1" ) ]
1011+ pub uri : :: prost:: alloc:: string:: String ,
1012+ /// The amount in millisatoshis to send. Required for "zero-amount" or variable-amount URIs.
1013+ #[ prost( uint64, optional, tag = "2" ) ]
1014+ pub amount_msat : :: core:: option:: Option < u64 > ,
1015+ /// Configuration options for payment routing and pathfinding.
1016+ #[ prost( message, optional, tag = "3" ) ]
1017+ pub route_parameters : :: core:: option:: Option < super :: types:: RouteParametersConfig > ,
1018+ }
1019+ /// The response `content` for the `UnifiedSend` API, when HttpStatusCode is OK (200).
1020+ /// When HttpStatusCode is not OK (non-200), the response `content` contains a serialized `ErrorResponse`.
1021+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1022+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
1023+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1024+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1025+ pub struct UnifiedSendResponse {
1026+ #[ prost( oneof = "unified_send_response::PaymentResult" , tags = "1, 2, 3" ) ]
1027+ #[ cfg_attr( feature = "serde" , serde( flatten) ) ]
1028+ pub payment_result : :: core:: option:: Option < unified_send_response:: PaymentResult > ,
1029+ }
1030+ /// Nested message and enum types in `UnifiedSendResponse`.
1031+ pub mod unified_send_response {
1032+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1033+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
1034+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1035+ #[ derive( Clone , PartialEq , :: prost:: Oneof ) ]
1036+ pub enum PaymentResult {
1037+ /// An on-chain payment was made. Contains the transaction ID.
1038+ #[ prost( string, tag = "1" ) ]
1039+ Txid ( :: prost:: alloc:: string:: String ) ,
1040+ /// A BOLT11 payment was made. Contains the payment ID in hex-encoded form.
1041+ #[ prost( string, tag = "2" ) ]
1042+ Bolt11PaymentId ( :: prost:: alloc:: string:: String ) ,
1043+ /// A BOLT12 payment was made. Contains the payment ID in hex-encoded form.
1044+ #[ prost( string, tag = "3" ) ]
1045+ Bolt12PaymentId ( :: prost:: alloc:: string:: String ) ,
1046+ }
1047+ }
9981048/// Returns information on a node with the given ID from the network graph.
9991049/// See more: <https://docs.rs/ldk-node/latest/ldk_node/graph/struct.NetworkGraph.html#method.node>
10001050#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
0 commit comments