id
stringlengths
18
18
chunk_id
stringlengths
16
16
repo
stringclasses
6 values
repo_url
stringclasses
6 values
commit
stringclasses
6 values
license
stringclasses
4 values
path
stringlengths
10
68
kind
stringclasses
1 value
name
stringlengths
5
44
context
stringlengths
10
68
start_line
int32
1
1
end_line
int32
3
1.42k
num_lines
int32
3
1.42k
question
stringlengths
133
1.46k
answer
stringlengths
44
54.5k
model
stringclasses
1 value
5f7597252d37319e-0
5f7597252d37319e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/fromstr_to_netaddress.rs
file
fromstr_to_netaddress.rs
fuzz/src/fromstr_to_netaddress.rs
1
29
29
Write a Rust module that fuzz-tests parsing a byte slice as a `lightning::ln::msgs::SocketAddress` using the `FromStr` trait. The function should take `&[u8]`, convert it to a UTF-8 string via `std::str::from_utf8`, and attempt to parse it as a `SocketAddress`, silently ignoring any errors. Additionally, provide a C‑co...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0e0202fbd4d37a60-0
0e0202fbd4d37a60
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/lib.rs
file
lib.rs
fuzz/src/lib.rs
1
50
50
I need a Rust source file that serves as a fuzz target configuration header for a Lightning Network library. The file should begin with a license comment compatible with Apache 2.0 and MIT, then declare `extern crate` for `bitcoin`, `lightning`, `lightning_persister`, and `lightning_rapid_gossip_sync`. It must include ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
d7a4519d1b04eb5f-0
d7a4519d1b04eb5f
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/msg_targets/utils.rs
file
utils.rs
fuzz/src/msg_targets/utils.rs
1
105
105
I need Rust code that defines a VecWriter struct wrapping a Vec<u8> and implements lightning::util::ser::Writer with a write_all method that extends the inner vector with the given buffer. I also need four macros for fuzz testing message roundtrip behavior: test_msg which takes a message type path and data slice, reads...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
e63e5f803067192e-0
e63e5f803067192e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/payer_proof_deser.rs
file
payer_proof_deser.rs
fuzz/src/payer_proof_deser.rs
1
31
31
I need a Rust module that implements a round-trip fuzz test for Lightning's `PayerProof`. The module should expose a function that accepts a byte slice, attempts to deserialize it into a `PayerProof` using `TryFrom`, then serializes it back using the `Writeable` trait, and asserts that the round-trip output exactly mat...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0d69b3d06244d90d-0
0d69b3d06244d90d
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/invoice_request_deser.rs
file
invoice_request_deser.rs
fuzz/src/invoice_request_deser.rs
1
158
158
I need a Rust function that fuzz-tests the deserialization and response generation of a Bolt12 invoice request. The function should accept raw byte data, deserialize it into an `InvoiceRequest` via `TryFrom`, verify round-trip serialization using `write`, and then construct a valid `UnsignedBolt12Invoice` with a comple...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
22fbc758d7c07eeb-0
22fbc758d7c07eeb
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/process_onion_failure.rs
file
process_onion_failure.rs
fuzz/src/process_onion_failure.rs
1
161
161
I need a Rust source file that implements a fuzz test for lightning's onion failure processing. The code should accept raw bytes, parse them into a routing path with optional trampoline and blinded hops, construct an HTLC source with a session key and payment ID, extract failure data and optional attribution data, and ...
use std::sync::Arc; use bitcoin::{ key::Secp256k1, secp256k1::{PublicKey, SecretKey}, }; use lightning::{ blinded_path::BlindedHop, ln::{ channelmanager::{HTLCSource, PaymentId}, msgs::OnionErrorPacket, onion_utils, }, routing::router::{BlindedTail, Path, RouteHop, TrampolineHop}, types::features::{Channe...
nvidia/nemotron-3.5-lightning-30b-a3b
3ed028e5e48b714d-0
3ed028e5e48b714d
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/process_network_graph.rs
file
process_network_graph.rs
fuzz/src/process_network_graph.rs
1
24
24
I need a Rust fuzz test module for the lightning-rust library that integrates with `lightning_rapid_gossip_sync::RapidGossipSync` and `lightning::routing::gossip::NetworkGraph` for Bitcoin mainnet. The module must contain three functions: an internal generic function `do_test<Out: test_logger::Output>(data: &[u8], out:...
// Imports that need to be added manually use lightning_rapid_gossip_sync::RapidGossipSync; use crate::utils::test_logger; /// Actual fuzz test, method signature and name are fixed fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) { let logger = test_logger::TestLogger::new("".to_owned(), out); let networ...
nvidia/nemotron-3.5-lightning-30b-a3b
74e3c2cb070999bc-0
74e3c2cb070999bc
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/fs_store.rs
file
fs_store.rs
fuzz/src/fs_store.rs
1
184
184
I need a fuzz test for a Rust filesystem-based key-value store using `lightning_persister::fs_store::v1::FilesystemStore` that accepts fuzz input as a byte slice and a test logger output type, creates a temporary directory (preferring `/dev/shm` if available, otherwise `std::env::temp_dir()`), generates a random subfol...
use core::hash::{BuildHasher, Hasher}; use lightning::util::persist::{KVStore, KVStoreSync}; use lightning_persister::fs_store::v1::FilesystemStore; use std::fs; use tokio::runtime::Runtime; use crate::utils::test_logger; struct TempFilesystemStore { temp_path: std::path::PathBuf, inner: FilesystemStore, } impl Te...
nvidia/nemotron-3.5-lightning-30b-a3b
190b7a15f679fe97-0
190b7a15f679fe97
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/peer_crypt.rs
file
peer_crypt.rs
fuzz/src/peer_crypt.rs
1
105
105
I need a Rust function `do_test` that fuzzes a `PeerChannelEncryptor` from the lightning library. The input is a byte slice containing: 32 bytes of our secret key, 32 bytes of an ephemeral key, a flag byte (0 = inbound, non-zero = outbound), optionally a 33-byte peer public key if outbound, 50 bytes of act-one data, an...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
544b7fca6df63bec-0
544b7fca6df63bec
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/refund_deser.rs
file
refund_deser.rs
fuzz/src/refund_deser.rs
1
125
125
Write a Rust function for fuzz-testing a Bolt12 refund deserialization and signing flow. The function should take a byte slice and a test logger output, deserialize the bytes into a `lightning::offers::refund::Refund` using `TryFrom`, verify a round-trip serialization with `Writeable::write`, then construct a valid sig...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0742c3d51704fd33-0
0742c3d51704fd33
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/static_invoice_deser.rs
file
static_invoice_deser.rs
fuzz/src/static_invoice_deser.rs
1
31
31
I'm working on a Rust fuzz test for Lightning's static invoice deserialization. I need a function that takes a byte slice, attempts to deserialize it into a `StaticInvoice` using `TryFrom`, and if successful, re-serializes it via the `Writeable` trait and asserts that the round-trip preserves the original bytes exactly...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
222dff9ac4b770c2-0
222dff9ac4b770c2
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/utils/mod.rs
file
mod.rs
fuzz/src/utils/mod.rs
1
11
11
I need a Rust module file that publicly declares two submodules called `test_logger` and `test_persister`. Please output the module declaration statements.
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0480c6136e8a7f0f-0
0480c6136e8a7f0f
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/router.rs
file
router.rs
fuzz/src/router.rs
1
436
436
I need a Rust fuzz module for the lightning-devkit/rust-lightning router that processes fuzz-inputted raw byte data to build a network graph, create channel details, and repeatedly test route finding with probabilistic scoring. The module should parse lightning messages such as UnsignedNodeAnnouncement, UnsignedChannel...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
426363340effec77-0
426363340effec77
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/resource_manager.rs
file
resource_manager.rs
fuzz/src/resource_manager.rs
1
26
26
I need a Rust module that provides fuzz-testing entry points for the lightning resource manager. It should include a public function `do_test(data: &[u8])` that delegates to `lightning::ln::resource_manager::fuzz::do_test`, a generic function `resource_manager_test<Out: test_logger::Output>(data: &[u8], _out: Out)` tha...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
b32690d43b3d7a53-0
b32690d43b3d7a53
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/write-seeds/src/main.rs
file
main.rs
fuzz/write-seeds/src/main.rs
1
6
6
I need a minimal Rust program entry point that reads a file path from the command-line arguments and calls `lightning_fuzz::full_stack::write_fst_seeds` with it. The function should skip the program name, extract the first positional argument as the path, and panic with a descriptive message if no argument is supplied....
fn main() { let mut iter = std::env::args(); iter.next().unwrap(); // program name let path = iter.next().expect("Requires a path as the first argument"); lightning_fuzz::full_stack::write_fst_seeds(&path); }
nvidia/nemotron-3.5-lightning-30b-a3b
aee3e53c4f23547a-0
aee3e53c4f23547a
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/utils/test_persister.rs
file
test_persister.rs
fuzz/src/utils/test_persister.rs
1
27
27
I need a Rust struct that implements lightning::chainmonitor::Persist<lightning::util::test_channel_signer::TestChannelSigner> for fuzz testing. It should hold an internal std::sync::Mutex<lightning::chain::ChannelMonitorUpdateStatus> and define three methods: persist_new_channel, update_persisted_channel, and archive_...
use lightning::chain; use lightning::chain::{chainmonitor, channelmonitor}; use lightning::util::persist::MonitorName; use lightning::util::test_channel_signer::TestChannelSigner; use std::sync::Mutex; pub struct TestPersister { pub update_ret: Mutex<chain::ChannelMonitorUpdateStatus>, } impl chainmonitor::Persist<T...
nvidia/nemotron-3.5-lightning-30b-a3b
b9adc04f0aadfdb3-0
b9adc04f0aadfdb3
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/utils/test_logger.rs
file
test_logger.rs
fuzz/src/utils/test_logger.rs
1
75
75
I'm building a test fixture for Rust lightning and need a logger that can redirect lightning::util::logger::Record output to various destinations. The design should favor a trait-based output handler with a locked_write(&self, data: &[u8]) method, with three concrete implementations: one that silently discards output (...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0274693caa060169-0
0274693caa060169
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/zbase32.rs
file
zbase32.rs
fuzz/src/zbase32.rs
1
34
34
I need a Rust module for fuzz-testing ZBase32 encoding and decoding using the `lightning::util::base32` crate's `Alphabet::ZBase32` type. The module should provide a function that takes a byte slice, encodes it with ZBase32, decodes it back, and asserts the original data is recovered. It should also handle UTF-8 input ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
fd606bf4bd432741-0
fd606bf4bd432741
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/offer_deser.rs
file
offer_deser.rs
fuzz/src/offer_deser.rs
1
76
76
I need a Rust source file for fuzzing Bolt12 offer deserialization. The module should deserialize raw bytes into a lightning `Offer` using `TryFrom`, then round-trip by serializing with `Writeable` and asserting byte equality. It must build an `InvoiceRequest` from the offer, adjusting the amount: if no amount, use 100...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
1a6862529cd13233-0
1a6862529cd13233
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
fuzz/src/onion_message.rs
file
onion_message.rs
fuzz/src/onion_message.rs
1
513
513
I need a Rust module for fuzz-testing lightning onion message handling that includes a `do_test<L: Logger>(data: &[u8], logger: &L)` function reading binary onion messages and constructing an `OnionMessenger` with a `KeyProvider` implementing `EntropySource`, `NodeSigner`, and `SignerProvider`, test implementations of ...
// Imports that need to be added manually use bitcoin::script::ScriptBuf; use bitcoin::secp256k1::ecdh::SharedSecret; use bitcoin::secp256k1::ecdsa::RecoverableSignature; use bitcoin::secp256k1::schnorr; use bitcoin::secp256k1::{self, PublicKey, Scalar, Secp256k1, SecretKey}; use lightning::blinded_path::message::{ A...
nvidia/nemotron-3.5-lightning-30b-a3b
6669f66c3055672e-0
6669f66c3055672e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/crypto/mod.rs
file
mod.rs
lightning/src/crypto/mod.rs
1
11
11
I need a Rust crypto module that provides a constant-time byte equality comparison function. The function should be named `fixed_time_eq` and accept two byte slices `&[u8]`, returning `bool`. In non-fuzzing builds, it should re-export Bitcoin's `bitcoin::hashes::cmp::fixed_time_eq`. In fuzzing builds, it should define ...
#[cfg(not(fuzzing))] pub(crate) use bitcoin::hashes::cmp::fixed_time_eq; #[cfg(fuzzing)] fn fixed_time_eq(a: &[u8], b: &[u8]) -> bool { assert_eq!(a.len(), b.len()); a == b } pub(crate) mod streams; pub(crate) mod utils;
nvidia/nemotron-3.5-lightning-30b-a3b
383804a0ff7faa2e-0
383804a0ff7faa2e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/chain/transaction.rs
file
transaction.rs
lightning/src/chain/transaction.rs
1
110
110
I need a Rust source file for a module that typesets on-chain transaction data for a Lightning Network implementation. The module must define a `TransactionData` type as `[(usize, &Transaction)]` for enumerated block transactions. It must also define an `OutPoint` struct with `txid: Txid` and `index: u16`, implementing...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
cde23556be16f93a-0
cde23556be16f93a
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/events/bump_transaction/sync.rs
file
sync.rs
lightning/src/events/bump_transaction/sync.rs
1
74
74
Write a Rust struct `BumpTransactionEventHandlerSync` that synchronously wraps `BumpTransactionEventHandler` for handling `BumpTransactionEvent` events. The struct should be generic over `B: BroadcasterInterface`, `C: Deref` where `C::Target: CoinSelectionSourceSync`, `SP: SignerProvider`, and `L: Logger`. It needs a c...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
2dcf2b310d8e4388-0
2dcf2b310d8e4388
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/io/mod.rs
file
mod.rs
lightning/src/io/mod.rs
1
76
76
I need a Rust struct called `Cursor` that wraps a generic inner type and tracks a read position. The struct should provide methods to create a new cursor, get its current position, retrieve the inner value, and set a new position. It must implement the `std::io::Read` and `std::io::BufRead` traits for any inner type th...
pub use bitcoin::io::*; /// Emulation of std::io::Cursor /// /// This is not exported to bindings users as serialization is done via a bindings-specific /// pipeline. #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct Cursor<T> { inner: T, pos: u64, } impl<T> Cursor<T> { /// Creates a `Cursor` by wrapping ...
nvidia/nemotron-3.5-lightning-30b-a3b
2226056e5b723edc-0
2226056e5b723edc
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/lib.rs
file
lib.rs
lightning/src/lib.rs
1
158
158
I need a complete Rust `lib.rs` file for a lightning implementation crate named `lightning`. The file should set up the crate with default features `std` and `grind_signatures`, and support conditional compilation for `fuzzing`, `test`, `grind_signatures`, `std`, and `no_std`. It must include the Apache 2.0/MIT license...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
5e15df22297db58f-0
5e15df22297db58f
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/dual_funding_tests.rs
file
dual_funding_tests.rs
lightning/src/ln/dual_funding_tests.rs
1
10
10
Write the Apache 2.0 and MIT license header typical for Rust files in the lightning crate, followed by a `//!` doc comment that tests the creation of dual-funded channels in a `ChannelManager`. The module should describe its purpose for testing dual-funded channel initialization.
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
01645ec1047cc444-0
01645ec1047cc444
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/our_peer_storage.rs
file
our_peer_storage.rs
lightning/src/ln/our_peer_storage.rs
1
204
204
I need a Rust module for encrypted peer storage of channel data in a Lightning Network node. It must define a `DecryptedOurPeerStorage` struct that holds serialized channel data and can encrypt it using a `PeerStorageKey` and random bytes via ChaCha20Poly1305 to produce an `EncryptedOurPeerStorage`. The encrypted struc...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
fe7327fd10f62142-0
fe7327fd10f62142
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/blinded_path/utils.rs
file
utils.rs
lightning/src/blinded_path/utils.rs
1
314
314
I need a Rust module for constructing blinded path onion messages in a Lightning Network implementation. The module must provide a function to build blinded hops from an unblinded path and a destination, encrypting each hop's TLV payload using ChaChaPoly with optional recipient authentication keys, and deriving per-hop...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
658465869ca1c7d9-0
658465869ca1c7d9
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/channel_keys.rs
file
channel_keys.rs
lightning/src/ln/channel_keys.rs
1
308
308
I need Rust code for a Lightning channel keys module that defines DelayedPaymentBasepoint, DelayedPaymentKey, HtlcBasepoint, HtlcKey, RevocationBasepoint, and RevocationKey structs, implements public key derivation from per_commitment_point and basepoints using SHA-256 tweak via derive_public_key, provides from_basepoi...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
73a31afae3f0a907-0
73a31afae3f0a907
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/resource_manager/fuzz.rs
file
fuzz.rs
lightning/src/ln/resource_manager/fuzz.rs
1
608
608
Generate a Rust module that fuzzes a `ResourceManager` by interpreting byte sequences as channel and HTLC operations, maintaining a shadow model and checking invariants after each step. Use the crate's `ResourceManager`, `ResourceManagerConfig`, `BucketAssigned`, `ForwardingOutcome`, `HtlcRef`, and constants `MIN_MAX_I...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
00ddf563fbcbeaf5-0
00ddf563fbcbeaf5
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/async_receive_offer_cache.rs
file
async_receive_offer_cache.rs
lightning/src/offers/async_receive_offer_cache.rs
1
541
541
I need a Rust module that caches interactively built static invoices for an often-offline recipient in a Lightning Network implementation. The module must define an `OfferStatus` enum with `Used`, `Ready`, and `Pending` variants, and an `AsyncReceiveOffer` struct holding an `Offer`, creation time, status, nonce, and a ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
8a601516df004c42-0
8a601516df004c42
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/features.rs
file
features.rs
lightning/src/ln/features.rs
1
126
126
I need a Rust module that implements Writeable and Readable trait derivations for various Lightning feature types, supporting both length-prefixed wire format and TLV-internal serialization without length prefixes. The code should use macros to generically handle InitFeatures, ChannelFeatures, NodeFeatures, Bolt11Invoi...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
bab391b8d15a8079-0
bab391b8d15a8079
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/nonce.rs
file
nonce.rs
lightning/src/offers/nonce.rs
1
75
75
I need a Rust struct named `Nonce` that represents a 128-bit number used only once, to be implemented in the `lightning::offers::nonce` module. The struct should wrap a fixed `[u8; 16]` and provide: a public constant `LENGTH` set to 16; a constructor `from_entropy_source` that accepts any type implementing `EntropySour...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
d8f8d3e0c406f18a-0
d8f8d3e0c406f18a
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/mod.rs
file
mod.rs
lightning/src/offers/mod.rs
1
34
34
I need a Rust module file that organizes the Lightning Offers (BOLT 12) implementation by declaring public submodules for offer encoding, payment flow, invoice management, Merkle proof construction, nonce generation, request parsing, payer logic, proof validation, refund handling, selective disclosure, and cryptographi...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
c0b60da065b4df86-0
c0b60da065b4df86
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/test_utils.rs
file
test_utils.rs
lightning/src/offers/test_utils.rs
1
186
186
I need a Rust module with test utilities for BOLT 12 Offers interfaces that sets up deterministic cryptographic material for unit testing. Specifically, I'm looking for functions that generate payer and recipient key pairs from fixed secret keys, provide Schnorr signing over tagged hashes, derive public keys, compute a...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
a9e379f03e8cfa36-0
a9e379f03e8cfa36
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/invoice_macros.rs
file
invoice_macros.rs
lightning/src/offers/invoice_macros.rs
1
163
163
I need macro definitions for a Rust module that generates builder methods and accessors for BOLT 12 invoices. The builder macro should produce methods `relative_expiry` taking a u32 seconds value and setting the relative expiry duration, `fallback_v0_p2wsh` accepting `&bitcoin::WScriptHash` to add a P2WSH fallback addr...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
4dd1c05642bacd68-0
4dd1c05642bacd68
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/offers/payer.rs
file
payer.rs
lightning/src/offers/payer.rs
1
35
35
I need a Rust source file for an offers module that handles payer metadata encoding via TLV streams. Define a `pub(super)` struct `PayerContents` wrapping a `Metadata` type, with `Clone` and `Debug` derives (and `PartialEq` under test configuration). Declare a public constant `PAYER_METADATA_TYPE` of type `u64` set to ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
2ae3344642d221e9-0
2ae3344642d221e9
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/trampoline_forward_tests.rs
file
trampoline_forward_tests.rs
lightning/src/ln/trampoline_forward_tests.rs
1
205
205
I need a Rust source file with test functions for trampoline MPP accumulation and forwarding validation in ChannelManager::handle_trampoline_htlc. The file should define helper functions to create test HTLC previous hop data, trampoline onion packets, and recipient onion fields. It should enumerate test cases for MPP v...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
a499288e31bf3538-0
a499288e31bf3538
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/onion_message/mod.rs
file
mod.rs
lightning/src/onion_message/mod.rs
1
30
30
I need a Rust module file for onion message utilities in a Lightning Network implementation. The module should document onion messages as multi-purpose messages sent between peers, enabling use cases like static invoices, refunds, proof of payer, and payments via blinded paths. The header must reference the `OnionMesse...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
30182a4ec662d94e-0
30182a4ec662d94e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/onion_message/packet.rs
file
packet.rs
lightning/src/onion_message/packet.rs
1
462
462
I need a Rust module for onion message packets in a Lightning Network implementation. The module must define a `Packet` struct with a version byte, a random secp256k1 public key, an encrypted hop data vector, and a 32-byte HMAC, along with constants `SMALL_PACKET_HOP_DATA_LEN` (1300) and `BIG_PACKET_HOP_DATA_LEN` (3276...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
b82511f38eda931d-0
b82511f38eda931d
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/routing/test_utils.rs
file
test_utils.rs
lightning/src/routing/test_utils.rs
1
446
446
I need a Rust test utility module for a Lightning Network routing library. It must provide functions to generate signed `ChannelAnnouncement` from two secret keys and `ChannelFeatures`, add channels with UTXO funding and synchronized `P2PGossipSync` gossip, add or update `NodeAnnouncement` from a secret key and `NodeFe...
#![cfg_attr(rustfmt, rustfmt_skip)] // This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/lice...
nvidia/nemotron-3.5-lightning-30b-a3b
6db06edd192d104d-0
6db06edd192d104d
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/routing/log_approx.rs
file
log_approx.rs
lightning/src/routing/log_approx.rs
1
499
499
Write a Rust module that approximates `log10(numerator / denominator) * 2048` using a compile-time lookup table. The module must define a function `negative_log10_times_2048(numerator: u64, denominator: u64) -> u64` that computes the difference of scaled log10 values by internally calling a helper `log10_times_2048(x: ...
//! Approximation of log_10 using a lookup table. const BITS: u32 = 64; const HIGHEST_BIT: u32 = BITS - 1; const LOWER_BITS: u32 = 6; pub(super) const LOWER_BITS_BOUND: u64 = 1 << LOWER_BITS; const LOWER_BITMASK: u64 = (1 << LOWER_BITS) - 1; /// Look-up table for `log10(x) * 2048` where row `i` is used for each `x` h...
nvidia/nemotron-3.5-lightning-30b-a3b
d505b61d9ce4913e-0
d505b61d9ce4913e
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/routing/mod.rs
file
mod.rs
lightning/src/routing/mod.rs
1
18
18
I need a Rust module file that declares submodules for a networking library's routing component. It should start with a documentation comment stating it contains structs and impls for receiving network messages and storing topology, then declare pub mod gossip;, mod log_approx;, pub mod router;, pub mod scoring;, #[cfg...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
37d27d5ab2aea7bc-0
37d27d5ab2aea7bc
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/sync/fairrwlock.rs
file
fairrwlock.rs
lightning/src/sync/fairrwlock.rs
1
65
65
I need a Rust struct that wraps `std::sync::RwLock` to enforce writer fairness by blocking read locks when write operations are pending. The struct should track pending writers with an `AtomicUsize`, and its `read` method must acquire the underlying write lock if any writers are pending, preventing reader starvation. I...
use super::{LockHeldState, LockTestExt}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{LockResult, RwLock, RwLockReadGuard, RwLockWriteGuard, TryLockResult}; /// Rust libstd's RwLock does not provide any fairness guarantees (and, in fact, when used on /// Linux with pthreads under the hood, readers t...
nvidia/nemotron-3.5-lightning-30b-a3b
45efd47424d77838-0
45efd47424d77838
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/sync/debug_sync.rs
file
debug_sync.rs
lightning/src/sync/debug_sync.rs
1
504
504
I need a Rust synchronization module for a Lightning Network-inspired crate that provides debug-aware Mutex and RwLock types with integrated lock-order tracking to detect deadlocks and lock-inversion bugs. The types should maintain lock metadata recording which locks were held before which, and optionally capture const...
pub use alloc::sync::Arc; use core::fmt; use core::ops::{Deref, DerefMut}; #[cfg(feature = "std")] use core::time::Duration; use std::cell::RefCell; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::RwLock as StdRwLock; use std::sync::RwLockReadGuard as StdRwLockReadGuard; use std::sync::RwLo...
nvidia/nemotron-3.5-lightning-30b-a3b
391e8bea47aecef4-0
391e8bea47aecef4
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/sign/ecdsa.rs
file
ecdsa.rs
lightning/src/sign/ecdsa.rs
1
267
267
I'm implementing a Rust trait for ECDSA-based signing of Lightning Network channel transactions per BOLT 3. I need a trait named `EcdsaChannelSigner` that extends `ChannelSigner` and provides methods for all the core signing operations: creating signatures for counterparty commitment transactions with HTLC preimages, h...
//! Defines ECDSA-specific signer types. use bitcoin::transaction::Transaction; use bitcoin::secp256k1; use bitcoin::secp256k1::ecdsa::Signature; use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey}; use crate::ln::chan_utils::{ ChannelTransactionParameters, ClosingTransaction, CommitmentTransaction, HTLCOutp...
nvidia/nemotron-3.5-lightning-30b-a3b
b9b2fd20d59fa552-0
b9b2fd20d59fa552
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/onion_message/offers.rs
file
offers.rs
lightning/src/onion_message/offers.rs
1
204
204
I need to implement a Rust module for BOLT 12 Offers message handling in a lightning network library. The module should define an enum representing possible offer messages (invoice request, invoice, static invoice, and invoice error), a handler trait with a method to process these messages given optional `OffersContext...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
c1216bba2f8cdb52-0
c1216bba2f8cdb52
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/sync/mod.rs
file
mod.rs
lightning/src/sync/mod.rs
1
69
69
I need a Rust trait named `LockTestExt` that provides two methods: one to return a `LockHeldState` indicating whether a lock is held by the current thread, with a conditional variant for unsupported configurations depending on build flags; and another method `unsafe_well_ordered_double_lock_self` that safely acquires a...
#[allow(dead_code)] // Depending on the compilation flags some variants are never used #[derive(Debug, PartialEq, Eq)] pub(crate) enum LockHeldState { HeldByThread, NotHeldByThread, #[cfg(any(ldk_bench, not(test)))] Unsupported, } pub(crate) trait LockTestExt<'a> { fn held_by_thread(&self) -> LockHeldState; type...
nvidia/nemotron-3.5-lightning-30b-a3b
45cbbcf775bab106-0
45cbbcf775bab106
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/atomic_counter.rs
file
atomic_counter.rs
lightning/src/util/atomic_counter.rs
1
36
36
I need a Rust `AtomicCounter` type that atomically increments a counter and returns the previous value, using `AtomicU64` with `Ordering::AcqRel` when the target supports 64-bit atomics, and a `Mutex<u64>` fallback otherwise. It should expose a `new()` constructor initializing the counter to 0, and a `next(&self) -> u6...
//! A simple atomic counter that uses mutexes if the platform doesn't support atomic u64s. #[cfg(not(target_has_atomic = "64"))] use crate::sync::Mutex; #[cfg(target_has_atomic = "64")] use core::sync::atomic::{AtomicU64, Ordering}; pub(crate) struct AtomicCounter { #[cfg(target_has_atomic = "64")] counter: AtomicU...
nvidia/nemotron-3.5-lightning-30b-a3b
89a39d32ff744fa7-0
89a39d32ff744fa7
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/async_poll.rs
file
async_poll.rs
lightning/src/util/async_poll.rs
1
166
166
I need a Rust module with utilities for working with the standard library's Future type. It should include a helper enum to track a future's state as either pending or ready with an output value, a joiner struct that polls two unpin futures and returns their results as a tuple once both complete, and a poller struct th...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
2722058a95c9e956-0
2722058a95c9e956
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/byte_utils.rs
file
byte_utils.rs
lightning/src/util/byte_utils.rs
1
41
41
Write a Rust module containing a function named `slice_to_be48` that accepts a reference to a 6-element slice of `u8` and returns a `u64` by interpreting the bytes as big-endian, using bit shifts and OR operations. Additionally, write a function named `be48_to_array` that accepts a `u64` and returns a `[u8; 6]`, assert...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
f625086ca7541829-0
f625086ca7541829
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/fuzz_wrappers.rs
file
fuzz_wrappers.rs
lightning/src/util/fuzz_wrappers.rs
1
24
24
I need a Rust macro that converts a 32-byte slice into a `bitcoin::secp256k1::Message`, with fuzzing-safe error handling: in normal builds it should call `from_digest_slice` and unwrap the result, while in fuzzing builds it should match on the result and fall back to `Message::from_digest([1; 32])` when the digest is i...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
a06d482c1d2ab051-0
a06d482c1d2ab051
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/ln/mod.rs
file
mod.rs
lightning/src/ln/mod.rs
1
133
133
I need a Rust module file that organizes the submodules of a Lightning protocol crate. The file should start with a doc comment noting it contains protocol implementations. It must use `#[cfg]` attributes to conditionally include modules based on `fuzzing`, `test_utils`, and similar features. Publicly re-export `LN_MAX...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
be8e4bfa77569018-0
be8e4bfa77569018
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/errors.rs
file
errors.rs
lightning/src/util/errors.rs
1
128
128
I need a Rust module that defines an `APIError` enum for a Lightning Network API, including variants for API misuse, fee-rate rejection, invalid route errors, channel unavailability, pending monitor updates, and incompatible shutdown script formats. The enum must carry a `String` message in each variant, and some must ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
8040df34263a6cd0-0
8040df34263a6cd0
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/hash_tables.rs
file
hash_tables.rs
lightning/src/util/hash_tables.rs
1
187
187
I need a Rust module that provides `HashMap` and `HashSet` types backed by `hashbrown` with a custom `RandomState` hasher. The hasher must support deterministic test behavior: when the environment variable `LDK_TEST_DETERMINISTIC_HASHES` is set to `"1"`, it should use fixed keys for deterministic iteration; otherwise, ...
//! Generally LDK uses `hashbrown`'s `HashMap`s with the `std` `SipHasher` and uses `getrandom` to //! opportunistically randomize it, if randomization is available. //! //! This module simply re-exports the `HashMap` used in LDK for public consumption. pub use hashbrown::hash_map; mod hashbrown_tables { #[cfg(all(f...
nvidia/nemotron-3.5-lightning-30b-a3b
5d2ac2ae2f896ffc-0
5d2ac2ae2f896ffc
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/dyn_signer.rs
file
dyn_signer.rs
lightning/src/util/dyn_signer.rs
1
247
247
I'm working on a Rust project that needs a dynamically dispatched signer to swap between different channel signing implementations at runtime. I need a type that wraps a `dyn InnerSign` trait object, implements `EcdsaChannelSigner` and `ChannelSigner` by delegating all required methods to the inner signer, and supports...
//! A dynamically dispatched signer use crate::prelude::*; use crate::sync::Arc; use core::any::Any; use crate::ln::chan_utils::{ ChannelPublicKeys, ChannelTransactionParameters, ClosingTransaction, CommitmentTransaction, HTLCOutputInCommitment, HolderCommitmentTransaction, }; use crate::ln::inbound_payment::Expan...
nvidia/nemotron-3.5-lightning-30b-a3b
e085d9bf65bfcb66-0
e085d9bf65bfcb66
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/time.rs
file
time.rs
lightning/src/util/time.rs
1
62
62
I need a Rust module that provides a test-friendly `Instant` type with methods to get the current time, advance a shared mock clock, and compute the duration since a previous instant. The type should be `Clone`, `Copy`, `Debug`, and support `PartialEq`/`Eq` comparison, as well as subtraction of `std::time::Duration`. I...
// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may not use this file except in accordance with one or both of these // licenses. //! A simp...
nvidia/nemotron-3.5-lightning-30b-a3b
a24a43cdebf79e0b-0
a24a43cdebf79e0b
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/native_async.rs
file
native_async.rs
lightning/src/util/native_async.rs
1
255
255
I need a test utility module for a Rust async project that provides a `FutureSpawner` trait and a corresponding `FutureQueue` implementation. The trait should allow spawning futures via a `spawn` method that returns a `SpawnedFutureResult` future resolving to `Result<O, E>`, and the queue should store futures until man...
// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may not use this file except in accordance with one or both of these // licenses. //! This m...
nvidia/nemotron-3.5-lightning-30b-a3b
297e114634846082-0
297e114634846082
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/mod.rs
file
mod.rs
lightning/src/util/mod.rs
1
110
110
I'm setting up a Rust module file for a collection of utility types and functions in a blockchain networking library. The file needs an Apache 2.0/MIT license header, a doc comment, and a series of `pub mod` declarations that organize sub-modules for error handling, message signing, persistence, SCID utilities, hash ta...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
455079443d825a38-0
455079443d825a38
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/test_channel_signer.rs
file
test_channel_signer.rs
lightning/src/util/test_channel_signer.rs
1
578
578
I need a test implementation of `ChannelSigner` and `EcdsaChannelSigner` for Lightning Network channel operations that enforces commitment and revocation policy on top of a dynamic signer. The struct should wrap a `DynSigner` and store shared enforcement state in `Arc<Mutex<EnforcementState>>`, tracking last holder and...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
e8544e74c3d42885-0
e8544e74c3d42885
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/gossip.rs
file
gossip.rs
lightning-block-sync/src/gossip.rs
1
185
185
I need a Rust struct that implements `lightning::routing::utxo::UtxoLookup` to validate gossip UTXO lookups against a custom `UtxoSource` trait that extends `BlockSource` with methods for fetching block hashes by height, transaction IDs in a block, and unspent transaction outputs. The struct should be initialized with ...
//! When fetching gossip from peers, lightning nodes need to validate that gossip against the //! current UTXO set. This module defines an implementation of the LDK API required to do so //! against a [`BlockSource`] which implements a few additional methods for accessing the UTXO set. use crate::{BlockSource, BlockSo...
nvidia/nemotron-3.5-lightning-30b-a3b
9a83be92c35a2017-0
9a83be92c35a2017
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/init.rs
file
init.rs
lightning-block-sync/src/init.rs
1
366
366
Write an async Rust function that synchronizes multiple chain listeners to the best chain tip during initial Lightning startup. The function should take a block source, a network identifier, and a vector of (block_locator, listener) pairs. It must find the common ancestor between each listener's current tip and the bes...
//! Utilities to assist in the initial sync required to initialize or reload Rust-Lightning objects //! from disk. use crate::async_poll::{MultiResultFuturePoller, ResultFuture}; use crate::poll::{ChainPoller, Poll, Validate, ValidatedBlockHeader}; use crate::{BlockData, BlockSource, BlockSourceResult, ChainNotifier, ...
nvidia/nemotron-3.5-lightning-30b-a3b
5c37a0e342c21ded-0
5c37a0e342c21ded
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-background-processor/src/fwd_batch.rs
file
fwd_batch.rs
lightning-background-processor/src/fwd_batch.rs
1
507
507
I'm working on the background processor for a Lightning implementation and need a module that manages randomized forwarding batch delays. I need a `BatchDelay` struct that tracks the next delay duration and provides a constructor returning a new instance initialized with a 2-second base delay. It should expose a `get()...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
f7b4031ecf9535e9-0
f7b4031ecf9535e9
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/poll.rs
file
poll.rs
lightning-block-sync/src/poll.rs
1
407
407
I need a Rust trait `Poll` that adapts a `BlockSource` for polling chain tips and retrieving block data, with methods to return a chain tip relative to a known tip (`ChainTip::Common`, `Better`, or `Worse`), look up the previous header, fetch a block by header, and get a header by hash and optional height hint. Include...
//! Adapters that make one or more [`BlockSource`]s simpler to poll for new chain tip transitions. use crate::{BlockData, BlockHeaderData, BlockSource, BlockSourceError, BlockSourceResult}; use bitcoin::hash_types::BlockHash; use bitcoin::network::Network; use lightning::chain::BlockLocator; use std::future::Future;...
nvidia/nemotron-3.5-lightning-30b-a3b
5a1124cd1509b696-0
5a1124cd1509b696
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/test_utils.rs
file
test_utils.rs
lightning-block-sync/src/test_utils.rs
1
324
324
Write a Rust test module that functions as a mock BlockSource for testing blockchain synchronization logic. It should generate a configurable chain starting from genesis, allowing the height to be set and the chain to be forked at any point. The module must support states where certain blocks are omitted, headers are u...
use crate::poll::{Validate, ValidatedBlockHeader}; use crate::{ BlockData, BlockHeaderData, BlockSource, BlockSourceError, BlockSourceResult, HeaderCache, }; use bitcoin::block::{Block, Header, Version}; use bitcoin::constants::genesis_block; use bitcoin::hash_types::{BlockHash, TxMerkleNode}; use bitcoin::locktime::...
nvidia/nemotron-3.5-lightning-30b-a3b
1c74a62e0f375269-0
1c74a62e0f375269
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/rest.rs
file
rest.rs
lightning-block-sync/src/rest.rs
1
199
199
I need a Rust struct `RestClient` that wraps an `HttpClient` and implements both `BlockSource` and `UtxoSource` traits for syncing block data from a Bitcoin Core REST API. The client should be initialized with a base URL (including the REST path component). It must provide an async `request_resource` method generic ove...
//! Simple REST client implementation which implements [`BlockSource`] against a Bitcoin Core REST //! endpoint. use crate::convert::GetUtxosResponse; use crate::gossip::UtxoSource; use crate::http::{BinaryResponse, HttpClient, HttpClientError, JsonResponse, ToParseErrorMessage}; use crate::{BlockData, BlockHeaderData...
nvidia/nemotron-3.5-lightning-30b-a3b
64459a8a64160704-0
64459a8a64160704
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/indexed_map.rs
file
indexed_map.rs
lightning/src/util/indexed_map.rs
1
253
253
I need a Rust module that provides an `IndexedMap` type - a hash-map-backed associative container that iterates keys in a deterministic order consistent with `Ord`, mimicking `BTreeMap`'s public API while achieving `HashMap`-performance lookups. The struct should be `IndexedMap<K, V>` with constraint `K: Hash + Ord`. I...
//! This module has a map which can be iterated in a deterministic order. See the [`IndexedMap`]. use crate::prelude::*; use alloc::slice::Iter; use core::hash::Hash; use core::ops::{Bound, RangeBounds}; /// A map which can be iterated in a deterministic order. /// /// This would traditionally be accomplished by simp...
nvidia/nemotron-3.5-lightning-30b-a3b
0515e6e210cd86b1-0
0515e6e210cd86b1
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-dns-resolver/src/lib.rs
file
lib.rs
lightning-dns-resolver/src/lib.rs
1
502
502
I need a Rust struct `OMDomainResolver<PH>` that implements `lightning::onion_message::dns_resolution::DNSResolverMessageHandler` for handling bLIP 32 DNSSEC proof queries. It should be initialized with a resolver `SocketAddr` and an optional proof handler, use `tokio::runtime::Handle` for async operations, and `dnssec...
//! A simple crate which uses [`dnssec_prover`] to create DNSSEC Proofs in response to bLIP 32 //! Onion Message DNSSEC Proof Queries. #![deny(missing_docs)] #![deny(rustdoc::broken_intra_doc_links)] #![deny(rustdoc::private_intra_doc_links)] use std::net::SocketAddr; use std::sync::atomic::{AtomicUsize, Ordering}; u...
nvidia/nemotron-3.5-lightning-30b-a3b
d69e3a2719ce7808-0
d69e3a2719ce7808
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-block-sync/src/rpc.rs
file
rpc.rs
lightning-block-sync/src/rpc.rs
1
366
366
I need a Rust module providing an RPC client for a Bitcoin Core JSON-RPC endpoint that implements `BlockSource` and `UtxoSource` traits for block sync. It must accept HTTP basic auth credentials and a base URL, generate unique JSON-RPC request IDs via an `AtomicUsize`, send POST requests, and parse JSON responses using...
//! Simple RPC client implementation which implements [`BlockSource`] against a Bitcoin Core RPC //! endpoint. use crate::gossip::UtxoSource; use crate::http::{HttpClient, HttpClientError, JsonResponse, ToParseErrorMessage}; use crate::{BlockData, BlockHeaderData, BlockSource, BlockSourceResult}; use bitcoin::hash_ty...
nvidia/nemotron-3.5-lightning-30b-a3b
3b3a4e01f7fadc72-0
3b3a4e01f7fadc72
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-invoice/src/tb.rs
file
tb.rs
lightning-invoice/src/tb.rs
1
10
10
I need a Rust public trait `Bool` and two public unit structs `True` and `False` that derive `Copy` and `Clone` and implement `Bool`.
pub trait Bool {} #[derive(Copy, Clone)] pub struct True {} #[derive(Copy, Clone)] pub struct False {} impl Bool for True {} impl Bool for False {}
nvidia/nemotron-3.5-lightning-30b-a3b
95ea0e7e78ac73d3-0
95ea0e7e78ac73d3
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/events/mod.rs
file
mod.rs
lightning-liquidity/src/events/mod.rs
1
87
87
I need a Rust module that defines a `LiquidityEvent` enum combining LSPS0 client events, LSPS1 client and service events, LSPS2 client and service events, and LSPS5 client and service events. The enum should derive `Debug`, `Clone`, `PartialEq`, and `Eq`, and include `From` implementations converting each `lsps0::event...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
7be77d82502ad4f4-0
7be77d82502ad4f4
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/util/math.rs
file
math.rs
lightning/src/util/math.rs
1
40
40
I need a Rust module providing three pub(crate) math functions powf64, expf64, and roundf64 that work in both std and no-std builds. Each function takes an f64 and returns f64. When the std feature is active, the function should use the corresponding f64 method (powf, exp, round). When std is disabled, it should call t...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
423e0e6172611605-0
423e0e6172611605
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps0/event.rs
file
event.rs
lightning-liquidity/src/lsps0/event.rs
1
28
28
I need a Rust enum `LSPS0ClientEvent` for a bLIP-50/LSPS0 client that can react to events. It should contain a variant `ListProtocolsResponse` with a field `counterparty_node_id` of type `PublicKey` (from the `bitcoin` crate) and a field `protocols` of type `Vec<u16>`. The enum must derive `Clone`, `Debug`, `PartialEq`...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
c23eb37eaa2f2500-0
c23eb37eaa2f2500
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning/src/sync/nostd_sync.rs
file
nostd_sync.rs
lightning/src/sync/nostd_sync.rs
1
140
140
I need a no_std-compatible Rust module that provides a Mutex and RwLock synchronization primitive, both backed by RefCell for inner mutability and using only core and alloc types. The Mutex should be generic over T: ?Sized and expose new, lock, into_inner, and get_mut methods. lock returns a MutexGuard that carries a R...
use super::{LockHeldState, LockTestExt}; pub use alloc::sync::Arc; use core::cell::{Ref, RefCell, RefMut}; use core::ops::{Deref, DerefMut}; pub type LockResult<Guard> = Result<Guard, ()>; #[derive(Debug)] pub struct Mutex<T: ?Sized> { inner: RefCell<T>, } #[cfg(test)] impl<T: ?Sized> core::panic::RefUnwindSafe for...
nvidia/nemotron-3.5-lightning-30b-a3b
fbc8505fc3698a3f-0
fbc8505fc3698a3f
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps0/mod.rs
file
mod.rs
lightning-liquidity/src/lsps0/mod.rs
1
16
16
I need a Rust module file that serves as the LSPS0 transport layer entry point. It should feature a documentation comment stating `Types and primitives that implement the bLIP-50 / LSPS0: Transport Layer specification`, and re-export five public submodules named `client`, `event`, `msgs`, `ser`, and `service`. The file...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
04aa3e81c16c1e31-0
04aa3e81c16c1e31
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps1/mod.rs
file
mod.rs
lightning-liquidity/src/lsps1/mod.rs
1
16
16
I need a Rust module that provides types and primitives for the bLIP-51 / LSPS1 Channel Request specification, with submodules named client, event, msgs, peer_state, and service.
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
f54f8bb04ca86764-0
f54f8bb04ca86764
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps0/service.rs
file
service.rs
lightning-liquidity/src/lsps0/service.rs
1
128
128
I need a Rust struct that implements the server-side handler for the bLIP-50/LSPS0 protocol. The struct should accept a list of protocol numbers and a concurrent message queue upon construction. Its primary responsibility is to process incoming LSPS0 messages: when a `ListProtocols` request is received, it must create ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
1a3f8e90d850fb6c-0
1a3f8e90d850fb6c
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps1/event.rs
file
event.rs
lightning-liquidity/src/lsps1/event.rs
1
179
179
I'm working on an LSPS1 (bLIP-51) integration in Rust and need a module that defines all the client and server event types. I need two public enums: `LSPS1ClientEvent` and `LSPS1ServiceEvent`. The client enum should have variants for when supported options are successfully returned from the LSP, when that request fails...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
93e54eb967c16ed8-0
93e54eb967c16ed8
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps2/payment_queue.rs
file
payment_queue.rs
lightning-liquidity/src/lsps2/payment_queue.rs
1
172
172
I need a Rust module that implements a payment queue for managing HTLCs in a Lightning Network context. The queue should store payments with their associated HTLCs, allow adding new HTLCs (grouping them by matching payment hash or intercept ID), and support popping the first entry where the total expected outbound amou...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0373cba871465c7b-0
0373cba871465c7b
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps2/event.rs
file
event.rs
lightning-liquidity/src/lsps2/event.rs
1
203
203
I need a Rust module that defines LSPS2 client and service event types for a bLIP-52 implementation. The client events should include: opening parameters readiness with request ID, counterparty node ID, and a menu of fee parameters; invoice parameters readiness with request ID, counterparty node ID, intercept SCID, CLT...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
d1cf04c8122b9348-0
d1cf04c8122b9348
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps2/mod.rs
file
mod.rs
lightning-liquidity/src/lsps2/mod.rs
1
17
17
I need the Rust module file for the LSPS2 (bLIP-52) implementation that declares and documents the submodules for client, event, messages, an internal payment queue, a service layer, and utilities, matching the structure for JIT channel negotiation in a lightning library. Please provide the module with a documentation ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
c7fde462662ee5f3-0
c7fde462662ee5f3
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps0/client.rs
file
client.rs
lightning-liquidity/src/lsps0/client.rs
1
157
157
I need a Rust implementation of an LSPS0 client-side handler for the bLIP-50 protocol. The main type should be `LSPS0ClientHandler<ES, K>` where `ES: EntropySource` and `K: KVStore + Clone`, constructed with an entropy source, a pending message queue, and an event queue. It must implement the `LSPSProtocolMessageHandle...
//! Contains the main bLIP-50 / LSPS0 client-side object, [`LSPS0ClientHandler`]. //! //! Please refer to the [bLIP-50 / LSPS0 //! specifcation](https://github.com/lightning/blips/blob/master/blip-0050.md) for more //! information. use crate::events::EventQueue; use crate::lsps0::event::LSPS0ClientEvent; use crate::ls...
nvidia/nemotron-3.5-lightning-30b-a3b
146245b08add2273-0
146245b08add2273
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lib.rs
file
lib.rs
lightning-liquidity/src/lib.rs
1
79
79
Write the crate root file for a Rust library that provides types and primitives to integrate a spec-compliant LSP with an LDK-based node. The crate should be named `lightning_liquidity` and support the LSPS0–LSPS5 specifications (bLIP-50 through bLIP-55). It must include a `LiquidityManager` type that serves as a `Cust...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
3cc146fc78676098-0
3cc146fc78676098
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps5/mod.rs
file
mod.rs
lightning-liquidity/src/lsps5/mod.rs
1
23
23
I need a Rust module file that implements the LSPS5 webhook registration protocol. It should include a documentation comment stating it implements bLIP-55 and provides functionality for Lightning Service Providers to send webhook notifications and for clients to register webhooks with LSPs, followed by six public modul...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
0eac4fc47fedbc0b-0
0eac4fc47fedbc0b
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps1/client.rs
file
client.rs
lightning-liquidity/src/lsps1/client.rs
1
470
470
I need a complete Rust implementation of an LSPS1 client handler for bLIP-51 support. The struct should be `LSPS1ClientHandler<ES, K>` parameterized by an entropy source and a key-value store, tracking per-peer pending requests for get_info, create_order, and get_order operations. It must expose `new`, `config`, `reque...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
3060511f58ffaf14-0
3060511f58ffaf14
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps5/url_utils.rs
file
url_utils.rs
lightning-liquidity/src/lsps5/url_utils.rs
1
79
79
I need a Rust type `LSPSUrl` that wraps a `bitreq::Url` and is used for LSPS5 webhook notification URLs. It should be constructible via a `parse` method that takes a `String`, validates that the URL scheme is `https`, and returns `LSPS5ProtocolError::UrlParse` if parsing fails or `LSPS5ProtocolError::UnsupportedProtoco...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
f46f037e2503ebf3-0
f46f037e2503ebf3
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps5/service.rs
file
service.rs
lightning-liquidity/src/lsps5/service.rs
1
936
936
Implement a Rust struct LSPS5ServiceHandler that acts as a server-side handler for the LSPS5 webhook registration protocol. It must manage client-registered webhooks with per-client limits (max 10), enforce a 1-minute notification cooldown, and prune webhooks inactive for over 30 days. The struct should handle JSON-RPC...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
e635075fd4bf0800-0
e635075fd4bf0800
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/message_queue.rs
file
message_queue.rs
lightning-liquidity/src/message_queue.rs
1
65
65
I need a thread-safe message queue for LSPS messages in a Rust Lightning project. The type should be called `MessageQueue`, store `(PublicKey, LSPSMessage)` pairs in a `Mutex<VecDeque>`, and use an `Arc<Notifier>` to wake a background processor when new messages arrive. It must provide a `new(pending_msgs_notifier: Arc...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
935a3a502c8486ce-0
935a3a502c8486ce
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps5/validator.rs
file
validator.rs
lightning-liquidity/src/lsps5/validator.rs
1
106
106
I need a Rust implementation of an LSPS5 webhook notification validator. I'm looking for a struct called LSPS5Validator that stores up to 5 recent zbase32-encoded signatures in a mutex-protected VecDeque to prevent replay attacks. It should have a new() method and a validate method that accepts a counterparty node ID (...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
b73be33dac1313b1-0
b73be33dac1313b1
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps2/utils.rs
file
utils.rs
lightning-liquidity/src/lsps2/utils.rs
1
65
65
I need a Rust module implementing LSPS2 utilities for validating and computing opening fees. Specifically, I need three functions: 1. A function that takes a reference to LSPS2 opening fee parameters, a 32-byte promise secret, and a counterparty node public key, computes an HMAC-SHA256 over the serialized node ID and f...
// This file is Copyright its original authors, visible in version control history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. // You may no...
nvidia/nemotron-3.5-lightning-30b-a3b
fc099ab73fac8e5a-0
fc099ab73fac8e5a
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps5/event.rs
file
event.rs
lightning-liquidity/src/lsps5/event.rs
1
235
235
I need a Rust module defining LSPS5 service and client event types. The module should expose two public enums: LSPS5ServiceEvent and LSPS5ClientEvent. LSPS5ServiceEvent must include a variant SendWebhookNotification that carries a counterparty node ID, app name, webhook URL, notification payload, and HTTP headers, with...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
89916c24e3b40c42-0
89916c24e3b40c42
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/persist.rs
file
persist.rs
lightning-liquidity/src/persist.rs
1
210
210
I need an async Rust module that handles persistence operations for a Lightning LiquidityManager. Specifically, I want functions to read a deserialized event queue from a key value store under defined primary and secondary namespaces and keys, and to read and deserialize LSPS1 LSPS2 and LSPS5 service peer states, each ...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
e4d6bc2d4ee57beb-0
e4d6bc2d4ee57beb
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/lsps2/client.rs
file
client.rs
lightning-liquidity/src/lsps2/client.rs
1
405
405
I need a Rust module that implements an `LSPS2ClientHandler` struct for the bLIP-52/LSPS2 protocol, enabling a client to request JIT channel opening parameters and process buy requests for inbound liquidity. The handler must manage per-peer state tracking pending `get_info` and `buy` requests using `HashMap` and `HashS...
// This file is Copyright its original authors, visible in version control // history. // // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // You may...
nvidia/nemotron-3.5-lightning-30b-a3b
1d31865f8d96e6da-0
1d31865f8d96e6da
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-liquidity/src/utils/time.rs
file
time.rs
lightning-liquidity/src/utils/time.rs
1
37
37
I need a Rust module that defines a public TimeProvider trait with a method duration_since_epoch returning core::time::Duration. I also need a struct DefaultTimeProvider with #[derive(Clone, Debug)] and #[cfg(feature = "time")] that implements TimeProvider using std::time::SystemTime::now().duration_since(std::time::UN...
//! Utilities for time handling in LSPS5 service. use core::time::Duration; /// Trait defining a time provider for LSPS5 service. /// /// This trait is used to provide the current time for LSPS5 service operations /// and to convert between timestamps and durations. pub trait TimeProvider { /// Get the current time ...
nvidia/nemotron-3.5-lightning-30b-a3b
72f1b27370d6fdcf-0
72f1b27370d6fdcf
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-payer-proof/uniffi/uniffi-bindgen.rs
file
uniffi-bindgen.rs
lightning-payer-proof/uniffi/uniffi-bindgen.rs
1
3
3
I need a minimal Rust `main` function that serves as the entry point for UNiffi bindgen code generation. It should call `uniffi::uniffi_bindgen_main()` from the `uniffi` crate with no arguments and no return value, allowing the bindgen tool to process the UNiffi interface definition.
fn main() { uniffi::uniffi_bindgen_main() }
nvidia/nemotron-3.5-lightning-30b-a3b
d9f2369547cc43f4-0
d9f2369547cc43f4
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-persister/src/fs_store/mod.rs
file
mod.rs
lightning-persister/src/fs_store/mod.rs
1
6
6
I need a Rust module file that organizes filesystem-backed key-value store implementations. It should have a top-level doc comment describing the module's purpose and declare three submodules: two public versioned modules named `v1` and `v2`, and a `pub(crate)` common module. Generate the module declarations and doc co...
//! Implementations of filesystem-backed key-value stores. pub mod v1; pub mod v2; pub(crate) mod common;
nvidia/nemotron-3.5-lightning-30b-a3b
7905dbec047029cf-0
7905dbec047029cf
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-persister/src/fs_store/common.rs
file
common.rs
lightning-persister/src/fs_store/common.rs
1
885
885
I need a Rust module that implements common utilities for `FilesystemStore` and `FilesystemStoreV2`. The module must define `FilesystemStoreInner` struct managing a data directory, a `tmp_file_counter`, and a `Mutex<HashMap<PathBuf, Arc<RwLock<u64>>>>` for per-path locks. It must also define `FilesystemStoreState` with...
//! Common utilities shared between [`FilesystemStore`] and [`FilesystemStoreV2`] implementations. //! //! [`FilesystemStore`]: crate::fs_store::v1::FilesystemStore //! [`FilesystemStoreV2`]: crate::fs_store::v2::FilesystemStoreV2 use crate::utils::{check_namespace_key_validity, is_valid_kvstore_str}; use lightning::...
nvidia/nemotron-3.5-lightning-30b-a3b
80f9b988001738a5-0
80f9b988001738a5
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-persister/src/lib.rs
file
lib.rs
lightning-persister/src/lib.rs
1
16
16
I need a Rust library source file for an LDK data persistence module. The file must start with documentation describing it as providing utilities for LDK data persistence and retrieval. It should enforce three Rustdoc restrictions: deny broken intra-doc links, deny private intra-doc links, and require missing docs. Add...
//! Provides utilities for LDK data persistence and retrieval. #![deny(rustdoc::broken_intra_doc_links)] #![deny(rustdoc::private_intra_doc_links)] #![deny(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(ldk_bench)] extern crate criterion; pub mod fs_store; mod utils; #[cfg(test)] mod test_utils;
nvidia/nemotron-3.5-lightning-30b-a3b
e91100c6d63b06aa-0
e91100c6d63b06aa
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-payer-proof/uniffi/build.rs
file
build.rs
lightning-payer-proof/uniffi/build.rs
1
3
3
I'm setting up Uniffi code generation in a Rust project and need a `build.rs` main function that invokes `uniffi::generate_scaffolding` on a UDL interface file and panics at build time if the generation fails. Can you provide that function?
fn main() { uniffi::generate_scaffolding("src/interface.udl").unwrap(); }
nvidia/nemotron-3.5-lightning-30b-a3b
608f097f610ec89d-0
608f097f610ec89d
lightningdevkit/rust-lightning
https://github.com/lightningdevkit/rust-lightning
48e8d4745e5fd54398e24bcce2921c2b075f99c5
Apache-2.0 OR MIT
lightning-tests/src/lib.rs
file
lib.rs
lightning-tests/src/lib.rs
1
5
5
I need a Rust source file for a project using the lightning crate that imports the crate with test-mode macro support and declares a test module named upgrade_downgrade_tests for testing upgrade and downgrade functionality.
#[cfg_attr(test, macro_use)] extern crate lightning; #[cfg(test)] pub mod upgrade_downgrade_tests;
nvidia/nemotron-3.5-lightning-30b-a3b