more watchvalue

This commit is contained in:
Christien Rioux 2023-11-25 15:59:43 -08:00
parent 7917dadd30
commit 9b8420d288
23 changed files with 1693 additions and 1530 deletions

View File

@ -9,7 +9,8 @@ pub(in crate::rpc_processor) struct RPCOperationWatchValueQ {
subkeys: ValueSubkeyRangeSet, subkeys: ValueSubkeyRangeSet,
expiration: u64, expiration: u64,
count: u32, count: u32,
opt_watch_signature: Option<(PublicKey, Signature)>, watcher: PublicKey,
signature: Signature,
} }
impl RPCOperationWatchValueQ { impl RPCOperationWatchValueQ {
@ -19,7 +20,7 @@ impl RPCOperationWatchValueQ {
subkeys: ValueSubkeyRangeSet, subkeys: ValueSubkeyRangeSet,
expiration: u64, expiration: u64,
count: u32, count: u32,
opt_watcher: Option<KeyPair>, watcher: KeyPair,
vcrypto: CryptoSystemVersion, vcrypto: CryptoSystemVersion,
) -> Result<Self, RPCError> { ) -> Result<Self, RPCError> {
// Needed because RangeSetBlaze uses different types here all the time // Needed because RangeSetBlaze uses different types here all the time
@ -30,22 +31,18 @@ impl RPCOperationWatchValueQ {
return Err(RPCError::protocol("WatchValueQ subkeys length too long")); return Err(RPCError::protocol("WatchValueQ subkeys length too long"));
} }
let opt_watch_signature = if let Some(watcher) = opt_watcher { let signature_data = Self::make_signature_data(&key, &subkeys, expiration, count);
let signature_data = Self::make_signature_data(&key, &subkeys, expiration, count); let signature = vcrypto
let signature = vcrypto .sign(&watcher.key, &watcher.secret, &signature_data)
.sign(&watcher.key, &watcher.secret, &signature_data) .map_err(RPCError::protocol)?;
.map_err(RPCError::protocol)?;
Some((watcher.key, signature))
} else {
None
};
Ok(Self { Ok(Self {
key, key,
subkeys, subkeys,
expiration, expiration,
count, count,
opt_watch_signature, watcher: watcher.key,
signature,
}) })
} }
@ -77,13 +74,11 @@ impl RPCOperationWatchValueQ {
return Err(RPCError::protocol("unsupported cryptosystem")); return Err(RPCError::protocol("unsupported cryptosystem"));
}; };
if let Some(watch_signature) = self.opt_watch_signature { let sig_data =
let sig_data = Self::make_signature_data(&self.key, &self.subkeys, self.expiration, self.count);
Self::make_signature_data(&self.key, &self.subkeys, self.expiration, self.count); vcrypto
vcrypto .verify(&self.watcher, &sig_data, &self.signature)
.verify(&watch_signature.0, &sig_data, &watch_signature.1) .map_err(RPCError::protocol)?;
.map_err(RPCError::protocol)?;
}
Ok(()) Ok(())
} }
@ -108,10 +103,13 @@ impl RPCOperationWatchValueQ {
} }
#[allow(dead_code)] #[allow(dead_code)]
pub fn opt_watch_signature(&self) -> Option<&(PublicKey, Signature)> { pub fn watcher(&self) -> &PublicKey {
self.opt_watch_signature.as_ref() &self.watcher
}
#[allow(dead_code)]
pub fn signature(&self) -> &Signature {
&self.signature
} }
#[allow(dead_code)] #[allow(dead_code)]
pub fn destructure( pub fn destructure(
self, self,
@ -120,14 +118,16 @@ impl RPCOperationWatchValueQ {
ValueSubkeyRangeSet, ValueSubkeyRangeSet,
u64, u64,
u32, u32,
Option<(PublicKey, Signature)>, PublicKey,
Signature,
) { ) {
( (
self.key, self.key,
self.subkeys, self.subkeys,
self.expiration, self.expiration,
self.count, self.count,
self.opt_watch_signature, self.watcher,
self.signature,
) )
} }
@ -160,24 +160,19 @@ impl RPCOperationWatchValueQ {
let expiration = reader.get_expiration(); let expiration = reader.get_expiration();
let count = reader.get_count(); let count = reader.get_count();
let opt_watch_signature = if reader.has_watcher() { let w_reader = reader.get_watcher().map_err(RPCError::protocol)?;
let w_reader = reader.get_watcher().map_err(RPCError::protocol)?; let watcher = decode_key256(&w_reader);
let watcher = decode_key256(&w_reader);
let s_reader = reader.get_signature().map_err(RPCError::protocol)?; let s_reader = reader.get_signature().map_err(RPCError::protocol)?;
let signature = decode_signature512(&s_reader); let signature = decode_signature512(&s_reader);
Some((watcher, signature))
} else {
None
};
Ok(Self { Ok(Self {
key, key,
subkeys, subkeys,
expiration, expiration,
count, count,
opt_watch_signature, watcher,
signature,
}) })
} }
@ -202,13 +197,11 @@ impl RPCOperationWatchValueQ {
builder.set_expiration(self.expiration); builder.set_expiration(self.expiration);
builder.set_count(self.count); builder.set_count(self.count);
if let Some(watch_signature) = self.opt_watch_signature { let mut w_builder = builder.reborrow().init_watcher();
let mut w_builder = builder.reborrow().init_watcher(); encode_key256(&self.watcher, &mut w_builder);
encode_key256(&watch_signature.0, &mut w_builder);
let mut s_builder = builder.reborrow().init_signature(); let mut s_builder = builder.reborrow().init_signature();
encode_signature512(&watch_signature.1, &mut s_builder); encode_signature512(&self.signature, &mut s_builder);
}
Ok(()) Ok(())
} }

View File

@ -29,7 +29,7 @@ impl RPCProcessor {
subkeys: ValueSubkeyRangeSet, subkeys: ValueSubkeyRangeSet,
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
opt_watcher: Option<KeyPair>, watcher: KeyPair,
) -> RPCNetworkResult<Answer<WatchValueAnswer>> { ) -> RPCNetworkResult<Answer<WatchValueAnswer>> {
// Ensure destination never has a private route // Ensure destination never has a private route
// and get the target noderef so we can validate the response // and get the target noderef so we can validate the response
@ -48,13 +48,8 @@ impl RPCProcessor {
}; };
let debug_string = format!( let debug_string = format!(
"OUT ==> WatchValueQ({} {}#{:?}@{}+{}) => {}", "OUT ==> WatchValueQ({} {}@{}+{}) => {} (watcher={})",
key, key, subkeys, expiration, count, dest, watcher.key
if opt_watcher.is_some() { "+W " } else { "" },
subkeys,
expiration,
count,
dest
); );
// Send the watchvalue question // Send the watchvalue question
@ -63,7 +58,7 @@ impl RPCProcessor {
subkeys, subkeys,
expiration.as_u64(), expiration.as_u64(),
count, count,
opt_watcher, watcher,
vcrypto.clone(), vcrypto.clone(),
)?; )?;
let question = RPCQuestion::new( let question = RPCQuestion::new(
@ -179,8 +174,7 @@ impl RPCProcessor {
}; };
// Destructure // Destructure
let (key, subkeys, expiration, count, opt_watch_signature) = watch_value_q.destructure(); let (key, subkeys, expiration, count, watcher, signature) = watch_value_q.destructure();
let opt_watcher = opt_watch_signature.map(|ws| ws.0);
// Get target for ValueChanged notifications // Get target for ValueChanged notifications
let dest = network_result_try!(self.get_respond_to_destination(&msg)); let dest = network_result_try!(self.get_respond_to_destination(&msg));
@ -189,13 +183,13 @@ impl RPCProcessor {
#[cfg(feature = "debug-dht")] #[cfg(feature = "debug-dht")]
{ {
let debug_string = format!( let debug_string = format!(
"IN <=== WatchValueQ({} {}#{:?}@{}+{}) <== {}", "IN <=== WatchValueQ({} {}@{}+{}) <== {} (watcher={})",
key, key,
if opt_watcher.is_some() { "+W " } else { "" },
subkeys, subkeys,
expiration, expiration,
count, count,
msg.header.direct_sender_node_id() msg.header.direct_sender_node_id(),
watcher
); );
log_rpc!(debug "{}", debug_string); log_rpc!(debug "{}", debug_string);
@ -227,7 +221,7 @@ impl RPCProcessor {
Timestamp::new(expiration), Timestamp::new(expiration),
count, count,
target, target,
opt_watcher watcher
) )
.await .await
.map_err(RPCError::internal)?) .map_err(RPCError::internal)?)

View File

@ -42,6 +42,9 @@ struct StorageManagerUnlockedInner {
// Background processes // Background processes
flush_record_stores_task: TickTask<EyreReport>, flush_record_stores_task: TickTask<EyreReport>,
offline_subkey_writes_task: TickTask<EyreReport>, offline_subkey_writes_task: TickTask<EyreReport>,
// Anonymous watch keys
anonymous_watch_keys: TypedKeyPairGroup,
} }
#[derive(Clone)] #[derive(Clone)]
@ -57,6 +60,14 @@ impl StorageManager {
table_store: TableStore, table_store: TableStore,
#[cfg(feature = "unstable-blockstore")] block_store: BlockStore, #[cfg(feature = "unstable-blockstore")] block_store: BlockStore,
) -> StorageManagerUnlockedInner { ) -> StorageManagerUnlockedInner {
// Generate keys to use for anonymous watches
let mut anonymous_watch_keys = TypedKeyPairGroup::new();
for ck in VALID_CRYPTO_KINDS {
let vcrypto = crypto.get(ck).unwrap();
let kp = vcrypto.generate_keypair();
anonymous_watch_keys.add(TypedKeyPair::new(ck, kp));
}
StorageManagerUnlockedInner { StorageManagerUnlockedInner {
config, config,
crypto, crypto,
@ -65,6 +76,7 @@ impl StorageManager {
block_store, block_store,
flush_record_stores_task: TickTask::new(FLUSH_RECORD_STORES_INTERVAL_SECS), flush_record_stores_task: TickTask::new(FLUSH_RECORD_STORES_INTERVAL_SECS),
offline_subkey_writes_task: TickTask::new(OFFLINE_SUBKEY_WRITES_INTERVAL_SECS), offline_subkey_writes_task: TickTask::new(OFFLINE_SUBKEY_WRITES_INTERVAL_SECS),
anonymous_watch_keys,
} }
} }
fn new_inner(unlocked_inner: Arc<StorageManagerUnlockedInner>) -> StorageManagerInner { fn new_inner(unlocked_inner: Arc<StorageManagerUnlockedInner>) -> StorageManagerInner {

View File

@ -29,14 +29,12 @@ struct WatchedRecordWatch {
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
target: Target, target: Target,
opt_watcher: Option<CryptoKey>, watcher: CryptoKey,
} }
#[derive(Debug, Clone)] #[derive(Debug, Default, Clone)]
/// A record being watched for changes /// A record being watched for changes
struct WatchedRecord { struct WatchedRecord {
/// Number of watchers that are anonymous
anon_count: usize,
/// The list of active watchers /// The list of active watchers
watchers: Vec<WatchedRecordWatch>, watchers: Vec<WatchedRecordWatch>,
} }
@ -698,19 +696,136 @@ where
} }
/// Add a record watch for changes /// Add a record watch for changes
pub async fn watch_subkeys( pub async fn watch_record(
&mut self, &mut self,
key: TypedKey, key: TypedKey,
subkeys: ValueSubkeyRangeSet, subkeys: ValueSubkeyRangeSet,
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
target: Target, target: Target,
opt_watcher: Option<CryptoKey>, watcher: CryptoKey,
) -> VeilidAPIResult<Option<Timestamp>> { ) -> VeilidAPIResult<Option<Timestamp>> {
// If subkeys is empty or count is zero then we're cancelling a watch completely
if subkeys.is_empty() || count == 0 {
return self.cancel_watch(key, target, watcher).await;
}
// If we have a watcher and it is in the record's schema // See if expiration timestamp is too far in the future or not enough in the future
// then we have a guaranteed watch slot for it let cur_ts = get_timestamp();
xxx continue here let max_ts = cur_ts + self.limits.max_watch_expiration.as_u64();
let min_ts = cur_ts + self.limits.min_watch_expiration.as_u64();
if expiration.as_u64() < min_ts || expiration.as_u64() > max_ts {
return Ok(None);
}
// Get the record being watched
let Some(is_member) = self.with_record_mut(key, |record| {
// Check if the watcher specified is a schema member
let schema = record.schema();
(*record.owner()) == watcher || schema.is_member(&watcher)
}) else {
// Record not found
return Ok(None);
};
// See if we are updating an existing watch
// with the watcher matched on target
let mut watch_count = 0;
let rtk = RecordTableKey { key };
if let Some(watch) = self.watched_records.get_mut(&rtk) {
for w in &mut watch.watchers {
if w.watcher == watcher {
watch_count += 1;
// Only one watch for an anonymous watcher
// Allow members to have one watch per target
if !is_member || w.target == target {
// Updating an existing watch
w.subkeys = subkeys;
w.expiration = expiration;
w.count = count;
return Ok(Some(expiration));
}
}
}
}
// Adding a new watcher to a watch
// Check watch table for limits
if is_member {
// Member watch
if watch_count >= self.limits.member_watch_limit {
// Too many watches
return Ok(None);
}
} else {
// Public watch
if watch_count >= self.limits.public_watch_limit {
// Too many watches
return Ok(None);
}
}
// Ok this is an acceptable new watch, add it
let watch = self.watched_records.entry(rtk).or_default();
watch.watchers.push(WatchedRecordWatch {
subkeys,
expiration,
count,
target,
watcher,
});
Ok(Some(expiration))
}
/// Add a record watch for changes
async fn cancel_watch(
&mut self,
key: TypedKey,
target: Target,
watcher: CryptoKey,
) -> VeilidAPIResult<Option<Timestamp>> {
// Get the record being watched
let Some(is_member) = self.with_record_mut(key, |record| {
// Check if the watcher specified is a schema member
let schema = record.schema();
(*record.owner()) == watcher || schema.is_member(&watcher)
}) else {
// Record not found
return Ok(None);
};
// See if we are cancelling an existing watch
// with the watcher matched on target
let rtk = RecordTableKey { key };
let mut is_empty = false;
let mut ret_timestamp = None;
if let Some(watch) = self.watched_records.get_mut(&rtk) {
let mut dead_watcher = None;
for (wn, w) in watch.watchers.iter_mut().enumerate() {
if w.watcher == watcher {
// Only one watch for an anonymous watcher
// Allow members to have one watch per target
if !is_member || w.target == target {
// Canceling an existing watch
dead_watcher = Some(wn);
ret_timestamp = Some(w.expiration);
break;
}
}
}
if let Some(dw) = dead_watcher {
watch.watchers.remove(dw);
if watch.watchers.len() == 0 {
is_empty = true;
}
}
}
if is_empty {
self.watched_records.remove(&rtk);
}
Ok(ret_timestamp)
} }
/// LRU out some records until we reclaim the amount of space requested /// LRU out some records until we reclaim the amount of space requested

View File

@ -1,3 +1,5 @@
use super::*;
/// Configuration for the record store /// Configuration for the record store
#[derive(Debug, Default, Copy, Clone)] #[derive(Debug, Default, Copy, Clone)]
pub struct RecordStoreLimits { pub struct RecordStoreLimits {
@ -14,7 +16,11 @@ pub struct RecordStoreLimits {
/// Limit on the amount of storage space to use for subkey data and record data /// Limit on the amount of storage space to use for subkey data and record data
pub max_storage_space_mb: Option<usize>, pub max_storage_space_mb: Option<usize>,
/// Max number of anonymous watches /// Max number of anonymous watches
pub public_watch_limit: u32, pub public_watch_limit: usize,
/// Max number of watches per schema member /// Max number of watches per schema member
pub member_watch_limit: u32, pub member_watch_limit: usize,
/// Max expiration duration per watch
pub max_watch_expiration: TimestampDuration,
/// Min expiration duration per watch
pub min_watch_expiration: TimestampDuration,
} }

View File

@ -39,8 +39,12 @@ fn local_limits_from_config(config: VeilidConfig) -> RecordStoreLimits {
max_records: None, max_records: None,
max_subkey_cache_memory_mb: Some(c.network.dht.local_max_subkey_cache_memory_mb as usize), max_subkey_cache_memory_mb: Some(c.network.dht.local_max_subkey_cache_memory_mb as usize),
max_storage_space_mb: None, max_storage_space_mb: None,
public_watch_limit: c.network.dht.public_watch_limit, public_watch_limit: c.network.dht.public_watch_limit as usize,
member_watch_limit: c.network.dht.member_watch_limit, member_watch_limit: c.network.dht.member_watch_limit as usize,
max_watch_expiration: TimestampDuration::new(ms_to_us(
c.network.dht.max_watch_expiration_ms,
)),
min_watch_expiration: TimestampDuration::new(ms_to_us(c.network.rpc.timeout_ms)),
} }
} }
@ -53,8 +57,12 @@ fn remote_limits_from_config(config: VeilidConfig) -> RecordStoreLimits {
max_records: Some(c.network.dht.remote_max_records as usize), max_records: Some(c.network.dht.remote_max_records as usize),
max_subkey_cache_memory_mb: Some(c.network.dht.remote_max_subkey_cache_memory_mb as usize), max_subkey_cache_memory_mb: Some(c.network.dht.remote_max_subkey_cache_memory_mb as usize),
max_storage_space_mb: Some(c.network.dht.remote_max_storage_space_mb as usize), max_storage_space_mb: Some(c.network.dht.remote_max_storage_space_mb as usize),
public_watch_limit: c.network.dht.public_watch_limit, public_watch_limit: c.network.dht.public_watch_limit as usize,
member_watch_limit: c.network.dht.member_watch_limit, member_watch_limit: c.network.dht.member_watch_limit as usize,
max_watch_expiration: TimestampDuration::new(ms_to_us(
c.network.dht.max_watch_expiration_ms,
)),
min_watch_expiration: TimestampDuration::new(ms_to_us(c.network.rpc.timeout_ms)),
} }
} }
@ -516,14 +524,14 @@ impl StorageManagerInner {
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
target: Target, target: Target,
opt_watcher: Option<CryptoKey>, watcher: CryptoKey,
) -> VeilidAPIResult<Option<Timestamp>> { ) -> VeilidAPIResult<Option<Timestamp>> {
// See if it's in the local record store // See if it's in the local record store
let Some(local_record_store) = self.local_record_store.as_mut() else { let Some(local_record_store) = self.local_record_store.as_mut() else {
apibail_not_initialized!(); apibail_not_initialized!();
}; };
local_record_store local_record_store
.watch_subkeys(key, subkeys, expiration, count, target, opt_watcher) .watch_record(key, subkeys, expiration, count, target, watcher)
.await .await
} }
@ -590,14 +598,14 @@ impl StorageManagerInner {
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
target: Target, target: Target,
opt_watcher: Option<CryptoKey>, watcher: CryptoKey,
) -> VeilidAPIResult<Option<Timestamp>> { ) -> VeilidAPIResult<Option<Timestamp>> {
// See if it's in the remote record store // See if it's in the remote record store
let Some(remote_record_store) = self.remote_record_store.as_mut() else { let Some(remote_record_store) = self.remote_record_store.as_mut() else {
apibail_not_initialized!(); apibail_not_initialized!();
}; };
remote_record_store remote_record_store
.watch_subkeys(key, subkeys, expiration, count, target, opt_watcher) .watch_record(key, subkeys, expiration, count, target, watcher)
.await .await
} }

View File

@ -49,6 +49,15 @@ impl StorageManager {
inner.get_value_nodes(key)? inner.get_value_nodes(key)?
}; };
// Get the appropriate watcher key
let watcher = opt_watcher.unwrap_or_else(|| {
self.unlocked_inner
.anonymous_watch_keys
.get(key.kind)
.unwrap()
.value
});
// Make do-watch-value answer context // Make do-watch-value answer context
let context = Arc::new(Mutex::new(OutboundWatchValueContext { let context = Arc::new(Mutex::new(OutboundWatchValueContext {
opt_watch_value_result: None, opt_watch_value_result: None,
@ -69,7 +78,7 @@ impl StorageManager {
subkeys, subkeys,
expiration, expiration,
count, count,
opt_watcher watcher
) )
.await? .await?
); );
@ -173,7 +182,7 @@ impl StorageManager {
expiration: Timestamp, expiration: Timestamp,
count: u32, count: u32,
target: Target, target: Target,
opt_watcher: Option<CryptoKey>, watcher: CryptoKey,
) -> VeilidAPIResult<NetworkResult<Timestamp>> { ) -> VeilidAPIResult<NetworkResult<Timestamp>> {
let mut inner = self.lock().await?; let mut inner = self.lock().await?;
@ -187,7 +196,7 @@ impl StorageManager {
expiration, expiration,
count, count,
target.clone(), target.clone(),
opt_watcher, watcher,
) )
.await?; .await?;
if opt_expiration_ts.is_some() { if opt_expiration_ts.is_some() {
@ -195,7 +204,7 @@ impl StorageManager {
} else { } else {
// See if the subkey we are watching is a remote value // See if the subkey we are watching is a remote value
let opt_expiration_ts = inner let opt_expiration_ts = inner
.handle_watch_remote_value(key, subkeys, expiration, count, target, opt_watcher) .handle_watch_remote_value(key, subkeys, expiration, count, target, watcher)
.await?; .await?;
(false, opt_expiration_ts) (false, opt_expiration_ts)
} }

View File

@ -1,10 +1,9 @@
use super::*; use super::*;
use routing_table::NodeRefBase;
/////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////
/// Valid destinations for a message sent over a routing context /// Valid destinations for a message sent over a routing context
#[derive(Clone, Debug)] #[derive(Clone, Debug, Eq, PartialEq)]
pub enum Target { pub enum Target {
/// Node by its public key /// Node by its public key
NodeId(TypedKey), NodeId(TypedKey),

View File

@ -53,6 +53,11 @@ impl DHTSchemaDFLT {
// Subkey out of range // Subkey out of range
false false
} }
/// Check if a key is a schema member
pub fn is_member(&self, key: &PublicKey) -> bool {
false
}
} }
impl TryFrom<&[u8]> for DHTSchemaDFLT { impl TryFrom<&[u8]> for DHTSchemaDFLT {

View File

@ -59,6 +59,14 @@ impl DHTSchema {
DHTSchema::SMPL(s) => s.check_subkey_value_data(owner, subkey, value_data), DHTSchema::SMPL(s) => s.check_subkey_value_data(owner, subkey, value_data),
} }
} }
/// Check if a key is a schema member
pub fn is_member(&self, key: &PublicKey) -> bool {
match self {
DHTSchema::DFLT(d) => d.is_member(key),
DHTSchema::SMPL(s) => s.is_member(key),
}
}
} }
impl Default for DHTSchema { impl Default for DHTSchema {

View File

@ -93,6 +93,16 @@ impl DHTSchemaSMPL {
// Subkey out of range // Subkey out of range
false false
} }
/// Check if a key is a schema member
pub fn is_member(&self, key: &PublicKey) -> bool {
for m in &self.members {
if m.m_key == *key {
return true;
}
}
false
}
} }
impl TryFrom<&[u8]> for DHTSchemaSMPL { impl TryFrom<&[u8]> for DHTSchemaSMPL {

View File

@ -303,6 +303,7 @@ pub struct VeilidConfigDHT {
pub remote_max_storage_space_mb: u32, pub remote_max_storage_space_mb: u32,
pub public_watch_limit: u32, pub public_watch_limit: u32,
pub member_watch_limit: u32, pub member_watch_limit: u32,
pub max_watch_expiration_ms: u32,
} }
impl Default for VeilidConfigDHT { impl Default for VeilidConfigDHT {

View File

@ -61,10 +61,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.18.0" version: "1.17.2"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -220,10 +220,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.9.1"
path: path:
dependency: "direct main" dependency: "direct main"
description: description:
@ -329,18 +329,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.1" version: "1.11.0"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.1"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
@ -377,10 +377,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.1" version: "0.6.0"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -408,10 +408,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.0" version: "0.1.4-beta"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -437,5 +437,5 @@ packages:
source: hosted source: hosted
version: "3.5.0" version: "3.5.0"
sdks: sdks:
dart: ">=3.2.0-194.0.dev <4.0.0" dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.10.6" flutter: ">=3.10.6"

View File

@ -140,7 +140,8 @@ Future<VeilidConfig> getDefaultVeilidConfig(String programName) async {
remoteMaxSubkeyCacheMemoryMb: await getRemoteMaxSubkeyCacheMemoryMb(), remoteMaxSubkeyCacheMemoryMb: await getRemoteMaxSubkeyCacheMemoryMb(),
remoteMaxStorageSpaceMb: getRemoteMaxStorageSpaceMb(), remoteMaxStorageSpaceMb: getRemoteMaxStorageSpaceMb(),
publicWatchLimit: 32, publicWatchLimit: 32,
memberWatchLimit: 8), memberWatchLimit: 8,
maxWatchExpirationMs: 600000),
upnp: true, upnp: true,
detectAddressChanges: true, detectAddressChanges: true,
restrictedNatRetries: 0, restrictedNatRetries: 0,

View File

@ -107,22 +107,22 @@ class _$DHTSchemaCopyWithImpl<$Res, $Val extends DHTSchema>
} }
/// @nodoc /// @nodoc
abstract class _$$DHTSchemaDFLTImplCopyWith<$Res> abstract class _$$DHTSchemaDFLTCopyWith<$Res>
implements $DHTSchemaCopyWith<$Res> { implements $DHTSchemaCopyWith<$Res> {
factory _$$DHTSchemaDFLTImplCopyWith( factory _$$DHTSchemaDFLTCopyWith(
_$DHTSchemaDFLTImpl value, $Res Function(_$DHTSchemaDFLTImpl) then) = _$DHTSchemaDFLT value, $Res Function(_$DHTSchemaDFLT) then) =
__$$DHTSchemaDFLTImplCopyWithImpl<$Res>; __$$DHTSchemaDFLTCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int oCnt}); $Res call({int oCnt});
} }
/// @nodoc /// @nodoc
class __$$DHTSchemaDFLTImplCopyWithImpl<$Res> class __$$DHTSchemaDFLTCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLTImpl> extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLT>
implements _$$DHTSchemaDFLTImplCopyWith<$Res> { implements _$$DHTSchemaDFLTCopyWith<$Res> {
__$$DHTSchemaDFLTImplCopyWithImpl( __$$DHTSchemaDFLTCopyWithImpl(
_$DHTSchemaDFLTImpl _value, $Res Function(_$DHTSchemaDFLTImpl) _then) _$DHTSchemaDFLT _value, $Res Function(_$DHTSchemaDFLT) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -130,7 +130,7 @@ class __$$DHTSchemaDFLTImplCopyWithImpl<$Res>
$Res call({ $Res call({
Object? oCnt = null, Object? oCnt = null,
}) { }) {
return _then(_$DHTSchemaDFLTImpl( return _then(_$DHTSchemaDFLT(
oCnt: null == oCnt oCnt: null == oCnt
? _value.oCnt ? _value.oCnt
: oCnt // ignore: cast_nullable_to_non_nullable : oCnt // ignore: cast_nullable_to_non_nullable
@ -141,12 +141,12 @@ class __$$DHTSchemaDFLTImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT { class _$DHTSchemaDFLT implements DHTSchemaDFLT {
const _$DHTSchemaDFLTImpl({required this.oCnt, final String? $type}) const _$DHTSchemaDFLT({required this.oCnt, final String? $type})
: $type = $type ?? 'DFLT'; : $type = $type ?? 'DFLT';
factory _$DHTSchemaDFLTImpl.fromJson(Map<String, dynamic> json) => factory _$DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaDFLTImplFromJson(json); _$$DHTSchemaDFLTFromJson(json);
@override @override
final int oCnt; final int oCnt;
@ -163,7 +163,7 @@ class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$DHTSchemaDFLTImpl && other is _$DHTSchemaDFLT &&
(identical(other.oCnt, oCnt) || other.oCnt == oCnt)); (identical(other.oCnt, oCnt) || other.oCnt == oCnt));
} }
@ -174,8 +174,8 @@ class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith => _$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
__$$DHTSchemaDFLTImplCopyWithImpl<_$DHTSchemaDFLTImpl>(this, _$identity); __$$DHTSchemaDFLTCopyWithImpl<_$DHTSchemaDFLT>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@ -241,43 +241,43 @@ class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT {
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$DHTSchemaDFLTImplToJson( return _$$DHTSchemaDFLTToJson(
this, this,
); );
} }
} }
abstract class DHTSchemaDFLT implements DHTSchema { abstract class DHTSchemaDFLT implements DHTSchema {
const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLTImpl; const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLT;
factory DHTSchemaDFLT.fromJson(Map<String, dynamic> json) = factory DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =
_$DHTSchemaDFLTImpl.fromJson; _$DHTSchemaDFLT.fromJson;
@override @override
int get oCnt; int get oCnt;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith => _$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$DHTSchemaSMPLImplCopyWith<$Res> abstract class _$$DHTSchemaSMPLCopyWith<$Res>
implements $DHTSchemaCopyWith<$Res> { implements $DHTSchemaCopyWith<$Res> {
factory _$$DHTSchemaSMPLImplCopyWith( factory _$$DHTSchemaSMPLCopyWith(
_$DHTSchemaSMPLImpl value, $Res Function(_$DHTSchemaSMPLImpl) then) = _$DHTSchemaSMPL value, $Res Function(_$DHTSchemaSMPL) then) =
__$$DHTSchemaSMPLImplCopyWithImpl<$Res>; __$$DHTSchemaSMPLCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int oCnt, List<DHTSchemaMember> members}); $Res call({int oCnt, List<DHTSchemaMember> members});
} }
/// @nodoc /// @nodoc
class __$$DHTSchemaSMPLImplCopyWithImpl<$Res> class __$$DHTSchemaSMPLCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPLImpl> extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPL>
implements _$$DHTSchemaSMPLImplCopyWith<$Res> { implements _$$DHTSchemaSMPLCopyWith<$Res> {
__$$DHTSchemaSMPLImplCopyWithImpl( __$$DHTSchemaSMPLCopyWithImpl(
_$DHTSchemaSMPLImpl _value, $Res Function(_$DHTSchemaSMPLImpl) _then) _$DHTSchemaSMPL _value, $Res Function(_$DHTSchemaSMPL) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -286,7 +286,7 @@ class __$$DHTSchemaSMPLImplCopyWithImpl<$Res>
Object? oCnt = null, Object? oCnt = null,
Object? members = null, Object? members = null,
}) { }) {
return _then(_$DHTSchemaSMPLImpl( return _then(_$DHTSchemaSMPL(
oCnt: null == oCnt oCnt: null == oCnt
? _value.oCnt ? _value.oCnt
: oCnt // ignore: cast_nullable_to_non_nullable : oCnt // ignore: cast_nullable_to_non_nullable
@ -301,16 +301,16 @@ class __$$DHTSchemaSMPLImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL { class _$DHTSchemaSMPL implements DHTSchemaSMPL {
const _$DHTSchemaSMPLImpl( const _$DHTSchemaSMPL(
{required this.oCnt, {required this.oCnt,
required final List<DHTSchemaMember> members, required final List<DHTSchemaMember> members,
final String? $type}) final String? $type})
: _members = members, : _members = members,
$type = $type ?? 'SMPL'; $type = $type ?? 'SMPL';
factory _$DHTSchemaSMPLImpl.fromJson(Map<String, dynamic> json) => factory _$DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaSMPLImplFromJson(json); _$$DHTSchemaSMPLFromJson(json);
@override @override
final int oCnt; final int oCnt;
@ -334,7 +334,7 @@ class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$DHTSchemaSMPLImpl && other is _$DHTSchemaSMPL &&
(identical(other.oCnt, oCnt) || other.oCnt == oCnt) && (identical(other.oCnt, oCnt) || other.oCnt == oCnt) &&
const DeepCollectionEquality().equals(other._members, _members)); const DeepCollectionEquality().equals(other._members, _members));
} }
@ -347,8 +347,8 @@ class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith => _$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
__$$DHTSchemaSMPLImplCopyWithImpl<_$DHTSchemaSMPLImpl>(this, _$identity); __$$DHTSchemaSMPLCopyWithImpl<_$DHTSchemaSMPL>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@ -414,7 +414,7 @@ class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$DHTSchemaSMPLImplToJson( return _$$DHTSchemaSMPLToJson(
this, this,
); );
} }
@ -423,17 +423,17 @@ class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
abstract class DHTSchemaSMPL implements DHTSchema { abstract class DHTSchemaSMPL implements DHTSchema {
const factory DHTSchemaSMPL( const factory DHTSchemaSMPL(
{required final int oCnt, {required final int oCnt,
required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPLImpl; required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPL;
factory DHTSchemaSMPL.fromJson(Map<String, dynamic> json) = factory DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =
_$DHTSchemaSMPLImpl.fromJson; _$DHTSchemaSMPL.fromJson;
@override @override
int get oCnt; int get oCnt;
List<DHTSchemaMember> get members; List<DHTSchemaMember> get members;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith => _$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -491,22 +491,22 @@ class _$DHTSchemaMemberCopyWithImpl<$Res, $Val extends DHTSchemaMember>
} }
/// @nodoc /// @nodoc
abstract class _$$DHTSchemaMemberImplCopyWith<$Res> abstract class _$$_DHTSchemaMemberCopyWith<$Res>
implements $DHTSchemaMemberCopyWith<$Res> { implements $DHTSchemaMemberCopyWith<$Res> {
factory _$$DHTSchemaMemberImplCopyWith(_$DHTSchemaMemberImpl value, factory _$$_DHTSchemaMemberCopyWith(
$Res Function(_$DHTSchemaMemberImpl) then) = _$_DHTSchemaMember value, $Res Function(_$_DHTSchemaMember) then) =
__$$DHTSchemaMemberImplCopyWithImpl<$Res>; __$$_DHTSchemaMemberCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({FixedEncodedString43 mKey, int mCnt}); $Res call({FixedEncodedString43 mKey, int mCnt});
} }
/// @nodoc /// @nodoc
class __$$DHTSchemaMemberImplCopyWithImpl<$Res> class __$$_DHTSchemaMemberCopyWithImpl<$Res>
extends _$DHTSchemaMemberCopyWithImpl<$Res, _$DHTSchemaMemberImpl> extends _$DHTSchemaMemberCopyWithImpl<$Res, _$_DHTSchemaMember>
implements _$$DHTSchemaMemberImplCopyWith<$Res> { implements _$$_DHTSchemaMemberCopyWith<$Res> {
__$$DHTSchemaMemberImplCopyWithImpl( __$$_DHTSchemaMemberCopyWithImpl(
_$DHTSchemaMemberImpl _value, $Res Function(_$DHTSchemaMemberImpl) _then) _$_DHTSchemaMember _value, $Res Function(_$_DHTSchemaMember) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -515,7 +515,7 @@ class __$$DHTSchemaMemberImplCopyWithImpl<$Res>
Object? mKey = null, Object? mKey = null,
Object? mCnt = null, Object? mCnt = null,
}) { }) {
return _then(_$DHTSchemaMemberImpl( return _then(_$_DHTSchemaMember(
mKey: null == mKey mKey: null == mKey
? _value.mKey ? _value.mKey
: mKey // ignore: cast_nullable_to_non_nullable : mKey // ignore: cast_nullable_to_non_nullable
@ -530,12 +530,12 @@ class __$$DHTSchemaMemberImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$DHTSchemaMemberImpl implements _DHTSchemaMember { class _$_DHTSchemaMember implements _DHTSchemaMember {
const _$DHTSchemaMemberImpl({required this.mKey, required this.mCnt}) const _$_DHTSchemaMember({required this.mKey, required this.mCnt})
: assert(mCnt > 0 && mCnt <= 65535, 'value out of range'); : assert(mCnt > 0 && mCnt <= 65535, 'value out of range');
factory _$DHTSchemaMemberImpl.fromJson(Map<String, dynamic> json) => factory _$_DHTSchemaMember.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaMemberImplFromJson(json); _$$_DHTSchemaMemberFromJson(json);
@override @override
final FixedEncodedString43 mKey; final FixedEncodedString43 mKey;
@ -551,7 +551,7 @@ class _$DHTSchemaMemberImpl implements _DHTSchemaMember {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$DHTSchemaMemberImpl && other is _$_DHTSchemaMember &&
(identical(other.mKey, mKey) || other.mKey == mKey) && (identical(other.mKey, mKey) || other.mKey == mKey) &&
(identical(other.mCnt, mCnt) || other.mCnt == mCnt)); (identical(other.mCnt, mCnt) || other.mCnt == mCnt));
} }
@ -563,13 +563,12 @@ class _$DHTSchemaMemberImpl implements _DHTSchemaMember {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith => _$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
__$$DHTSchemaMemberImplCopyWithImpl<_$DHTSchemaMemberImpl>( __$$_DHTSchemaMemberCopyWithImpl<_$_DHTSchemaMember>(this, _$identity);
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$DHTSchemaMemberImplToJson( return _$$_DHTSchemaMemberToJson(
this, this,
); );
} }
@ -578,10 +577,10 @@ class _$DHTSchemaMemberImpl implements _DHTSchemaMember {
abstract class _DHTSchemaMember implements DHTSchemaMember { abstract class _DHTSchemaMember implements DHTSchemaMember {
const factory _DHTSchemaMember( const factory _DHTSchemaMember(
{required final FixedEncodedString43 mKey, {required final FixedEncodedString43 mKey,
required final int mCnt}) = _$DHTSchemaMemberImpl; required final int mCnt}) = _$_DHTSchemaMember;
factory _DHTSchemaMember.fromJson(Map<String, dynamic> json) = factory _DHTSchemaMember.fromJson(Map<String, dynamic> json) =
_$DHTSchemaMemberImpl.fromJson; _$_DHTSchemaMember.fromJson;
@override @override
FixedEncodedString43 get mKey; FixedEncodedString43 get mKey;
@ -589,7 +588,7 @@ abstract class _DHTSchemaMember implements DHTSchemaMember {
int get mCnt; int get mCnt;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith => _$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -673,11 +672,11 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res, $Val extends DHTRecordDescriptor>
} }
/// @nodoc /// @nodoc
abstract class _$$DHTRecordDescriptorImplCopyWith<$Res> abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
implements $DHTRecordDescriptorCopyWith<$Res> { implements $DHTRecordDescriptorCopyWith<$Res> {
factory _$$DHTRecordDescriptorImplCopyWith(_$DHTRecordDescriptorImpl value, factory _$$_DHTRecordDescriptorCopyWith(_$_DHTRecordDescriptor value,
$Res Function(_$DHTRecordDescriptorImpl) then) = $Res Function(_$_DHTRecordDescriptor) then) =
__$$DHTRecordDescriptorImplCopyWithImpl<$Res>; __$$_DHTRecordDescriptorCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@ -691,11 +690,11 @@ abstract class _$$DHTRecordDescriptorImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$DHTRecordDescriptorImplCopyWithImpl<$Res> class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$DHTRecordDescriptorImpl> extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$_DHTRecordDescriptor>
implements _$$DHTRecordDescriptorImplCopyWith<$Res> { implements _$$_DHTRecordDescriptorCopyWith<$Res> {
__$$DHTRecordDescriptorImplCopyWithImpl(_$DHTRecordDescriptorImpl _value, __$$_DHTRecordDescriptorCopyWithImpl(_$_DHTRecordDescriptor _value,
$Res Function(_$DHTRecordDescriptorImpl) _then) $Res Function(_$_DHTRecordDescriptor) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -706,7 +705,7 @@ class __$$DHTRecordDescriptorImplCopyWithImpl<$Res>
Object? schema = null, Object? schema = null,
Object? ownerSecret = freezed, Object? ownerSecret = freezed,
}) { }) {
return _then(_$DHTRecordDescriptorImpl( return _then(_$_DHTRecordDescriptor(
key: null == key key: null == key
? _value.key ? _value.key
: key // ignore: cast_nullable_to_non_nullable : key // ignore: cast_nullable_to_non_nullable
@ -729,15 +728,15 @@ class __$$DHTRecordDescriptorImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$DHTRecordDescriptorImpl implements _DHTRecordDescriptor { class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
const _$DHTRecordDescriptorImpl( const _$_DHTRecordDescriptor(
{required this.key, {required this.key,
required this.owner, required this.owner,
required this.schema, required this.schema,
this.ownerSecret}); this.ownerSecret});
factory _$DHTRecordDescriptorImpl.fromJson(Map<String, dynamic> json) => factory _$_DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =>
_$$DHTRecordDescriptorImplFromJson(json); _$$_DHTRecordDescriptorFromJson(json);
@override @override
final Typed<FixedEncodedString43> key; final Typed<FixedEncodedString43> key;
@ -757,7 +756,7 @@ class _$DHTRecordDescriptorImpl implements _DHTRecordDescriptor {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$DHTRecordDescriptorImpl && other is _$_DHTRecordDescriptor &&
(identical(other.key, key) || other.key == key) && (identical(other.key, key) || other.key == key) &&
(identical(other.owner, owner) || other.owner == owner) && (identical(other.owner, owner) || other.owner == owner) &&
(identical(other.schema, schema) || other.schema == schema) && (identical(other.schema, schema) || other.schema == schema) &&
@ -772,13 +771,13 @@ class _$DHTRecordDescriptorImpl implements _DHTRecordDescriptor {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith => _$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
__$$DHTRecordDescriptorImplCopyWithImpl<_$DHTRecordDescriptorImpl>( __$$_DHTRecordDescriptorCopyWithImpl<_$_DHTRecordDescriptor>(
this, _$identity); this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$DHTRecordDescriptorImplToJson( return _$$_DHTRecordDescriptorToJson(
this, this,
); );
} }
@ -789,10 +788,10 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
{required final Typed<FixedEncodedString43> key, {required final Typed<FixedEncodedString43> key,
required final FixedEncodedString43 owner, required final FixedEncodedString43 owner,
required final DHTSchema schema, required final DHTSchema schema,
final FixedEncodedString43? ownerSecret}) = _$DHTRecordDescriptorImpl; final FixedEncodedString43? ownerSecret}) = _$_DHTRecordDescriptor;
factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) = factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =
_$DHTRecordDescriptorImpl.fromJson; _$_DHTRecordDescriptor.fromJson;
@override @override
Typed<FixedEncodedString43> get key; Typed<FixedEncodedString43> get key;
@ -804,7 +803,7 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
FixedEncodedString43? get ownerSecret; FixedEncodedString43? get ownerSecret;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith => _$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -862,22 +861,22 @@ class _$ValueSubkeyRangeCopyWithImpl<$Res, $Val extends ValueSubkeyRange>
} }
/// @nodoc /// @nodoc
abstract class _$$ValueSubkeyRangeImplCopyWith<$Res> abstract class _$$_ValueSubkeyRangeCopyWith<$Res>
implements $ValueSubkeyRangeCopyWith<$Res> { implements $ValueSubkeyRangeCopyWith<$Res> {
factory _$$ValueSubkeyRangeImplCopyWith(_$ValueSubkeyRangeImpl value, factory _$$_ValueSubkeyRangeCopyWith(
$Res Function(_$ValueSubkeyRangeImpl) then) = _$_ValueSubkeyRange value, $Res Function(_$_ValueSubkeyRange) then) =
__$$ValueSubkeyRangeImplCopyWithImpl<$Res>; __$$_ValueSubkeyRangeCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int low, int high}); $Res call({int low, int high});
} }
/// @nodoc /// @nodoc
class __$$ValueSubkeyRangeImplCopyWithImpl<$Res> class __$$_ValueSubkeyRangeCopyWithImpl<$Res>
extends _$ValueSubkeyRangeCopyWithImpl<$Res, _$ValueSubkeyRangeImpl> extends _$ValueSubkeyRangeCopyWithImpl<$Res, _$_ValueSubkeyRange>
implements _$$ValueSubkeyRangeImplCopyWith<$Res> { implements _$$_ValueSubkeyRangeCopyWith<$Res> {
__$$ValueSubkeyRangeImplCopyWithImpl(_$ValueSubkeyRangeImpl _value, __$$_ValueSubkeyRangeCopyWithImpl(
$Res Function(_$ValueSubkeyRangeImpl) _then) _$_ValueSubkeyRange _value, $Res Function(_$_ValueSubkeyRange) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -886,7 +885,7 @@ class __$$ValueSubkeyRangeImplCopyWithImpl<$Res>
Object? low = null, Object? low = null,
Object? high = null, Object? high = null,
}) { }) {
return _then(_$ValueSubkeyRangeImpl( return _then(_$_ValueSubkeyRange(
low: null == low low: null == low
? _value.low ? _value.low
: low // ignore: cast_nullable_to_non_nullable : low // ignore: cast_nullable_to_non_nullable
@ -901,13 +900,13 @@ class __$$ValueSubkeyRangeImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange { class _$_ValueSubkeyRange implements _ValueSubkeyRange {
const _$ValueSubkeyRangeImpl({required this.low, required this.high}) const _$_ValueSubkeyRange({required this.low, required this.high})
: assert(low < 0 || low > high, 'low out of range'), : assert(low < 0 || low > high, 'low out of range'),
assert(high < 0, 'high out of range'); assert(high < 0, 'high out of range');
factory _$ValueSubkeyRangeImpl.fromJson(Map<String, dynamic> json) => factory _$_ValueSubkeyRange.fromJson(Map<String, dynamic> json) =>
_$$ValueSubkeyRangeImplFromJson(json); _$$_ValueSubkeyRangeFromJson(json);
@override @override
final int low; final int low;
@ -923,7 +922,7 @@ class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ValueSubkeyRangeImpl && other is _$_ValueSubkeyRange &&
(identical(other.low, low) || other.low == low) && (identical(other.low, low) || other.low == low) &&
(identical(other.high, high) || other.high == high)); (identical(other.high, high) || other.high == high));
} }
@ -935,13 +934,12 @@ class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ValueSubkeyRangeImplCopyWith<_$ValueSubkeyRangeImpl> get copyWith => _$$_ValueSubkeyRangeCopyWith<_$_ValueSubkeyRange> get copyWith =>
__$$ValueSubkeyRangeImplCopyWithImpl<_$ValueSubkeyRangeImpl>( __$$_ValueSubkeyRangeCopyWithImpl<_$_ValueSubkeyRange>(this, _$identity);
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$ValueSubkeyRangeImplToJson( return _$$_ValueSubkeyRangeToJson(
this, this,
); );
} }
@ -949,11 +947,10 @@ class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
abstract class _ValueSubkeyRange implements ValueSubkeyRange { abstract class _ValueSubkeyRange implements ValueSubkeyRange {
const factory _ValueSubkeyRange( const factory _ValueSubkeyRange(
{required final int low, {required final int low, required final int high}) = _$_ValueSubkeyRange;
required final int high}) = _$ValueSubkeyRangeImpl;
factory _ValueSubkeyRange.fromJson(Map<String, dynamic> json) = factory _ValueSubkeyRange.fromJson(Map<String, dynamic> json) =
_$ValueSubkeyRangeImpl.fromJson; _$_ValueSubkeyRange.fromJson;
@override @override
int get low; int get low;
@ -961,7 +958,7 @@ abstract class _ValueSubkeyRange implements ValueSubkeyRange {
int get high; int get high;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ValueSubkeyRangeImplCopyWith<_$ValueSubkeyRangeImpl> get copyWith => _$$_ValueSubkeyRangeCopyWith<_$_ValueSubkeyRange> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -1028,11 +1025,10 @@ class _$ValueDataCopyWithImpl<$Res, $Val extends ValueData>
} }
/// @nodoc /// @nodoc
abstract class _$$ValueDataImplCopyWith<$Res> abstract class _$$_ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> {
implements $ValueDataCopyWith<$Res> { factory _$$_ValueDataCopyWith(
factory _$$ValueDataImplCopyWith( _$_ValueData value, $Res Function(_$_ValueData) then) =
_$ValueDataImpl value, $Res Function(_$ValueDataImpl) then) = __$$_ValueDataCopyWithImpl<$Res>;
__$$ValueDataImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@ -1042,11 +1038,11 @@ abstract class _$$ValueDataImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$ValueDataImplCopyWithImpl<$Res> class __$$_ValueDataCopyWithImpl<$Res>
extends _$ValueDataCopyWithImpl<$Res, _$ValueDataImpl> extends _$ValueDataCopyWithImpl<$Res, _$_ValueData>
implements _$$ValueDataImplCopyWith<$Res> { implements _$$_ValueDataCopyWith<$Res> {
__$$ValueDataImplCopyWithImpl( __$$_ValueDataCopyWithImpl(
_$ValueDataImpl _value, $Res Function(_$ValueDataImpl) _then) _$_ValueData _value, $Res Function(_$_ValueData) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -1056,7 +1052,7 @@ class __$$ValueDataImplCopyWithImpl<$Res>
Object? data = null, Object? data = null,
Object? writer = null, Object? writer = null,
}) { }) {
return _then(_$ValueDataImpl( return _then(_$_ValueData(
seq: null == seq seq: null == seq
? _value.seq ? _value.seq
: seq // ignore: cast_nullable_to_non_nullable : seq // ignore: cast_nullable_to_non_nullable
@ -1075,15 +1071,15 @@ class __$$ValueDataImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$ValueDataImpl implements _ValueData { class _$_ValueData implements _ValueData {
const _$ValueDataImpl( const _$_ValueData(
{required this.seq, {required this.seq,
@Uint8ListJsonConverter.jsIsArray() required this.data, @Uint8ListJsonConverter.jsIsArray() required this.data,
required this.writer}) required this.writer})
: assert(seq >= 0, 'seq out of range'); : assert(seq >= 0, 'seq out of range');
factory _$ValueDataImpl.fromJson(Map<String, dynamic> json) => factory _$_ValueData.fromJson(Map<String, dynamic> json) =>
_$$ValueDataImplFromJson(json); _$$_ValueDataFromJson(json);
@override @override
final int seq; final int seq;
@ -1102,7 +1098,7 @@ class _$ValueDataImpl implements _ValueData {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ValueDataImpl && other is _$_ValueData &&
(identical(other.seq, seq) || other.seq == seq) && (identical(other.seq, seq) || other.seq == seq) &&
const DeepCollectionEquality().equals(other.data, data) && const DeepCollectionEquality().equals(other.data, data) &&
(identical(other.writer, writer) || other.writer == writer)); (identical(other.writer, writer) || other.writer == writer));
@ -1116,12 +1112,12 @@ class _$ValueDataImpl implements _ValueData {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith => _$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
__$$ValueDataImplCopyWithImpl<_$ValueDataImpl>(this, _$identity); __$$_ValueDataCopyWithImpl<_$_ValueData>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$ValueDataImplToJson( return _$$_ValueDataToJson(
this, this,
); );
} }
@ -1131,10 +1127,10 @@ abstract class _ValueData implements ValueData {
const factory _ValueData( const factory _ValueData(
{required final int seq, {required final int seq,
@Uint8ListJsonConverter.jsIsArray() required final Uint8List data, @Uint8ListJsonConverter.jsIsArray() required final Uint8List data,
required final FixedEncodedString43 writer}) = _$ValueDataImpl; required final FixedEncodedString43 writer}) = _$_ValueData;
factory _ValueData.fromJson(Map<String, dynamic> json) = factory _ValueData.fromJson(Map<String, dynamic> json) =
_$ValueDataImpl.fromJson; _$_ValueData.fromJson;
@override @override
int get seq; int get seq;
@ -1145,7 +1141,7 @@ abstract class _ValueData implements ValueData {
FixedEncodedString43 get writer; FixedEncodedString43 get writer;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith => _$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -1219,11 +1215,11 @@ class _$SafetySpecCopyWithImpl<$Res, $Val extends SafetySpec>
} }
/// @nodoc /// @nodoc
abstract class _$$SafetySpecImplCopyWith<$Res> abstract class _$$_SafetySpecCopyWith<$Res>
implements $SafetySpecCopyWith<$Res> { implements $SafetySpecCopyWith<$Res> {
factory _$$SafetySpecImplCopyWith( factory _$$_SafetySpecCopyWith(
_$SafetySpecImpl value, $Res Function(_$SafetySpecImpl) then) = _$_SafetySpec value, $Res Function(_$_SafetySpec) then) =
__$$SafetySpecImplCopyWithImpl<$Res>; __$$_SafetySpecCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@ -1234,11 +1230,11 @@ abstract class _$$SafetySpecImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$SafetySpecImplCopyWithImpl<$Res> class __$$_SafetySpecCopyWithImpl<$Res>
extends _$SafetySpecCopyWithImpl<$Res, _$SafetySpecImpl> extends _$SafetySpecCopyWithImpl<$Res, _$_SafetySpec>
implements _$$SafetySpecImplCopyWith<$Res> { implements _$$_SafetySpecCopyWith<$Res> {
__$$SafetySpecImplCopyWithImpl( __$$_SafetySpecCopyWithImpl(
_$SafetySpecImpl _value, $Res Function(_$SafetySpecImpl) _then) _$_SafetySpec _value, $Res Function(_$_SafetySpec) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -1249,7 +1245,7 @@ class __$$SafetySpecImplCopyWithImpl<$Res>
Object? sequencing = null, Object? sequencing = null,
Object? preferredRoute = freezed, Object? preferredRoute = freezed,
}) { }) {
return _then(_$SafetySpecImpl( return _then(_$_SafetySpec(
hopCount: null == hopCount hopCount: null == hopCount
? _value.hopCount ? _value.hopCount
: hopCount // ignore: cast_nullable_to_non_nullable : hopCount // ignore: cast_nullable_to_non_nullable
@ -1272,15 +1268,15 @@ class __$$SafetySpecImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$SafetySpecImpl implements _SafetySpec { class _$_SafetySpec implements _SafetySpec {
const _$SafetySpecImpl( const _$_SafetySpec(
{required this.hopCount, {required this.hopCount,
required this.stability, required this.stability,
required this.sequencing, required this.sequencing,
this.preferredRoute}); this.preferredRoute});
factory _$SafetySpecImpl.fromJson(Map<String, dynamic> json) => factory _$_SafetySpec.fromJson(Map<String, dynamic> json) =>
_$$SafetySpecImplFromJson(json); _$$_SafetySpecFromJson(json);
@override @override
final int hopCount; final int hopCount;
@ -1300,7 +1296,7 @@ class _$SafetySpecImpl implements _SafetySpec {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$SafetySpecImpl && other is _$_SafetySpec &&
(identical(other.hopCount, hopCount) || (identical(other.hopCount, hopCount) ||
other.hopCount == hopCount) && other.hopCount == hopCount) &&
(identical(other.stability, stability) || (identical(other.stability, stability) ||
@ -1319,12 +1315,12 @@ class _$SafetySpecImpl implements _SafetySpec {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith => _$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
__$$SafetySpecImplCopyWithImpl<_$SafetySpecImpl>(this, _$identity); __$$_SafetySpecCopyWithImpl<_$_SafetySpec>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$SafetySpecImplToJson( return _$$_SafetySpecToJson(
this, this,
); );
} }
@ -1335,10 +1331,10 @@ abstract class _SafetySpec implements SafetySpec {
{required final int hopCount, {required final int hopCount,
required final Stability stability, required final Stability stability,
required final Sequencing sequencing, required final Sequencing sequencing,
final String? preferredRoute}) = _$SafetySpecImpl; final String? preferredRoute}) = _$_SafetySpec;
factory _SafetySpec.fromJson(Map<String, dynamic> json) = factory _SafetySpec.fromJson(Map<String, dynamic> json) =
_$SafetySpecImpl.fromJson; _$_SafetySpec.fromJson;
@override @override
int get hopCount; int get hopCount;
@ -1350,7 +1346,7 @@ abstract class _SafetySpec implements SafetySpec {
String? get preferredRoute; String? get preferredRoute;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith => _$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -1408,22 +1404,21 @@ class _$RouteBlobCopyWithImpl<$Res, $Val extends RouteBlob>
} }
/// @nodoc /// @nodoc
abstract class _$$RouteBlobImplCopyWith<$Res> abstract class _$$_RouteBlobCopyWith<$Res> implements $RouteBlobCopyWith<$Res> {
implements $RouteBlobCopyWith<$Res> { factory _$$_RouteBlobCopyWith(
factory _$$RouteBlobImplCopyWith( _$_RouteBlob value, $Res Function(_$_RouteBlob) then) =
_$RouteBlobImpl value, $Res Function(_$RouteBlobImpl) then) = __$$_RouteBlobCopyWithImpl<$Res>;
__$$RouteBlobImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({String routeId, @Uint8ListJsonConverter() Uint8List blob}); $Res call({String routeId, @Uint8ListJsonConverter() Uint8List blob});
} }
/// @nodoc /// @nodoc
class __$$RouteBlobImplCopyWithImpl<$Res> class __$$_RouteBlobCopyWithImpl<$Res>
extends _$RouteBlobCopyWithImpl<$Res, _$RouteBlobImpl> extends _$RouteBlobCopyWithImpl<$Res, _$_RouteBlob>
implements _$$RouteBlobImplCopyWith<$Res> { implements _$$_RouteBlobCopyWith<$Res> {
__$$RouteBlobImplCopyWithImpl( __$$_RouteBlobCopyWithImpl(
_$RouteBlobImpl _value, $Res Function(_$RouteBlobImpl) _then) _$_RouteBlob _value, $Res Function(_$_RouteBlob) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@ -1432,7 +1427,7 @@ class __$$RouteBlobImplCopyWithImpl<$Res>
Object? routeId = null, Object? routeId = null,
Object? blob = null, Object? blob = null,
}) { }) {
return _then(_$RouteBlobImpl( return _then(_$_RouteBlob(
routeId: null == routeId routeId: null == routeId
? _value.routeId ? _value.routeId
: routeId // ignore: cast_nullable_to_non_nullable : routeId // ignore: cast_nullable_to_non_nullable
@ -1447,12 +1442,12 @@ class __$$RouteBlobImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$RouteBlobImpl implements _RouteBlob { class _$_RouteBlob implements _RouteBlob {
const _$RouteBlobImpl( const _$_RouteBlob(
{required this.routeId, @Uint8ListJsonConverter() required this.blob}); {required this.routeId, @Uint8ListJsonConverter() required this.blob});
factory _$RouteBlobImpl.fromJson(Map<String, dynamic> json) => factory _$_RouteBlob.fromJson(Map<String, dynamic> json) =>
_$$RouteBlobImplFromJson(json); _$$_RouteBlobFromJson(json);
@override @override
final String routeId; final String routeId;
@ -1469,7 +1464,7 @@ class _$RouteBlobImpl implements _RouteBlob {
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$RouteBlobImpl && other is _$_RouteBlob &&
(identical(other.routeId, routeId) || other.routeId == routeId) && (identical(other.routeId, routeId) || other.routeId == routeId) &&
const DeepCollectionEquality().equals(other.blob, blob)); const DeepCollectionEquality().equals(other.blob, blob));
} }
@ -1482,12 +1477,12 @@ class _$RouteBlobImpl implements _RouteBlob {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith => _$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
__$$RouteBlobImplCopyWithImpl<_$RouteBlobImpl>(this, _$identity); __$$_RouteBlobCopyWithImpl<_$_RouteBlob>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$RouteBlobImplToJson( return _$$_RouteBlobToJson(
this, this,
); );
} }
@ -1495,12 +1490,11 @@ class _$RouteBlobImpl implements _RouteBlob {
abstract class _RouteBlob implements RouteBlob { abstract class _RouteBlob implements RouteBlob {
const factory _RouteBlob( const factory _RouteBlob(
{required final String routeId, {required final String routeId,
@Uint8ListJsonConverter() required final Uint8List blob}) = @Uint8ListJsonConverter() required final Uint8List blob}) = _$_RouteBlob;
_$RouteBlobImpl;
factory _RouteBlob.fromJson(Map<String, dynamic> json) = factory _RouteBlob.fromJson(Map<String, dynamic> json) =
_$RouteBlobImpl.fromJson; _$_RouteBlob.fromJson;
@override @override
String get routeId; String get routeId;
@ -1509,6 +1503,6 @@ abstract class _RouteBlob implements RouteBlob {
Uint8List get blob; Uint8List get blob;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith => _$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@ -6,20 +6,20 @@ part of 'routing_context.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$DHTSchemaDFLTImpl _$$DHTSchemaDFLTImplFromJson(Map<String, dynamic> json) => _$DHTSchemaDFLT _$$DHTSchemaDFLTFromJson(Map<String, dynamic> json) =>
_$DHTSchemaDFLTImpl( _$DHTSchemaDFLT(
oCnt: json['o_cnt'] as int, oCnt: json['o_cnt'] as int,
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$DHTSchemaDFLTImplToJson(_$DHTSchemaDFLTImpl instance) => Map<String, dynamic> _$$DHTSchemaDFLTToJson(_$DHTSchemaDFLT instance) =>
<String, dynamic>{ <String, dynamic>{
'o_cnt': instance.oCnt, 'o_cnt': instance.oCnt,
'kind': instance.$type, 'kind': instance.$type,
}; };
_$DHTSchemaSMPLImpl _$$DHTSchemaSMPLImplFromJson(Map<String, dynamic> json) => _$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
_$DHTSchemaSMPLImpl( _$DHTSchemaSMPL(
oCnt: json['o_cnt'] as int, oCnt: json['o_cnt'] as int,
members: (json['members'] as List<dynamic>) members: (json['members'] as List<dynamic>)
.map(DHTSchemaMember.fromJson) .map(DHTSchemaMember.fromJson)
@ -27,30 +27,28 @@ _$DHTSchemaSMPLImpl _$$DHTSchemaSMPLImplFromJson(Map<String, dynamic> json) =>
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$DHTSchemaSMPLImplToJson(_$DHTSchemaSMPLImpl instance) => Map<String, dynamic> _$$DHTSchemaSMPLToJson(_$DHTSchemaSMPL instance) =>
<String, dynamic>{ <String, dynamic>{
'o_cnt': instance.oCnt, 'o_cnt': instance.oCnt,
'members': instance.members.map((e) => e.toJson()).toList(), 'members': instance.members.map((e) => e.toJson()).toList(),
'kind': instance.$type, 'kind': instance.$type,
}; };
_$DHTSchemaMemberImpl _$$DHTSchemaMemberImplFromJson( _$_DHTSchemaMember _$$_DHTSchemaMemberFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_DHTSchemaMember(
_$DHTSchemaMemberImpl(
mKey: FixedEncodedString43.fromJson(json['m_key']), mKey: FixedEncodedString43.fromJson(json['m_key']),
mCnt: json['m_cnt'] as int, mCnt: json['m_cnt'] as int,
); );
Map<String, dynamic> _$$DHTSchemaMemberImplToJson( Map<String, dynamic> _$$_DHTSchemaMemberToJson(_$_DHTSchemaMember instance) =>
_$DHTSchemaMemberImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'm_key': instance.mKey.toJson(), 'm_key': instance.mKey.toJson(),
'm_cnt': instance.mCnt, 'm_cnt': instance.mCnt,
}; };
_$DHTRecordDescriptorImpl _$$DHTRecordDescriptorImplFromJson( _$_DHTRecordDescriptor _$$_DHTRecordDescriptorFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$DHTRecordDescriptorImpl( _$_DHTRecordDescriptor(
key: Typed<FixedEncodedString43>.fromJson(json['key']), key: Typed<FixedEncodedString43>.fromJson(json['key']),
owner: FixedEncodedString43.fromJson(json['owner']), owner: FixedEncodedString43.fromJson(json['owner']),
schema: DHTSchema.fromJson(json['schema']), schema: DHTSchema.fromJson(json['schema']),
@ -59,8 +57,8 @@ _$DHTRecordDescriptorImpl _$$DHTRecordDescriptorImplFromJson(
: FixedEncodedString43.fromJson(json['owner_secret']), : FixedEncodedString43.fromJson(json['owner_secret']),
); );
Map<String, dynamic> _$$DHTRecordDescriptorImplToJson( Map<String, dynamic> _$$_DHTRecordDescriptorToJson(
_$DHTRecordDescriptorImpl instance) => _$_DHTRecordDescriptor instance) =>
<String, dynamic>{ <String, dynamic>{
'key': instance.key.toJson(), 'key': instance.key.toJson(),
'owner': instance.owner.toJson(), 'owner': instance.owner.toJson(),
@ -68,43 +66,40 @@ Map<String, dynamic> _$$DHTRecordDescriptorImplToJson(
'owner_secret': instance.ownerSecret?.toJson(), 'owner_secret': instance.ownerSecret?.toJson(),
}; };
_$ValueSubkeyRangeImpl _$$ValueSubkeyRangeImplFromJson( _$_ValueSubkeyRange _$$_ValueSubkeyRangeFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_ValueSubkeyRange(
_$ValueSubkeyRangeImpl(
low: json['low'] as int, low: json['low'] as int,
high: json['high'] as int, high: json['high'] as int,
); );
Map<String, dynamic> _$$ValueSubkeyRangeImplToJson( Map<String, dynamic> _$$_ValueSubkeyRangeToJson(_$_ValueSubkeyRange instance) =>
_$ValueSubkeyRangeImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'low': instance.low, 'low': instance.low,
'high': instance.high, 'high': instance.high,
}; };
_$ValueDataImpl _$$ValueDataImplFromJson(Map<String, dynamic> json) => _$_ValueData _$$_ValueDataFromJson(Map<String, dynamic> json) => _$_ValueData(
_$ValueDataImpl(
seq: json['seq'] as int, seq: json['seq'] as int,
data: const Uint8ListJsonConverter.jsIsArray().fromJson(json['data']), data: const Uint8ListJsonConverter.jsIsArray().fromJson(json['data']),
writer: FixedEncodedString43.fromJson(json['writer']), writer: FixedEncodedString43.fromJson(json['writer']),
); );
Map<String, dynamic> _$$ValueDataImplToJson(_$ValueDataImpl instance) => Map<String, dynamic> _$$_ValueDataToJson(_$_ValueData instance) =>
<String, dynamic>{ <String, dynamic>{
'seq': instance.seq, 'seq': instance.seq,
'data': const Uint8ListJsonConverter.jsIsArray().toJson(instance.data), 'data': const Uint8ListJsonConverter.jsIsArray().toJson(instance.data),
'writer': instance.writer.toJson(), 'writer': instance.writer.toJson(),
}; };
_$SafetySpecImpl _$$SafetySpecImplFromJson(Map<String, dynamic> json) => _$_SafetySpec _$$_SafetySpecFromJson(Map<String, dynamic> json) =>
_$SafetySpecImpl( _$_SafetySpec(
hopCount: json['hop_count'] as int, hopCount: json['hop_count'] as int,
stability: Stability.fromJson(json['stability']), stability: Stability.fromJson(json['stability']),
sequencing: Sequencing.fromJson(json['sequencing']), sequencing: Sequencing.fromJson(json['sequencing']),
preferredRoute: json['preferred_route'] as String?, preferredRoute: json['preferred_route'] as String?,
); );
Map<String, dynamic> _$$SafetySpecImplToJson(_$SafetySpecImpl instance) => Map<String, dynamic> _$$_SafetySpecToJson(_$_SafetySpec instance) =>
<String, dynamic>{ <String, dynamic>{
'hop_count': instance.hopCount, 'hop_count': instance.hopCount,
'stability': instance.stability.toJson(), 'stability': instance.stability.toJson(),
@ -112,13 +107,12 @@ Map<String, dynamic> _$$SafetySpecImplToJson(_$SafetySpecImpl instance) =>
'preferred_route': instance.preferredRoute, 'preferred_route': instance.preferredRoute,
}; };
_$RouteBlobImpl _$$RouteBlobImplFromJson(Map<String, dynamic> json) => _$_RouteBlob _$$_RouteBlobFromJson(Map<String, dynamic> json) => _$_RouteBlob(
_$RouteBlobImpl(
routeId: json['route_id'] as String, routeId: json['route_id'] as String,
blob: const Uint8ListJsonConverter().fromJson(json['blob']), blob: const Uint8ListJsonConverter().fromJson(json['blob']),
); );
Map<String, dynamic> _$$RouteBlobImplToJson(_$RouteBlobImpl instance) => Map<String, dynamic> _$$_RouteBlobToJson(_$_RouteBlob instance) =>
<String, dynamic>{ <String, dynamic>{
'route_id': instance.routeId, 'route_id': instance.routeId,
'blob': const Uint8ListJsonConverter().toJson(instance.blob), 'blob': const Uint8ListJsonConverter().toJson(instance.blob),

View File

@ -285,6 +285,7 @@ class VeilidConfigDHT with _$VeilidConfigDHT {
required int remoteMaxStorageSpaceMb, required int remoteMaxStorageSpaceMb,
required int publicWatchLimit, required int publicWatchLimit,
required int memberWatchLimit, required int memberWatchLimit,
required int maxWatchExpirationMs,
}) = _VeilidConfigDHT; }) = _VeilidConfigDHT;
factory VeilidConfigDHT.fromJson(dynamic json) => factory VeilidConfigDHT.fromJson(dynamic json) =>

File diff suppressed because it is too large Load Diff

View File

@ -6,31 +6,31 @@ part of 'veilid_config.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$VeilidFFIConfigLoggingTerminalImpl _$_VeilidFFIConfigLoggingTerminal _$$_VeilidFFIConfigLoggingTerminalFromJson(
_$$VeilidFFIConfigLoggingTerminalImplFromJson(Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidFFIConfigLoggingTerminalImpl( _$_VeilidFFIConfigLoggingTerminal(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
level: VeilidConfigLogLevel.fromJson(json['level']), level: VeilidConfigLogLevel.fromJson(json['level']),
); );
Map<String, dynamic> _$$VeilidFFIConfigLoggingTerminalImplToJson( Map<String, dynamic> _$$_VeilidFFIConfigLoggingTerminalToJson(
_$VeilidFFIConfigLoggingTerminalImpl instance) => _$_VeilidFFIConfigLoggingTerminal instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'level': instance.level.toJson(), 'level': instance.level.toJson(),
}; };
_$VeilidFFIConfigLoggingOtlpImpl _$$VeilidFFIConfigLoggingOtlpImplFromJson( _$_VeilidFFIConfigLoggingOtlp _$$_VeilidFFIConfigLoggingOtlpFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidFFIConfigLoggingOtlpImpl( _$_VeilidFFIConfigLoggingOtlp(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
level: VeilidConfigLogLevel.fromJson(json['level']), level: VeilidConfigLogLevel.fromJson(json['level']),
grpcEndpoint: json['grpc_endpoint'] as String, grpcEndpoint: json['grpc_endpoint'] as String,
serviceName: json['service_name'] as String, serviceName: json['service_name'] as String,
); );
Map<String, dynamic> _$$VeilidFFIConfigLoggingOtlpImplToJson( Map<String, dynamic> _$$_VeilidFFIConfigLoggingOtlpToJson(
_$VeilidFFIConfigLoggingOtlpImpl instance) => _$_VeilidFFIConfigLoggingOtlp instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'level': instance.level.toJson(), 'level': instance.level.toJson(),
@ -38,60 +38,57 @@ Map<String, dynamic> _$$VeilidFFIConfigLoggingOtlpImplToJson(
'service_name': instance.serviceName, 'service_name': instance.serviceName,
}; };
_$VeilidFFIConfigLoggingApiImpl _$$VeilidFFIConfigLoggingApiImplFromJson( _$_VeilidFFIConfigLoggingApi _$$_VeilidFFIConfigLoggingApiFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidFFIConfigLoggingApiImpl( _$_VeilidFFIConfigLoggingApi(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
level: VeilidConfigLogLevel.fromJson(json['level']), level: VeilidConfigLogLevel.fromJson(json['level']),
); );
Map<String, dynamic> _$$VeilidFFIConfigLoggingApiImplToJson( Map<String, dynamic> _$$_VeilidFFIConfigLoggingApiToJson(
_$VeilidFFIConfigLoggingApiImpl instance) => _$_VeilidFFIConfigLoggingApi instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'level': instance.level.toJson(), 'level': instance.level.toJson(),
}; };
_$VeilidFFIConfigLoggingImpl _$$VeilidFFIConfigLoggingImplFromJson( _$_VeilidFFIConfigLogging _$$_VeilidFFIConfigLoggingFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidFFIConfigLoggingImpl( _$_VeilidFFIConfigLogging(
terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']), terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']),
otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']), otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']),
api: VeilidFFIConfigLoggingApi.fromJson(json['api']), api: VeilidFFIConfigLoggingApi.fromJson(json['api']),
); );
Map<String, dynamic> _$$VeilidFFIConfigLoggingImplToJson( Map<String, dynamic> _$$_VeilidFFIConfigLoggingToJson(
_$VeilidFFIConfigLoggingImpl instance) => _$_VeilidFFIConfigLogging instance) =>
<String, dynamic>{ <String, dynamic>{
'terminal': instance.terminal.toJson(), 'terminal': instance.terminal.toJson(),
'otlp': instance.otlp.toJson(), 'otlp': instance.otlp.toJson(),
'api': instance.api.toJson(), 'api': instance.api.toJson(),
}; };
_$VeilidFFIConfigImpl _$$VeilidFFIConfigImplFromJson( _$_VeilidFFIConfig _$$_VeilidFFIConfigFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidFFIConfig(
_$VeilidFFIConfigImpl(
logging: VeilidFFIConfigLogging.fromJson(json['logging']), logging: VeilidFFIConfigLogging.fromJson(json['logging']),
); );
Map<String, dynamic> _$$VeilidFFIConfigImplToJson( Map<String, dynamic> _$$_VeilidFFIConfigToJson(_$_VeilidFFIConfig instance) =>
_$VeilidFFIConfigImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'logging': instance.logging.toJson(), 'logging': instance.logging.toJson(),
}; };
_$VeilidWASMConfigLoggingPerformanceImpl _$_VeilidWASMConfigLoggingPerformance
_$$VeilidWASMConfigLoggingPerformanceImplFromJson( _$$_VeilidWASMConfigLoggingPerformanceFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidWASMConfigLoggingPerformance(
_$VeilidWASMConfigLoggingPerformanceImpl(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
level: VeilidConfigLogLevel.fromJson(json['level']), level: VeilidConfigLogLevel.fromJson(json['level']),
logsInTimings: json['logs_in_timings'] as bool, logsInTimings: json['logs_in_timings'] as bool,
logsInConsole: json['logs_in_console'] as bool, logsInConsole: json['logs_in_console'] as bool,
); );
Map<String, dynamic> _$$VeilidWASMConfigLoggingPerformanceImplToJson( Map<String, dynamic> _$$_VeilidWASMConfigLoggingPerformanceToJson(
_$VeilidWASMConfigLoggingPerformanceImpl instance) => _$_VeilidWASMConfigLoggingPerformance instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'level': instance.level.toJson(), 'level': instance.level.toJson(),
@ -99,58 +96,55 @@ Map<String, dynamic> _$$VeilidWASMConfigLoggingPerformanceImplToJson(
'logs_in_console': instance.logsInConsole, 'logs_in_console': instance.logsInConsole,
}; };
_$VeilidWASMConfigLoggingApiImpl _$$VeilidWASMConfigLoggingApiImplFromJson( _$_VeilidWASMConfigLoggingApi _$$_VeilidWASMConfigLoggingApiFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidWASMConfigLoggingApiImpl( _$_VeilidWASMConfigLoggingApi(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
level: VeilidConfigLogLevel.fromJson(json['level']), level: VeilidConfigLogLevel.fromJson(json['level']),
); );
Map<String, dynamic> _$$VeilidWASMConfigLoggingApiImplToJson( Map<String, dynamic> _$$_VeilidWASMConfigLoggingApiToJson(
_$VeilidWASMConfigLoggingApiImpl instance) => _$_VeilidWASMConfigLoggingApi instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'level': instance.level.toJson(), 'level': instance.level.toJson(),
}; };
_$VeilidWASMConfigLoggingImpl _$$VeilidWASMConfigLoggingImplFromJson( _$_VeilidWASMConfigLogging _$$_VeilidWASMConfigLoggingFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidWASMConfigLoggingImpl( _$_VeilidWASMConfigLogging(
performance: performance:
VeilidWASMConfigLoggingPerformance.fromJson(json['performance']), VeilidWASMConfigLoggingPerformance.fromJson(json['performance']),
api: VeilidWASMConfigLoggingApi.fromJson(json['api']), api: VeilidWASMConfigLoggingApi.fromJson(json['api']),
); );
Map<String, dynamic> _$$VeilidWASMConfigLoggingImplToJson( Map<String, dynamic> _$$_VeilidWASMConfigLoggingToJson(
_$VeilidWASMConfigLoggingImpl instance) => _$_VeilidWASMConfigLogging instance) =>
<String, dynamic>{ <String, dynamic>{
'performance': instance.performance.toJson(), 'performance': instance.performance.toJson(),
'api': instance.api.toJson(), 'api': instance.api.toJson(),
}; };
_$VeilidWASMConfigImpl _$$VeilidWASMConfigImplFromJson( _$_VeilidWASMConfig _$$_VeilidWASMConfigFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidWASMConfig(
_$VeilidWASMConfigImpl(
logging: VeilidWASMConfigLogging.fromJson(json['logging']), logging: VeilidWASMConfigLogging.fromJson(json['logging']),
); );
Map<String, dynamic> _$$VeilidWASMConfigImplToJson( Map<String, dynamic> _$$_VeilidWASMConfigToJson(_$_VeilidWASMConfig instance) =>
_$VeilidWASMConfigImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'logging': instance.logging.toJson(), 'logging': instance.logging.toJson(),
}; };
_$VeilidConfigHTTPSImpl _$$VeilidConfigHTTPSImplFromJson( _$_VeilidConfigHTTPS _$$_VeilidConfigHTTPSFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigHTTPS(
_$VeilidConfigHTTPSImpl(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
listenAddress: json['listen_address'] as String, listenAddress: json['listen_address'] as String,
path: json['path'] as String, path: json['path'] as String,
url: json['url'] as String?, url: json['url'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigHTTPSImplToJson( Map<String, dynamic> _$$_VeilidConfigHTTPSToJson(
_$VeilidConfigHTTPSImpl instance) => _$_VeilidConfigHTTPS instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'listen_address': instance.listenAddress, 'listen_address': instance.listenAddress,
@ -158,17 +152,15 @@ Map<String, dynamic> _$$VeilidConfigHTTPSImplToJson(
'url': instance.url, 'url': instance.url,
}; };
_$VeilidConfigHTTPImpl _$$VeilidConfigHTTPImplFromJson( _$_VeilidConfigHTTP _$$_VeilidConfigHTTPFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigHTTP(
_$VeilidConfigHTTPImpl(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
listenAddress: json['listen_address'] as String, listenAddress: json['listen_address'] as String,
path: json['path'] as String, path: json['path'] as String,
url: json['url'] as String?, url: json['url'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigHTTPImplToJson( Map<String, dynamic> _$$_VeilidConfigHTTPToJson(_$_VeilidConfigHTTP instance) =>
_$VeilidConfigHTTPImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'listen_address': instance.listenAddress, 'listen_address': instance.listenAddress,
@ -176,31 +168,29 @@ Map<String, dynamic> _$$VeilidConfigHTTPImplToJson(
'url': instance.url, 'url': instance.url,
}; };
_$VeilidConfigApplicationImpl _$$VeilidConfigApplicationImplFromJson( _$_VeilidConfigApplication _$$_VeilidConfigApplicationFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigApplicationImpl( _$_VeilidConfigApplication(
https: VeilidConfigHTTPS.fromJson(json['https']), https: VeilidConfigHTTPS.fromJson(json['https']),
http: VeilidConfigHTTP.fromJson(json['http']), http: VeilidConfigHTTP.fromJson(json['http']),
); );
Map<String, dynamic> _$$VeilidConfigApplicationImplToJson( Map<String, dynamic> _$$_VeilidConfigApplicationToJson(
_$VeilidConfigApplicationImpl instance) => _$_VeilidConfigApplication instance) =>
<String, dynamic>{ <String, dynamic>{
'https': instance.https.toJson(), 'https': instance.https.toJson(),
'http': instance.http.toJson(), 'http': instance.http.toJson(),
}; };
_$VeilidConfigUDPImpl _$$VeilidConfigUDPImplFromJson( _$_VeilidConfigUDP _$$_VeilidConfigUDPFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigUDP(
_$VeilidConfigUDPImpl(
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
socketPoolSize: json['socket_pool_size'] as int, socketPoolSize: json['socket_pool_size'] as int,
listenAddress: json['listen_address'] as String, listenAddress: json['listen_address'] as String,
publicAddress: json['public_address'] as String?, publicAddress: json['public_address'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigUDPImplToJson( Map<String, dynamic> _$$_VeilidConfigUDPToJson(_$_VeilidConfigUDP instance) =>
_$VeilidConfigUDPImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'enabled': instance.enabled, 'enabled': instance.enabled,
'socket_pool_size': instance.socketPoolSize, 'socket_pool_size': instance.socketPoolSize,
@ -208,9 +198,8 @@ Map<String, dynamic> _$$VeilidConfigUDPImplToJson(
'public_address': instance.publicAddress, 'public_address': instance.publicAddress,
}; };
_$VeilidConfigTCPImpl _$$VeilidConfigTCPImplFromJson( _$_VeilidConfigTCP _$$_VeilidConfigTCPFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigTCP(
_$VeilidConfigTCPImpl(
connect: json['connect'] as bool, connect: json['connect'] as bool,
listen: json['listen'] as bool, listen: json['listen'] as bool,
maxConnections: json['max_connections'] as int, maxConnections: json['max_connections'] as int,
@ -218,8 +207,7 @@ _$VeilidConfigTCPImpl _$$VeilidConfigTCPImplFromJson(
publicAddress: json['public_address'] as String?, publicAddress: json['public_address'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigTCPImplToJson( Map<String, dynamic> _$$_VeilidConfigTCPToJson(_$_VeilidConfigTCP instance) =>
_$VeilidConfigTCPImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'connect': instance.connect, 'connect': instance.connect,
'listen': instance.listen, 'listen': instance.listen,
@ -228,8 +216,8 @@ Map<String, dynamic> _$$VeilidConfigTCPImplToJson(
'public_address': instance.publicAddress, 'public_address': instance.publicAddress,
}; };
_$VeilidConfigWSImpl _$$VeilidConfigWSImplFromJson(Map<String, dynamic> json) => _$_VeilidConfigWS _$$_VeilidConfigWSFromJson(Map<String, dynamic> json) =>
_$VeilidConfigWSImpl( _$_VeilidConfigWS(
connect: json['connect'] as bool, connect: json['connect'] as bool,
listen: json['listen'] as bool, listen: json['listen'] as bool,
maxConnections: json['max_connections'] as int, maxConnections: json['max_connections'] as int,
@ -238,8 +226,7 @@ _$VeilidConfigWSImpl _$$VeilidConfigWSImplFromJson(Map<String, dynamic> json) =>
url: json['url'] as String?, url: json['url'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigWSImplToJson( Map<String, dynamic> _$$_VeilidConfigWSToJson(_$_VeilidConfigWS instance) =>
_$VeilidConfigWSImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'connect': instance.connect, 'connect': instance.connect,
'listen': instance.listen, 'listen': instance.listen,
@ -249,9 +236,8 @@ Map<String, dynamic> _$$VeilidConfigWSImplToJson(
'url': instance.url, 'url': instance.url,
}; };
_$VeilidConfigWSSImpl _$$VeilidConfigWSSImplFromJson( _$_VeilidConfigWSS _$$_VeilidConfigWSSFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigWSS(
_$VeilidConfigWSSImpl(
connect: json['connect'] as bool, connect: json['connect'] as bool,
listen: json['listen'] as bool, listen: json['listen'] as bool,
maxConnections: json['max_connections'] as int, maxConnections: json['max_connections'] as int,
@ -260,8 +246,7 @@ _$VeilidConfigWSSImpl _$$VeilidConfigWSSImplFromJson(
url: json['url'] as String?, url: json['url'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigWSSImplToJson( Map<String, dynamic> _$$_VeilidConfigWSSToJson(_$_VeilidConfigWSS instance) =>
_$VeilidConfigWSSImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'connect': instance.connect, 'connect': instance.connect,
'listen': instance.listen, 'listen': instance.listen,
@ -271,17 +256,17 @@ Map<String, dynamic> _$$VeilidConfigWSSImplToJson(
'url': instance.url, 'url': instance.url,
}; };
_$VeilidConfigProtocolImpl _$$VeilidConfigProtocolImplFromJson( _$_VeilidConfigProtocol _$$_VeilidConfigProtocolFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigProtocolImpl( _$_VeilidConfigProtocol(
udp: VeilidConfigUDP.fromJson(json['udp']), udp: VeilidConfigUDP.fromJson(json['udp']),
tcp: VeilidConfigTCP.fromJson(json['tcp']), tcp: VeilidConfigTCP.fromJson(json['tcp']),
ws: VeilidConfigWS.fromJson(json['ws']), ws: VeilidConfigWS.fromJson(json['ws']),
wss: VeilidConfigWSS.fromJson(json['wss']), wss: VeilidConfigWSS.fromJson(json['wss']),
); );
Map<String, dynamic> _$$VeilidConfigProtocolImplToJson( Map<String, dynamic> _$$_VeilidConfigProtocolToJson(
_$VeilidConfigProtocolImpl instance) => _$_VeilidConfigProtocol instance) =>
<String, dynamic>{ <String, dynamic>{
'udp': instance.udp.toJson(), 'udp': instance.udp.toJson(),
'tcp': instance.tcp.toJson(), 'tcp': instance.tcp.toJson(),
@ -289,25 +274,22 @@ Map<String, dynamic> _$$VeilidConfigProtocolImplToJson(
'wss': instance.wss.toJson(), 'wss': instance.wss.toJson(),
}; };
_$VeilidConfigTLSImpl _$$VeilidConfigTLSImplFromJson( _$_VeilidConfigTLS _$$_VeilidConfigTLSFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigTLS(
_$VeilidConfigTLSImpl(
certificatePath: json['certificate_path'] as String, certificatePath: json['certificate_path'] as String,
privateKeyPath: json['private_key_path'] as String, privateKeyPath: json['private_key_path'] as String,
connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int, connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int,
); );
Map<String, dynamic> _$$VeilidConfigTLSImplToJson( Map<String, dynamic> _$$_VeilidConfigTLSToJson(_$_VeilidConfigTLS instance) =>
_$VeilidConfigTLSImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'certificate_path': instance.certificatePath, 'certificate_path': instance.certificatePath,
'private_key_path': instance.privateKeyPath, 'private_key_path': instance.privateKeyPath,
'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs, 'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs,
}; };
_$VeilidConfigDHTImpl _$$VeilidConfigDHTImplFromJson( _$_VeilidConfigDHT _$$_VeilidConfigDHTFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigDHT(
_$VeilidConfigDHTImpl(
resolveNodeTimeoutMs: json['resolve_node_timeout_ms'] as int, resolveNodeTimeoutMs: json['resolve_node_timeout_ms'] as int,
resolveNodeCount: json['resolve_node_count'] as int, resolveNodeCount: json['resolve_node_count'] as int,
resolveNodeFanout: json['resolve_node_fanout'] as int, resolveNodeFanout: json['resolve_node_fanout'] as int,
@ -330,10 +312,12 @@ _$VeilidConfigDHTImpl _$$VeilidConfigDHTImplFromJson(
remoteMaxSubkeyCacheMemoryMb: remoteMaxSubkeyCacheMemoryMb:
json['remote_max_subkey_cache_memory_mb'] as int, json['remote_max_subkey_cache_memory_mb'] as int,
remoteMaxStorageSpaceMb: json['remote_max_storage_space_mb'] as int, remoteMaxStorageSpaceMb: json['remote_max_storage_space_mb'] as int,
publicWatchLimit: json['public_watch_limit'] as int,
memberWatchLimit: json['member_watch_limit'] as int,
maxWatchExpirationMs: json['max_watch_expiration_ms'] as int,
); );
Map<String, dynamic> _$$VeilidConfigDHTImplToJson( Map<String, dynamic> _$$_VeilidConfigDHTToJson(_$_VeilidConfigDHT instance) =>
_$VeilidConfigDHTImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'resolve_node_timeout_ms': instance.resolveNodeTimeoutMs, 'resolve_node_timeout_ms': instance.resolveNodeTimeoutMs,
'resolve_node_count': instance.resolveNodeCount, 'resolve_node_count': instance.resolveNodeCount,
@ -356,11 +340,13 @@ Map<String, dynamic> _$$VeilidConfigDHTImplToJson(
'remote_max_subkey_cache_memory_mb': 'remote_max_subkey_cache_memory_mb':
instance.remoteMaxSubkeyCacheMemoryMb, instance.remoteMaxSubkeyCacheMemoryMb,
'remote_max_storage_space_mb': instance.remoteMaxStorageSpaceMb, 'remote_max_storage_space_mb': instance.remoteMaxStorageSpaceMb,
'public_watch_limit': instance.publicWatchLimit,
'member_watch_limit': instance.memberWatchLimit,
'max_watch_expiration_ms': instance.maxWatchExpirationMs,
}; };
_$VeilidConfigRPCImpl _$$VeilidConfigRPCImplFromJson( _$_VeilidConfigRPC _$$_VeilidConfigRPCFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidConfigRPC(
_$VeilidConfigRPCImpl(
concurrency: json['concurrency'] as int, concurrency: json['concurrency'] as int,
queueSize: json['queue_size'] as int, queueSize: json['queue_size'] as int,
timeoutMs: json['timeout_ms'] as int, timeoutMs: json['timeout_ms'] as int,
@ -370,8 +356,7 @@ _$VeilidConfigRPCImpl _$$VeilidConfigRPCImplFromJson(
maxTimestampAheadMs: json['max_timestamp_ahead_ms'] as int?, maxTimestampAheadMs: json['max_timestamp_ahead_ms'] as int?,
); );
Map<String, dynamic> _$$VeilidConfigRPCImplToJson( Map<String, dynamic> _$$_VeilidConfigRPCToJson(_$_VeilidConfigRPC instance) =>
_$VeilidConfigRPCImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'concurrency': instance.concurrency, 'concurrency': instance.concurrency,
'queue_size': instance.queueSize, 'queue_size': instance.queueSize,
@ -382,9 +367,9 @@ Map<String, dynamic> _$$VeilidConfigRPCImplToJson(
'max_timestamp_ahead_ms': instance.maxTimestampAheadMs, 'max_timestamp_ahead_ms': instance.maxTimestampAheadMs,
}; };
_$VeilidConfigRoutingTableImpl _$$VeilidConfigRoutingTableImplFromJson( _$_VeilidConfigRoutingTable _$$_VeilidConfigRoutingTableFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigRoutingTableImpl( _$_VeilidConfigRoutingTable(
nodeId: (json['node_id'] as List<dynamic>) nodeId: (json['node_id'] as List<dynamic>)
.map(Typed<FixedEncodedString43>.fromJson) .map(Typed<FixedEncodedString43>.fromJson)
.toList(), .toList(),
@ -400,8 +385,8 @@ _$VeilidConfigRoutingTableImpl _$$VeilidConfigRoutingTableImplFromJson(
limitAttachedWeak: json['limit_attached_weak'] as int, limitAttachedWeak: json['limit_attached_weak'] as int,
); );
Map<String, dynamic> _$$VeilidConfigRoutingTableImplToJson( Map<String, dynamic> _$$_VeilidConfigRoutingTableToJson(
_$VeilidConfigRoutingTableImpl instance) => _$_VeilidConfigRoutingTable instance) =>
<String, dynamic>{ <String, dynamic>{
'node_id': instance.nodeId.map((e) => e.toJson()).toList(), 'node_id': instance.nodeId.map((e) => e.toJson()).toList(),
'node_id_secret': instance.nodeIdSecret.map((e) => e.toJson()).toList(), 'node_id_secret': instance.nodeIdSecret.map((e) => e.toJson()).toList(),
@ -413,9 +398,9 @@ Map<String, dynamic> _$$VeilidConfigRoutingTableImplToJson(
'limit_attached_weak': instance.limitAttachedWeak, 'limit_attached_weak': instance.limitAttachedWeak,
}; };
_$VeilidConfigNetworkImpl _$$VeilidConfigNetworkImplFromJson( _$_VeilidConfigNetwork _$$_VeilidConfigNetworkFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigNetworkImpl( _$_VeilidConfigNetwork(
connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int, connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int,
connectionInactivityTimeoutMs: connectionInactivityTimeoutMs:
json['connection_inactivity_timeout_ms'] as int, json['connection_inactivity_timeout_ms'] as int,
@ -441,8 +426,8 @@ _$VeilidConfigNetworkImpl _$$VeilidConfigNetworkImplFromJson(
networkKeyPassword: json['network_key_password'] as String?, networkKeyPassword: json['network_key_password'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigNetworkImplToJson( Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
_$VeilidConfigNetworkImpl instance) => _$_VeilidConfigNetwork instance) =>
<String, dynamic>{ <String, dynamic>{
'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs, 'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs,
'connection_inactivity_timeout_ms': 'connection_inactivity_timeout_ms':
@ -468,37 +453,37 @@ Map<String, dynamic> _$$VeilidConfigNetworkImplToJson(
'network_key_password': instance.networkKeyPassword, 'network_key_password': instance.networkKeyPassword,
}; };
_$VeilidConfigTableStoreImpl _$$VeilidConfigTableStoreImplFromJson( _$_VeilidConfigTableStore _$$_VeilidConfigTableStoreFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigTableStoreImpl( _$_VeilidConfigTableStore(
directory: json['directory'] as String, directory: json['directory'] as String,
delete: json['delete'] as bool, delete: json['delete'] as bool,
); );
Map<String, dynamic> _$$VeilidConfigTableStoreImplToJson( Map<String, dynamic> _$$_VeilidConfigTableStoreToJson(
_$VeilidConfigTableStoreImpl instance) => _$_VeilidConfigTableStore instance) =>
<String, dynamic>{ <String, dynamic>{
'directory': instance.directory, 'directory': instance.directory,
'delete': instance.delete, 'delete': instance.delete,
}; };
_$VeilidConfigBlockStoreImpl _$$VeilidConfigBlockStoreImplFromJson( _$_VeilidConfigBlockStore _$$_VeilidConfigBlockStoreFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigBlockStoreImpl( _$_VeilidConfigBlockStore(
directory: json['directory'] as String, directory: json['directory'] as String,
delete: json['delete'] as bool, delete: json['delete'] as bool,
); );
Map<String, dynamic> _$$VeilidConfigBlockStoreImplToJson( Map<String, dynamic> _$$_VeilidConfigBlockStoreToJson(
_$VeilidConfigBlockStoreImpl instance) => _$_VeilidConfigBlockStore instance) =>
<String, dynamic>{ <String, dynamic>{
'directory': instance.directory, 'directory': instance.directory,
'delete': instance.delete, 'delete': instance.delete,
}; };
_$VeilidConfigProtectedStoreImpl _$$VeilidConfigProtectedStoreImplFromJson( _$_VeilidConfigProtectedStore _$$_VeilidConfigProtectedStoreFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigProtectedStoreImpl( _$_VeilidConfigProtectedStore(
allowInsecureFallback: json['allow_insecure_fallback'] as bool, allowInsecureFallback: json['allow_insecure_fallback'] as bool,
alwaysUseInsecureStorage: json['always_use_insecure_storage'] as bool, alwaysUseInsecureStorage: json['always_use_insecure_storage'] as bool,
directory: json['directory'] as String, directory: json['directory'] as String,
@ -509,8 +494,8 @@ _$VeilidConfigProtectedStoreImpl _$$VeilidConfigProtectedStoreImplFromJson(
json['new_device_encryption_key_password'] as String?, json['new_device_encryption_key_password'] as String?,
); );
Map<String, dynamic> _$$VeilidConfigProtectedStoreImplToJson( Map<String, dynamic> _$$_VeilidConfigProtectedStoreToJson(
_$VeilidConfigProtectedStoreImpl instance) => _$_VeilidConfigProtectedStore instance) =>
<String, dynamic>{ <String, dynamic>{
'allow_insecure_fallback': instance.allowInsecureFallback, 'allow_insecure_fallback': instance.allowInsecureFallback,
'always_use_insecure_storage': instance.alwaysUseInsecureStorage, 'always_use_insecure_storage': instance.alwaysUseInsecureStorage,
@ -521,21 +506,21 @@ Map<String, dynamic> _$$VeilidConfigProtectedStoreImplToJson(
instance.newDeviceEncryptionKeyPassword, instance.newDeviceEncryptionKeyPassword,
}; };
_$VeilidConfigCapabilitiesImpl _$$VeilidConfigCapabilitiesImplFromJson( _$_VeilidConfigCapabilities _$$_VeilidConfigCapabilitiesFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidConfigCapabilitiesImpl( _$_VeilidConfigCapabilities(
disable: disable:
(json['disable'] as List<dynamic>).map((e) => e as String).toList(), (json['disable'] as List<dynamic>).map((e) => e as String).toList(),
); );
Map<String, dynamic> _$$VeilidConfigCapabilitiesImplToJson( Map<String, dynamic> _$$_VeilidConfigCapabilitiesToJson(
_$VeilidConfigCapabilitiesImpl instance) => _$_VeilidConfigCapabilities instance) =>
<String, dynamic>{ <String, dynamic>{
'disable': instance.disable, 'disable': instance.disable,
}; };
_$VeilidConfigImpl _$$VeilidConfigImplFromJson(Map<String, dynamic> json) => _$_VeilidConfig _$$_VeilidConfigFromJson(Map<String, dynamic> json) =>
_$VeilidConfigImpl( _$_VeilidConfig(
programName: json['program_name'] as String, programName: json['program_name'] as String,
namespace: json['namespace'] as String, namespace: json['namespace'] as String,
capabilities: VeilidConfigCapabilities.fromJson(json['capabilities']), capabilities: VeilidConfigCapabilities.fromJson(json['capabilities']),
@ -546,7 +531,7 @@ _$VeilidConfigImpl _$$VeilidConfigImplFromJson(Map<String, dynamic> json) =>
network: VeilidConfigNetwork.fromJson(json['network']), network: VeilidConfigNetwork.fromJson(json['network']),
); );
Map<String, dynamic> _$$VeilidConfigImplToJson(_$VeilidConfigImpl instance) => Map<String, dynamic> _$$_VeilidConfigToJson(_$_VeilidConfig instance) =>
<String, dynamic>{ <String, dynamic>{
'program_name': instance.programName, 'program_name': instance.programName,
'namespace': instance.namespace, 'namespace': instance.namespace,

File diff suppressed because it is too large Load Diff

View File

@ -6,29 +6,29 @@ part of 'veilid_state.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$LatencyStatsImpl _$$LatencyStatsImplFromJson(Map<String, dynamic> json) => _$_LatencyStats _$$_LatencyStatsFromJson(Map<String, dynamic> json) =>
_$LatencyStatsImpl( _$_LatencyStats(
fastest: TimestampDuration.fromJson(json['fastest']), fastest: TimestampDuration.fromJson(json['fastest']),
average: TimestampDuration.fromJson(json['average']), average: TimestampDuration.fromJson(json['average']),
slowest: TimestampDuration.fromJson(json['slowest']), slowest: TimestampDuration.fromJson(json['slowest']),
); );
Map<String, dynamic> _$$LatencyStatsImplToJson(_$LatencyStatsImpl instance) => Map<String, dynamic> _$$_LatencyStatsToJson(_$_LatencyStats instance) =>
<String, dynamic>{ <String, dynamic>{
'fastest': instance.fastest.toJson(), 'fastest': instance.fastest.toJson(),
'average': instance.average.toJson(), 'average': instance.average.toJson(),
'slowest': instance.slowest.toJson(), 'slowest': instance.slowest.toJson(),
}; };
_$TransferStatsImpl _$$TransferStatsImplFromJson(Map<String, dynamic> json) => _$_TransferStats _$$_TransferStatsFromJson(Map<String, dynamic> json) =>
_$TransferStatsImpl( _$_TransferStats(
total: BigInt.parse(json['total'] as String), total: BigInt.parse(json['total'] as String),
maximum: BigInt.parse(json['maximum'] as String), maximum: BigInt.parse(json['maximum'] as String),
average: BigInt.parse(json['average'] as String), average: BigInt.parse(json['average'] as String),
minimum: BigInt.parse(json['minimum'] as String), minimum: BigInt.parse(json['minimum'] as String),
); );
Map<String, dynamic> _$$TransferStatsImplToJson(_$TransferStatsImpl instance) => Map<String, dynamic> _$$_TransferStatsToJson(_$_TransferStats instance) =>
<String, dynamic>{ <String, dynamic>{
'total': instance.total.toString(), 'total': instance.total.toString(),
'maximum': instance.maximum.toString(), 'maximum': instance.maximum.toString(),
@ -36,22 +36,21 @@ Map<String, dynamic> _$$TransferStatsImplToJson(_$TransferStatsImpl instance) =>
'minimum': instance.minimum.toString(), 'minimum': instance.minimum.toString(),
}; };
_$TransferStatsDownUpImpl _$$TransferStatsDownUpImplFromJson( _$_TransferStatsDownUp _$$_TransferStatsDownUpFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$TransferStatsDownUpImpl( _$_TransferStatsDownUp(
down: TransferStats.fromJson(json['down']), down: TransferStats.fromJson(json['down']),
up: TransferStats.fromJson(json['up']), up: TransferStats.fromJson(json['up']),
); );
Map<String, dynamic> _$$TransferStatsDownUpImplToJson( Map<String, dynamic> _$$_TransferStatsDownUpToJson(
_$TransferStatsDownUpImpl instance) => _$_TransferStatsDownUp instance) =>
<String, dynamic>{ <String, dynamic>{
'down': instance.down.toJson(), 'down': instance.down.toJson(),
'up': instance.up.toJson(), 'up': instance.up.toJson(),
}; };
_$RPCStatsImpl _$$RPCStatsImplFromJson(Map<String, dynamic> json) => _$_RPCStats _$$_RPCStatsFromJson(Map<String, dynamic> json) => _$_RPCStats(
_$RPCStatsImpl(
messagesSent: json['messages_sent'] as int, messagesSent: json['messages_sent'] as int,
messagesRcvd: json['messages_rcvd'] as int, messagesRcvd: json['messages_rcvd'] as int,
questionsInFlight: json['questions_in_flight'] as int, questionsInFlight: json['questions_in_flight'] as int,
@ -68,7 +67,7 @@ _$RPCStatsImpl _$$RPCStatsImplFromJson(Map<String, dynamic> json) =>
failedToSend: json['failed_to_send'] as int, failedToSend: json['failed_to_send'] as int,
); );
Map<String, dynamic> _$$RPCStatsImplToJson(_$RPCStatsImpl instance) => Map<String, dynamic> _$$_RPCStatsToJson(_$_RPCStats instance) =>
<String, dynamic>{ <String, dynamic>{
'messages_sent': instance.messagesSent, 'messages_sent': instance.messagesSent,
'messages_rcvd': instance.messagesRcvd, 'messages_rcvd': instance.messagesRcvd,
@ -80,8 +79,7 @@ Map<String, dynamic> _$$RPCStatsImplToJson(_$RPCStatsImpl instance) =>
'failed_to_send': instance.failedToSend, 'failed_to_send': instance.failedToSend,
}; };
_$PeerStatsImpl _$$PeerStatsImplFromJson(Map<String, dynamic> json) => _$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats(
_$PeerStatsImpl(
timeAdded: Timestamp.fromJson(json['time_added']), timeAdded: Timestamp.fromJson(json['time_added']),
rpcStats: RPCStats.fromJson(json['rpc_stats']), rpcStats: RPCStats.fromJson(json['rpc_stats']),
transfer: TransferStatsDownUp.fromJson(json['transfer']), transfer: TransferStatsDownUp.fromJson(json['transfer']),
@ -90,7 +88,7 @@ _$PeerStatsImpl _$$PeerStatsImplFromJson(Map<String, dynamic> json) =>
: LatencyStats.fromJson(json['latency']), : LatencyStats.fromJson(json['latency']),
); );
Map<String, dynamic> _$$PeerStatsImplToJson(_$PeerStatsImpl instance) => Map<String, dynamic> _$$_PeerStatsToJson(_$_PeerStats instance) =>
<String, dynamic>{ <String, dynamic>{
'time_added': instance.timeAdded.toJson(), 'time_added': instance.timeAdded.toJson(),
'rpc_stats': instance.rpcStats.toJson(), 'rpc_stats': instance.rpcStats.toJson(),
@ -98,8 +96,8 @@ Map<String, dynamic> _$$PeerStatsImplToJson(_$PeerStatsImpl instance) =>
'latency': instance.latency?.toJson(), 'latency': instance.latency?.toJson(),
}; };
_$PeerTableDataImpl _$$PeerTableDataImplFromJson(Map<String, dynamic> json) => _$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
_$PeerTableDataImpl( _$_PeerTableData(
nodeIds: (json['node_ids'] as List<dynamic>) nodeIds: (json['node_ids'] as List<dynamic>)
.map(Typed<FixedEncodedString43>.fromJson) .map(Typed<FixedEncodedString43>.fromJson)
.toList(), .toList(),
@ -107,22 +105,21 @@ _$PeerTableDataImpl _$$PeerTableDataImplFromJson(Map<String, dynamic> json) =>
peerStats: PeerStats.fromJson(json['peer_stats']), peerStats: PeerStats.fromJson(json['peer_stats']),
); );
Map<String, dynamic> _$$PeerTableDataImplToJson(_$PeerTableDataImpl instance) => Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) =>
<String, dynamic>{ <String, dynamic>{
'node_ids': instance.nodeIds.map((e) => e.toJson()).toList(), 'node_ids': instance.nodeIds.map((e) => e.toJson()).toList(),
'peer_address': instance.peerAddress, 'peer_address': instance.peerAddress,
'peer_stats': instance.peerStats.toJson(), 'peer_stats': instance.peerStats.toJson(),
}; };
_$VeilidLogImpl _$$VeilidLogImplFromJson(Map<String, dynamic> json) => _$VeilidLog _$$VeilidLogFromJson(Map<String, dynamic> json) => _$VeilidLog(
_$VeilidLogImpl(
logLevel: VeilidLogLevel.fromJson(json['log_level']), logLevel: VeilidLogLevel.fromJson(json['log_level']),
message: json['message'] as String, message: json['message'] as String,
backtrace: json['backtrace'] as String?, backtrace: json['backtrace'] as String?,
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl instance) => Map<String, dynamic> _$$VeilidLogToJson(_$VeilidLog instance) =>
<String, dynamic>{ <String, dynamic>{
'log_level': instance.logLevel.toJson(), 'log_level': instance.logLevel.toJson(),
'message': instance.message, 'message': instance.message,
@ -130,9 +127,8 @@ Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl instance) =>
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson( _$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$VeilidAppMessage(
_$VeilidAppMessageImpl(
message: const Uint8ListJsonConverter().fromJson(json['message']), message: const Uint8ListJsonConverter().fromJson(json['message']),
sender: json['sender'] == null sender: json['sender'] == null
? null ? null
@ -140,16 +136,15 @@ _$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidAppMessageImplToJson( Map<String, dynamic> _$$VeilidAppMessageToJson(_$VeilidAppMessage instance) =>
_$VeilidAppMessageImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'message': const Uint8ListJsonConverter().toJson(instance.message), 'message': const Uint8ListJsonConverter().toJson(instance.message),
'sender': instance.sender?.toJson(), 'sender': instance.sender?.toJson(),
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) => _$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) =>
_$VeilidAppCallImpl( _$VeilidAppCall(
message: const Uint8ListJsonConverter().fromJson(json['message']), message: const Uint8ListJsonConverter().fromJson(json['message']),
callId: json['call_id'] as String, callId: json['call_id'] as String,
sender: json['sender'] == null sender: json['sender'] == null
@ -158,7 +153,7 @@ _$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) => Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) =>
<String, dynamic>{ <String, dynamic>{
'message': const Uint8ListJsonConverter().toJson(instance.message), 'message': const Uint8ListJsonConverter().toJson(instance.message),
'call_id': instance.callId, 'call_id': instance.callId,
@ -166,17 +161,17 @@ Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) =>
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateAttachmentImpl _$$VeilidUpdateAttachmentImplFromJson( _$VeilidUpdateAttachment _$$VeilidUpdateAttachmentFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidUpdateAttachmentImpl( _$VeilidUpdateAttachment(
state: AttachmentState.fromJson(json['state']), state: AttachmentState.fromJson(json['state']),
publicInternetReady: json['public_internet_ready'] as bool, publicInternetReady: json['public_internet_ready'] as bool,
localNetworkReady: json['local_network_ready'] as bool, localNetworkReady: json['local_network_ready'] as bool,
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidUpdateAttachmentImplToJson( Map<String, dynamic> _$$VeilidUpdateAttachmentToJson(
_$VeilidUpdateAttachmentImpl instance) => _$VeilidUpdateAttachment instance) =>
<String, dynamic>{ <String, dynamic>{
'state': instance.state.toJson(), 'state': instance.state.toJson(),
'public_internet_ready': instance.publicInternetReady, 'public_internet_ready': instance.publicInternetReady,
@ -184,9 +179,9 @@ Map<String, dynamic> _$$VeilidUpdateAttachmentImplToJson(
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson( _$VeilidUpdateNetwork _$$VeilidUpdateNetworkFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidUpdateNetworkImpl( _$VeilidUpdateNetwork(
started: json['started'] as bool, started: json['started'] as bool,
bpsDown: BigInt.parse(json['bps_down'] as String), bpsDown: BigInt.parse(json['bps_down'] as String),
bpsUp: BigInt.parse(json['bps_up'] as String), bpsUp: BigInt.parse(json['bps_up'] as String),
@ -195,8 +190,8 @@ _$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson(
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidUpdateNetworkImplToJson( Map<String, dynamic> _$$VeilidUpdateNetworkToJson(
_$VeilidUpdateNetworkImpl instance) => _$VeilidUpdateNetwork instance) =>
<String, dynamic>{ <String, dynamic>{
'started': instance.started, 'started': instance.started,
'bps_down': instance.bpsDown.toString(), 'bps_down': instance.bpsDown.toString(),
@ -205,23 +200,22 @@ Map<String, dynamic> _$$VeilidUpdateNetworkImplToJson(
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateConfigImpl _$$VeilidUpdateConfigImplFromJson( _$VeilidUpdateConfig _$$VeilidUpdateConfigFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$VeilidUpdateConfig(
_$VeilidUpdateConfigImpl(
config: VeilidConfig.fromJson(json['config']), config: VeilidConfig.fromJson(json['config']),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidUpdateConfigImplToJson( Map<String, dynamic> _$$VeilidUpdateConfigToJson(
_$VeilidUpdateConfigImpl instance) => _$VeilidUpdateConfig instance) =>
<String, dynamic>{ <String, dynamic>{
'config': instance.config.toJson(), 'config': instance.config.toJson(),
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson( _$VeilidUpdateRouteChange _$$VeilidUpdateRouteChangeFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidUpdateRouteChangeImpl( _$VeilidUpdateRouteChange(
deadRoutes: (json['dead_routes'] as List<dynamic>) deadRoutes: (json['dead_routes'] as List<dynamic>)
.map((e) => e as String) .map((e) => e as String)
.toList(), .toList(),
@ -231,17 +225,17 @@ _$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson(
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidUpdateRouteChangeImplToJson( Map<String, dynamic> _$$VeilidUpdateRouteChangeToJson(
_$VeilidUpdateRouteChangeImpl instance) => _$VeilidUpdateRouteChange instance) =>
<String, dynamic>{ <String, dynamic>{
'dead_routes': instance.deadRoutes, 'dead_routes': instance.deadRoutes,
'dead_remote_routes': instance.deadRemoteRoutes, 'dead_remote_routes': instance.deadRemoteRoutes,
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson( _$VeilidUpdateValueChange _$$VeilidUpdateValueChangeFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidUpdateValueChangeImpl( _$VeilidUpdateValueChange(
key: Typed<FixedEncodedString43>.fromJson(json['key']), key: Typed<FixedEncodedString43>.fromJson(json['key']),
subkeys: (json['subkeys'] as List<dynamic>) subkeys: (json['subkeys'] as List<dynamic>)
.map(ValueSubkeyRange.fromJson) .map(ValueSubkeyRange.fromJson)
@ -251,8 +245,8 @@ _$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson(
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidUpdateValueChangeImplToJson( Map<String, dynamic> _$$VeilidUpdateValueChangeToJson(
_$VeilidUpdateValueChangeImpl instance) => _$VeilidUpdateValueChange instance) =>
<String, dynamic>{ <String, dynamic>{
'key': instance.key.toJson(), 'key': instance.key.toJson(),
'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(),
@ -261,25 +255,25 @@ Map<String, dynamic> _$$VeilidUpdateValueChangeImplToJson(
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidStateAttachmentImpl _$$VeilidStateAttachmentImplFromJson( _$_VeilidStateAttachment _$$_VeilidStateAttachmentFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidStateAttachmentImpl( _$_VeilidStateAttachment(
state: AttachmentState.fromJson(json['state']), state: AttachmentState.fromJson(json['state']),
publicInternetReady: json['public_internet_ready'] as bool, publicInternetReady: json['public_internet_ready'] as bool,
localNetworkReady: json['local_network_ready'] as bool, localNetworkReady: json['local_network_ready'] as bool,
); );
Map<String, dynamic> _$$VeilidStateAttachmentImplToJson( Map<String, dynamic> _$$_VeilidStateAttachmentToJson(
_$VeilidStateAttachmentImpl instance) => _$_VeilidStateAttachment instance) =>
<String, dynamic>{ <String, dynamic>{
'state': instance.state.toJson(), 'state': instance.state.toJson(),
'public_internet_ready': instance.publicInternetReady, 'public_internet_ready': instance.publicInternetReady,
'local_network_ready': instance.localNetworkReady, 'local_network_ready': instance.localNetworkReady,
}; };
_$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson( _$_VeilidStateNetwork _$$_VeilidStateNetworkFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidStateNetworkImpl( _$_VeilidStateNetwork(
started: json['started'] as bool, started: json['started'] as bool,
bpsDown: BigInt.parse(json['bps_down'] as String), bpsDown: BigInt.parse(json['bps_down'] as String),
bpsUp: BigInt.parse(json['bps_up'] as String), bpsUp: BigInt.parse(json['bps_up'] as String),
@ -287,8 +281,8 @@ _$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson(
(json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(), (json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
); );
Map<String, dynamic> _$$VeilidStateNetworkImplToJson( Map<String, dynamic> _$$_VeilidStateNetworkToJson(
_$VeilidStateNetworkImpl instance) => _$_VeilidStateNetwork instance) =>
<String, dynamic>{ <String, dynamic>{
'started': instance.started, 'started': instance.started,
'bps_down': instance.bpsDown.toString(), 'bps_down': instance.bpsDown.toString(),
@ -296,26 +290,25 @@ Map<String, dynamic> _$$VeilidStateNetworkImplToJson(
'peers': instance.peers.map((e) => e.toJson()).toList(), 'peers': instance.peers.map((e) => e.toJson()).toList(),
}; };
_$VeilidStateConfigImpl _$$VeilidStateConfigImplFromJson( _$_VeilidStateConfig _$$_VeilidStateConfigFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _$_VeilidStateConfig(
_$VeilidStateConfigImpl(
config: VeilidConfig.fromJson(json['config']), config: VeilidConfig.fromJson(json['config']),
); );
Map<String, dynamic> _$$VeilidStateConfigImplToJson( Map<String, dynamic> _$$_VeilidStateConfigToJson(
_$VeilidStateConfigImpl instance) => _$_VeilidStateConfig instance) =>
<String, dynamic>{ <String, dynamic>{
'config': instance.config.toJson(), 'config': instance.config.toJson(),
}; };
_$VeilidStateImpl _$$VeilidStateImplFromJson(Map<String, dynamic> json) => _$_VeilidState _$$_VeilidStateFromJson(Map<String, dynamic> json) =>
_$VeilidStateImpl( _$_VeilidState(
attachment: VeilidStateAttachment.fromJson(json['attachment']), attachment: VeilidStateAttachment.fromJson(json['attachment']),
network: VeilidStateNetwork.fromJson(json['network']), network: VeilidStateNetwork.fromJson(json['network']),
config: VeilidStateConfig.fromJson(json['config']), config: VeilidStateConfig.fromJson(json['config']),
); );
Map<String, dynamic> _$$VeilidStateImplToJson(_$VeilidStateImpl instance) => Map<String, dynamic> _$$_VeilidStateToJson(_$_VeilidState instance) =>
<String, dynamic>{ <String, dynamic>{
'attachment': instance.attachment.toJson(), 'attachment': instance.attachment.toJson(),
'network': instance.network.toJson(), 'network': instance.network.toJson(),

View File

@ -112,8 +112,7 @@ class VeilidConfigDHT(ConfigBase):
remote_max_storage_space_mb: int remote_max_storage_space_mb: int
public_watch_limit: int public_watch_limit: int
member_watch_limit: int member_watch_limit: int
max_watch_expiration_ms: int
@dataclass @dataclass
class VeilidConfigTLS(ConfigBase): class VeilidConfigTLS(ConfigBase):

View File

@ -111,6 +111,7 @@ core:
remote_max_storage_space_mb: 0 remote_max_storage_space_mb: 0
public_watch_limit: 32 public_watch_limit: 32
member_watch_limit: 8 member_watch_limit: 8
max_watch_expiration_ms: 600000
upnp: true upnp: true
detect_address_changes: true detect_address_changes: true
restricted_nat_retries: 0 restricted_nat_retries: 0
@ -566,6 +567,7 @@ pub struct Dht {
pub remote_max_storage_space_mb: u32, pub remote_max_storage_space_mb: u32,
pub public_watch_limit: u32, pub public_watch_limit: u32,
pub member_watch_limit: u32, pub member_watch_limit: u32,
pub max_watch_expiration_ms: u32,
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
@ -954,6 +956,7 @@ impl Settings {
set_config_value!(inner.core.network.dht.remote_max_storage_space_mb, value); set_config_value!(inner.core.network.dht.remote_max_storage_space_mb, value);
set_config_value!(inner.core.network.dht.public_watch_limit, value); set_config_value!(inner.core.network.dht.public_watch_limit, value);
set_config_value!(inner.core.network.dht.member_watch_limit, value); set_config_value!(inner.core.network.dht.member_watch_limit, value);
set_config_value!(inner.core.network.dht.max_watch_expiration_ms, value);
set_config_value!(inner.core.network.upnp, value); set_config_value!(inner.core.network.upnp, value);
set_config_value!(inner.core.network.detect_address_changes, value); set_config_value!(inner.core.network.detect_address_changes, value);
set_config_value!(inner.core.network.restricted_nat_retries, value); set_config_value!(inner.core.network.restricted_nat_retries, value);
@ -1201,6 +1204,9 @@ impl Settings {
"network.dht.member_watch_limit" => { "network.dht.member_watch_limit" => {
Ok(Box::new(inner.core.network.dht.member_watch_limit)) Ok(Box::new(inner.core.network.dht.member_watch_limit))
} }
"network.dht.max_watch_expiration_ms" => {
Ok(Box::new(inner.core.network.dht.max_watch_expiration_ms))
}
"network.upnp" => Ok(Box::new(inner.core.network.upnp)), "network.upnp" => Ok(Box::new(inner.core.network.upnp)),
"network.detect_address_changes" => { "network.detect_address_changes" => {
Ok(Box::new(inner.core.network.detect_address_changes)) Ok(Box::new(inner.core.network.detect_address_changes))
@ -1526,6 +1532,9 @@ mod tests {
s.core.network.dht.validate_dial_info_receipt_time_ms, s.core.network.dht.validate_dial_info_receipt_time_ms,
2_000u32 2_000u32
); );
assert_eq!(s.core.network.dht.public_watch_limit, 32u32);
assert_eq!(s.core.network.dht.member_watch_limit, 8u32);
assert_eq!(s.core.network.dht.max_watch_expiration_ms, 600_000u32);
// //
assert!(s.core.network.upnp); assert!(s.core.network.upnp);
assert!(s.core.network.detect_address_changes); assert!(s.core.network.detect_address_changes);