repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/payout_curve/examples/payout_curve_csv.rs
crates/payout_curve/examples/payout_curve_csv.rs
#![allow(clippy::unwrap_used)] use anyhow::Context; use anyhow::Result; use bitcoin::Amount; use dlc_manager::payout_curve::PayoutFunction; use dlc_manager::payout_curve::PayoutFunctionPiece; use dlc_manager::payout_curve::PolynomialPayoutCurvePiece; use dlc_manager::payout_curve::RoundingInterval; use dlc_manager::pa...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/dev-maker/src/logger.rs
crates/dev-maker/src/logger.rs
use anyhow::Context; use anyhow::Result; use time::macros::format_description; use tracing::metadata::LevelFilter; use tracing_subscriber::filter::Directive; use tracing_subscriber::fmt::time::UtcTime; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; use tracing_subscriber:...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/dev-maker/src/orderbook_client.rs
crates/dev-maker/src/orderbook_client.rs
use anyhow::Result; use reqwest::Client; use reqwest::Url; use secp256k1::SecretKey; use uuid::Uuid; use xxi_node::commons::ChannelOpeningParams; use xxi_node::commons::NewOrder; use xxi_node::commons::NewOrderRequest; #[derive(Clone)] pub struct OrderbookClient { url: Url, client: Client, } impl OrderbookCli...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/dev-maker/src/main.rs
crates/dev-maker/src/main.rs
use crate::logger::init_tracing; use crate::orderbook_client::OrderbookClient; use anyhow::Result; use clap::Parser; use reqwest::Url; use rust_decimal::Decimal; use secp256k1::rand; use secp256k1::PublicKey; use secp256k1::SecretKey; use secp256k1::SECP256K1; use std::str::FromStr; use std::time::Duration; use time::O...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/dev-maker/src/historic_rates.rs
crates/dev-maker/src/historic_rates.rs
use rust_decimal::Decimal; use serde::Deserialize; use std::fs::File; use std::io::BufReader; use time::OffsetDateTime; #[derive(Deserialize, Debug)] pub(crate) struct HistoricRate { #[serde(with = "time::serde::rfc3339")] pub timestamp: OffsetDateTime, pub open: Decimal, } pub fn read() -> Vec<HistoricRa...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/orderbook-client/src/lib.rs
crates/orderbook-client/src/lib.rs
use anyhow::anyhow; use anyhow::Context; use anyhow::Result; use async_stream::stream; use futures::stream::SplitSink; use futures::SinkExt; use futures::Stream; use futures::StreamExt; use secp256k1::Message; use tokio_tungstenite_wasm as tungstenite; use tokio_tungstenite_wasm::WebSocketStream; use xxi_node::commons:...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/orderbook-client/examples/authenticated.rs
crates/orderbook-client/examples/authenticated.rs
use anyhow::Result; use futures::never::Never; use futures::TryStreamExt; use secp256k1::SecretKey; use secp256k1::SECP256K1; use std::time::Duration; use xxi_node::commons::Signature; #[tokio::main] async fn main() -> Result<Never> { tracing_subscriber::fmt() .with_env_filter("info,orderbook_client=trace"...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/src/lib.rs
crates/lnd-bridge/src/lib.rs
use anyhow::anyhow; use anyhow::Context; use anyhow::Result; use async_stream::stream; use futures::Stream; use futures::StreamExt; use reqwest::Method; use serde::Deserialize; use serde::Serialize; use serde::Serializer; use tokio_tungstenite::tungstenite; use tokio_tungstenite::tungstenite::client::IntoClientRequest;...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/examples/create_invoice_api.rs
crates/lnd-bridge/examples/create_invoice_api.rs
use anyhow::Result; use base64::engine::general_purpose; use base64::Engine; use lnd_bridge::InvoiceParams; use rand::Rng; use sha2::Digest; use sha2::Sha256; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,lnd_bridge=trace") .init(); let macaroo...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/examples/cancel_invoice_api.rs
crates/lnd-bridge/examples/cancel_invoice_api.rs
use anyhow::Result; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,lnd_bridge=trace") .init(); let macaroon = "[enter macroon here]".to_string(); let lnd_bridge = lnd_bridge::LndBridge::new("localhost:18080".to_string(), macaroon, false); ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/examples/subscribe_invoice_api.rs
crates/lnd-bridge/examples/subscribe_invoice_api.rs
use anyhow::Result; use futures_util::TryStreamExt; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,lnd_bridge=trace") .init(); let macaroon = "[enter macaroon here]".to_string(); let lnd_bridge = lnd_bridge::LndBridge::new("localhost:18080"....
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/examples/settle_invoice_api.rs
crates/lnd-bridge/examples/settle_invoice_api.rs
use anyhow::Result; use base64::engine::general_purpose; use base64::Engine; use sha2::Digest; use sha2::Sha256; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,lnd_bridge=trace") .init(); let macaroon = "[enter macaroon here]".to_string(); l...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/lnd-bridge/examples/mock.rs
crates/lnd-bridge/examples/mock.rs
use anyhow::Context; use anyhow::Result; use axum::extract::ws::Message; use axum::extract::ws::WebSocketUpgrade; use axum::extract::Extension; use axum::extract::Json; use axum::extract::Query; use axum::extract::State; use axum::http::HeaderMap; use axum::http::StatusCode; use axum::response::IntoResponse; use axum::...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-client/src/lib.rs
crates/bitmex-client/src/lib.rs
pub mod client; pub mod models;
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-client/src/client.rs
crates/bitmex-client/src/client.rs
use crate::models::ContractSymbol; use crate::models::ContractSymbol::XbtUsd; use crate::models::GetInstrumentRequest; use crate::models::GetPositionRequest; use crate::models::Instrument; use crate::models::Network; use crate::models::OrdType; use crate::models::Order; use crate::models::Position; use crate::models::P...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-client/src/models.rs
crates/bitmex-client/src/models.rs
use reqwest::Method; use serde::de::DeserializeOwned; use serde::Deserialize; use serde::Serialize; use time::OffsetDateTime; use uuid::Uuid; pub enum Network { Mainnet, Testnet, } impl Network { pub fn to_url(&self) -> String { match self { Network::Mainnet => "https://www.bitmex.com/...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-client/examples/example.rs
crates/bitmex-client/examples/example.rs
use bitmex_client::client::Client; use bitmex_client::models::ContractSymbol; use bitmex_client::models::Network; use bitmex_client::models::Side; #[tokio::main] async fn main() { let api_key = "some_api_key"; let api_secret = "some_secret"; let client = Client::new(Network::Testnet).with_credentials(api_...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/setup.rs
crates/tests-e2e/src/setup.rs
use crate::app::refresh_wallet_info; use crate::app::run_app; use crate::app::submit_channel_opening_order; use crate::app::AppHandle; use crate::bitcoind::Bitcoind; use crate::coordinator::Coordinator; use crate::http::init_reqwest; use crate::logger::init_tracing; use crate::wait_until; use bitcoin::address::NetworkU...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/app.rs
crates/tests-e2e/src/app.rs
use crate::bitcoind::Bitcoind; use crate::test_subscriber::TestSubscriber; use crate::test_subscriber::ThreadSafeSenders; use crate::wait_until; use native::api; use native::api::DlcChannel; use native::trade::order::api::NewOrder; use tempfile::TempDir; use tokio::task::block_in_place; pub struct AppHandle { pub ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/lib.rs
crates/tests-e2e/src/lib.rs
#![allow(clippy::unwrap_used)] pub mod app; pub mod bitcoind; pub mod coordinator; pub mod http; pub mod lnd_mock; pub mod logger; pub mod setup; pub mod test_flow; pub mod test_subscriber;
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/http.rs
crates/tests-e2e/src/http.rs
use reqwest::Client; pub fn init_reqwest() -> Client { Client::builder() .timeout(std::time::Duration::from_secs(30)) .build() .unwrap() }
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/lnd_mock.rs
crates/tests-e2e/src/lnd_mock.rs
use anyhow::Context; use anyhow::Result; use reqwest::Client; use serde::Serialize; /// A wrapper over the lnd mock HTTP API. /// /// It does not aim to be complete, functionality will be added as needed. pub struct LndMock { client: Client, host: String, } impl LndMock { pub fn new(client: Client, host: ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/test_subscriber.rs
crates/tests-e2e/src/test_subscriber.rs
use native::api::ContractSymbol; use native::event::api::WalletInfo; use native::event::subscriber::Subscriber; use native::event::EventType; use native::health::Service; use native::health::ServiceStatus; use native::health::ServiceUpdate; use native::trade::order::Order; use native::trade::position::Position; use par...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/logger.rs
crates/tests-e2e/src/logger.rs
use std::sync::Once; pub fn init_tracing() { static TRACING_TEST_SUBSCRIBER: Once = Once::new(); TRACING_TEST_SUBSCRIBER.call_once(|| { tracing_subscriber::fmt() .with_env_filter( "debug,\ hyper=warn,\ reqwest=warn,\ rustls...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/bitcoind.rs
crates/tests-e2e/src/bitcoind.rs
use anyhow::bail; use anyhow::Result; use bitcoin::address::NetworkUnchecked; use bitcoin::Address; use bitcoin::Amount; use reqwest::Client; use reqwest::Response; use serde::Deserialize; use serde_json::json; use std::time::Duration; /// A wrapper over the bitcoind HTTP API /// /// It does not aim to be complete, fu...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/test_flow.rs
crates/tests-e2e/src/test_flow.rs
/// Waits until the specified condition is met #[macro_export] macro_rules! wait_until { ($expr:expr) => { // Waiting time for the time on the watch channel before returning error let next_wait_time: std::time::Duration = std::time::Duration::from_secs(120); let result = tokio::time::timeou...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/src/coordinator.rs
crates/tests-e2e/src/coordinator.rs
use anyhow::Context; use anyhow::Result; use bitcoin::address::NetworkUnchecked; use bitcoin::Address; use native::api::ContractSymbol; use reqwest::Client; use rust_decimal::Decimal; use serde::Deserialize; use serde::Serialize; use time::OffsetDateTime; /// A wrapper over the coordinator HTTP API. /// /// It does no...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_close_position.rs
crates/tests-e2e/tests/e2e_close_position.rs
#![allow(clippy::unwrap_used)] use native::api; use native::api::ContractSymbol; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use native::trade::position::PositionState; use tests_e2e::app::submit_order; use tests_e2e::coordinator::SignedChannelState; use tests_e2e::setup; use tes...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_force_close_settled_channel.rs
crates/tests-e2e/tests/e2e_force_close_settled_channel.rs
#![allow(clippy::unwrap_used)] use native::api::ChannelState; use native::api::Direction; use native::api::SignedChannelState; use tests_e2e::app::force_close_dlc_channel; use tests_e2e::app::get_dlc_channels; use tests_e2e::app::refresh_wallet_info; use tests_e2e::app::submit_order; use tests_e2e::setup; use tests_e2...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_basic.rs
crates/tests-e2e/tests/e2e_basic.rs
use anyhow::Result; use tests_e2e::setup::TestSetup; #[tokio::test(flavor = "multi_thread")] #[ignore = "need to be run with 'just e2e' command"] async fn app_can_be_funded_with_bitcoind() -> Result<()> { TestSetup::new_after_funding().await; Ok(()) }
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_collaborative_close_channel.rs
crates/tests-e2e/tests/e2e_collaborative_close_channel.rs
#![allow(clippy::unwrap_used)] use native::api; use tests_e2e::app::refresh_wallet_info; use tests_e2e::setup; use tests_e2e::setup::dummy_order; use tests_e2e::wait_until; use tokio::task::spawn_blocking; #[tokio::test(flavor = "multi_thread")] #[ignore = "need to be run with 'just e2e' command"] async fn can_open_a...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_collaborative_revert.rs
crates/tests-e2e/tests/e2e_collaborative_revert.rs
#![allow(clippy::unwrap_used)] use native::api::PaymentFlow; use native::api::WalletHistoryItemType; use rust_decimal_macros::dec; use tests_e2e::app::get_dlc_channel_id; use tests_e2e::app::refresh_wallet_info; use tests_e2e::coordinator::CollaborativeRevertCoordinatorRequest; use tests_e2e::setup; use tests_e2e::wai...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_open_position.rs
crates/tests-e2e/tests/e2e_open_position.rs
use native::api; use native::api::ContractSymbol; use native::health::Service; use native::health::ServiceStatus; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use native::trade::position::PositionState; use tests_e2e::app::submit_channel_opening_order; use tests_e2e::setup::TestSet...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_restore_from_backup.rs
crates/tests-e2e/tests/e2e_restore_from_backup.rs
use native::api; use native::trade::position::PositionState; use tests_e2e::app::run_app; use tests_e2e::app::submit_order; use tests_e2e::logger::init_tracing; use tests_e2e::setup; use tests_e2e::setup::dummy_order; use tests_e2e::wait_until; use tokio::task::spawn_blocking; #[tokio::test(flavor = "multi_thread")] #...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_force_close_position.rs
crates/tests-e2e/tests/e2e_force_close_position.rs
#![allow(clippy::unwrap_used)] use native::api::ChannelState; use native::api::SignedChannelState; use tests_e2e::app::force_close_dlc_channel; use tests_e2e::app::get_dlc_channels; use tests_e2e::setup; use tests_e2e::wait_until; #[tokio::test(flavor = "multi_thread")] #[ignore = "need to be run with 'just e2e' comm...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_rollover_position.rs
crates/tests-e2e/tests/e2e_rollover_position.rs
#![allow(clippy::unwrap_used)] use bitcoin::Network; use native::api; use native::api::ChannelState; use native::api::SignedChannelState; use native::trade::position; use position::PositionState; use rust_decimal_macros::dec; use tests_e2e::app::force_close_dlc_channel; use tests_e2e::app::get_dlc_channels; use tests_...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_open_position_small_utxos.rs
crates/tests-e2e/tests/e2e_open_position_small_utxos.rs
use bitcoin::Amount; use native::api; use native::api::calculate_margin; use native::api::ContractSymbol; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use native::trade::position::PositionState; use rust_decimal::prelude::ToPrimitive; use std::str::FromStr; use tests_e2e::app::refr...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_resize_position.rs
crates/tests-e2e/tests/e2e_resize_position.rs
#![allow(clippy::unwrap_used)] use native::api::ContractSymbol; use native::api::Direction; use native::api::PaymentFlow; use native::api::WalletHistoryItemType; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use tests_e2e::app::submit_order; use tests_e2e::setup; use tests_e2e::set...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_reject_offer.rs
crates/tests-e2e/tests/e2e_reject_offer.rs
use bitcoin::Amount; use native::api; use native::api::ContractSymbol; use native::health::Service; use native::health::ServiceStatus; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use native::trade::order::OrderState; use native::trade::position::PositionState; use std::time::Durat...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/tests-e2e/tests/e2e_open_position_with_external_funding.rs
crates/tests-e2e/tests/e2e_open_position_with_external_funding.rs
use bitcoin::Amount; use native::api; use native::api::ContractSymbol; use native::health::Service; use native::health::ServiceStatus; use native::trade::order::api::NewOrder; use native::trade::order::api::OrderType; use native::trade::position::PositionState; use std::time::Duration; use tests_e2e::app::submit_unfund...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-stream/src/lib.rs
crates/bitmex-stream/src/lib.rs
use crate::tungstenite::http::Method; use anyhow::anyhow; use anyhow::Context; use anyhow::Result; use async_stream::stream; use futures::SinkExt; use futures::Stream; use futures::StreamExt; use serde::ser::SerializeTuple; use serde::Serialize; use serde_json::to_string; use std::ops::Add; use std::time::Duration; use...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-stream/examples/xbt_usd_quote_testnet.rs
crates/bitmex-stream/examples/xbt_usd_quote_testnet.rs
use anyhow::Result; use bitmex_stream::Network; use futures::TryStreamExt; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,bitmex_stream=trace") .init(); let mut stream = bitmex_stream::subscribe(["quoteBin1m:XBTUSD".to_owned()], Network::Testnet...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-stream/examples/authenticated_api.rs
crates/bitmex-stream/examples/authenticated_api.rs
use anyhow::Result; use bitmex_stream::Credentials; use bitmex_stream::Network; use futures::TryStreamExt; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,bitmex_stream=trace") .init(); let mut stream = bitmex_stream::subscribe_with_credentials( ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/bitmex-stream/examples/xbt_usd_quote.rs
crates/bitmex-stream/examples/xbt_usd_quote.rs
use anyhow::Result; use bitmex_stream::Network; use futures::TryStreamExt; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter("info,bitmex_stream=trace") .init(); let mut stream = bitmex_stream::subscribe(["quoteBin1m:XBTUSD".to_owned()], Network::Mainnet...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/crates/mempool/src/lib.rs
crates/mempool/src/lib.rs
use anyhow::Result; use serde::Deserialize; const MEMPOOL_FEE_RATE_URL_MAINNET: &str = "https://mempool.space"; const MEMPOOL_FEE_RATE_URL_SIGNET: &str = "https://mempool.space/signet"; const MEMPOOL_FEE_RATE_URL_TESTNET: &str = "https://mempool.space/testnet"; #[derive(Deserialize, Debug)] #[serde(rename_all = "came...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/build.rs
coordinator/build.rs
use std::process::Command; fn main() { let output = Command::new("git") .args(["rev-parse", "HEAD"]) .output() .expect("To be able to get commit hash"); let git_hash = String::from_utf8(output.stdout).expect("To be a valid string"); let output = Command::new("git") .args(["re...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/dlc_protocol.rs
coordinator/src/dlc_protocol.rs
use crate::db; use crate::funding_fee::insert_protocol_funding_fee_event; use crate::funding_fee::mark_funding_fee_event_as_paid; use crate::position::models::PositionState; use crate::trade::models::NewTrade; use crate::trade::websocket::InternalPositionUpdateMessage; use anyhow::Context; use anyhow::Result; use bitco...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/leaderboard.rs
coordinator/src/leaderboard.rs
use crate::db; use crate::position::models::Position; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::r2d2::ConnectionManager; use diesel::r2d2::PooledConnection; use diesel::PgConnection; use rust_decimal::prelude::FromPrimitive; use rust_decimal::Decimal; use serde::Deserialize; use serde::Serializ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/settings.rs
coordinator/src/settings.rs
use crate::funding_fee::IndexPriceSource; use crate::node::NodeSettings; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use serde::Deserialize; use serde::Serialize; use std::path::Path; use std::path::PathBuf; use tokio::fs; use tokio::io::AsyncWriteExt; use xxi_node::node::XXINodeSettings...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/referrals.rs
coordinator/src/referrals.rs
use crate::db; use crate::db::bonus_status::BonusType; use crate::db::bonus_tiers::BonusTier; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::r2d2::ConnectionManager; use diesel::r2d2::PooledConnection; use diesel::PgConnection; use rust_decimal::prelude::FromPrimitive; use rust_...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node.rs
coordinator/src/node.rs
use crate::db; use crate::dlc_protocol; use crate::message::OrderbookMessage; use crate::node::storage::NodeStorage; use crate::position::models::PositionState; use crate::storage::CoordinatorTenTenOneStorage; use crate::trade::websocket::InternalPositionUpdateMessage; use anyhow::bail; use anyhow::Context; use anyhow:...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/lib.rs
coordinator/src/lib.rs
use anyhow::anyhow; use anyhow::Result; use axum::http::StatusCode; use axum::response::IntoResponse; use axum::response::Response; use axum::Json; use bitcoin::Amount; use diesel::PgConnection; use diesel_migrations::embed_migrations; use diesel_migrations::EmbeddedMigrations; use diesel_migrations::MigrationHarness; ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/check_version.rs
coordinator/src/check_version.rs
use crate::db; use crate::db::user::User; use anyhow::ensure; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::PgConnection; use semver::Comparator; use semver::Op; use semver::Version; use semver::VersionReq; pub fn check_version(conn: &mut PgConnection, trader_id: &PublicKey) -...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/payout_curve.rs
coordinator/src/payout_curve.rs
use anyhow::ensure; use anyhow::Context; use anyhow::Result; use bitcoin::Amount; use dlc_manager::contract::numerical_descriptor::NumericalDescriptor; use dlc_manager::contract::ContractDescriptor; use dlc_manager::payout_curve::PayoutFunction; use dlc_manager::payout_curve::PayoutFunctionPiece; use dlc_manager::payou...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/logger.rs
coordinator/src/logger.rs
use anyhow::Context; use anyhow::Result; use time::macros::format_description; use tracing::metadata::LevelFilter; use tracing_subscriber::filter::Directive; use tracing_subscriber::fmt::time::UtcTime; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; use tracing_subscriber:...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/emergency_kit.rs
coordinator/src/emergency_kit.rs
use crate::node::Node; use crate::orderbook::db; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin_old::secp256k1::SecretKey; use dlc_manager::Signer; use dlc_messages::channel::RenewRevoke; use lightning::ln::chan_utils::build_commitment_secret; use xxi_node::commons::OrderState; ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/campaign.rs
coordinator/src/campaign.rs
use crate::notifications::Notification; use crate::notifications::NotificationKind; use crate::routes::AppState; use crate::AppError; use axum::extract::State; use axum::Json; use bitcoin::secp256k1::PublicKey; use serde::Deserialize; use serde::Serialize; use std::sync::Arc; use tracing::instrument; #[derive(Debug, C...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/cli.rs
coordinator/src/cli.rs
use anyhow::Result; use bitcoin::secp256k1::XOnlyPublicKey; use clap::Parser; use std::env::current_dir; use std::net::SocketAddr; use std::path::PathBuf; use std::str::FromStr; use xxi_node::node::OracleInfo; #[derive(Parser)] pub struct Opts { /// The address to listen on for the lightning and dlc peer2peer API....
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/funding_fee.rs
coordinator/src/funding_fee.rs
use crate::decimal_from_f32; use crate::message::OrderbookMessage; use crate::FundingFee; use anyhow::bail; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use bitcoin::SignedAmount; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; u...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/storage.rs
coordinator/src/storage.rs
use std::fs; use std::path::PathBuf; use std::sync::Arc; use xxi_node::storage::sled::SledStorageProvider; use xxi_node::storage::DlcStoreProvider; use xxi_node::storage::KeyValue; #[derive(Clone)] pub struct CoordinatorTenTenOneStorage { pub dlc_storage: Arc<SledStorageProvider>, pub data_dir: String, } impl...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/schema.rs
coordinator/src/schema.rs
// @generated automatically by Diesel CLI. pub mod sql_types { #[derive(diesel::sql_types::SqlType)] #[diesel(postgres_type(name = "BonusStatus_Type"))] pub struct BonusStatusType; #[derive(diesel::sql_types::SqlType)] #[diesel(postgres_type(name = "ChannelState_Type"))] pub struct ChannelStat...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/backup.rs
coordinator/src/backup.rs
use anyhow::Result; use bitcoin::secp256k1::PublicKey; use sled::Db; use xxi_node::commons::Backup; use xxi_node::commons::DeleteBackup; use xxi_node::commons::Restore; const BACKUPS_DIRECTORY: &str = "user_backups"; /// Holds the user backups in a sled database /// /// TODO(holzeis): This is fine for now, once we gr...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/metrics.rs
coordinator/src/metrics.rs
use crate::db; use crate::node::Node; use anyhow::Result; use diesel::r2d2::ConnectionManager; use diesel::r2d2::PooledConnection; use diesel::PgConnection; pub fn collect_metrics( mut conn: PooledConnection<ConnectionManager<PgConnection>>, node: Node, ) -> Result<()> { let balance = node.inner.wallet().g...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/collaborative_revert.rs
coordinator/src/collaborative_revert.rs
use crate::db; use crate::db::positions::Position; use crate::message::OrderbookMessage; use crate::node::storage::NodeStorage; use crate::notifications::NotificationKind; use crate::position; use crate::storage::CoordinatorTenTenOneStorage; use anyhow::ensure; use anyhow::Context; use anyhow::Result; use bitcoin::secp...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/message.rs
coordinator/src/message.rs
use crate::notifications::Notification; use crate::notifications::NotificationKind; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use futures::future::RemoteHandle; use futures::FutureExt; use parking_lot::RwLock; use std::collections::HashMap; use std::sync::Arc; use tokio::sync::broadcas...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/routes.rs
coordinator/src/routes.rs
use crate::backup::SledBackup; use crate::campaign::post_push_campaign; use crate::collaborative_revert::confirm_collaborative_revert; use crate::db; use crate::db::user; use crate::db::user::User; use crate::leaderboard::generate_leader_board; use crate::leaderboard::LeaderBoard; use crate::leaderboard::LeaderBoardCat...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/notifications.rs
coordinator/src/notifications.rs
use crate::db; use anyhow::ensure; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; use std::fmt::Display; use tokio::sync::mpsc; /// Types of notification that can be sent to 10101 app users #[derive(Deb...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/scheduler.rs
coordinator/src/scheduler.rs
use crate::db; use crate::metrics::collect_metrics; use crate::node::Node; use crate::notifications::Notification; use crate::notifications::NotificationKind; use crate::orderbook; use crate::referrals; use crate::settings::Settings; use anyhow::Result; use bitcoin::Network; use diesel::r2d2::ConnectionManager; use die...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/dlc_handler.rs
coordinator/src/dlc_handler.rs
use crate::db; use crate::node::storage::NodeStorage; use crate::storage::CoordinatorTenTenOneStorage; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; use dlc_manager::channel::signed_channel::SignedChannel; use dlc_manager::c...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/routing_fee/mod.rs
coordinator/src/routing_fee/mod.rs
pub mod models;
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/routing_fee/models.rs
coordinator/src/routing_fee/models.rs
use lightning::ln::ChannelId; use time::OffsetDateTime; #[derive(Debug)] pub struct NewRoutingFee { pub amount_msats: u64, pub prev_channel_id: Option<ChannelId>, pub next_channel_id: Option<ChannelId>, } #[derive(Debug)] pub struct RoutingFee { pub id: i32, pub amount_msats: u64, pub prev_cha...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/expired_positions.rs
coordinator/src/node/expired_positions.rs
use crate::db; use crate::node::Node; use crate::orderbook; use crate::orderbook::db::orders; use crate::orderbook::trading::NewOrderMessage; use crate::position::models::Position; use crate::position::models::PositionState; use anyhow::anyhow; use anyhow::Context; use anyhow::Result; use rust_decimal::prelude::FromPri...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/storage.rs
coordinator/src/node/storage.rs
use crate::db; use anyhow::anyhow; use anyhow::Result; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; use lightning::chain::transaction::OutPoint; use lightning::sign::SpendableOutputDescriptor; use xxi_node::node; use xxi_node::transaction::Transaction; #[derive(Clone)] pub str...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/invoice.rs
coordinator/src/node/invoice.rs
use crate::db; use crate::message::OrderbookMessage; use crate::notifications::NotificationKind; use bitcoin::Amount; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; use futures_util::TryStreamExt; use lnd_bridge::InvoiceState; use lnd_bridge::LndBridge; use tokio::sync::mpsc; use...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/unrealized_pnl.rs
coordinator/src/node/unrealized_pnl.rs
use crate::db; use crate::node::Node; use crate::position::models::Position; use anyhow::Context; use anyhow::Result; use diesel::r2d2::ConnectionManager; use diesel::r2d2::PooledConnection; use diesel::PgConnection; use time::OffsetDateTime; use xxi_node::bitmex_client::BitmexClient; use xxi_node::bitmex_client::Quote...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/rollover.rs
coordinator/src/node/rollover.rs
use crate::check_version::check_version; use crate::db; use crate::db::positions; use crate::decimal_from_f32; use crate::dlc_protocol; use crate::dlc_protocol::RolloverParams; use crate::funding_fee::funding_fee_from_funding_fee_events; use crate::funding_fee::get_outstanding_funding_fee_events; use crate::node::Node;...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/channel.rs
coordinator/src/node/channel.rs
use crate::db; use crate::dlc_protocol; use crate::dlc_protocol::DlcProtocolType; use crate::node::Node; use crate::position::models::PositionState; use crate::FundingFee; use anyhow::bail; use anyhow::Context; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use bitcoin::ScriptBuf; use bitco...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/node/liquidated_positions.rs
coordinator/src/node/liquidated_positions.rs
use crate::db; use crate::funding_fee::funding_fee_from_funding_fee_events; use crate::funding_fee::get_outstanding_funding_fee_events; use crate::node::Node; use crate::orderbook; use crate::orderbook::db::orders; use crate::orderbook::trading::NewOrderMessage; use anyhow::Result; use rust_decimal::prelude::FromPrimit...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/user.rs
coordinator/src/db/user.rs
use crate::db::bonus_status; use crate::db::bonus_status::BonusType; use crate::db::bonus_tiers; use crate::schema; use crate::schema::users; use anyhow::bail; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::prelude::*; use serde::Deserialize; use serde::Serialize; use time::OffsetDateTime; use xxi_n...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/spendable_outputs.rs
coordinator/src/db/spendable_outputs.rs
use crate::schema::spendable_outputs; use anyhow::anyhow; use anyhow::ensure; use anyhow::Result; use diesel::prelude::*; use lightning::chain::transaction::OutPoint; use lightning::sign::DelayedPaymentOutputDescriptor; use lightning::sign::SpendableOutputDescriptor; use lightning::sign::StaticPaymentOutputDescriptor; ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/trade_params.rs
coordinator/src/db/trade_params.rs
use crate::dlc_protocol; use crate::orderbook::db::custom_types::Direction; use crate::schema::trade_params; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use bitcoin::SignedAmount; use diesel::ExpressionMethods; use diesel::PgConnection; use diesel::QueryDsl; use diesel::QueryResult; use diesel::Queryable; u...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/rollover_params.rs
coordinator/src/db/rollover_params.rs
use crate::dlc_protocol; use crate::schema::rollover_params; use bitcoin::Amount; use diesel::prelude::*; use rust_decimal::prelude::ToPrimitive; use rust_decimal::Decimal; use time::OffsetDateTime; use uuid::Uuid; use xxi_node::node::ProtocolId; #[derive(Queryable, Debug)] #[diesel(table_name = rollover_params)] stru...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/transactions.rs
coordinator/src/db/transactions.rs
use crate::schema; use crate::schema::transactions; use anyhow::ensure; use anyhow::Result; use bitcoin::Txid; use diesel::AsChangeset; use diesel::ExpressionMethods; use diesel::Insertable; use diesel::OptionalExtension; use diesel::PgConnection; use diesel::QueryDsl; use diesel::QueryResult; use diesel::Queryable; us...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/reported_errors.rs
coordinator/src/db/reported_errors.rs
use crate::schema::reported_errors; use diesel::prelude::*; use xxi_node::commons::ReportedError; #[derive(Insertable, Debug, Clone)] #[diesel(table_name = reported_errors)] struct NewReportedError { trader_pubkey: String, error: String, version: String, } pub(crate) fn insert(conn: &mut PgConnection, err...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/dlc_messages.rs
coordinator/src/db/dlc_messages.rs
use crate::schema; use crate::schema::dlc_messages; use crate::schema::sql_types::MessageTypeType; use anyhow::ensure; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::query_builder::QueryId; use diesel::AsChangeset; use diesel::AsExpression; use diesel::ExpressionMethods; use diesel::FromSqlRow; use ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/bonus_tiers.rs
coordinator/src/db/bonus_tiers.rs
use crate::db::bonus_status::BonusType; use crate::schema::bonus_tiers; use bitcoin::secp256k1::PublicKey; use diesel::pg::sql_types::Timestamptz; use diesel::prelude::*; use diesel::sql_query; use diesel::sql_types::Float; use diesel::sql_types::Text; use diesel::PgConnection; use diesel::QueryResult; use diesel::Quer...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/hodl_invoice.rs
coordinator/src/db/hodl_invoice.rs
use crate::schema::hodl_invoices; use crate::schema::sql_types::InvoiceStateType; use anyhow::ensure; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use diesel::query_builder::QueryId; use diesel::AsExpression; use diesel::ExpressionMethods; use diesel::FromSqlRow; use diesel::PgConnection;...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/dlc_channels.rs
coordinator/src/db/dlc_channels.rs
use crate::node::channel; use crate::schema::dlc_channels; use crate::schema::sql_types::DlcChannelStateType; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use bitcoin::Txid; use bitcoin_old::hashes::hex::ToHex; use diesel::query_builder::QueryId; use diesel::AsChangeset; use diesel::AsExpression; use diesel:...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/polls.rs
coordinator/src/db/polls.rs
use crate::schema::answers; use crate::schema::choices; use crate::schema::polls; use crate::schema::polls_whitelist; use crate::schema::sql_types::PollTypeType; use anyhow::bail; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::dsl::exists; use diesel::query_builder::QueryId; use diesel::select; use ...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/trades.rs
coordinator/src/db/trades.rs
use crate::db::positions::ContractSymbol; use crate::orderbook::db::custom_types::Direction; use crate::schema::trades; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use diesel::prelude::*; use std::str::FromStr; use time::OffsetDateTime; #[derive(Queryable, Debug, Clone)] #[diesel(table_...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/mod.rs
coordinator/src/db/mod.rs
pub mod bonus_status; pub mod bonus_tiers; pub mod channel_opening_params; pub mod collaborative_reverts; pub mod custom_types; pub mod dlc_channels; pub mod dlc_messages; pub mod dlc_protocols; pub mod hodl_invoice; pub mod last_outbound_dlc_message; pub mod liquidity_options; pub mod metrics; pub mod polls; pub mod p...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/dlc_protocols.rs
coordinator/src/db/dlc_protocols.rs
use crate::db; use crate::dlc_protocol; use crate::schema::dlc_protocols; use crate::schema::sql_types::ProtocolStateType; use crate::schema::sql_types::ProtocolTypeType; use bitcoin::secp256k1::PublicKey; use diesel::query_builder::QueryId; use diesel::AsExpression; use diesel::ExpressionMethods; use diesel::FromSqlRo...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/last_outbound_dlc_message.rs
coordinator/src/db/last_outbound_dlc_message.rs
use crate::db::dlc_messages::MessageType; use crate::schema; use crate::schema::dlc_messages; use crate::schema::last_outbound_dlc_messages; use anyhow::ensure; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use diesel::AsChangeset; use diesel::ExpressionMethods; use diesel::Insertable; use diesel::JoinOnDsl; u...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/metrics.rs
coordinator/src/db/metrics.rs
use crate::schema::metrics; use anyhow::ensure; use anyhow::Result; use diesel::ExpressionMethods; use diesel::PgConnection; use diesel::RunQueryDsl; pub fn create_metrics_entry(conn: &mut PgConnection, on_chain_balance: u64) -> Result<()> { let affected_rows = diesel::insert_into(metrics::table) .values(m...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/custom_types.rs
coordinator/src/db/custom_types.rs
use crate::db::bonus_status::BonusType; use crate::db::dlc_channels::DlcChannelState; use crate::db::dlc_messages::MessageType; use crate::db::dlc_protocols::DlcProtocolState; use crate::db::dlc_protocols::DlcProtocolType; use crate::db::hodl_invoice::InvoiceState; use crate::db::polls::PollType; use crate::db::positio...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/liquidity_options.rs
coordinator/src/db/liquidity_options.rs
use crate::schema::liquidity_options; use diesel::PgConnection; use diesel::QueryResult; use diesel::Queryable; use diesel::RunQueryDsl; use time::OffsetDateTime; use xxi_node::commons; #[derive(Queryable, Debug, Clone, PartialEq)] #[diesel(table_name = liquidity_options)] pub(crate) struct LiquidityOption { pub i...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/collaborative_reverts.rs
coordinator/src/db/collaborative_reverts.rs
use crate::parse_dlc_channel_id; use crate::position; use crate::schema::collaborative_reverts; use anyhow::ensure; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Address; use bitcoin::Amount; use bitcoin::Denomination; use bitcoin::Network; use diesel::prelude::*; use diesel::AsChangeset; use dies...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/positions.rs
coordinator/src/db/positions.rs
use crate::orderbook::db::custom_types::Direction; use crate::schema::positions; use crate::schema::sql_types::ContractSymbolType; use crate::schema::sql_types::PositionStateType; use anyhow::bail; use anyhow::ensure; use anyhow::Result; use bitcoin::secp256k1::PublicKey; use bitcoin::Amount; use bitcoin::SignedAmount;...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/bonus_status.rs
coordinator/src/db/bonus_status.rs
use crate::db::bonus_tiers; use crate::schema::bonus_status; use crate::schema::sql_types::BonusStatusType; use bitcoin::secp256k1::PublicKey; use diesel::AsExpression; use diesel::ExpressionMethods; use diesel::FromSqlRow; use diesel::Insertable; use diesel::PgConnection; use diesel::QueryDsl; use diesel::QueryResult;...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false
get10101/10101
https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/coordinator/src/db/channel_opening_params.rs
coordinator/src/db/channel_opening_params.rs
use crate::schema::channel_opening_params; use bitcoin::Amount; use diesel::ExpressionMethods; use diesel::Insertable; use diesel::OptionalExtension; use diesel::PgConnection; use diesel::QueryDsl; use diesel::QueryResult; use diesel::Queryable; use diesel::QueryableByName; use diesel::RunQueryDsl; use time::OffsetDate...
rust
MIT
3ae135090528d64fbe2702aa03e1e3953cd57e2f
2026-01-04T20:18:11.134572Z
false