crypto primitives

This commit is contained in:
Christien Rioux 2023-08-02 21:09:47 -04:00
parent 559ac5f162
commit 7ba795132b
10 changed files with 465 additions and 425 deletions

View File

@ -113,6 +113,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -430,4 +438,4 @@ packages:
version: "3.5.0" version: "3.5.0"
sdks: sdks:
dart: ">=3.0.0 <4.0.0" dart: ">=3.0.0 <4.0.0"
flutter: ">=3.7.0" flutter: ">=3.10.6"

View File

@ -600,8 +600,8 @@ DHTRecordDescriptor _$DHTRecordDescriptorFromJson(Map<String, dynamic> json) {
mixin _$DHTRecordDescriptor { mixin _$DHTRecordDescriptor {
Typed<FixedEncodedString43> get key => throw _privateConstructorUsedError; Typed<FixedEncodedString43> get key => throw _privateConstructorUsedError;
FixedEncodedString43 get owner => throw _privateConstructorUsedError; FixedEncodedString43 get owner => throw _privateConstructorUsedError;
FixedEncodedString43? get ownerSecret => throw _privateConstructorUsedError;
DHTSchema get schema => throw _privateConstructorUsedError; DHTSchema get schema => throw _privateConstructorUsedError;
FixedEncodedString43? get ownerSecret => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -618,8 +618,8 @@ abstract class $DHTRecordDescriptorCopyWith<$Res> {
$Res call( $Res call(
{Typed<FixedEncodedString43> key, {Typed<FixedEncodedString43> key,
FixedEncodedString43 owner, FixedEncodedString43 owner,
FixedEncodedString43? ownerSecret, DHTSchema schema,
DHTSchema schema}); FixedEncodedString43? ownerSecret});
$DHTSchemaCopyWith<$Res> get schema; $DHTSchemaCopyWith<$Res> get schema;
} }
@ -639,8 +639,8 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res, $Val extends DHTRecordDescriptor>
$Res call({ $Res call({
Object? key = null, Object? key = null,
Object? owner = null, Object? owner = null,
Object? ownerSecret = freezed,
Object? schema = null, Object? schema = null,
Object? ownerSecret = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
key: null == key key: null == key
@ -651,14 +651,14 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res, $Val extends DHTRecordDescriptor>
? _value.owner ? _value.owner
: owner // ignore: cast_nullable_to_non_nullable : owner // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43, as FixedEncodedString43,
ownerSecret: freezed == ownerSecret
? _value.ownerSecret
: ownerSecret // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43?,
schema: null == schema schema: null == schema
? _value.schema ? _value.schema
: schema // ignore: cast_nullable_to_non_nullable : schema // ignore: cast_nullable_to_non_nullable
as DHTSchema, as DHTSchema,
ownerSecret: freezed == ownerSecret
? _value.ownerSecret
: ownerSecret // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43?,
) as $Val); ) as $Val);
} }
@ -682,8 +682,8 @@ abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
$Res call( $Res call(
{Typed<FixedEncodedString43> key, {Typed<FixedEncodedString43> key,
FixedEncodedString43 owner, FixedEncodedString43 owner,
FixedEncodedString43? ownerSecret, DHTSchema schema,
DHTSchema schema}); FixedEncodedString43? ownerSecret});
@override @override
$DHTSchemaCopyWith<$Res> get schema; $DHTSchemaCopyWith<$Res> get schema;
@ -702,8 +702,8 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
$Res call({ $Res call({
Object? key = null, Object? key = null,
Object? owner = null, Object? owner = null,
Object? ownerSecret = freezed,
Object? schema = null, Object? schema = null,
Object? ownerSecret = freezed,
}) { }) {
return _then(_$_DHTRecordDescriptor( return _then(_$_DHTRecordDescriptor(
key: null == key key: null == key
@ -714,14 +714,14 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
? _value.owner ? _value.owner
: owner // ignore: cast_nullable_to_non_nullable : owner // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43, as FixedEncodedString43,
ownerSecret: freezed == ownerSecret
? _value.ownerSecret
: ownerSecret // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43?,
schema: null == schema schema: null == schema
? _value.schema ? _value.schema
: schema // ignore: cast_nullable_to_non_nullable : schema // ignore: cast_nullable_to_non_nullable
as DHTSchema, as DHTSchema,
ownerSecret: freezed == ownerSecret
? _value.ownerSecret
: ownerSecret // ignore: cast_nullable_to_non_nullable
as FixedEncodedString43?,
)); ));
} }
} }
@ -732,8 +732,8 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
const _$_DHTRecordDescriptor( const _$_DHTRecordDescriptor(
{required this.key, {required this.key,
required this.owner, required this.owner,
this.ownerSecret, required this.schema,
required this.schema}); this.ownerSecret});
factory _$_DHTRecordDescriptor.fromJson(Map<String, dynamic> json) => factory _$_DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =>
_$$_DHTRecordDescriptorFromJson(json); _$$_DHTRecordDescriptorFromJson(json);
@ -743,13 +743,13 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
@override @override
final FixedEncodedString43 owner; final FixedEncodedString43 owner;
@override @override
final FixedEncodedString43? ownerSecret;
@override
final DHTSchema schema; final DHTSchema schema;
@override
final FixedEncodedString43? ownerSecret;
@override @override
String toString() { String toString() {
return 'DHTRecordDescriptor(key: $key, owner: $owner, ownerSecret: $ownerSecret, schema: $schema)'; return 'DHTRecordDescriptor(key: $key, owner: $owner, schema: $schema, ownerSecret: $ownerSecret)';
} }
@override @override
@ -759,14 +759,14 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
other is _$_DHTRecordDescriptor && 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.ownerSecret, ownerSecret) || (identical(other.ownerSecret, ownerSecret) ||
other.ownerSecret == ownerSecret) && other.ownerSecret == ownerSecret));
(identical(other.schema, schema) || other.schema == schema));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, key, owner, ownerSecret, schema); int get hashCode => Object.hash(runtimeType, key, owner, schema, ownerSecret);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -787,8 +787,8 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
const factory _DHTRecordDescriptor( const factory _DHTRecordDescriptor(
{required final Typed<FixedEncodedString43> key, {required final Typed<FixedEncodedString43> key,
required final FixedEncodedString43 owner, required final FixedEncodedString43 owner,
final FixedEncodedString43? ownerSecret, required final DHTSchema schema,
required final DHTSchema schema}) = _$_DHTRecordDescriptor; final FixedEncodedString43? ownerSecret}) = _$_DHTRecordDescriptor;
factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) = factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =
_$_DHTRecordDescriptor.fromJson; _$_DHTRecordDescriptor.fromJson;
@ -798,10 +798,10 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
@override @override
FixedEncodedString43 get owner; FixedEncodedString43 get owner;
@override @override
FixedEncodedString43? get ownerSecret;
@override
DHTSchema get schema; DHTSchema get schema;
@override @override
FixedEncodedString43? get ownerSecret;
@override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith => _$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@ -1151,10 +1151,10 @@ SafetySpec _$SafetySpecFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$SafetySpec { mixin _$SafetySpec {
String? get preferredRoute => throw _privateConstructorUsedError;
int get hopCount => throw _privateConstructorUsedError; int get hopCount => throw _privateConstructorUsedError;
Stability get stability => throw _privateConstructorUsedError; Stability get stability => throw _privateConstructorUsedError;
Sequencing get sequencing => throw _privateConstructorUsedError; Sequencing get sequencing => throw _privateConstructorUsedError;
String? get preferredRoute => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -1169,10 +1169,10 @@ abstract class $SafetySpecCopyWith<$Res> {
_$SafetySpecCopyWithImpl<$Res, SafetySpec>; _$SafetySpecCopyWithImpl<$Res, SafetySpec>;
@useResult @useResult
$Res call( $Res call(
{String? preferredRoute, {int hopCount,
int hopCount,
Stability stability, Stability stability,
Sequencing sequencing}); Sequencing sequencing,
String? preferredRoute});
} }
/// @nodoc /// @nodoc
@ -1188,16 +1188,12 @@ class _$SafetySpecCopyWithImpl<$Res, $Val extends SafetySpec>
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
Object? preferredRoute = freezed,
Object? hopCount = null, Object? hopCount = null,
Object? stability = null, Object? stability = null,
Object? sequencing = null, Object? sequencing = null,
Object? preferredRoute = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
preferredRoute: freezed == preferredRoute
? _value.preferredRoute
: preferredRoute // ignore: cast_nullable_to_non_nullable
as String?,
hopCount: null == hopCount hopCount: null == hopCount
? _value.hopCount ? _value.hopCount
: hopCount // ignore: cast_nullable_to_non_nullable : hopCount // ignore: cast_nullable_to_non_nullable
@ -1210,6 +1206,10 @@ class _$SafetySpecCopyWithImpl<$Res, $Val extends SafetySpec>
? _value.sequencing ? _value.sequencing
: sequencing // ignore: cast_nullable_to_non_nullable : sequencing // ignore: cast_nullable_to_non_nullable
as Sequencing, as Sequencing,
preferredRoute: freezed == preferredRoute
? _value.preferredRoute
: preferredRoute // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val); ) as $Val);
} }
} }
@ -1223,10 +1223,10 @@ abstract class _$$_SafetySpecCopyWith<$Res>
@override @override
@useResult @useResult
$Res call( $Res call(
{String? preferredRoute, {int hopCount,
int hopCount,
Stability stability, Stability stability,
Sequencing sequencing}); Sequencing sequencing,
String? preferredRoute});
} }
/// @nodoc /// @nodoc
@ -1240,16 +1240,12 @@ class __$$_SafetySpecCopyWithImpl<$Res>
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
Object? preferredRoute = freezed,
Object? hopCount = null, Object? hopCount = null,
Object? stability = null, Object? stability = null,
Object? sequencing = null, Object? sequencing = null,
Object? preferredRoute = freezed,
}) { }) {
return _then(_$_SafetySpec( return _then(_$_SafetySpec(
preferredRoute: freezed == preferredRoute
? _value.preferredRoute
: preferredRoute // ignore: cast_nullable_to_non_nullable
as String?,
hopCount: null == hopCount hopCount: null == hopCount
? _value.hopCount ? _value.hopCount
: hopCount // ignore: cast_nullable_to_non_nullable : hopCount // ignore: cast_nullable_to_non_nullable
@ -1262,6 +1258,10 @@ class __$$_SafetySpecCopyWithImpl<$Res>
? _value.sequencing ? _value.sequencing
: sequencing // ignore: cast_nullable_to_non_nullable : sequencing // ignore: cast_nullable_to_non_nullable
as Sequencing, as Sequencing,
preferredRoute: freezed == preferredRoute
? _value.preferredRoute
: preferredRoute // ignore: cast_nullable_to_non_nullable
as String?,
)); ));
} }
} }
@ -1270,26 +1270,26 @@ class __$$_SafetySpecCopyWithImpl<$Res>
@JsonSerializable() @JsonSerializable()
class _$_SafetySpec implements _SafetySpec { class _$_SafetySpec implements _SafetySpec {
const _$_SafetySpec( const _$_SafetySpec(
{this.preferredRoute, {required this.hopCount,
required this.hopCount,
required this.stability, required this.stability,
required this.sequencing}); required this.sequencing,
this.preferredRoute});
factory _$_SafetySpec.fromJson(Map<String, dynamic> json) => factory _$_SafetySpec.fromJson(Map<String, dynamic> json) =>
_$$_SafetySpecFromJson(json); _$$_SafetySpecFromJson(json);
@override
final String? preferredRoute;
@override @override
final int hopCount; final int hopCount;
@override @override
final Stability stability; final Stability stability;
@override @override
final Sequencing sequencing; final Sequencing sequencing;
@override
final String? preferredRoute;
@override @override
String toString() { String toString() {
return 'SafetySpec(preferredRoute: $preferredRoute, hopCount: $hopCount, stability: $stability, sequencing: $sequencing)'; return 'SafetySpec(hopCount: $hopCount, stability: $stability, sequencing: $sequencing, preferredRoute: $preferredRoute)';
} }
@override @override
@ -1297,20 +1297,20 @@ class _$_SafetySpec implements _SafetySpec {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$_SafetySpec && other is _$_SafetySpec &&
(identical(other.preferredRoute, preferredRoute) ||
other.preferredRoute == preferredRoute) &&
(identical(other.hopCount, hopCount) || (identical(other.hopCount, hopCount) ||
other.hopCount == hopCount) && other.hopCount == hopCount) &&
(identical(other.stability, stability) || (identical(other.stability, stability) ||
other.stability == stability) && other.stability == stability) &&
(identical(other.sequencing, sequencing) || (identical(other.sequencing, sequencing) ||
other.sequencing == sequencing)); other.sequencing == sequencing) &&
(identical(other.preferredRoute, preferredRoute) ||
other.preferredRoute == preferredRoute));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => int get hashCode =>
Object.hash(runtimeType, preferredRoute, hopCount, stability, sequencing); Object.hash(runtimeType, hopCount, stability, sequencing, preferredRoute);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -1328,16 +1328,14 @@ class _$_SafetySpec implements _SafetySpec {
abstract class _SafetySpec implements SafetySpec { abstract class _SafetySpec implements SafetySpec {
const factory _SafetySpec( const factory _SafetySpec(
{final String? preferredRoute, {required final int hopCount,
required final int hopCount,
required final Stability stability, required final Stability stability,
required final Sequencing sequencing}) = _$_SafetySpec; required final Sequencing sequencing,
final String? preferredRoute}) = _$_SafetySpec;
factory _SafetySpec.fromJson(Map<String, dynamic> json) = factory _SafetySpec.fromJson(Map<String, dynamic> json) =
_$_SafetySpec.fromJson; _$_SafetySpec.fromJson;
@override
String? get preferredRoute;
@override @override
int get hopCount; int get hopCount;
@override @override
@ -1345,6 +1343,8 @@ abstract class _SafetySpec implements SafetySpec {
@override @override
Sequencing get sequencing; Sequencing get sequencing;
@override @override
String? get preferredRoute;
@override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith => _$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;

View File

@ -22,7 +22,7 @@ _$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
_$DHTSchemaSMPL( _$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((e) => DHTSchemaMember.fromJson(e as Map<String, dynamic>)) .map(DHTSchemaMember.fromJson)
.toList(), .toList(),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
@ -51,10 +51,10 @@ _$_DHTRecordDescriptor _$$_DHTRecordDescriptorFromJson(
_$_DHTRecordDescriptor( _$_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']),
ownerSecret: json['owner_secret'] == null ownerSecret: json['owner_secret'] == null
? null ? null
: FixedEncodedString43.fromJson(json['owner_secret']), : FixedEncodedString43.fromJson(json['owner_secret']),
schema: DHTSchema.fromJson(json['schema'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_DHTRecordDescriptorToJson( Map<String, dynamic> _$$_DHTRecordDescriptorToJson(
@ -62,8 +62,8 @@ Map<String, dynamic> _$$_DHTRecordDescriptorToJson(
<String, dynamic>{ <String, dynamic>{
'key': instance.key.toJson(), 'key': instance.key.toJson(),
'owner': instance.owner.toJson(), 'owner': instance.owner.toJson(),
'owner_secret': instance.ownerSecret?.toJson(),
'schema': instance.schema.toJson(), 'schema': instance.schema.toJson(),
'owner_secret': instance.ownerSecret?.toJson(),
}; };
_$_ValueSubkeyRange _$$_ValueSubkeyRangeFromJson(Map<String, dynamic> json) => _$_ValueSubkeyRange _$$_ValueSubkeyRangeFromJson(Map<String, dynamic> json) =>
@ -93,18 +93,18 @@ Map<String, dynamic> _$$_ValueDataToJson(_$_ValueData instance) =>
_$_SafetySpec _$$_SafetySpecFromJson(Map<String, dynamic> json) => _$_SafetySpec _$$_SafetySpecFromJson(Map<String, dynamic> json) =>
_$_SafetySpec( _$_SafetySpec(
preferredRoute: json['preferred_route'] as String?,
hopCount: json['hop_count'] as int, hopCount: json['hop_count'] as int,
stability: Stability.fromJson(json['stability'] as String), stability: Stability.fromJson(json['stability']),
sequencing: Sequencing.fromJson(json['sequencing'] as String), sequencing: Sequencing.fromJson(json['sequencing']),
preferredRoute: json['preferred_route'] as String?,
); );
Map<String, dynamic> _$$_SafetySpecToJson(_$_SafetySpec instance) => Map<String, dynamic> _$$_SafetySpecToJson(_$_SafetySpec instance) =>
<String, dynamic>{ <String, dynamic>{
'preferred_route': instance.preferredRoute,
'hop_count': instance.hopCount, 'hop_count': instance.hopCount,
'stability': instance.stability.toJson(), 'stability': instance.stability.toJson(),
'sequencing': instance.sequencing.toJson(), 'sequencing': instance.sequencing.toJson(),
'preferred_route': instance.preferredRoute,
}; };
_$_RouteBlob _$$_RouteBlobFromJson(Map<String, dynamic> json) => _$_RouteBlob( _$_RouteBlob _$$_RouteBlobFromJson(Map<String, dynamic> json) => _$_RouteBlob(

View File

@ -3,6 +3,7 @@ import 'dart:typed_data';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:fixnum/fixnum.dart';
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
@ -61,6 +62,8 @@ class VeilidVersion extends Equatable {
@immutable @immutable
class Timestamp extends Equatable { class Timestamp extends Equatable {
const Timestamp({required this.value}); const Timestamp({required this.value});
factory Timestamp.fromInt64(Int64 i64) =>
Timestamp(value: BigInt.parse(i64.toStringUnsigned()));
factory Timestamp.fromString(String s) => Timestamp(value: BigInt.parse(s)); factory Timestamp.fromString(String s) => Timestamp(value: BigInt.parse(s));
factory Timestamp.fromJson(dynamic json) => factory Timestamp.fromJson(dynamic json) =>
Timestamp.fromString(json as String); Timestamp.fromString(json as String);
@ -70,8 +73,8 @@ class Timestamp extends Equatable {
@override @override
String toString() => value.toString(); String toString() => value.toString();
String toJson() => toString(); String toJson() => toString();
Int64 toInt64() => Int64.parseInt(value.toString());
TimestampDuration diff(Timestamp other) => TimestampDuration diff(Timestamp other) =>
TimestampDuration(value: value - other.value); TimestampDuration(value: value - other.value);
@ -83,6 +86,8 @@ class Timestamp extends Equatable {
@immutable @immutable
class TimestampDuration extends Equatable { class TimestampDuration extends Equatable {
const TimestampDuration({required this.value}); const TimestampDuration({required this.value});
factory TimestampDuration.fromInt64(Int64 i64) =>
TimestampDuration(value: BigInt.parse(i64.toStringUnsigned()));
factory TimestampDuration.fromString(String s) => factory TimestampDuration.fromString(String s) =>
TimestampDuration(value: BigInt.parse(s)); TimestampDuration(value: BigInt.parse(s));
factory TimestampDuration.fromJson(dynamic json) => factory TimestampDuration.fromJson(dynamic json) =>
@ -93,8 +98,8 @@ class TimestampDuration extends Equatable {
@override @override
String toString() => value.toString(); String toString() => value.toString();
String toJson() => toString(); String toJson() => toString();
Int64 toInt64() => Int64.parseInt(value.toString());
int toMillis() => (value ~/ BigInt.from(1000)).toInt(); int toMillis() => (value ~/ BigInt.from(1000)).toInt();
BigInt toMicros() => value; BigInt toMicros() => value;

View File

@ -4377,11 +4377,11 @@ VeilidConfigRPC _$VeilidConfigRPCFromJson(Map<String, dynamic> json) {
mixin _$VeilidConfigRPC { mixin _$VeilidConfigRPC {
int get concurrency => throw _privateConstructorUsedError; int get concurrency => throw _privateConstructorUsedError;
int get queueSize => throw _privateConstructorUsedError; int get queueSize => throw _privateConstructorUsedError;
int? get maxTimestampBehindMs => throw _privateConstructorUsedError;
int? get maxTimestampAheadMs => throw _privateConstructorUsedError;
int get timeoutMs => throw _privateConstructorUsedError; int get timeoutMs => throw _privateConstructorUsedError;
int get maxRouteHopCount => throw _privateConstructorUsedError; int get maxRouteHopCount => throw _privateConstructorUsedError;
int get defaultRouteHopCount => throw _privateConstructorUsedError; int get defaultRouteHopCount => throw _privateConstructorUsedError;
int? get maxTimestampBehindMs => throw _privateConstructorUsedError;
int? get maxTimestampAheadMs => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -4398,11 +4398,11 @@ abstract class $VeilidConfigRPCCopyWith<$Res> {
$Res call( $Res call(
{int concurrency, {int concurrency,
int queueSize, int queueSize,
int? maxTimestampBehindMs,
int? maxTimestampAheadMs,
int timeoutMs, int timeoutMs,
int maxRouteHopCount, int maxRouteHopCount,
int defaultRouteHopCount}); int defaultRouteHopCount,
int? maxTimestampBehindMs,
int? maxTimestampAheadMs});
} }
/// @nodoc /// @nodoc
@ -4420,11 +4420,11 @@ class _$VeilidConfigRPCCopyWithImpl<$Res, $Val extends VeilidConfigRPC>
$Res call({ $Res call({
Object? concurrency = null, Object? concurrency = null,
Object? queueSize = null, Object? queueSize = null,
Object? maxTimestampBehindMs = freezed,
Object? maxTimestampAheadMs = freezed,
Object? timeoutMs = null, Object? timeoutMs = null,
Object? maxRouteHopCount = null, Object? maxRouteHopCount = null,
Object? defaultRouteHopCount = null, Object? defaultRouteHopCount = null,
Object? maxTimestampBehindMs = freezed,
Object? maxTimestampAheadMs = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
concurrency: null == concurrency concurrency: null == concurrency
@ -4435,14 +4435,6 @@ class _$VeilidConfigRPCCopyWithImpl<$Res, $Val extends VeilidConfigRPC>
? _value.queueSize ? _value.queueSize
: queueSize // ignore: cast_nullable_to_non_nullable : queueSize // ignore: cast_nullable_to_non_nullable
as int, as int,
maxTimestampBehindMs: freezed == maxTimestampBehindMs
? _value.maxTimestampBehindMs
: maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable
as int?,
maxTimestampAheadMs: freezed == maxTimestampAheadMs
? _value.maxTimestampAheadMs
: maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable
as int?,
timeoutMs: null == timeoutMs timeoutMs: null == timeoutMs
? _value.timeoutMs ? _value.timeoutMs
: timeoutMs // ignore: cast_nullable_to_non_nullable : timeoutMs // ignore: cast_nullable_to_non_nullable
@ -4455,6 +4447,14 @@ class _$VeilidConfigRPCCopyWithImpl<$Res, $Val extends VeilidConfigRPC>
? _value.defaultRouteHopCount ? _value.defaultRouteHopCount
: defaultRouteHopCount // ignore: cast_nullable_to_non_nullable : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable
as int, as int,
maxTimestampBehindMs: freezed == maxTimestampBehindMs
? _value.maxTimestampBehindMs
: maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable
as int?,
maxTimestampAheadMs: freezed == maxTimestampAheadMs
? _value.maxTimestampAheadMs
: maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val); ) as $Val);
} }
} }
@ -4470,11 +4470,11 @@ abstract class _$$_VeilidConfigRPCCopyWith<$Res>
$Res call( $Res call(
{int concurrency, {int concurrency,
int queueSize, int queueSize,
int? maxTimestampBehindMs,
int? maxTimestampAheadMs,
int timeoutMs, int timeoutMs,
int maxRouteHopCount, int maxRouteHopCount,
int defaultRouteHopCount}); int defaultRouteHopCount,
int? maxTimestampBehindMs,
int? maxTimestampAheadMs});
} }
/// @nodoc /// @nodoc
@ -4490,11 +4490,11 @@ class __$$_VeilidConfigRPCCopyWithImpl<$Res>
$Res call({ $Res call({
Object? concurrency = null, Object? concurrency = null,
Object? queueSize = null, Object? queueSize = null,
Object? maxTimestampBehindMs = freezed,
Object? maxTimestampAheadMs = freezed,
Object? timeoutMs = null, Object? timeoutMs = null,
Object? maxRouteHopCount = null, Object? maxRouteHopCount = null,
Object? defaultRouteHopCount = null, Object? defaultRouteHopCount = null,
Object? maxTimestampBehindMs = freezed,
Object? maxTimestampAheadMs = freezed,
}) { }) {
return _then(_$_VeilidConfigRPC( return _then(_$_VeilidConfigRPC(
concurrency: null == concurrency concurrency: null == concurrency
@ -4505,14 +4505,6 @@ class __$$_VeilidConfigRPCCopyWithImpl<$Res>
? _value.queueSize ? _value.queueSize
: queueSize // ignore: cast_nullable_to_non_nullable : queueSize // ignore: cast_nullable_to_non_nullable
as int, as int,
maxTimestampBehindMs: freezed == maxTimestampBehindMs
? _value.maxTimestampBehindMs
: maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable
as int?,
maxTimestampAheadMs: freezed == maxTimestampAheadMs
? _value.maxTimestampAheadMs
: maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable
as int?,
timeoutMs: null == timeoutMs timeoutMs: null == timeoutMs
? _value.timeoutMs ? _value.timeoutMs
: timeoutMs // ignore: cast_nullable_to_non_nullable : timeoutMs // ignore: cast_nullable_to_non_nullable
@ -4525,6 +4517,14 @@ class __$$_VeilidConfigRPCCopyWithImpl<$Res>
? _value.defaultRouteHopCount ? _value.defaultRouteHopCount
: defaultRouteHopCount // ignore: cast_nullable_to_non_nullable : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable
as int, as int,
maxTimestampBehindMs: freezed == maxTimestampBehindMs
? _value.maxTimestampBehindMs
: maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable
as int?,
maxTimestampAheadMs: freezed == maxTimestampAheadMs
? _value.maxTimestampAheadMs
: maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable
as int?,
)); ));
} }
} }
@ -4537,11 +4537,11 @@ class _$_VeilidConfigRPC
const _$_VeilidConfigRPC( const _$_VeilidConfigRPC(
{required this.concurrency, {required this.concurrency,
required this.queueSize, required this.queueSize,
this.maxTimestampBehindMs,
this.maxTimestampAheadMs,
required this.timeoutMs, required this.timeoutMs,
required this.maxRouteHopCount, required this.maxRouteHopCount,
required this.defaultRouteHopCount}); required this.defaultRouteHopCount,
this.maxTimestampBehindMs,
this.maxTimestampAheadMs});
factory _$_VeilidConfigRPC.fromJson(Map<String, dynamic> json) => factory _$_VeilidConfigRPC.fromJson(Map<String, dynamic> json) =>
_$$_VeilidConfigRPCFromJson(json); _$$_VeilidConfigRPCFromJson(json);
@ -4551,19 +4551,19 @@ class _$_VeilidConfigRPC
@override @override
final int queueSize; final int queueSize;
@override @override
final int? maxTimestampBehindMs;
@override
final int? maxTimestampAheadMs;
@override
final int timeoutMs; final int timeoutMs;
@override @override
final int maxRouteHopCount; final int maxRouteHopCount;
@override @override
final int defaultRouteHopCount; final int defaultRouteHopCount;
@override
final int? maxTimestampBehindMs;
@override
final int? maxTimestampAheadMs;
@override @override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount)'; return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs)';
} }
@override @override
@ -4573,11 +4573,11 @@ class _$_VeilidConfigRPC
..add(DiagnosticsProperty('type', 'VeilidConfigRPC')) ..add(DiagnosticsProperty('type', 'VeilidConfigRPC'))
..add(DiagnosticsProperty('concurrency', concurrency)) ..add(DiagnosticsProperty('concurrency', concurrency))
..add(DiagnosticsProperty('queueSize', queueSize)) ..add(DiagnosticsProperty('queueSize', queueSize))
..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs))
..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs))
..add(DiagnosticsProperty('timeoutMs', timeoutMs)) ..add(DiagnosticsProperty('timeoutMs', timeoutMs))
..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount)) ..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount))
..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount)); ..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount))
..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs))
..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs));
} }
@override @override
@ -4589,16 +4589,16 @@ class _$_VeilidConfigRPC
other.concurrency == concurrency) && other.concurrency == concurrency) &&
(identical(other.queueSize, queueSize) || (identical(other.queueSize, queueSize) ||
other.queueSize == queueSize) && other.queueSize == queueSize) &&
(identical(other.maxTimestampBehindMs, maxTimestampBehindMs) ||
other.maxTimestampBehindMs == maxTimestampBehindMs) &&
(identical(other.maxTimestampAheadMs, maxTimestampAheadMs) ||
other.maxTimestampAheadMs == maxTimestampAheadMs) &&
(identical(other.timeoutMs, timeoutMs) || (identical(other.timeoutMs, timeoutMs) ||
other.timeoutMs == timeoutMs) && other.timeoutMs == timeoutMs) &&
(identical(other.maxRouteHopCount, maxRouteHopCount) || (identical(other.maxRouteHopCount, maxRouteHopCount) ||
other.maxRouteHopCount == maxRouteHopCount) && other.maxRouteHopCount == maxRouteHopCount) &&
(identical(other.defaultRouteHopCount, defaultRouteHopCount) || (identical(other.defaultRouteHopCount, defaultRouteHopCount) ||
other.defaultRouteHopCount == defaultRouteHopCount)); other.defaultRouteHopCount == defaultRouteHopCount) &&
(identical(other.maxTimestampBehindMs, maxTimestampBehindMs) ||
other.maxTimestampBehindMs == maxTimestampBehindMs) &&
(identical(other.maxTimestampAheadMs, maxTimestampAheadMs) ||
other.maxTimestampAheadMs == maxTimestampAheadMs));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -4607,11 +4607,11 @@ class _$_VeilidConfigRPC
runtimeType, runtimeType,
concurrency, concurrency,
queueSize, queueSize,
maxTimestampBehindMs,
maxTimestampAheadMs,
timeoutMs, timeoutMs,
maxRouteHopCount, maxRouteHopCount,
defaultRouteHopCount); defaultRouteHopCount,
maxTimestampBehindMs,
maxTimestampAheadMs);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -4631,11 +4631,11 @@ abstract class _VeilidConfigRPC implements VeilidConfigRPC {
const factory _VeilidConfigRPC( const factory _VeilidConfigRPC(
{required final int concurrency, {required final int concurrency,
required final int queueSize, required final int queueSize,
final int? maxTimestampBehindMs,
final int? maxTimestampAheadMs,
required final int timeoutMs, required final int timeoutMs,
required final int maxRouteHopCount, required final int maxRouteHopCount,
required final int defaultRouteHopCount}) = _$_VeilidConfigRPC; required final int defaultRouteHopCount,
final int? maxTimestampBehindMs,
final int? maxTimestampAheadMs}) = _$_VeilidConfigRPC;
factory _VeilidConfigRPC.fromJson(Map<String, dynamic> json) = factory _VeilidConfigRPC.fromJson(Map<String, dynamic> json) =
_$_VeilidConfigRPC.fromJson; _$_VeilidConfigRPC.fromJson;
@ -4645,16 +4645,16 @@ abstract class _VeilidConfigRPC implements VeilidConfigRPC {
@override @override
int get queueSize; int get queueSize;
@override @override
int? get maxTimestampBehindMs;
@override
int? get maxTimestampAheadMs;
@override
int get timeoutMs; int get timeoutMs;
@override @override
int get maxRouteHopCount; int get maxRouteHopCount;
@override @override
int get defaultRouteHopCount; int get defaultRouteHopCount;
@override @override
int? get maxTimestampBehindMs;
@override
int? get maxTimestampAheadMs;
@override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$_VeilidConfigRPCCopyWith<_$_VeilidConfigRPC> get copyWith => _$$_VeilidConfigRPCCopyWith<_$_VeilidConfigRPC> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@ -5016,7 +5016,6 @@ mixin _$VeilidConfigNetwork {
int get clientWhitelistTimeoutMs => throw _privateConstructorUsedError; int get clientWhitelistTimeoutMs => throw _privateConstructorUsedError;
int get reverseConnectionReceiptTimeMs => throw _privateConstructorUsedError; int get reverseConnectionReceiptTimeMs => throw _privateConstructorUsedError;
int get holePunchReceiptTimeMs => throw _privateConstructorUsedError; int get holePunchReceiptTimeMs => throw _privateConstructorUsedError;
String? get networkKeyPassword => throw _privateConstructorUsedError;
VeilidConfigRoutingTable get routingTable => VeilidConfigRoutingTable get routingTable =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
VeilidConfigRPC get rpc => throw _privateConstructorUsedError; VeilidConfigRPC get rpc => throw _privateConstructorUsedError;
@ -5027,6 +5026,7 @@ mixin _$VeilidConfigNetwork {
VeilidConfigTLS get tls => throw _privateConstructorUsedError; VeilidConfigTLS get tls => throw _privateConstructorUsedError;
VeilidConfigApplication get application => throw _privateConstructorUsedError; VeilidConfigApplication get application => throw _privateConstructorUsedError;
VeilidConfigProtocol get protocol => throw _privateConstructorUsedError; VeilidConfigProtocol get protocol => throw _privateConstructorUsedError;
String? get networkKeyPassword => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -5050,7 +5050,6 @@ abstract class $VeilidConfigNetworkCopyWith<$Res> {
int clientWhitelistTimeoutMs, int clientWhitelistTimeoutMs,
int reverseConnectionReceiptTimeMs, int reverseConnectionReceiptTimeMs,
int holePunchReceiptTimeMs, int holePunchReceiptTimeMs,
String? networkKeyPassword,
VeilidConfigRoutingTable routingTable, VeilidConfigRoutingTable routingTable,
VeilidConfigRPC rpc, VeilidConfigRPC rpc,
VeilidConfigDHT dht, VeilidConfigDHT dht,
@ -5059,7 +5058,8 @@ abstract class $VeilidConfigNetworkCopyWith<$Res> {
int restrictedNatRetries, int restrictedNatRetries,
VeilidConfigTLS tls, VeilidConfigTLS tls,
VeilidConfigApplication application, VeilidConfigApplication application,
VeilidConfigProtocol protocol}); VeilidConfigProtocol protocol,
String? networkKeyPassword});
$VeilidConfigRoutingTableCopyWith<$Res> get routingTable; $VeilidConfigRoutingTableCopyWith<$Res> get routingTable;
$VeilidConfigRPCCopyWith<$Res> get rpc; $VeilidConfigRPCCopyWith<$Res> get rpc;
@ -5091,7 +5091,6 @@ class _$VeilidConfigNetworkCopyWithImpl<$Res, $Val extends VeilidConfigNetwork>
Object? clientWhitelistTimeoutMs = null, Object? clientWhitelistTimeoutMs = null,
Object? reverseConnectionReceiptTimeMs = null, Object? reverseConnectionReceiptTimeMs = null,
Object? holePunchReceiptTimeMs = null, Object? holePunchReceiptTimeMs = null,
Object? networkKeyPassword = freezed,
Object? routingTable = null, Object? routingTable = null,
Object? rpc = null, Object? rpc = null,
Object? dht = null, Object? dht = null,
@ -5101,6 +5100,7 @@ class _$VeilidConfigNetworkCopyWithImpl<$Res, $Val extends VeilidConfigNetwork>
Object? tls = null, Object? tls = null,
Object? application = null, Object? application = null,
Object? protocol = null, Object? protocol = null,
Object? networkKeyPassword = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
connectionInitialTimeoutMs: null == connectionInitialTimeoutMs connectionInitialTimeoutMs: null == connectionInitialTimeoutMs
@ -5139,10 +5139,6 @@ class _$VeilidConfigNetworkCopyWithImpl<$Res, $Val extends VeilidConfigNetwork>
? _value.holePunchReceiptTimeMs ? _value.holePunchReceiptTimeMs
: holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable
as int, as int,
networkKeyPassword: freezed == networkKeyPassword
? _value.networkKeyPassword
: networkKeyPassword // ignore: cast_nullable_to_non_nullable
as String?,
routingTable: null == routingTable routingTable: null == routingTable
? _value.routingTable ? _value.routingTable
: routingTable // ignore: cast_nullable_to_non_nullable : routingTable // ignore: cast_nullable_to_non_nullable
@ -5179,6 +5175,10 @@ class _$VeilidConfigNetworkCopyWithImpl<$Res, $Val extends VeilidConfigNetwork>
? _value.protocol ? _value.protocol
: protocol // ignore: cast_nullable_to_non_nullable : protocol // ignore: cast_nullable_to_non_nullable
as VeilidConfigProtocol, as VeilidConfigProtocol,
networkKeyPassword: freezed == networkKeyPassword
? _value.networkKeyPassword
: networkKeyPassword // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val); ) as $Val);
} }
@ -5250,7 +5250,6 @@ abstract class _$$_VeilidConfigNetworkCopyWith<$Res>
int clientWhitelistTimeoutMs, int clientWhitelistTimeoutMs,
int reverseConnectionReceiptTimeMs, int reverseConnectionReceiptTimeMs,
int holePunchReceiptTimeMs, int holePunchReceiptTimeMs,
String? networkKeyPassword,
VeilidConfigRoutingTable routingTable, VeilidConfigRoutingTable routingTable,
VeilidConfigRPC rpc, VeilidConfigRPC rpc,
VeilidConfigDHT dht, VeilidConfigDHT dht,
@ -5259,7 +5258,8 @@ abstract class _$$_VeilidConfigNetworkCopyWith<$Res>
int restrictedNatRetries, int restrictedNatRetries,
VeilidConfigTLS tls, VeilidConfigTLS tls,
VeilidConfigApplication application, VeilidConfigApplication application,
VeilidConfigProtocol protocol}); VeilidConfigProtocol protocol,
String? networkKeyPassword});
@override @override
$VeilidConfigRoutingTableCopyWith<$Res> get routingTable; $VeilidConfigRoutingTableCopyWith<$Res> get routingTable;
@ -5295,7 +5295,6 @@ class __$$_VeilidConfigNetworkCopyWithImpl<$Res>
Object? clientWhitelistTimeoutMs = null, Object? clientWhitelistTimeoutMs = null,
Object? reverseConnectionReceiptTimeMs = null, Object? reverseConnectionReceiptTimeMs = null,
Object? holePunchReceiptTimeMs = null, Object? holePunchReceiptTimeMs = null,
Object? networkKeyPassword = freezed,
Object? routingTable = null, Object? routingTable = null,
Object? rpc = null, Object? rpc = null,
Object? dht = null, Object? dht = null,
@ -5305,6 +5304,7 @@ class __$$_VeilidConfigNetworkCopyWithImpl<$Res>
Object? tls = null, Object? tls = null,
Object? application = null, Object? application = null,
Object? protocol = null, Object? protocol = null,
Object? networkKeyPassword = freezed,
}) { }) {
return _then(_$_VeilidConfigNetwork( return _then(_$_VeilidConfigNetwork(
connectionInitialTimeoutMs: null == connectionInitialTimeoutMs connectionInitialTimeoutMs: null == connectionInitialTimeoutMs
@ -5343,10 +5343,6 @@ class __$$_VeilidConfigNetworkCopyWithImpl<$Res>
? _value.holePunchReceiptTimeMs ? _value.holePunchReceiptTimeMs
: holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable
as int, as int,
networkKeyPassword: freezed == networkKeyPassword
? _value.networkKeyPassword
: networkKeyPassword // ignore: cast_nullable_to_non_nullable
as String?,
routingTable: null == routingTable routingTable: null == routingTable
? _value.routingTable ? _value.routingTable
: routingTable // ignore: cast_nullable_to_non_nullable : routingTable // ignore: cast_nullable_to_non_nullable
@ -5383,6 +5379,10 @@ class __$$_VeilidConfigNetworkCopyWithImpl<$Res>
? _value.protocol ? _value.protocol
: protocol // ignore: cast_nullable_to_non_nullable : protocol // ignore: cast_nullable_to_non_nullable
as VeilidConfigProtocol, as VeilidConfigProtocol,
networkKeyPassword: freezed == networkKeyPassword
? _value.networkKeyPassword
: networkKeyPassword // ignore: cast_nullable_to_non_nullable
as String?,
)); ));
} }
} }
@ -5402,7 +5402,6 @@ class _$_VeilidConfigNetwork
required this.clientWhitelistTimeoutMs, required this.clientWhitelistTimeoutMs,
required this.reverseConnectionReceiptTimeMs, required this.reverseConnectionReceiptTimeMs,
required this.holePunchReceiptTimeMs, required this.holePunchReceiptTimeMs,
this.networkKeyPassword,
required this.routingTable, required this.routingTable,
required this.rpc, required this.rpc,
required this.dht, required this.dht,
@ -5411,7 +5410,8 @@ class _$_VeilidConfigNetwork
required this.restrictedNatRetries, required this.restrictedNatRetries,
required this.tls, required this.tls,
required this.application, required this.application,
required this.protocol}); required this.protocol,
this.networkKeyPassword});
factory _$_VeilidConfigNetwork.fromJson(Map<String, dynamic> json) => factory _$_VeilidConfigNetwork.fromJson(Map<String, dynamic> json) =>
_$$_VeilidConfigNetworkFromJson(json); _$$_VeilidConfigNetworkFromJson(json);
@ -5435,8 +5435,6 @@ class _$_VeilidConfigNetwork
@override @override
final int holePunchReceiptTimeMs; final int holePunchReceiptTimeMs;
@override @override
final String? networkKeyPassword;
@override
final VeilidConfigRoutingTable routingTable; final VeilidConfigRoutingTable routingTable;
@override @override
final VeilidConfigRPC rpc; final VeilidConfigRPC rpc;
@ -5454,10 +5452,12 @@ class _$_VeilidConfigNetwork
final VeilidConfigApplication application; final VeilidConfigApplication application;
@override @override
final VeilidConfigProtocol protocol; final VeilidConfigProtocol protocol;
@override
final String? networkKeyPassword;
@override @override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientWhitelistTimeoutMs: $clientWhitelistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, networkKeyPassword: $networkKeyPassword, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol)'; return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientWhitelistTimeoutMs: $clientWhitelistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol, networkKeyPassword: $networkKeyPassword)';
} }
@override @override
@ -5482,7 +5482,6 @@ class _$_VeilidConfigNetwork
'reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs)) 'reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs))
..add( ..add(
DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs)) DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs))
..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword))
..add(DiagnosticsProperty('routingTable', routingTable)) ..add(DiagnosticsProperty('routingTable', routingTable))
..add(DiagnosticsProperty('rpc', rpc)) ..add(DiagnosticsProperty('rpc', rpc))
..add(DiagnosticsProperty('dht', dht)) ..add(DiagnosticsProperty('dht', dht))
@ -5491,7 +5490,8 @@ class _$_VeilidConfigNetwork
..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries)) ..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries))
..add(DiagnosticsProperty('tls', tls)) ..add(DiagnosticsProperty('tls', tls))
..add(DiagnosticsProperty('application', application)) ..add(DiagnosticsProperty('application', application))
..add(DiagnosticsProperty('protocol', protocol)); ..add(DiagnosticsProperty('protocol', protocol))
..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword));
} }
@override @override
@ -5524,8 +5524,6 @@ class _$_VeilidConfigNetwork
reverseConnectionReceiptTimeMs) && reverseConnectionReceiptTimeMs) &&
(identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) || (identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) ||
other.holePunchReceiptTimeMs == holePunchReceiptTimeMs) && other.holePunchReceiptTimeMs == holePunchReceiptTimeMs) &&
(identical(other.networkKeyPassword, networkKeyPassword) ||
other.networkKeyPassword == networkKeyPassword) &&
(identical(other.routingTable, routingTable) || (identical(other.routingTable, routingTable) ||
other.routingTable == routingTable) && other.routingTable == routingTable) &&
(identical(other.rpc, rpc) || other.rpc == rpc) && (identical(other.rpc, rpc) || other.rpc == rpc) &&
@ -5539,7 +5537,9 @@ class _$_VeilidConfigNetwork
(identical(other.application, application) || (identical(other.application, application) ||
other.application == application) && other.application == application) &&
(identical(other.protocol, protocol) || (identical(other.protocol, protocol) ||
other.protocol == protocol)); other.protocol == protocol) &&
(identical(other.networkKeyPassword, networkKeyPassword) ||
other.networkKeyPassword == networkKeyPassword));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -5555,7 +5555,6 @@ class _$_VeilidConfigNetwork
clientWhitelistTimeoutMs, clientWhitelistTimeoutMs,
reverseConnectionReceiptTimeMs, reverseConnectionReceiptTimeMs,
holePunchReceiptTimeMs, holePunchReceiptTimeMs,
networkKeyPassword,
routingTable, routingTable,
rpc, rpc,
dht, dht,
@ -5564,7 +5563,8 @@ class _$_VeilidConfigNetwork
restrictedNatRetries, restrictedNatRetries,
tls, tls,
application, application,
protocol protocol,
networkKeyPassword
]); ]);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -5593,7 +5593,6 @@ abstract class _VeilidConfigNetwork implements VeilidConfigNetwork {
required final int clientWhitelistTimeoutMs, required final int clientWhitelistTimeoutMs,
required final int reverseConnectionReceiptTimeMs, required final int reverseConnectionReceiptTimeMs,
required final int holePunchReceiptTimeMs, required final int holePunchReceiptTimeMs,
final String? networkKeyPassword,
required final VeilidConfigRoutingTable routingTable, required final VeilidConfigRoutingTable routingTable,
required final VeilidConfigRPC rpc, required final VeilidConfigRPC rpc,
required final VeilidConfigDHT dht, required final VeilidConfigDHT dht,
@ -5602,7 +5601,8 @@ abstract class _VeilidConfigNetwork implements VeilidConfigNetwork {
required final int restrictedNatRetries, required final int restrictedNatRetries,
required final VeilidConfigTLS tls, required final VeilidConfigTLS tls,
required final VeilidConfigApplication application, required final VeilidConfigApplication application,
required final VeilidConfigProtocol protocol}) = _$_VeilidConfigNetwork; required final VeilidConfigProtocol protocol,
final String? networkKeyPassword}) = _$_VeilidConfigNetwork;
factory _VeilidConfigNetwork.fromJson(Map<String, dynamic> json) = factory _VeilidConfigNetwork.fromJson(Map<String, dynamic> json) =
_$_VeilidConfigNetwork.fromJson; _$_VeilidConfigNetwork.fromJson;
@ -5626,8 +5626,6 @@ abstract class _VeilidConfigNetwork implements VeilidConfigNetwork {
@override @override
int get holePunchReceiptTimeMs; int get holePunchReceiptTimeMs;
@override @override
String? get networkKeyPassword;
@override
VeilidConfigRoutingTable get routingTable; VeilidConfigRoutingTable get routingTable;
@override @override
VeilidConfigRPC get rpc; VeilidConfigRPC get rpc;
@ -5646,6 +5644,8 @@ abstract class _VeilidConfigNetwork implements VeilidConfigNetwork {
@override @override
VeilidConfigProtocol get protocol; VeilidConfigProtocol get protocol;
@override @override
String? get networkKeyPassword;
@override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$_VeilidConfigNetworkCopyWith<_$_VeilidConfigNetwork> get copyWith => _$$_VeilidConfigNetworkCopyWith<_$_VeilidConfigNetwork> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;

View File

@ -55,12 +55,9 @@ Map<String, dynamic> _$$_VeilidFFIConfigLoggingApiToJson(
_$_VeilidFFIConfigLogging _$$_VeilidFFIConfigLoggingFromJson( _$_VeilidFFIConfigLogging _$$_VeilidFFIConfigLoggingFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_VeilidFFIConfigLogging( _$_VeilidFFIConfigLogging(
terminal: VeilidFFIConfigLoggingTerminal.fromJson( terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']),
json['terminal'] as Map<String, dynamic>), otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']),
otlp: VeilidFFIConfigLoggingOtlp.fromJson( api: VeilidFFIConfigLoggingApi.fromJson(json['api']),
json['otlp'] as Map<String, dynamic>),
api: VeilidFFIConfigLoggingApi.fromJson(
json['api'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidFFIConfigLoggingToJson( Map<String, dynamic> _$$_VeilidFFIConfigLoggingToJson(
@ -73,8 +70,7 @@ Map<String, dynamic> _$$_VeilidFFIConfigLoggingToJson(
_$_VeilidFFIConfig _$$_VeilidFFIConfigFromJson(Map<String, dynamic> json) => _$_VeilidFFIConfig _$$_VeilidFFIConfigFromJson(Map<String, dynamic> json) =>
_$_VeilidFFIConfig( _$_VeilidFFIConfig(
logging: VeilidFFIConfigLogging.fromJson( logging: VeilidFFIConfigLogging.fromJson(json['logging']),
json['logging'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidFFIConfigToJson(_$_VeilidFFIConfig instance) => Map<String, dynamic> _$$_VeilidFFIConfigToJson(_$_VeilidFFIConfig instance) =>
@ -117,10 +113,9 @@ Map<String, dynamic> _$$_VeilidWASMConfigLoggingApiToJson(
_$_VeilidWASMConfigLogging _$$_VeilidWASMConfigLoggingFromJson( _$_VeilidWASMConfigLogging _$$_VeilidWASMConfigLoggingFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_VeilidWASMConfigLogging( _$_VeilidWASMConfigLogging(
performance: VeilidWASMConfigLoggingPerformance.fromJson( performance:
json['performance'] as Map<String, dynamic>), VeilidWASMConfigLoggingPerformance.fromJson(json['performance']),
api: VeilidWASMConfigLoggingApi.fromJson( api: VeilidWASMConfigLoggingApi.fromJson(json['api']),
json['api'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidWASMConfigLoggingToJson( Map<String, dynamic> _$$_VeilidWASMConfigLoggingToJson(
@ -132,8 +127,7 @@ Map<String, dynamic> _$$_VeilidWASMConfigLoggingToJson(
_$_VeilidWASMConfig _$$_VeilidWASMConfigFromJson(Map<String, dynamic> json) => _$_VeilidWASMConfig _$$_VeilidWASMConfigFromJson(Map<String, dynamic> json) =>
_$_VeilidWASMConfig( _$_VeilidWASMConfig(
logging: VeilidWASMConfigLogging.fromJson( logging: VeilidWASMConfigLogging.fromJson(json['logging']),
json['logging'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidWASMConfigToJson(_$_VeilidWASMConfig instance) => Map<String, dynamic> _$$_VeilidWASMConfigToJson(_$_VeilidWASMConfig instance) =>
@ -177,8 +171,8 @@ Map<String, dynamic> _$$_VeilidConfigHTTPToJson(_$_VeilidConfigHTTP instance) =>
_$_VeilidConfigApplication _$$_VeilidConfigApplicationFromJson( _$_VeilidConfigApplication _$$_VeilidConfigApplicationFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_VeilidConfigApplication( _$_VeilidConfigApplication(
https: VeilidConfigHTTPS.fromJson(json['https'] as Map<String, dynamic>), https: VeilidConfigHTTPS.fromJson(json['https']),
http: VeilidConfigHTTP.fromJson(json['http'] as Map<String, dynamic>), http: VeilidConfigHTTP.fromJson(json['http']),
); );
Map<String, dynamic> _$$_VeilidConfigApplicationToJson( Map<String, dynamic> _$$_VeilidConfigApplicationToJson(
@ -265,10 +259,10 @@ Map<String, dynamic> _$$_VeilidConfigWSSToJson(_$_VeilidConfigWSS instance) =>
_$_VeilidConfigProtocol _$$_VeilidConfigProtocolFromJson( _$_VeilidConfigProtocol _$$_VeilidConfigProtocolFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_VeilidConfigProtocol( _$_VeilidConfigProtocol(
udp: VeilidConfigUDP.fromJson(json['udp'] as Map<String, dynamic>), udp: VeilidConfigUDP.fromJson(json['udp']),
tcp: VeilidConfigTCP.fromJson(json['tcp'] as Map<String, dynamic>), tcp: VeilidConfigTCP.fromJson(json['tcp']),
ws: VeilidConfigWS.fromJson(json['ws'] as Map<String, dynamic>), ws: VeilidConfigWS.fromJson(json['ws']),
wss: VeilidConfigWSS.fromJson(json['wss'] as Map<String, dynamic>), wss: VeilidConfigWSS.fromJson(json['wss']),
); );
Map<String, dynamic> _$$_VeilidConfigProtocolToJson( Map<String, dynamic> _$$_VeilidConfigProtocolToJson(
@ -349,22 +343,22 @@ _$_VeilidConfigRPC _$$_VeilidConfigRPCFromJson(Map<String, dynamic> json) =>
_$_VeilidConfigRPC( _$_VeilidConfigRPC(
concurrency: json['concurrency'] as int, concurrency: json['concurrency'] as int,
queueSize: json['queue_size'] as int, queueSize: json['queue_size'] as int,
maxTimestampBehindMs: json['max_timestamp_behind_ms'] as int?,
maxTimestampAheadMs: json['max_timestamp_ahead_ms'] as int?,
timeoutMs: json['timeout_ms'] as int, timeoutMs: json['timeout_ms'] as int,
maxRouteHopCount: json['max_route_hop_count'] as int, maxRouteHopCount: json['max_route_hop_count'] as int,
defaultRouteHopCount: json['default_route_hop_count'] as int, defaultRouteHopCount: json['default_route_hop_count'] as int,
maxTimestampBehindMs: json['max_timestamp_behind_ms'] as int?,
maxTimestampAheadMs: json['max_timestamp_ahead_ms'] as int?,
); );
Map<String, dynamic> _$$_VeilidConfigRPCToJson(_$_VeilidConfigRPC instance) => Map<String, dynamic> _$$_VeilidConfigRPCToJson(_$_VeilidConfigRPC instance) =>
<String, dynamic>{ <String, dynamic>{
'concurrency': instance.concurrency, 'concurrency': instance.concurrency,
'queue_size': instance.queueSize, 'queue_size': instance.queueSize,
'max_timestamp_behind_ms': instance.maxTimestampBehindMs,
'max_timestamp_ahead_ms': instance.maxTimestampAheadMs,
'timeout_ms': instance.timeoutMs, 'timeout_ms': instance.timeoutMs,
'max_route_hop_count': instance.maxRouteHopCount, 'max_route_hop_count': instance.maxRouteHopCount,
'default_route_hop_count': instance.defaultRouteHopCount, 'default_route_hop_count': instance.defaultRouteHopCount,
'max_timestamp_behind_ms': instance.maxTimestampBehindMs,
'max_timestamp_ahead_ms': instance.maxTimestampAheadMs,
}; };
_$_VeilidConfigRoutingTable _$$_VeilidConfigRoutingTableFromJson( _$_VeilidConfigRoutingTable _$$_VeilidConfigRoutingTableFromJson(
@ -414,19 +408,16 @@ _$_VeilidConfigNetwork _$$_VeilidConfigNetworkFromJson(
reverseConnectionReceiptTimeMs: reverseConnectionReceiptTimeMs:
json['reverse_connection_receipt_time_ms'] as int, json['reverse_connection_receipt_time_ms'] as int,
holePunchReceiptTimeMs: json['hole_punch_receipt_time_ms'] as int, holePunchReceiptTimeMs: json['hole_punch_receipt_time_ms'] as int,
networkKeyPassword: json['network_key_password'] as String?, routingTable: VeilidConfigRoutingTable.fromJson(json['routing_table']),
routingTable: VeilidConfigRoutingTable.fromJson( rpc: VeilidConfigRPC.fromJson(json['rpc']),
json['routing_table'] as Map<String, dynamic>), dht: VeilidConfigDHT.fromJson(json['dht']),
rpc: VeilidConfigRPC.fromJson(json['rpc'] as Map<String, dynamic>),
dht: VeilidConfigDHT.fromJson(json['dht'] as Map<String, dynamic>),
upnp: json['upnp'] as bool, upnp: json['upnp'] as bool,
detectAddressChanges: json['detect_address_changes'] as bool, detectAddressChanges: json['detect_address_changes'] as bool,
restrictedNatRetries: json['restricted_nat_retries'] as int, restrictedNatRetries: json['restricted_nat_retries'] as int,
tls: VeilidConfigTLS.fromJson(json['tls'] as Map<String, dynamic>), tls: VeilidConfigTLS.fromJson(json['tls']),
application: VeilidConfigApplication.fromJson( application: VeilidConfigApplication.fromJson(json['application']),
json['application'] as Map<String, dynamic>), protocol: VeilidConfigProtocol.fromJson(json['protocol']),
protocol: VeilidConfigProtocol.fromJson( networkKeyPassword: json['network_key_password'] as String?,
json['protocol'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidConfigNetworkToJson( Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
@ -444,7 +435,6 @@ Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
'reverse_connection_receipt_time_ms': 'reverse_connection_receipt_time_ms':
instance.reverseConnectionReceiptTimeMs, instance.reverseConnectionReceiptTimeMs,
'hole_punch_receipt_time_ms': instance.holePunchReceiptTimeMs, 'hole_punch_receipt_time_ms': instance.holePunchReceiptTimeMs,
'network_key_password': instance.networkKeyPassword,
'routing_table': instance.routingTable.toJson(), 'routing_table': instance.routingTable.toJson(),
'rpc': instance.rpc.toJson(), 'rpc': instance.rpc.toJson(),
'dht': instance.dht.toJson(), 'dht': instance.dht.toJson(),
@ -454,6 +444,7 @@ Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
'tls': instance.tls.toJson(), 'tls': instance.tls.toJson(),
'application': instance.application.toJson(), 'application': instance.application.toJson(),
'protocol': instance.protocol.toJson(), 'protocol': instance.protocol.toJson(),
'network_key_password': instance.networkKeyPassword,
}; };
_$_VeilidConfigTableStore _$$_VeilidConfigTableStoreFromJson( _$_VeilidConfigTableStore _$$_VeilidConfigTableStoreFromJson(
@ -526,16 +517,12 @@ _$_VeilidConfig _$$_VeilidConfigFromJson(Map<String, dynamic> json) =>
_$_VeilidConfig( _$_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( capabilities: VeilidConfigCapabilities.fromJson(json['capabilities']),
json['capabilities'] as Map<String, dynamic>), protectedStore:
protectedStore: VeilidConfigProtectedStore.fromJson( VeilidConfigProtectedStore.fromJson(json['protected_store']),
json['protected_store'] as Map<String, dynamic>), tableStore: VeilidConfigTableStore.fromJson(json['table_store']),
tableStore: VeilidConfigTableStore.fromJson( blockStore: VeilidConfigBlockStore.fromJson(json['block_store']),
json['table_store'] as Map<String, dynamic>), network: VeilidConfigNetwork.fromJson(json['network']),
blockStore: VeilidConfigBlockStore.fromJson(
json['block_store'] as Map<String, dynamic>),
network:
VeilidConfigNetwork.fromJson(json['network'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidConfigToJson(_$_VeilidConfig instance) => Map<String, dynamic> _$$_VeilidConfigToJson(_$_VeilidConfig instance) =>

View File

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:charcode/charcode.dart'; import 'package:charcode/charcode.dart';
@ -184,4 +185,49 @@ abstract class VeilidCryptoSystem {
SharedSecret sharedSecret, Uint8List? associatedData); SharedSecret sharedSecret, Uint8List? associatedData);
Future<Uint8List> cryptNoAuth( Future<Uint8List> cryptNoAuth(
Uint8List body, Nonce nonce, SharedSecret sharedSecret); Uint8List body, Nonce nonce, SharedSecret sharedSecret);
Future<Uint8List> encryptNoAuthWithNonce(
Uint8List body, SharedSecret secret) async {
// generate nonce
final nonce = await randomNonce();
// crypt and append nonce
final b = BytesBuilder()
..add(await cryptNoAuth(body, nonce, secret))
..add(nonce.decode());
return b.toBytes();
}
Future<Uint8List> decryptNoAuthWithNonce(
Uint8List body, SharedSecret secret) async {
if (body.length <= Nonce.decodedLength()) {
throw const FormatException('not enough data to decrypt');
}
final nonce =
Nonce.fromBytes(body.sublist(body.length - Nonce.decodedLength()));
final encryptedData = body.sublist(0, body.length - Nonce.decodedLength());
// decrypt
return cryptNoAuth(encryptedData, nonce, secret);
}
Future<Uint8List> encryptNoAuthWithPassword(
Uint8List body, String password) async {
final ekbytes = Uint8List.fromList(utf8.encode(password));
final nonce = await randomNonce();
final saltBytes = nonce.decode();
final sharedSecret = await deriveSharedSecret(ekbytes, saltBytes);
return (await cryptNoAuth(body, nonce, sharedSecret))..addAll(saltBytes);
}
Future<Uint8List> decryptNoAuthWithPassword(
Uint8List body, String password) async {
if (body.length <= Nonce.decodedLength()) {
throw const FormatException('not enough data to decrypt');
}
final ekbytes = Uint8List.fromList(utf8.encode(password));
final bodyBytes = body.sublist(0, body.length - Nonce.decodedLength());
final saltBytes = body.sublist(body.length - Nonce.decodedLength());
final nonce = Nonce.fromBytes(saltBytes);
final sharedSecret = await deriveSharedSecret(ekbytes, saltBytes);
return cryptNoAuth(bodyBytes, nonce, sharedSecret);
}
} }

View File

@ -866,8 +866,8 @@ PeerStats _$PeerStatsFromJson(Map<String, dynamic> json) {
mixin _$PeerStats { mixin _$PeerStats {
Timestamp get timeAdded => throw _privateConstructorUsedError; Timestamp get timeAdded => throw _privateConstructorUsedError;
RPCStats get rpcStats => throw _privateConstructorUsedError; RPCStats get rpcStats => throw _privateConstructorUsedError;
LatencyStats? get latency => throw _privateConstructorUsedError;
TransferStatsDownUp get transfer => throw _privateConstructorUsedError; TransferStatsDownUp get transfer => throw _privateConstructorUsedError;
LatencyStats? get latency => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
@ -883,12 +883,12 @@ abstract class $PeerStatsCopyWith<$Res> {
$Res call( $Res call(
{Timestamp timeAdded, {Timestamp timeAdded,
RPCStats rpcStats, RPCStats rpcStats,
LatencyStats? latency, TransferStatsDownUp transfer,
TransferStatsDownUp transfer}); LatencyStats? latency});
$RPCStatsCopyWith<$Res> get rpcStats; $RPCStatsCopyWith<$Res> get rpcStats;
$LatencyStatsCopyWith<$Res>? get latency;
$TransferStatsDownUpCopyWith<$Res> get transfer; $TransferStatsDownUpCopyWith<$Res> get transfer;
$LatencyStatsCopyWith<$Res>? get latency;
} }
/// @nodoc /// @nodoc
@ -906,8 +906,8 @@ class _$PeerStatsCopyWithImpl<$Res, $Val extends PeerStats>
$Res call({ $Res call({
Object? timeAdded = null, Object? timeAdded = null,
Object? rpcStats = null, Object? rpcStats = null,
Object? latency = freezed,
Object? transfer = null, Object? transfer = null,
Object? latency = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
timeAdded: null == timeAdded timeAdded: null == timeAdded
@ -918,14 +918,14 @@ class _$PeerStatsCopyWithImpl<$Res, $Val extends PeerStats>
? _value.rpcStats ? _value.rpcStats
: rpcStats // ignore: cast_nullable_to_non_nullable : rpcStats // ignore: cast_nullable_to_non_nullable
as RPCStats, as RPCStats,
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
transfer: null == transfer transfer: null == transfer
? _value.transfer ? _value.transfer
: transfer // ignore: cast_nullable_to_non_nullable : transfer // ignore: cast_nullable_to_non_nullable
as TransferStatsDownUp, as TransferStatsDownUp,
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
) as $Val); ) as $Val);
} }
@ -937,6 +937,14 @@ class _$PeerStatsCopyWithImpl<$Res, $Val extends PeerStats>
}); });
} }
@override
@pragma('vm:prefer-inline')
$TransferStatsDownUpCopyWith<$Res> get transfer {
return $TransferStatsDownUpCopyWith<$Res>(_value.transfer, (value) {
return _then(_value.copyWith(transfer: value) as $Val);
});
}
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LatencyStatsCopyWith<$Res>? get latency { $LatencyStatsCopyWith<$Res>? get latency {
@ -948,14 +956,6 @@ class _$PeerStatsCopyWithImpl<$Res, $Val extends PeerStats>
return _then(_value.copyWith(latency: value) as $Val); return _then(_value.copyWith(latency: value) as $Val);
}); });
} }
@override
@pragma('vm:prefer-inline')
$TransferStatsDownUpCopyWith<$Res> get transfer {
return $TransferStatsDownUpCopyWith<$Res>(_value.transfer, (value) {
return _then(_value.copyWith(transfer: value) as $Val);
});
}
} }
/// @nodoc /// @nodoc
@ -968,15 +968,15 @@ abstract class _$$_PeerStatsCopyWith<$Res> implements $PeerStatsCopyWith<$Res> {
$Res call( $Res call(
{Timestamp timeAdded, {Timestamp timeAdded,
RPCStats rpcStats, RPCStats rpcStats,
LatencyStats? latency, TransferStatsDownUp transfer,
TransferStatsDownUp transfer}); LatencyStats? latency});
@override @override
$RPCStatsCopyWith<$Res> get rpcStats; $RPCStatsCopyWith<$Res> get rpcStats;
@override @override
$LatencyStatsCopyWith<$Res>? get latency;
@override
$TransferStatsDownUpCopyWith<$Res> get transfer; $TransferStatsDownUpCopyWith<$Res> get transfer;
@override
$LatencyStatsCopyWith<$Res>? get latency;
} }
/// @nodoc /// @nodoc
@ -992,8 +992,8 @@ class __$$_PeerStatsCopyWithImpl<$Res>
$Res call({ $Res call({
Object? timeAdded = null, Object? timeAdded = null,
Object? rpcStats = null, Object? rpcStats = null,
Object? latency = freezed,
Object? transfer = null, Object? transfer = null,
Object? latency = freezed,
}) { }) {
return _then(_$_PeerStats( return _then(_$_PeerStats(
timeAdded: null == timeAdded timeAdded: null == timeAdded
@ -1004,14 +1004,14 @@ class __$$_PeerStatsCopyWithImpl<$Res>
? _value.rpcStats ? _value.rpcStats
: rpcStats // ignore: cast_nullable_to_non_nullable : rpcStats // ignore: cast_nullable_to_non_nullable
as RPCStats, as RPCStats,
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
transfer: null == transfer transfer: null == transfer
? _value.transfer ? _value.transfer
: transfer // ignore: cast_nullable_to_non_nullable : transfer // ignore: cast_nullable_to_non_nullable
as TransferStatsDownUp, as TransferStatsDownUp,
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
)); ));
} }
} }
@ -1022,8 +1022,8 @@ class _$_PeerStats implements _PeerStats {
const _$_PeerStats( const _$_PeerStats(
{required this.timeAdded, {required this.timeAdded,
required this.rpcStats, required this.rpcStats,
this.latency, required this.transfer,
required this.transfer}); this.latency});
factory _$_PeerStats.fromJson(Map<String, dynamic> json) => factory _$_PeerStats.fromJson(Map<String, dynamic> json) =>
_$$_PeerStatsFromJson(json); _$$_PeerStatsFromJson(json);
@ -1033,13 +1033,13 @@ class _$_PeerStats implements _PeerStats {
@override @override
final RPCStats rpcStats; final RPCStats rpcStats;
@override @override
final LatencyStats? latency;
@override
final TransferStatsDownUp transfer; final TransferStatsDownUp transfer;
@override
final LatencyStats? latency;
@override @override
String toString() { String toString() {
return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, latency: $latency, transfer: $transfer)'; return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, latency: $latency)';
} }
@override @override
@ -1051,15 +1051,15 @@ class _$_PeerStats implements _PeerStats {
other.timeAdded == timeAdded) && other.timeAdded == timeAdded) &&
(identical(other.rpcStats, rpcStats) || (identical(other.rpcStats, rpcStats) ||
other.rpcStats == rpcStats) && other.rpcStats == rpcStats) &&
(identical(other.latency, latency) || other.latency == latency) &&
(identical(other.transfer, transfer) || (identical(other.transfer, transfer) ||
other.transfer == transfer)); other.transfer == transfer) &&
(identical(other.latency, latency) || other.latency == latency));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => int get hashCode =>
Object.hash(runtimeType, timeAdded, rpcStats, latency, transfer); Object.hash(runtimeType, timeAdded, rpcStats, transfer, latency);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -1079,8 +1079,8 @@ abstract class _PeerStats implements PeerStats {
const factory _PeerStats( const factory _PeerStats(
{required final Timestamp timeAdded, {required final Timestamp timeAdded,
required final RPCStats rpcStats, required final RPCStats rpcStats,
final LatencyStats? latency, required final TransferStatsDownUp transfer,
required final TransferStatsDownUp transfer}) = _$_PeerStats; final LatencyStats? latency}) = _$_PeerStats;
factory _PeerStats.fromJson(Map<String, dynamic> json) = factory _PeerStats.fromJson(Map<String, dynamic> json) =
_$_PeerStats.fromJson; _$_PeerStats.fromJson;
@ -1090,10 +1090,10 @@ abstract class _PeerStats implements PeerStats {
@override @override
RPCStats get rpcStats; RPCStats get rpcStats;
@override @override
LatencyStats? get latency;
@override
TransferStatsDownUp get transfer; TransferStatsDownUp get transfer;
@override @override
LatencyStats? get latency;
@override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$_PeerStatsCopyWith<_$_PeerStats> get copyWith => _$$_PeerStatsCopyWith<_$_PeerStats> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@ -1335,11 +1335,11 @@ mixin _$VeilidUpdate {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -1361,11 +1361,11 @@ mixin _$VeilidUpdate {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1386,11 +1386,11 @@ mixin _$VeilidUpdate {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1562,11 +1562,11 @@ class _$VeilidLog implements VeilidLog {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -1591,11 +1591,11 @@ class _$VeilidLog implements VeilidLog {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1619,11 +1619,11 @@ class _$VeilidLog implements VeilidLog {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1725,8 +1725,8 @@ abstract class _$$VeilidAppMessageCopyWith<$Res> {
__$$VeilidAppMessageCopyWithImpl<$Res>; __$$VeilidAppMessageCopyWithImpl<$Res>;
@useResult @useResult
$Res call( $Res call(
{Typed<FixedEncodedString43>? sender, {@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message}); Typed<FixedEncodedString43>? sender});
} }
/// @nodoc /// @nodoc
@ -1740,18 +1740,18 @@ class __$$VeilidAppMessageCopyWithImpl<$Res>
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
Object? sender = freezed,
Object? message = null, Object? message = null,
Object? sender = freezed,
}) { }) {
return _then(_$VeilidAppMessage( return _then(_$VeilidAppMessage(
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
message: null == message message: null == message
? _value.message ? _value.message
: message // ignore: cast_nullable_to_non_nullable : message // ignore: cast_nullable_to_non_nullable
as Uint8List, as Uint8List,
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
)); ));
} }
} }
@ -1760,26 +1760,26 @@ class __$$VeilidAppMessageCopyWithImpl<$Res>
@JsonSerializable() @JsonSerializable()
class _$VeilidAppMessage implements VeilidAppMessage { class _$VeilidAppMessage implements VeilidAppMessage {
const _$VeilidAppMessage( const _$VeilidAppMessage(
{this.sender, {@Uint8ListJsonConverter() required this.message,
@Uint8ListJsonConverter() required this.message, this.sender,
final String? $type}) final String? $type})
: $type = $type ?? 'AppMessage'; : $type = $type ?? 'AppMessage';
factory _$VeilidAppMessage.fromJson(Map<String, dynamic> json) => factory _$VeilidAppMessage.fromJson(Map<String, dynamic> json) =>
_$$VeilidAppMessageFromJson(json); _$$VeilidAppMessageFromJson(json);
@override
final Typed<FixedEncodedString43>? sender;
@override @override
@Uint8ListJsonConverter() @Uint8ListJsonConverter()
final Uint8List message; final Uint8List message;
@override
final Typed<FixedEncodedString43>? sender;
@JsonKey(name: 'kind') @JsonKey(name: 'kind')
final String $type; final String $type;
@override @override
String toString() { String toString() {
return 'VeilidUpdate.appMessage(sender: $sender, message: $message)'; return 'VeilidUpdate.appMessage(message: $message, sender: $sender)';
} }
@override @override
@ -1787,14 +1787,14 @@ class _$VeilidAppMessage implements VeilidAppMessage {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$VeilidAppMessage && other is _$VeilidAppMessage &&
(identical(other.sender, sender) || other.sender == sender) && const DeepCollectionEquality().equals(other.message, message) &&
const DeepCollectionEquality().equals(other.message, message)); (identical(other.sender, sender) || other.sender == sender));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, sender, const DeepCollectionEquality().hash(message)); runtimeType, const DeepCollectionEquality().hash(message), sender);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -1808,11 +1808,11 @@ class _$VeilidAppMessage implements VeilidAppMessage {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -1828,7 +1828,7 @@ class _$VeilidAppMessage implements VeilidAppMessage {
List<ValueSubkeyRange> subkeys, int count, ValueData valueData) List<ValueSubkeyRange> subkeys, int count, ValueData valueData)
valueChange, valueChange,
}) { }) {
return appMessage(sender, message); return appMessage(message, sender);
} }
@override @override
@ -1837,11 +1837,11 @@ class _$VeilidAppMessage implements VeilidAppMessage {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1856,7 +1856,7 @@ class _$VeilidAppMessage implements VeilidAppMessage {
List<ValueSubkeyRange> subkeys, int count, ValueData valueData)? List<ValueSubkeyRange> subkeys, int count, ValueData valueData)?
valueChange, valueChange,
}) { }) {
return appMessage?.call(sender, message); return appMessage?.call(message, sender);
} }
@override @override
@ -1865,11 +1865,11 @@ class _$VeilidAppMessage implements VeilidAppMessage {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -1886,7 +1886,7 @@ class _$VeilidAppMessage implements VeilidAppMessage {
required TResult orElse(), required TResult orElse(),
}) { }) {
if (appMessage != null) { if (appMessage != null) {
return appMessage(sender, message); return appMessage(message, sender);
} }
return orElse(); return orElse();
} }
@ -1950,16 +1950,15 @@ class _$VeilidAppMessage implements VeilidAppMessage {
abstract class VeilidAppMessage implements VeilidUpdate { abstract class VeilidAppMessage implements VeilidUpdate {
const factory VeilidAppMessage( const factory VeilidAppMessage(
{final Typed<FixedEncodedString43>? sender, {@Uint8ListJsonConverter() required final Uint8List message,
@Uint8ListJsonConverter() required final Uint8List message}) = final Typed<FixedEncodedString43>? sender}) = _$VeilidAppMessage;
_$VeilidAppMessage;
factory VeilidAppMessage.fromJson(Map<String, dynamic> json) = factory VeilidAppMessage.fromJson(Map<String, dynamic> json) =
_$VeilidAppMessage.fromJson; _$VeilidAppMessage.fromJson;
Typed<FixedEncodedString43>? get sender;
@Uint8ListJsonConverter() @Uint8ListJsonConverter()
Uint8List get message; Uint8List get message;
Typed<FixedEncodedString43>? get sender;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$VeilidAppMessageCopyWith<_$VeilidAppMessage> get copyWith => _$$VeilidAppMessageCopyWith<_$VeilidAppMessage> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@ -1972,9 +1971,9 @@ abstract class _$$VeilidAppCallCopyWith<$Res> {
__$$VeilidAppCallCopyWithImpl<$Res>; __$$VeilidAppCallCopyWithImpl<$Res>;
@useResult @useResult
$Res call( $Res call(
{Typed<FixedEncodedString43>? sender, {@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId,
String callId}); Typed<FixedEncodedString43>? sender});
} }
/// @nodoc /// @nodoc
@ -1988,15 +1987,11 @@ class __$$VeilidAppCallCopyWithImpl<$Res>
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
Object? sender = freezed,
Object? message = null, Object? message = null,
Object? callId = null, Object? callId = null,
Object? sender = freezed,
}) { }) {
return _then(_$VeilidAppCall( return _then(_$VeilidAppCall(
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
message: null == message message: null == message
? _value.message ? _value.message
: message // ignore: cast_nullable_to_non_nullable : message // ignore: cast_nullable_to_non_nullable
@ -2005,6 +2000,10 @@ class __$$VeilidAppCallCopyWithImpl<$Res>
? _value.callId ? _value.callId
: callId // ignore: cast_nullable_to_non_nullable : callId // ignore: cast_nullable_to_non_nullable
as String, as String,
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
)); ));
} }
} }
@ -2013,29 +2012,29 @@ class __$$VeilidAppCallCopyWithImpl<$Res>
@JsonSerializable() @JsonSerializable()
class _$VeilidAppCall implements VeilidAppCall { class _$VeilidAppCall implements VeilidAppCall {
const _$VeilidAppCall( const _$VeilidAppCall(
{this.sender, {@Uint8ListJsonConverter() required this.message,
@Uint8ListJsonConverter() required this.message,
required this.callId, required this.callId,
this.sender,
final String? $type}) final String? $type})
: $type = $type ?? 'AppCall'; : $type = $type ?? 'AppCall';
factory _$VeilidAppCall.fromJson(Map<String, dynamic> json) => factory _$VeilidAppCall.fromJson(Map<String, dynamic> json) =>
_$$VeilidAppCallFromJson(json); _$$VeilidAppCallFromJson(json);
@override
final Typed<FixedEncodedString43>? sender;
@override @override
@Uint8ListJsonConverter() @Uint8ListJsonConverter()
final Uint8List message; final Uint8List message;
@override @override
final String callId; final String callId;
@override
final Typed<FixedEncodedString43>? sender;
@JsonKey(name: 'kind') @JsonKey(name: 'kind')
final String $type; final String $type;
@override @override
String toString() { String toString() {
return 'VeilidUpdate.appCall(sender: $sender, message: $message, callId: $callId)'; return 'VeilidUpdate.appCall(message: $message, callId: $callId, sender: $sender)';
} }
@override @override
@ -2043,15 +2042,15 @@ class _$VeilidAppCall implements VeilidAppCall {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$VeilidAppCall && other is _$VeilidAppCall &&
(identical(other.sender, sender) || other.sender == sender) &&
const DeepCollectionEquality().equals(other.message, message) && const DeepCollectionEquality().equals(other.message, message) &&
(identical(other.callId, callId) || other.callId == callId)); (identical(other.callId, callId) || other.callId == callId) &&
(identical(other.sender, sender) || other.sender == sender));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, sender, int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(message), callId); const DeepCollectionEquality().hash(message), callId, sender);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@ -2065,11 +2064,11 @@ class _$VeilidAppCall implements VeilidAppCall {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -2085,7 +2084,7 @@ class _$VeilidAppCall implements VeilidAppCall {
List<ValueSubkeyRange> subkeys, int count, ValueData valueData) List<ValueSubkeyRange> subkeys, int count, ValueData valueData)
valueChange, valueChange,
}) { }) {
return appCall(sender, message, callId); return appCall(message, callId, sender);
} }
@override @override
@ -2094,11 +2093,11 @@ class _$VeilidAppCall implements VeilidAppCall {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2113,7 +2112,7 @@ class _$VeilidAppCall implements VeilidAppCall {
List<ValueSubkeyRange> subkeys, int count, ValueData valueData)? List<ValueSubkeyRange> subkeys, int count, ValueData valueData)?
valueChange, valueChange,
}) { }) {
return appCall?.call(sender, message, callId); return appCall?.call(message, callId, sender);
} }
@override @override
@ -2122,11 +2121,11 @@ class _$VeilidAppCall implements VeilidAppCall {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2143,7 +2142,7 @@ class _$VeilidAppCall implements VeilidAppCall {
required TResult orElse(), required TResult orElse(),
}) { }) {
if (appCall != null) { if (appCall != null) {
return appCall(sender, message, callId); return appCall(message, callId, sender);
} }
return orElse(); return orElse();
} }
@ -2207,17 +2206,17 @@ class _$VeilidAppCall implements VeilidAppCall {
abstract class VeilidAppCall implements VeilidUpdate { abstract class VeilidAppCall implements VeilidUpdate {
const factory VeilidAppCall( const factory VeilidAppCall(
{final Typed<FixedEncodedString43>? sender, {@Uint8ListJsonConverter() required final Uint8List message,
@Uint8ListJsonConverter() required final Uint8List message, required final String callId,
required final String callId}) = _$VeilidAppCall; final Typed<FixedEncodedString43>? sender}) = _$VeilidAppCall;
factory VeilidAppCall.fromJson(Map<String, dynamic> json) = factory VeilidAppCall.fromJson(Map<String, dynamic> json) =
_$VeilidAppCall.fromJson; _$VeilidAppCall.fromJson;
Typed<FixedEncodedString43>? get sender;
@Uint8ListJsonConverter() @Uint8ListJsonConverter()
Uint8List get message; Uint8List get message;
String get callId; String get callId;
Typed<FixedEncodedString43>? get sender;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$VeilidAppCallCopyWith<_$VeilidAppCall> get copyWith => _$$VeilidAppCallCopyWith<_$VeilidAppCall> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@ -2325,11 +2324,11 @@ class _$VeilidUpdateAttachment implements VeilidUpdateAttachment {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -2354,11 +2353,11 @@ class _$VeilidUpdateAttachment implements VeilidUpdateAttachment {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2382,11 +2381,11 @@ class _$VeilidUpdateAttachment implements VeilidUpdateAttachment {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2595,11 +2594,11 @@ class _$VeilidUpdateNetwork implements VeilidUpdateNetwork {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -2624,11 +2623,11 @@ class _$VeilidUpdateNetwork implements VeilidUpdateNetwork {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2652,11 +2651,11 @@ class _$VeilidUpdateNetwork implements VeilidUpdateNetwork {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2840,11 +2839,11 @@ class _$VeilidUpdateConfig implements VeilidUpdateConfig {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -2869,11 +2868,11 @@ class _$VeilidUpdateConfig implements VeilidUpdateConfig {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -2897,11 +2896,11 @@ class _$VeilidUpdateConfig implements VeilidUpdateConfig {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -3099,11 +3098,11 @@ class _$VeilidUpdateRouteChange implements VeilidUpdateRouteChange {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -3128,11 +3127,11 @@ class _$VeilidUpdateRouteChange implements VeilidUpdateRouteChange {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -3156,11 +3155,11 @@ class _$VeilidUpdateRouteChange implements VeilidUpdateRouteChange {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -3383,11 +3382,11 @@ class _$VeilidUpdateValueChange implements VeilidUpdateValueChange {
required TResult Function( required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace) VeilidLogLevel logLevel, String message, String? backtrace)
log, log,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message) Typed<FixedEncodedString43>? sender)
appMessage, appMessage,
required TResult Function(Typed<FixedEncodedString43>? sender, required TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId) String callId, Typed<FixedEncodedString43>? sender)
appCall, appCall,
required TResult Function(AttachmentState state, bool publicInternetReady, required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady) bool localNetworkReady)
@ -3412,11 +3411,11 @@ class _$VeilidUpdateValueChange implements VeilidUpdateValueChange {
TResult? Function( TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult? Function(Typed<FixedEncodedString43>? sender, TResult? Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message, String callId)? String callId, Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult? Function(AttachmentState state, bool publicInternetReady, TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?
@ -3440,11 +3439,11 @@ class _$VeilidUpdateValueChange implements VeilidUpdateValueChange {
TResult Function( TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)? VeilidLogLevel logLevel, String message, String? backtrace)?
log, log,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter() Uint8List message)? Typed<FixedEncodedString43>? sender)?
appMessage, appMessage,
TResult Function(Typed<FixedEncodedString43>? sender, TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
@Uint8ListJsonConverter() Uint8List message, String callId)? Typed<FixedEncodedString43>? sender)?
appCall, appCall,
TResult Function(AttachmentState state, bool publicInternetReady, TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)? bool localNetworkReady)?

View File

@ -39,8 +39,8 @@ Map<String, dynamic> _$$_TransferStatsToJson(_$_TransferStats instance) =>
_$_TransferStatsDownUp _$$_TransferStatsDownUpFromJson( _$_TransferStatsDownUp _$$_TransferStatsDownUpFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_TransferStatsDownUp( _$_TransferStatsDownUp(
down: TransferStats.fromJson(json['down'] as Map<String, dynamic>), down: TransferStats.fromJson(json['down']),
up: TransferStats.fromJson(json['up'] as Map<String, dynamic>), up: TransferStats.fromJson(json['up']),
); );
Map<String, dynamic> _$$_TransferStatsDownUpToJson( Map<String, dynamic> _$$_TransferStatsDownUpToJson(
@ -81,20 +81,19 @@ Map<String, dynamic> _$$_RPCStatsToJson(_$_RPCStats instance) =>
_$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats( _$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats(
timeAdded: Timestamp.fromJson(json['time_added']), timeAdded: Timestamp.fromJson(json['time_added']),
rpcStats: RPCStats.fromJson(json['rpc_stats'] as Map<String, dynamic>), rpcStats: RPCStats.fromJson(json['rpc_stats']),
transfer: TransferStatsDownUp.fromJson(json['transfer']),
latency: json['latency'] == null latency: json['latency'] == null
? null ? null
: LatencyStats.fromJson(json['latency'] as Map<String, dynamic>), : LatencyStats.fromJson(json['latency']),
transfer: TransferStatsDownUp.fromJson(
json['transfer'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_PeerStatsToJson(_$_PeerStats 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(),
'latency': instance.latency?.toJson(),
'transfer': instance.transfer.toJson(), 'transfer': instance.transfer.toJson(),
'latency': instance.latency?.toJson(),
}; };
_$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) => _$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
@ -103,7 +102,7 @@ _$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
.map(Typed<FixedEncodedString43>.fromJson) .map(Typed<FixedEncodedString43>.fromJson)
.toList(), .toList(),
peerAddress: json['peer_address'] as String, peerAddress: json['peer_address'] as String,
peerStats: PeerStats.fromJson(json['peer_stats'] as Map<String, dynamic>), peerStats: PeerStats.fromJson(json['peer_stats']),
); );
Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) => Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) =>
@ -114,7 +113,7 @@ Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) =>
}; };
_$VeilidLog _$$VeilidLogFromJson(Map<String, dynamic> json) => _$VeilidLog( _$VeilidLog _$$VeilidLogFromJson(Map<String, dynamic> json) => _$VeilidLog(
logLevel: VeilidLogLevel.fromJson(json['log_level'] as String), 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?,
@ -130,44 +129,44 @@ Map<String, dynamic> _$$VeilidLogToJson(_$VeilidLog instance) =>
_$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) => _$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) =>
_$VeilidAppMessage( _$VeilidAppMessage(
message:
const Uint8ListJsonConverter().fromJson(json['message'] as String),
sender: json['sender'] == null sender: json['sender'] == null
? null ? null
: Typed<FixedEncodedString43>.fromJson(json['sender']), : Typed<FixedEncodedString43>.fromJson(json['sender']),
message:
const Uint8ListJsonConverter().fromJson(json['message'] as String),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidAppMessageToJson(_$VeilidAppMessage instance) => Map<String, dynamic> _$$VeilidAppMessageToJson(_$VeilidAppMessage instance) =>
<String, dynamic>{ <String, dynamic>{
'sender': instance.sender?.toJson(),
'message': const Uint8ListJsonConverter().toJson(instance.message), 'message': const Uint8ListJsonConverter().toJson(instance.message),
'sender': instance.sender?.toJson(),
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) => _$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) =>
_$VeilidAppCall( _$VeilidAppCall(
sender: json['sender'] == null
? null
: Typed<FixedEncodedString43>.fromJson(json['sender']),
message: message:
const Uint8ListJsonConverter().fromJson(json['message'] as String), const Uint8ListJsonConverter().fromJson(json['message'] as String),
callId: json['call_id'] as String, callId: json['call_id'] as String,
sender: json['sender'] == null
? null
: Typed<FixedEncodedString43>.fromJson(json['sender']),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) => Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) =>
<String, dynamic>{ <String, dynamic>{
'sender': instance.sender?.toJson(),
'message': const Uint8ListJsonConverter().toJson(instance.message), 'message': const Uint8ListJsonConverter().toJson(instance.message),
'call_id': instance.callId, 'call_id': instance.callId,
'sender': instance.sender?.toJson(),
'kind': instance.$type, 'kind': instance.$type,
}; };
_$VeilidUpdateAttachment _$$VeilidUpdateAttachmentFromJson( _$VeilidUpdateAttachment _$$VeilidUpdateAttachmentFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VeilidUpdateAttachment( _$VeilidUpdateAttachment(
state: AttachmentState.fromJson(json['state'] as String), 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?,
@ -188,9 +187,8 @@ _$VeilidUpdateNetwork _$$VeilidUpdateNetworkFromJson(
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),
peers: (json['peers'] as List<dynamic>) peers:
.map((e) => PeerTableData.fromJson(e as Map<String, dynamic>)) (json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
.toList(),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
@ -206,7 +204,7 @@ Map<String, dynamic> _$$VeilidUpdateNetworkToJson(
_$VeilidUpdateConfig _$$VeilidUpdateConfigFromJson(Map<String, dynamic> json) => _$VeilidUpdateConfig _$$VeilidUpdateConfigFromJson(Map<String, dynamic> json) =>
_$VeilidUpdateConfig( _$VeilidUpdateConfig(
config: VeilidConfig.fromJson(json['config'] as Map<String, dynamic>), config: VeilidConfig.fromJson(json['config']),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
@ -242,10 +240,10 @@ _$VeilidUpdateValueChange _$$VeilidUpdateValueChangeFromJson(
_$VeilidUpdateValueChange( _$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((e) => ValueSubkeyRange.fromJson(e as Map<String, dynamic>)) .map(ValueSubkeyRange.fromJson)
.toList(), .toList(),
count: json['count'] as int, count: json['count'] as int,
valueData: ValueData.fromJson(json['value_data'] as Map<String, dynamic>), valueData: ValueData.fromJson(json['value_data']),
$type: json['kind'] as String?, $type: json['kind'] as String?,
); );
@ -262,7 +260,7 @@ Map<String, dynamic> _$$VeilidUpdateValueChangeToJson(
_$_VeilidStateAttachment _$$_VeilidStateAttachmentFromJson( _$_VeilidStateAttachment _$$_VeilidStateAttachmentFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$_VeilidStateAttachment( _$_VeilidStateAttachment(
state: AttachmentState.fromJson(json['state'] as String), 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,
); );
@ -281,9 +279,8 @@ _$_VeilidStateNetwork _$$_VeilidStateNetworkFromJson(
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),
peers: (json['peers'] as List<dynamic>) peers:
.map((e) => PeerTableData.fromJson(e as Map<String, dynamic>)) (json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
.toList(),
); );
Map<String, dynamic> _$$_VeilidStateNetworkToJson( Map<String, dynamic> _$$_VeilidStateNetworkToJson(
@ -297,7 +294,7 @@ Map<String, dynamic> _$$_VeilidStateNetworkToJson(
_$_VeilidStateConfig _$$_VeilidStateConfigFromJson(Map<String, dynamic> json) => _$_VeilidStateConfig _$$_VeilidStateConfigFromJson(Map<String, dynamic> json) =>
_$_VeilidStateConfig( _$_VeilidStateConfig(
config: VeilidConfig.fromJson(json['config'] as Map<String, dynamic>), config: VeilidConfig.fromJson(json['config']),
); );
Map<String, dynamic> _$$_VeilidStateConfigToJson( Map<String, dynamic> _$$_VeilidStateConfigToJson(
@ -308,12 +305,9 @@ Map<String, dynamic> _$$_VeilidStateConfigToJson(
_$_VeilidState _$$_VeilidStateFromJson(Map<String, dynamic> json) => _$_VeilidState _$$_VeilidStateFromJson(Map<String, dynamic> json) =>
_$_VeilidState( _$_VeilidState(
attachment: VeilidStateAttachment.fromJson( attachment: VeilidStateAttachment.fromJson(json['attachment']),
json['attachment'] as Map<String, dynamic>), network: VeilidStateNetwork.fromJson(json['network']),
network: config: VeilidStateConfig.fromJson(json['config']),
VeilidStateNetwork.fromJson(json['network'] as Map<String, dynamic>),
config:
VeilidStateConfig.fromJson(json['config'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$_VeilidStateToJson(_$_VeilidState instance) => Map<String, dynamic> _$$_VeilidStateToJson(_$_VeilidState instance) =>

View File

@ -13,6 +13,7 @@ dependencies:
charcode: ^1.3.1 charcode: ^1.3.1
equatable: ^2.0.5 equatable: ^2.0.5
ffi: ^2.0.0 ffi: ^2.0.0
fixnum: ^1.1.0
flutter: flutter:
sdk: flutter sdk: flutter
flutter_web_plugins: flutter_web_plugins: