-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bef9150
commit 662e0d5
Showing
21 changed files
with
608 additions
and
635 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#![allow(non_snake_case)] | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use serde_json::Value; | ||
use std::collections::HashMap; | ||
|
||
use crate::client::types::{FederationInfo, OperationOutput}; | ||
|
||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
pub struct ListOperationsRequest { | ||
pub limit: u64, | ||
pub federationId: String, | ||
} | ||
|
||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
pub struct JoinRequest { | ||
pub inviteCode: String, | ||
pub useManualSecret: bool, | ||
} | ||
|
||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
pub struct DiscoverVersionRequest { | ||
pub threshold: usize, | ||
} | ||
|
||
pub type InfoResponse = HashMap<String, FederationInfo>; | ||
|
||
pub type DiscoverVersionResponse = HashMap<String, Value>; | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ListOperationsResponse { | ||
pub operations: Vec<OperationOutput>, | ||
} | ||
|
||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct FederationIdsResponse { | ||
pub federation_ids: Vec<String>, | ||
} | ||
|
||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct JoinResponse { | ||
pub this_federation_id: String, | ||
pub federation_ids: Vec<String>, | ||
} | ||
|
||
pub struct JoinOptions { | ||
pub invite_code: String, | ||
pub use_default_gateway: bool, | ||
pub set_active_federation_id: bool, | ||
pub use_manual_secret: bool, | ||
} | ||
|
||
impl JoinOptions { | ||
pub fn new(invite_code: String) -> Self { | ||
JoinOptions { | ||
invite_code, | ||
set_active_federation_id: false, | ||
use_default_gateway: false, | ||
use_manual_secret: false, | ||
} | ||
} | ||
|
||
pub fn set_active_federation_id(mut self) -> Self { | ||
self.set_active_federation_id = true; | ||
self | ||
} | ||
|
||
pub fn use_default_gateway(mut self) -> Self { | ||
self.use_default_gateway = true; | ||
self | ||
} | ||
|
||
pub fn use_manual_secret(mut self) -> Self { | ||
self.use_manual_secret = true; | ||
self | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 5 additions & 9 deletions
14
...dimint_clientd_rs/src/client/lightning.rs → ...nt_clientd_rs/src/client/lightning/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.