diff --git a/bindings/uniffi-bindgen/src/main.rs b/bindings/uniffi-bindgen/src/main.rs index 2aea96784..a71a3e914 100644 --- a/bindings/uniffi-bindgen/src/main.rs +++ b/bindings/uniffi-bindgen/src/main.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + fn main() { uniffi::uniffi_bindgen_main() } diff --git a/build.rs b/build.rs index 087855111..f011148e7 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + fn main() { #[cfg(feature = "uniffi")] uniffi::generate_scaffolding("bindings/ldk_node.udl").unwrap(); diff --git a/src/balance.rs b/src/balance.rs index f1c95dcbe..1f061cded 100644 --- a/src/balance.rs +++ b/src/balance.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::sweep::value_satoshis_from_descriptor; use lightning::chain::channelmonitor::Balance as LdkBalance; diff --git a/src/builder.rs b/src/builder.rs index a2a93aa79..fc9f839b0 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::config::{ default_user_config, Config, BDK_CLIENT_CONCURRENCY, BDK_CLIENT_STOP_GAP, DEFAULT_ESPLORA_CLIENT_TIMEOUT_SECS, DEFAULT_ESPLORA_SERVER_URL, WALLET_KEYS_SEED_LEN, diff --git a/src/config.rs b/src/config.rs index f0c2c856b..fac25b562 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::payment::SendingParameters; use lightning::ln::msgs::SocketAddress; diff --git a/src/connection.rs b/src/connection.rs index 9d956d6be..5f665f77e 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::logger::{log_error, log_info, Logger}; use crate::types::PeerManager; use crate::Error; diff --git a/src/error.rs b/src/error.rs index deaf6db31..660c2036e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use std::fmt; #[derive(Copy, Clone, Debug, PartialEq, Eq)] diff --git a/src/event.rs b/src/event.rs index d76f0b05e..1f4b2e117 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::types::{DynStore, Sweeper, Wallet}; use crate::{ diff --git a/src/fee_estimator.rs b/src/fee_estimator.rs index b023ae964..857106aa3 100644 --- a/src/fee_estimator.rs +++ b/src/fee_estimator.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::config::FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS; use crate::logger::{log_error, log_trace, Logger}; use crate::{Config, Error}; diff --git a/src/gossip.rs b/src/gossip.rs index 1241b0cdc..450b5b5ee 100644 --- a/src/gossip.rs +++ b/src/gossip.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::config::RGS_SYNC_TIMEOUT_SECS; use crate::logger::{log_trace, FilesystemLogger, Logger}; use crate::types::{GossipSync, Graph, P2PGossipSync, RapidGossipSync}; diff --git a/src/graph.rs b/src/graph.rs index 79a21853d..520be99db 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Objects for querying the network graph. use crate::types::Graph; diff --git a/src/hex_utils.rs b/src/hex_utils.rs index 1b50c5647..d56c6fd99 100644 --- a/src/hex_utils.rs +++ b/src/hex_utils.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use std::fmt::Write; #[cfg(feature = "uniffi")] diff --git a/src/io/mod.rs b/src/io/mod.rs index d545f6b93..c65ab1d3b 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Objects and traits for data persistence. pub mod sqlite_store; diff --git a/src/io/sqlite_store/migrations.rs b/src/io/sqlite_store/migrations.rs index 6d108185a..0486b8a4f 100644 --- a/src/io/sqlite_store/migrations.rs +++ b/src/io/sqlite_store/migrations.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use rusqlite::Connection; use lightning::io; diff --git a/src/io/sqlite_store/mod.rs b/src/io/sqlite_store/mod.rs index 607105509..c1eac84b4 100644 --- a/src/io/sqlite_store/mod.rs +++ b/src/io/sqlite_store/mod.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Objects related to [`SqliteStore`] live here. use crate::io::utils::check_namespace_key_validity; diff --git a/src/io/test_utils.rs b/src/io/test_utils.rs index cf3da452d..c4610b4f5 100644 --- a/src/io/test_utils.rs +++ b/src/io/test_utils.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use lightning::ln::functional_test_utils::{ connect_block, create_announced_chan_between_nodes, create_chanmon_cfgs, create_dummy_block, create_network, create_node_cfgs, create_node_chanmgrs, send_payment, diff --git a/src/io/utils.rs b/src/io/utils.rs index 77cc56f55..29484273c 100644 --- a/src/io/utils.rs +++ b/src/io/utils.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use super::*; use crate::config::WALLET_KEYS_SEED_LEN; diff --git a/src/io/vss_store.rs b/src/io/vss_store.rs index 426af1fbb..ec8f04b64 100644 --- a/src/io/vss_store.rs +++ b/src/io/vss_store.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use io::Error; use std::io; use std::io::ErrorKind; diff --git a/src/lib.rs b/src/lib.rs index f777b07d1..0148cf8d4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,9 @@ -// This file is Copyright its original authors, visible in version contror -// history. +// This file is Copyright its original authors, visible in version control history. // -// This file is licensed under the Apache License, Version 2.0 or the MIT license -// , at your option. -// You may not use this file except in accordance with one or both of these -// licenses. +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. #![crate_name = "ldk_node"] diff --git a/src/liquidity.rs b/src/liquidity.rs index 00e9f5717..1dfb5453a 100644 --- a/src/liquidity.rs +++ b/src/liquidity.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::logger::{log_debug, log_error, log_info, Logger}; use crate::types::{ChannelManager, KeysManager, LiquidityManager, PeerManager}; use crate::{Config, Error}; diff --git a/src/logger.rs b/src/logger.rs index 5f8627e07..2be20a165 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + pub(crate) use lightning::util::logger::Logger; pub(crate) use lightning::{log_bytes, log_debug, log_error, log_info, log_trace}; diff --git a/src/message_handler.rs b/src/message_handler.rs index 89d67d846..18dfa8637 100644 --- a/src/message_handler.rs +++ b/src/message_handler.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::liquidity::LiquiditySource; use lightning::ln::features::{InitFeatures, NodeFeatures}; diff --git a/src/payment/bolt11.rs b/src/payment/bolt11.rs index 07823a17b..b7f72355b 100644 --- a/src/payment/bolt11.rs +++ b/src/payment/bolt11.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Holds a payment handler allowing to create and pay [BOLT 11] invoices. //! //! [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md diff --git a/src/payment/bolt12.rs b/src/payment/bolt12.rs index 577dc92ae..9ec7bde34 100644 --- a/src/payment/bolt12.rs +++ b/src/payment/bolt12.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Holds a payment handler allowing to create and pay [BOLT 12] offers and refunds. //! //! [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md diff --git a/src/payment/mod.rs b/src/payment/mod.rs index f118f3fc8..5c99cfcf8 100644 --- a/src/payment/mod.rs +++ b/src/payment/mod.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Objects for different types of payments. mod bolt11; diff --git a/src/payment/onchain.rs b/src/payment/onchain.rs index 5c1365de3..a3cc0d2f2 100644 --- a/src/payment/onchain.rs +++ b/src/payment/onchain.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Holds a payment handler allowing to send and receive on-chain payments. use crate::config::Config; diff --git a/src/payment/spontaneous.rs b/src/payment/spontaneous.rs index b7b8dcc03..3be244bb5 100644 --- a/src/payment/spontaneous.rs +++ b/src/payment/spontaneous.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! Holds a payment handler allowing to send spontaneous ("keysend") payments. use crate::config::{Config, LDK_PAYMENT_RETRY_TIMEOUT}; diff --git a/src/payment/store.rs b/src/payment/store.rs index 3c35043ce..0cea18002 100644 --- a/src/payment/store.rs +++ b/src/payment/store.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::hex_utils; use crate::io::{ PAYMENT_INFO_PERSISTENCE_PRIMARY_NAMESPACE, PAYMENT_INFO_PERSISTENCE_SECONDARY_NAMESPACE, diff --git a/src/payment/unified_qr.rs b/src/payment/unified_qr.rs index b93610115..66488e232 100644 --- a/src/payment/unified_qr.rs +++ b/src/payment/unified_qr.rs @@ -1,11 +1,9 @@ -// This file is Copyright its original authors, visible in version control -// history. +// This file is Copyright its original authors, visible in version control history. // -// This file is licensed under the Apache License, Version 2.0 or the MIT license -// , at your option. -// You may not use this file except in accordance with one or both of these -// licenses. +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. //! Holds a payment handler allowing to create [BIP 21] URIs with an on-chain, [BOLT 11], and [BOLT 12] payment //! options. diff --git a/src/peer_store.rs b/src/peer_store.rs index 21bd50872..d4d6bbb97 100644 --- a/src/peer_store.rs +++ b/src/peer_store.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::io::{ PEER_INFO_PERSISTENCE_KEY, PEER_INFO_PERSISTENCE_PRIMARY_NAMESPACE, PEER_INFO_PERSISTENCE_SECONDARY_NAMESPACE, diff --git a/src/sweep.rs b/src/sweep.rs index 1c772d4e9..5c1d62a20 100644 --- a/src/sweep.rs +++ b/src/sweep.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + //! The output sweeper used to live here before we upstreamed it to `rust-lightning` and migrated //! to the upstreamed version with LDK Node v0.3.0 (May 2024). We should drop this module entirely //! once sufficient time has passed for us to be confident any users completed the migration. diff --git a/src/tx_broadcaster.rs b/src/tx_broadcaster.rs index 4492bcfc6..88415ba46 100644 --- a/src/tx_broadcaster.rs +++ b/src/tx_broadcaster.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::config::TX_BROADCAST_TIMEOUT_SECS; use crate::logger::{log_bytes, log_error, log_trace, Logger}; diff --git a/src/types.rs b/src/types.rs index abc015ce4..591b73b4d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::logger::FilesystemLogger; use crate::message_handler::NodeCustomMessageHandler; diff --git a/src/uniffi_types.rs b/src/uniffi_types.rs index 566ef8d72..17e5713d9 100644 --- a/src/uniffi_types.rs +++ b/src/uniffi_types.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + // Importing these items ensures they are accessible in the uniffi bindings // without introducing unused import warnings in lib.rs. // diff --git a/src/wallet.rs b/src/wallet.rs index 996ec57da..6da08715c 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + use crate::logger::{log_error, log_info, log_trace, Logger}; use crate::config::BDK_WALLET_SYNC_TIMEOUT_SECS; diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 6c4dbc1d1..09c17dcf2 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + #![cfg(any(test, cln_test, vss_test))] #![allow(dead_code)] diff --git a/tests/integration_tests_cln.rs b/tests/integration_tests_cln.rs index 95d8f1136..bcb84833f 100644 --- a/tests/integration_tests_cln.rs +++ b/tests/integration_tests_cln.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + #![cfg(cln_test)] mod common; diff --git a/tests/integration_tests_rust.rs b/tests/integration_tests_rust.rs index b3788f9d4..6b5b405dd 100644 --- a/tests/integration_tests_rust.rs +++ b/tests/integration_tests_rust.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + mod common; use common::{ diff --git a/tests/integration_tests_vss.rs b/tests/integration_tests_vss.rs index 2a57ccffc..c572fbcd8 100644 --- a/tests/integration_tests_vss.rs +++ b/tests/integration_tests_vss.rs @@ -1,3 +1,10 @@ +// This file is Copyright its original authors, visible in version control history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license , at your option. You may not use this file except in +// accordance with one or both of these licenses. + #![cfg(vss_test)] mod common;