From 1a73aacabaa175eb6865934225f045c82b257662 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 24 Jul 2024 14:04:27 +0200 Subject: [PATCH 01/27] Flutter dapp now uses WalletConnectModal to connect --- CHANGELOG.md | 4 + example/dapp/ios/Podfile.lock | 12 + example/dapp/lib/main.dart | 6 +- example/dapp/lib/pages/auth_page.dart | 3 +- example/dapp/lib/pages/connect_page.dart | 367 ++++++++++-------- example/dapp/lib/pages/pairings_page.dart | 3 +- example/dapp/lib/pages/sessions_page.dart | 4 +- example/dapp/lib/utils/crypto/eip155.dart | 4 +- example/dapp/lib/utils/crypto/polkadot.dart | 2 +- example/dapp/lib/utils/crypto/solana.dart | 2 +- example/dapp/lib/widgets/auth_item.dart | 3 +- example/dapp/lib/widgets/chain_button.dart | 8 +- example/dapp/lib/widgets/pairing_item.dart | 4 +- example/dapp/lib/widgets/session_item.dart | 4 +- example/dapp/lib/widgets/session_widget.dart | 4 +- example/dapp/pubspec.yaml | 7 +- .../lib/src/qr_code_scanner.dart | 2 + .../lib/src/qr_scanner_overlay_shape.dart | 2 + .../lib/src/web/flutter_qr_web.dart | 16 +- ...de_scanner_dialog_method_channel_test.dart | 2 + lib/apis/utils/walletconnect_utils.dart | 25 +- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- 23 files changed, 299 insertions(+), 189 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c5a15d1..69578656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.1-beta01 + +- Minor changes + ## 2.3.0 - One-Click Auth support diff --git a/example/dapp/ios/Podfile.lock b/example/dapp/ios/Podfile.lock index 1e98c531..8279be30 100644 --- a/example/dapp/ios/Podfile.lock +++ b/example/dapp/ios/Podfile.lock @@ -1,5 +1,9 @@ PODS: + - appcheck (1.0.3): + - Flutter - Flutter (1.0.0) + - flutter_keyboard_visibility (0.0.1): + - Flutter - package_info_plus (0.4.5): - Flutter - shared_preferences_foundation (0.0.1): @@ -9,14 +13,20 @@ PODS: - Flutter DEPENDENCIES: + - appcheck (from `.symlinks/plugins/appcheck/ios`) - Flutter (from `Flutter`) + - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) EXTERNAL SOURCES: + appcheck: + :path: ".symlinks/plugins/appcheck/ios" Flutter: :path: Flutter + flutter_keyboard_visibility: + :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" shared_preferences_foundation: @@ -25,7 +35,9 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: + appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe diff --git a/example/dapp/lib/main.dart b/example/dapp/lib/main.dart index 29b1c375..50823a50 100644 --- a/example/dapp/lib/main.dart +++ b/example/dapp/lib/main.dart @@ -1,7 +1,8 @@ import 'dart:convert'; import 'dart:developer'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; +import 'package:flutter/material.dart'; + import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; import 'package:walletconnect_flutter_v2_dapp/models/page_data.dart'; import 'package:walletconnect_flutter_v2_dapp/pages/auth_page.dart'; @@ -9,13 +10,14 @@ import 'package:walletconnect_flutter_v2_dapp/pages/connect_page.dart'; import 'package:walletconnect_flutter_v2_dapp/pages/pairings_page.dart'; import 'package:walletconnect_flutter_v2_dapp/pages/sessions_page.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; -import 'package:flutter/material.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/chain_data.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/helpers.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/dart_defines.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/string_constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/event_widget.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; + void main() { runApp(const MyApp()); } diff --git a/example/dapp/lib/pages/auth_page.dart b/example/dapp/lib/pages/auth_page.dart index d6c5d28e..5ec10474 100644 --- a/example/dapp/lib/pages/auth_page.dart +++ b/example/dapp/lib/pages/auth_page.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/auth_item.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; class AuthPage extends StatefulWidget { const AuthPage({ diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 7c67759f..73a6e258 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -8,7 +8,7 @@ import 'package:flutter/services.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:url_launcher/url_launcher_string.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/chain_data.dart'; @@ -17,6 +17,8 @@ import 'package:walletconnect_flutter_v2_dapp/utils/crypto/polkadot.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/solana.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/string_constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/chain_button.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; +import 'package:walletconnect_modal_flutter/walletconnect_modal_flutter.dart'; class ConnectPage extends StatefulWidget { const ConnectPage({ @@ -34,10 +36,24 @@ class ConnectPageState extends State { bool _testnetOnly = false; final List _selectedChains = []; bool _shouldDismissQrCode = true; + bool _initialized = false; + late IWalletConnectModalService _walletConnectModalService; @override void initState() { super.initState(); + _initializeWCM(); + } + + Future _initializeWCM() async { + _walletConnectModalService = WalletConnectModalService( + web3App: widget.web3App, + ); + + await _walletConnectModalService.init(); + + setState(() => _initialized = true); + widget.web3App.onSessionConnect.subscribe(_onSessionConnect); } @@ -62,11 +78,10 @@ class ConnectPageState extends State { _selectedChains.add(chain); } _updateNamespaces(); - - debugPrint('[SampleDapp] ${jsonEncode(optionalNamespaces)}'); }); } + Map requiredNamespaces = {}; Map optionalNamespaces = {}; void _updateNamespaces() { @@ -101,6 +116,31 @@ class ConnectPageState extends State { events: Polkadot.events.values.toList(), ); } + + if (optionalNamespaces.isEmpty) { + requiredNamespaces = {}; + } else { + // WalletConnectModal still requires to have requiredNamespaces + // this has to be changed in that SDK + requiredNamespaces = { + 'eip155': const RequiredNamespace( + chains: ['eip155:1'], + methods: ['personal_sign', 'eth_signTransaction'], + events: ['chainChanged'], + ), + }; + } + + _walletConnectModalService.setRequiredNamespaces( + requiredNamespaces: requiredNamespaces, + ); + debugPrint( + '[SampleDapp] requiredNamespaces ${jsonEncode(requiredNamespaces)}'); + _walletConnectModalService.setOptionalNamespaces( + optionalNamespaces: optionalNamespaces, + ); + debugPrint( + '[SampleDapp] optionalNamespaces ${jsonEncode(optionalNamespaces)}'); } @override @@ -110,11 +150,15 @@ class ConnectPageState extends State { final mainChains = ChainData.allChains.where((e) => !e.isTestnet).toList(); final List chains = _testnetOnly ? testChains : mainChains; - List children = []; + final List evmChainButtons = []; + final List nonEvmChainButtons = []; + + final evmChains = chains.where((e) => e.type == ChainType.eip155); + final nonEvmChains = chains.where((e) => e.type != ChainType.eip155); - for (final ChainMetadata chain in chains) { + for (final ChainMetadata chain in evmChains) { // Build the button - children.add( + evmChainButtons.add( ChainButton( chain: chain, onPressed: () => _selectChain(chain), @@ -123,165 +167,154 @@ class ConnectPageState extends State { ); } - children.add(const SizedBox.square(dimension: 12.0)); - - // Add a connect button - children.add( - ElevatedButton( - onPressed: _selectedChains.isEmpty - ? null - : () => _onConnect(showToast: (m) async { - await showPlatformToast(child: Text(m), context: context); - }, closeModal: () { - if (Navigator.canPop(context)) { - Navigator.of(context).pop(); - } - }), - style: ButtonStyle( - backgroundColor: MaterialStateProperty.resolveWith( - (states) { - if (states.contains(MaterialState.disabled)) { - return StyleConstants.grayColor; - } - return StyleConstants.primaryColor; - }, - ), - minimumSize: MaterialStateProperty.all(const Size( - 1000.0, - StyleConstants.linear48, - )), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - StyleConstants.linear8, - ), - ), - ), - ), - child: const Text( - StringConstants.connect, - style: StyleConstants.buttonText, + for (final ChainMetadata chain in nonEvmChains) { + // Build the button + nonEvmChainButtons.add( + ChainButton( + chain: chain, + onPressed: () => _selectChain(chain), + selected: _selectedChains.contains(chain), ), - ), - ); + ); + } - children.add(const SizedBox(height: 16.0)); - - children.add( - ElevatedButton( - onPressed: _selectedChains.isEmpty - ? null - : () => _oneClickAuth( - closeModal: () { - if (Navigator.canPop(context)) { - Navigator.of(context).pop(); - } - }, - showToast: (message) { - showPlatformToast(child: Text(message), context: context); - }, - ), - style: ButtonStyle( - backgroundColor: MaterialStateProperty.resolveWith( - (states) { - if (states.contains(MaterialState.disabled)) { - return StyleConstants.grayColor; - } - return StyleConstants.primaryColor; - }, - ), - minimumSize: MaterialStateProperty.all(const Size( - 1000.0, - StyleConstants.linear48, - )), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - StyleConstants.linear8, - ), + return ListView( + padding: const EdgeInsets.symmetric(horizontal: StyleConstants.linear8), + children: [ + Column( + children: [ + const Text( + 'Flutter Dapp', + style: StyleConstants.subtitleText, + textAlign: TextAlign.center, ), - ), + FutureBuilder( + future: PackageInfo.fromPlatform(), + builder: (context, snapshot) { + if (!snapshot.hasData) { + return const SizedBox.shrink(); + } + final v = snapshot.data!.version; + final b = snapshot.data!.buildNumber; + const f = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + return Text('$v-$f ($b) - SDK v$packageVersion'); + }, + ), + ], ), - child: const Text( - 'One-Click Auth', - style: StyleConstants.buttonText, + SizedBox( + height: StyleConstants.linear48, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + StringConstants.testnetsOnly, + style: StyleConstants.buttonText, + ), + Switch( + value: _testnetOnly, + onChanged: (value) { + setState(() { + _selectedChains.clear(); + _testnetOnly = value; + }); + }, + ), + ], + ), ), - ), - ); - - children.add(const SizedBox.square(dimension: 12.0)); - - return Center( - child: Container( - padding: const EdgeInsets.all( - StyleConstants.linear8, + const Text('EVM Chains:', style: StyleConstants.buttonText), + const SizedBox(height: StyleConstants.linear8), + Wrap( + spacing: 10.0, + children: evmChainButtons, ), - constraints: const BoxConstraints( - maxWidth: StyleConstants.maxWidth, + const Divider(), + const Text('Non EVM Chains:', style: StyleConstants.buttonText), + Wrap( + spacing: 10.0, + children: nonEvmChainButtons, ), - child: ListView( - children: [ - Column( - children: [ - const Text( - 'Flutter Dapp', - style: StyleConstants.subtitleText, - textAlign: TextAlign.center, - ), - FutureBuilder( - future: PackageInfo.fromPlatform(), - builder: (context, snapshot) { - if (!snapshot.hasData) { - return const SizedBox.shrink(); - } - final v = snapshot.data!.version; - final b = snapshot.data!.buildNumber; - const f = String.fromEnvironment('FLUTTER_APP_FLAVOR'); - return Text('$v-$f ($b) - SDK v$packageVersion'); - }, - ), - ], - ), - const SizedBox( - height: StyleConstants.linear16, - ), + const Divider(), + if (_initialized) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: StyleConstants.linear8), + const Text( + 'Use WalletConnectModal:', + style: StyleConstants.buttonText, + ), + const SizedBox(height: StyleConstants.linear8), + WalletConnectModalConnect( + service: _walletConnectModalService, + width: double.infinity, + height: 50.0, + ), + ], + ), + const SizedBox(height: StyleConstants.linear8), + const Divider(), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: StyleConstants.linear8), const Text( - StringConstants.selectChains, - style: StyleConstants.paragraph, - textAlign: TextAlign.center, - ), - const SizedBox( - height: StyleConstants.linear8, + 'Use custom connection:', + style: StyleConstants.buttonText, ), + const SizedBox(height: StyleConstants.linear8), SizedBox( - height: StyleConstants.linear48, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - StringConstants.testnetsOnly, - style: StyleConstants.buttonText, - ), - Switch( - value: _testnetOnly, - onChanged: (value) { - setState(() { - _selectedChains.clear(); - _testnetOnly = value; - }); - }, - ), - ], + width: double.infinity, + child: ElevatedButton( + style: _buttonStyle, + onPressed: _selectedChains.isEmpty + ? null + : () => _onConnect( + showToast: (m) async { + await showPlatformToast( + child: Text(m), context: context); + }, + closeModal: () { + if (Navigator.canPop(context)) { + Navigator.of(context).pop(); + } + }, + ), + child: const Text( + StringConstants.connect, + style: StyleConstants.buttonText, + ), ), ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: children, + const SizedBox(height: StyleConstants.linear8), + SizedBox( + width: double.infinity, + child: ElevatedButton( + style: _buttonStyle, + onPressed: _selectedChains.isEmpty + ? null + : () => _oneClickAuth( + closeModal: () { + if (Navigator.canPop(context)) { + Navigator.of(context).pop(); + } + }, + showToast: (message) { + showPlatformToast( + child: Text(message), context: context); + }, + ), + child: const Text( + 'One-Click Auth', + style: StyleConstants.buttonText, + ), + ), ), ], ), - ), + const SizedBox(height: StyleConstants.linear16), + ], ); } @@ -307,6 +340,7 @@ class ConnectPageState extends State { // It is currently safer to send chains approvals on optionalNamespaces // but depending on Wallet implementation you may need to send some (for innstance eip155:1) as required final connectResponse = await widget.web3App.connect( + requiredNamespaces: requiredNamespaces, optionalNamespaces: optionalNamespaces, ); @@ -432,7 +466,7 @@ class ConnectPageState extends State { final authResponse = await widget.web3App.requestAuth( pairingTopic: pairingTopic, params: AuthRequestParams( - chainId: _selectedChains[0].chainId, + chainId: 'eip155:1', domain: Constants.domain, aud: Constants.aud, statement: 'Welcome to example flutter app', @@ -464,7 +498,8 @@ class ConnectPageState extends State { VoidCallback? closeModal, Function(String message)? showToast, }) async { - final methods = optionalNamespaces['eip155']?.methods ?? []; + final methods1 = requiredNamespaces['eip155']?.methods ?? []; + final methods2 = optionalNamespaces['eip155']?.methods ?? []; const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); final authResponse = await widget.web3App.authenticate( params: SessionAuthRequestParams( @@ -473,7 +508,7 @@ class ConnectPageState extends State { nonce: AuthUtils.generateNonce(), uri: Constants.aud, statement: 'Welcome to example flutter app', - methods: methods, + methods: {...methods1, ...methods2}.toList(), ), ); @@ -531,6 +566,10 @@ class ConnectPageState extends State { void _onSessionConnect(SessionConnect? event) async { if (event == null) return; + setState(() { + _selectedChains.clear(); + }); + if (_shouldDismissQrCode && Navigator.canPop(context)) { _shouldDismissQrCode = false; Navigator.pop(context); @@ -543,6 +582,28 @@ class ConnectPageState extends State { }, ); } + + ButtonStyle get _buttonStyle => ButtonStyle( + backgroundColor: MaterialStateProperty.resolveWith( + (states) { + if (states.contains(MaterialState.disabled)) { + return StyleConstants.grayColor; + } + return StyleConstants.primaryColor; + }, + ), + minimumSize: MaterialStateProperty.all(const Size( + 1000.0, + StyleConstants.linear48, + )), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + StyleConstants.linear8, + ), + ), + ), + ); } class QRCodeScreen extends StatefulWidget { diff --git a/example/dapp/lib/pages/pairings_page.dart b/example/dapp/lib/pages/pairings_page.dart index 4a58f75a..eb5be822 100644 --- a/example/dapp/lib/pages/pairings_page.dart +++ b/example/dapp/lib/pages/pairings_page.dart @@ -1,8 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/string_constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/pairing_item.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; class PairingsPage extends StatefulWidget { const PairingsPage({ diff --git a/example/dapp/lib/pages/sessions_page.dart b/example/dapp/lib/pages/sessions_page.dart index 8309e730..eea88085 100644 --- a/example/dapp/lib/pages/sessions_page.dart +++ b/example/dapp/lib/pages/sessions_page.dart @@ -1,10 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/string_constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/session_item.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/session_widget.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; + class SessionsPage extends StatefulWidget { const SessionsPage({ super.key, diff --git a/example/dapp/lib/utils/crypto/eip155.dart b/example/dapp/lib/utils/crypto/eip155.dart index f5ce4dd0..6114c974 100644 --- a/example/dapp/lib/utils/crypto/eip155.dart +++ b/example/dapp/lib/utils/crypto/eip155.dart @@ -2,13 +2,13 @@ import 'dart:convert'; // ignore: depend_on_referenced_packages import 'package:convert/convert.dart'; -import 'package:intl/intl.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/chain_data.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/smart_contracts.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/test_data.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; + enum EIP155Methods { personalSign, ethSign, diff --git a/example/dapp/lib/utils/crypto/polkadot.dart b/example/dapp/lib/utils/crypto/polkadot.dart index de4ece79..2342f6df 100644 --- a/example/dapp/lib/utils/crypto/polkadot.dart +++ b/example/dapp/lib/utils/crypto/polkadot.dart @@ -1,4 +1,4 @@ -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; enum PolkadotMethods { polkadotSignTransaction, diff --git a/example/dapp/lib/utils/crypto/solana.dart b/example/dapp/lib/utils/crypto/solana.dart index 9f001c1e..241309f3 100644 --- a/example/dapp/lib/utils/crypto/solana.dart +++ b/example/dapp/lib/utils/crypto/solana.dart @@ -2,8 +2,8 @@ import 'dart:convert'; // ignore: depend_on_referenced_packages import 'package:bs58/bs58.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; enum SolanaMethods { solanaSignTransaction, diff --git a/example/dapp/lib/widgets/auth_item.dart b/example/dapp/lib/widgets/auth_item.dart index df27fd61..bd5372d9 100644 --- a/example/dapp/lib/widgets/auth_item.dart +++ b/example/dapp/lib/widgets/auth_item.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; class AuthItem extends StatelessWidget { const AuthItem({ diff --git a/example/dapp/lib/widgets/chain_button.dart b/example/dapp/lib/widgets/chain_button.dart index 64c2eafd..c98b277e 100644 --- a/example/dapp/lib/widgets/chain_button.dart +++ b/example/dapp/lib/widgets/chain_button.dart @@ -17,7 +17,7 @@ class ChainButton extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - width: double.infinity, + width: (MediaQuery.of(context).size.width / 2) - 14.0, height: StyleConstants.linear48, margin: const EdgeInsets.symmetric( vertical: StyleConstants.linear8, @@ -26,13 +26,13 @@ class ChainButton extends StatelessWidget { onPressed: onPressed, style: ButtonStyle( backgroundColor: MaterialStateProperty.all( - Colors.white, + selected ? Colors.grey.shade400 : Colors.white, ), shape: MaterialStateProperty.all( RoundedRectangleBorder( side: BorderSide( - color: chain.color, - width: selected ? 6 : 2, + color: selected ? Colors.grey.shade400 : chain.color, + width: selected ? 4 : 2, ), borderRadius: BorderRadius.circular( StyleConstants.linear8, diff --git a/example/dapp/lib/widgets/pairing_item.dart b/example/dapp/lib/widgets/pairing_item.dart index 74e1f1b2..4ed2dd02 100644 --- a/example/dapp/lib/widgets/pairing_item.dart +++ b/example/dapp/lib/widgets/pairing_item.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; class PairingItem extends StatelessWidget { const PairingItem({ diff --git a/example/dapp/lib/widgets/session_item.dart b/example/dapp/lib/widgets/session_item.dart index 93a42531..f8dcb257 100644 --- a/example/dapp/lib/widgets/session_item.dart +++ b/example/dapp/lib/widgets/session_item.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; class SessionItem extends StatelessWidget { const SessionItem({ diff --git a/example/dapp/lib/widgets/session_widget.dart b/example/dapp/lib/widgets/session_widget.dart index ee145372..1f20a008 100644 --- a/example/dapp/lib/widgets/session_widget.dart +++ b/example/dapp/lib/widgets/session_widget.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher_string.dart'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/crypto/eip155.dart'; @@ -11,6 +11,8 @@ import 'package:walletconnect_flutter_v2_dapp/utils/crypto/solana.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/string_constants.dart'; import 'package:walletconnect_flutter_v2_dapp/widgets/method_dialog.dart'; +import 'package:walletconnect_flutter_v2_dapp/imports.dart'; + class SessionWidget extends StatefulWidget { const SessionWidget({ super.key, diff --git a/example/dapp/pubspec.yaml b/example/dapp/pubspec.yaml index eae8d8d7..22b8077c 100644 --- a/example/dapp/pubspec.yaml +++ b/example/dapp/pubspec.yaml @@ -17,10 +17,11 @@ dependencies: json_annotation: ^4.8.1 fl_toast: ^3.1.0 url_launcher: ^6.2.2 - intl: ^0.19.0 + # intl: ^0.19.0 package_info_plus: ^7.0.0 - walletconnect_flutter_v2: - path: ../.. + walletconnect_modal_flutter: ^2.1.19 + # walletconnect_flutter_v2: + # path: ../.. dev_dependencies: flutter_test: diff --git a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_code_scanner.dart b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_code_scanner.dart index 0a1deb3a..d92c75d1 100644 --- a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_code_scanner.dart +++ b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_code_scanner.dart @@ -1,3 +1,5 @@ +// ignore_for_file: no_leading_underscores_for_local_identifiers + import 'dart:async'; import 'package:flutter/foundation.dart'; diff --git a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_scanner_overlay_shape.dart b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_scanner_overlay_shape.dart index 83fc5efc..2d251621 100644 --- a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_scanner_overlay_shape.dart +++ b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/qr_scanner_overlay_shape.dart @@ -1,3 +1,5 @@ +// ignore_for_file: no_leading_underscores_for_local_identifiers + import 'dart:math'; import 'package:flutter/material.dart'; diff --git a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/web/flutter_qr_web.dart b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/web/flutter_qr_web.dart index de368ace..ba6f5fe7 100644 --- a/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/web/flutter_qr_web.dart +++ b/example/wallet/packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner/lib/src/web/flutter_qr_web.dart @@ -1,4 +1,4 @@ -// ignore_for_file: avoid_web_libraries_in_flutter +// ignore_for_file: avoid_web_libraries_in_flutter, library_private_types_in_public_api import 'dart:async'; import 'dart:core'; @@ -23,12 +23,12 @@ class WebQrView extends StatefulWidget { final PermissionSetCallback? onPermissionSet; final CameraFacing? cameraFacing; - const WebQrView( - {Key? key, - required this.onPlatformViewCreated, - this.onPermissionSet, - this.cameraFacing = CameraFacing.front}) - : super(key: key); + const WebQrView({ + Key? key, + required this.onPlatformViewCreated, + this.onPermissionSet, + this.cameraFacing = CameraFacing.front, + }) : super(key: key); @override _WebQrViewState createState() => _WebQrViewState(); @@ -64,7 +64,7 @@ class _WebQrViewState extends State { String? code; String? _errorMsg; html.VideoElement video = html.VideoElement(); - String viewID = 'QRVIEW-' + DateTime.now().millisecondsSinceEpoch.toString(); + String viewID = 'QRVIEW-${DateTime.now().millisecondsSinceEpoch}'; final StreamController _scanUpdateController = StreamController(); diff --git a/example/wallet/packages/qr-bar-code-scanner-dialog/test/qr_bar_code_scanner_dialog_method_channel_test.dart b/example/wallet/packages/qr-bar-code-scanner-dialog/test/qr_bar_code_scanner_dialog_method_channel_test.dart index 1f72e4aa..6914ffb1 100644 --- a/example/wallet/packages/qr-bar-code-scanner-dialog/test/qr_bar_code_scanner_dialog_method_channel_test.dart +++ b/example/wallet/packages/qr-bar-code-scanner-dialog/test/qr_bar_code_scanner_dialog_method_channel_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:qr_bar_code_scanner_dialog/qr_bar_code_scanner_dialog_method_channel.dart'; diff --git a/lib/apis/utils/walletconnect_utils.dart b/lib/apis/utils/walletconnect_utils.dart index 901b26f2..06e231cf 100644 --- a/lib/apis/utils/walletconnect_utils.dart +++ b/lib/apis/utils/walletconnect_utils.dart @@ -91,14 +91,31 @@ class WalletConnectUtils { }) { final Uri uri = Uri.parse(relayUrl); final Map queryParams = Uri.splitQueryString(uri.query); - String ua = formatUA(protocol, version, sdkVersion); + final userAgent = formatUA(protocol, version, sdkVersion); + // Add basic query params final Map relayParams = { 'auth': auth, - if ((projectId ?? '').isNotEmpty) 'projectId': projectId!, - 'ua': ua, - if ((packageName ?? '').isNotEmpty) 'origin': packageName!, + 'ua': userAgent, }; + + // Add projectId query param + if ((projectId ?? '').isNotEmpty) { + relayParams['projectId'] = projectId!; + } + + // Add bundleId, packageName or origin query param based on platform + if ((packageName ?? '').isNotEmpty) { + final platform = getId(); + if (platform == 'ios') { + relayParams['bundleId'] = packageName!; + } else if (platform == 'android') { + relayParams['packageName'] = packageName!; + } else { + relayParams['origin'] = packageName!; + } + } + queryParams.addAll(relayParams); return uri.replace(queryParameters: queryParams).toString(); } diff --git a/lib/src/version.dart b/lib/src/version.dart index 36925912..bc803013 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '2.3.0'; +const packageVersion = '2.3.1-beta01'; diff --git a/pubspec.yaml b/pubspec.yaml index d35f5742..0ab97857 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: walletconnect_flutter_v2 description: WalletConnect's official Dart library v2 for WalletKit and AppKit. The communications protocol for web3. -version: 2.3.0 +version: 2.3.1-beta01 repository: https://github.com/WalletConnect/WalletConnectFlutterV2 environment: From e2219979a206bf11364d358a0e15ab713d120058 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 24 Jul 2024 14:07:07 +0200 Subject: [PATCH 02/27] Flutter dapp now uses WalletConnectModal to connect --- example/dapp/lib/imports.dart | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 example/dapp/lib/imports.dart diff --git a/example/dapp/lib/imports.dart b/example/dapp/lib/imports.dart new file mode 100644 index 00000000..545d42a0 --- /dev/null +++ b/example/dapp/lib/imports.dart @@ -0,0 +1,4 @@ +// ignore_for_file: depend_on_referenced_packages + +export 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; +export 'package:intl/intl.dart'; From fd5d4cb940196390fad215cae29a4f9195b3a231 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 24 Jul 2024 15:29:04 +0200 Subject: [PATCH 03/27] minor fix in workflows --- .github/workflows/release_dapp_android_internal.yml | 2 +- .github/workflows/release_wallet_android_internal.yml | 1 - example/dapp/android/fastlane/Fastfile | 7 ++++++- example/dapp/ios/fastlane/Fastfile | 7 ++++++- example/wallet/android/fastlane/Fastfile | 7 ++++++- example/wallet/ios/fastlane/Fastfile | 7 ++++++- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release_dapp_android_internal.yml b/.github/workflows/release_dapp_android_internal.yml index d8570a0b..12a1d821 100644 --- a/.github/workflows/release_dapp_android_internal.yml +++ b/.github/workflows/release_dapp_android_internal.yml @@ -60,4 +60,4 @@ jobs: fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER # Launch locally -# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android.yml +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android_internal.yml diff --git a/.github/workflows/release_wallet_android_internal.yml b/.github/workflows/release_wallet_android_internal.yml index aca217e8..59051f82 100644 --- a/.github/workflows/release_wallet_android_internal.yml +++ b/.github/workflows/release_wallet_android_internal.yml @@ -8,7 +8,6 @@ on: jobs: build: - # if: github.event.pull_request.merged == true if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge diff --git a/example/dapp/android/fastlane/Fastfile b/example/dapp/android/fastlane/Fastfile index 5edc9834..2f0aac57 100644 --- a/example/dapp/android/fastlane/Fastfile +++ b/example/dapp/android/fastlane/Fastfile @@ -55,7 +55,12 @@ platform :android do _latest_release = firebase_app_distribution_get_latest_release( app: "#{firebase_dapp_id}", ) - _new_build_number = _latest_release[:buildVersion].to_i + 1 + if _latest_release && _latest_release[:buildVersion] && !_latest_release[:buildVersion].empty? + _new_build_number = _latest_release[:buildVersion].to_i + 1 + else + _new_build_number = 1 + end + _app_version = "#{options[:app_version]}" _project_id = "#{options[:project_id]}" diff --git a/example/dapp/ios/fastlane/Fastfile b/example/dapp/ios/fastlane/Fastfile index 6773d1ff..b09595e0 100644 --- a/example/dapp/ios/fastlane/Fastfile +++ b/example/dapp/ios/fastlane/Fastfile @@ -80,7 +80,12 @@ platform :ios do app_identifier: "#{app_identifier}", username: options[:username], ) - new_build_number = number + 1 + if number && !number.to_s.empty? + new_build_number = number.to_i + 1 + else + # Handle the case where there is no previous build number + new_build_number = 1 + end increment_build_number( build_number: new_build_number, diff --git a/example/wallet/android/fastlane/Fastfile b/example/wallet/android/fastlane/Fastfile index 7e81840a..1f69e867 100644 --- a/example/wallet/android/fastlane/Fastfile +++ b/example/wallet/android/fastlane/Fastfile @@ -55,7 +55,12 @@ platform :android do _latest_release = firebase_app_distribution_get_latest_release( app: "#{firebase_wallet_id}", ) - _new_build_number = _latest_release[:buildVersion].to_i + 1 + if _latest_release && _latest_release[:buildVersion] && !_latest_release[:buildVersion].empty? + _new_build_number = _latest_release[:buildVersion].to_i + 1 + else + _new_build_number = 1 + end + _app_version = "#{options[:app_version]}" _project_id = "#{options[:project_id]}" diff --git a/example/wallet/ios/fastlane/Fastfile b/example/wallet/ios/fastlane/Fastfile index 73819ad6..c645abfe 100644 --- a/example/wallet/ios/fastlane/Fastfile +++ b/example/wallet/ios/fastlane/Fastfile @@ -79,7 +79,12 @@ platform :ios do app_identifier: "#{app_identifier}", username: options[:username], ) - new_build_number = number + 1 + if number && !number.to_s.empty? + new_build_number = number.to_i + 1 + else + # Handle the case where there is no previous build number + new_build_number = 1 + end increment_build_number( build_number: new_build_number, From 35c7ebed35e285a321ed25e3aab39e161745a7df Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 24 Jul 2024 17:12:42 +0200 Subject: [PATCH 04/27] retro compatibility of scheme --- .../dapp/android/app/src/main/AndroidManifest.xml | 15 +++++++++++++++ example/dapp/ios/Runner/Info-internal.plist | 14 ++++++++++++-- example/dapp/ios/Runner/Info.plist | 4 ++-- example/dapp/lib/main.dart | 2 +- example/dapp/lib/pages/connect_page.dart | 1 - .../android/app/src/main/AndroidManifest.xml | 8 +++++++- example/wallet/ios/Runner/Info-internal.plist | 14 ++++++++++++-- example/wallet/ios/Runner/Info.plist | 4 ++-- .../lib/dependencies/web3wallet_service.dart | 2 +- 9 files changed, 52 insertions(+), 12 deletions(-) diff --git a/example/dapp/android/app/src/main/AndroidManifest.xml b/example/dapp/android/app/src/main/AndroidManifest.xml index 4efd0752..2fab4011 100644 --- a/example/dapp/android/app/src/main/AndroidManifest.xml +++ b/example/dapp/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,13 @@ + + + + + + + + + + + + + + + diff --git a/example/dapp/ios/Runner/Info-internal.plist b/example/dapp/ios/Runner/Info-internal.plist index 35b2acd3..77e41eeb 100644 --- a/example/dapp/ios/Runner/Info-internal.plist +++ b/example/dapp/ios/Runner/Info-internal.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp.internal CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,12 +28,22 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp.internal CFBundleURLSchemes wcflutterdapp-internal + + CFBundleTypeRole + Editor + CFBundleURLName + com.walletconnect.flutterdapp.internal + CFBundleURLSchemes + + wcflutterdapp + + CFBundleVersion 2 diff --git a/example/dapp/ios/Runner/Info.plist b/example/dapp/ios/Runner/Info.plist index 220aa9a1..4052bbf5 100644 --- a/example/dapp/ios/Runner/Info.plist +++ b/example/dapp/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,7 +28,7 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp CFBundleURLSchemes wcflutterdapp-production diff --git a/example/dapp/lib/main.dart b/example/dapp/lib/main.dart index 50823a50..6e34f698 100644 --- a/example/dapp/lib/main.dart +++ b/example/dapp/lib/main.dart @@ -74,7 +74,7 @@ class _MyHomePageState extends State { ], redirect: Redirect( native: 'wcflutterdapp-$flavor://', - universal: 'https://walletconnect.com', + // universal: 'https://walletconnect.com', ), ), ); diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 73a6e258..1bdbd178 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -347,7 +347,6 @@ class ConnectPageState extends State { final encodedUri = Uri.encodeComponent(connectResponse.uri.toString()); const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); final uri = 'wcflutterwallet-$flavor://wc?uri=$encodedUri'; - // final uri = 'metamask://wc?uri=$encodedUri'; if (await canLaunchUrlString(uri)) { final openApp = await showDialog( // ignore: use_build_context_synchronously diff --git a/example/wallet/android/app/src/main/AndroidManifest.xml b/example/wallet/android/app/src/main/AndroidManifest.xml index 6157d923..c6f892b6 100644 --- a/example/wallet/android/app/src/main/AndroidManifest.xml +++ b/example/wallet/android/app/src/main/AndroidManifest.xml @@ -28,7 +28,7 @@ - + @@ -36,6 +36,12 @@ + + + + + + diff --git a/example/wallet/ios/Runner/Info-internal.plist b/example/wallet/ios/Runner/Info-internal.plist index 24398bea..7588df89 100644 --- a/example/wallet/ios/Runner/Info-internal.plist +++ b/example/wallet/ios/Runner/Info-internal.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet.internal CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,12 +28,22 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet.internal CFBundleURLSchemes wcflutterwallet-internal + + CFBundleTypeRole + Editor + CFBundleURLName + com.walletconnect.flutterwallet.internal + CFBundleURLSchemes + + wcflutterwallet + + CFBundleVersion $(FLUTTER_BUILD_NUMBER) diff --git a/example/wallet/ios/Runner/Info.plist b/example/wallet/ios/Runner/Info.plist index 4346cf71..99e831c3 100644 --- a/example/wallet/ios/Runner/Info.plist +++ b/example/wallet/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,7 +28,7 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet CFBundleURLSchemes wcflutterwallet-production diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index 792dd27c..f5f459af 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -41,7 +41,7 @@ class Web3WalletService extends IWeb3WalletService { ], redirect: Redirect( native: 'wcflutterwallet-$flavor://', - universal: 'https://walletconnect.com', + // universal: 'https://walletconnect.com', ), ), ); From a4bb468f92bca8ed33b9b74dbffbd04a2ee17cd8 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 25 Jul 2024 14:15:16 +0200 Subject: [PATCH 05/27] Fixes on sample wallet --- .../lib/dependencies/chains/common.dart | 15 ++++- .../lib/dependencies/chains/evm_service.dart | 62 +++++++++++++----- example/wallet/lib/pages/apps_page.dart | 65 ++++++++++++------- example/wallet/lib/utils/eth_utils.dart | 65 ++++++++++++------- lib/apis/core/pairing/pairing.dart | 30 +++++---- lib/apis/utils/walletconnect_utils.dart | 4 +- 6 files changed, 163 insertions(+), 78 deletions(-) diff --git a/example/wallet/lib/dependencies/chains/common.dart b/example/wallet/lib/dependencies/chains/common.dart index 1b5be74c..aad3eb46 100644 --- a/example/wallet/lib/dependencies/chains/common.dart +++ b/example/wallet/lib/dependencies/chains/common.dart @@ -28,15 +28,24 @@ class CommonMethods { } } - static Future requestApproval(String text, {String? title}) async { + static Future requestApproval( + String text, { + String? title, + String? method, + String? chainId, + String? address, + }) async { final bottomSheetService = GetIt.I(); final WCBottomSheetResult rs = (await bottomSheetService.queueBottomSheet( widget: WCRequestWidget( child: WCConnectionWidget( - title: 'Approve Request', + title: title ?? 'Approve Request', info: [ WCConnectionModel( - title: title, + title: 'Method: $method\n' + 'Chain ID: $chainId\n' + 'Address: $address\n\n' + 'Message:', elements: [ text, ], diff --git a/example/wallet/lib/dependencies/chains/evm_service.dart b/example/wallet/lib/dependencies/chains/evm_service.dart index 38ecad84..f53934e5 100644 --- a/example/wallet/lib/dependencies/chains/evm_service.dart +++ b/example/wallet/lib/dependencies/chains/evm_service.dart @@ -97,15 +97,21 @@ class EVMService { // personal_sign is handled using onSessionRequest event for demo purposes Future personalSign(String topic, dynamic parameters) async { debugPrint('[WALLET] personalSign request: $parameters'); - final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getDataFromParamsList(parameters); + final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; + final address = EthUtils.getAddressFromSessionRequest(pRequest); + final data = EthUtils.getDataFromSessionRequest(pRequest); final message = EthUtils.getUtf8Message(data.toString()); var response = JsonRpcResponse( id: pRequest.id, jsonrpc: '2.0', ); - if (await CommonMethods.requestApproval(message)) { + if (await CommonMethods.requestApproval( + message, + method: pRequest.method, + chainId: pRequest.chainId, + address: address, + )) { try { // Load the private key final keys = GetIt.I().getKeysForChain( @@ -145,7 +151,7 @@ class EVMService { Future ethSign(String topic, dynamic parameters) async { debugPrint('[WALLET] ethSign request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getDataFromParamsList(parameters); + final data = EthUtils.getDataFromSessionRequest(pRequest); final message = EthUtils.getUtf8Message(data.toString()); var response = JsonRpcResponse( id: pRequest.id, @@ -192,7 +198,7 @@ class EVMService { Future ethSignTypedData(String topic, dynamic parameters) async { debugPrint('[WALLET] ethSignTypedData request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getDataFromParamsList(parameters); + final data = EthUtils.getDataFromSessionRequest(pRequest); var response = JsonRpcResponse( id: pRequest.id, jsonrpc: '2.0', @@ -234,7 +240,7 @@ class EVMService { Future ethSignTypedDataV4(String topic, dynamic parameters) async { debugPrint('[WALLET] ethSignTypedDataV4 request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getDataFromParamsList(parameters); + final data = EthUtils.getDataFromSessionRequest(pRequest); var response = JsonRpcResponse( id: pRequest.id, jsonrpc: '2.0', @@ -275,15 +281,21 @@ class EVMService { Future ethSignTransaction(String topic, dynamic parameters) async { debugPrint('[WALLET] ethSignTransaction request: $parameters'); - final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getTransactionFromParams(parameters); + final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; + + final data = EthUtils.getTransactionFromSessionRequest(pRequest); if (data == null) return; + var response = JsonRpcResponse( id: pRequest.id, jsonrpc: '2.0', ); - final transaction = await _approveTransaction(data); + final transaction = await _approveTransaction( + data, + method: pRequest.method, + chainId: pRequest.chainId, + ); if (transaction is Transaction) { try { // Load the private key @@ -329,15 +341,21 @@ class EVMService { Future ethSendTransaction(String topic, dynamic parameters) async { debugPrint('[WALLET] ethSendTransaction request: $parameters'); - final pRequest = _web3Wallet.pendingRequests.getAll().last; - final data = EthUtils.getTransactionFromParams(parameters); + final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; + + final data = EthUtils.getTransactionFromSessionRequest(pRequest); if (data == null) return; + var response = JsonRpcResponse( id: pRequest.id, jsonrpc: '2.0', ); - final transaction = await _approveTransaction(data); + final transaction = await _approveTransaction( + data, + method: pRequest.method, + chainId: pRequest.chainId, + ); if (transaction is Transaction) { try { // Load the private key @@ -430,7 +448,12 @@ class EVMService { // CommonMethods.goBackToDapp(topic, true); // } - Future _approveTransaction(Map tJson) async { + Future _approveTransaction( + Map tJson, { + String? title, + String? method, + String? chainId, + }) async { Transaction transaction = tJson.toTransaction(); final gasPrice = await ethClient.getGasPrice(); @@ -480,12 +503,21 @@ class EVMService { final gweiGasPrice = (transaction.gasPrice?.getInWei ?? BigInt.zero) / BigInt.from(1000000000); + const encoder = JsonEncoder.withIndent(' '); + final trx = encoder.convert(tJson); final WCBottomSheetResult rs = (await _bottomSheetService.queueBottomSheet( widget: WCRequestWidget( child: WCConnectionWidget( - title: 'Approve Transaction', + title: title ?? 'Approve Transaction', info: [ - WCConnectionModel(elements: [jsonEncode(tJson)]), + WCConnectionModel( + title: 'Method: $method\n' + 'Chain ID: $chainId\n\n' + 'Transaction:', + elements: [ + trx, + ], + ), WCConnectionModel( title: 'Gas price', elements: ['${gweiGasPrice.toStringAsFixed(2)} GWEI'], diff --git a/example/wallet/lib/pages/apps_page.dart b/example/wallet/lib/pages/apps_page.dart index d46770cf..813f1841 100644 --- a/example/wallet/lib/pages/apps_page.dart +++ b/example/wallet/lib/pages/apps_page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:fl_toast/fl_toast.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; @@ -215,31 +217,50 @@ class AppsPageState extends State with GetItStateMixin { DeepLinkHandler.waiting.value = true; final Uri uriData = Uri.parse(uri!); await _web3Wallet.pair(uri: uriData); - } catch (e) { - DeepLinkHandler.waiting.value = false; - showPlatformToast( - child: Container( - padding: const EdgeInsets.all(StyleConstants.linear8), - margin: const EdgeInsets.only( - bottom: StyleConstants.magic40, - ), - decoration: BoxDecoration( - color: StyleConstants.errorColor, - borderRadius: BorderRadius.circular( - StyleConstants.linear16, - ), - ), - child: const Text( - StringConstants.invalidUri, - style: StyleConstants.bodyTextBold, - ), - ), - // ignore: use_build_context_synchronously - context: context, - ); + } on WalletConnectError catch (e) { + _showErrorDialog('${e.code}: ${e.message}'); + } on TimeoutException catch (_) { + _showErrorDialog('Time out error. Check your connection.'); } } + void _showErrorDialog(String message) { + DeepLinkHandler.waiting.value = false; + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text( + 'Error', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + content: Text( + message, + style: const TextStyle( + color: Colors.black, + ), + ), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text( + 'Close', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ) + ], + ); + }); + } + void _onListItemTap(PairingInfo pairing) { Navigator.push( context, diff --git a/example/wallet/lib/utils/eth_utils.dart b/example/wallet/lib/utils/eth_utils.dart index 1f394a0d..244c4b3a 100644 --- a/example/wallet/lib/utils/eth_utils.dart +++ b/example/wallet/lib/utils/eth_utils.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'package:convert/convert.dart'; +import 'package:flutter/foundation.dart'; import 'package:get_it/get_it.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/i_web3wallet_service.dart'; @@ -22,36 +23,54 @@ class EthUtils { return maybeHex; } - static dynamic getAddressFromParamsList(dynamic params) { - return (params as List).firstWhere((p) { - try { - if (addressRegEx.hasMatch(p)) { + static String? getAddressFromSessionRequest(SessionRequest request) { + try { + final paramsList = List.from((request.params as List)); + if (request.method == 'personal_sign') { + // for `personal_sign` first value in params has to be always the message + paramsList.removeAt(0); + } + + return paramsList.firstWhere((p) { + try { EthereumAddress.fromHex(p); return true; + } catch (e) { + return false; } - return false; - } catch (e) { - return false; - } - }, orElse: () => null); + }); + } catch (e) { + debugPrint(e.toString()); + return null; + } } - static dynamic getDataFromParamsList(dynamic params) { - final address = getAddressFromParamsList(params); - final param = (params as List).firstWhere( - (p) => p != address, - orElse: () => null, - ); - return param; + static dynamic getDataFromSessionRequest(SessionRequest request) { + try { + final paramsList = List.from((request.params as List)); + if (request.method == 'personal_sign') { + return paramsList.first; + } + return paramsList.firstWhere((p) { + final address = getAddressFromSessionRequest(request); + return p != address; + }); + } catch (e) { + debugPrint(e.toString()); + return null; + } } - static Map? getTransactionFromParams(dynamic params) { - final address = getAddressFromParamsList(params); - final param = params.firstWhere( - (p) => p != address, - orElse: () => null, - ); - return param as Map?; + static Map? getTransactionFromSessionRequest( + SessionRequest request, + ) { + try { + final param = (request.params as List).first; + return param as Map; + } catch (e) { + debugPrint(e.toString()); + return null; + } } static Future decodeMessageEvent(MessageEvent event) async { diff --git a/lib/apis/core/pairing/pairing.dart b/lib/apis/core/pairing/pairing.dart index 4ea2e633..ce34b7c0 100644 --- a/lib/apis/core/pairing/pairing.dart +++ b/lib/apis/core/pairing/pairing.dart @@ -194,19 +194,25 @@ class Pairing implements IPairing { rethrow; } - await pairings.set(topic, pairing); - await core.crypto.setSymKey(symKey, overrideTopic: topic); - await core.relayClient.subscribe(topic: topic); - await core.expirer.set(topic, expiry); - - onPairingCreate.broadcast( - PairingEvent( - topic: topic, - ), - ); + try { + await pairings.set(topic, pairing); + await core.crypto.setSymKey(symKey, overrideTopic: topic); + await core.relayClient.subscribe(topic: topic).timeout( + const Duration(seconds: 15), + ); + await core.expirer.set(topic, expiry); + + onPairingCreate.broadcast( + PairingEvent( + topic: topic, + ), + ); - if (activatePairing) { - await activate(topic: topic); + if (activatePairing) { + await activate(topic: topic); + } + } catch (e) { + rethrow; } return pairing; diff --git a/lib/apis/utils/walletconnect_utils.dart b/lib/apis/utils/walletconnect_utils.dart index 06e231cf..875b2e8a 100644 --- a/lib/apis/utils/walletconnect_utils.dart +++ b/lib/apis/utils/walletconnect_utils.dart @@ -3,9 +3,7 @@ import 'dart:io'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:flutter/foundation.dart' show kIsWeb; -import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart'; -import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart'; -import 'package:walletconnect_flutter_v2/apis/models/uri_parse_result.dart'; +import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; class WalletConnectUtils { static bool isExpired(int expiry) { From 8d291a90143815c9679cbc49a34930919b21c78a Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 25 Jul 2024 14:54:52 +0200 Subject: [PATCH 06/27] Code coverage report --- coverage/html/amber.png | Bin 0 -> 141 bytes .../auth_api/auth_client.dart.func-c.html | 75 + .../html/auth_api/auth_client.dart.func.html | 75 + .../html/auth_api/auth_client.dart.gcov.html | 270 + .../auth_api/auth_engine.dart.func-c.html | 75 + .../html/auth_api/auth_engine.dart.func.html | 75 + .../html/auth_api/auth_engine.dart.gcov.html | 513 ++ coverage/html/auth_api/index-sort-f.html | 117 + coverage/html/auth_api/index-sort-l.html | 100 + coverage/html/auth_api/index.html | 100 + coverage/html/cmd_line | 1 + coverage/html/core/core.dart.func-c.html | 75 + coverage/html/core/core.dart.func.html | 75 + coverage/html/core/core.dart.gcov.html | 255 + .../html/core/crypto/crypto.dart.func-c.html | 75 + .../html/core/crypto/crypto.dart.func.html | 75 + .../html/core/crypto/crypto.dart.gcov.html | 330 ++ .../crypto/crypto_models.dart.func-c.html | 75 + .../core/crypto/crypto_models.dart.func.html | 75 + .../core/crypto/crypto_models.dart.gcov.html | 157 + .../core/crypto/crypto_utils.dart.func-c.html | 75 + .../core/crypto/crypto_utils.dart.func.html | 75 + .../core/crypto/crypto_utils.dart.gcov.html | 323 ++ coverage/html/core/crypto/index-sort-f.html | 129 + coverage/html/core/crypto/index-sort-l.html | 109 + coverage/html/core/crypto/index.html | 109 + coverage/html/core/echo/echo.dart.func-c.html | 75 + coverage/html/core/echo/echo.dart.func.html | 75 + coverage/html/core/echo/echo.dart.gcov.html | 120 + .../core/echo/echo_client.dart.func-c.html | 75 + .../html/core/echo/echo_client.dart.func.html | 75 + .../html/core/echo/echo_client.dart.gcov.html | 119 + coverage/html/core/echo/index-sort-f.html | 117 + coverage/html/core/echo/index-sort-l.html | 100 + coverage/html/core/echo/index.html | 100 + .../echo/models/echo_body.dart.func-c.html | 75 + .../core/echo/models/echo_body.dart.func.html | 75 + .../core/echo/models/echo_body.dart.gcov.html | 93 + .../models/echo_response.dart.func-c.html | 75 + .../echo/models/echo_response.dart.func.html | 75 + .../echo/models/echo_response.dart.gcov.html | 123 + .../html/core/echo/models/index-sort-f.html | 117 + .../html/core/echo/models/index-sort-l.html | 100 + coverage/html/core/echo/models/index.html | 100 + .../core/heartbit/heartbeat.dart.func-c.html | 75 + .../core/heartbit/heartbeat.dart.func.html | 75 + .../core/heartbit/heartbeat.dart.gcov.html | 103 + coverage/html/core/heartbit/index-sort-f.html | 105 + coverage/html/core/heartbit/index-sort-l.html | 91 + coverage/html/core/heartbit/index.html | 91 + coverage/html/core/index-sort-f.html | 105 + coverage/html/core/index-sort-l.html | 91 + coverage/html/core/index.html | 91 + .../core/pairing/expirer.dart.func-c.html | 75 + .../html/core/pairing/expirer.dart.func.html | 75 + .../html/core/pairing/expirer.dart.gcov.html | 136 + coverage/html/core/pairing/index-sort-f.html | 141 + coverage/html/core/pairing/index-sort-l.html | 118 + coverage/html/core/pairing/index.html | 118 + .../pairing/json_rpc_history.dart.func-c.html | 75 + .../pairing/json_rpc_history.dart.func.html | 75 + .../pairing/json_rpc_history.dart.gcov.html | 110 + .../core/pairing/pairing.dart.func-c.html | 75 + .../html/core/pairing/pairing.dart.func.html | 75 + .../html/core/pairing/pairing.dart.gcov.html | 909 ++++ .../pairing/pairing_store.dart.func-c.html | 75 + .../core/pairing/pairing_store.dart.func.html | 75 + .../core/pairing/pairing_store.dart.gcov.html | 111 + .../html/core/pairing/utils/index-sort-f.html | 117 + .../html/core/pairing/utils/index-sort-l.html | 100 + coverage/html/core/pairing/utils/index.html | 100 + .../utils/json_rpc_utils.dart.func-c.html | 75 + .../utils/json_rpc_utils.dart.func.html | 75 + .../utils/json_rpc_utils.dart.gcov.html | 146 + .../utils/pairing_models.dart.func-c.html | 75 + .../utils/pairing_models.dart.func.html | 75 + .../utils/pairing_models.dart.gcov.html | 272 + .../html/core/relay_auth/index-sort-f.html | 117 + .../html/core/relay_auth/index-sort-l.html | 100 + coverage/html/core/relay_auth/index.html | 100 + .../relay_auth/relay_auth.dart.func-c.html | 75 + .../core/relay_auth/relay_auth.dart.func.html | 75 + .../core/relay_auth/relay_auth.dart.gcov.html | 308 ++ .../relay_auth_models.dart.func-c.html | 75 + .../relay_auth_models.dart.func.html | 75 + .../relay_auth_models.dart.gcov.html | 186 + .../i_relay_client.dart.func-c.html | 75 + .../i_relay_client.dart.func.html | 75 + .../i_relay_client.dart.gcov.html | 120 + .../html/core/relay_client/index-sort-f.html | 141 + .../html/core/relay_client/index-sort-l.html | 118 + coverage/html/core/relay_client/index.html | 118 + .../json_rpc_2/error_code.dart.func-c.html | 75 + .../json_rpc_2/error_code.dart.func.html | 75 + .../json_rpc_2/error_code.dart.gcov.html | 129 + .../relay_client/json_rpc_2/index-sort-f.html | 105 + .../relay_client/json_rpc_2/index-sort-l.html | 91 + .../core/relay_client/json_rpc_2/index.html | 91 + .../json_rpc_2/src/client.dart.func-c.html | 75 + .../json_rpc_2/src/client.dart.func.html | 75 + .../json_rpc_2/src/client.dart.gcov.html | 316 ++ .../json_rpc_2/src/exception.dart.func-c.html | 75 + .../json_rpc_2/src/exception.dart.func.html | 75 + .../json_rpc_2/src/exception.dart.gcov.html | 145 + .../json_rpc_2/src/index-sort-f.html | 165 + .../json_rpc_2/src/index-sort-l.html | 136 + .../relay_client/json_rpc_2/src/index.html | 136 + .../src/parameters.dart.func-c.html | 75 + .../json_rpc_2/src/parameters.dart.func.html | 75 + .../json_rpc_2/src/parameters.dart.gcov.html | 420 ++ .../json_rpc_2/src/peer.dart.func-c.html | 75 + .../json_rpc_2/src/peer.dart.func.html | 75 + .../json_rpc_2/src/peer.dart.gcov.html | 228 + .../json_rpc_2/src/server.dart.func-c.html | 75 + .../json_rpc_2/src/server.dart.func.html | 75 + .../json_rpc_2/src/server.dart.gcov.html | 391 ++ .../json_rpc_2/src/utils.dart.func-c.html | 75 + .../json_rpc_2/src/utils.dart.func.html | 75 + .../json_rpc_2/src/utils.dart.gcov.html | 142 + .../message_tracker.dart.func-c.html | 75 + .../message_tracker.dart.func.html | 75 + .../message_tracker.dart.gcov.html | 124 + .../relay_client.dart.func-c.html | 75 + .../relay_client/relay_client.dart.func.html | 75 + .../relay_client/relay_client.dart.gcov.html | 542 ++ .../relay_client_models.dart.func-c.html | 75 + .../relay_client_models.dart.func.html | 75 + .../relay_client_models.dart.gcov.html | 129 + .../websocket/http_client.dart.func-c.html | 75 + .../websocket/http_client.dart.func.html | 75 + .../websocket/http_client.dart.gcov.html | 100 + .../websocket/i_http_client.dart.func-c.html | 75 + .../websocket/i_http_client.dart.func.html | 75 + .../websocket/i_http_client.dart.gcov.html | 93 + .../relay_client/websocket/index-sort-f.html | 129 + .../relay_client/websocket/index-sort-l.html | 109 + .../core/relay_client/websocket/index.html | 109 + .../websocket_handler.dart.func-c.html | 75 + .../websocket_handler.dart.func.html | 75 + .../websocket_handler.dart.gcov.html | 162 + .../core/store/generic_store.dart.func-c.html | 75 + .../core/store/generic_store.dart.func.html | 75 + .../core/store/generic_store.dart.gcov.html | 243 + coverage/html/core/store/index-sort-f.html | 129 + coverage/html/core/store/index-sort-l.html | 109 + coverage/html/core/store/index.html | 109 + .../store/shared_prefs_store.dart.func-c.html | 75 + .../store/shared_prefs_store.dart.func.html | 75 + .../store/shared_prefs_store.dart.gcov.html | 232 + .../core/store/store_models.dart.func-c.html | 75 + .../core/store/store_models.dart.func.html | 75 + .../core/store/store_models.dart.gcov.html | 107 + coverage/html/core/verify/index-sort-f.html | 105 + coverage/html/core/verify/index-sort-l.html | 91 + coverage/html/core/verify/index.html | 91 + .../html/core/verify/models/index-sort-f.html | 105 + .../html/core/verify/models/index-sort-l.html | 91 + coverage/html/core/verify/models/index.html | 91 + .../models/verify_context.dart.func-c.html | 75 + .../models/verify_context.dart.func.html | 75 + .../models/verify_context.dart.gcov.html | 122 + .../html/core/verify/verify.dart.func-c.html | 75 + .../html/core/verify/verify.dart.func.html | 75 + .../html/core/verify/verify.dart.gcov.html | 132 + coverage/html/emerald.png | Bin 0 -> 141 bytes coverage/html/gcov.css | 1101 ++++ coverage/html/glass.png | Bin 0 -> 167 bytes coverage/html/index-sort-f.html | 393 ++ coverage/html/index-sort-l.html | 307 ++ coverage/html/index.html | 307 ++ .../html/models/basic_models.dart.func-c.html | 75 + .../html/models/basic_models.dart.func.html | 75 + .../html/models/basic_models.dart.gcov.html | 116 + coverage/html/models/index-sort-f.html | 153 + coverage/html/models/index-sort-l.html | 127 + coverage/html/models/index.html | 127 + .../models/json_rpc_error.dart.func-c.html | 75 + .../html/models/json_rpc_error.dart.func.html | 75 + .../html/models/json_rpc_error.dart.gcov.html | 99 + .../models/json_rpc_request.dart.func-c.html | 75 + .../models/json_rpc_request.dart.func.html | 75 + .../models/json_rpc_request.dart.gcov.html | 90 + .../models/json_rpc_response.dart.func-c.html | 75 + .../models/json_rpc_response.dart.func.html | 75 + .../models/json_rpc_response.dart.gcov.html | 91 + .../models/uri_parse_result.dart.func-c.html | 75 + .../models/uri_parse_result.dart.func.html | 75 + .../models/uri_parse_result.dart.gcov.html | 116 + coverage/html/ruby.png | Bin 0 -> 141 bytes coverage/html/sign_api/index-sort-f.html | 129 + coverage/html/sign_api/index-sort-l.html | 109 + coverage/html/sign_api/index.html | 109 + .../auth/auth_client_events.dart.func-c.html | 75 + .../auth/auth_client_events.dart.func.html | 75 + .../auth/auth_client_events.dart.gcov.html | 127 + .../auth/auth_client_models.dart.func-c.html | 75 + .../auth/auth_client_models.dart.func.html | 75 + .../auth/auth_client_models.dart.gcov.html | 238 + .../auth/common_auth_models.dart.func-c.html | 75 + .../auth/common_auth_models.dart.func.html | 75 + .../auth/common_auth_models.dart.gcov.html | 268 + .../sign_api/models/auth/index-sort-f.html | 153 + .../sign_api/models/auth/index-sort-l.html | 127 + coverage/html/sign_api/models/auth/index.html | 127 + .../auth/session_auth_events.dart.func-c.html | 75 + .../auth/session_auth_events.dart.func.html | 75 + .../auth/session_auth_events.dart.gcov.html | 143 + .../auth/session_auth_models.dart.func-c.html | 75 + .../auth/session_auth_models.dart.func.html | 75 + .../auth/session_auth_models.dart.gcov.html | 189 + .../html/sign_api/models/index-sort-f.html | 153 + .../html/sign_api/models/index-sort-l.html | 127 + coverage/html/sign_api/models/index.html | 127 + .../models/json_rpc_models.dart.func-c.html | 75 + .../models/json_rpc_models.dart.func.html | 75 + .../models/json_rpc_models.dart.gcov.html | 294 + .../models/proposal_models.dart.func-c.html | 75 + .../models/proposal_models.dart.func.html | 75 + .../models/proposal_models.dart.gcov.html | 123 + .../models/session_models.dart.func-c.html | 75 + .../models/session_models.dart.func.html | 75 + .../models/session_models.dart.gcov.html | 159 + .../sign_client_events.dart.func-c.html | 75 + .../models/sign_client_events.dart.func.html | 75 + .../models/sign_client_events.dart.gcov.html | 266 + .../sign_client_models.dart.func-c.html | 75 + .../models/sign_client_models.dart.func.html | 75 + .../models/sign_client_models.dart.gcov.html | 107 + .../html/sign_api/sessions.dart.func-c.html | 75 + .../html/sign_api/sessions.dart.func.html | 75 + .../html/sign_api/sessions.dart.gcov.html | 108 + .../sign_api/sign_client.dart.func-c.html | 75 + .../html/sign_api/sign_client.dart.func.html | 75 + .../html/sign_api/sign_client.dart.gcov.html | 748 +++ .../sign_api/sign_engine.dart.func-c.html | 75 + .../html/sign_api/sign_engine.dart.func.html | 75 + .../html/sign_api/sign_engine.dart.gcov.html | 2861 ++++++++++ .../utils/auth/address_utils.dart.func-c.html | 75 + .../utils/auth/address_utils.dart.func.html | 75 + .../utils/auth/address_utils.dart.gcov.html | 85 + .../auth/auth_api_validators.dart.func-c.html | 75 + .../auth/auth_api_validators.dart.func.html | 75 + .../auth/auth_api_validators.dart.gcov.html | 218 + .../auth/auth_signature.dart.func-c.html | 75 + .../utils/auth/auth_signature.dart.func.html | 75 + .../utils/auth/auth_signature.dart.gcov.html | 375 ++ .../utils/auth/auth_utils.dart.func-c.html | 75 + .../utils/auth/auth_utils.dart.func.html | 75 + .../utils/auth/auth_utils.dart.gcov.html | 77 + .../sign_api/utils/auth/index-sort-f.html | 153 + .../sign_api/utils/auth/index-sort-l.html | 127 + coverage/html/sign_api/utils/auth/index.html | 127 + .../utils/auth/recaps_utils.dart.func-c.html | 75 + .../utils/auth/recaps_utils.dart.func.html | 75 + .../utils/auth/recaps_utils.dart.gcov.html | 420 ++ .../utils/custom_credentials.dart.func-c.html | 75 + .../utils/custom_credentials.dart.func.html | 75 + .../utils/custom_credentials.dart.gcov.html | 152 + .../html/sign_api/utils/index-sort-f.html | 117 + .../html/sign_api/utils/index-sort-l.html | 100 + coverage/html/sign_api/utils/index.html | 100 + .../sign_api_validator_utils.dart.func-c.html | 75 + .../sign_api_validator_utils.dart.func.html | 75 + .../sign_api_validator_utils.dart.gcov.html | 396 ++ coverage/html/snow.png | Bin 0 -> 141 bytes coverage/html/updown.png | Bin 0 -> 117 bytes coverage/html/utils/errors.dart.func-c.html | 75 + coverage/html/utils/errors.dart.func.html | 75 + coverage/html/utils/errors.dart.gcov.html | 349 ++ .../html/utils/extensions.dart.func-c.html | 75 + coverage/html/utils/extensions.dart.func.html | 75 + coverage/html/utils/extensions.dart.gcov.html | 152 + coverage/html/utils/index-sort-f.html | 153 + coverage/html/utils/index-sort-l.html | 127 + coverage/html/utils/index.html | 127 + .../html/utils/log_level.dart.func-c.html | 75 + coverage/html/utils/log_level.dart.func.html | 75 + coverage/html/utils/log_level.dart.gcov.html | 102 + .../utils/namespace_utils.dart.func-c.html | 75 + .../html/utils/namespace_utils.dart.func.html | 75 + .../html/utils/namespace_utils.dart.gcov.html | 515 ++ .../walletconnect_utils.dart.func-c.html | 75 + .../utils/walletconnect_utils.dart.func.html | 75 + .../utils/walletconnect_utils.dart.gcov.html | 302 ++ coverage/html/web3app/index-sort-f.html | 105 + coverage/html/web3app/index-sort-l.html | 91 + coverage/html/web3app/index.html | 91 + .../html/web3app/web3app.dart.func-c.html | 75 + coverage/html/web3app/web3app.dart.func.html | 75 + coverage/html/web3app/web3app.dart.gcov.html | 526 ++ coverage/html/web3wallet/index-sort-f.html | 105 + coverage/html/web3wallet/index-sort-l.html | 91 + coverage/html/web3wallet/index.html | 91 + .../web3wallet/web3wallet.dart.func-c.html | 75 + .../html/web3wallet/web3wallet.dart.func.html | 75 + .../html/web3wallet/web3wallet.dart.gcov.html | 612 +++ coverage/lcov.info | 4705 +++++++++++++++++ 297 files changed, 44724 insertions(+) create mode 100644 coverage/html/amber.png create mode 100644 coverage/html/auth_api/auth_client.dart.func-c.html create mode 100644 coverage/html/auth_api/auth_client.dart.func.html create mode 100644 coverage/html/auth_api/auth_client.dart.gcov.html create mode 100644 coverage/html/auth_api/auth_engine.dart.func-c.html create mode 100644 coverage/html/auth_api/auth_engine.dart.func.html create mode 100644 coverage/html/auth_api/auth_engine.dart.gcov.html create mode 100644 coverage/html/auth_api/index-sort-f.html create mode 100644 coverage/html/auth_api/index-sort-l.html create mode 100644 coverage/html/auth_api/index.html create mode 100644 coverage/html/cmd_line create mode 100644 coverage/html/core/core.dart.func-c.html create mode 100644 coverage/html/core/core.dart.func.html create mode 100644 coverage/html/core/core.dart.gcov.html create mode 100644 coverage/html/core/crypto/crypto.dart.func-c.html create mode 100644 coverage/html/core/crypto/crypto.dart.func.html create mode 100644 coverage/html/core/crypto/crypto.dart.gcov.html create mode 100644 coverage/html/core/crypto/crypto_models.dart.func-c.html create mode 100644 coverage/html/core/crypto/crypto_models.dart.func.html create mode 100644 coverage/html/core/crypto/crypto_models.dart.gcov.html create mode 100644 coverage/html/core/crypto/crypto_utils.dart.func-c.html create mode 100644 coverage/html/core/crypto/crypto_utils.dart.func.html create mode 100644 coverage/html/core/crypto/crypto_utils.dart.gcov.html create mode 100644 coverage/html/core/crypto/index-sort-f.html create mode 100644 coverage/html/core/crypto/index-sort-l.html create mode 100644 coverage/html/core/crypto/index.html create mode 100644 coverage/html/core/echo/echo.dart.func-c.html create mode 100644 coverage/html/core/echo/echo.dart.func.html create mode 100644 coverage/html/core/echo/echo.dart.gcov.html create mode 100644 coverage/html/core/echo/echo_client.dart.func-c.html create mode 100644 coverage/html/core/echo/echo_client.dart.func.html create mode 100644 coverage/html/core/echo/echo_client.dart.gcov.html create mode 100644 coverage/html/core/echo/index-sort-f.html create mode 100644 coverage/html/core/echo/index-sort-l.html create mode 100644 coverage/html/core/echo/index.html create mode 100644 coverage/html/core/echo/models/echo_body.dart.func-c.html create mode 100644 coverage/html/core/echo/models/echo_body.dart.func.html create mode 100644 coverage/html/core/echo/models/echo_body.dart.gcov.html create mode 100644 coverage/html/core/echo/models/echo_response.dart.func-c.html create mode 100644 coverage/html/core/echo/models/echo_response.dart.func.html create mode 100644 coverage/html/core/echo/models/echo_response.dart.gcov.html create mode 100644 coverage/html/core/echo/models/index-sort-f.html create mode 100644 coverage/html/core/echo/models/index-sort-l.html create mode 100644 coverage/html/core/echo/models/index.html create mode 100644 coverage/html/core/heartbit/heartbeat.dart.func-c.html create mode 100644 coverage/html/core/heartbit/heartbeat.dart.func.html create mode 100644 coverage/html/core/heartbit/heartbeat.dart.gcov.html create mode 100644 coverage/html/core/heartbit/index-sort-f.html create mode 100644 coverage/html/core/heartbit/index-sort-l.html create mode 100644 coverage/html/core/heartbit/index.html create mode 100644 coverage/html/core/index-sort-f.html create mode 100644 coverage/html/core/index-sort-l.html create mode 100644 coverage/html/core/index.html create mode 100644 coverage/html/core/pairing/expirer.dart.func-c.html create mode 100644 coverage/html/core/pairing/expirer.dart.func.html create mode 100644 coverage/html/core/pairing/expirer.dart.gcov.html create mode 100644 coverage/html/core/pairing/index-sort-f.html create mode 100644 coverage/html/core/pairing/index-sort-l.html create mode 100644 coverage/html/core/pairing/index.html create mode 100644 coverage/html/core/pairing/json_rpc_history.dart.func-c.html create mode 100644 coverage/html/core/pairing/json_rpc_history.dart.func.html create mode 100644 coverage/html/core/pairing/json_rpc_history.dart.gcov.html create mode 100644 coverage/html/core/pairing/pairing.dart.func-c.html create mode 100644 coverage/html/core/pairing/pairing.dart.func.html create mode 100644 coverage/html/core/pairing/pairing.dart.gcov.html create mode 100644 coverage/html/core/pairing/pairing_store.dart.func-c.html create mode 100644 coverage/html/core/pairing/pairing_store.dart.func.html create mode 100644 coverage/html/core/pairing/pairing_store.dart.gcov.html create mode 100644 coverage/html/core/pairing/utils/index-sort-f.html create mode 100644 coverage/html/core/pairing/utils/index-sort-l.html create mode 100644 coverage/html/core/pairing/utils/index.html create mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html create mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html create mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html create mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.func-c.html create mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.func.html create mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.gcov.html create mode 100644 coverage/html/core/relay_auth/index-sort-f.html create mode 100644 coverage/html/core/relay_auth/index-sort-l.html create mode 100644 coverage/html/core/relay_auth/index.html create mode 100644 coverage/html/core/relay_auth/relay_auth.dart.func-c.html create mode 100644 coverage/html/core/relay_auth/relay_auth.dart.func.html create mode 100644 coverage/html/core/relay_auth/relay_auth.dart.gcov.html create mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html create mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.func.html create mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html create mode 100644 coverage/html/core/relay_client/i_relay_client.dart.func-c.html create mode 100644 coverage/html/core/relay_client/i_relay_client.dart.func.html create mode 100644 coverage/html/core/relay_client/i_relay_client.dart.gcov.html create mode 100644 coverage/html/core/relay_client/index-sort-f.html create mode 100644 coverage/html/core/relay_client/index-sort-l.html create mode 100644 coverage/html/core/relay_client/index.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/index-sort-f.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/index-sort-l.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/index.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html create mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html create mode 100644 coverage/html/core/relay_client/message_tracker.dart.func-c.html create mode 100644 coverage/html/core/relay_client/message_tracker.dart.func.html create mode 100644 coverage/html/core/relay_client/message_tracker.dart.gcov.html create mode 100644 coverage/html/core/relay_client/relay_client.dart.func-c.html create mode 100644 coverage/html/core/relay_client/relay_client.dart.func.html create mode 100644 coverage/html/core/relay_client/relay_client.dart.gcov.html create mode 100644 coverage/html/core/relay_client/relay_client_models.dart.func-c.html create mode 100644 coverage/html/core/relay_client/relay_client_models.dart.func.html create mode 100644 coverage/html/core/relay_client/relay_client_models.dart.gcov.html create mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.func-c.html create mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.func.html create mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.gcov.html create mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html create mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.func.html create mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html create mode 100644 coverage/html/core/relay_client/websocket/index-sort-f.html create mode 100644 coverage/html/core/relay_client/websocket/index-sort-l.html create mode 100644 coverage/html/core/relay_client/websocket/index.html create mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html create mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html create mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html create mode 100644 coverage/html/core/store/generic_store.dart.func-c.html create mode 100644 coverage/html/core/store/generic_store.dart.func.html create mode 100644 coverage/html/core/store/generic_store.dart.gcov.html create mode 100644 coverage/html/core/store/index-sort-f.html create mode 100644 coverage/html/core/store/index-sort-l.html create mode 100644 coverage/html/core/store/index.html create mode 100644 coverage/html/core/store/shared_prefs_store.dart.func-c.html create mode 100644 coverage/html/core/store/shared_prefs_store.dart.func.html create mode 100644 coverage/html/core/store/shared_prefs_store.dart.gcov.html create mode 100644 coverage/html/core/store/store_models.dart.func-c.html create mode 100644 coverage/html/core/store/store_models.dart.func.html create mode 100644 coverage/html/core/store/store_models.dart.gcov.html create mode 100644 coverage/html/core/verify/index-sort-f.html create mode 100644 coverage/html/core/verify/index-sort-l.html create mode 100644 coverage/html/core/verify/index.html create mode 100644 coverage/html/core/verify/models/index-sort-f.html create mode 100644 coverage/html/core/verify/models/index-sort-l.html create mode 100644 coverage/html/core/verify/models/index.html create mode 100644 coverage/html/core/verify/models/verify_context.dart.func-c.html create mode 100644 coverage/html/core/verify/models/verify_context.dart.func.html create mode 100644 coverage/html/core/verify/models/verify_context.dart.gcov.html create mode 100644 coverage/html/core/verify/verify.dart.func-c.html create mode 100644 coverage/html/core/verify/verify.dart.func.html create mode 100644 coverage/html/core/verify/verify.dart.gcov.html create mode 100644 coverage/html/emerald.png create mode 100644 coverage/html/gcov.css create mode 100644 coverage/html/glass.png create mode 100644 coverage/html/index-sort-f.html create mode 100644 coverage/html/index-sort-l.html create mode 100644 coverage/html/index.html create mode 100644 coverage/html/models/basic_models.dart.func-c.html create mode 100644 coverage/html/models/basic_models.dart.func.html create mode 100644 coverage/html/models/basic_models.dart.gcov.html create mode 100644 coverage/html/models/index-sort-f.html create mode 100644 coverage/html/models/index-sort-l.html create mode 100644 coverage/html/models/index.html create mode 100644 coverage/html/models/json_rpc_error.dart.func-c.html create mode 100644 coverage/html/models/json_rpc_error.dart.func.html create mode 100644 coverage/html/models/json_rpc_error.dart.gcov.html create mode 100644 coverage/html/models/json_rpc_request.dart.func-c.html create mode 100644 coverage/html/models/json_rpc_request.dart.func.html create mode 100644 coverage/html/models/json_rpc_request.dart.gcov.html create mode 100644 coverage/html/models/json_rpc_response.dart.func-c.html create mode 100644 coverage/html/models/json_rpc_response.dart.func.html create mode 100644 coverage/html/models/json_rpc_response.dart.gcov.html create mode 100644 coverage/html/models/uri_parse_result.dart.func-c.html create mode 100644 coverage/html/models/uri_parse_result.dart.func.html create mode 100644 coverage/html/models/uri_parse_result.dart.gcov.html create mode 100644 coverage/html/ruby.png create mode 100644 coverage/html/sign_api/index-sort-f.html create mode 100644 coverage/html/sign_api/index-sort-l.html create mode 100644 coverage/html/sign_api/index.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.func.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.func.html create mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.func.html create mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/auth/index-sort-f.html create mode 100644 coverage/html/sign_api/models/auth/index-sort-l.html create mode 100644 coverage/html/sign_api/models/auth/index.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.func.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.func.html create mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/index-sort-f.html create mode 100644 coverage/html/sign_api/models/index-sort-l.html create mode 100644 coverage/html/sign_api/models/index.html create mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.func.html create mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/proposal_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/proposal_models.dart.func.html create mode 100644 coverage/html/sign_api/models/proposal_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/session_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/session_models.dart.func.html create mode 100644 coverage/html/sign_api/models/session_models.dart.gcov.html create mode 100644 coverage/html/sign_api/models/sign_client_events.dart.func-c.html create mode 100644 coverage/html/sign_api/models/sign_client_events.dart.func.html create mode 100644 coverage/html/sign_api/models/sign_client_events.dart.gcov.html create mode 100644 coverage/html/sign_api/models/sign_client_models.dart.func-c.html create mode 100644 coverage/html/sign_api/models/sign_client_models.dart.func.html create mode 100644 coverage/html/sign_api/models/sign_client_models.dart.gcov.html create mode 100644 coverage/html/sign_api/sessions.dart.func-c.html create mode 100644 coverage/html/sign_api/sessions.dart.func.html create mode 100644 coverage/html/sign_api/sessions.dart.gcov.html create mode 100644 coverage/html/sign_api/sign_client.dart.func-c.html create mode 100644 coverage/html/sign_api/sign_client.dart.func.html create mode 100644 coverage/html/sign_api/sign_client.dart.gcov.html create mode 100644 coverage/html/sign_api/sign_engine.dart.func-c.html create mode 100644 coverage/html/sign_api/sign_engine.dart.func.html create mode 100644 coverage/html/sign_api/sign_engine.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.func.html create mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html create mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.func.html create mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.func.html create mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/auth/index-sort-f.html create mode 100644 coverage/html/sign_api/utils/auth/index-sort-l.html create mode 100644 coverage/html/sign_api/utils/auth/index.html create mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html create mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.func.html create mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.gcov.html create mode 100644 coverage/html/sign_api/utils/index-sort-f.html create mode 100644 coverage/html/sign_api/utils/index-sort-l.html create mode 100644 coverage/html/sign_api/utils/index.html create mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html create mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html create mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html create mode 100644 coverage/html/snow.png create mode 100644 coverage/html/updown.png create mode 100644 coverage/html/utils/errors.dart.func-c.html create mode 100644 coverage/html/utils/errors.dart.func.html create mode 100644 coverage/html/utils/errors.dart.gcov.html create mode 100644 coverage/html/utils/extensions.dart.func-c.html create mode 100644 coverage/html/utils/extensions.dart.func.html create mode 100644 coverage/html/utils/extensions.dart.gcov.html create mode 100644 coverage/html/utils/index-sort-f.html create mode 100644 coverage/html/utils/index-sort-l.html create mode 100644 coverage/html/utils/index.html create mode 100644 coverage/html/utils/log_level.dart.func-c.html create mode 100644 coverage/html/utils/log_level.dart.func.html create mode 100644 coverage/html/utils/log_level.dart.gcov.html create mode 100644 coverage/html/utils/namespace_utils.dart.func-c.html create mode 100644 coverage/html/utils/namespace_utils.dart.func.html create mode 100644 coverage/html/utils/namespace_utils.dart.gcov.html create mode 100644 coverage/html/utils/walletconnect_utils.dart.func-c.html create mode 100644 coverage/html/utils/walletconnect_utils.dart.func.html create mode 100644 coverage/html/utils/walletconnect_utils.dart.gcov.html create mode 100644 coverage/html/web3app/index-sort-f.html create mode 100644 coverage/html/web3app/index-sort-l.html create mode 100644 coverage/html/web3app/index.html create mode 100644 coverage/html/web3app/web3app.dart.func-c.html create mode 100644 coverage/html/web3app/web3app.dart.func.html create mode 100644 coverage/html/web3app/web3app.dart.gcov.html create mode 100644 coverage/html/web3wallet/index-sort-f.html create mode 100644 coverage/html/web3wallet/index-sort-l.html create mode 100644 coverage/html/web3wallet/index.html create mode 100644 coverage/html/web3wallet/web3wallet.dart.func-c.html create mode 100644 coverage/html/web3wallet/web3wallet.dart.func.html create mode 100644 coverage/html/web3wallet/web3wallet.dart.gcov.html create mode 100644 coverage/lcov.info diff --git a/coverage/html/amber.png b/coverage/html/amber.png new file mode 100644 index 0000000000000000000000000000000000000000..2cab170d8359081983a4e343848dfe06bc490f12 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG + + + + + + LCOV - lcov.info - auth_api/auth_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/auth_client.dart.func.html b/coverage/html/auth_api/auth_client.dart.func.html new file mode 100644 index 00000000..5e7a70a6 --- /dev/null +++ b/coverage/html/auth_api/auth_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - auth_api/auth_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/auth_client.dart.gcov.html b/coverage/html/auth_api/auth_client.dart.gcov.html new file mode 100644 index 00000000..6bb4fd81 --- /dev/null +++ b/coverage/html/auth_api/auth_client.dart.gcov.html @@ -0,0 +1,270 @@ + + + + + + + LCOV - lcov.info - auth_api/auth_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_client.dartCoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_client.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/core.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+      16              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      17              : import 'package:walletconnect_flutter_v2/apis/utils/log_level.dart';
+      18              : 
+      19              : class AuthClient implements IAuthClient {
+      20              :   bool _initialized = false;
+      21              : 
+      22            0 :   @override
+      23              :   String get protocol => 'wc';
+      24              : 
+      25            0 :   @override
+      26              :   int get version => 2;
+      27              : 
+      28            0 :   @override
+      29            0 :   Event<AuthRequest> get onAuthRequest => engine.onAuthRequest;
+      30            1 :   @override
+      31            2 :   Event<AuthResponse> get onAuthResponse => engine.onAuthResponse;
+      32              : 
+      33            1 :   @override
+      34            2 :   ICore get core => engine.core;
+      35            0 :   @override
+      36            0 :   PairingMetadata get metadata => engine.metadata;
+      37            0 :   @override
+      38            0 :   IGenericStore<AuthPublicKey> get authKeys => engine.authKeys;
+      39            0 :   @override
+      40            0 :   IGenericStore<String> get pairingTopics => engine.pairingTopics;
+      41            0 :   @override
+      42            0 :   IGenericStore<PendingAuthRequest> get authRequests => engine.authRequests;
+      43            0 :   @override
+      44            0 :   IGenericStore<StoredCacao> get completeRequests => engine.completeRequests;
+      45              : 
+      46              :   @override
+      47              :   late IAuthEngine engine;
+      48              : 
+      49            0 :   static Future<AuthClient> createInstance({
+      50              :     required String projectId,
+      51              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
+      52              :     required PairingMetadata metadata,
+      53              :     bool memoryStore = false,
+      54              :     IHttpClient httpClient = const HttpWrapper(),
+      55              :     LogLevel logLevel = LogLevel.nothing,
+      56              :   }) async {
+      57            0 :     final client = AuthClient(
+      58            0 :       core: Core(
+      59              :         projectId: projectId,
+      60              :         relayUrl: relayUrl,
+      61              :         memoryStore: memoryStore,
+      62              :         httpClient: httpClient,
+      63              :         logLevel: logLevel,
+      64              :       ),
+      65              :       metadata: metadata,
+      66              :     );
+      67            0 :     await client.init();
+      68              : 
+      69              :     return client;
+      70              :   }
+      71              : 
+      72            1 :   AuthClient({
+      73              :     required ICore core,
+      74              :     required PairingMetadata metadata,
+      75              :   }) {
+      76            2 :     engine = AuthEngine(
+      77              :       core: core,
+      78              :       metadata: metadata,
+      79            1 :       authKeys: GenericStore(
+      80            1 :         storage: core.storage,
+      81              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
+      82              :         version: StoreVersions.VERSION_AUTH_KEYS,
+      83            0 :         fromJson: (dynamic value) {
+      84            0 :           return AuthPublicKey.fromJson(value);
+      85              :         },
+      86              :       ),
+      87            1 :       pairingTopics: GenericStore(
+      88            1 :         storage: core.storage,
+      89              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
+      90              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
+      91            0 :         fromJson: (dynamic value) {
+      92              :           return value as String;
+      93              :         },
+      94              :       ),
+      95            1 :       authRequests: GenericStore(
+      96            1 :         storage: core.storage,
+      97              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+      98              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+      99            0 :         fromJson: (dynamic value) {
+     100            0 :           return PendingAuthRequest.fromJson(value);
+     101              :         },
+     102              :       ),
+     103            1 :       completeRequests: GenericStore(
+     104            1 :         storage: core.storage,
+     105              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
+     106              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
+     107            0 :         fromJson: (dynamic value) {
+     108            0 :           return StoredCacao.fromJson(value);
+     109              :         },
+     110              :       ),
+     111              :     );
+     112              :   }
+     113              : 
+     114            1 :   @override
+     115              :   Future<void> init() async {
+     116            1 :     if (_initialized) {
+     117              :       return;
+     118              :     }
+     119              : 
+     120            2 :     await core.start();
+     121            2 :     await engine.init();
+     122              : 
+     123            1 :     _initialized = true;
+     124              :   }
+     125              : 
+     126            1 :   @override
+     127              :   Future<AuthRequestResponse> request({
+     128              :     required AuthRequestParams params,
+     129              :     String? pairingTopic,
+     130              :     List<List<String>>? methods = AuthEngine.DEFAULT_METHODS,
+     131              :   }) async {
+     132              :     try {
+     133            2 :       return engine.requestAuth(
+     134              :         params: params,
+     135              :         pairingTopic: pairingTopic,
+     136              :         methods: methods,
+     137              :       );
+     138              :     } catch (e) {
+     139              :       rethrow;
+     140              :     }
+     141              :   }
+     142              : 
+     143            0 :   @override
+     144              :   Future<void> respond({
+     145              :     required int id,
+     146              :     required String iss,
+     147              :     CacaoSignature? signature,
+     148              :     WalletConnectError? error,
+     149              :   }) async {
+     150              :     try {
+     151            0 :       return engine.respondAuthRequest(
+     152              :         id: id,
+     153              :         iss: iss,
+     154              :         signature: signature,
+     155              :         error: error,
+     156              :       );
+     157              :     } catch (e) {
+     158              :       rethrow;
+     159              :     }
+     160              :   }
+     161              : 
+     162            0 :   @override
+     163              :   Map<int, PendingAuthRequest> getPendingRequests() {
+     164              :     try {
+     165            0 :       return engine.getPendingAuthRequests();
+     166              :     } catch (e) {
+     167              :       rethrow;
+     168              :     }
+     169              :   }
+     170              : 
+     171            1 :   @override
+     172              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+     173              :     required String pairingTopic,
+     174              :   }) {
+     175              :     try {
+     176            2 :       return engine.getCompletedRequestsForPairing(
+     177              :         pairingTopic: pairingTopic,
+     178              :       );
+     179              :     } catch (e) {
+     180              :       rethrow;
+     181              :     }
+     182              :   }
+     183              : 
+     184            1 :   @override
+     185              :   String formatMessage({
+     186              :     required String iss,
+     187              :     required CacaoRequestPayload cacaoPayload,
+     188              :   }) {
+     189              :     try {
+     190            2 :       return engine.formatAuthMessage(
+     191              :         iss: iss,
+     192              :         cacaoPayload: cacaoPayload,
+     193              :       );
+     194              :     } catch (e) {
+     195              :       rethrow;
+     196              :     }
+     197              :   }
+     198              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/auth_engine.dart.func-c.html b/coverage/html/auth_api/auth_engine.dart.func-c.html new file mode 100644 index 00000000..05177775 --- /dev/null +++ b/coverage/html/auth_api/auth_engine.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - auth_api/auth_engine.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/auth_engine.dart.func.html b/coverage/html/auth_api/auth_engine.dart.func.html new file mode 100644 index 00000000..6fb8d3f6 --- /dev/null +++ b/coverage/html/auth_api/auth_engine.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - auth_api/auth_engine.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/auth_engine.dart.gcov.html b/coverage/html/auth_api/auth_engine.dart.gcov.html new file mode 100644 index 00000000..84453b82 --- /dev/null +++ b/coverage/html/auth_api/auth_engine.dart.gcov.html @@ -0,0 +1,513 @@ + + + + + + + LCOV - lcov.info - auth_api/auth_engine.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_api - auth_engine.dartCoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/json_rpc_models.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/address_utils.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_api_validators.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_signature.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+      16              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+      17              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
+      18              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+      19              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+      20              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
+      21              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      22              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+      23              : import 'package:walletconnect_flutter_v2/apis/utils/method_constants.dart';
+      24              : 
+      25              : class AuthEngine implements IAuthEngine {
+      26              :   static const List<List<String>> DEFAULT_METHODS = [
+      27              :     [
+      28              :       MethodConstants.WC_AUTH_REQUEST,
+      29              :     ]
+      30              :   ];
+      31              : 
+      32              :   bool _initialized = false;
+      33              : 
+      34              :   @override
+      35              :   final Event<AuthRequest> onAuthRequest = Event();
+      36              :   @override
+      37              :   final Event<AuthResponse> onAuthResponse = Event();
+      38              : 
+      39              :   @override
+      40              :   final ICore core;
+      41              :   @override
+      42              :   final PairingMetadata metadata;
+      43              :   @override
+      44              :   late IGenericStore<AuthPublicKey> authKeys;
+      45              :   @override
+      46              :   late IGenericStore<String> pairingTopics;
+      47              :   @override
+      48              :   late IGenericStore<PendingAuthRequest> authRequests;
+      49              :   @override
+      50              :   late IGenericStore<StoredCacao> completeRequests;
+      51              : 
+      52              :   List<AuthRequestCompleter> pendingAuthRequests = [];
+      53              : 
+      54            3 :   AuthEngine({
+      55              :     required this.core,
+      56              :     required this.metadata,
+      57              :     required this.authKeys,
+      58              :     required this.pairingTopics,
+      59              :     required this.authRequests,
+      60              :     required this.completeRequests,
+      61              :   });
+      62              : 
+      63            3 :   @override
+      64              :   Future<void> init() async {
+      65            3 :     if (_initialized) {
+      66              :       return;
+      67              :     }
+      68              : 
+      69            9 :     await core.pairing.init();
+      70            6 :     await authKeys.init();
+      71            6 :     await pairingTopics.init();
+      72            6 :     await authRequests.init();
+      73            6 :     await completeRequests.init();
+      74              : 
+      75            3 :     _registerRelayClientFunctions();
+      76              : 
+      77            3 :     _initialized = true;
+      78              :   }
+      79              : 
+      80            2 :   @override
+      81              :   Future<AuthRequestResponse> requestAuth({
+      82              :     required AuthRequestParams params,
+      83              :     String? pairingTopic,
+      84              :     List<List<String>>? methods = DEFAULT_METHODS,
+      85              :   }) async {
+      86            2 :     _checkInitialized();
+      87              : 
+      88            2 :     AuthApiValidators.isValidRequest(params);
+      89              :     String? pTopic = pairingTopic;
+      90              :     Uri? uri;
+      91              : 
+      92              :     if (pTopic == null) {
+      93            3 :       final CreateResponse newTopicAndUri = await core.pairing.create(
+      94              :         methods: methods,
+      95              :       );
+      96            1 :       pTopic = newTopicAndUri.topic;
+      97            1 :       uri = newTopicAndUri.uri;
+      98              :     } else {
+      99            6 :       core.pairing.isValidPairingTopic(topic: pTopic);
+     100              :     }
+     101              : 
+     102            6 :     final publicKey = await core.crypto.generateKeyPair();
+     103              :     // print('requestAuth, publicKey: $publicKey');
+     104            8 :     final String responseTopic = core.crypto.getUtils().hashKey(publicKey);
+     105            2 :     final int id = JsonRpcUtils.payloadId();
+     106              : 
+     107            2 :     WcAuthRequestRequest request = WcAuthRequestRequest(
+     108            2 :       payloadParams: AuthPayloadParams.fromRequestParams(
+     109              :         params,
+     110              :       ),
+     111            2 :       requester: ConnectionMetadata(
+     112              :         publicKey: publicKey,
+     113            2 :         metadata: metadata,
+     114              :       ),
+     115              :     );
+     116              : 
+     117            2 :     final int expiry = params.expiry ?? WalletConnectConstants.FIVE_MINUTES;
+     118              : 
+     119            4 :     await authKeys.set(
+     120              :       AuthConstants.AUTH_CLIENT_PUBLIC_KEY_NAME,
+     121            2 :       AuthPublicKey(publicKey: publicKey),
+     122              :     );
+     123              : 
+     124            4 :     await pairingTopics.set(
+     125              :       responseTopic,
+     126              :       pTopic,
+     127              :     );
+     128              : 
+     129              :     // Set the one time use receiver public key for decoding the Type 1 envelope
+     130            6 :     await core.pairing.setReceiverPublicKey(
+     131              :       topic: responseTopic,
+     132              :       publicKey: publicKey,
+     133              :       expiry: expiry,
+     134              :     );
+     135              : 
+     136            2 :     Completer<AuthResponse> completer = Completer();
+     137              : 
+     138            2 :     _requestAuthResponseHandler(
+     139              :       pairingTopic: pTopic,
+     140              :       responseTopic: responseTopic,
+     141              :       request: request,
+     142              :       id: id,
+     143              :       expiry: expiry,
+     144              :       completer: completer,
+     145              :     );
+     146              : 
+     147            2 :     return AuthRequestResponse(
+     148              :       id: id,
+     149              :       pairingTopic: pTopic,
+     150              :       completer: completer,
+     151              :       uri: uri,
+     152              :     );
+     153              :   }
+     154              : 
+     155            2 :   Future<void> _requestAuthResponseHandler({
+     156              :     required String pairingTopic,
+     157              :     required String responseTopic,
+     158              :     required WcAuthRequestRequest request,
+     159              :     required int id,
+     160              :     required int expiry,
+     161              :     required Completer<AuthResponse> completer,
+     162              :   }) async {
+     163              :     Map<String, dynamic>? resp;
+     164              : 
+     165              :     // Subscribe to the responseTopic because we expect the response to use this topic
+     166              :     // print('got here');
+     167            6 :     await core.relayClient.subscribe(topic: responseTopic);
+     168              : 
+     169              :     try {
+     170            6 :       resp = await core.pairing.sendRequest(
+     171              :         pairingTopic,
+     172              :         MethodConstants.WC_AUTH_REQUEST,
+     173            2 :         request.toJson(),
+     174              :         id: id,
+     175              :         ttl: expiry,
+     176              :       );
+     177            0 :     } on JsonRpcError catch (e) {
+     178            0 :       final resp = AuthResponse(
+     179              :         id: id,
+     180              :         topic: responseTopic,
+     181              :         jsonRpcError: e,
+     182              :       );
+     183            0 :       onAuthResponse.broadcast(resp);
+     184            0 :       completer.complete(resp);
+     185              :       return;
+     186              :     }
+     187              : 
+     188            6 :     await core.pairing.activate(topic: pairingTopic);
+     189              : 
+     190            2 :     final Cacao cacao = Cacao.fromJson(resp!);
+     191            2 :     final CacaoSignature sig = cacao.s;
+     192            2 :     final CacaoPayload payload = cacao.p;
+     193            4 :     await completeRequests.set(
+     194            2 :       id.toString(),
+     195            2 :       StoredCacao.fromCacao(
+     196              :         id: id,
+     197              :         pairingTopic: pairingTopic,
+     198              :         cacao: cacao,
+     199              :       ),
+     200              :     );
+     201              : 
+     202            2 :     final String reconstructed = formatAuthMessage(
+     203            2 :       iss: payload.iss,
+     204            2 :       cacaoPayload: CacaoRequestPayload.fromCacaoPayload(payload),
+     205              :     );
+     206              : 
+     207            4 :     final String walletAddress = AddressUtils.getDidAddress(payload.iss);
+     208            4 :     final String chainId = AddressUtils.getDidChainId(payload.iss);
+     209              : 
+     210            2 :     if (walletAddress.isEmpty) {
+     211            0 :       throw Errors.getSdkError(
+     212              :         Errors.MISSING_OR_INVALID,
+     213              :         context: 'authResponse walletAddress is empty',
+     214              :       );
+     215              :     }
+     216            2 :     if (chainId.isEmpty) {
+     217            0 :       throw Errors.getSdkError(
+     218              :         Errors.MISSING_OR_INVALID,
+     219              :         context: 'authResponse chainId is empty',
+     220              :       );
+     221              :     }
+     222              : 
+     223            2 :     final bool isValid = await AuthSignature.verifySignature(
+     224              :       walletAddress,
+     225              :       reconstructed,
+     226              :       sig,
+     227              :       chainId,
+     228            4 :       core.projectId,
+     229              :     );
+     230              : 
+     231              :     if (!isValid) {
+     232            0 :       final resp = AuthResponse(
+     233              :         id: id,
+     234              :         topic: responseTopic,
+     235              :         error: const WalletConnectError(
+     236              :           code: -1,
+     237              :           message: 'Invalid signature',
+     238              :         ),
+     239              :       );
+     240            0 :       onAuthResponse.broadcast(resp);
+     241            0 :       completer.complete(resp);
+     242              :     } else {
+     243            2 :       final resp = AuthResponse(
+     244              :         id: id,
+     245              :         topic: responseTopic,
+     246              :         result: cacao,
+     247              :       );
+     248            4 :       onAuthResponse.broadcast(resp);
+     249            2 :       completer.complete(resp);
+     250              :     }
+     251              :   }
+     252              : 
+     253            2 :   @override
+     254              :   Future<void> respondAuthRequest({
+     255              :     required int id,
+     256              :     required String iss,
+     257              :     CacaoSignature? signature,
+     258              :     WalletConnectError? error,
+     259              :   }) async {
+     260            2 :     _checkInitialized();
+     261              : 
+     262            2 :     Map<int, PendingAuthRequest> pendingRequests = getPendingAuthRequests();
+     263            2 :     AuthApiValidators.isValidRespond(
+     264              :       id: id,
+     265              :       pendingRequests: pendingRequests,
+     266              :       signature: signature,
+     267              :       error: error,
+     268              :     );
+     269              : 
+     270            2 :     final PendingAuthRequest pendingRequest = pendingRequests[id]!;
+     271            4 :     final String receiverPublicKey = pendingRequest.metadata.publicKey;
+     272            6 :     final String senderPublicKey = await core.crypto.generateKeyPair();
+     273            8 :     final String responseTopic = core.crypto.getUtils().hashKey(
+     274              :           receiverPublicKey,
+     275              :         );
+     276            2 :     final EncodeOptions encodeOpts = EncodeOptions(
+     277              :       type: EncodeOptions.TYPE_1,
+     278              :       receiverPublicKey: receiverPublicKey,
+     279              :       senderPublicKey: senderPublicKey,
+     280              :     );
+     281              : 
+     282              :     if (error != null) {
+     283            0 :       await core.pairing.sendError(
+     284              :         id,
+     285              :         responseTopic,
+     286              :         MethodConstants.WC_AUTH_REQUEST,
+     287            0 :         JsonRpcError.serverError(error.message),
+     288              :         encodeOptions: encodeOpts,
+     289              :       );
+     290              :     } else {
+     291            2 :       final Cacao cacao = Cacao(
+     292              :         h: const CacaoHeader(),
+     293            2 :         p: CacaoPayload.fromRequestPayload(
+     294              :           issuer: iss,
+     295            2 :           payload: pendingRequest.cacaoPayload,
+     296              :         ),
+     297              :         s: signature!,
+     298              :       );
+     299              : 
+     300              :       // print('auth res id: $id');
+     301            6 :       await core.pairing.sendResult(
+     302              :         id,
+     303              :         responseTopic,
+     304              :         MethodConstants.WC_AUTH_REQUEST,
+     305            2 :         cacao.toJson(),
+     306              :         encodeOptions: encodeOpts,
+     307              :       );
+     308              : 
+     309            6 :       await authRequests.delete(id.toString());
+     310              : 
+     311            4 :       await completeRequests.set(
+     312            2 :         id.toString(),
+     313            2 :         StoredCacao.fromCacao(
+     314              :           id: id,
+     315            2 :           pairingTopic: pendingRequest.pairingTopic,
+     316              :           cacao: cacao,
+     317              :         ),
+     318              :       );
+     319              :     }
+     320              :   }
+     321              : 
+     322            2 :   @override
+     323              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
+     324            2 :     Map<int, PendingAuthRequest> pendingRequests = {};
+     325            8 :     authRequests.getAll().forEach((key) {
+     326            4 :       pendingRequests[key.id] = key;
+     327              :     });
+     328              :     return pendingRequests;
+     329              :   }
+     330              : 
+     331            1 :   @override
+     332              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+     333              :     required String pairingTopic,
+     334              :   }) {
+     335            1 :     Map<int, StoredCacao> completedRequests = {};
+     336            1 :     completeRequests
+     337            1 :         .getAll()
+     338            1 :         .where(
+     339            3 :           (e) => e.pairingTopic == pairingTopic,
+     340              :         )
+     341            2 :         .forEach((key) {
+     342            2 :       completedRequests[key.id] = key;
+     343              :     });
+     344              :     return completedRequests;
+     345              :   }
+     346              : 
+     347            2 :   @override
+     348              :   String formatAuthMessage({
+     349              :     required String iss,
+     350              :     required CacaoRequestPayload cacaoPayload,
+     351              :   }) {
+     352              :     final header =
+     353            4 :         '${cacaoPayload.domain} wants you to sign in with your Ethereum account:';
+     354            2 :     final walletAddress = AddressUtils.getDidAddress(iss);
+     355            4 :     final uri = 'URI: ${cacaoPayload.aud}';
+     356            4 :     final version = 'Version: ${cacaoPayload.version}';
+     357            4 :     final chainId = 'Chain ID: ${AddressUtils.getDidChainId(iss)}';
+     358            4 :     final nonce = 'Nonce: ${cacaoPayload.nonce}';
+     359            4 :     final issuedAt = 'Issued At: ${cacaoPayload.iat}';
+     360            2 :     final resources = cacaoPayload.resources != null &&
+     361            2 :             cacaoPayload.resources!.isNotEmpty
+     362            5 :         ? 'Resources:\n${cacaoPayload.resources!.map((resource) => '- $resource').join('\n')}'
+     363            1 :         : null;
+     364              : 
+     365            2 :     final message = [
+     366              :       header,
+     367              :       walletAddress,
+     368              :       '',
+     369            2 :       cacaoPayload.statement,
+     370              :       '',
+     371              :       uri,
+     372              :       version,
+     373              :       chainId,
+     374              :       nonce,
+     375              :       issuedAt,
+     376              :       resources,
+     377            6 :     ].where((element) => element != null).join('\n');
+     378              : 
+     379              :     return message;
+     380              :   }
+     381              : 
+     382              :   /// ---- PRIVATE HELPERS ---- ///
+     383              : 
+     384            2 :   void _checkInitialized() {
+     385            2 :     if (!_initialized) {
+     386            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     387              :     }
+     388              :   }
+     389              : 
+     390              :   /// ---- Relay Events ---- ///
+     391              : 
+     392            3 :   void _registerRelayClientFunctions() {
+     393            9 :     core.pairing.register(
+     394              :       method: MethodConstants.WC_AUTH_REQUEST,
+     395            3 :       function: _onAuthRequest,
+     396              :       type: ProtocolType.auth,
+     397              :     );
+     398              :   }
+     399              : 
+     400            2 :   void _onAuthRequest(
+     401              :     String topic,
+     402              :     JsonRpcRequest payload,
+     403              :   ) async {
+     404              :     try {
+     405            4 :       final request = WcAuthRequestRequest.fromJson(payload.params);
+     406              : 
+     407              :       final CacaoRequestPayload cacaoPayload =
+     408            2 :           CacaoRequestPayload.fromPayloadParams(
+     409            2 :         request.payloadParams,
+     410              :       );
+     411              : 
+     412            4 :       authRequests.set(
+     413            4 :         payload.id.toString(),
+     414            2 :         PendingAuthRequest(
+     415            2 :           id: payload.id,
+     416              :           pairingTopic: topic,
+     417            2 :           metadata: request.requester,
+     418              :           cacaoPayload: cacaoPayload,
+     419              :         ),
+     420              :       );
+     421              : 
+     422            4 :       onAuthRequest.broadcast(
+     423            2 :         AuthRequest(
+     424            2 :           id: payload.id,
+     425              :           topic: topic,
+     426            2 :           requester: request.requester,
+     427            2 :           payloadParams: request.payloadParams,
+     428              :         ),
+     429              :       );
+     430            0 :     } on WalletConnectError catch (err) {
+     431            0 :       await core.pairing.sendError(
+     432            0 :         payload.id,
+     433              :         topic,
+     434            0 :         payload.method,
+     435            0 :         JsonRpcError.invalidParams(
+     436            0 :           err.message,
+     437              :         ),
+     438              :       );
+     439              :     }
+     440              :   }
+     441              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/index-sort-f.html b/coverage/html/auth_api/index-sort-f.html new file mode 100644 index 00000000..283b5b22 --- /dev/null +++ b/coverage/html/auth_api/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - auth_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_client.dart +
46.3%46.3%
+
46.3 %5425-
auth_engine.dart +
87.0%87.0%
+
87.0 %138120-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/index-sort-l.html b/coverage/html/auth_api/index-sort-l.html new file mode 100644 index 00000000..49efc2e8 --- /dev/null +++ b/coverage/html/auth_api/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - auth_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client.dart +
46.3%46.3%
+
46.3 %5425
auth_engine.dart +
87.0%87.0%
+
87.0 %138120
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/auth_api/index.html b/coverage/html/auth_api/index.html new file mode 100644 index 00000000..279fd510 --- /dev/null +++ b/coverage/html/auth_api/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - auth_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client.dart +
46.3%46.3%
+
46.3 %5425
auth_engine.dart +
87.0%87.0%
+
87.0 %138120
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/cmd_line b/coverage/html/cmd_line new file mode 100644 index 00000000..fff562af --- /dev/null +++ b/coverage/html/cmd_line @@ -0,0 +1 @@ +genhtml --rc genhtml_hi_limit=75 --rc genhtml_med_limit=50 -o coverage/html coverage/lcov.info --no-function-coverage diff --git a/coverage/html/core/core.dart.func-c.html b/coverage/html/core/core.dart.func-c.html new file mode 100644 index 00000000..cb2e0536 --- /dev/null +++ b/coverage/html/core/core.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/core.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core - core.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/core.dart.func.html b/coverage/html/core/core.dart.func.html new file mode 100644 index 00000000..77fdda59 --- /dev/null +++ b/coverage/html/core/core.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/core.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core - core.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/core.dart.gcov.html b/coverage/html/core/core.dart.gcov.html new file mode 100644 index 00000000..ecd9d828 --- /dev/null +++ b/coverage/html/core/core.dart.gcov.html @@ -0,0 +1,255 @@ + + + + + + + LCOV - lcov.info - core/core.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core - core.dartCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:logger/logger.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/echo/echo.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/echo/echo_client.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/heartbeat.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/i_heartbeat.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/core/pairing/expirer.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_expirer.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/core/pairing/json_rpc_history.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/core/pairing/pairing.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/core/pairing/pairing_store.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+      16              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/message_tracker.dart';
+      17              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart';
+      18              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
+      19              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+      20              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
+      21              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+      22              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
+      23              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_relay_client.dart';
+      24              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing.dart';
+      25              : import 'package:walletconnect_flutter_v2/apis/core/store/shared_prefs_store.dart';
+      26              : import 'package:walletconnect_flutter_v2/apis/core/verify/i_verify.dart';
+      27              : import 'package:walletconnect_flutter_v2/apis/core/verify/verify.dart';
+      28              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      29              : import 'package:walletconnect_flutter_v2/apis/utils/log_level.dart';
+      30              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
+      31              : 
+      32              : class Core implements ICore {
+      33            7 :   @override
+      34              :   String get protocol => 'wc';
+      35            7 :   @override
+      36              :   String get version => '2';
+      37              : 
+      38              :   @override
+      39              :   final String projectId;
+      40              : 
+      41              :   @override
+      42              :   String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL;
+      43              : 
+      44              :   @override
+      45              :   String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL;
+      46              : 
+      47              :   @override
+      48              :   late ICrypto crypto;
+      49              : 
+      50              :   @override
+      51              :   late IRelayClient relayClient;
+      52              : 
+      53              :   @override
+      54              :   late IExpirer expirer;
+      55              : 
+      56              :   @override
+      57              :   late IPairing pairing;
+      58              : 
+      59              :   @override
+      60              :   late IEcho echo;
+      61              : 
+      62              :   @override
+      63              :   late IHeartBeat heartbeat;
+      64              : 
+      65              :   @override
+      66              :   late IVerify verify;
+      67              : 
+      68              :   Logger _logger = Logger(
+      69              :     level: Level.off,
+      70              :     printer: PrettyPrinter(),
+      71              :   );
+      72            9 :   @override
+      73            9 :   Logger get logger => _logger;
+      74              : 
+      75            0 :   @override
+      76              :   void addLogListener(LogCallback callback) {
+      77            0 :     Logger.addLogListener(callback);
+      78              :   }
+      79              : 
+      80            0 :   @override
+      81              :   bool removeLogListener(LogCallback callback) {
+      82            0 :     return Logger.removeLogListener(callback);
+      83              :   }
+      84              : 
+      85              :   @override
+      86              :   late IStore<Map<String, dynamic>> storage;
+      87              : 
+      88           10 :   Core({
+      89              :     required this.projectId,
+      90              :     this.relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
+      91              :     this.pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
+      92              :     bool memoryStore = false,
+      93              :     LogLevel logLevel = LogLevel.nothing,
+      94              :     IHttpClient httpClient = const HttpWrapper(),
+      95              :     IWebSocketHandler? webSocketHandler,
+      96              :   }) {
+      97           20 :     _logger = Logger(
+      98           10 :       level: logLevel.toLevel(),
+      99           10 :       printer: PrettyPrinter(methodCount: null),
+     100              :     );
+     101           20 :     heartbeat = HeartBeat();
+     102           20 :     storage = SharedPrefsStores(
+     103              :       memoryStore: memoryStore,
+     104              :     );
+     105           20 :     crypto = Crypto(
+     106              :       core: this,
+     107           10 :       keyChain: GenericStore<String>(
+     108           10 :         storage: storage,
+     109              :         context: StoreVersions.CONTEXT_KEYCHAIN,
+     110              :         version: StoreVersions.VERSION_KEYCHAIN,
+     111            0 :         fromJson: (dynamic value) => value as String,
+     112              :       ),
+     113              :     );
+     114           20 :     relayClient = RelayClient(
+     115              :       core: this,
+     116           10 :       messageTracker: MessageTracker(
+     117           10 :         storage: storage,
+     118              :         context: StoreVersions.CONTEXT_MESSAGE_TRACKER,
+     119              :         version: StoreVersions.VERSION_MESSAGE_TRACKER,
+     120            0 :         fromJson: (dynamic value) {
+     121            0 :           return WalletConnectUtils.convertMapTo<String>(value);
+     122              :         },
+     123              :       ),
+     124           10 :       topicMap: GenericStore<String>(
+     125           10 :         storage: storage,
+     126              :         context: StoreVersions.CONTEXT_TOPIC_MAP,
+     127              :         version: StoreVersions.VERSION_TOPIC_MAP,
+     128            0 :         fromJson: (dynamic value) => value as String,
+     129              :       ),
+     130              :       socketHandler: webSocketHandler,
+     131              :     );
+     132           20 :     expirer = Expirer(
+     133           10 :       storage: storage,
+     134              :       context: StoreVersions.CONTEXT_EXPIRER,
+     135              :       version: StoreVersions.VERSION_EXPIRER,
+     136            0 :       fromJson: (dynamic value) => value as int,
+     137              :     );
+     138           20 :     pairing = Pairing(
+     139              :       core: this,
+     140           10 :       pairings: PairingStore(
+     141           10 :         storage: storage,
+     142              :         context: StoreVersions.CONTEXT_PAIRINGS,
+     143              :         version: StoreVersions.VERSION_PAIRINGS,
+     144            0 :         fromJson: (dynamic value) {
+     145            0 :           return PairingInfo.fromJson(value as Map<String, dynamic>);
+     146              :         },
+     147              :       ),
+     148           10 :       history: JsonRpcHistory(
+     149           10 :         storage: storage,
+     150              :         context: StoreVersions.CONTEXT_JSON_RPC_HISTORY,
+     151              :         version: StoreVersions.VERSION_JSON_RPC_HISTORY,
+     152            0 :         fromJson: (dynamic value) => JsonRpcRecord.fromJson(value),
+     153              :       ),
+     154           10 :       topicToReceiverPublicKey: GenericStore(
+     155           10 :         storage: storage,
+     156              :         context: StoreVersions.CONTEXT_TOPIC_TO_RECEIVER_PUBLIC_KEY,
+     157              :         version: StoreVersions.VERSION_TOPIC_TO_RECEIVER_PUBLIC_KEY,
+     158            0 :         fromJson: (dynamic value) => ReceiverPublicKey.fromJson(value),
+     159              :       ),
+     160              :     );
+     161           20 :     echo = Echo(
+     162              :       core: this,
+     163           10 :       echoClient: EchoClient(
+     164           10 :         baseUrl: pushUrl,
+     165              :         httpClient: httpClient,
+     166              :       ),
+     167              :     );
+     168           20 :     verify = Verify(
+     169              :       core: this,
+     170              :       httpClient: httpClient,
+     171              :     );
+     172              :   }
+     173              : 
+     174            9 :   @override
+     175              :   Future<void> start() async {
+     176           18 :     await storage.init();
+     177           18 :     await crypto.init();
+     178           18 :     await relayClient.init();
+     179           18 :     await expirer.init();
+     180           18 :     await pairing.init();
+     181           18 :     heartbeat.init();
+     182              :   }
+     183              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto.dart.func-c.html b/coverage/html/core/crypto/crypto.dart.func-c.html new file mode 100644 index 00000000..c5f2096b --- /dev/null +++ b/coverage/html/core/crypto/crypto.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto.dart.func.html b/coverage/html/core/crypto/crypto.dart.func.html new file mode 100644 index 00000000..c43d455e --- /dev/null +++ b/coverage/html/core/crypto/crypto.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto.dart.gcov.html b/coverage/html/core/crypto/crypto.dart.gcov.html new file mode 100644 index 00000000..9490ac60 --- /dev/null +++ b/coverage/html/core/crypto/crypto.dart.gcov.html @@ -0,0 +1,330 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto.dartCoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:typed_data';
+       3              : 
+       4              : import 'package:convert/convert.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_utils.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto_utils.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/i_relay_auth.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth_models.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+      16              : 
+      17              : class Crypto implements ICrypto {
+      18              :   static const cryptoContext = 'crypto';
+      19              :   static const cryptoClientSeed = 'client_ed25519_seed';
+      20              :   static const clientSeed = 'CLIENT_SEED';
+      21              : 
+      22              :   bool _initialized = false;
+      23              : 
+      24            0 :   @override
+      25              :   String get name => cryptoContext;
+      26              : 
+      27              :   final ICore core;
+      28              : 
+      29              :   @override
+      30              :   IGenericStore<String> keyChain;
+      31              : 
+      32              :   ICryptoUtils utils;
+      33              :   IRelayAuth relayAuth;
+      34              : 
+      35           10 :   Crypto({
+      36              :     required this.core,
+      37              :     required this.keyChain,
+      38              :     CryptoUtils? utils,
+      39              :     RelayAuth? relayAuth,
+      40           10 :   })  : utils = utils ?? CryptoUtils(),
+      41           10 :         relayAuth = relayAuth ?? RelayAuth();
+      42              : 
+      43           10 :   @override
+      44              :   Future<void> init() async {
+      45           10 :     if (_initialized) {
+      46              :       return;
+      47              :     }
+      48              : 
+      49           20 :     await keyChain.init();
+      50              : 
+      51           10 :     _initialized = true;
+      52              :   }
+      53              : 
+      54            0 :   @override
+      55              :   bool hasKeys(String tag) {
+      56            0 :     _checkInitialized();
+      57            0 :     return keyChain.has(tag);
+      58              :   }
+      59              : 
+      60            0 :   @override
+      61              :   Future<String> getClientId() async {
+      62            0 :     _checkInitialized();
+      63              : 
+      64              :     // If we don't have a pub key associated with the seed yet, make one
+      65            0 :     final Uint8List seed = await _getClientSeed();
+      66            0 :     final RelayAuthKeyPair keyPair = await relayAuth.generateKeyPair(seed);
+      67            0 :     return relayAuth.encodeIss(keyPair.publicKeyBytes);
+      68              :   }
+      69              : 
+      70            6 :   @override
+      71              :   Future<String> generateKeyPair() async {
+      72            6 :     _checkInitialized();
+      73              : 
+      74           12 :     CryptoKeyPair keyPair = utils.generateKeyPair();
+      75            6 :     return await _setPrivateKey(keyPair);
+      76              :   }
+      77              : 
+      78            6 :   @override
+      79              :   Future<String> generateSharedKey(
+      80              :     String selfPublicKey,
+      81              :     String peerPublicKey, {
+      82              :     String? overrideTopic,
+      83              :   }) async {
+      84            6 :     _checkInitialized();
+      85              : 
+      86            6 :     String privKey = _getPrivateKey(selfPublicKey)!;
+      87           12 :     String symKey = await utils.deriveSymKey(privKey, peerPublicKey);
+      88            6 :     return await setSymKey(symKey, overrideTopic: overrideTopic);
+      89              :   }
+      90              : 
+      91            8 :   @override
+      92              :   Future<String> setSymKey(
+      93              :     String symKey, {
+      94              :     String? overrideTopic,
+      95              :   }) async {
+      96            8 :     _checkInitialized();
+      97              : 
+      98           16 :     final String topic = overrideTopic ?? utils.hashKey(symKey);
+      99              :     // print('crypto setSymKey, symKey: $symKey, overrideTopic: $topic');
+     100           16 :     await keyChain.set(topic, symKey);
+     101              :     return topic;
+     102              :   }
+     103              : 
+     104            4 :   @override
+     105              :   Future<void> deleteKeyPair(String publicKey) async {
+     106            4 :     _checkInitialized();
+     107            8 :     await keyChain.delete(publicKey);
+     108              :   }
+     109              : 
+     110            6 :   @override
+     111              :   Future<void> deleteSymKey(String topic) async {
+     112            6 :     _checkInitialized();
+     113           12 :     await keyChain.delete(topic);
+     114              :   }
+     115              : 
+     116            7 :   @override
+     117              :   Future<String?> encode(
+     118              :     String topic,
+     119              :     Map<String, dynamic> payload, {
+     120              :     EncodeOptions? options,
+     121              :   }) async {
+     122            7 :     _checkInitialized();
+     123              : 
+     124              :     EncodingValidation params;
+     125              :     if (options == null) {
+     126           14 :       params = utils.validateEncoding();
+     127              :     } else {
+     128            4 :       params = utils.validateEncoding(
+     129            2 :         type: options.type,
+     130            2 :         senderPublicKey: options.senderPublicKey,
+     131            2 :         receiverPublicKey: options.receiverPublicKey,
+     132              :       );
+     133              :     }
+     134              : 
+     135            7 :     final String message = jsonEncode(payload);
+     136              : 
+     137           14 :     if (utils.isTypeOneEnvelope(params)) {
+     138            2 :       final String selfPublicKey = params.senderPublicKey!;
+     139            2 :       final String peerPublicKey = params.receiverPublicKey!;
+     140            2 :       topic = await generateSharedKey(selfPublicKey, peerPublicKey);
+     141              :     }
+     142              : 
+     143            7 :     final String? symKey = _getSymKey(topic);
+     144              :     if (symKey == null) {
+     145              :       return null;
+     146              :     }
+     147              : 
+     148           14 :     final String result = await utils.encrypt(
+     149              :       message,
+     150              :       symKey,
+     151            7 :       type: params.type,
+     152            7 :       senderPublicKey: params.senderPublicKey,
+     153              :     );
+     154              : 
+     155              :     return result;
+     156              :   }
+     157              : 
+     158            7 :   @override
+     159              :   Future<String?> decode(
+     160              :     String topic,
+     161              :     String encoded, {
+     162              :     DecodeOptions? options,
+     163              :   }) async {
+     164            7 :     _checkInitialized();
+     165              : 
+     166           14 :     final EncodingValidation params = utils.validateDecoding(
+     167              :       encoded,
+     168            6 :       receiverPublicKey: options?.receiverPublicKey,
+     169              :     );
+     170              : 
+     171           14 :     if (utils.isTypeOneEnvelope(params)) {
+     172            2 :       final String selfPublicKey = params.receiverPublicKey!;
+     173            2 :       final String peerPublicKey = params.senderPublicKey!;
+     174            2 :       topic = await generateSharedKey(selfPublicKey, peerPublicKey);
+     175              :     }
+     176            7 :     final String? symKey = _getSymKey(topic);
+     177              :     if (symKey == null) {
+     178              :       return null;
+     179              :     }
+     180              : 
+     181           14 :     final String message = await utils.decrypt(symKey, encoded);
+     182              : 
+     183              :     return message;
+     184              :   }
+     185              : 
+     186            9 :   @override
+     187              :   Future<String> signJWT(String aud) async {
+     188            9 :     _checkInitialized();
+     189              : 
+     190            9 :     final Uint8List seed = await _getClientSeed();
+     191           18 :     final RelayAuthKeyPair keyPair = await relayAuth.generateKeyPair(seed);
+     192           18 :     final String sub = utils.generateRandomBytes32();
+     193           18 :     final jwt = await relayAuth.signJWT(
+     194              :       sub: sub,
+     195              :       aud: aud,
+     196              :       ttl: WalletConnectConstants.ONE_DAY,
+     197              :       keyPair: keyPair,
+     198              :     );
+     199              :     return jwt;
+     200              :   }
+     201              : 
+     202            0 :   @override
+     203              :   int getPayloadType(String encoded) {
+     204            0 :     _checkInitialized();
+     205              : 
+     206            0 :     return utils.deserialize(encoded).type;
+     207              :   }
+     208              : 
+     209              :   // PRIVATE FUNCTIONS
+     210              : 
+     211            6 :   Future<String> _setPrivateKey(CryptoKeyPair keyPair) async {
+     212           24 :     await keyChain.set(keyPair.publicKey, keyPair.privateKey);
+     213            6 :     return keyPair.publicKey;
+     214              :   }
+     215              : 
+     216            6 :   String? _getPrivateKey(String publicKey) {
+     217           12 :     return keyChain.get(publicKey);
+     218              :   }
+     219              : 
+     220            7 :   String? _getSymKey(String topic) {
+     221              :     // print('crypto getSymKey: $topic');
+     222           14 :     return keyChain.get(topic);
+     223              :   }
+     224              : 
+     225              :   // Future<String> _getClientKeyFromSeed() async {
+     226              :   //   // Get the seed
+     227              :   //   String seed = await _getClientSeed();
+     228              : 
+     229              :   //   String pubKey = keyChain.get(seed);
+     230              :   //   if (pubKey == '') {
+     231              :   //     pubKey = await generateKeyPair();
+     232              :   //     await keyChain.set(seed, pubKey);
+     233              :   //   }
+     234              : 
+     235              :   //   return pubKey;
+     236              :   // }
+     237              : 
+     238            9 :   Future<Uint8List> _getClientSeed() async {
+     239           18 :     String? seed = keyChain.get(clientSeed);
+     240              :     if (seed == null) {
+     241           18 :       seed = utils.generateRandomBytes32();
+     242           18 :       await keyChain.set(clientSeed, seed);
+     243              :     }
+     244              : 
+     245           18 :     return Uint8List.fromList(hex.decode(seed));
+     246              :   }
+     247              : 
+     248           10 :   void _checkInitialized() {
+     249           10 :     if (!_initialized) {
+     250            1 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     251              :     }
+     252              :   }
+     253              : 
+     254            7 :   @override
+     255              :   ICryptoUtils getUtils() {
+     256            7 :     return utils;
+     257              :   }
+     258              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_models.dart.func-c.html b/coverage/html/core/crypto/crypto_models.dart.func-c.html new file mode 100644 index 00000000..b6a7d772 --- /dev/null +++ b/coverage/html/core/crypto/crypto_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_models.dart.func.html b/coverage/html/core/crypto/crypto_models.dart.func.html new file mode 100644 index 00000000..44e29f08 --- /dev/null +++ b/coverage/html/core/crypto/crypto_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_models.dart.gcov.html b/coverage/html/core/crypto/crypto_models.dart.gcov.html new file mode 100644 index 00000000..7352f6b6 --- /dev/null +++ b/coverage/html/core/crypto/crypto_models.dart.gcov.html @@ -0,0 +1,157 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:typed_data';
+       2              : 
+       3              : import 'package:convert/convert.dart';
+       4              : 
+       5              : class CryptoKeyPair {
+       6              :   final String privateKey;
+       7              :   final String publicKey;
+       8              : 
+       9           22 :   const CryptoKeyPair(this.privateKey, this.publicKey);
+      10              : 
+      11            0 :   Uint8List getPrivateKeyBytes() {
+      12            0 :     return Uint8List.fromList(hex.decode(privateKey));
+      13              :   }
+      14              : 
+      15            0 :   Uint8List getPublicKeyBytes() {
+      16            0 :     return Uint8List.fromList(hex.decode(publicKey));
+      17              :   }
+      18              : }
+      19              : 
+      20              : class EncryptParams {
+      21              :   String message;
+      22              :   String symKey;
+      23              :   int? type;
+      24              :   String? iv;
+      25              :   String? senderPublicKey;
+      26              : 
+      27            0 :   EncryptParams(
+      28              :     this.message,
+      29              :     this.symKey, {
+      30              :     this.type,
+      31              :     this.iv,
+      32              :     this.senderPublicKey,
+      33              :   });
+      34              : }
+      35              : 
+      36              : class EncodingParams {
+      37              :   int type;
+      38              :   Uint8List sealed;
+      39              :   Uint8List iv;
+      40              :   Uint8List ivSealed;
+      41              :   Uint8List? senderPublicKey;
+      42              : 
+      43            7 :   EncodingParams(
+      44              :     this.type,
+      45              :     this.sealed,
+      46              :     this.iv,
+      47              :     this.ivSealed, {
+      48              :     this.senderPublicKey,
+      49              :   });
+      50              : }
+      51              : 
+      52              : class EncodingValidation {
+      53              :   int type;
+      54              :   String? senderPublicKey;
+      55              :   String? receiverPublicKey;
+      56              : 
+      57            7 :   EncodingValidation(
+      58              :     this.type, {
+      59              :     this.senderPublicKey,
+      60              :     this.receiverPublicKey,
+      61              :   });
+      62              : }
+      63              : 
+      64              : class EncodeOptions {
+      65              :   static const TYPE_0 = 0;
+      66              :   static const TYPE_1 = 1;
+      67              : 
+      68              :   int? type;
+      69              :   String? senderPublicKey;
+      70              :   String? receiverPublicKey;
+      71              : 
+      72            2 :   EncodeOptions({
+      73              :     this.type,
+      74              :     this.senderPublicKey,
+      75              :     this.receiverPublicKey,
+      76              :   });
+      77              : }
+      78              : 
+      79              : class DecodeOptions {
+      80              :   String? receiverPublicKey;
+      81              : 
+      82            6 :   DecodeOptions({
+      83              :     this.receiverPublicKey,
+      84              :   });
+      85              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_utils.dart.func-c.html b/coverage/html/core/crypto/crypto_utils.dart.func-c.html new file mode 100644 index 00000000..964b663f --- /dev/null +++ b/coverage/html/core/crypto/crypto_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_utils.dart.func.html b/coverage/html/core/crypto/crypto_utils.dart.func.html new file mode 100644 index 00000000..664030ba --- /dev/null +++ b/coverage/html/core/crypto/crypto_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/crypto_utils.dart.gcov.html b/coverage/html/core/crypto/crypto_utils.dart.gcov.html new file mode 100644 index 00000000..93f9bb6a --- /dev/null +++ b/coverage/html/core/crypto/crypto_utils.dart.gcov.html @@ -0,0 +1,323 @@ + + + + + + + LCOV - lcov.info - core/crypto/crypto_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/crypto - crypto_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:math';
+       3              : import 'dart:typed_data';
+       4              : 
+       5              : import 'package:convert/convert.dart';
+       6              : import 'package:cryptography/cryptography.dart' as dc;
+       7              : import 'package:pointycastle/digests/sha256.dart';
+       8              : import 'package:pointycastle/key_derivators/hkdf.dart';
+       9              : import 'package:pointycastle/pointycastle.dart' show HkdfParameters;
+      10              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto_utils.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+      13              : import 'package:x25519/x25519.dart' as x;
+      14              : 
+      15              : class CryptoUtils extends ICryptoUtils {
+      16           30 :   static final _random = Random.secure();
+      17              : 
+      18              :   static const IV_LENGTH = 12;
+      19              :   static const KEY_LENGTH = 32;
+      20              : 
+      21              :   static const TYPE_LENGTH = 1;
+      22              : 
+      23            6 :   @override
+      24              :   CryptoKeyPair generateKeyPair() {
+      25            6 :     final kp = x.generateKeyPair();
+      26              : 
+      27            6 :     return CryptoKeyPair(
+      28           12 :       hex.encode(kp.privateKey),
+      29           12 :       hex.encode(kp.publicKey),
+      30              :     );
+      31              :   }
+      32              : 
+      33           10 :   @override
+      34              :   Uint8List randomBytes(int length) {
+      35           10 :     final Uint8List random = Uint8List(length);
+      36           20 :     for (int i = 0; i < length; i++) {
+      37           30 :       random[i] = _random.nextInt(256);
+      38              :     }
+      39              :     return random;
+      40              :   }
+      41              : 
+      42           10 :   @override
+      43              :   String generateRandomBytes32() {
+      44           20 :     return hex.encode(randomBytes(32));
+      45              :   }
+      46              : 
+      47            6 :   @override
+      48              :   Future<String> deriveSymKey(String privKeyA, String pubKeyB) async {
+      49            6 :     final Uint8List sharedKey1 = x.X25519(
+      50            6 :       hex.decode(privKeyA),
+      51            6 :       hex.decode(pubKeyB),
+      52              :     );
+      53              : 
+      54            6 :     Uint8List out = Uint8List(KEY_LENGTH);
+      55              : 
+      56           12 :     final HKDFKeyDerivator hkdf = HKDFKeyDerivator(SHA256Digest());
+      57            6 :     final HkdfParameters params = HkdfParameters(
+      58              :       sharedKey1,
+      59              :       KEY_LENGTH,
+      60              :     );
+      61            6 :     hkdf.init(params);
+      62              :     // final pc.KeyParameter keyParam = hkdf.extract(null, sharedKey1);
+      63            6 :     hkdf.deriveKey(null, 0, out, 0);
+      64            6 :     return hex.encode(out);
+      65              :   }
+      66              : 
+      67            8 :   @override
+      68              :   String hashKey(String key) {
+      69            8 :     return hex.encode(
+      70           16 :       SHA256Digest().process(
+      71            8 :         Uint8List.fromList(
+      72            8 :           hex.decode(key),
+      73              :         ),
+      74              :       ),
+      75              :     );
+      76              :     // return hex.encode(Hash.sha256(hex.decode(key)));
+      77              :   }
+      78              : 
+      79            5 :   @override
+      80              :   String hashMessage(String message) {
+      81            5 :     return hex.encode(
+      82           10 :       SHA256Digest().process(
+      83            5 :         Uint8List.fromList(
+      84            5 :           utf8.encode(message),
+      85              :         ),
+      86              :       ),
+      87              :     );
+      88              :   }
+      89              : 
+      90            7 :   @override
+      91              :   Future<String> encrypt(
+      92              :     String message,
+      93              :     String symKey, {
+      94              :     int? type,
+      95              :     String? iv,
+      96              :     String? senderPublicKey,
+      97              :   }) async {
+      98              :     final int decodedType = type ?? EncodeOptions.TYPE_0;
+      99              :     // print(message);
+     100              :     // print(symKey);
+     101              : 
+     102              :     // Check for type 1 envelope, throw an error if data is invalid
+     103            7 :     if (decodedType == EncodeOptions.TYPE_1 && senderPublicKey == null) {
+     104              :       throw const WalletConnectError(
+     105              :         code: -1,
+     106              :         message: 'Missing sender public key for type 1 envelope',
+     107              :       );
+     108              :     }
+     109              : 
+     110              :     // final String senderPublicKey = senderPublicKey !=
+     111              :     final Uint8List usedIV =
+     112            8 :         (iv != null ? hex.decode(iv) : randomBytes(IV_LENGTH)) as Uint8List;
+     113              : 
+     114            7 :     final chacha = dc.Chacha20.poly1305Aead();
+     115            7 :     dc.SecretBox b = await chacha.encrypt(
+     116            7 :       utf8.encode(message),
+     117            7 :       secretKey: dc.SecretKey(
+     118            7 :         hex.decode(symKey),
+     119              :       ),
+     120              :       nonce: usedIV,
+     121              :     );
+     122              : 
+     123            7 :     return serialize(
+     124              :       decodedType,
+     125            7 :       b.concatenation(),
+     126              :       usedIV,
+     127              :       senderPublicKey: senderPublicKey != null
+     128            3 :           ? hex.decode(senderPublicKey) as Uint8List
+     129              :           : null,
+     130              :     );
+     131              :   }
+     132              : 
+     133            7 :   @override
+     134              :   Future<String> decrypt(String symKey, String encoded) async {
+     135            7 :     final chacha = dc.Chacha20.poly1305Aead();
+     136            7 :     final dc.SecretKey secretKey = dc.SecretKey(
+     137            7 :       hex.decode(symKey),
+     138              :     );
+     139            7 :     final EncodingParams encodedData = deserialize(encoded);
+     140            7 :     final dc.SecretBox b = dc.SecretBox.fromConcatenation(
+     141            7 :       encodedData.ivSealed,
+     142              :       nonceLength: 12,
+     143              :       macLength: 16,
+     144              :     );
+     145            7 :     List<int> data = await chacha.decrypt(b, secretKey: secretKey);
+     146            7 :     return utf8.decode(data);
+     147              :   }
+     148              : 
+     149            7 :   @override
+     150              :   String serialize(
+     151              :     int type,
+     152              :     Uint8List sealed,
+     153              :     Uint8List iv, {
+     154              :     Uint8List? senderPublicKey,
+     155              :   }) {
+     156            7 :     List<int> l = [type];
+     157              : 
+     158            7 :     if (type == EncodeOptions.TYPE_1) {
+     159              :       if (senderPublicKey == null) {
+     160              :         throw const WalletConnectError(
+     161              :           code: -1,
+     162              :           message: 'Missing sender public key for type 1 envelope',
+     163              :         );
+     164              :       }
+     165              : 
+     166            3 :       l.addAll(senderPublicKey);
+     167              :     }
+     168              : 
+     169              :     // l.addAll(iv);
+     170            7 :     l.addAll(sealed);
+     171              : 
+     172            7 :     return base64Encode(l);
+     173              :   }
+     174              : 
+     175            7 :   @override
+     176              :   EncodingParams deserialize(String encoded) {
+     177            7 :     final Uint8List bytes = base64Decode(encoded);
+     178            7 :     final int type = bytes[0];
+     179              : 
+     180              :     int index = TYPE_LENGTH;
+     181              :     Uint8List? senderPublicKey;
+     182            7 :     if (type == EncodeOptions.TYPE_1) {
+     183            3 :       senderPublicKey = bytes.sublist(
+     184              :         index,
+     185            3 :         index + KEY_LENGTH,
+     186              :       );
+     187            3 :       index += KEY_LENGTH;
+     188              :     }
+     189           14 :     Uint8List iv = bytes.sublist(index, index + IV_LENGTH);
+     190            7 :     Uint8List ivSealed = bytes.sublist(index);
+     191            7 :     index += IV_LENGTH;
+     192            7 :     Uint8List sealed = bytes.sublist(index);
+     193              : 
+     194            7 :     return EncodingParams(
+     195              :       type,
+     196              :       sealed,
+     197              :       iv,
+     198              :       ivSealed,
+     199              :       senderPublicKey: senderPublicKey,
+     200              :     );
+     201              :   }
+     202              : 
+     203            7 :   @override
+     204              :   EncodingValidation validateDecoding(
+     205              :     String encoded, {
+     206              :     String? receiverPublicKey,
+     207              :   }) {
+     208            7 :     final EncodingParams deserialized = deserialize(encoded);
+     209            7 :     final String? senderPublicKey = deserialized.senderPublicKey != null
+     210            6 :         ? hex.encode(deserialized.senderPublicKey!)
+     211              :         : null;
+     212            7 :     return validateEncoding(
+     213            7 :       type: deserialized.type,
+     214              :       senderPublicKey: senderPublicKey,
+     215              :       receiverPublicKey: receiverPublicKey,
+     216              :     );
+     217              :   }
+     218              : 
+     219            7 :   @override
+     220              :   EncodingValidation validateEncoding({
+     221              :     int? type,
+     222              :     String? senderPublicKey,
+     223              :     String? receiverPublicKey,
+     224              :   }) {
+     225              :     final int t = type ?? EncodeOptions.TYPE_0;
+     226            7 :     if (t == EncodeOptions.TYPE_1) {
+     227              :       if (senderPublicKey == null) {
+     228              :         throw const WalletConnectError(
+     229              :             code: -1, message: 'Missing sender public key');
+     230              :       }
+     231              :       if (receiverPublicKey == null) {
+     232              :         throw const WalletConnectError(
+     233              :             code: -1, message: 'Missing receiver public key');
+     234              :       }
+     235              :     }
+     236            7 :     return EncodingValidation(
+     237              :       t,
+     238              :       senderPublicKey: senderPublicKey,
+     239              :       receiverPublicKey: receiverPublicKey,
+     240              :     );
+     241              :   }
+     242              : 
+     243            7 :   @override
+     244              :   bool isTypeOneEnvelope(
+     245              :     EncodingValidation result,
+     246              :   ) {
+     247           14 :     return result.type == EncodeOptions.TYPE_1 &&
+     248            3 :         result.senderPublicKey != null &&
+     249            3 :         result.receiverPublicKey != null;
+     250              :   }
+     251              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/index-sort-f.html b/coverage/html/core/crypto/index-sort-f.html new file mode 100644 index 00000000..c179cdd0 --- /dev/null +++ b/coverage/html/core/crypto/index-sort-f.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - core/crypto + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
crypto.dart +
86.2%86.2%
+
86.2 %8775-
crypto_models.dart +
50.0%50.0%
+
50.0 %105-
crypto_utils.dart +
100.0%
+
100.0 %8383-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/index-sort-l.html b/coverage/html/core/crypto/index-sort-l.html new file mode 100644 index 00000000..ab3f42b3 --- /dev/null +++ b/coverage/html/core/crypto/index-sort-l.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/crypto + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
crypto_models.dart +
50.0%50.0%
+
50.0 %105
crypto.dart +
86.2%86.2%
+
86.2 %8775
crypto_utils.dart +
100.0%
+
100.0 %8383
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/crypto/index.html b/coverage/html/core/crypto/index.html new file mode 100644 index 00000000..7788838f --- /dev/null +++ b/coverage/html/core/crypto/index.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/crypto + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
crypto.dart +
86.2%86.2%
+
86.2 %8775
crypto_models.dart +
50.0%50.0%
+
50.0 %105
crypto_utils.dart +
100.0%
+
100.0 %8383
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo.dart.func-c.html b/coverage/html/core/echo/echo.dart.func-c.html new file mode 100644 index 00000000..95be6f5e --- /dev/null +++ b/coverage/html/core/echo/echo.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/echo.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo.dart.func.html b/coverage/html/core/echo/echo.dart.func.html new file mode 100644 index 00000000..a8a531c8 --- /dev/null +++ b/coverage/html/core/echo/echo.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/echo.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo.dart.gcov.html b/coverage/html/core/echo/echo.dart.gcov.html new file mode 100644 index 00000000..ccfe5963 --- /dev/null +++ b/coverage/html/core/echo/echo.dart.gcov.html @@ -0,0 +1,120 @@ + + + + + + + LCOV - lcov.info - core/echo/echo.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo.dartCoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo_client.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+       4              : 
+       5              : class Echo implements IEcho {
+       6              :   static const SUCCESS_STATUS = 'SUCCESS';
+       7              :   final ICore core;
+       8              :   final IEchoClient echoClient;
+       9              : 
+      10           11 :   Echo({required this.core, required this.echoClient});
+      11              : 
+      12            1 :   @override
+      13              :   Future<void> register(String firebaseAccessToken) async {
+      14            2 :     final projectId = core.projectId;
+      15            3 :     final clientId = await core.crypto.getClientId();
+      16            2 :     final response = await echoClient.register(
+      17              :       projectId: projectId,
+      18              :       clientId: clientId,
+      19              :       firebaseAccessToken: firebaseAccessToken,
+      20              :     );
+      21              : 
+      22            2 :     if (response.status != SUCCESS_STATUS) {
+      23            3 :       if (response.errors != null && response.errors!.isNotEmpty) {
+      24            4 :         throw ArgumentError(response.errors!.first.message);
+      25              :       }
+      26              : 
+      27            0 :       throw Exception('Unknown error');
+      28              :     }
+      29              :   }
+      30              : 
+      31            1 :   @override
+      32              :   Future<void> unregister() async {
+      33            2 :     final projectId = core.projectId;
+      34            3 :     final clientId = await core.crypto.getClientId();
+      35            2 :     final response = await echoClient.unregister(
+      36              :       projectId: projectId,
+      37              :       clientId: clientId,
+      38              :     );
+      39              : 
+      40            2 :     if (response.status != SUCCESS_STATUS) {
+      41            3 :       if (response.errors != null && response.errors!.isNotEmpty) {
+      42            4 :         throw ArgumentError(response.errors!.first.message);
+      43              :       }
+      44              : 
+      45            0 :       throw Exception('Unknown error');
+      46              :     }
+      47              :   }
+      48              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo_client.dart.func-c.html b/coverage/html/core/echo/echo_client.dart.func-c.html new file mode 100644 index 00000000..60067cb5 --- /dev/null +++ b/coverage/html/core/echo/echo_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/echo_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo_client.dart.func.html b/coverage/html/core/echo/echo_client.dart.func.html new file mode 100644 index 00000000..941b8213 --- /dev/null +++ b/coverage/html/core/echo/echo_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/echo_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/echo_client.dart.gcov.html b/coverage/html/core/echo/echo_client.dart.gcov.html new file mode 100644 index 00000000..59b3d006 --- /dev/null +++ b/coverage/html/core/echo/echo_client.dart.gcov.html @@ -0,0 +1,119 @@ + + + + + + + LCOV - lcov.info - core/echo/echo_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo - echo_client.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:http/http.dart' as http;
+       4              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo_client.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/echo/models/echo_body.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/echo/models/echo_response.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+       8              : 
+       9              : class EchoClient implements IEchoClient {
+      10              :   static const headers = {'Content-Type': 'application/json'};
+      11              :   final IHttpClient httpClient;
+      12              :   final String baseUrl;
+      13              : 
+      14           11 :   EchoClient({required this.baseUrl, required this.httpClient});
+      15              : 
+      16            1 :   @override
+      17              :   Future<EchoResponse> register({
+      18              :     required String projectId,
+      19              :     required String clientId,
+      20              :     required String firebaseAccessToken,
+      21              :   }) async {
+      22            1 :     final body = EchoBody(clientId: clientId, token: firebaseAccessToken);
+      23              : 
+      24            3 :     final url = Uri.parse('$baseUrl/$projectId/clients?auth=$clientId');
+      25            2 :     final http.Response response = await httpClient.post(
+      26              :       url,
+      27              :       headers: headers,
+      28            2 :       body: jsonEncode(body.toJson()),
+      29              :     );
+      30              : 
+      31            2 :     final jsonMap = json.decode(response.body);
+      32            1 :     return EchoResponse.fromJson(jsonMap);
+      33              :   }
+      34              : 
+      35            1 :   @override
+      36              :   Future<EchoResponse> unregister({
+      37              :     required String projectId,
+      38              :     required String clientId,
+      39              :   }) async {
+      40            3 :     final url = Uri.parse('$baseUrl/$projectId/clients/$clientId');
+      41              :     final http.Response response =
+      42            2 :         await httpClient.delete(url, headers: headers);
+      43              : 
+      44            2 :     final jsonMap = json.decode(response.body);
+      45            1 :     return EchoResponse.fromJson(jsonMap);
+      46              :   }
+      47              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/index-sort-f.html b/coverage/html/core/echo/index-sort-f.html new file mode 100644 index 00000000..fd52e9f6 --- /dev/null +++ b/coverage/html/core/echo/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - core/echo + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
echo.dart +
88.2%88.2%
+
88.2 %1715-
echo_client.dart +
100.0%
+
100.0 %1313-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/index-sort-l.html b/coverage/html/core/echo/index-sort-l.html new file mode 100644 index 00000000..f0cb662f --- /dev/null +++ b/coverage/html/core/echo/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/echo + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo.dart +
88.2%88.2%
+
88.2 %1715
echo_client.dart +
100.0%
+
100.0 %1313
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/index.html b/coverage/html/core/echo/index.html new file mode 100644 index 00000000..b60e9c16 --- /dev/null +++ b/coverage/html/core/echo/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/echo + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo.dart +
88.2%88.2%
+
88.2 %1715
echo_client.dart +
100.0%
+
100.0 %1313
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_body.dart.func-c.html b/coverage/html/core/echo/models/echo_body.dart.func-c.html new file mode 100644 index 00000000..fcad873d --- /dev/null +++ b/coverage/html/core/echo/models/echo_body.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_body.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_body.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_body.dart.func.html b/coverage/html/core/echo/models/echo_body.dart.func.html new file mode 100644 index 00000000..22c00c55 --- /dev/null +++ b/coverage/html/core/echo/models/echo_body.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_body.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_body.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_body.dart.gcov.html b/coverage/html/core/echo/models/echo_body.dart.gcov.html new file mode 100644 index 00000000..99b01738 --- /dev/null +++ b/coverage/html/core/echo/models/echo_body.dart.gcov.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_body.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_body.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:json_annotation/json_annotation.dart';
+       2              : 
+       3              : part 'echo_body.g.dart';
+       4              : 
+       5              : @JsonSerializable(fieldRename: FieldRename.snake)
+       6              : class EchoBody {
+       7              :   final String clientId;
+       8              :   final String token;
+       9              :   final String type;
+      10              : 
+      11            1 :   EchoBody({
+      12              :     required this.clientId,
+      13              :     required this.token,
+      14              :     this.type = 'fcm',
+      15              :   });
+      16              : 
+      17            0 :   factory EchoBody.fromJson(Map<String, dynamic> json) =>
+      18            0 :       _$EchoBodyFromJson(json);
+      19              : 
+      20            2 :   Map<String, dynamic> toJson() => _$EchoBodyToJson(this);
+      21              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_response.dart.func-c.html b/coverage/html/core/echo/models/echo_response.dart.func-c.html new file mode 100644 index 00000000..b25c49ba --- /dev/null +++ b/coverage/html/core/echo/models/echo_response.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_response.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_response.dart.func.html b/coverage/html/core/echo/models/echo_response.dart.func.html new file mode 100644 index 00000000..4519efdd --- /dev/null +++ b/coverage/html/core/echo/models/echo_response.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_response.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/echo_response.dart.gcov.html b/coverage/html/core/echo/models/echo_response.dart.gcov.html new file mode 100644 index 00000000..455f0318 --- /dev/null +++ b/coverage/html/core/echo/models/echo_response.dart.gcov.html @@ -0,0 +1,123 @@ + + + + + + + LCOV - lcov.info - core/echo/models/echo_response.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/models - echo_response.dartCoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:json_annotation/json_annotation.dart';
+       2              : 
+       3              : part 'echo_response.g.dart';
+       4              : 
+       5              : @JsonSerializable(fieldRename: FieldRename.snake)
+       6              : class EchoResponse {
+       7              :   final List<ResponseError>? errors;
+       8              :   final List<Field>? fields;
+       9              :   final String status;
+      10              : 
+      11            1 :   EchoResponse({
+      12              :     this.errors,
+      13              :     this.fields,
+      14              :     required this.status,
+      15              :   });
+      16              : 
+      17            1 :   factory EchoResponse.fromJson(Map<String, dynamic> json) =>
+      18            1 :       _$EchoResponseFromJson(json);
+      19              : 
+      20            0 :   Map<String, dynamic> toJson() => _$EchoResponseToJson(this);
+      21              : }
+      22              : 
+      23              : @JsonSerializable(fieldRename: FieldRename.snake)
+      24              : class ResponseError {
+      25              :   final String message;
+      26              :   final String name;
+      27              : 
+      28            1 :   ResponseError({required this.message, required this.name});
+      29              : 
+      30            1 :   factory ResponseError.fromJson(Map<String, dynamic> json) =>
+      31            1 :       _$ResponseErrorFromJson(json);
+      32              : 
+      33            0 :   Map<String, dynamic> toJson() => _$ResponseErrorToJson(this);
+      34              : }
+      35              : 
+      36              : @JsonSerializable(fieldRename: FieldRename.snake)
+      37              : class Field {
+      38              :   final String description;
+      39              :   final String field;
+      40              :   final String location;
+      41              : 
+      42            1 :   Field({
+      43              :     required this.description,
+      44              :     required this.field,
+      45              :     required this.location,
+      46              :   });
+      47              : 
+      48            2 :   factory Field.fromJson(Map<String, dynamic> json) => _$FieldFromJson(json);
+      49              : 
+      50            0 :   Map<String, dynamic> toJson() => _$FieldToJson(this);
+      51              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/index-sort-f.html b/coverage/html/core/echo/models/index-sort-f.html new file mode 100644 index 00000000..b9323b45 --- /dev/null +++ b/coverage/html/core/echo/models/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - core/echo/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
echo_body.dart +
50.0%50.0%
+
50.0 %42-
echo_response.dart +
72.7%72.7%
+
72.7 %118-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/index-sort-l.html b/coverage/html/core/echo/models/index-sort-l.html new file mode 100644 index 00000000..e4f3b175 --- /dev/null +++ b/coverage/html/core/echo/models/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/echo/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo_body.dart +
50.0%50.0%
+
50.0 %42
echo_response.dart +
72.7%72.7%
+
72.7 %118
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/echo/models/index.html b/coverage/html/core/echo/models/index.html new file mode 100644 index 00000000..b7c8864c --- /dev/null +++ b/coverage/html/core/echo/models/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/echo/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo_body.dart +
50.0%50.0%
+
50.0 %42
echo_response.dart +
72.7%72.7%
+
72.7 %118
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/heartbeat.dart.func-c.html b/coverage/html/core/heartbit/heartbeat.dart.func-c.html new file mode 100644 index 00000000..cbdfc6b4 --- /dev/null +++ b/coverage/html/core/heartbit/heartbeat.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/heartbit/heartbeat.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbit - heartbeat.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/heartbeat.dart.func.html b/coverage/html/core/heartbit/heartbeat.dart.func.html new file mode 100644 index 00000000..df62e08b --- /dev/null +++ b/coverage/html/core/heartbit/heartbeat.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/heartbit/heartbeat.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbit - heartbeat.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/heartbeat.dart.gcov.html b/coverage/html/core/heartbit/heartbeat.dart.gcov.html new file mode 100644 index 00000000..6a728a27 --- /dev/null +++ b/coverage/html/core/heartbit/heartbeat.dart.gcov.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info - core/heartbit/heartbeat.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbit - heartbeat.dartCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/i_heartbeat.dart';
+       5              : 
+       6              : class HeartBeat implements IHeartBeat {
+       7              :   Timer? _heartbeatTimer;
+       8              : 
+       9              :   @override
+      10              :   int interval;
+      11              : 
+      12           10 :   HeartBeat({this.interval = 5});
+      13              : 
+      14            9 :   @override
+      15              :   void init() {
+      16            9 :     if (_heartbeatTimer != null) return;
+      17           18 :     _heartbeatTimer = Timer.periodic(
+      18           18 :       Duration(seconds: interval),
+      19           18 :       (timer) => onPulse.broadcast(),
+      20              :     );
+      21              :   }
+      22              : 
+      23            0 :   @override
+      24              :   void stop() {
+      25            0 :     _heartbeatTimer?.cancel();
+      26            0 :     _heartbeatTimer = null;
+      27              :   }
+      28              : 
+      29              :   @override
+      30              :   final Event<EventArgs> onPulse = Event();
+      31              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/index-sort-f.html b/coverage/html/core/heartbit/index-sort-f.html new file mode 100644 index 00000000..06aa4960 --- /dev/null +++ b/coverage/html/core/heartbit/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - core/heartbit + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
heartbeat.dart +
66.7%66.7%
+
66.7 %96-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/index-sort-l.html b/coverage/html/core/heartbit/index-sort-l.html new file mode 100644 index 00000000..c779ba3d --- /dev/null +++ b/coverage/html/core/heartbit/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/heartbit + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
heartbeat.dart +
66.7%66.7%
+
66.7 %96
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/heartbit/index.html b/coverage/html/core/heartbit/index.html new file mode 100644 index 00000000..ff323e89 --- /dev/null +++ b/coverage/html/core/heartbit/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/heartbit + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
heartbeat.dart +
66.7%66.7%
+
66.7 %96
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/index-sort-f.html b/coverage/html/core/index-sort-f.html new file mode 100644 index 00000000..3e1b0180 --- /dev/null +++ b/coverage/html/core/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - core + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
core.dart +
74.5%74.5%
+
74.5 %5138-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/index-sort-l.html b/coverage/html/core/index-sort-l.html new file mode 100644 index 00000000..701c0090 --- /dev/null +++ b/coverage/html/core/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core.dart +
74.5%74.5%
+
74.5 %5138
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/index.html b/coverage/html/core/index.html new file mode 100644 index 00000000..e34b4ac2 --- /dev/null +++ b/coverage/html/core/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core.dart +
74.5%74.5%
+
74.5 %5138
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/expirer.dart.func-c.html b/coverage/html/core/pairing/expirer.dart.func-c.html new file mode 100644 index 00000000..e3e71c0e --- /dev/null +++ b/coverage/html/core/pairing/expirer.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/expirer.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - expirer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/expirer.dart.func.html b/coverage/html/core/pairing/expirer.dart.func.html new file mode 100644 index 00000000..da3aad6f --- /dev/null +++ b/coverage/html/core/pairing/expirer.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/expirer.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - expirer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/expirer.dart.gcov.html b/coverage/html/core/pairing/expirer.dart.gcov.html new file mode 100644 index 00000000..fee3ae31 --- /dev/null +++ b/coverage/html/core/pairing/expirer.dart.gcov.html @@ -0,0 +1,136 @@ + + + + + + + LCOV - lcov.info - core/pairing/expirer.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - expirer.dartCoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_expirer.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
+       6              : 
+       7              : class Expirer extends GenericStore<int> implements IExpirer {
+       8              :   @override
+       9              :   final Event<ExpirationEvent> onExpire = Event();
+      10              : 
+      11           10 :   Expirer({
+      12              :     required super.storage,
+      13              :     required super.context,
+      14              :     required super.version,
+      15              :     required super.fromJson,
+      16              :   });
+      17              : 
+      18            0 :   @override
+      19              :   Future<bool> checkExpiry(String key, int expiry) async {
+      20            0 :     checkInitialized();
+      21              : 
+      22            0 :     if (WalletConnectUtils.isExpired(expiry)) {
+      23            0 :       await expire(key);
+      24              :       return true;
+      25              :     }
+      26              :     return false;
+      27              :   }
+      28              : 
+      29              :   /// Checks if the key has expired and deletes it if it has
+      30              :   /// Returns true if the key was deleted
+      31              :   /// Returns false if the key was not deleted
+      32            6 :   @override
+      33              :   Future<bool> checkAndExpire(String key) async {
+      34            6 :     checkInitialized();
+      35              : 
+      36           12 :     if (data.containsKey(key)) {
+      37           12 :       int expiration = data[key]!;
+      38            6 :       if (WalletConnectUtils.isExpired(expiration)) {
+      39            4 :         await expire(key);
+      40              :         return true;
+      41              :       }
+      42              :     }
+      43              : 
+      44              :     return false;
+      45              :   }
+      46              : 
+      47            4 :   @override
+      48              :   Future<void> expire(String key) async {
+      49            4 :     checkInitialized();
+      50              : 
+      51            8 :     int? expiry = data.remove(key);
+      52              :     if (expiry == null) {
+      53              :       return;
+      54              :     }
+      55              :     // print('Expiring $key');
+      56            8 :     onExpire.broadcast(
+      57            4 :       ExpirationEvent(
+      58              :         target: key,
+      59              :         expiry: expiry,
+      60              :       ),
+      61              :     );
+      62            4 :     await persist();
+      63              :   }
+      64              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/index-sort-f.html b/coverage/html/core/pairing/index-sort-f.html new file mode 100644 index 00000000..9521c990 --- /dev/null +++ b/coverage/html/core/pairing/index-sort-f.html @@ -0,0 +1,141 @@ + + + + + + + LCOV - lcov.info - core/pairing + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
expirer.dart +
76.5%76.5%
+
76.5 %1713-
json_rpc_history.dart +
91.7%91.7%
+
91.7 %1211-
pairing.dart +
89.5%89.5%
+
89.5 %266238-
pairing_store.dart +
100.0%
+
100.0 %88-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/index-sort-l.html b/coverage/html/core/pairing/index-sort-l.html new file mode 100644 index 00000000..c66716f2 --- /dev/null +++ b/coverage/html/core/pairing/index-sort-l.html @@ -0,0 +1,118 @@ + + + + + + + LCOV - lcov.info - core/pairing + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
expirer.dart +
76.5%76.5%
+
76.5 %1713
pairing.dart +
89.5%89.5%
+
89.5 %266238
json_rpc_history.dart +
91.7%91.7%
+
91.7 %1211
pairing_store.dart +
100.0%
+
100.0 %88
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/index.html b/coverage/html/core/pairing/index.html new file mode 100644 index 00000000..f7995060 --- /dev/null +++ b/coverage/html/core/pairing/index.html @@ -0,0 +1,118 @@ + + + + + + + LCOV - lcov.info - core/pairing + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
expirer.dart +
76.5%76.5%
+
76.5 %1713
json_rpc_history.dart +
91.7%91.7%
+
91.7 %1211
pairing.dart +
89.5%89.5%
+
89.5 %266238
pairing_store.dart +
100.0%
+
100.0 %88
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/json_rpc_history.dart.func-c.html b/coverage/html/core/pairing/json_rpc_history.dart.func-c.html new file mode 100644 index 00000000..d500c7e4 --- /dev/null +++ b/coverage/html/core/pairing/json_rpc_history.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/json_rpc_history.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - json_rpc_history.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/json_rpc_history.dart.func.html b/coverage/html/core/pairing/json_rpc_history.dart.func.html new file mode 100644 index 00000000..ee21ab03 --- /dev/null +++ b/coverage/html/core/pairing/json_rpc_history.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/json_rpc_history.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - json_rpc_history.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/json_rpc_history.dart.gcov.html b/coverage/html/core/pairing/json_rpc_history.dart.gcov.html new file mode 100644 index 00000000..8e215e39 --- /dev/null +++ b/coverage/html/core/pairing/json_rpc_history.dart.gcov.html @@ -0,0 +1,110 @@ + + + + + + + LCOV - lcov.info - core/pairing/json_rpc_history.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - json_rpc_history.dartCoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_json_rpc_history.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       4              : 
+       5              : class JsonRpcHistory extends GenericStore<JsonRpcRecord>
+       6              :     implements IJsonRpcHistory {
+       7           11 :   JsonRpcHistory({
+       8              :     required super.storage,
+       9              :     required super.context,
+      10              :     required super.version,
+      11              :     required super.fromJson,
+      12              :   });
+      13              : 
+      14            1 :   @override
+      15              :   Future<void> resolve(Map<String, dynamic> response) async {
+      16            1 :     checkInitialized();
+      17              : 
+      18              :     // If we don't have a matching id, stop
+      19            2 :     String sId = response['id'].toString();
+      20            2 :     if (!data.containsKey(sId)) {
+      21              :       return;
+      22              :     }
+      23              : 
+      24            1 :     JsonRpcRecord record = get(sId)!;
+      25              : 
+      26              :     // If we already recorded a response, stop
+      27            1 :     if (record.response != null) {
+      28              :       return;
+      29              :     }
+      30              : 
+      31            2 :     record = record.copyWith(
+      32            1 :       response: response.containsKey('result')
+      33            1 :           ? response['result']
+      34            0 :           : response['error'],
+      35              :     );
+      36            1 :     await set(sId, record);
+      37              :   }
+      38              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing.dart.func-c.html b/coverage/html/core/pairing/pairing.dart.func-c.html new file mode 100644 index 00000000..e55a9469 --- /dev/null +++ b/coverage/html/core/pairing/pairing.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing.dart.func.html b/coverage/html/core/pairing/pairing.dart.func.html new file mode 100644 index 00000000..9e103990 --- /dev/null +++ b/coverage/html/core/pairing/pairing.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing.dart.gcov.html b/coverage/html/core/pairing/pairing.dart.gcov.html new file mode 100644 index 00000000..3c04729e --- /dev/null +++ b/coverage/html/core/pairing/pairing.dart.gcov.html @@ -0,0 +1,909 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing.dartCoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : import 'dart:convert';
+       3              : 
+       4              : import 'package:event/event.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_json_rpc_history.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing_store.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/models/uri_parse_result.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+      16              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
+      17              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_response.dart';
+      18              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+      19              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      20              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+      21              : import 'package:walletconnect_flutter_v2/apis/utils/method_constants.dart';
+      22              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
+      23              : 
+      24              : class PendingRequestResponse {
+      25              :   Completer completer;
+      26              :   dynamic response;
+      27              :   JsonRpcError? error;
+      28              : 
+      29            6 :   PendingRequestResponse({
+      30              :     required this.completer,
+      31              :     this.response,
+      32              :     this.error,
+      33              :   });
+      34              : }
+      35              : 
+      36              : class Pairing implements IPairing {
+      37              :   bool _initialized = false;
+      38              : 
+      39              :   @override
+      40              :   final Event<PairingEvent> onPairingCreate = Event<PairingEvent>();
+      41              :   @override
+      42              :   final Event<PairingActivateEvent> onPairingActivate =
+      43              :       Event<PairingActivateEvent>();
+      44              :   @override
+      45              :   final Event<PairingEvent> onPairingPing = Event<PairingEvent>();
+      46              :   @override
+      47              :   final Event<PairingInvalidEvent> onPairingInvalid =
+      48              :       Event<PairingInvalidEvent>();
+      49              :   @override
+      50              :   final Event<PairingEvent> onPairingDelete = Event<PairingEvent>();
+      51              :   @override
+      52              :   final Event<PairingEvent> onPairingExpire = Event<PairingEvent>();
+      53              : 
+      54              :   /// Stores all the pending requests
+      55              :   Map<int, PendingRequestResponse> pendingRequests = {};
+      56              : 
+      57              :   final ICore core;
+      58              :   final IPairingStore pairings;
+      59              :   final IJsonRpcHistory history;
+      60              : 
+      61              :   /// Stores the public key of Type 1 Envelopes for a topic
+      62              :   /// Once a receiver public key has been used, it is removed from the store
+      63              :   /// Thus, this store works under the assumption that a public key will only be used once
+      64              :   final IGenericStore<ReceiverPublicKey> topicToReceiverPublicKey;
+      65              : 
+      66           10 :   Pairing({
+      67              :     required this.core,
+      68              :     required this.pairings,
+      69              :     required this.history,
+      70              :     required this.topicToReceiverPublicKey,
+      71              :   });
+      72              : 
+      73            9 :   @override
+      74              :   Future<void> init() async {
+      75            9 :     if (_initialized) {
+      76              :       return;
+      77              :     }
+      78              : 
+      79            9 :     _registerRelayEvents();
+      80            9 :     _registerExpirerEvents();
+      81            9 :     _registerheartbeatSubscription();
+      82              : 
+      83           27 :     await core.expirer.init();
+      84           18 :     await pairings.init();
+      85           18 :     await history.init();
+      86           18 :     await topicToReceiverPublicKey.init();
+      87              : 
+      88            9 :     await _cleanup();
+      89              : 
+      90            9 :     await _resubscribeAll();
+      91              : 
+      92            9 :     _initialized = true;
+      93              :   }
+      94              : 
+      95            6 :   @override
+      96              :   Future<void> checkAndExpire() async {
+      97           12 :     for (var pairing in getPairings()) {
+      98           24 :       await core.expirer.checkAndExpire(pairing.topic);
+      99              :     }
+     100              :   }
+     101              : 
+     102            7 :   @override
+     103              :   Future<CreateResponse> create({List<List<String>>? methods}) async {
+     104            7 :     _checkInitialized();
+     105           28 :     final String symKey = core.crypto.getUtils().generateRandomBytes32();
+     106           21 :     final String topic = await core.crypto.setSymKey(symKey);
+     107            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
+     108              :       WalletConnectConstants.FIVE_MINUTES,
+     109              :     );
+     110            7 :     final Relay relay = Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL);
+     111            7 :     final PairingInfo pairing = PairingInfo(
+     112              :       topic: topic,
+     113              :       expiry: expiry,
+     114              :       relay: relay,
+     115              :       active: false,
+     116           20 :       methods: methods?.expand((e) => e).toList() ?? [],
+     117              :     );
+     118            7 :     final Uri uri = WalletConnectUtils.formatUri(
+     119           14 :       protocol: core.protocol,
+     120           14 :       version: core.version,
+     121              :       topic: topic,
+     122              :       symKey: symKey,
+     123              :       relay: relay,
+     124              :       methods: methods,
+     125              :       expiry: expiry,
+     126              :     );
+     127              : 
+     128           14 :     onPairingCreate.broadcast(
+     129            7 :       PairingEvent(
+     130              :         topic: topic,
+     131              :       ),
+     132              :     );
+     133              : 
+     134           14 :     await pairings.set(topic, pairing);
+     135           21 :     await core.relayClient.subscribe(topic: topic);
+     136           21 :     await core.expirer.set(topic, expiry);
+     137              : 
+     138            7 :     return CreateResponse(
+     139              :       topic: topic,
+     140              :       uri: uri,
+     141              :       pairingInfo: pairing,
+     142              :     );
+     143              :   }
+     144              : 
+     145            7 :   @override
+     146              :   Future<PairingInfo> pair({
+     147              :     required Uri uri,
+     148              :     bool activatePairing = false,
+     149              :   }) async {
+     150            7 :     _checkInitialized();
+     151              : 
+     152              :     // print(uri.queryParameters);
+     153            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
+     154              :       WalletConnectConstants.FIVE_MINUTES,
+     155              :     );
+     156            7 :     final URIParseResult parsedUri = WalletConnectUtils.parseUri(uri);
+     157           14 :     if (parsedUri.version != URIVersion.v2) {
+     158            3 :       throw Errors.getInternalError(
+     159              :         Errors.MISSING_OR_INVALID,
+     160              :         context: 'URI is not WalletConnect version 2 URI',
+     161              :       );
+     162              :     }
+     163              : 
+     164            7 :     final String topic = parsedUri.topic;
+     165           14 :     final Relay relay = parsedUri.v2Data!.relay;
+     166           14 :     final String symKey = parsedUri.v2Data!.symKey;
+     167            7 :     final PairingInfo pairing = PairingInfo(
+     168              :       topic: topic,
+     169              :       expiry: expiry,
+     170              :       relay: relay,
+     171              :       active: false,
+     172           14 :       methods: parsedUri.v2Data!.methods,
+     173              :     );
+     174              : 
+     175              :     try {
+     176            7 :       JsonRpcUtils.validateMethods(
+     177           14 :         parsedUri.v2Data!.methods,
+     178           21 :         routerMapRequest.values.toList(),
+     179              :       );
+     180            4 :     } on WalletConnectError catch (e) {
+     181              :       // Tell people that the pairing is invalid
+     182            8 :       onPairingInvalid.broadcast(
+     183            4 :         PairingInvalidEvent(
+     184            4 :           message: e.message,
+     185              :         ),
+     186              :       );
+     187              : 
+     188              :       // Delete the pairing: "publish internally with reason"
+     189              :       // await _deletePairing(
+     190              :       //   topic,
+     191              :       //   false,
+     192              :       // );
+     193              : 
+     194              :       rethrow;
+     195              :     }
+     196              : 
+     197              :     try {
+     198           14 :       await pairings.set(topic, pairing);
+     199           21 :       await core.crypto.setSymKey(symKey, overrideTopic: topic);
+     200           28 :       await core.relayClient.subscribe(topic: topic).timeout(
+     201              :             const Duration(seconds: 15),
+     202              :           );
+     203           21 :       await core.expirer.set(topic, expiry);
+     204              : 
+     205           14 :       onPairingCreate.broadcast(
+     206            7 :         PairingEvent(
+     207              :           topic: topic,
+     208              :         ),
+     209              :       );
+     210              : 
+     211              :       if (activatePairing) {
+     212            2 :         await activate(topic: topic);
+     213              :       }
+     214              :     } catch (e) {
+     215              :       rethrow;
+     216              :     }
+     217              : 
+     218              :     return pairing;
+     219              :   }
+     220              : 
+     221            7 :   @override
+     222              :   Future<void> activate({required String topic}) async {
+     223            7 :     _checkInitialized();
+     224            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
+     225              :       WalletConnectConstants.THIRTY_DAYS,
+     226              :     );
+     227              :     // print('Activating pairing with topic: $topic');
+     228              : 
+     229           14 :     onPairingActivate.broadcast(
+     230            7 :       PairingActivateEvent(
+     231              :         topic: topic,
+     232              :         expiry: expiry,
+     233              :       ),
+     234              :     );
+     235              : 
+     236           14 :     await pairings.update(
+     237              :       topic,
+     238              :       expiry: expiry,
+     239              :       active: true,
+     240              :     );
+     241           21 :     await core.expirer.set(topic, expiry);
+     242              :   }
+     243              : 
+     244            9 :   @override
+     245              :   void register({
+     246              :     required String method,
+     247              :     required Function(String, JsonRpcRequest) function,
+     248              :     required ProtocolType type,
+     249              :   }) {
+     250           18 :     if (routerMapRequest.containsKey(method)) {
+     251            6 :       final registered = routerMapRequest[method];
+     252            6 :       if (registered!.type == type) {
+     253              :         throw const WalletConnectError(
+     254              :           code: -1,
+     255              :           message: 'Method already exists',
+     256              :         );
+     257              :       }
+     258              :     }
+     259              : 
+     260           27 :     routerMapRequest[method] = RegisteredFunction(
+     261              :       method: method,
+     262              :       function: function,
+     263              :       type: type,
+     264              :     );
+     265              :   }
+     266              : 
+     267            2 :   @override
+     268              :   Future<void> setReceiverPublicKey({
+     269              :     required String topic,
+     270              :     required String publicKey,
+     271              :     int? expiry,
+     272              :   }) async {
+     273            2 :     _checkInitialized();
+     274            4 :     await topicToReceiverPublicKey.set(
+     275              :       topic,
+     276            2 :       ReceiverPublicKey(
+     277              :         topic: topic,
+     278              :         publicKey: publicKey,
+     279            2 :         expiry: WalletConnectUtils.calculateExpiry(
+     280              :           expiry ?? WalletConnectConstants.FIVE_MINUTES,
+     281              :         ),
+     282              :       ),
+     283              :     );
+     284              :   }
+     285              : 
+     286            1 :   @override
+     287              :   Future<void> updateExpiry({
+     288              :     required String topic,
+     289              :     required int expiry,
+     290              :   }) async {
+     291            1 :     _checkInitialized();
+     292              : 
+     293              :     // Validate the expiry is less than 30 days
+     294            1 :     if (expiry >
+     295            1 :         WalletConnectUtils.calculateExpiry(
+     296              :           WalletConnectConstants.THIRTY_DAYS,
+     297              :         )) {
+     298              :       throw const WalletConnectError(
+     299              :         code: -1,
+     300              :         message: 'Expiry cannot be more than 30 days away',
+     301              :       );
+     302              :     }
+     303              : 
+     304            2 :     await pairings.update(
+     305              :       topic,
+     306              :       expiry: expiry,
+     307              :     );
+     308            3 :     await core.expirer.set(
+     309              :       topic,
+     310              :       expiry,
+     311              :     );
+     312              :   }
+     313              : 
+     314            5 :   @override
+     315              :   Future<void> updateMetadata({
+     316              :     required String topic,
+     317              :     required PairingMetadata metadata,
+     318              :   }) async {
+     319            5 :     _checkInitialized();
+     320           10 :     await pairings.update(
+     321              :       topic,
+     322              :       metadata: metadata,
+     323              :     );
+     324              :   }
+     325              : 
+     326            9 :   @override
+     327              :   List<PairingInfo> getPairings() {
+     328           18 :     return pairings.getAll();
+     329              :   }
+     330              : 
+     331            4 :   @override
+     332              :   PairingInfo? getPairing({required String topic}) {
+     333            8 :     return pairings.get(topic);
+     334              :   }
+     335              : 
+     336            5 :   @override
+     337              :   Future<void> ping({required String topic}) async {
+     338            5 :     _checkInitialized();
+     339              : 
+     340            5 :     await _isValidPing(topic);
+     341              : 
+     342           10 :     if (pairings.has(topic)) {
+     343              :       // try {
+     344            5 :       final bool _ = await sendRequest(
+     345              :         topic,
+     346              :         MethodConstants.WC_PAIRING_PING,
+     347            5 :         {},
+     348              :       );
+     349              :     }
+     350              :   }
+     351              : 
+     352            4 :   @override
+     353              :   Future<void> disconnect({required String topic}) async {
+     354            4 :     _checkInitialized();
+     355              : 
+     356            4 :     await _isValidDisconnect(topic);
+     357            8 :     if (pairings.has(topic)) {
+     358              :       // Send the request to delete the pairing, we don't care if it fails
+     359              :       try {
+     360            4 :         sendRequest(
+     361              :           topic,
+     362              :           MethodConstants.WC_PAIRING_DELETE,
+     363            8 :           Errors.getSdkError(Errors.USER_DISCONNECTED).toJson(),
+     364              :         );
+     365              :       } catch (_) {}
+     366              : 
+     367              :       // Delete the pairing
+     368            8 :       await pairings.delete(topic);
+     369              : 
+     370            8 :       onPairingDelete.broadcast(
+     371            4 :         PairingEvent(
+     372              :           topic: topic,
+     373              :         ),
+     374              :       );
+     375              :     }
+     376              :   }
+     377              : 
+     378            5 :   @override
+     379              :   IPairingStore getStore() {
+     380            5 :     return pairings;
+     381              :   }
+     382              : 
+     383            6 :   @override
+     384              :   Future<void> isValidPairingTopic({required String topic}) async {
+     385           12 :     if (!pairings.has(topic)) {
+     386            4 :       throw Errors.getInternalError(
+     387              :         Errors.NO_MATCHING_KEY,
+     388            4 :         context: "pairing topic doesn't exist: $topic",
+     389              :       );
+     390              :     }
+     391              : 
+     392           18 :     if (await core.expirer.checkAndExpire(topic)) {
+     393            0 :       throw Errors.getInternalError(
+     394              :         Errors.EXPIRED,
+     395            0 :         context: 'pairing topic: $topic',
+     396              :       );
+     397              :     }
+     398              :   }
+     399              : 
+     400              :   // RELAY COMMUNICATION HELPERS
+     401              : 
+     402            6 :   @override
+     403              :   Future sendRequest(
+     404              :     String topic,
+     405              :     String method,
+     406              :     dynamic params, {
+     407              :     int? id,
+     408              :     int? ttl,
+     409              :     EncodeOptions? encodeOptions,
+     410              :   }) async {
+     411           18 :     core.logger.t(
+     412            6 :       'pairing sendRequest, id: $id topic: $topic, method: $method, params: $params, ttl: $ttl',
+     413              :     );
+     414              : 
+     415            6 :     final payload = JsonRpcUtils.formatJsonRpcRequest(
+     416              :       method,
+     417              :       params,
+     418              :       id: id,
+     419              :     );
+     420              :     // print('sending request: $payload');
+     421              : 
+     422           18 :     final message = await core.crypto.encode(
+     423              :       topic,
+     424              :       payload,
+     425              :       options: encodeOptions,
+     426              :     );
+     427              : 
+     428              :     if (message == null) {
+     429              :       return;
+     430              :     }
+     431              : 
+     432           12 :     RpcOptions opts = MethodConstants.RPC_OPTS[method]!['req']!;
+     433              :     if (ttl != null) {
+     434            4 :       opts = opts.copyWith(ttl: ttl);
+     435              :     }
+     436              : 
+     437              :     // print('adding payload to pending requests: ${payload['id']}');
+     438           12 :     final resp = PendingRequestResponse(completer: Completer());
+     439           21 :     resp.completer.future.catchError((err) {
+     440              :       // Catch the error so that it won't throw an uncaught error
+     441              :     });
+     442           18 :     pendingRequests[payload['id']] = resp;
+     443              :     // print('sent request');
+     444           18 :     await core.relayClient.publish(
+     445              :       topic: topic,
+     446              :       message: message,
+     447            6 :       ttl: opts.ttl,
+     448            6 :       tag: opts.tag,
+     449              :     );
+     450              : 
+     451              :     // Get the result from the completer, if it's an error, throw it
+     452              :     try {
+     453            6 :       if (resp.error != null) {
+     454            0 :         throw resp.error!;
+     455              :       }
+     456              : 
+     457              :       // print('checking if completed');
+     458           12 :       if (resp.completer.isCompleted) {
+     459            0 :         return resp.response;
+     460              :       }
+     461              : 
+     462           12 :       return await resp.completer.future;
+     463              :     } catch (e) {
+     464              :       rethrow;
+     465              :     }
+     466              :   }
+     467              : 
+     468            6 :   @override
+     469              :   Future<void> sendResult(
+     470              :     int id,
+     471              :     String topic,
+     472              :     String method,
+     473              :     dynamic result, {
+     474              :     EncodeOptions? encodeOptions,
+     475              :   }) async {
+     476           18 :     core.logger.t(
+     477            6 :       'pairing sendResult, id: $id topic: $topic, method: $method, result: $result',
+     478              :     );
+     479              :     final Map<String, dynamic> payload =
+     480            6 :         JsonRpcUtils.formatJsonRpcResponse<dynamic>(
+     481              :       id,
+     482              :       result,
+     483              :     );
+     484           18 :     final String? message = await core.crypto.encode(
+     485              :       topic,
+     486              :       payload,
+     487              :       options: encodeOptions,
+     488              :     );
+     489              : 
+     490              :     if (message == null) {
+     491              :       return;
+     492              :     }
+     493              : 
+     494           12 :     final RpcOptions opts = MethodConstants.RPC_OPTS[method]!['res']!;
+     495           18 :     await core.relayClient.publish(
+     496              :       topic: topic,
+     497              :       message: message,
+     498            6 :       ttl: opts.ttl,
+     499            6 :       tag: opts.tag,
+     500              :     );
+     501              :   }
+     502              : 
+     503            3 :   @override
+     504              :   Future<void> sendError(
+     505              :     int id,
+     506              :     String topic,
+     507              :     String method,
+     508              :     JsonRpcError error, {
+     509              :     EncodeOptions? encodeOptions,
+     510              :     RpcOptions? rpcOptions,
+     511              :   }) async {
+     512            9 :     core.logger.t(
+     513            3 :       'pairing sendError, id: $id topic: $topic, method: $method, error: $error',
+     514              :     );
+     515              : 
+     516            3 :     final Map<String, dynamic> payload = JsonRpcUtils.formatJsonRpcError(
+     517              :       id,
+     518              :       error,
+     519              :     );
+     520            9 :     final String? message = await core.crypto.encode(
+     521              :       topic,
+     522              :       payload,
+     523              :       options: encodeOptions,
+     524              :     );
+     525              : 
+     526              :     if (message == null) {
+     527              :       return;
+     528              :     }
+     529              : 
+     530              :     final fallbackMethod = MethodConstants.UNREGISTERED_METHOD;
+     531            3 :     final fallbackRpcOpts = MethodConstants.RPC_OPTS[method] ??
+     532            0 :         MethodConstants.RPC_OPTS[fallbackMethod]!;
+     533            6 :     final fallbackOpts = fallbackRpcOpts['reject'] ?? fallbackRpcOpts['res']!;
+     534              : 
+     535              :     final RpcOptions opts = rpcOptions ?? fallbackOpts;
+     536              : 
+     537            9 :     await core.relayClient.publish(
+     538              :       topic: topic,
+     539              :       message: message,
+     540            3 :       ttl: opts.ttl,
+     541            3 :       tag: opts.tag,
+     542              :     );
+     543              :   }
+     544              : 
+     545              :   /// ---- Private Helpers ---- ///
+     546              : 
+     547            9 :   Future<void> _resubscribeAll() async {
+     548              :     // If the relay is not active, stop here
+     549           27 :     if (!core.relayClient.isConnected) {
+     550              :       return;
+     551              :     }
+     552              : 
+     553              :     // Resubscribe to all active pairings
+     554           16 :     final List<PairingInfo> activePairings = pairings.getAll();
+     555            8 :     for (final PairingInfo pairing in activePairings) {
+     556            0 :       if (pairing.active) {
+     557              :         // print('Resubscribing to topic: ${pairing.topic}');
+     558            0 :         await core.relayClient.subscribe(topic: pairing.topic);
+     559              :       }
+     560              :     }
+     561              :   }
+     562              : 
+     563            2 :   Future<void> _deletePairing(String topic, bool expirerHasDeleted) async {
+     564            6 :     await core.relayClient.unsubscribe(topic: topic);
+     565            4 :     await pairings.delete(topic);
+     566            6 :     await core.crypto.deleteSymKey(topic);
+     567              :     if (expirerHasDeleted) {
+     568            6 :       await core.expirer.delete(topic);
+     569              :     }
+     570              :   }
+     571              : 
+     572            9 :   Future<void> _cleanup() async {
+     573            9 :     final List<PairingInfo> expiredPairings = getPairings()
+     574            9 :         .where(
+     575            3 :           (PairingInfo info) => WalletConnectUtils.isExpired(info.expiry),
+     576              :         )
+     577            9 :         .toList();
+     578           10 :     for (final PairingInfo pairing in expiredPairings) {
+     579              :       // print('deleting expired pairing: ${pairing.topic}');
+     580            2 :       await _deletePairing(pairing.topic, true);
+     581              :     }
+     582              : 
+     583              :     // Cleanup all history records
+     584            9 :     final List<JsonRpcRecord> expiredHistory = history
+     585            9 :         .getAll()
+     586            9 :         .where(
+     587            4 :           (record) => WalletConnectUtils.isExpired(record.expiry ?? -1),
+     588              :         )
+     589            9 :         .toList();
+     590              :     // Loop through the expired records and delete them
+     591           10 :     for (final JsonRpcRecord record in expiredHistory) {
+     592              :       // print('deleting expired history record: ${record.id}');
+     593            4 :       await history.delete(record.id.toString());
+     594              :     }
+     595              : 
+     596              :     // Cleanup all of the expired receiver public keys
+     597              :     final List<ReceiverPublicKey> expiredReceiverPublicKeys =
+     598            9 :         topicToReceiverPublicKey
+     599            9 :             .getAll()
+     600           12 :             .where((receiver) => WalletConnectUtils.isExpired(receiver.expiry))
+     601            9 :             .toList();
+     602              :     // Loop through the expired receiver public keys and delete them
+     603           10 :     for (final ReceiverPublicKey receiver in expiredReceiverPublicKeys) {
+     604              :       // print('deleting expired receiver public key: $receiver');
+     605            3 :       await topicToReceiverPublicKey.delete(receiver.topic);
+     606              :     }
+     607              :   }
+     608              : 
+     609            7 :   void _checkInitialized() {
+     610            7 :     if (!_initialized) {
+     611            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     612              :     }
+     613              :   }
+     614              : 
+     615              :   /// ---- Relay Event Router ---- ///
+     616              : 
+     617              :   Map<String, RegisteredFunction> routerMapRequest = {};
+     618              : 
+     619            9 :   void _registerRelayEvents() {
+     620           45 :     core.relayClient.onRelayClientConnect.subscribe(_onRelayConnect);
+     621           45 :     core.relayClient.onRelayClientMessage.subscribe(_onMessageEvent);
+     622              : 
+     623            9 :     register(
+     624              :       method: MethodConstants.WC_PAIRING_PING,
+     625            9 :       function: _onPairingPingRequest,
+     626              :       type: ProtocolType.pair,
+     627              :     );
+     628            9 :     register(
+     629              :       method: MethodConstants.WC_PAIRING_DELETE,
+     630            9 :       function: _onPairingDeleteRequest,
+     631              :       type: ProtocolType.pair,
+     632              :     );
+     633              :   }
+     634              : 
+     635            0 :   Future<void> _onRelayConnect(EventArgs? args) async {
+     636              :     // print('Pairing: Relay connected');
+     637            0 :     await _resubscribeAll();
+     638              :   }
+     639              : 
+     640            6 :   void _onMessageEvent(MessageEvent? event) async {
+     641              :     if (event == null) {
+     642              :       return;
+     643              :     }
+     644              : 
+     645              :     // If we have a reciever public key for the topic, use it
+     646              :     ReceiverPublicKey? receiverPublicKey =
+     647           18 :         topicToReceiverPublicKey.get(event.topic);
+     648              :     // If there was a public key, delete it. One use.
+     649              :     if (receiverPublicKey != null) {
+     650            6 :       await topicToReceiverPublicKey.delete(event.topic);
+     651              :     }
+     652              : 
+     653              :     // Decode the message
+     654           18 :     String? payloadString = await core.crypto.decode(
+     655            6 :       event.topic,
+     656            6 :       event.message,
+     657            6 :       options: DecodeOptions(
+     658            2 :         receiverPublicKey: receiverPublicKey?.publicKey,
+     659              :       ),
+     660              :     );
+     661              : 
+     662              :     if (payloadString == null) {
+     663              :       return;
+     664              :     }
+     665              :     // print(payloadString);
+     666              : 
+     667            6 :     Map<String, dynamic> data = jsonDecode(payloadString);
+     668           24 :     core.logger.i('Pairing _onMessageEvent, Received data: $data');
+     669              : 
+     670              :     // If it's an rpc request, handle it
+     671              :     // print('Pairing: Received data: $data');
+     672            6 :     if (data.containsKey('method')) {
+     673            6 :       final request = JsonRpcRequest.fromJson(data);
+     674           18 :       if (routerMapRequest.containsKey(request.method)) {
+     675           36 :         routerMapRequest[request.method]!.function(event.topic, request);
+     676              :       } else {
+     677            0 :         _onUnkownRpcMethodRequest(event.topic, request);
+     678              :       }
+     679              :     }
+     680              :     // Otherwise handle it as a response
+     681              :     else {
+     682            6 :       final response = JsonRpcResponse.fromJson(data);
+     683              : 
+     684              :       // Only handle the response if we have a record of the request
+     685              :       // final JsonRpcRecord? record = history.get(response.id.toString());
+     686              :       // // print(record);
+     687              :       // if (record == null) {
+     688              :       //   return;
+     689              :       // }
+     690              : 
+     691              :       // print(
+     692              :       //   'pendingRequests: ${pendingRequests.keys} has ${response.id} is ${pendingRequests.containsKey(response.id)}',
+     693              :       // );
+     694           18 :       if (pendingRequests.containsKey(response.id)) {
+     695            6 :         if (response.error != null) {
+     696           15 :           pendingRequests[response.id]!.error = response.error;
+     697            9 :           pendingRequests[response.id]!
+     698            3 :               .completer
+     699            6 :               .completeError(response.error!);
+     700              :         } else {
+     701              :           // print(
+     702              :           //   'completing: ${response.result}',
+     703              :           // );
+     704           30 :           pendingRequests[response.id]!.response = response.result;
+     705           36 :           pendingRequests[response.id]!.completer.complete(response.result);
+     706              :         }
+     707              :       }
+     708              :     }
+     709              :   }
+     710              : 
+     711            5 :   Future<void> _onPairingPingRequest(
+     712              :     String topic,
+     713              :     JsonRpcRequest request,
+     714              :   ) async {
+     715            5 :     final int id = request.id;
+     716              :     try {
+     717              :       // print('ping req');
+     718            5 :       await _isValidPing(topic);
+     719            5 :       await sendResult(
+     720              :         id,
+     721              :         topic,
+     722            5 :         request.method,
+     723              :         true,
+     724              :       );
+     725           10 :       onPairingPing.broadcast(
+     726            5 :         PairingEvent(
+     727              :           id: id,
+     728              :           topic: topic,
+     729              :         ),
+     730              :       );
+     731            0 :     } on JsonRpcError catch (e) {
+     732              :       // print(e);
+     733            0 :       await sendError(
+     734              :         id,
+     735              :         topic,
+     736            0 :         request.method,
+     737              :         e,
+     738              :       );
+     739              :     }
+     740              :   }
+     741              : 
+     742            4 :   Future<void> _onPairingDeleteRequest(
+     743              :     String topic,
+     744              :     JsonRpcRequest request,
+     745              :   ) async {
+     746              :     // print('delete');
+     747            4 :     final int id = request.id;
+     748              :     try {
+     749            4 :       await _isValidDisconnect(topic);
+     750            4 :       await sendResult(
+     751              :         id,
+     752              :         topic,
+     753            4 :         request.method,
+     754              :         true,
+     755              :       );
+     756            8 :       await pairings.delete(topic);
+     757            8 :       onPairingDelete.broadcast(
+     758            4 :         PairingEvent(
+     759              :           id: id,
+     760              :           topic: topic,
+     761              :         ),
+     762              :       );
+     763            0 :     } on JsonRpcError catch (e) {
+     764            0 :       await sendError(
+     765              :         id,
+     766              :         topic,
+     767            0 :         request.method,
+     768              :         e,
+     769              :       );
+     770              :     }
+     771              :   }
+     772              : 
+     773            0 :   Future<void> _onUnkownRpcMethodRequest(
+     774              :     String topic,
+     775              :     JsonRpcRequest request,
+     776              :   ) async {
+     777            0 :     final int id = request.id;
+     778            0 :     final String method = request.method;
+     779              :     try {
+     780            0 :       if (routerMapRequest.containsKey(method)) {
+     781              :         return;
+     782              :       }
+     783            0 :       final String message = Errors.getSdkError(
+     784              :         Errors.WC_METHOD_UNSUPPORTED,
+     785              :         context: method,
+     786            0 :       ).message;
+     787            0 :       await sendError(
+     788              :         id,
+     789              :         topic,
+     790            0 :         request.method,
+     791            0 :         JsonRpcError.methodNotFound(message),
+     792              :       );
+     793            0 :     } on JsonRpcError catch (e) {
+     794            0 :       await sendError(id, topic, request.method, e);
+     795              :     }
+     796              :   }
+     797              : 
+     798              :   /// ---- Expirer Events ---- ///
+     799              : 
+     800            9 :   void _registerExpirerEvents() {
+     801           45 :     core.expirer.onExpire.subscribe(_onExpired);
+     802              :   }
+     803              : 
+     804            9 :   void _registerheartbeatSubscription() {
+     805           45 :     core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
+     806              :   }
+     807              : 
+     808            4 :   Future<void> _onExpired(ExpirationEvent? event) async {
+     809              :     if (event == null) {
+     810              :       return;
+     811              :     }
+     812              : 
+     813           12 :     if (pairings.has(event.target)) {
+     814              :       // Clean up the pairing
+     815            2 :       await _deletePairing(event.target, true);
+     816            2 :       onPairingExpire.broadcast(
+     817            1 :         PairingEvent(
+     818            1 :           topic: event.target,
+     819              :         ),
+     820              :       );
+     821              :     }
+     822              :   }
+     823              : 
+     824            6 :   void _heartbeatSubscription(EventArgs? args) async {
+     825            6 :     await checkAndExpire();
+     826              :   }
+     827              : 
+     828              :   /// ---- Validators ---- ///
+     829              : 
+     830            5 :   Future<void> _isValidPing(String topic) async {
+     831            5 :     await isValidPairingTopic(topic: topic);
+     832              :   }
+     833              : 
+     834            4 :   Future<void> _isValidDisconnect(String topic) async {
+     835            4 :     await isValidPairingTopic(topic: topic);
+     836              :   }
+     837              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing_store.dart.func-c.html b/coverage/html/core/pairing/pairing_store.dart.func-c.html new file mode 100644 index 00000000..0a7fb0a9 --- /dev/null +++ b/coverage/html/core/pairing/pairing_store.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing_store.dart.func.html b/coverage/html/core/pairing/pairing_store.dart.func.html new file mode 100644 index 00000000..f5c265d0 --- /dev/null +++ b/coverage/html/core/pairing/pairing_store.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/pairing_store.dart.gcov.html b/coverage/html/core/pairing/pairing_store.dart.gcov.html new file mode 100644 index 00000000..c71d2c06 --- /dev/null +++ b/coverage/html/core/pairing/pairing_store.dart.gcov.html @@ -0,0 +1,111 @@ + + + + + + + LCOV - lcov.info - core/pairing/pairing_store.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing - pairing_store.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing_store.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       4              : 
+       5              : class PairingStore extends GenericStore<PairingInfo> implements IPairingStore {
+       6           11 :   PairingStore({
+       7              :     required super.storage,
+       8              :     required super.context,
+       9              :     required super.version,
+      10              :     required super.fromJson,
+      11              :   });
+      12              : 
+      13            8 :   @override
+      14              :   Future<void> update(
+      15              :     String topic, {
+      16              :     int? expiry,
+      17              :     bool? active,
+      18              :     PairingMetadata? metadata,
+      19              :   }) async {
+      20            8 :     checkInitialized();
+      21              : 
+      22            8 :     PairingInfo? info = get(topic);
+      23              :     if (info == null) {
+      24              :       return;
+      25              :     }
+      26              : 
+      27              :     if (expiry != null) {
+      28           16 :       info = info.copyWith(expiry: expiry);
+      29              :     }
+      30              :     if (active != null) {
+      31           14 :       info = info.copyWith(active: active);
+      32              :     }
+      33              :     if (metadata != null) {
+      34           10 :       info = info.copyWith(peerMetadata: metadata);
+      35              :     }
+      36              : 
+      37            8 :     await set(topic, info);
+      38              :   }
+      39              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/index-sort-f.html b/coverage/html/core/pairing/utils/index-sort-f.html new file mode 100644 index 00000000..9dc16bf2 --- /dev/null +++ b/coverage/html/core/pairing/utils/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
json_rpc_utils.dart +
100.0%
+
100.0 %2121-
pairing_models.dart +
25.0%25.0%
+
25.0 %328-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/index-sort-l.html b/coverage/html/core/pairing/utils/index-sort-l.html new file mode 100644 index 00000000..d4a6011b --- /dev/null +++ b/coverage/html/core/pairing/utils/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
pairing_models.dart +
25.0%25.0%
+
25.0 %328
json_rpc_utils.dart +
100.0%
+
100.0 %2121
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/index.html b/coverage/html/core/pairing/utils/index.html new file mode 100644 index 00000000..efa9530f --- /dev/null +++ b/coverage/html/core/pairing/utils/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
json_rpc_utils.dart +
100.0%
+
100.0 %2121
pairing_models.dart +
25.0%25.0%
+
25.0 %328
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html new file mode 100644 index 00000000..5c1c5d15 --- /dev/null +++ b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - json_rpc_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html new file mode 100644 index 00000000..d0099607 --- /dev/null +++ b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - json_rpc_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html new file mode 100644 index 00000000..0d1f7173 --- /dev/null +++ b/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html @@ -0,0 +1,146 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - json_rpc_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:math';
+       2              : 
+       3              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+       6              : 
+       7              : class JsonRpcUtils {
+       8            8 :   static int payloadId({int entropy = 3}) {
+       9            8 :     int addedZeroes = (pow(10, entropy) as int);
+      10           24 :     int date = DateTime.now().millisecondsSinceEpoch * addedZeroes;
+      11           32 :     int extra = (Random().nextDouble() * addedZeroes).floor();
+      12            8 :     return date + extra;
+      13              :   }
+      14              : 
+      15            6 :   static Map<String, dynamic> formatJsonRpcRequest(
+      16              :     String method,
+      17              :     dynamic params, {
+      18              :     int? id,
+      19              :   }) {
+      20            6 :     return {
+      21            6 :       'id': id ??= payloadId(),
+      22              :       'jsonrpc': '2.0',
+      23              :       'method': method,
+      24              :       'params': params,
+      25              :     };
+      26              :   }
+      27              : 
+      28            6 :   static Map<String, dynamic> formatJsonRpcResponse<T>(
+      29              :     int id,
+      30              :     T result,
+      31              :   ) {
+      32            6 :     return {
+      33              :       'id': id,
+      34              :       'jsonrpc': '2.0',
+      35              :       'result': result,
+      36              :     };
+      37              :   }
+      38              : 
+      39            3 :   static Map<String, dynamic> formatJsonRpcError(int id, JsonRpcError error) {
+      40            3 :     return {
+      41              :       'id': id,
+      42              :       'jsonrpc': '2.0',
+      43            3 :       'error': error.toJson(),
+      44              :     };
+      45              :   }
+      46              : 
+      47            7 :   static bool validateMethods(
+      48              :     List<String> methods,
+      49              :     List<RegisteredFunction> registeredMethods,
+      50              :   ) {
+      51            7 :     List<String> unsupportedMethods = [];
+      52              : 
+      53              :     // Loop through the methods, and validate that each one exists in the registered methods
+      54           13 :     for (String method in methods) {
+      55           24 :       if (!registeredMethods.any((element) => element.method == method)) {
+      56              :         // print("Adding method: $method");
+      57            4 :         unsupportedMethods.add(method);
+      58              :       }
+      59              :     }
+      60              : 
+      61              :     // If there are any unsupported methods, throw an error
+      62            7 :     if (unsupportedMethods.isNotEmpty) {
+      63              :       // print(
+      64              :       //     'Unsupported Methods: $unsupportedMethods, Length: ${unsupportedMethods.length}');
+      65            4 :       throw Errors.getSdkError(
+      66              :         Errors.WC_METHOD_UNSUPPORTED,
+      67              :         context:
+      68            8 :             'The following methods are not registered: ${unsupportedMethods.join(', ')}.',
+      69              :       );
+      70              :     }
+      71              : 
+      72              :     return true;
+      73              :   }
+      74              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html b/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html new file mode 100644 index 00000000..76b6eb7b --- /dev/null +++ b/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/pairing_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - pairing_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.func.html b/coverage/html/core/pairing/utils/pairing_models.dart.func.html new file mode 100644 index 00000000..ea8f9656 --- /dev/null +++ b/coverage/html/core/pairing/utils/pairing_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/pairing_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - pairing_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html b/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html new file mode 100644 index 00000000..6173aaf2 --- /dev/null +++ b/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html @@ -0,0 +1,272 @@ + + + + + + + LCOV - lcov.info - core/pairing/utils/pairing_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/pairing/utils - pairing_models.dartCoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:freezed_annotation/freezed_annotation.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
+       6              : 
+       7              : part 'pairing_models.g.dart';
+       8              : part 'pairing_models.freezed.dart';
+       9              : 
+      10              : enum ProtocolType {
+      11              :   pair,
+      12              :   sign,
+      13              :   auth,
+      14              : }
+      15              : 
+      16              : @freezed
+      17              : class PairingInfo with _$PairingInfo {
+      18              :   @JsonSerializable()
+      19              :   const factory PairingInfo({
+      20              :     required String topic,
+      21              :     required int expiry,
+      22              :     required Relay relay,
+      23              :     required bool active,
+      24              :     List<String>? methods,
+      25              :     PairingMetadata? peerMetadata,
+      26              :   }) = _PairingInfo;
+      27              : 
+      28            0 :   factory PairingInfo.fromJson(Map<String, dynamic> json) =>
+      29            0 :       _$PairingInfoFromJson(json);
+      30              : }
+      31              : 
+      32              : @freezed
+      33              : class PairingMetadata with _$PairingMetadata {
+      34              :   @JsonSerializable(includeIfNull: false)
+      35              :   const factory PairingMetadata({
+      36              :     required String name,
+      37              :     required String description,
+      38              :     required String url,
+      39              :     required List<String> icons,
+      40              :     String? verifyUrl,
+      41              :     Redirect? redirect,
+      42              :   }) = _PairingMetadata;
+      43              : 
+      44            0 :   factory PairingMetadata.empty() => const PairingMetadata(
+      45              :         name: '',
+      46              :         description: '',
+      47              :         url: '',
+      48              :         icons: [],
+      49              :       );
+      50              : 
+      51            5 :   factory PairingMetadata.fromJson(Map<String, dynamic> json) =>
+      52            5 :       _$PairingMetadataFromJson(json);
+      53              : }
+      54              : 
+      55              : @freezed
+      56              : class Redirect with _$Redirect {
+      57              :   @JsonSerializable()
+      58              :   const factory Redirect({
+      59              :     String? native,
+      60              :     String? universal,
+      61              :   }) = _Redirect;
+      62              : 
+      63            0 :   factory Redirect.fromJson(Map<String, dynamic> json) =>
+      64            0 :       _$RedirectFromJson(json);
+      65              : }
+      66              : 
+      67              : class CreateResponse {
+      68              :   String topic;
+      69              :   Uri uri;
+      70              :   PairingInfo pairingInfo;
+      71              : 
+      72            7 :   CreateResponse({
+      73              :     required this.topic,
+      74              :     required this.uri,
+      75              :     required this.pairingInfo,
+      76              :   });
+      77              : 
+      78            0 :   @override
+      79              :   String toString() {
+      80            0 :     return 'CreateResponse(topic: $topic, uri: $uri, pairingInfo: ${pairingInfo.toJson()})';
+      81              :   }
+      82              : }
+      83              : 
+      84              : class ExpirationEvent extends EventArgs {
+      85              :   String target;
+      86              :   int expiry;
+      87              : 
+      88            4 :   ExpirationEvent({
+      89              :     required this.target,
+      90              :     required this.expiry,
+      91              :   });
+      92              : 
+      93            0 :   @override
+      94              :   String toString() {
+      95            0 :     return 'ExpirationEvent(target: $target, expiry: $expiry)';
+      96              :   }
+      97              : }
+      98              : 
+      99              : class HistoryEvent extends EventArgs {
+     100              :   JsonRpcRecord record;
+     101              : 
+     102            0 :   HistoryEvent({required this.record});
+     103              : 
+     104            0 :   @override
+     105              :   String toString() {
+     106            0 :     return 'HistoryEvent(record: $record)';
+     107              :   }
+     108              : }
+     109              : 
+     110              : class PairingInvalidEvent extends EventArgs {
+     111              :   String message;
+     112              : 
+     113            4 :   PairingInvalidEvent({
+     114              :     required this.message,
+     115              :   });
+     116              : 
+     117            0 :   @override
+     118              :   String toString() {
+     119            0 :     return 'PairingInvalidEvent(message: $message)';
+     120              :   }
+     121              : }
+     122              : 
+     123              : class PairingEvent extends EventArgs {
+     124              :   int? id;
+     125              :   String? topic;
+     126              :   JsonRpcError? error;
+     127              : 
+     128            7 :   PairingEvent({
+     129              :     this.id,
+     130              :     this.topic,
+     131              :     this.error,
+     132              :   });
+     133              : 
+     134            0 :   @override
+     135              :   String toString() {
+     136            0 :     return 'PairingEvent(id: $id, topic: $topic, error: $error)';
+     137              :   }
+     138              : }
+     139              : 
+     140              : class PairingActivateEvent extends EventArgs {
+     141              :   String topic;
+     142              :   int expiry;
+     143              : 
+     144            7 :   PairingActivateEvent({
+     145              :     required this.topic,
+     146              :     required this.expiry,
+     147              :   });
+     148              : 
+     149            0 :   @override
+     150              :   String toString() {
+     151            0 :     return 'PairingActivateEvent(topic: $topic, expiry: $expiry)';
+     152              :   }
+     153              : }
+     154              : 
+     155              : @freezed
+     156              : class JsonRpcRecord with _$JsonRpcRecord {
+     157              :   @JsonSerializable(includeIfNull: false)
+     158              :   const factory JsonRpcRecord({
+     159              :     required int id,
+     160              :     required String topic,
+     161              :     required String method,
+     162              :     required dynamic params,
+     163              :     String? chainId,
+     164              :     int? expiry,
+     165              :     dynamic response,
+     166              :   }) = _JsonRpcRecord;
+     167              : 
+     168            0 :   factory JsonRpcRecord.fromJson(Map<String, dynamic> json) =>
+     169            0 :       _$JsonRpcRecordFromJson(json);
+     170              : }
+     171              : 
+     172              : @freezed
+     173              : class ReceiverPublicKey with _$ReceiverPublicKey {
+     174              :   @JsonSerializable(includeIfNull: false)
+     175              :   const factory ReceiverPublicKey({
+     176              :     required String topic,
+     177              :     required String publicKey,
+     178              :     required int expiry,
+     179              :   }) = _ReceiverPublicKey;
+     180              : 
+     181            0 :   factory ReceiverPublicKey.fromJson(Map<String, dynamic> json) =>
+     182            0 :       _$ReceiverPublicKeyFromJson(json);
+     183              : }
+     184              : 
+     185              : class RegisteredFunction {
+     186              :   String method;
+     187              :   Function(String, JsonRpcRequest) function;
+     188              :   ProtocolType type;
+     189              : 
+     190            9 :   RegisteredFunction({
+     191              :     required this.method,
+     192              :     required this.function,
+     193              :     required this.type,
+     194              :   });
+     195              : 
+     196            0 :   @override
+     197              :   String toString() {
+     198            0 :     return 'RegisteredFunction(method: $method, function: $function, type: $type)';
+     199              :   }
+     200              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/index-sort-f.html b/coverage/html/core/relay_auth/index-sort-f.html new file mode 100644 index 00000000..afb25eec --- /dev/null +++ b/coverage/html/core/relay_auth/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - core/relay_auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
relay_auth.dart +
85.6%85.6%
+
85.6 %9077-
relay_auth_models.dart +
90.5%90.5%
+
90.5 %2119-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/index-sort-l.html b/coverage/html/core/relay_auth/index-sort-l.html new file mode 100644 index 00000000..3b4c0c97 --- /dev/null +++ b/coverage/html/core/relay_auth/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/relay_auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
relay_auth.dart +
85.6%85.6%
+
85.6 %9077
relay_auth_models.dart +
90.5%90.5%
+
90.5 %2119
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/index.html b/coverage/html/core/relay_auth/index.html new file mode 100644 index 00000000..f409ad6b --- /dev/null +++ b/coverage/html/core/relay_auth/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/relay_auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
relay_auth.dart +
85.6%85.6%
+
85.6 %9077
relay_auth_models.dart +
90.5%90.5%
+
90.5 %2119
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth.dart.func-c.html b/coverage/html/core/relay_auth/relay_auth.dart.func-c.html new file mode 100644 index 00000000..8ba3c348 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth.dart.func.html b/coverage/html/core/relay_auth/relay_auth.dart.func.html new file mode 100644 index 00000000..99949ba7 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth.dart.gcov.html b/coverage/html/core/relay_auth/relay_auth.dart.gcov.html new file mode 100644 index 00000000..b75424a9 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth.dart.gcov.html @@ -0,0 +1,308 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth.dartCoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:typed_data';
+       3              : 
+       4              : import 'package:bs58/bs58.dart';
+       5              : import 'package:ed25519_edwards/ed25519_edwards.dart' as ed;
+       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/i_relay_auth.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth_models.dart';
+       8              : 
+       9              : class RelayAuth implements IRelayAuth {
+      10              :   static const String multicodecEd25519Header = 'K36';
+      11              :   static const String multicodecEd25519Base = 'z';
+      12              :   static const int multicodecEd25519Length = 32;
+      13              : 
+      14              :   static const String JWT_DELIMITER = '.';
+      15              : 
+      16              :   static const String DID_DELIMITER = ':';
+      17              :   static const String DID_PREFIX = 'did';
+      18              :   static const String DID_METHOD = 'key';
+      19              : 
+      20            9 :   @override
+      21              :   Future<RelayAuthKeyPair> generateKeyPair([Uint8List? seed]) async {
+      22              :     ed.PrivateKey privateKey;
+      23              :     ed.PublicKey publicKey;
+      24              :     if (seed == null) {
+      25            0 :       final keyPair = ed.generateKey();
+      26            0 :       privateKey = keyPair.privateKey;
+      27            0 :       publicKey = keyPair.publicKey;
+      28              :     } else {
+      29            9 :       privateKey = ed.newKeyFromSeed(seed);
+      30            9 :       publicKey = ed.public(privateKey);
+      31              :     }
+      32              : 
+      33            9 :     return RelayAuthKeyPair(
+      34           18 :       Uint8List.fromList(privateKey.bytes),
+      35           18 :       Uint8List.fromList(publicKey.bytes),
+      36              :     );
+      37              :   }
+      38              : 
+      39           10 :   @override
+      40              :   Future<String> signJWT({
+      41              :     required String sub,
+      42              :     required String aud,
+      43              :     required int ttl,
+      44              :     required RelayAuthKeyPair keyPair,
+      45              :     int? iat,
+      46              :   }) async {
+      47           36 :     iat ??= DateTime.now().millisecondsSinceEpoch ~/ 1000 - 60;
+      48           10 :     final JWTHeader header = JWTHeader();
+      49           20 :     final String iss = encodeIss(keyPair.publicKeyBytes);
+      50           10 :     final int exp = iat + ttl;
+      51           10 :     final JWTPayload payload = JWTPayload(
+      52              :       iss,
+      53              :       sub,
+      54              :       aud,
+      55              :       iat,
+      56              :       exp,
+      57              :     );
+      58           10 :     final Uint8List data = encodeData(
+      59           10 :       JWTData(
+      60              :         header,
+      61              :         payload,
+      62              :       ),
+      63              :     );
+      64           10 :     Uint8List signature = ed.sign(
+      65           20 :       ed.PrivateKey(keyPair.privateKeyBytes),
+      66              :       data,
+      67              :     );
+      68              :     // List<int> signature = keyPair.sign(data);
+      69           20 :     return encodeJWT(JWTSigned(signature, payload));
+      70              :   }
+      71              : 
+      72            1 :   @override
+      73              :   Future<bool> verifyJWT(String jwt) async {
+      74            1 :     JWTDecoded decoded = decodeJWT(jwt);
+      75              : 
+      76              :     // Check the header
+      77            3 :     if (decoded.header.alg != JWTHeader.JWT_ALG ||
+      78            3 :         decoded.header.typ != JWTHeader.JWT_TYP) {
+      79            0 :       throw VerifyJWTError(
+      80              :         jwt,
+      81              :         'JWT must use EdDSA algorithm',
+      82              :       );
+      83              :     }
+      84              : 
+      85            3 :     final Uint8List publicKey = decodeIss(decoded.payload.iss);
+      86            1 :     return ed.verify(
+      87            1 :       ed.PublicKey(publicKey),
+      88            2 :       Uint8List.fromList(decoded.data),
+      89            2 :       Uint8List.fromList(decoded.signature),
+      90              :     );
+      91              :     // final VerifyKey vKey = VerifyKey(publicKey);
+      92              :     // final SignedMessage signedMessage = SignedMessage.fromList(
+      93              :     //   signedMessage: Uint8List.fromList(
+      94              :     //     decoded.signature,
+      95              :     //   ),
+      96              :     // );
+      97              :     // return vKey.verify(
+      98              :     //   signature: signedMessage.signature,
+      99              :     //   message: Uint8List.fromList(decoded.data),
+     100              :     // );
+     101              :   }
+     102              : 
+     103           10 :   String stripEquals(String s) {
+     104           10 :     return s.replaceAll('=', '');
+     105              :   }
+     106              : 
+     107           10 :   @override
+     108              :   String encodeJson(Map<String, dynamic> value) {
+     109           10 :     return stripEquals(
+     110           10 :       base64Url.encode(
+     111           10 :         jsonEncode(
+     112              :           value,
+     113           10 :         ).codeUnits,
+     114              :       ),
+     115              :     );
+     116              :   }
+     117              : 
+     118            1 :   @override
+     119              :   Map<String, dynamic> decodeJson(String s) {
+     120            1 :     return jsonDecode(
+     121            1 :       utf8.decode(
+     122            1 :         base64Url.decode(
+     123            1 :           base64Url.normalize(
+     124              :             s,
+     125              :           ),
+     126              :         ),
+     127              :       ),
+     128              :     );
+     129              :   }
+     130              : 
+     131              :   /// Encodes the public key into a multicodec issuer
+     132           10 :   @override
+     133              :   String encodeIss(Uint8List publicKey) {
+     134           20 :     Uint8List header = base58.decode(multicodecEd25519Header);
+     135              :     final String multicodec =
+     136           50 :         '$multicodecEd25519Base${base58.encode(Uint8List.fromList(header + publicKey))}';
+     137           10 :     return <String>[
+     138              :       DID_PREFIX,
+     139              :       DID_METHOD,
+     140              :       multicodec,
+     141           10 :     ].join(DID_DELIMITER);
+     142              :   }
+     143              : 
+     144              :   /// Gets the public key from the issuer
+     145            1 :   @override
+     146              :   Uint8List decodeIss(String issuer) {
+     147            1 :     List<String> split = issuer.split(DID_DELIMITER);
+     148            4 :     if (split[0] != DID_PREFIX || split[1] != DID_METHOD) {
+     149            0 :       throw IssuerDecodeError(issuer, 'Issuer must be a DID with method "key"');
+     150              :     }
+     151            1 :     final String multicodec = split[2];
+     152              : 
+     153              :     // Check the base
+     154            1 :     String base = multicodec[0];
+     155            1 :     if (base != multicodecEd25519Base) {
+     156            0 :       throw IssuerDecodeError(
+     157              :         issuer,
+     158              :         'Issuer must be a key in the multicodec format',
+     159              :       );
+     160              :     }
+     161              : 
+     162              :     // Decode
+     163            3 :     final Uint8List bytes = base58.decode(multicodec.substring(1));
+     164              : 
+     165              :     // Check the header
+     166            3 :     String header = base58.encode(bytes.sublist(0, 2));
+     167            1 :     if (header != multicodecEd25519Header) {
+     168            0 :       throw IssuerDecodeError(
+     169              :         issuer,
+     170              :         'Issuer must be a public key with type "Ed25519',
+     171              :       );
+     172              :     }
+     173              : 
+     174              :     // Slice off the public key and validate the length
+     175            1 :     final Uint8List publicKey = bytes.sublist(2);
+     176            2 :     if (publicKey.length != multicodecEd25519Length) {
+     177            0 :       throw IssuerDecodeError(
+     178              :         issuer,
+     179              :         'Issuer must be public key with length 32 bytes',
+     180              :       );
+     181              :     }
+     182              : 
+     183              :     return publicKey;
+     184              :   }
+     185              : 
+     186           10 :   @override
+     187              :   Uint8List encodeData(JWTData params) {
+     188           10 :     final String data = <String>[
+     189           30 :       encodeJson(params.header.toJson()),
+     190           30 :       encodeJson(params.payload.toJson()),
+     191           10 :     ].join(JWT_DELIMITER);
+     192              : 
+     193           20 :     return Uint8List.fromList(utf8.encode(data));
+     194              :   }
+     195              : 
+     196            0 :   @override
+     197              :   JWTData decodeData(Uint8List data) {
+     198            0 :     final List<String> params = utf8.decode(data).split(JWT_DELIMITER);
+     199              : 
+     200            0 :     JWTHeader header = JWTHeader.fromJson(jsonDecode(params[0]));
+     201            0 :     JWTPayload payload = JWTPayload.fromJson(jsonDecode(params[1]));
+     202              : 
+     203            0 :     return JWTData(header, payload);
+     204              :   }
+     205              : 
+     206           10 :   @override
+     207              :   String encodeSig(Uint8List bytes) {
+     208           20 :     return stripEquals(base64Url.encode(bytes));
+     209              :   }
+     210              : 
+     211            1 :   @override
+     212              :   Uint8List decodeSig(String encoded) {
+     213            3 :     return Uint8List.fromList(base64Url.decode(base64Url.normalize(encoded)));
+     214              :   }
+     215              : 
+     216           10 :   @override
+     217              :   String encodeJWT(JWTSigned params) {
+     218           10 :     return <String>[
+     219           30 :       encodeJson(params.header.toJson()),
+     220           30 :       encodeJson(params.payload.toJson()),
+     221           30 :       encodeSig(Uint8List.fromList(params.signature)),
+     222           10 :     ].join(JWT_DELIMITER);
+     223              :   }
+     224              : 
+     225            1 :   @override
+     226              :   JWTDecoded decodeJWT(String encoded) {
+     227            1 :     final List<String> params = encoded.split(JWT_DELIMITER);
+     228              : 
+     229            3 :     JWTHeader header = JWTHeader.fromJson(decodeJson(params[0]));
+     230            3 :     JWTPayload payload = JWTPayload.fromJson(decodeJson(params[1]));
+     231            2 :     Uint8List signature = decodeSig(params[2]);
+     232            3 :     List<int> data = utf8.encode(params.sublist(0, 2).join(JWT_DELIMITER));
+     233              : 
+     234            1 :     return JWTDecoded(data, signature, payload, header: header);
+     235              :   }
+     236              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html b/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html new file mode 100644 index 00000000..2fd74161 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.func.html b/coverage/html/core/relay_auth/relay_auth_models.dart.func.html new file mode 100644 index 00000000..5e31e8d2 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html b/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html new file mode 100644 index 00000000..6439cfe6 --- /dev/null +++ b/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html @@ -0,0 +1,186 @@ + + + + + + + LCOV - lcov.info - core/relay_auth/relay_auth_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_auth - relay_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:typed_data';
+       2              : 
+       3              : import 'package:convert/convert.dart';
+       4              : import 'package:json_annotation/json_annotation.dart';
+       5              : 
+       6              : part 'relay_auth_models.g.dart';
+       7              : 
+       8              : class RelayAuthKeyPair {
+       9              :   final Uint8List privateKeyBytes;
+      10              :   final Uint8List publicKeyBytes;
+      11              :   final String privateKey;
+      12              :   final String publicKey;
+      13              : 
+      14            9 :   RelayAuthKeyPair(
+      15              :     this.privateKeyBytes,
+      16              :     this.publicKeyBytes,
+      17            9 :   )   : privateKey = hex.encode(privateKeyBytes),
+      18            9 :         publicKey = hex.encode(publicKeyBytes);
+      19              : 
+      20            1 :   RelayAuthKeyPair.fromStrings(
+      21              :     this.privateKey,
+      22              :     this.publicKey,
+      23            2 :   )   : privateKeyBytes = Uint8List.fromList(hex.decode(privateKey)),
+      24            2 :         publicKeyBytes = Uint8List.fromList(hex.decode(publicKey));
+      25              : }
+      26              : 
+      27              : @JsonSerializable()
+      28              : class JWTHeader {
+      29              :   static const JWT_ALG = 'EdDSA';
+      30              :   static const JWT_TYP = 'JWT';
+      31              : 
+      32              :   String alg;
+      33              :   String typ;
+      34              : 
+      35           10 :   JWTHeader({
+      36              :     this.alg = 'EdDSA',
+      37              :     this.typ = 'JWT',
+      38              :   });
+      39              : 
+      40            1 :   factory JWTHeader.fromJson(Map<String, dynamic> json) =>
+      41            1 :       _$JWTHeaderFromJson(json);
+      42              : 
+      43           20 :   Map<String, dynamic> toJson() => _$JWTHeaderToJson(this);
+      44              : }
+      45              : 
+      46              : @JsonSerializable()
+      47              : class JWTPayload {
+      48              :   String iss;
+      49              :   String sub;
+      50              :   String aud;
+      51              :   int iat;
+      52              :   int exp;
+      53              : 
+      54           10 :   JWTPayload(
+      55              :     this.iss,
+      56              :     this.sub,
+      57              :     this.aud,
+      58              :     this.iat,
+      59              :     this.exp,
+      60              :   );
+      61              : 
+      62            1 :   factory JWTPayload.fromJson(Map<String, dynamic> json) =>
+      63            1 :       _$JWTPayloadFromJson(json);
+      64              : 
+      65           20 :   Map<String, dynamic> toJson() => _$JWTPayloadToJson(this);
+      66              : }
+      67              : 
+      68              : class JWTData {
+      69              :   JWTHeader header;
+      70              :   JWTPayload payload;
+      71              : 
+      72           10 :   JWTData(this.header, this.payload);
+      73              : }
+      74              : 
+      75              : class JWTSigned extends JWTData {
+      76              :   List<int> signature;
+      77              : 
+      78           10 :   JWTSigned(
+      79              :     this.signature,
+      80              :     JWTPayload payload, {
+      81              :     JWTHeader? header,
+      82           20 :   }) : super(header ?? JWTHeader(), payload);
+      83              : }
+      84              : 
+      85              : class JWTDecoded extends JWTSigned {
+      86              :   List<int> data;
+      87              : 
+      88            1 :   JWTDecoded(
+      89              :     this.data,
+      90              :     List<int> signature,
+      91              :     JWTPayload payload, {
+      92              :     JWTHeader? header,
+      93            1 :   }) : super(signature, payload, header: header);
+      94              : }
+      95              : 
+      96              : class IssuerDecodeError {
+      97              :   String received;
+      98              :   String message;
+      99              : 
+     100            0 :   IssuerDecodeError(
+     101              :     this.received,
+     102              :     this.message,
+     103              :   );
+     104              : }
+     105              : 
+     106              : class VerifyJWTError {
+     107              :   String jwt;
+     108              :   String message;
+     109              : 
+     110            0 :   VerifyJWTError(
+     111              :     this.jwt,
+     112              :     this.message,
+     113              :   );
+     114              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/i_relay_client.dart.func-c.html b/coverage/html/core/relay_client/i_relay_client.dart.func-c.html new file mode 100644 index 00000000..54f8658c --- /dev/null +++ b/coverage/html/core/relay_client/i_relay_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/i_relay_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - i_relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/i_relay_client.dart.func.html b/coverage/html/core/relay_client/i_relay_client.dart.func.html new file mode 100644 index 00000000..ee7c9d5b --- /dev/null +++ b/coverage/html/core/relay_client/i_relay_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/i_relay_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - i_relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/i_relay_client.dart.gcov.html b/coverage/html/core/relay_client/i_relay_client.dart.gcov.html new file mode 100644 index 00000000..f6d8c43a --- /dev/null +++ b/coverage/html/core/relay_client/i_relay_client.dart.gcov.html @@ -0,0 +1,120 @@ + + + + + + + LCOV - lcov.info - core/relay_client/i_relay_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - i_relay_client.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       3              : 
+       4              : class PublishOptions {
+       5              :   final Relay? relay;
+       6              :   final int? ttl;
+       7              :   final bool? prompt;
+       8              :   final int? tag;
+       9              : 
+      10            0 :   PublishOptions(this.relay, this.ttl, this.prompt, this.tag);
+      11              : }
+      12              : 
+      13              : abstract class IRelayClient {
+      14              :   /// Relay Client Events
+      15              :   abstract final Event<MessageEvent> onRelayClientMessage;
+      16              :   abstract final Event onRelayClientConnect;
+      17              :   abstract final Event onRelayClientDisconnect;
+      18              :   abstract final Event<ErrorEvent> onRelayClientError;
+      19              : 
+      20              :   /// JSON RPC Events
+      21              :   // Event<EventArgs> onJsonRpcPayload();
+      22              :   // Event<EventArgs> onJsonRpcConnect();
+      23              :   // Event<EventArgs> onJsonRpcDisconnect();
+      24              :   // Event<ErrorEvent> onJsonRpcError();
+      25              : 
+      26              :   /// Subscriber Events
+      27              :   abstract final Event<SubscriptionEvent> onSubscriptionCreated;
+      28              :   abstract final Event<SubscriptionDeletionEvent> onSubscriptionDeleted;
+      29              :   // Event<EventArgs> onSubscriptionExpired();
+      30              :   // Event<EventArgs> onSubscriptionDisabled();
+      31              :   abstract final Event onSubscriptionSync;
+      32              :   abstract final Event onSubscriptionResubscribed;
+      33              : 
+      34              :   /// Returns true if the client is connected to a relay server
+      35              :   bool get isConnected;
+      36              : 
+      37              :   Future<void> init();
+      38              :   Future<void> publish({
+      39              :     required String topic,
+      40              :     required String message,
+      41              :     required int ttl,
+      42              :     required int tag,
+      43              :   });
+      44              :   Future<String> subscribe({required String topic});
+      45              :   Future<void> unsubscribe({required String topic});
+      46              :   Future<void> connect({String? relayUrl});
+      47              :   Future<void> disconnect();
+      48              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/index-sort-f.html b/coverage/html/core/relay_client/index-sort-f.html new file mode 100644 index 00000000..7cfdd313 --- /dev/null +++ b/coverage/html/core/relay_client/index-sort-f.html @@ -0,0 +1,141 @@ + + + + + + + LCOV - lcov.info - core/relay_client + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
i_relay_client.dart +
0.0%
+
0.0 %1-
message_tracker.dart +
100.0%
+
100.0 %1818-
relay_client.dart +
86.6%86.6%
+
86.6 %172149-
relay_client_models.dart +
50.0%50.0%
+
50.0 %105-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/index-sort-l.html b/coverage/html/core/relay_client/index-sort-l.html new file mode 100644 index 00000000..3026d9c7 --- /dev/null +++ b/coverage/html/core/relay_client/index-sort-l.html @@ -0,0 +1,118 @@ + + + + + + + LCOV - lcov.info - core/relay_client + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
i_relay_client.dart +
0.0%
+
0.0 %1
relay_client_models.dart +
50.0%50.0%
+
50.0 %105
relay_client.dart +
86.6%86.6%
+
86.6 %172149
message_tracker.dart +
100.0%
+
100.0 %1818
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/index.html b/coverage/html/core/relay_client/index.html new file mode 100644 index 00000000..46c46c2e --- /dev/null +++ b/coverage/html/core/relay_client/index.html @@ -0,0 +1,118 @@ + + + + + + + LCOV - lcov.info - core/relay_client + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
i_relay_client.dart +
0.0%
+
0.0 %1
message_tracker.dart +
100.0%
+
100.0 %1818
relay_client.dart +
86.6%86.6%
+
86.6 %172149
relay_client_models.dart +
50.0%50.0%
+
50.0 %105
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html new file mode 100644 index 00000000..79cbf549 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2 - error_code.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html new file mode 100644 index 00000000..c1058981 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2 - error_code.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html new file mode 100644 index 00000000..6247e776 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2 - error_code.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : // ignore_for_file: constant_identifier_names
+       6              : 
+       7              : /// Error codes defined in the [JSON-RPC 2.0 specificiation][spec].
+       8              : ///
+       9              : /// These codes are generally used for protocol-level communication. Most of
+      10              : /// them shouldn't be used by the application. Those that should have
+      11              : /// convenience constructors in [RpcException].
+      12              : ///
+      13              : /// [spec]: http://www.jsonrpc.org/specification#error_object
+      14              : /// An error code indicating that invalid JSON was received by the server.
+      15              : const PARSE_ERROR = -32700;
+      16              : 
+      17              : /// An error code indicating that the request JSON was invalid according to the
+      18              : /// JSON-RPC 2.0 spec.
+      19              : const INVALID_REQUEST = -32600;
+      20              : 
+      21              : /// An error code indicating that the requested method does not exist or is
+      22              : /// unavailable.
+      23              : const METHOD_NOT_FOUND = -32601;
+      24              : 
+      25              : /// An error code indicating that the request parameters are invalid for the
+      26              : /// requested method.
+      27              : const INVALID_PARAMS = -32602;
+      28              : 
+      29              : /// An internal JSON-RPC error.
+      30              : const INTERNAL_ERROR = -32603;
+      31              : 
+      32              : /// An unexpected error occurred on the server.
+      33              : ///
+      34              : /// The spec reserves the range from -32000 to -32099 for implementation-defined
+      35              : /// server exceptions, but for now we only use one of those values.
+      36              : const SERVER_ERROR = -32000;
+      37              : 
+      38              : /// Returns a human-readable name for [errorCode] if it's one specified by the
+      39              : /// JSON-RPC 2.0 spec.
+      40              : ///
+      41              : /// If [errorCode] isn't defined in the JSON-RPC 2.0 spec, returns null.
+      42            0 : String? name(int errorCode) {
+      43              :   switch (errorCode) {
+      44            0 :     case PARSE_ERROR:
+      45              :       return 'parse error';
+      46            0 :     case INVALID_REQUEST:
+      47              :       return 'invalid request';
+      48            0 :     case METHOD_NOT_FOUND:
+      49              :       return 'method not found';
+      50            0 :     case INVALID_PARAMS:
+      51              :       return 'invalid parameters';
+      52            0 :     case INTERNAL_ERROR:
+      53              :       return 'internal error';
+      54              :     default:
+      55              :       return null;
+      56              :   }
+      57              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html b/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html new file mode 100644 index 00000000..c449153c --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2 + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
error_code.dart +
0.0%
+
0.0 %6-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html b/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html new file mode 100644 index 00000000..83dd21b6 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2 + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
error_code.dart +
0.0%
+
0.0 %6
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/index.html b/coverage/html/core/relay_client/json_rpc_2/index.html new file mode 100644 index 00000000..e92c9983 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2 + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
error_code.dart +
0.0%
+
0.0 %6
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html new file mode 100644 index 00000000..8648fe37 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html new file mode 100644 index 00000000..cfc385b8 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html new file mode 100644 index 00000000..9dd27861 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html @@ -0,0 +1,316 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - client.dartCoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import 'dart:async';
+       6              : 
+       7              : import 'package:stack_trace/stack_trace.dart';
+       8              : import 'package:stream_channel/stream_channel.dart';
+       9              : 
+      10              : import 'exception.dart';
+      11              : import 'utils.dart';
+      12              : 
+      13              : /// A JSON-RPC 2.0 client.
+      14              : ///
+      15              : /// A client calls methods on a server and handles the server's responses to
+      16              : /// those method calls. Methods can be called with [sendRequest], or with
+      17              : /// [sendNotification] if no response is expected.
+      18              : class Client {
+      19              :   final StreamChannel<dynamic> _channel;
+      20              : 
+      21              :   /// The next request id.
+      22              :   var _id = 0;
+      23              : 
+      24              :   /// The current batch of requests to be sent together.
+      25              :   ///
+      26              :   /// Each element is a JSON RPC spec compliant message.
+      27              :   List<Map<String, dynamic>>? _batch;
+      28              : 
+      29              :   /// The map of request ids to pending requests.
+      30              :   final _pendingRequests = <int, _Request>{};
+      31              : 
+      32              :   final _done = Completer<void>();
+      33              : 
+      34              :   /// Returns a [Future] that completes when the underlying connection is
+      35              :   /// closed.
+      36              :   ///
+      37              :   /// This is the same future that's returned by [listen] and [close]. It may
+      38              :   /// complete before [close] is called if the remote endpoint closes the
+      39              :   /// connection.
+      40           24 :   Future get done => _done.future;
+      41              : 
+      42              :   /// Whether the underlying connection is closed.
+      43              :   ///
+      44              :   /// Note that this will be `true` before [close] is called if the remote
+      45              :   /// endpoint closes the connection.
+      46           24 :   bool get isClosed => _done.isCompleted;
+      47              : 
+      48              :   /// Creates a [Client] that communicates over [channel].
+      49              :   ///
+      50              :   /// Note that the client won't begin listening to [responses] until
+      51              :   /// [Client.listen] is called.
+      52            0 :   Client(StreamChannel<String> channel)
+      53            0 :       : this.withoutJson(
+      54            0 :             jsonDocument.bind(channel).transformStream(ignoreFormatExceptions));
+      55              : 
+      56              :   /// Creates a [Client] that communicates using decoded messages over
+      57              :   /// [channel].
+      58              :   ///
+      59              :   /// Unlike [Client], this doesn't read or write JSON strings. Instead, it
+      60              :   /// reads and writes decoded maps or lists.
+      61              :   ///
+      62              :   /// Note that the client won't begin listening to [responses] until
+      63              :   /// [Client.listen] is called.
+      64            8 :   Client.withoutJson(this._channel) {
+      65           24 :     done.whenComplete(() {
+      66           21 :       for (var request in _pendingRequests.values) {
+      67           15 :         request.completer.completeError(StateError(
+      68           10 :             'The client closed with pending request "${request.method}".'));
+      69              :       }
+      70           16 :       _pendingRequests.clear();
+      71            8 :     }).catchError((_) {
+      72              :       // Avoid an unhandled error.
+      73              :     });
+      74              :   }
+      75              : 
+      76              :   /// Starts listening to the underlying stream.
+      77              :   ///
+      78              :   /// Returns a [Future] that will complete when the connection is closed or
+      79              :   /// when it has an error. This is the same as [done].
+      80              :   ///
+      81              :   /// [listen] may only be called once.
+      82            8 :   Future listen() {
+      83           32 :     _channel.stream.listen(_handleResponse, onError: (error, stackTrace) {
+      84            0 :       _done.completeError(error, stackTrace);
+      85            0 :       _channel.sink.close();
+      86            0 :     }, onDone: () {
+      87            0 :       if (!_done.isCompleted) _done.complete();
+      88            0 :       close();
+      89              :     });
+      90            8 :     return done;
+      91              :   }
+      92              : 
+      93              :   /// Closes the underlying connection.
+      94              :   ///
+      95              :   /// Returns a [Future] that completes when all resources have been released.
+      96              :   /// This is the same as [done].
+      97            8 :   Future close() {
+      98           24 :     _channel.sink.close();
+      99           32 :     if (!_done.isCompleted) _done.complete();
+     100            8 :     return done;
+     101              :   }
+     102              : 
+     103              :   /// Sends a JSON-RPC 2 request to invoke the given [method].
+     104              :   ///
+     105              :   /// If passed, [parameters] is the parameters for the method. This must be
+     106              :   /// either an [Iterable] (to pass parameters by position) or a [Map] with
+     107              :   /// [String] keys (to pass parameters by name). Either way, it must be
+     108              :   /// JSON-serializable.
+     109              :   ///
+     110              :   /// If the request succeeds, this returns the response result as a decoded
+     111              :   /// JSON-serializable object. If it fails, it throws an [RpcException]
+     112              :   /// describing the failure.
+     113              :   ///
+     114              :   /// Throws a [StateError] if the client is closed while the request is in
+     115              :   /// flight, or if the client is closed when this method is called.
+     116            8 :   Future sendRequest(String method, [parameters, int? id]) {
+     117            0 :     var idAct = id ?? _id++;
+     118            8 :     _send(method, parameters, idAct);
+     119              : 
+     120            8 :     var completer = Completer.sync();
+     121           32 :     _pendingRequests[idAct] = _Request(method, completer, Chain.current());
+     122            8 :     return completer.future;
+     123              :   }
+     124              : 
+     125              :   /// Sends a JSON-RPC 2 request to invoke the given [method] without expecting
+     126              :   /// a response.
+     127              :   ///
+     128              :   /// If passed, [parameters] is the parameters for the method. This must be
+     129              :   /// either an [Iterable] (to pass parameters by position) or a [Map] with
+     130              :   /// [String] keys (to pass parameters by name). Either way, it must be
+     131              :   /// JSON-serializable.
+     132              :   ///
+     133              :   /// Since this is just a notification to which the server isn't expected to
+     134              :   /// send a response, it has no return value.
+     135              :   ///
+     136              :   /// Throws a [StateError] if the client is closed when this method is called.
+     137            0 :   void sendNotification(String method, [parameters]) =>
+     138            0 :       _send(method, parameters);
+     139              : 
+     140              :   /// A helper method for [sendRequest] and [sendNotification].
+     141              :   ///
+     142              :   /// Sends a request to invoke [method] with [parameters]. If [id] is given,
+     143              :   /// the request uses that id.
+     144            8 :   void _send(String method, parameters, [int? id]) {
+     145            8 :     if (parameters is Iterable) parameters = parameters.toList();
+     146            8 :     if (parameters is! Map && parameters is! List && parameters != null) {
+     147            0 :       throw ArgumentError('Only maps and lists may be used as JSON-RPC '
+     148              :           'parameters, was "$parameters".');
+     149              :     }
+     150            8 :     if (isClosed) throw StateError('The client is closed.');
+     151              : 
+     152            8 :     var message = <String, dynamic>{'jsonrpc': '2.0', 'method': method};
+     153            8 :     if (id != null) message['id'] = id;
+     154            8 :     if (parameters != null) message['params'] = parameters;
+     155              : 
+     156            8 :     if (_batch != null) {
+     157            0 :       _batch!.add(message);
+     158              :     } else {
+     159           24 :       _channel.sink.add(message);
+     160              :     }
+     161              :   }
+     162              : 
+     163              :   /// Runs [callback] and batches any requests sent until it returns.
+     164              :   ///
+     165              :   /// A batch of requests is sent in a single message on the underlying stream,
+     166              :   /// and the responses are likewise sent back in a single message.
+     167              :   ///
+     168              :   /// [callback] may be synchronous or asynchronous. If it returns a [Future],
+     169              :   /// requests will be batched until that Future returns; otherwise, requests
+     170              :   /// will only be batched while synchronously executing [callback].
+     171              :   ///
+     172              :   /// If this is called in the context of another [withBatch] call, it just
+     173              :   /// invokes [callback] without creating another batch. This means that
+     174              :   /// responses are batched until the first batch ends.
+     175            0 :   void withBatch(Function() callback) {
+     176            0 :     if (_batch != null) {
+     177            0 :       callback();
+     178              :       return;
+     179              :     }
+     180              : 
+     181            0 :     _batch = [];
+     182            0 :     return tryFinally(callback, () {
+     183            0 :       _channel.sink.add(_batch);
+     184            0 :       _batch = null;
+     185              :     });
+     186              :   }
+     187              : 
+     188              :   /// Handles a decoded response from the server.
+     189            8 :   void _handleResponse(response) {
+     190            8 :     if (response is List) {
+     191            0 :       response.forEach(_handleSingleResponse);
+     192              :     } else {
+     193            8 :       _handleSingleResponse(response);
+     194              :     }
+     195              :   }
+     196              : 
+     197              :   /// Handles a decoded response from the server after batches have been
+     198              :   /// resolved.
+     199            8 :   void _handleSingleResponse(response) {
+     200            8 :     if (!_isResponseValid(response)) return;
+     201            8 :     var id = response['id'];
+     202            8 :     id = (id is String) ? int.parse(id) : id;
+     203           16 :     var request = _pendingRequests.remove(id)!;
+     204            8 :     if (response.containsKey('result')) {
+     205           21 :       request.completer.complete(response['result']);
+     206              :     } else {
+     207            8 :       request.completer.completeError(
+     208           20 :           RpcException(response['error']['code'], response['error']['message'],
+     209            8 :               data: response['error']['data']),
+     210            4 :           request.chain);
+     211              :     }
+     212              :   }
+     213              : 
+     214              :   /// Determines whether the server's response is valid per the spec.
+     215            8 :   bool _isResponseValid(response) {
+     216            8 :     if (response is! Map) return false;
+     217           16 :     if (response['jsonrpc'] != '2.0') return false;
+     218            8 :     var id = response['id'];
+     219            8 :     id = (id is String) ? int.parse(id) : id;
+     220           16 :     if (!_pendingRequests.containsKey(id)) return false;
+     221            8 :     if (response.containsKey('result')) return true;
+     222              : 
+     223            4 :     if (!response.containsKey('error')) return false;
+     224            4 :     var error = response['error'];
+     225            4 :     if (error is! Map) return false;
+     226            8 :     if (error['code'] is! int) return false;
+     227            8 :     if (error['message'] is! String) return false;
+     228              :     return true;
+     229              :   }
+     230              : }
+     231              : 
+     232              : /// A pending request to the server.
+     233              : class _Request {
+     234              :   /// THe method that was sent.
+     235              :   final String method;
+     236              : 
+     237              :   /// The completer to use to complete the response future.
+     238              :   final Completer completer;
+     239              : 
+     240              :   /// The stack chain from where the request was made.
+     241              :   final Chain chain;
+     242              : 
+     243            8 :   _Request(this.method, this.completer, this.chain);
+     244              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html new file mode 100644 index 00000000..c6018733 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - exception.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html new file mode 100644 index 00000000..58967808 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - exception.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html new file mode 100644 index 00000000..c1d60b31 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html @@ -0,0 +1,145 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - exception.dartCoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import '../error_code.dart' as error_code;
+       6              : 
+       7              : /// An exception from a JSON-RPC server that can be translated into an error
+       8              : /// response.
+       9              : class RpcException implements Exception {
+      10              :   /// The error code.
+      11              :   ///
+      12              :   /// All non-negative error codes are available for use by application
+      13              :   /// developers.
+      14              :   final int code;
+      15              : 
+      16              :   /// The error message.
+      17              :   ///
+      18              :   /// This should be limited to a concise single sentence. Further information
+      19              :   /// should be supplied via [data].
+      20              :   final String message;
+      21              : 
+      22              :   /// Extra application-defined information about the error.
+      23              :   ///
+      24              :   /// This must be a JSON-serializable object. If it's a [Map] without a
+      25              :   /// `"request"` key, a copy of the request that caused the error will
+      26              :   /// automatically be injected.
+      27              :   final Object? data;
+      28              : 
+      29            4 :   RpcException(this.code, this.message, {this.data});
+      30              : 
+      31              :   /// An exception indicating that the method named [methodName] was not found.
+      32              :   ///
+      33              :   /// This should usually be used only by fallback handlers.
+      34            0 :   RpcException.methodNotFound(String methodName)
+      35            0 :       : this(error_code.METHOD_NOT_FOUND, 'Unknown method "$methodName".');
+      36              : 
+      37              :   /// An exception indicating that the parameters for the requested method were
+      38              :   /// invalid.
+      39              :   ///
+      40              :   /// Methods can use this to reject requests with invalid parameters.
+      41            0 :   RpcException.invalidParams(String message)
+      42            0 :       : this(error_code.INVALID_PARAMS, message);
+      43              : 
+      44              :   /// Converts this exception into a JSON-serializable object that's a valid
+      45              :   /// JSON-RPC 2.0 error response.
+      46            0 :   Map<String, dynamic> serialize(request) {
+      47              :     dynamic modifiedData;
+      48            0 :     if (data is Map && !(data as Map).containsKey('request')) {
+      49            0 :       modifiedData = Map.from(data as Map);
+      50            0 :       modifiedData['request'] = request;
+      51            0 :     } else if (data == null) {
+      52            0 :       modifiedData = {'request': request};
+      53              :     } else {
+      54            0 :       modifiedData = data;
+      55              :     }
+      56              : 
+      57            0 :     var id = request is Map ? request['id'] : null;
+      58            0 :     if (id is! String && id is! num) id = null;
+      59            0 :     return {
+      60              :       'jsonrpc': '2.0',
+      61            0 :       'error': {'code': code, 'message': message, 'data': modifiedData},
+      62              :       'id': id
+      63              :     };
+      64              :   }
+      65              : 
+      66            0 :   @override
+      67              :   String toString() {
+      68            0 :     var prefix = 'JSON-RPC error $code';
+      69            0 :     var errorName = error_code.name(code);
+      70            0 :     if (errorName != null) prefix += ' ($errorName)';
+      71            0 :     return '$prefix: $message';
+      72              :   }
+      73              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html new file mode 100644 index 00000000..ffac39ce --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html @@ -0,0 +1,165 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
client.dart +
73.1%73.1%
+
73.1 %7857-
exception.dart +
4.8%4.8%
+
4.8 %211-
parameters.dart +
18.3%18.3%
+
18.3 %9317-
peer.dart +
59.2%59.2%
+
59.2 %4929-
server.dart +
39.2%39.2%
+
39.2 %9738-
utils.dart +
22.7%22.7%
+
22.7 %225-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html new file mode 100644 index 00000000..9b765e9c --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html @@ -0,0 +1,136 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
exception.dart +
4.8%4.8%
+
4.8 %211
parameters.dart +
18.3%18.3%
+
18.3 %9317
utils.dart +
22.7%22.7%
+
22.7 %225
server.dart +
39.2%39.2%
+
39.2 %9738
peer.dart +
59.2%59.2%
+
59.2 %4929
client.dart +
73.1%73.1%
+
73.1 %7857
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index.html b/coverage/html/core/relay_client/json_rpc_2/src/index.html new file mode 100644 index 00000000..ab6c1d41 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/index.html @@ -0,0 +1,136 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
client.dart +
73.1%73.1%
+
73.1 %7857
exception.dart +
4.8%4.8%
+
4.8 %211
parameters.dart +
18.3%18.3%
+
18.3 %9317
peer.dart +
59.2%59.2%
+
59.2 %4929
server.dart +
39.2%39.2%
+
39.2 %9738
utils.dart +
22.7%22.7%
+
22.7 %225
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html new file mode 100644 index 00000000..8f03765c --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html new file mode 100644 index 00000000..98937a45 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html new file mode 100644 index 00000000..859acf14 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html @@ -0,0 +1,420 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dartCoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import 'dart:convert';
+       6              : 
+       7              : import 'exception.dart';
+       8              : 
+       9              : /// A wrapper for the parameters to a server method.
+      10              : ///
+      11              : /// JSON-RPC 2.0 allows parameters that are either a list or a map. This class
+      12              : /// provides functions that not only assert that the parameters object is the
+      13              : /// correct type, but also that the expected arguments exist and are themselves
+      14              : /// the correct type.
+      15              : ///
+      16              : /// Example usage:
+      17              : ///
+      18              : ///     server.registerMethod("subtract", (params) {
+      19              : ///       return params["minuend"].asNum - params["subtrahend"].asNum;
+      20              : ///     });
+      21              : class Parameters {
+      22              :   /// The name of the method that this request called.
+      23              :   final String method;
+      24              : 
+      25              :   /// The underlying value of the parameters object.
+      26              :   ///
+      27              :   /// If this is accessed for a [Parameter] that was not passed, the request
+      28              :   /// will be automatically rejected. To avoid this, use [Parameter.valueOr].
+      29              :   final dynamic value;
+      30              : 
+      31            7 :   Parameters(this.method, this.value);
+      32              : 
+      33              :   /// Returns a single parameter.
+      34              :   ///
+      35              :   /// If [key] is a [String], the request is expected to provide named
+      36              :   /// parameters. If it's an [int], the request is expected to provide
+      37              :   /// positional parameters. Requests that don't do so will be rejected
+      38              :   /// automatically.
+      39              :   ///
+      40              :   /// Whether or not the given parameter exists, this returns a [Parameter]
+      41              :   /// object. If a parameter's value is accessed through a getter like [value]
+      42              :   /// or [Parameter.asNum], the request will be rejected if that parameter
+      43              :   /// doesn't exist. On the other hand, if it's accessed through a method with a
+      44              :   /// default value like [Parameter.valueOr] or [Parameter.asNumOr], the default
+      45              :   /// value will be returned.
+      46            7 :   Parameter operator [](key) {
+      47            7 :     if (key is int) {
+      48            0 :       _assertPositional();
+      49            0 :       if (key < value.length) {
+      50            0 :         return Parameter._(method, value[key], this, key);
+      51              :       } else {
+      52            0 :         return _MissingParameter(method, this, key);
+      53              :       }
+      54            7 :     } else if (key is String) {
+      55            7 :       _assertNamed();
+      56           14 :       if (value.containsKey(key)) {
+      57           28 :         return Parameter._(method, value[key], this, key);
+      58              :       } else {
+      59            0 :         return _MissingParameter(method, this, key);
+      60              :       }
+      61              :     } else {
+      62            0 :       throw ArgumentError('Parameters[] only takes an int or a string, was '
+      63              :           '"$key".');
+      64              :     }
+      65              :   }
+      66              : 
+      67              :   /// Asserts that [value] exists and is a [List] and returns it.
+      68            0 :   List get asList {
+      69            0 :     _assertPositional();
+      70            0 :     return value;
+      71              :   }
+      72              : 
+      73              :   /// Asserts that [value] exists and is a [Map] and returns it.
+      74            0 :   Map get asMap {
+      75            0 :     _assertNamed();
+      76            0 :     return value;
+      77              :   }
+      78              : 
+      79              :   /// Asserts that [value] is a positional argument list.
+      80            0 :   void _assertPositional() {
+      81            0 :     if (value is List) return;
+      82            0 :     throw RpcException.invalidParams('Parameters for method "$method" '
+      83              :         'must be passed by position.');
+      84              :   }
+      85              : 
+      86              :   /// Asserts that [value] is a named argument map.
+      87            7 :   void _assertNamed() {
+      88           14 :     if (value is Map) return;
+      89            0 :     throw RpcException.invalidParams('Parameters for method "$method" '
+      90              :         'must be passed by name.');
+      91              :   }
+      92              : }
+      93              : 
+      94              : /// A wrapper for a single parameter to a server method.
+      95              : ///
+      96              : /// This provides numerous functions for asserting the type of the parameter in
+      97              : /// question. These functions each have a version that asserts that the
+      98              : /// parameter exists (for example, [asNum] and [asString]) and a version that
+      99              : /// returns a default value if the parameter doesn't exist (for example,
+     100              : /// [asNumOr] and [asStringOr]). If an assertion fails, the request is
+     101              : /// automatically rejected.
+     102              : ///
+     103              : /// This extends [Parameters] to make it easy to access nested parameters. For
+     104              : /// example:
+     105              : ///
+     106              : ///     // "params.value" is "{'scores': {'home': [5, 10, 17]}}"
+     107              : ///     params['scores']['home'][2].asInt // => 17
+     108              : class Parameter extends Parameters {
+     109              :   // The parent parameters, used to construct [_path].
+     110              :   final Parameters _parent;
+     111              : 
+     112              :   /// The key used to access [this], used to construct [_path].
+     113              :   final dynamic _key;
+     114              : 
+     115              :   /// A human-readable representation of the path of getters used to get this.
+     116              :   ///
+     117              :   /// Named parameters are represented as `.name`, whereas positional parameters
+     118              :   /// are represented as `[index]`. For example: `"foo[0].bar.baz"`. Named
+     119              :   /// parameters that contain characters that are neither alphanumeric,
+     120              :   /// underscores, or hyphens will be JSON-encoded. For example: `"foo
+     121              :   /// bar"."baz.bang"`. If quotes are used for an individual component, they
+     122              :   /// won't be used for the entire string.
+     123              :   ///
+     124              :   /// An exception is made for single-level parameters. A single-level
+     125              :   /// positional parameter is just represented by the index plus one, because
+     126              :   /// "parameter 1" is clearer than "parameter [0]". A single-level named
+     127              :   /// parameter is represented by that name in quotes.
+     128            0 :   String get _path {
+     129            0 :     if (_parent is! Parameter) {
+     130            0 :       return _key is int ? (_key + 1).toString() : jsonEncode(_key);
+     131              :     }
+     132              : 
+     133            0 :     String quoteKey(key) {
+     134            0 :       if (key.contains(RegExp(r'[^a-zA-Z0-9_-]'))) return jsonEncode(key);
+     135              :       return key;
+     136              :     }
+     137              : 
+     138            0 :     String computePath(params) {
+     139            0 :       if (params._parent is! Parameter) {
+     140            0 :         return params._key is int ? '[${params._key}]' : quoteKey(params._key);
+     141              :       }
+     142              : 
+     143            0 :       var path = computePath(params._parent);
+     144            0 :       return params._key is int
+     145            0 :           ? '$path[${params._key}]'
+     146            0 :           : '$path.${quoteKey(params._key)}';
+     147              :     }
+     148              : 
+     149            0 :     return computePath(this);
+     150              :   }
+     151              : 
+     152              :   /// Whether this parameter exists.
+     153            0 :   bool get exists => true;
+     154              : 
+     155            7 :   Parameter._(String method, value, this._parent, this._key)
+     156            7 :       : super(method, value);
+     157              : 
+     158              :   /// Returns [value], or [defaultValue] if this parameter wasn't passed.
+     159            0 :   dynamic valueOr(defaultValue) => value;
+     160              : 
+     161              :   /// Asserts that [value] exists and is a number and returns it.
+     162              :   ///
+     163              :   /// [asNumOr] may be used to provide a default value instead of rejecting the
+     164              :   /// request if [value] doesn't exist.
+     165            0 :   num get asNum => _getTyped('a number', (value) => value is num);
+     166              : 
+     167              :   /// Asserts that [value] is a number and returns it.
+     168              :   ///
+     169              :   /// If [value] doesn't exist, this returns [defaultValue].
+     170            0 :   num asNumOr(num defaultValue) => asNum;
+     171              : 
+     172              :   /// Asserts that [value] exists and is an integer and returns it.
+     173              :   ///
+     174              :   /// [asIntOr] may be used to provide a default value instead of rejecting the
+     175              :   /// request if [value] doesn't exist.
+     176              :   ///
+     177              :   /// Note that which values count as integers varies between the Dart VM and
+     178              :   /// dart2js. The value `1.0` will be considered an integer under dart2js but
+     179              :   /// not under the VM.
+     180            0 :   int get asInt => _getTyped('an integer', (value) => value is int);
+     181              : 
+     182              :   /// Asserts that [value] is an integer and returns it.
+     183              :   ///
+     184              :   /// If [value] doesn't exist, this returns [defaultValue].
+     185              :   ///
+     186              :   /// Note that which values count as integers varies between the Dart VM and
+     187              :   /// dart2js. The value `1.0` will be considered an integer under dart2js but
+     188              :   /// not under the VM.
+     189            0 :   int asIntOr(int defaultValue) => asInt;
+     190              : 
+     191              :   /// Asserts that [value] exists and is a boolean and returns it.
+     192              :   ///
+     193              :   /// [asBoolOr] may be used to provide a default value instead of rejecting the
+     194              :   /// request if [value] doesn't exist.
+     195            0 :   bool get asBool => _getTyped('a boolean', (value) => value is bool);
+     196              : 
+     197              :   /// Asserts that [value] is a boolean and returns it.
+     198              :   ///
+     199              :   /// If [value] doesn't exist, this returns [defaultValue].
+     200            0 :   bool asBoolOr(bool defaultValue) => asBool;
+     201              : 
+     202              :   /// Asserts that [value] exists and is a string and returns it.
+     203              :   ///
+     204              :   /// [asStringOr] may be used to provide a default value instead of rejecting
+     205              :   /// the request if [value] doesn't exist.
+     206            0 :   String get asString => _getTyped('a string', (value) => value is String);
+     207              : 
+     208              :   /// Asserts that [value] is a string and returns it.
+     209              :   ///
+     210              :   /// If [value] doesn't exist, this returns [defaultValue].
+     211            0 :   String asStringOr(String defaultValue) => asString;
+     212              : 
+     213              :   /// Asserts that [value] exists and is a [List] and returns it.
+     214              :   ///
+     215              :   /// [asListOr] may be used to provide a default value instead of rejecting the
+     216              :   /// request if [value] doesn't exist.
+     217            0 :   @override
+     218            0 :   List get asList => _getTyped('an Array', (value) => value is List);
+     219              : 
+     220              :   /// Asserts that [value] is a [List] and returns it.
+     221              :   ///
+     222              :   /// If [value] doesn't exist, this returns [defaultValue].
+     223            0 :   List asListOr(List defaultValue) => asList;
+     224              : 
+     225              :   /// Asserts that [value] exists and is a [Map] and returns it.
+     226              :   ///
+     227              :   /// [asMapOr] may be used to provide a default value instead of rejecting the
+     228              :   /// request if [value] doesn't exist.
+     229            7 :   @override
+     230           21 :   Map get asMap => _getTyped('an Object', (value) => value is Map);
+     231              : 
+     232              :   /// Asserts that [value] is a [Map] and returns it.
+     233              :   ///
+     234              :   /// If [value] doesn't exist, this returns [defaultValue].
+     235            0 :   Map asMapOr(Map defaultValue) => asMap;
+     236              : 
+     237              :   /// Asserts that [value] exists, is a string, and can be parsed as a
+     238              :   /// [DateTime] and returns it.
+     239              :   ///
+     240              :   /// [asDateTimeOr] may be used to provide a default value instead of rejecting
+     241              :   /// the request if [value] doesn't exist.
+     242            0 :   DateTime get asDateTime => _getParsed('date/time', DateTime.parse);
+     243              : 
+     244              :   /// Asserts that [value] exists, is a string, and can be parsed as a
+     245              :   /// [DateTime] and returns it.
+     246              :   ///
+     247              :   /// If [value] doesn't exist, this returns [defaultValue].
+     248            0 :   DateTime asDateTimeOr(DateTime defaultValue) => asDateTime;
+     249              : 
+     250              :   /// Asserts that [value] exists, is a string, and can be parsed as a
+     251              :   /// [Uri] and returns it.
+     252              :   ///
+     253              :   /// [asUriOr] may be used to provide a default value instead of rejecting the
+     254              :   /// request if [value] doesn't exist.
+     255            0 :   Uri get asUri => _getParsed('URI', Uri.parse);
+     256              : 
+     257              :   /// Asserts that [value] exists, is a string, and can be parsed as a
+     258              :   /// [Uri] and returns it.
+     259              :   ///
+     260              :   /// If [value] doesn't exist, this returns [defaultValue].
+     261            0 :   Uri asUriOr(Uri defaultValue) => asUri;
+     262              : 
+     263              :   /// Get a parameter named [named] that matches [test], or the value of calling
+     264              :   /// [orElse].
+     265              :   ///
+     266              :   /// [type] is used for the error message. It should begin with an indefinite
+     267              :   /// article.
+     268            7 :   dynamic _getTyped(String type, bool Function(dynamic) test) {
+     269           21 :     if (test(value)) return value;
+     270            0 :     throw RpcException.invalidParams('Parameter $_path for method '
+     271            0 :         '"$method" must be $type, but was ${jsonEncode(value)}.');
+     272              :   }
+     273              : 
+     274            0 :   dynamic _getParsed(String description, Function(String) parse) {
+     275            0 :     var string = asString;
+     276              :     try {
+     277            0 :       return parse(string);
+     278            0 :     } on FormatException catch (error) {
+     279              :       // DateTime.parse doesn't actually include any useful information in the
+     280              :       // FormatException, just the string that was being parsed. There's no use
+     281              :       // in including that in the RPC exception. See issue 17753.
+     282            0 :       var message = error.message;
+     283            0 :       if (message == string) {
+     284              :         message = '';
+     285              :       } else {
+     286            0 :         message = '\n$message';
+     287              :       }
+     288              : 
+     289            0 :       throw RpcException.invalidParams('Parameter $_path for method '
+     290            0 :           '"$method" must be a valid $description, but was '
+     291            0 :           '${jsonEncode(string)}.$message');
+     292              :     }
+     293              :   }
+     294              : 
+     295            0 :   @override
+     296              :   void _assertPositional() {
+     297              :     // Throw the standard exception for a mis-typed list.
+     298            0 :     asList;
+     299              :   }
+     300              : 
+     301            7 :   @override
+     302              :   void _assertNamed() {
+     303              :     // Throw the standard exception for a mis-typed map.
+     304            7 :     asMap;
+     305              :   }
+     306              : }
+     307              : 
+     308              : /// A subclass of [Parameter] representing a missing parameter.
+     309              : class _MissingParameter extends Parameter {
+     310            0 :   @override
+     311              :   dynamic get value {
+     312            0 :     throw RpcException.invalidParams('Request for method "$method" is '
+     313            0 :         'missing required parameter $_path.');
+     314              :   }
+     315              : 
+     316            0 :   @override
+     317              :   bool get exists => false;
+     318              : 
+     319            0 :   _MissingParameter(String method, Parameters parent, key)
+     320            0 :       : super._(method, null, parent, key);
+     321              : 
+     322            0 :   @override
+     323              :   dynamic valueOr(defaultValue) => defaultValue;
+     324              : 
+     325            0 :   @override
+     326              :   num asNumOr(num defaultValue) => defaultValue;
+     327              : 
+     328            0 :   @override
+     329              :   int asIntOr(int defaultValue) => defaultValue;
+     330              : 
+     331            0 :   @override
+     332              :   bool asBoolOr(bool defaultValue) => defaultValue;
+     333              : 
+     334            0 :   @override
+     335              :   String asStringOr(String defaultValue) => defaultValue;
+     336              : 
+     337            0 :   @override
+     338              :   List asListOr(List defaultValue) => defaultValue;
+     339              : 
+     340            0 :   @override
+     341              :   Map asMapOr(Map defaultValue) => defaultValue;
+     342              : 
+     343            0 :   @override
+     344              :   DateTime asDateTimeOr(DateTime defaultValue) => defaultValue;
+     345              : 
+     346            0 :   @override
+     347              :   Uri asUriOr(Uri defaultValue) => defaultValue;
+     348              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html new file mode 100644 index 00000000..30a72ab9 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - peer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html new file mode 100644 index 00000000..6c77c970 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - peer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html new file mode 100644 index 00000000..44c451d4 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html @@ -0,0 +1,228 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - peer.dartCoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import 'dart:async';
+       6              : 
+       7              : import 'package:stream_channel/stream_channel.dart';
+       8              : 
+       9              : import 'client.dart';
+      10              : import 'parameters.dart';
+      11              : import 'server.dart';
+      12              : import 'utils.dart';
+      13              : 
+      14              : /// A JSON-RPC 2.0 client *and* server.
+      15              : ///
+      16              : /// This supports bidirectional peer-to-peer communication with another JSON-RPC
+      17              : /// 2.0 endpoint. It sends both requests and responses across the same
+      18              : /// communication channel and expects to connect to a peer that does the same.
+      19              : class Peer implements Client, Server {
+      20              :   final StreamChannel<dynamic> _channel;
+      21              : 
+      22              :   /// The underlying client that handles request-sending and response-receiving
+      23              :   /// logic.
+      24              :   late final Client _client;
+      25              : 
+      26              :   /// The underlying server that handles request-receiving and response-sending
+      27              :   /// logic.
+      28              :   late final Server _server;
+      29              : 
+      30              :   /// A stream controller that forwards incoming messages to [_server] if
+      31              :   /// they're requests.
+      32              :   final _serverIncomingForwarder = StreamController(sync: true);
+      33              : 
+      34              :   /// A stream controller that forwards incoming messages to [_client] if
+      35              :   /// they're responses.
+      36              :   final _clientIncomingForwarder = StreamController(sync: true);
+      37              : 
+      38              :   @override
+      39           56 :   late final Future done = Future.wait([_client.done, _server.done]);
+      40              : 
+      41            8 :   @override
+      42           32 :   bool get isClosed => _client.isClosed || _server.isClosed;
+      43              : 
+      44            0 :   @override
+      45            0 :   ErrorCallback? get onUnhandledError => _server.onUnhandledError;
+      46              : 
+      47            0 :   @override
+      48            0 :   bool get strictProtocolChecks => _server.strictProtocolChecks;
+      49              : 
+      50              :   /// Creates a [Peer] that communicates over [channel].
+      51              :   ///
+      52              :   /// Note that the peer won't begin listening to [channel] until [Peer.listen]
+      53              :   /// is called.
+      54              :   ///
+      55              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
+      56              :   /// If this is not provided, unhandled exceptions will be swallowed.
+      57              :   ///
+      58              :   /// If [strictProtocolChecks] is false, the underlying [Server] will accept
+      59              :   /// some requests which are not conformant with the JSON-RPC 2.0
+      60              :   /// specification. In particular, requests missing the `jsonrpc` parameter
+      61              :   /// will be accepted.
+      62            8 :   Peer(StreamChannel<String> channel,
+      63              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true})
+      64            8 :       : this.withoutJson(
+      65           32 :             jsonDocument.bind(channel).transform(respondToFormatExceptions),
+      66              :             onUnhandledError: onUnhandledError,
+      67              :             strictProtocolChecks: strictProtocolChecks);
+      68              : 
+      69              :   /// Creates a [Peer] that communicates using decoded messages over [channel].
+      70              :   ///
+      71              :   /// Unlike [Peer], this doesn't read or write JSON strings. Instead, it
+      72              :   /// reads and writes decoded maps or lists.
+      73              :   ///
+      74              :   /// Note that the peer won't begin listening to [channel] until
+      75              :   /// [Peer.listen] is called.
+      76              :   ///
+      77              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
+      78              :   /// If this is not provided, unhandled exceptions will be swallowed.
+      79              :   ///
+      80              :   /// If [strictProtocolChecks] is false, the underlying [Server] will accept
+      81              :   /// some requests which are not conformant with the JSON-RPC 2.0
+      82              :   /// specification. In particular, requests missing the `jsonrpc` parameter
+      83              :   /// will be accepted.
+      84            8 :   Peer.withoutJson(this._channel,
+      85              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true}) {
+      86           16 :     _server = Server.withoutJson(
+      87           40 :         StreamChannel(_serverIncomingForwarder.stream, _channel.sink),
+      88              :         onUnhandledError: onUnhandledError,
+      89              :         strictProtocolChecks: strictProtocolChecks);
+      90           16 :     _client = Client.withoutJson(
+      91           40 :         StreamChannel(_clientIncomingForwarder.stream, _channel.sink));
+      92              :   }
+      93              : 
+      94              :   // Client methods.
+      95              : 
+      96            8 :   @override
+      97              :   Future sendRequest(String method, [parameters, int? id]) =>
+      98           16 :       _client.sendRequest(method, parameters, id);
+      99              : 
+     100            0 :   @override
+     101              :   void sendNotification(String method, [parameters]) =>
+     102            0 :       _client.sendNotification(method, parameters);
+     103              : 
+     104            0 :   @override
+     105            0 :   void withBatch(Function() callback) => _client.withBatch(callback);
+     106              : 
+     107              :   // Server methods.
+     108              : 
+     109            8 :   @override
+     110              :   void registerMethod(String name, Function callback) =>
+     111           16 :       _server.registerMethod(name, callback);
+     112              : 
+     113            0 :   @override
+     114              :   void registerFallback(Function(Parameters parameters) callback) =>
+     115            0 :       _server.registerFallback(callback);
+     116              : 
+     117              :   // Shared methods.
+     118              : 
+     119            8 :   @override
+     120              :   Future listen() {
+     121           16 :     _client.listen();
+     122           16 :     _server.listen();
+     123           32 :     _channel.stream.listen((message) {
+     124            8 :       if (message is Map) {
+     125           16 :         if (message.containsKey('result') || message.containsKey('error')) {
+     126           16 :           _clientIncomingForwarder.add(message);
+     127              :         } else {
+     128           14 :           _serverIncomingForwarder.add(message);
+     129              :         }
+     130            0 :       } else if (message is List &&
+     131            0 :           message.isNotEmpty &&
+     132            0 :           message.first is Map) {
+     133            0 :         if (message.first.containsKey('result') ||
+     134            0 :             message.first.containsKey('error')) {
+     135            0 :           _clientIncomingForwarder.add(message);
+     136              :         } else {
+     137            0 :           _serverIncomingForwarder.add(message);
+     138              :         }
+     139              :       } else {
+     140              :         // Non-Map and -List messages are ill-formed, so we pass them to the
+     141              :         // server since it knows how to send error responses.
+     142            0 :         _serverIncomingForwarder.add(message);
+     143              :       }
+     144            0 :     }, onError: (error, stackTrace) {
+     145            0 :       _serverIncomingForwarder.addError(error, stackTrace);
+     146            8 :     }, onDone: close);
+     147            8 :     return done;
+     148              :   }
+     149              : 
+     150            8 :   @override
+     151              :   Future close() {
+     152           16 :     _client.close();
+     153           16 :     _server.close();
+     154            8 :     return done;
+     155              :   }
+     156              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html new file mode 100644 index 00000000..35e2d24a --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - server.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html new file mode 100644 index 00000000..e8fba5e2 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - server.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html new file mode 100644 index 00000000..943d9e9d --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html @@ -0,0 +1,391 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - server.dartCoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import 'dart:async';
+       6              : import 'dart:collection';
+       7              : import 'dart:convert';
+       8              : 
+       9              : import 'package:stack_trace/stack_trace.dart';
+      10              : import 'package:stream_channel/stream_channel.dart';
+      11              : 
+      12              : import '../error_code.dart' as error_code;
+      13              : import 'exception.dart';
+      14              : import 'parameters.dart';
+      15              : import 'utils.dart';
+      16              : 
+      17              : /// A callback for unhandled exceptions.
+      18              : typedef ErrorCallback = void Function(dynamic error, dynamic stackTrace);
+      19              : 
+      20              : /// A JSON-RPC 2.0 server.
+      21              : ///
+      22              : /// A server exposes methods that are called by requests, to which it provides
+      23              : /// responses. Methods can be registered using [registerMethod] and
+      24              : /// [registerFallback]. Requests can be handled using [handleRequest] and
+      25              : /// [parseRequest].
+      26              : ///
+      27              : /// Note that since requests can arrive asynchronously and methods can run
+      28              : /// asynchronously, it's possible for multiple methods to be invoked at the same
+      29              : /// time, or even for a single method to be invoked multiple times at once.
+      30              : class Server {
+      31              :   final StreamChannel<dynamic> _channel;
+      32              : 
+      33              :   /// The methods registered for this server.
+      34              :   final _methods = <String, Function>{};
+      35              : 
+      36              :   /// The fallback methods for this server.
+      37              :   ///
+      38              :   /// These are tried in order until one of them doesn't throw a
+      39              :   /// [RpcException.methodNotFound] exception.
+      40              :   final _fallbacks = Queue<Function>();
+      41              : 
+      42              :   final _done = Completer<void>();
+      43              : 
+      44              :   /// Returns a [Future] that completes when the underlying connection is
+      45              :   /// closed.
+      46              :   ///
+      47              :   /// This is the same future that's returned by [listen] and [close]. It may
+      48              :   /// complete before [close] is called if the remote endpoint closes the
+      49              :   /// connection.
+      50           24 :   Future get done => _done.future;
+      51              : 
+      52              :   /// Whether the underlying connection is closed.
+      53              :   ///
+      54              :   /// Note that this will be `true` before [close] is called if the remote
+      55              :   /// endpoint closes the connection.
+      56           24 :   bool get isClosed => _done.isCompleted;
+      57              : 
+      58              :   /// A callback that is fired on unhandled exceptions.
+      59              :   ///
+      60              :   /// In the case where a user provided callback results in an exception that
+      61              :   /// cannot be properly routed back to the client, this handler will be
+      62              :   /// invoked. If it is not set, the exception will be swallowed.
+      63              :   final ErrorCallback? onUnhandledError;
+      64              : 
+      65              :   /// Whether to strictly enforce the JSON-RPC 2.0 specification for received
+      66              :   /// messages.
+      67              :   ///
+      68              :   /// If `false`, this [Server] will accept some requests which are not
+      69              :   /// conformant with the JSON-RPC 2.0 specification. In particular, requests
+      70              :   /// missing the `jsonrpc` parameter will be accepted.
+      71              :   final bool strictProtocolChecks;
+      72              : 
+      73              :   /// Creates a [Server] that communicates over [channel].
+      74              :   ///
+      75              :   /// Note that the server won't begin listening to [requests] until
+      76              :   /// [Server.listen] is called.
+      77              :   ///
+      78              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
+      79              :   /// If this is not provided, unhandled exceptions will be swallowed.
+      80              :   ///
+      81              :   /// If [strictProtocolChecks] is false, this [Server] will accept some
+      82              :   /// requests which are not conformant with the JSON-RPC 2.0 specification. In
+      83              :   /// particular, requests missing the `jsonrpc` parameter will be accepted.
+      84            0 :   Server(StreamChannel<String> channel,
+      85              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true})
+      86            0 :       : this.withoutJson(
+      87            0 :             jsonDocument.bind(channel).transform(respondToFormatExceptions),
+      88              :             onUnhandledError: onUnhandledError,
+      89              :             strictProtocolChecks: strictProtocolChecks);
+      90              : 
+      91              :   /// Creates a [Server] that communicates using decoded messages over
+      92              :   /// [channel].
+      93              :   ///
+      94              :   /// Unlike [Server], this doesn't read or write JSON strings. Instead, it
+      95              :   /// reads and writes decoded maps or lists.
+      96              :   ///
+      97              :   /// Note that the server won't begin listening to [requests] until
+      98              :   /// [Server.listen] is called.
+      99              :   ///
+     100              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
+     101              :   /// If this is not provided, unhandled exceptions will be swallowed.
+     102              :   ///
+     103              :   /// If [strictProtocolChecks] is false, this [Server] will accept some
+     104              :   /// requests which are not conformant with the JSON-RPC 2.0 specification. In
+     105              :   /// particular, requests missing the `jsonrpc` parameter will be accepted.
+     106            8 :   Server.withoutJson(this._channel,
+     107              :       {this.onUnhandledError, this.strictProtocolChecks = true});
+     108              : 
+     109              :   /// Starts listening to the underlying stream.
+     110              :   ///
+     111              :   /// Returns a [Future] that will complete when the connection is closed or
+     112              :   /// when it has an error. This is the same as [done].
+     113              :   ///
+     114              :   /// [listen] may only be called once.
+     115            8 :   Future listen() {
+     116           32 :     _channel.stream.listen(_handleRequest, onError: (error, stackTrace) {
+     117            0 :       _done.completeError(error, stackTrace);
+     118            0 :       _channel.sink.close();
+     119            0 :     }, onDone: () {
+     120            0 :       if (!_done.isCompleted) _done.complete();
+     121              :     });
+     122            8 :     return done;
+     123              :   }
+     124              : 
+     125              :   /// Closes the underlying connection.
+     126              :   ///
+     127              :   /// Returns a [Future] that completes when all resources have been released.
+     128              :   /// This is the same as [done].
+     129            8 :   Future close() {
+     130           24 :     _channel.sink.close();
+     131           32 :     if (!_done.isCompleted) _done.complete();
+     132            8 :     return done;
+     133              :   }
+     134              : 
+     135              :   /// Registers a method named [name] on this server.
+     136              :   ///
+     137              :   /// [callback] can take either zero or one arguments. If it takes zero, any
+     138              :   /// requests for that method that include parameters will be rejected. If it
+     139              :   /// takes one, it will be passed a [Parameters] object.
+     140              :   ///
+     141              :   /// [callback] can return either a JSON-serializable object or a Future that
+     142              :   /// completes to a JSON-serializable object. Any errors in [callback] will be
+     143              :   /// reported to the client as JSON-RPC 2.0 errors.
+     144            8 :   void registerMethod(String name, Function callback) {
+     145           16 :     if (_methods.containsKey(name)) {
+     146            0 :       throw ArgumentError('There\'s already a method named "$name".');
+     147              :     }
+     148              : 
+     149           16 :     _methods[name] = callback;
+     150              :   }
+     151              : 
+     152              :   /// Registers a fallback method on this server.
+     153              :   ///
+     154              :   /// A server may have any number of fallback methods. When a request comes in
+     155              :   /// that doesn't match any named methods, each fallback is tried in order. A
+     156              :   /// fallback can pass on handling a request by throwing a
+     157              :   /// [RpcException.methodNotFound] exception.
+     158              :   ///
+     159              :   /// [callback] can return either a JSON-serializable object or a Future that
+     160              :   /// completes to a JSON-serializable object. Any errors in [callback] will be
+     161              :   /// reported to the client as JSON-RPC 2.0 errors. [callback] may send custom
+     162              :   /// errors by throwing an [RpcException].
+     163            0 :   void registerFallback(Function(Parameters parameters) callback) {
+     164            0 :     _fallbacks.add(callback);
+     165              :   }
+     166              : 
+     167              :   /// Handle a request.
+     168              :   ///
+     169              :   /// [request] is expected to be a JSON-serializable object representing a
+     170              :   /// request sent by a client. This calls the appropriate method or methods for
+     171              :   /// handling that request and returns a JSON-serializable response, or `null`
+     172              :   /// if no response should be sent. [callback] may send custom
+     173              :   /// errors by throwing an [RpcException].
+     174            7 :   Future _handleRequest(request) async {
+     175              :     dynamic response;
+     176            7 :     if (request is List) {
+     177            0 :       if (request.isEmpty) {
+     178            0 :         response = RpcException(error_code.INVALID_REQUEST,
+     179              :                 'A batch must contain at least one request.')
+     180            0 :             .serialize(request);
+     181              :       } else {
+     182            0 :         var results = await Future.wait(request.map(_handleSingleRequest));
+     183            0 :         var nonNull = results.where((result) => result != null);
+     184            0 :         if (nonNull.isEmpty) return;
+     185            0 :         response = nonNull.toList();
+     186              :       }
+     187              :     } else {
+     188            7 :       response = await _handleSingleRequest(request);
+     189              :       if (response == null) return;
+     190              :     }
+     191              : 
+     192           28 :     if (!isClosed) _channel.sink.add(response);
+     193              :   }
+     194              : 
+     195              :   /// Handles an individual parsed request.
+     196            7 :   Future _handleSingleRequest(request) async {
+     197              :     try {
+     198            7 :       _validateRequest(request);
+     199              : 
+     200            7 :       var name = request['method'];
+     201           14 :       var method = _methods[name];
+     202            0 :       method ??= _tryFallbacks;
+     203              : 
+     204              :       Object? result;
+     205            7 :       if (method is ZeroArgumentFunction) {
+     206            0 :         if (request.containsKey('params')) {
+     207            0 :           throw RpcException.invalidParams('No parameters are allowed for '
+     208              :               'method "$name".');
+     209              :         }
+     210            0 :         result = await method();
+     211              :       } else {
+     212           21 :         result = await method(Parameters(name, request['params']));
+     213              :       }
+     214              : 
+     215              :       // A request without an id is a notification, which should not be sent a
+     216              :       // response, even if one is generated on the server.
+     217            7 :       if (!request.containsKey('id')) return null;
+     218              : 
+     219           14 :       return {'jsonrpc': '2.0', 'result': result, 'id': request['id']};
+     220              :     } catch (error, stackTrace) {
+     221            0 :       if (error is RpcException) {
+     222            0 :         if (error.code == error_code.INVALID_REQUEST ||
+     223            0 :             request.containsKey('id')) {
+     224            0 :           return error.serialize(request);
+     225              :         } else {
+     226            0 :           onUnhandledError?.call(error, stackTrace);
+     227              :           return null;
+     228              :         }
+     229            0 :       } else if (!request.containsKey('id')) {
+     230            0 :         onUnhandledError?.call(error, stackTrace);
+     231              :         return null;
+     232              :       }
+     233            0 :       final chain = Chain.forTrace(stackTrace);
+     234            0 :       return RpcException(error_code.SERVER_ERROR, getErrorMessage(error),
+     235            0 :           data: {
+     236            0 :             'full': '$error',
+     237            0 :             'stack': '$chain',
+     238            0 :           }).serialize(request);
+     239              :     }
+     240              :   }
+     241              : 
+     242              :   /// Validates that [request] matches the JSON-RPC spec.
+     243            7 :   void _validateRequest(request) {
+     244            7 :     if (request is! Map) {
+     245            0 :       throw RpcException(
+     246              :           error_code.INVALID_REQUEST,
+     247              :           'Request must be '
+     248              :           'an Array or an Object.');
+     249              :     }
+     250              : 
+     251           14 :     if (strictProtocolChecks && !request.containsKey('jsonrpc')) {
+     252            0 :       throw RpcException(
+     253              :           error_code.INVALID_REQUEST,
+     254              :           'Request must '
+     255              :           'contain a "jsonrpc" key.');
+     256              :     }
+     257              : 
+     258            7 :     if ((strictProtocolChecks || request.containsKey('jsonrpc')) &&
+     259           14 :         request['jsonrpc'] != '2.0') {
+     260            0 :       throw RpcException(
+     261            0 :           error_code.INVALID_REQUEST,
+     262              :           'Invalid JSON-RPC '
+     263            0 :           'version ${jsonEncode(request['jsonrpc'])}, expected "2.0".');
+     264              :     }
+     265              : 
+     266            7 :     if (!request.containsKey('method')) {
+     267            0 :       throw RpcException(
+     268              :           error_code.INVALID_REQUEST,
+     269              :           'Request must '
+     270              :           'contain a "method" key.');
+     271              :     }
+     272              : 
+     273            7 :     var method = request['method'];
+     274           14 :     if (request['method'] is! String) {
+     275            0 :       throw RpcException(
+     276            0 :           error_code.INVALID_REQUEST,
+     277              :           'Request method must '
+     278            0 :           'be a string, but was ${jsonEncode(method)}.');
+     279              :     }
+     280              : 
+     281            7 :     if (request.containsKey('params')) {
+     282            7 :       var params = request['params'];
+     283           14 :       if (params is! List && params is! Map) {
+     284            0 :         throw RpcException(
+     285            0 :             error_code.INVALID_REQUEST,
+     286              :             'Request params must '
+     287            0 :             'be an Array or an Object, but was ${jsonEncode(params)}.');
+     288              :       }
+     289              :     }
+     290              : 
+     291            7 :     var id = request['id'];
+     292           14 :     if (id != null && id is! String && id is! num) {
+     293            0 :       throw RpcException(
+     294            0 :           error_code.INVALID_REQUEST,
+     295              :           'Request id must be a '
+     296            0 :           'string, number, or null, but was ${jsonEncode(id)}.');
+     297              :     }
+     298              :   }
+     299              : 
+     300              :   /// Try all the fallback methods in order.
+     301            0 :   Future _tryFallbacks(Parameters params) {
+     302            0 :     var iterator = _fallbacks.toList().iterator;
+     303              : 
+     304            0 :     Future tryNext() async {
+     305            0 :       if (!iterator.moveNext()) {
+     306            0 :         throw RpcException.methodNotFound(params.method);
+     307              :       }
+     308              : 
+     309              :       try {
+     310            0 :         return await iterator.current(params);
+     311            0 :       } on RpcException catch (error) {
+     312            0 :         if (error.code != error_code.METHOD_NOT_FOUND) rethrow;
+     313            0 :         return tryNext();
+     314              :       }
+     315              :     }
+     316              : 
+     317            0 :     return tryNext();
+     318              :   }
+     319              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html new file mode 100644 index 00000000..e2c4c6f7 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html new file mode 100644 index 00000000..72222ef4 --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html new file mode 100644 index 00000000..ca94c96a --- /dev/null +++ b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html @@ -0,0 +1,142 @@ + + + + + + + LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/json_rpc_2/src - utils.dartCoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+       2              : // for details. All rights reserved. Use of this source code is governed by a
+       3              : // BSD-style license that can be found in the LICENSE file.
+       4              : 
+       5              : import 'dart:async';
+       6              : 
+       7              : import 'package:stream_channel/stream_channel.dart';
+       8              : 
+       9              : import '../error_code.dart' as error_code;
+      10              : import 'exception.dart';
+      11              : 
+      12              : typedef ZeroArgumentFunction = Function();
+      13              : 
+      14              : /// A regular expression to match the exception prefix that some exceptions'
+      15              : /// [Object.toString] values contain.
+      16            0 : final _exceptionPrefix = RegExp(r'^([A-Z][a-zA-Z]*)?(Exception|Error): ');
+      17              : 
+      18              : /// Get a string description of an exception.
+      19              : ///
+      20              : /// Many exceptions include the exception class name at the beginning of their
+      21              : /// [toString], so we remove that if it exists.
+      22            0 : String getErrorMessage(error) =>
+      23            0 :     error.toString().replaceFirst(_exceptionPrefix, '');
+      24              : 
+      25              : /// Like `try`/`finally`, run [body] and ensure that [whenComplete] runs
+      26              : /// afterwards, regardless of whether [body] succeeded.
+      27              : ///
+      28              : /// This is synchronicity-agnostic relative to [body]. If [body] returns a
+      29              : /// [Future], this wil run asynchronously; otherwise it will run synchronously.
+      30            0 : void tryFinally(Function() body, Function() whenComplete) {
+      31              :   dynamic result;
+      32              :   try {
+      33            0 :     result = body();
+      34              :   } catch (_) {
+      35            0 :     whenComplete();
+      36              :     rethrow;
+      37              :   }
+      38              : 
+      39            0 :   if (result is! Future) {
+      40            0 :     whenComplete();
+      41              :   } else {
+      42            0 :     result.whenComplete(whenComplete);
+      43              :   }
+      44              : }
+      45              : 
+      46              : /// A transformer that silently drops [FormatException]s.
+      47            0 : final ignoreFormatExceptions = StreamTransformer<Object?, Object?>.fromHandlers(
+      48            0 :     handleError: (error, stackTrace, sink) {
+      49            0 :   if (error is FormatException) return;
+      50            0 :   sink.addError(error, stackTrace);
+      51              : });
+      52              : 
+      53              : /// A transformer that sends error responses on [FormatException]s.
+      54           16 : final StreamChannelTransformer<Object?, Object?> respondToFormatExceptions =
+      55            8 :     _RespondToFormatExceptionsTransformer();
+      56              : 
+      57              : class _RespondToFormatExceptionsTransformer
+      58              :     implements StreamChannelTransformer<Object?, Object?> {
+      59            8 :   @override
+      60              :   StreamChannel<Object?> bind(StreamChannel<Object?> channel) {
+      61           16 :     return channel.changeStream((stream) {
+      62            8 :       return stream.handleError((dynamic error) {
+      63              :         final formatException = error as FormatException;
+      64            0 :         var exception = RpcException(
+      65            0 :             error_code.PARSE_ERROR, 'Invalid JSON: ${formatException.message}');
+      66            0 :         channel.sink.add(exception.serialize(formatException.source));
+      67            0 :       }, test: (error) => error is FormatException);
+      68              :     });
+      69              :   }
+      70              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/message_tracker.dart.func-c.html b/coverage/html/core/relay_client/message_tracker.dart.func-c.html new file mode 100644 index 00000000..9bbe532d --- /dev/null +++ b/coverage/html/core/relay_client/message_tracker.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/message_tracker.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - message_tracker.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/message_tracker.dart.func.html b/coverage/html/core/relay_client/message_tracker.dart.func.html new file mode 100644 index 00000000..f735d54f --- /dev/null +++ b/coverage/html/core/relay_client/message_tracker.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/message_tracker.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - message_tracker.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/message_tracker.dart.gcov.html b/coverage/html/core/relay_client/message_tracker.dart.gcov.html new file mode 100644 index 00000000..1a9f3a38 --- /dev/null +++ b/coverage/html/core/relay_client/message_tracker.dart.gcov.html @@ -0,0 +1,124 @@ + + + + + + + LCOV - lcov.info - core/relay_client/message_tracker.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - message_tracker.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:typed_data';
+       3              : 
+       4              : import 'package:convert/convert.dart';
+       5              : import 'package:pointycastle/digests/sha256.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_message_tracker.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/store/store_models.dart';
+       9              : 
+      10              : class MessageTracker extends GenericStore<Map<String, String>>
+      11              :     implements IMessageTracker {
+      12           11 :   MessageTracker({
+      13              :     required super.storage,
+      14              :     required super.context,
+      15              :     required super.version,
+      16              :     required super.fromJson,
+      17              :   });
+      18              : 
+      19            8 :   String hashMessage(String message) {
+      20            8 :     return hex.encode(
+      21           16 :       SHA256Digest().process(
+      22            8 :         Uint8List.fromList(
+      23            8 :           utf8.encode(message),
+      24              :         ),
+      25              :       ),
+      26              :     );
+      27              :   }
+      28              : 
+      29            8 :   @override
+      30              :   Future<void> recordMessageEvent(String topic, String message) async {
+      31            8 :     final String hash = hashMessage(message);
+      32              : 
+      33           16 :     onCreate.broadcast(
+      34            8 :       StoreCreateEvent(
+      35              :         topic,
+      36            8 :         {hash: message},
+      37              :       ),
+      38              :     );
+      39              : 
+      40           16 :     if (!data.containsKey(topic)) {
+      41           24 :       data[topic] = {};
+      42              :     }
+      43           24 :     data[topic]![hash] = message;
+      44            8 :     await persist();
+      45              :   }
+      46              : 
+      47            8 :   @override
+      48              :   bool messageIsRecorded(String topic, String message) {
+      49            8 :     final String hash = hashMessage(message);
+      50           40 :     return data.containsKey(topic) && data[topic]!.containsKey(hash);
+      51              :   }
+      52              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client.dart.func-c.html b/coverage/html/core/relay_client/relay_client.dart.func-c.html new file mode 100644 index 00000000..04c62e61 --- /dev/null +++ b/coverage/html/core/relay_client/relay_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client.dart.func.html b/coverage/html/core/relay_client/relay_client.dart.func.html new file mode 100644 index 00000000..da54d500 --- /dev/null +++ b/coverage/html/core/relay_client/relay_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client.dart.gcov.html b/coverage/html/core/relay_client/relay_client.dart.gcov.html new file mode 100644 index 00000000..8bc73788 --- /dev/null +++ b/coverage/html/core/relay_client/relay_client.dart.gcov.html @@ -0,0 +1,542 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client.dartCoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_message_tracker.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_relay_client.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/json_rpc_2/src/parameters.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/json_rpc_2/src/peer.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/websocket_handler.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+      15              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+      16              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+      17              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
+      18              : 
+      19              : class RelayClient implements IRelayClient {
+      20              :   static const JSON_RPC_PUBLISH = 'publish';
+      21              :   static const JSON_RPC_SUBSCRIPTION = 'subscription';
+      22              :   static const JSON_RPC_SUBSCRIBE = 'subscribe';
+      23              :   static const JSON_RPC_UNSUBSCRIBE = 'unsubscribe';
+      24              : 
+      25              :   /// Events ///
+      26              :   /// Relay Client
+      27              : 
+      28              :   @override
+      29              :   final Event<EventArgs> onRelayClientConnect = Event();
+      30              : 
+      31              :   @override
+      32              :   final Event<EventArgs> onRelayClientDisconnect = Event();
+      33              : 
+      34              :   @override
+      35              :   final Event<ErrorEvent> onRelayClientError = Event<ErrorEvent>();
+      36              : 
+      37              :   @override
+      38              :   final Event<MessageEvent> onRelayClientMessage = Event<MessageEvent>();
+      39              : 
+      40              :   /// Subscriptions
+      41              :   @override
+      42              :   final Event<SubscriptionEvent> onSubscriptionCreated =
+      43              :       Event<SubscriptionEvent>();
+      44              : 
+      45              :   @override
+      46              :   final Event<SubscriptionDeletionEvent> onSubscriptionDeleted =
+      47              :       Event<SubscriptionDeletionEvent>();
+      48              : 
+      49              :   @override
+      50              :   final Event<EventArgs> onSubscriptionResubscribed = Event();
+      51              : 
+      52              :   @override
+      53              :   final Event<EventArgs> onSubscriptionSync = Event();
+      54              : 
+      55            9 :   @override
+      56           25 :   bool get isConnected => jsonRPC != null && !jsonRPC!.isClosed;
+      57              : 
+      58           20 :   bool get _relayIsClosed => jsonRPC != null && jsonRPC!.isClosed;
+      59              : 
+      60              :   bool _initialized = false;
+      61              :   bool _active = true;
+      62              :   bool _connecting = false;
+      63              :   Future _connectingFuture = Future.value();
+      64              :   bool _handledClose = false;
+      65              : 
+      66              :   // late WebSocketChannel socket;
+      67              :   // IWebSocketHandler? socket;
+      68              :   Peer? jsonRPC;
+      69              : 
+      70              :   /// Stores all the subs that haven't been completed
+      71              :   Map<String, Future<dynamic>> pendingSubscriptions = {};
+      72              : 
+      73              :   IMessageTracker messageTracker;
+      74              :   IGenericStore<String> topicMap;
+      75              :   final IWebSocketHandler socketHandler;
+      76              : 
+      77              :   ICore core;
+      78              : 
+      79              :   bool _subscribedToHeartbeat = false;
+      80              : 
+      81           10 :   RelayClient({
+      82              :     required this.core,
+      83              :     required this.messageTracker,
+      84              :     required this.topicMap,
+      85              :     IWebSocketHandler? socketHandler,
+      86           10 :   }) : socketHandler = socketHandler ?? WebSocketHandler();
+      87              : 
+      88            9 :   @override
+      89              :   Future<void> init() async {
+      90            9 :     if (_initialized) {
+      91              :       return;
+      92              :     }
+      93              : 
+      94           18 :     await messageTracker.init();
+      95           18 :     await topicMap.init();
+      96              : 
+      97              :     // Setup the json RPC server
+      98            9 :     await _connect();
+      99            9 :     _subscribeToHeartbeat();
+     100              : 
+     101            9 :     _initialized = true;
+     102              :   }
+     103              : 
+     104            7 :   @override
+     105              :   Future<void> publish({
+     106              :     required String topic,
+     107              :     required String message,
+     108              :     required int ttl,
+     109              :     required int tag,
+     110              :   }) async {
+     111            7 :     _checkInitialized();
+     112              : 
+     113            7 :     Map<String, dynamic> data = {
+     114              :       'message': message,
+     115              :       'ttl': ttl,
+     116              :       'topic': topic,
+     117              :       'tag': tag,
+     118              :     };
+     119              : 
+     120              :     try {
+     121           14 :       await messageTracker.recordMessageEvent(topic, message);
+     122            7 :       var _ = await _sendJsonRpcRequest(
+     123            7 :         _buildMethod(JSON_RPC_PUBLISH),
+     124              :         data,
+     125            7 :         JsonRpcUtils.payloadId(entropy: 6),
+     126              :       );
+     127              :     } catch (e) {
+     128              :       // print(e);
+     129           15 :       onRelayClientError.broadcast(ErrorEvent(e));
+     130              :     }
+     131              :   }
+     132              : 
+     133            7 :   @override
+     134              :   Future<String> subscribe({required String topic}) async {
+     135            7 :     _checkInitialized();
+     136              : 
+     137           21 :     pendingSubscriptions[topic] = _onSubscribe(topic);
+     138              : 
+     139           14 :     return await pendingSubscriptions[topic];
+     140              :   }
+     141              : 
+     142            5 :   @override
+     143              :   Future<void> unsubscribe({required String topic}) async {
+     144            5 :     _checkInitialized();
+     145              : 
+     146           10 :     String id = topicMap.get(topic) ?? '';
+     147              : 
+     148              :     try {
+     149            5 :       await _sendJsonRpcRequest(
+     150            5 :         _buildMethod(JSON_RPC_UNSUBSCRIBE),
+     151            5 :         {
+     152              :           'topic': topic,
+     153              :           'id': id,
+     154              :         },
+     155            5 :         JsonRpcUtils.payloadId(entropy: 6),
+     156              :       );
+     157              :     } catch (e) {
+     158           12 :       onRelayClientError.broadcast(ErrorEvent(e));
+     159              :     }
+     160              : 
+     161              :     // Remove the subscription
+     162           10 :     pendingSubscriptions.remove(topic);
+     163           10 :     await topicMap.delete(topic);
+     164              : 
+     165              :     // Delete all the messages
+     166           10 :     await messageTracker.delete(topic);
+     167              :   }
+     168              : 
+     169            0 :   @override
+     170              :   Future<void> connect({String? relayUrl}) async {
+     171            0 :     _checkInitialized();
+     172              : 
+     173            0 :     core.logger.i('RelayClient: Connecting to relay');
+     174              : 
+     175            0 :     await _connect(relayUrl: relayUrl);
+     176              :   }
+     177              : 
+     178            8 :   @override
+     179              :   Future<void> disconnect() async {
+     180            8 :     _checkInitialized();
+     181              : 
+     182           24 :     core.logger.i('RelayClient: Disconnecting from relay');
+     183              : 
+     184            8 :     await _disconnect();
+     185              :   }
+     186              : 
+     187              :   /// PRIVATE FUNCTIONS ///
+     188              : 
+     189            9 :   Future<void> _connect({String? relayUrl}) async {
+     190            9 :     if (isConnected) {
+     191              :       return;
+     192              :     }
+     193              : 
+     194           36 :     core.relayUrl = relayUrl ?? core.relayUrl;
+     195           63 :     core.logger.d('[$runtimeType] Connecting to relay ${core.relayUrl}');
+     196              : 
+     197              :     // If we have tried connecting to the relay before, disconnect
+     198            9 :     if (_active) {
+     199            9 :       await _disconnect();
+     200              :     }
+     201              : 
+     202              :     try {
+     203              :       // Connect and track the connection progress, then start the heartbeat
+     204           18 :       _connectingFuture = _createJsonRPCProvider();
+     205            9 :       await _connectingFuture;
+     206            8 :       _connecting = false;
+     207            8 :       _subscribeToHeartbeat();
+     208              :       //
+     209            2 :     } on TimeoutException catch (e) {
+     210            0 :       core.logger.d('[$runtimeType] Connect timeout: $e');
+     211            0 :       onRelayClientError.broadcast(ErrorEvent('Connection to relay timeout'));
+     212            0 :       _connecting = false;
+     213            0 :       _connect();
+     214              :     } catch (e) {
+     215           10 :       core.logger.d('[$runtimeType] Connect error: $e');
+     216            6 :       onRelayClientError.broadcast(ErrorEvent(e));
+     217            2 :       _connecting = false;
+     218              :     }
+     219              :   }
+     220              : 
+     221            9 :   Future<void> _disconnect() async {
+     222           27 :     core.logger.t('RelayClient Internal: Disconnecting from relay');
+     223            9 :     _active = false;
+     224              : 
+     225            9 :     final bool shouldBroadcastDisonnect = isConnected;
+     226              : 
+     227           17 :     await jsonRPC?.close();
+     228            9 :     jsonRPC = null;
+     229           18 :     await socketHandler.close();
+     230            9 :     _unsubscribeToHeartbeat();
+     231              : 
+     232              :     if (shouldBroadcastDisonnect) {
+     233           16 :       onRelayClientDisconnect.broadcast();
+     234              :     }
+     235              :   }
+     236              : 
+     237            9 :   Future<void> _createJsonRPCProvider() async {
+     238            9 :     _connecting = true;
+     239            9 :     _active = true;
+     240           45 :     final auth = await core.crypto.signJWT(core.relayUrl);
+     241           36 :     core.logger.t('Signed JWT: $auth');
+     242            9 :     final url = WalletConnectUtils.formatRelayRpcUrl(
+     243              :       protocol: WalletConnectConstants.CORE_PROTOCOL,
+     244              :       version: WalletConnectConstants.CORE_VERSION,
+     245           18 :       relayUrl: core.relayUrl,
+     246              :       sdkVersion: WalletConnectConstants.SDK_VERSION,
+     247              :       auth: auth,
+     248           18 :       projectId: core.projectId,
+     249            9 :       packageName: (await WalletConnectUtils.getPackageName()),
+     250              :     );
+     251              : 
+     252            9 :     if (jsonRPC != null) {
+     253            0 :       await jsonRPC!.close();
+     254            0 :       jsonRPC = null;
+     255              :     }
+     256              : 
+     257           36 :     core.logger.t('Initializing WebSocket with $url');
+     258           18 :     await socketHandler.setup(url: url);
+     259           34 :     await socketHandler.connect().timeout(Duration(seconds: 5));
+     260              : 
+     261           32 :     jsonRPC = Peer(socketHandler.channel!);
+     262              : 
+     263           16 :     jsonRPC!.registerMethod(
+     264            8 :       _buildMethod(JSON_RPC_SUBSCRIPTION),
+     265            8 :       _handleSubscription,
+     266              :     );
+     267           16 :     jsonRPC!.registerMethod(
+     268            8 :       _buildMethod(JSON_RPC_SUBSCRIBE),
+     269            8 :       _handleSubscribe,
+     270              :     );
+     271           16 :     jsonRPC!.registerMethod(
+     272            8 :       _buildMethod(JSON_RPC_UNSUBSCRIBE),
+     273            8 :       _handleUnsubscribe,
+     274              :     );
+     275              : 
+     276           16 :     if (jsonRPC!.isClosed) {
+     277              :       throw const WalletConnectError(
+     278              :         code: 0,
+     279              :         message: 'WebSocket closed',
+     280              :       );
+     281              :     }
+     282              : 
+     283           16 :     jsonRPC!.listen();
+     284              : 
+     285              :     // When jsonRPC closes, emit the event
+     286            8 :     _handledClose = false;
+     287           24 :     jsonRPC!.done.then(
+     288            8 :       (value) {
+     289            8 :         _handleRelayClose(
+     290           16 :           socketHandler.closeCode,
+     291           16 :           socketHandler.closeReason,
+     292              :         );
+     293              :       },
+     294              :     );
+     295              : 
+     296           16 :     onRelayClientConnect.broadcast();
+     297           56 :     core.logger.d('[$runtimeType] Connected to relay ${core.relayUrl}');
+     298              :   }
+     299              : 
+     300            8 :   Future<void> _handleRelayClose(int? code, String? reason) async {
+     301            8 :     if (_handledClose) {
+     302            0 :       core.logger.i('Relay close already handled');
+     303              :       return;
+     304              :     }
+     305            8 :     _handledClose = true;
+     306              : 
+     307           32 :     core.logger.i('Handling relay close, code: $code, reason: $reason');
+     308              :     // If the relay isn't active (Disconnected manually), don't do anything
+     309            8 :     if (!_active) {
+     310              :       return;
+     311              :     }
+     312              : 
+     313              :     // If the code requires reconnect, do so
+     314            1 :     final reconnectCodes = [1001, 4008, 4010, 1002, 1005, 10002];
+     315              :     if (code != null) {
+     316            1 :       if (reconnectCodes.contains(code)) {
+     317            0 :         await connect();
+     318              :       } else {
+     319            1 :         await disconnect();
+     320            1 :         final errorReason = code == 3000
+     321              :             ? reason ?? WebSocketErrors.INVALID_PROJECT_ID_OR_JWT
+     322              :             : '';
+     323            2 :         onRelayClientError.broadcast(
+     324            2 :           ErrorEvent(WalletConnectError(
+     325              :             code: code,
+     326              :             message: errorReason,
+     327              :           )),
+     328              :         );
+     329              :       }
+     330              :     }
+     331              :   }
+     332              : 
+     333            9 :   void _subscribeToHeartbeat() {
+     334            9 :     if (!_subscribedToHeartbeat) {
+     335           45 :       core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
+     336            9 :       _subscribedToHeartbeat = true;
+     337              :     }
+     338              :   }
+     339              : 
+     340            9 :   void _unsubscribeToHeartbeat() {
+     341           45 :     core.heartbeat.onPulse.unsubscribe(_heartbeatSubscription);
+     342            9 :     _subscribedToHeartbeat = false;
+     343              :   }
+     344              : 
+     345            5 :   void _heartbeatSubscription(EventArgs? args) async {
+     346            5 :     if (_relayIsClosed) {
+     347            0 :       await _handleRelayClose(10002, null);
+     348              :     }
+     349              :   }
+     350              : 
+     351            8 :   String _buildMethod(String method) {
+     352            8 :     return '${WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL}_$method';
+     353              :   }
+     354              : 
+     355              :   /// JSON RPC MESSAGE HANDLERS
+     356              : 
+     357            7 :   Future<bool> handlePublish(String topic, String message) async {
+     358           28 :     core.logger.t('Handling Publish Message: $topic, $message');
+     359              :     // If we want to ignore the message, stop
+     360            7 :     if (await _shouldIgnoreMessageEvent(topic, message)) {
+     361           24 :       core.logger.w('Ignoring Message: $topic, $message');
+     362              :       return false;
+     363              :     }
+     364              : 
+     365              :     // Record a message event
+     366           14 :     await messageTracker.recordMessageEvent(topic, message);
+     367              : 
+     368              :     // Broadcast the message
+     369           14 :     onRelayClientMessage.broadcast(
+     370            7 :       MessageEvent(
+     371              :         topic,
+     372              :         message,
+     373              :       ),
+     374              :     );
+     375              :     return true;
+     376              :   }
+     377              : 
+     378            7 :   Future<bool> _handleSubscription(Parameters params) async {
+     379           21 :     String topic = params['data']['topic'].value;
+     380           21 :     String message = params['data']['message'].value;
+     381            7 :     return await handlePublish(topic, message);
+     382              :   }
+     383              : 
+     384            0 :   int _handleSubscribe(Parameters params) {
+     385            0 :     return params.hashCode;
+     386              :   }
+     387              : 
+     388            0 :   void _handleUnsubscribe(Parameters params) {
+     389            0 :     core.logger.i('[$runtimeType] _handleUnsubscribe $params');
+     390              :   }
+     391              : 
+     392              :   /// MESSAGE HANDLING
+     393              : 
+     394            7 :   Future<bool> _shouldIgnoreMessageEvent(String topic, String message) async {
+     395            7 :     if (!await _isSubscribed(topic)) return true;
+     396           14 :     return messageTracker.messageIsRecorded(topic, message);
+     397              :   }
+     398              : 
+     399              :   /// SUBSCRIPTION HANDLING
+     400              : 
+     401            8 :   Future _sendJsonRpcRequest(
+     402              :     String method, [
+     403              :     dynamic parameters,
+     404              :     int? id,
+     405              :   ]) async {
+     406              :     // If we are connected and we know it send the message!
+     407            8 :     if (isConnected) {
+     408              :       // Here so we dont return null
+     409              :     }
+     410              :     // If we are connecting, then wait for the connection to establish and then send the message
+     411            5 :     else if (_connecting) {
+     412            0 :       await _connectingFuture;
+     413              :     }
+     414              :     // If we aren't connected but should be (active), try to (re)connect and then send the message
+     415           10 :     else if (!isConnected && _active) {
+     416            0 :       await connect();
+     417              :     }
+     418              :     // In all other cases return null
+     419              :     else {
+     420              :       return null;
+     421              :     }
+     422           16 :     return await jsonRPC!.sendRequest(
+     423              :       method,
+     424              :       parameters,
+     425              :       id,
+     426              :     );
+     427              :   }
+     428              : 
+     429            7 :   Future<String> _onSubscribe(String topic) async {
+     430              :     String? requestId;
+     431              :     try {
+     432            7 :       requestId = await _sendJsonRpcRequest(
+     433            7 :         _buildMethod(JSON_RPC_SUBSCRIBE),
+     434            7 :         {'topic': topic},
+     435            7 :         JsonRpcUtils.payloadId(entropy: 6),
+     436              :       );
+     437              :     } catch (e) {
+     438            4 :       core.logger.w('RelayClient, onSubscribe error. Topic: $topic, Error: $e');
+     439            3 :       onRelayClientError.broadcast(ErrorEvent(e));
+     440              :     }
+     441              : 
+     442              :     if (requestId == null) {
+     443              :       return '';
+     444              :     }
+     445              : 
+     446           21 :     await topicMap.set(topic, requestId.toString());
+     447           14 :     pendingSubscriptions.remove(topic);
+     448              : 
+     449              :     return requestId;
+     450              :   }
+     451              : 
+     452            7 :   Future<bool> _isSubscribed(String topic) async {
+     453           14 :     if (topicMap.has(topic)) {
+     454              :       return true;
+     455              :     }
+     456              : 
+     457            0 :     if (pendingSubscriptions.containsKey(topic)) {
+     458            0 :       await pendingSubscriptions[topic];
+     459            0 :       return topicMap.has(topic);
+     460              :     }
+     461              : 
+     462              :     return false;
+     463              :   }
+     464              : 
+     465            8 :   void _checkInitialized() {
+     466            8 :     if (!_initialized) {
+     467            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     468              :     }
+     469              :   }
+     470              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client_models.dart.func-c.html b/coverage/html/core/relay_client/relay_client_models.dart.func-c.html new file mode 100644 index 00000000..730cbd9d --- /dev/null +++ b/coverage/html/core/relay_client/relay_client_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client_models.dart.func.html b/coverage/html/core/relay_client/relay_client_models.dart.func.html new file mode 100644 index 00000000..a077498a --- /dev/null +++ b/coverage/html/core/relay_client/relay_client_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/relay_client_models.dart.gcov.html b/coverage/html/core/relay_client/relay_client_models.dart.gcov.html new file mode 100644 index 00000000..18cb008d --- /dev/null +++ b/coverage/html/core/relay_client/relay_client_models.dart.gcov.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - core/relay_client/relay_client_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client - relay_client_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:json_annotation/json_annotation.dart';
+       3              : 
+       4              : part 'relay_client_models.g.dart';
+       5              : 
+       6              : @JsonSerializable()
+       7              : class Relay {
+       8              :   final String protocol;
+       9              :   final String? data;
+      10              : 
+      11           12 :   Relay(
+      12              :     this.protocol, {
+      13              :     this.data,
+      14              :   });
+      15              : 
+      16            8 :   factory Relay.fromJson(Map<String, dynamic> json) => _$RelayFromJson(json);
+      17              : 
+      18            8 :   Map<String, dynamic> toJson() => _$RelayToJson(this);
+      19              : }
+      20              : 
+      21              : class MessageEvent extends EventArgs {
+      22              :   String topic;
+      23              :   String message;
+      24              : 
+      25            7 :   MessageEvent(
+      26              :     this.topic,
+      27              :     this.message,
+      28              :   );
+      29              : 
+      30            0 :   @override
+      31            0 :   String toString() => 'topic: $topic, message: $message';
+      32              : }
+      33              : 
+      34              : class ErrorEvent extends EventArgs {
+      35              :   dynamic error;
+      36              : 
+      37            8 :   ErrorEvent(
+      38              :     this.error,
+      39              :   );
+      40              : }
+      41              : 
+      42              : class SubscriptionEvent extends EventArgs {
+      43              :   String id;
+      44              : 
+      45            0 :   SubscriptionEvent(
+      46              :     this.id,
+      47              :   );
+      48              : }
+      49              : 
+      50              : class SubscriptionDeletionEvent extends SubscriptionEvent {
+      51              :   String reason;
+      52              : 
+      53            0 :   SubscriptionDeletionEvent(
+      54              :     id,
+      55              :     this.reason,
+      56            0 :   ) : super(id);
+      57              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html b/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html new file mode 100644 index 00000000..5d77f2cd --- /dev/null +++ b/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/http_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.func.html b/coverage/html/core/relay_client/websocket/http_client.dart.func.html new file mode 100644 index 00000000..af594287 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/http_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/http_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html b/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html new file mode 100644 index 00000000..fecb7aa9 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/http_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - http_client.dartCoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:http/http.dart' as http;
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+       3              : 
+       4              : class HttpWrapper extends IHttpClient {
+       5           82 :   const HttpWrapper();
+       6              : 
+       7            0 :   @override
+       8              :   Future<http.Response> get(
+       9              :     Uri url, {
+      10              :     Map<String, String>? headers,
+      11              :   }) async {
+      12            0 :     return await http.get(url, headers: headers);
+      13              :   }
+      14              : 
+      15            0 :   @override
+      16              :   Future<http.Response> delete(Uri url, {Map<String, String>? headers}) async {
+      17            0 :     return await http.delete(url, headers: headers);
+      18              :   }
+      19              : 
+      20            0 :   @override
+      21              :   Future<http.Response> post(
+      22              :     Uri url, {
+      23              :     Map<String, String>? headers,
+      24              :     Object? body,
+      25              :   }) async {
+      26            0 :     return await http.post(url, headers: headers, body: body);
+      27              :   }
+      28              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html new file mode 100644 index 00000000..065db477 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - i_http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html new file mode 100644 index 00000000..ada9bcaa --- /dev/null +++ b/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - i_http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html new file mode 100644 index 00000000..e8aee9f9 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - i_http_client.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:http/http.dart' as http;
+       2              : 
+       3              : abstract class IHttpClient {
+       4           82 :   const IHttpClient();
+       5              : 
+       6              :   Future<http.Response> get(
+       7              :     Uri url, {
+       8              :     Map<String, String>? headers,
+       9              :   });
+      10              : 
+      11              :   Future<http.Response> post(
+      12              :     Uri url, {
+      13              :     Map<String, String>? headers,
+      14              :     Object? body,
+      15              :   });
+      16              : 
+      17              :   Future<http.Response> delete(
+      18              :     Uri url, {
+      19              :     Map<String, String>? headers,
+      20              :   });
+      21              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/index-sort-f.html b/coverage/html/core/relay_client/websocket/index-sort-f.html new file mode 100644 index 00000000..150716ab --- /dev/null +++ b/coverage/html/core/relay_client/websocket/index-sort-f.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
http_client.dart +
14.3%14.3%
+
14.3 %71-
i_http_client.dart +
100.0%
+
100.0 %11-
websocket_handler.dart +
68.8%68.8%
+
68.8 %3222-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/index-sort-l.html b/coverage/html/core/relay_client/websocket/index-sort-l.html new file mode 100644 index 00000000..41517308 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/index-sort-l.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
http_client.dart +
14.3%14.3%
+
14.3 %71
websocket_handler.dart +
68.8%68.8%
+
68.8 %3222
i_http_client.dart +
100.0%
+
100.0 %11
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/index.html b/coverage/html/core/relay_client/websocket/index.html new file mode 100644 index 00000000..c199af58 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/index.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
http_client.dart +
14.3%14.3%
+
14.3 %71
i_http_client.dart +
100.0%
+
100.0 %11
websocket_handler.dart +
68.8%68.8%
+
68.8 %3222
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html new file mode 100644 index 00000000..9a0650fa --- /dev/null +++ b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - websocket_handler.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html new file mode 100644 index 00000000..d1963b84 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - websocket_handler.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html new file mode 100644 index 00000000..daa1f8e4 --- /dev/null +++ b/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html @@ -0,0 +1,162 @@ + + + + + + + LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/relay_client/websocket - websocket_handler.dartCoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:stream_channel/stream_channel.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       6              : import 'package:web_socket_channel/web_socket_channel.dart';
+       7              : 
+       8              : class WebSocketHandler implements IWebSocketHandler {
+       9              :   String? _url;
+      10            8 :   @override
+      11            8 :   String? get url => _url;
+      12              : 
+      13              :   WebSocketChannel? _socket;
+      14              : 
+      15            8 :   @override
+      16           16 :   int? get closeCode => _socket?.closeCode;
+      17            8 :   @override
+      18           16 :   String? get closeReason => _socket?.closeReason;
+      19              : 
+      20              :   StreamChannel<String>? _channel;
+      21            8 :   @override
+      22            8 :   StreamChannel<String>? get channel => _channel;
+      23              : 
+      24            0 :   @override
+      25            0 :   Future<void> get ready => _socket!.ready;
+      26              : 
+      27              :   // const WebSocketHandler();
+      28              : 
+      29            8 :   @override
+      30              :   Future<void> setup({
+      31              :     required String url,
+      32              :   }) async {
+      33            8 :     _url = url;
+      34              : 
+      35            8 :     await close();
+      36              :   }
+      37              : 
+      38            8 :   @override
+      39              :   Future<void> connect() async {
+      40              :     // print('connecting');
+      41              :     try {
+      42           16 :       _socket = WebSocketChannel.connect(
+      43            8 :         Uri.parse(
+      44           16 :           '$url&useOnCloseEvent=true',
+      45              :         ),
+      46              :       );
+      47              :     } catch (e) {
+      48            0 :       throw WalletConnectError(
+      49            0 :         code: -1,
+      50            0 :         message: 'No internet connection: ${e.toString()}',
+      51              :       );
+      52              :     }
+      53              : 
+      54           24 :     _channel = _socket!.cast<String>();
+      55              : 
+      56            8 :     if (_channel == null) {
+      57              :       // print('Socket channel is null, waiting...');
+      58            0 :       await Future.delayed(const Duration(milliseconds: 500));
+      59            0 :       if (_channel == null) {
+      60              :         // print('Socket channel is still null, throwing ');
+      61            0 :         throw Exception('Socket channel is null');
+      62              :       }
+      63              :     }
+      64              : 
+      65           16 :     await _socket!.ready;
+      66              : 
+      67              :     // Check if the request was successful (status code 200)
+      68              :     // try {} catch (e) {
+      69              :     //   throw WalletConnectError(
+      70              :     //     code: 400,
+      71              :     //     message: 'WebSocket connection failed, missing or invalid project id.',
+      72              :     //   );
+      73              :     // }
+      74              :   }
+      75              : 
+      76            8 :   @override
+      77              :   Future<void> close() async {
+      78              :     try {
+      79            8 :       if (_socket != null) {
+      80           24 :         await _socket?.sink.close();
+      81              :       }
+      82              :     } catch (_) {}
+      83            8 :     _socket = null;
+      84              :   }
+      85              : 
+      86            0 :   @override
+      87              :   String toString() {
+      88            0 :     return 'WebSocketHandler{url: $url, _socket: $_socket, _channel: $_channel}';
+      89              :   }
+      90              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/generic_store.dart.func-c.html b/coverage/html/core/store/generic_store.dart.func-c.html new file mode 100644 index 00000000..f6155c70 --- /dev/null +++ b/coverage/html/core/store/generic_store.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/generic_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - generic_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/generic_store.dart.func.html b/coverage/html/core/store/generic_store.dart.func.html new file mode 100644 index 00000000..b996a19e --- /dev/null +++ b/coverage/html/core/store/generic_store.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/generic_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - generic_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/generic_store.dart.gcov.html b/coverage/html/core/store/generic_store.dart.gcov.html new file mode 100644 index 00000000..cd27193a --- /dev/null +++ b/coverage/html/core/store/generic_store.dart.gcov.html @@ -0,0 +1,243 @@ + + + + + + + LCOV - lcov.info - core/store/generic_store.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - generic_store.dartCoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : import 'package:flutter/material.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/store/store_models.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+       7              : 
+       8              : class GenericStore<T> implements IGenericStore<T> {
+       9              :   @override
+      10              :   final String context;
+      11              :   @override
+      12              :   final String version;
+      13              : 
+      14           12 :   @override
+      15           36 :   String get storageKey => '$version//$context';
+      16              :   @override
+      17              :   final IStore storage;
+      18              : 
+      19              :   @override
+      20              :   final Event<StoreCreateEvent<T>> onCreate = Event();
+      21              :   @override
+      22              :   final Event<StoreUpdateEvent<T>> onUpdate = Event();
+      23              :   @override
+      24              :   final Event<StoreDeleteEvent<T>> onDelete = Event();
+      25              :   @override
+      26              :   final Event<StoreSyncEvent> onSync = Event();
+      27              : 
+      28              :   bool _initialized = false;
+      29              : 
+      30              :   /// Stores map of key to pairing info
+      31              :   Map<String, T> data = {};
+      32              : 
+      33              :   @override
+      34              :   final T Function(dynamic) fromJson;
+      35              : 
+      36           12 :   GenericStore({
+      37              :     required this.storage,
+      38              :     required this.context,
+      39              :     required this.version,
+      40              :     required this.fromJson,
+      41              :   });
+      42              : 
+      43           12 :   @override
+      44              :   Future<void> init() async {
+      45           12 :     if (_initialized) {
+      46              :       return;
+      47              :     }
+      48              : 
+      49           24 :     await storage.init();
+      50           12 :     await restore();
+      51              : 
+      52           12 :     _initialized = true;
+      53              :   }
+      54              : 
+      55            8 :   @override
+      56              :   bool has(String key) {
+      57            8 :     checkInitialized();
+      58           16 :     return data.containsKey(key);
+      59              :   }
+      60              : 
+      61           12 :   @override
+      62              :   T? get(String key) {
+      63           12 :     checkInitialized();
+      64           24 :     if (data.containsKey(key)) {
+      65           20 :       return data[key]!;
+      66              :     }
+      67              :     return null;
+      68              :   }
+      69              : 
+      70           10 :   @override
+      71              :   List<T> getAll() {
+      72           30 :     return data.values.toList();
+      73              :   }
+      74              : 
+      75           12 :   @override
+      76              :   Future<void> set(String key, T value) async {
+      77           12 :     checkInitialized();
+      78              : 
+      79           24 :     if (data.containsKey(key)) {
+      80           18 :       onUpdate.broadcast(
+      81            9 :         StoreUpdateEvent(
+      82              :           key,
+      83              :           value,
+      84              :         ),
+      85              :       );
+      86              :     } else {
+      87           24 :       onCreate.broadcast(
+      88           12 :         StoreCreateEvent(
+      89              :           key,
+      90              :           value,
+      91              :         ),
+      92              :       );
+      93              :     }
+      94              : 
+      95           24 :     data[key] = value;
+      96              : 
+      97           12 :     await persist();
+      98              :   }
+      99              : 
+     100            9 :   @override
+     101              :   Future<void> delete(String key) async {
+     102            9 :     checkInitialized();
+     103              : 
+     104           18 :     if (!data.containsKey(key)) {
+     105              :       return;
+     106              :     }
+     107              : 
+     108           18 :     onDelete.broadcast(
+     109            9 :       StoreDeleteEvent(
+     110              :         key,
+     111           18 :         data.remove(key) as T,
+     112              :       ),
+     113              :     );
+     114              : 
+     115            9 :     await persist();
+     116              :   }
+     117              : 
+     118           12 :   @override
+     119              :   Future<void> persist() async {
+     120           12 :     checkInitialized();
+     121              : 
+     122           24 :     onSync.broadcast(
+     123           12 :       StoreSyncEvent(),
+     124              :     );
+     125              : 
+     126           48 :     await storage.set(storageKey, data);
+     127              :   }
+     128              : 
+     129           12 :   @override
+     130              :   Future<void> restore() async {
+     131              :     // If we haven't stored our version yet, we need to store it and stop
+     132           36 :     if (!storage.has(context)) {
+     133              :       // print('Storing $context');
+     134           60 :       await storage.set(context, {'version': version});
+     135           48 :       await storage.set(storageKey, <String, dynamic>{});
+     136              :       return;
+     137              :     }
+     138              : 
+     139              :     // If we have stored our version, but it doesn't match, we need to delete the previous data,
+     140              :     // create a new version, and stop
+     141           32 :     final String storedVersion = storage.get(context)['version'];
+     142           16 :     if (storedVersion != version) {
+     143              :       // print('Updating storage from $storedVersion to $version');
+     144            4 :       await storage.delete('$storedVersion//$context');
+     145            5 :       await storage.set(context, {'version': version});
+     146            4 :       await storage.set(storageKey, <String, dynamic>{});
+     147              :       return;
+     148              :     }
+     149              : 
+     150           24 :     if (storage.has(storageKey)) {
+     151              :       // If there is invalid data, delete the stored data
+     152              :       // print('Restoring $storageKey');
+     153              :       try {
+     154           34 :         for (var entry in storage.get(storageKey).entries) {
+     155              :           // print(entry);
+     156           12 :           data[entry.key] = fromJson(entry.value);
+     157              :         }
+     158              :       } catch (e) {
+     159              :         // print('Error restoring $storageKey: $e');
+     160            2 :         await storage.delete(storedVersion);
+     161              :       }
+     162              :     }
+     163              :   }
+     164              : 
+     165           12 :   @protected
+     166              :   void checkInitialized() {
+     167           12 :     if (!_initialized) {
+     168            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     169              :     }
+     170              :   }
+     171              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/index-sort-f.html b/coverage/html/core/store/index-sort-f.html new file mode 100644 index 00000000..18d19607 --- /dev/null +++ b/coverage/html/core/store/index-sort-f.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - core/store + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
generic_store.dart +
98.1%98.1%
+
98.1 %5453-
shared_prefs_store.dart +
55.2%55.2%
+
55.2 %6737-
store_models.dart +
100.0%
+
100.0 %44-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/index-sort-l.html b/coverage/html/core/store/index-sort-l.html new file mode 100644 index 00000000..4bddb2d2 --- /dev/null +++ b/coverage/html/core/store/index-sort-l.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/store + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
shared_prefs_store.dart +
55.2%55.2%
+
55.2 %6737
generic_store.dart +
98.1%98.1%
+
98.1 %5453
store_models.dart +
100.0%
+
100.0 %44
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/index.html b/coverage/html/core/store/index.html new file mode 100644 index 00000000..8b9b99c1 --- /dev/null +++ b/coverage/html/core/store/index.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - core/store + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
generic_store.dart +
98.1%98.1%
+
98.1 %5453
shared_prefs_store.dart +
55.2%55.2%
+
55.2 %6737
store_models.dart +
100.0%
+
100.0 %44
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/shared_prefs_store.dart.func-c.html b/coverage/html/core/store/shared_prefs_store.dart.func-c.html new file mode 100644 index 00000000..86aff844 --- /dev/null +++ b/coverage/html/core/store/shared_prefs_store.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/shared_prefs_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - shared_prefs_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/shared_prefs_store.dart.func.html b/coverage/html/core/store/shared_prefs_store.dart.func.html new file mode 100644 index 00000000..ac040d97 --- /dev/null +++ b/coverage/html/core/store/shared_prefs_store.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/shared_prefs_store.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - shared_prefs_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/shared_prefs_store.dart.gcov.html b/coverage/html/core/store/shared_prefs_store.dart.gcov.html new file mode 100644 index 00000000..077f0ad1 --- /dev/null +++ b/coverage/html/core/store/shared_prefs_store.dart.gcov.html @@ -0,0 +1,232 @@ + + + + + + + LCOV - lcov.info - core/store/shared_prefs_store.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - shared_prefs_store.dartCoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:shared_preferences/shared_preferences.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+       7              : 
+       8              : class SharedPrefsStores implements IStore<Map<String, dynamic>> {
+       9              :   late SharedPreferences prefs;
+      10              :   bool _initialized = false;
+      11              : 
+      12              :   final Map<String, Map<String, dynamic>> _map;
+      13              : 
+      14            0 :   @override
+      15            0 :   Map<String, Map<String, dynamic>> get map => _map;
+      16              : 
+      17            0 :   @override
+      18            0 :   List<String> get keys => map.keys.toList();
+      19              : 
+      20            0 :   @override
+      21            0 :   List<Map<String, dynamic>> get values => map.values.toList();
+      22              : 
+      23           12 :   @override
+      24              :   String get storagePrefix => WalletConnectConstants.CORE_STORAGE_PREFIX;
+      25              : 
+      26              :   final bool memoryStore;
+      27              : 
+      28           12 :   SharedPrefsStores({
+      29              :     Map<String, Map<String, dynamic>>? defaultValue,
+      30              :     this.memoryStore = false,
+      31           12 :   }) : _map = defaultValue ?? {};
+      32              : 
+      33              :   /// Initializes the store, loading all persistent values into memory.
+      34           12 :   @override
+      35              :   Future<void> init() async {
+      36           12 :     if (_initialized) {
+      37              :       return;
+      38              :     }
+      39              : 
+      40           12 :     if (!memoryStore) {
+      41            0 :       prefs = await SharedPreferences.getInstance();
+      42              :     }
+      43              : 
+      44           12 :     _initialized = true;
+      45              :   }
+      46              : 
+      47              :   /// Gets the value of the specified key, if it hasn't been cached yet, it caches it.
+      48              :   /// If the key doesn't exist it throws an error.
+      49            8 :   @override
+      50              :   Map<String, dynamic>? get(String key) {
+      51            8 :     _checkInitialized();
+      52              : 
+      53            8 :     final String keyWithPrefix = _addPrefix(key);
+      54           16 :     if (_map.containsKey(keyWithPrefix)) {
+      55           16 :       return _map[keyWithPrefix];
+      56              :     }
+      57              : 
+      58            1 :     Map<String, dynamic>? value = _getPref(keyWithPrefix);
+      59              :     if (value != null) {
+      60            0 :       _map[keyWithPrefix] = value;
+      61              :     }
+      62              :     return value;
+      63              :   }
+      64              : 
+      65           12 :   @override
+      66              :   bool has(String key) {
+      67           12 :     final String keyWithPrefix = _addPrefix(key);
+      68           12 :     if (memoryStore) {
+      69           24 :       return _map.containsKey(keyWithPrefix);
+      70              :     }
+      71            0 :     return prefs.containsKey(keyWithPrefix);
+      72              :   }
+      73              : 
+      74              :   /// Gets all of the values of the store
+      75            0 :   @override
+      76              :   List<Map<String, dynamic>> getAll() {
+      77            0 :     _checkInitialized();
+      78            0 :     return values;
+      79              :   }
+      80              : 
+      81              :   /// Sets the value of a key within the store, overwriting the value if it exists.
+      82           12 :   @override
+      83              :   Future<void> set(String key, Map<String, dynamic> value) async {
+      84           12 :     _checkInitialized();
+      85              : 
+      86           12 :     final String keyWithPrefix = _addPrefix(key);
+      87           24 :     _map[keyWithPrefix] = value;
+      88           12 :     await _updatePref(keyWithPrefix, value);
+      89              :   }
+      90              : 
+      91              :   /// Updates the value of a key. Fails if it does not exist.
+      92            0 :   @override
+      93              :   Future<void> update(String key, Map<String, dynamic> value) async {
+      94            0 :     _checkInitialized();
+      95              : 
+      96            0 :     final String keyWithPrefix = _addPrefix(key);
+      97            0 :     if (!map.containsKey(keyWithPrefix)) {
+      98            0 :       throw Errors.getInternalError(Errors.NO_MATCHING_KEY);
+      99              :     } else {
+     100            0 :       _map[keyWithPrefix] = value;
+     101            0 :       await _updatePref(keyWithPrefix, value);
+     102              :     }
+     103              :   }
+     104              : 
+     105              :   /// Removes the key from the persistent store
+     106            1 :   @override
+     107              :   Future<void> delete(String key) async {
+     108            1 :     _checkInitialized();
+     109              : 
+     110            1 :     final String keyWithPrefix = _addPrefix(key);
+     111            2 :     _map.remove(keyWithPrefix);
+     112            1 :     await _removePref(keyWithPrefix);
+     113              :   }
+     114              : 
+     115            1 :   Map<String, dynamic>? _getPref(String key) {
+     116            1 :     if (memoryStore) {
+     117              :       return null;
+     118              :     }
+     119              : 
+     120            0 :     if (prefs.containsKey(key)) {
+     121            0 :       final value = prefs.getString(key)!;
+     122            0 :       return jsonDecode(value);
+     123              :     } else {
+     124            0 :       throw Errors.getInternalError(Errors.NO_MATCHING_KEY);
+     125              :     }
+     126              :   }
+     127              : 
+     128           12 :   Future<void> _updatePref(String key, Map<String, dynamic> value) async {
+     129           12 :     if (memoryStore) {
+     130              :       return;
+     131              :     }
+     132              : 
+     133              :     try {
+     134            0 :       final stringValue = jsonEncode(value);
+     135            0 :       await prefs.setString(key, stringValue);
+     136            0 :     } on Exception catch (e) {
+     137            0 :       throw Errors.getInternalError(
+     138              :         Errors.MISSING_OR_INVALID,
+     139            0 :         context: e.toString(),
+     140              :       );
+     141              :     }
+     142              :   }
+     143              : 
+     144            1 :   Future<void> _removePref(String key) async {
+     145            1 :     if (memoryStore) {
+     146              :       return;
+     147              :     }
+     148            0 :     await prefs.remove(key);
+     149              :   }
+     150              : 
+     151           12 :   String _addPrefix(String key) {
+     152           24 :     return '$storagePrefix$key';
+     153              :   }
+     154              : 
+     155           12 :   void _checkInitialized() {
+     156           12 :     if (!_initialized) {
+     157            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     158              :     }
+     159              :   }
+     160              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/store_models.dart.func-c.html b/coverage/html/core/store/store_models.dart.func-c.html new file mode 100644 index 00000000..3330a52f --- /dev/null +++ b/coverage/html/core/store/store_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/store_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - store_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/store_models.dart.func.html b/coverage/html/core/store/store_models.dart.func.html new file mode 100644 index 00000000..99277502 --- /dev/null +++ b/coverage/html/core/store/store_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/store/store_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - store_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/store/store_models.dart.gcov.html b/coverage/html/core/store/store_models.dart.gcov.html new file mode 100644 index 00000000..b6a1c2fd --- /dev/null +++ b/coverage/html/core/store/store_models.dart.gcov.html @@ -0,0 +1,107 @@ + + + + + + + LCOV - lcov.info - core/store/store_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/store - store_models.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:event/event.dart';
+       2              : 
+       3              : class StoreCreateEvent<T> extends EventArgs {
+       4              :   final String key;
+       5              :   final T value;
+       6              : 
+       7           12 :   StoreCreateEvent(
+       8              :     this.key,
+       9              :     this.value,
+      10              :   );
+      11              : }
+      12              : 
+      13              : class StoreUpdateEvent<T> extends EventArgs {
+      14              :   final String key;
+      15              :   final T value;
+      16              : 
+      17            9 :   StoreUpdateEvent(
+      18              :     this.key,
+      19              :     this.value,
+      20              :   );
+      21              : }
+      22              : 
+      23              : class StoreDeleteEvent<T> extends EventArgs {
+      24              :   final String key;
+      25              :   final T value;
+      26              : 
+      27            9 :   StoreDeleteEvent(
+      28              :     this.key,
+      29              :     this.value,
+      30              :   );
+      31              : }
+      32              : 
+      33              : class StoreSyncEvent extends EventArgs {
+      34           12 :   StoreSyncEvent();
+      35              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/index-sort-f.html b/coverage/html/core/verify/index-sort-f.html new file mode 100644 index 00000000..05fef30b --- /dev/null +++ b/coverage/html/core/verify/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - core/verify + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
verify.dart +
68.8%68.8%
+
68.8 %1611-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/index-sort-l.html b/coverage/html/core/verify/index-sort-l.html new file mode 100644 index 00000000..b58f2163 --- /dev/null +++ b/coverage/html/core/verify/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/verify + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify.dart +
68.8%68.8%
+
68.8 %1611
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/index.html b/coverage/html/core/verify/index.html new file mode 100644 index 00000000..364763fc --- /dev/null +++ b/coverage/html/core/verify/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/verify + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify.dart +
68.8%68.8%
+
68.8 %1611
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/index-sort-f.html b/coverage/html/core/verify/models/index-sort-f.html new file mode 100644 index 00000000..8d4773bf --- /dev/null +++ b/coverage/html/core/verify/models/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - core/verify/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
verify_context.dart +
11.1%11.1%
+
11.1 %91-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/index-sort-l.html b/coverage/html/core/verify/models/index-sort-l.html new file mode 100644 index 00000000..e8f1561b --- /dev/null +++ b/coverage/html/core/verify/models/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/verify/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify_context.dart +
11.1%11.1%
+
11.1 %91
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/index.html b/coverage/html/core/verify/models/index.html new file mode 100644 index 00000000..b92f34cd --- /dev/null +++ b/coverage/html/core/verify/models/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - core/verify/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify_context.dart +
11.1%11.1%
+
11.1 %91
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/verify_context.dart.func-c.html b/coverage/html/core/verify/models/verify_context.dart.func-c.html new file mode 100644 index 00000000..db576da9 --- /dev/null +++ b/coverage/html/core/verify/models/verify_context.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/verify/models/verify_context.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/models - verify_context.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/verify_context.dart.func.html b/coverage/html/core/verify/models/verify_context.dart.func.html new file mode 100644 index 00000000..3ec78b10 --- /dev/null +++ b/coverage/html/core/verify/models/verify_context.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/verify/models/verify_context.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/models - verify_context.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/models/verify_context.dart.gcov.html b/coverage/html/core/verify/models/verify_context.dart.gcov.html new file mode 100644 index 00000000..0aec3ceb --- /dev/null +++ b/coverage/html/core/verify/models/verify_context.dart.gcov.html @@ -0,0 +1,122 @@ + + + + + + + LCOV - lcov.info - core/verify/models/verify_context.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify/models - verify_context.dartCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : 
+       3              : part 'verify_context.g.dart';
+       4              : part 'verify_context.freezed.dart';
+       5              : 
+       6              : enum Validation {
+       7              :   UNKNOWN,
+       8              :   VALID,
+       9              :   INVALID,
+      10              :   SCAM;
+      11              : 
+      12            0 :   bool get invalid => this == INVALID;
+      13            0 :   bool get valid => this == VALID;
+      14            0 :   bool get unknown => this == UNKNOWN;
+      15            0 :   bool get scam => this == SCAM;
+      16              : }
+      17              : 
+      18              : @freezed
+      19              : class VerifyContext with _$VerifyContext {
+      20              :   @JsonSerializable()
+      21              :   const factory VerifyContext({
+      22              :     required String origin,
+      23              :     required Validation validation,
+      24              :     required String verifyUrl,
+      25              :     bool? isScam,
+      26              :   }) = _VerifyContext;
+      27              : 
+      28            0 :   factory VerifyContext.fromJson(Map<String, dynamic> json) =>
+      29            0 :       _$VerifyContextFromJson(json);
+      30              : }
+      31              : 
+      32              : @freezed
+      33              : class AttestationResponse with _$AttestationResponse {
+      34              :   @JsonSerializable()
+      35              :   const factory AttestationResponse({
+      36              :     required String origin,
+      37              :     required String attestationId,
+      38              :     bool? isScam,
+      39              :   }) = _AttestationResponse;
+      40              : 
+      41            0 :   factory AttestationResponse.fromJson(Map<String, dynamic> json) =>
+      42            0 :       _$AttestationResponseFromJson(json);
+      43              : }
+      44              : 
+      45              : class AttestationNotFound implements Exception {
+      46              :   int code;
+      47              :   String message;
+      48              : 
+      49            8 :   AttestationNotFound({required this.code, required this.message}) : super();
+      50              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/verify.dart.func-c.html b/coverage/html/core/verify/verify.dart.func-c.html new file mode 100644 index 00000000..75309f44 --- /dev/null +++ b/coverage/html/core/verify/verify.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/verify/verify.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify - verify.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/verify.dart.func.html b/coverage/html/core/verify/verify.dart.func.html new file mode 100644 index 00000000..c7702288 --- /dev/null +++ b/coverage/html/core/verify/verify.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - core/verify/verify.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify - verify.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/core/verify/verify.dart.gcov.html b/coverage/html/core/verify/verify.dart.gcov.html new file mode 100644 index 00000000..80e3521d --- /dev/null +++ b/coverage/html/core/verify/verify.dart.gcov.html @@ -0,0 +1,132 @@ + + + + + + + LCOV - lcov.info - core/verify/verify.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - core/verify - verify.dartCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/verify/i_verify.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+       8              : 
+       9              : class Verify implements IVerify {
+      10              :   final ICore _core;
+      11              :   final IHttpClient _httpClient;
+      12              :   late String _verifyUrl;
+      13              : 
+      14           10 :   Verify({
+      15              :     required ICore core,
+      16              :     required IHttpClient httpClient,
+      17              :   })  : _core = core,
+      18              :         _httpClient = httpClient;
+      19              : 
+      20            5 :   @override
+      21              :   Future<void> init({String? verifyUrl}) async {
+      22              :     // TODO custom verifyUrl is not yet allowed.
+      23              :     // Always using walletconnect urls for now
+      24           10 :     _verifyUrl = _setVerifyUrl(verifyUrl: verifyUrl);
+      25              :   }
+      26              : 
+      27            4 :   @override
+      28              :   Future<AttestationResponse?> resolve({required String attestationId}) async {
+      29              :     try {
+      30           12 :       final uri = Uri.parse('$_verifyUrl/attestation/$attestationId');
+      31           16 :       final response = await _httpClient.get(uri).timeout(Duration(seconds: 5));
+      32           16 :       if (response.statusCode == 404 || response.body.isEmpty) {
+      33            4 :         throw AttestationNotFound(
+      34              :           code: 404,
+      35              :           message: 'Attestion for this dapp could not be found',
+      36              :         );
+      37              :       }
+      38            0 :       if (response.statusCode != 200) {
+      39            0 :         throw Exception('Attestation response error: ${response.statusCode}');
+      40              :       }
+      41            0 :       return AttestationResponse.fromJson(jsonDecode(response.body));
+      42              :     } catch (e) {
+      43           20 :       _core.logger.d('[$runtimeType] resolve $e');
+      44              :       rethrow;
+      45              :     }
+      46              :   }
+      47              : 
+      48            5 :   String _setVerifyUrl({String? verifyUrl}) {
+      49              :     String url = verifyUrl ?? WalletConnectConstants.VERIFY_SERVER;
+      50              : 
+      51            5 :     if (!WalletConnectConstants.TRUSTED_VERIFY_URLS.contains(url)) {
+      52            0 :       _core.logger.i(
+      53            0 :         '[$runtimeType] verifyUrl $url not included in trusted list, '
+      54              :         'assigning default: ${WalletConnectConstants.VERIFY_SERVER}',
+      55              :       );
+      56              :       url = WalletConnectConstants.VERIFY_SERVER;
+      57              :     }
+      58              :     return url;
+      59              :   }
+      60              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/emerald.png b/coverage/html/emerald.png new file mode 100644 index 0000000000000000000000000000000000000000..38ad4f4068b935643d2486f323005fb294a9bd7e GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 literal 0 HcmV?d00001 diff --git a/coverage/html/gcov.css b/coverage/html/gcov.css new file mode 100644 index 00000000..6c23ba93 --- /dev/null +++ b/coverage/html/gcov.css @@ -0,0 +1,1101 @@ +/* All views: initial background and text color */ +body +{ + color: #000000; + background-color: #ffffff; +} + +/* All views: standard link format*/ +a:link +{ + color: #284fa8; + text-decoration: underline; +} + +/* All views: standard link - visited format */ +a:visited +{ + color: #00cb40; + text-decoration: underline; +} + +/* All views: standard link - activated format */ +a:active +{ + color: #ff0040; + text-decoration: underline; +} + +/* All views: main title format */ +td.title +{ + text-align: center; + padding-bottom: 10px; + font-family: sans-serif; + font-size: 20pt; + font-style: italic; + font-weight: bold; +} +/* "Line coverage date bins" leader */ +td.subTableHeader +{ + text-align: center; + padding-bottom: 6px; + font-family: sans-serif; + font-weight: bold; + vertical-align: center; +} + +/* All views: header item format */ +td.headerItem +{ + text-align: right; + padding-right: 6px; + font-family: sans-serif; + font-weight: bold; + vertical-align: top; + white-space: nowrap; +} + +/* All views: header item value format */ +td.headerValue +{ + text-align: left; + color: #284fa8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; +} + +/* All views: header item coverage table heading */ +td.headerCovTableHead +{ + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; +} + +/* All views: header item coverage table entry */ +td.headerCovTableEntry +{ + text-align: right; + color: #284fa8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #dae7fe; +} + +/* All views: header item coverage table entry for high coverage rate */ +td.headerCovTableEntryHi +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #a7fc9d; +} + +/* All views: header item coverage table entry for medium coverage rate */ +td.headerCovTableEntryMed +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #ffea20; +} + +/* All views: header item coverage table entry for ow coverage rate */ +td.headerCovTableEntryLo +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #ff0000; +} + +/* All views: header legend value for legend entry */ +td.headerValueLeg +{ + text-align: left; + color: #000000; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; + padding-top: 4px; +} + +/* All views: color of horizontal ruler */ +td.ruler +{ + background-color: #6688d4; +} + +/* All views: version string format */ +td.versionInfo +{ + text-align: center; + padding-top: 2px; + font-family: sans-serif; + font-style: italic; +} + +/* Directory view/File view (all)/Test case descriptions: + table headline format */ +td.tableHead +{ + text-align: center; + color: #ffffff; + background-color: #6688d4; + font-family: sans-serif; + font-size: 120%; + font-weight: bold; + white-space: nowrap; + padding-left: 4px; + padding-right: 4px; +} + +span.tableHeadSort +{ + padding-right: 4px; +} + +/* Directory view/File view (all): filename entry format */ +td.coverFile +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284fa8; + background-color: #dae7fe; + font-family: monospace; +} + +/* Directory view/File view (all): directory name entry format */ +td.coverDirectory +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284fa8; + background-color: #b8d0ff; + font-family: monospace; +} + +/* Directory view/File view (all): filename entry format */ +td.overallOwner +{ + text-align: center; + font-weight: bold; + font-family: sans-serif; + background-color: #dae7fe; + padding-right: 10px; + padding-left: 10px; +} + +/* Directory view/File view (all): filename entry format */ +td.ownerName +{ + text-align: right; + font-style: italic; + font-family: sans-serif; + background-color: #E5DBDB; + padding-right: 10px; + padding-left: 20px; +} + +/* Directory view/File view (all): bar-graph entry format*/ +td.coverBar +{ + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; +} + +/* Directory view/File view (all): bar-graph entry format*/ +td.owner_coverBar +{ + padding-left: 10px; + padding-right: 10px; + background-color: #E5DBDB; +} + +/* Directory view/File view (all): bar-graph outline color */ +td.coverBarOutline +{ + background-color: #000000; +} + +/* Directory view/File view (all): percentage entry for files with + high coverage rate */ +td.coverPerHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #a7fc9d; + font-weight: bold; + font-family: sans-serif; +} + +/* 'owner' entry: slightly lighter color than 'coverPerHi' */ +td.owner_coverPerHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #82E0AA; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry */ +td.coverNumDflt +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; + white-space: nowrap; + font-family: sans-serif; +} + +/* td background color and font for the 'owner' section of the table */ +td.ownerTla +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #E5DBDB; + white-space: nowrap; + font-family: sans-serif; + font-style: italic; +} + +/* Directory view/File view (all): line count entry for files with + high coverage rate */ +td.coverNumHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #a7fc9d; + white-space: nowrap; + font-family: sans-serif; +} + +td.owner_coverNumHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #82E0AA; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + medium coverage rate */ +td.coverPerMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #ffea20; + font-weight: bold; + font-family: sans-serif; +} + +td.owner_coverPerMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #F9E79F; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + medium coverage rate */ +td.coverNumMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #ffea20; + white-space: nowrap; + font-family: sans-serif; +} + +td.owner_coverNumMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #F9E79F; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + low coverage rate */ +td.coverPerLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #ff0000; + font-weight: bold; + font-family: sans-serif; +} + +td.owner_coverPerLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #EC7063; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + low coverage rate */ +td.coverNumLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #ff0000; + white-space: nowrap; + font-family: sans-serif; +} + +td.owner_coverNumLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #EC7063; + white-space: nowrap; + font-family: sans-serif; +} + +/* File view (all): "show/hide details" link format */ +a.detail:link +{ + color: #b8d0ff; + font-size:80%; +} + +/* File view (all): "show/hide details" link - visited format */ +a.detail:visited +{ + color: #b8d0ff; + font-size:80%; +} + +/* File view (all): "show/hide details" link - activated format */ +a.detail:active +{ + color: #ffffff; + font-size:80%; +} + +/* File view (detail): test name entry */ +td.testName +{ + text-align: right; + padding-right: 10px; + background-color: #dae7fe; + font-family: sans-serif; +} + +/* File view (detail): test percentage entry */ +td.testPer +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; + font-family: sans-serif; +} + +/* File view (detail): test lines count entry */ +td.testNum +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; + font-family: sans-serif; +} + +/* Test case descriptions: test name format*/ +dt +{ + font-family: sans-serif; + font-weight: bold; +} + +/* Test case descriptions: description table body */ +td.testDescription +{ + padding-top: 10px; + padding-left: 30px; + padding-bottom: 10px; + padding-right: 30px; + background-color: #dae7fe; +} + +/* Source code view: function entry */ +td.coverFn +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284fa8; + background-color: #dae7fe; + font-family: monospace; +} + +/* Source code view: function entry zero count*/ +td.coverFnLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #ff0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: function entry nonzero count*/ +td.coverFnHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; + font-weight: bold; + font-family: sans-serif; +} + +td.coverFnAlias +{ + text-align: right; + padding-left: 10px; + padding-right: 20px; + color: #284fa8; + /* make this a slightly different color than the leader - otherwise, + otherwise the alias is hard to distinguish in the table */ + background-color: #E5DBDB; /* very light pale grey/blue */ + font-family: monospace; +} + +/* Source code view: function entry zero count*/ +td.coverFnAliasLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #EC7063; /* lighter red */ + font-family: sans-serif; +} + +/* Source code view: function entry nonzero count*/ +td.coverFnAliasHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #dae7fe; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: source code format */ +pre.source +{ + font-family: monospace; + white-space: pre; + margin-top: 2px; +} + +/* elided/removed code */ +span.elidedSource +{ + font-family: sans-serif; + /*font-size: 8pt; */ + font-style: italic; + background-color: lightgrey; +} + +/* Source code view: line number format */ +span.lineNum +{ + background-color: #efe383; +} + +/* Source code view: line number format when there are deleted + lines in the corresponding location */ +span.lineNumWithDelete +{ + foreground-color: #efe383; + background-color: lightgrey; +} + +/* Source code view: format for Cov legend */ +span.coverLegendCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #cad7fe; +} + +/* Source code view: format for NoCov legend */ +span.coverLegendNoCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #ff6230; +} + +/* Source code view: format for the source code heading line */ +pre.sourceHeading +{ + white-space: pre; + font-family: monospace; + font-weight: bold; + margin: 0px; +} + +/* All views: header legend value for low rate */ +td.headerValueLegL +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 4px; + padding-right: 2px; + background-color: #ff0000; + font-size: 80%; +} + +/* All views: header legend value for med rate */ +td.headerValueLegM +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 2px; + background-color: #ffea20; + font-size: 80%; +} + +/* All views: header legend value for hi rate */ +td.headerValueLegH +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 4px; + background-color: #a7fc9d; + font-size: 80%; +} + +/* All views except source code view: legend format for low coverage */ +span.coverLegendCovLo +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #ff0000; +} + +/* All views except source code view: legend format for med coverage */ +span.coverLegendCovMed +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #ffea20; +} + +/* All views except source code view: legend format for hi coverage */ +span.coverLegendCovHi +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #a7fc9d; +} + +a.branchTla:link +{ + color: #000000; +} + +a.branchTla:visited +{ + color: #000000; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0): +Newly added code is not tested" */ +td.tlaUNC +{ + text-align: right; + background-color: #FF6230; +} +td.tlaBgUNC { + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0): +Newly added code is not tested" */ +span.tlaUNC +{ + text-align: left; + background-color: #FF6230; +} +span.tlaBgUNC { + background-color: #FF6230; +} +a.tlaBgUNC { + background-color: #FF6230; + color: #000000; +} + +td.headerCovTableHeadUNC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0): +Unchanged code is no longer tested" */ +td.tlaLBC +{ + text-align: right; + background-color: #FF6230; +} +td.tlaBgLBC { + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0): +Unchanged code is no longer tested" */ +span.tlaLBC +{ + text-align: left; + background-color: #FF6230; +} +span.tlaBgLBC { + background-color: #FF6230; +} +a.tlaBgLBC { + background-color: #FF6230; + color: #000000; +} + +td.headerCovTableHeadLBC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0): +Previously unused code is untested" */ +td.tlaUIC +{ + text-align: right; + background-color: #FF6230; +} +td.tlaBgUIC { + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0): +Previously unused code is untested" */ +span.tlaUIC +{ + text-align: left; + background-color: #FF6230; +} +span.tlaBgUIC { + background-color: #FF6230; +} +a.tlaBgUIC { + background-color: #FF6230; + color: #000000; +} + +td.headerCovTableHeadUIC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0): +Unchanged code was untested before, is untested now" */ +td.tlaUBC +{ + text-align: right; + background-color: #FF6230; +} +td.tlaBgUBC { + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0): +Unchanged code was untested before, is untested now" */ +span.tlaUBC +{ + text-align: left; + background-color: #FF6230; +} +span.tlaBgUBC { + background-color: #FF6230; +} +a.tlaBgUBC { + background-color: #FF6230; + color: #000000; +} + +td.headerCovTableHeadUBC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FF6230; +} + +/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1): +Unchanged code is tested now" */ +td.tlaGBC +{ + text-align: right; + background-color: #CAD7FE; +} +td.tlaBgGBC { + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1): +Unchanged code is tested now" */ +span.tlaGBC +{ + text-align: left; + background-color: #CAD7FE; +} +span.tlaBgGBC { + background-color: #CAD7FE; +} +a.tlaBgGBC { + background-color: #CAD7FE; + color: #000000; +} + +td.headerCovTableHeadGBC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1): +Previously unused code is tested now" */ +td.tlaGIC +{ + text-align: right; + background-color: #CAD7FE; +} +td.tlaBgGIC { + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1): +Previously unused code is tested now" */ +span.tlaGIC +{ + text-align: left; + background-color: #CAD7FE; +} +span.tlaBgGIC { + background-color: #CAD7FE; +} +a.tlaBgGIC { + background-color: #CAD7FE; + color: #000000; +} + +td.headerCovTableHeadGIC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1): +Newly added code is tested" */ +td.tlaGNC +{ + text-align: right; + background-color: #CAD7FE; +} +td.tlaBgGNC { + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1): +Newly added code is tested" */ +span.tlaGNC +{ + text-align: left; + background-color: #CAD7FE; +} +span.tlaBgGNC { + background-color: #CAD7FE; +} +a.tlaBgGNC { + background-color: #CAD7FE; + color: #000000; +} + +td.headerCovTableHeadGNC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1): +Unchanged code was tested before and is still tested" */ +td.tlaCBC +{ + text-align: right; + background-color: #CAD7FE; +} +td.tlaBgCBC { + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1): +Unchanged code was tested before and is still tested" */ +span.tlaCBC +{ + text-align: left; + background-color: #CAD7FE; +} +span.tlaBgCBC { + background-color: #CAD7FE; +} +a.tlaBgCBC { + background-color: #CAD7FE; + color: #000000; +} + +td.headerCovTableHeadCBC { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #CAD7FE; +} + +/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #): +Previously untested code is unused now" */ +td.tlaEUB +{ + text-align: right; + background-color: #FFFFFF; +} +td.tlaBgEUB { + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #): +Previously untested code is unused now" */ +span.tlaEUB +{ + text-align: left; + background-color: #FFFFFF; +} +span.tlaBgEUB { + background-color: #FFFFFF; +} +a.tlaBgEUB { + background-color: #FFFFFF; + color: #000000; +} + +td.headerCovTableHeadEUB { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #): +Previously tested code is unused now" */ +td.tlaECB +{ + text-align: right; + background-color: #FFFFFF; +} +td.tlaBgECB { + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #): +Previously tested code is unused now" */ +span.tlaECB +{ + text-align: left; + background-color: #FFFFFF; +} +span.tlaBgECB { + background-color: #FFFFFF; +} +a.tlaBgECB { + background-color: #FFFFFF; + color: #000000; +} + +td.headerCovTableHeadECB { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -): +Previously untested code has been deleted" */ +td.tlaDUB +{ + text-align: right; + background-color: #FFFFFF; +} +td.tlaBgDUB { + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -): +Previously untested code has been deleted" */ +span.tlaDUB +{ + text-align: left; + background-color: #FFFFFF; +} +span.tlaBgDUB { + background-color: #FFFFFF; +} +a.tlaBgDUB { + background-color: #FFFFFF; + color: #000000; +} + +td.headerCovTableHeadDUB { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -): +Previously tested code has been deleted" */ +td.tlaDCB +{ + text-align: right; + background-color: #FFFFFF; +} +td.tlaBgDCB { + background-color: #FFFFFF; +} + +/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -): +Previously tested code has been deleted" */ +span.tlaDCB +{ + text-align: left; + background-color: #FFFFFF; +} +span.tlaBgDCB { + background-color: #FFFFFF; +} +a.tlaBgDCB { + background-color: #FFFFFF; + color: #000000; +} + +td.headerCovTableHeadDCB { + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + white-space: nowrap; + background-color: #FFFFFF; +} + +/* Source code view: format for date/owner bin that is not hit */ +span.missBins +{ + background-color: #ff0000 /* red */ +} diff --git a/coverage/html/glass.png b/coverage/html/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..e1abc00680a3093c49fdb775ae6bdb6764c95af2 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv literal 0 HcmV?d00001 diff --git a/coverage/html/index-sort-f.html b/coverage/html/index-sort-f.html new file mode 100644 index 00000000..7312040d --- /dev/null +++ b/coverage/html/index-sort-f.html @@ -0,0 +1,393 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_api/ +
75.5%75.5%
+
75.5 %192145-
core/ +
74.5%74.5%
+
74.5 %5138-
core/crypto/ +
90.6%90.6%
+
90.6 %180163-
core/echo/ +
93.3%93.3%
+
93.3 %3028-
core/echo/models/ +
66.7%66.7%
+
66.7 %1510-
core/heartbit/ +
66.7%66.7%
+
66.7 %96-
core/pairing/ +
89.1%89.1%
+
89.1 %303270-
core/pairing/utils/ +
54.7%54.7%
+
54.7 %5329-
core/relay_auth/ +
86.5%86.5%
+
86.5 %11196-
core/relay_client/ +
85.6%85.6%
+
85.6 %201172-
core/relay_client/json_rpc_2/ +
0.0%
+
0.0 %6-
core/relay_client/json_rpc_2/src/ +
40.8%40.8%
+
40.8 %360147-
core/relay_client/websocket/ +
60.0%60.0%
+
60.0 %4024-
core/store/ +
75.2%75.2%
+
75.2 %12594-
core/verify/ +
68.8%68.8%
+
68.8 %1611-
core/verify/models/ +
11.1%11.1%
+
11.1 %91-
models/ +
65.2%65.2%
+
65.2 %2315-
sign_api/ +
52.9%52.9%
+
52.9 %1211641-
sign_api/models/ +
45.5%45.5%
+
45.5 %9945-
sign_api/models/auth/ +
45.6%45.6%
+
45.6 %16977-
sign_api/utils/ +
80.7%80.7%
+
80.7 %11996-
sign_api/utils/auth/ +
21.9%21.9%
+
21.9 %32070-
utils/ +
71.2%71.2%
+
71.2 %319227-
web3app/ +
64.7%64.7%
+
64.7 %11675-
web3wallet/ +
71.7%71.7%
+
71.7 %13899-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/index-sort-l.html b/coverage/html/index-sort-l.html new file mode 100644 index 00000000..5af4387e --- /dev/null +++ b/coverage/html/index-sort-l.html @@ -0,0 +1,307 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core/relay_client/json_rpc_2/ +
0.0%
+
0.0 %6
core/verify/models/ +
11.1%11.1%
+
11.1 %91
sign_api/utils/auth/ +
21.9%21.9%
+
21.9 %32070
core/relay_client/json_rpc_2/src/ +
40.8%40.8%
+
40.8 %360147
sign_api/models/ +
45.5%45.5%
+
45.5 %9945
sign_api/models/auth/ +
45.6%45.6%
+
45.6 %16977
sign_api/ +
52.9%52.9%
+
52.9 %1211641
core/pairing/utils/ +
54.7%54.7%
+
54.7 %5329
core/relay_client/websocket/ +
60.0%60.0%
+
60.0 %4024
web3app/ +
64.7%64.7%
+
64.7 %11675
models/ +
65.2%65.2%
+
65.2 %2315
core/heartbit/ +
66.7%66.7%
+
66.7 %96
core/echo/models/ +
66.7%66.7%
+
66.7 %1510
core/verify/ +
68.8%68.8%
+
68.8 %1611
utils/ +
71.2%71.2%
+
71.2 %319227
web3wallet/ +
71.7%71.7%
+
71.7 %13899
core/ +
74.5%74.5%
+
74.5 %5138
core/store/ +
75.2%75.2%
+
75.2 %12594
auth_api/ +
75.5%75.5%
+
75.5 %192145
sign_api/utils/ +
80.7%80.7%
+
80.7 %11996
core/relay_client/ +
85.6%85.6%
+
85.6 %201172
core/relay_auth/ +
86.5%86.5%
+
86.5 %11196
core/pairing/ +
89.1%89.1%
+
89.1 %303270
core/crypto/ +
90.6%90.6%
+
90.6 %180163
core/echo/ +
93.3%93.3%
+
93.3 %3028
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/index.html b/coverage/html/index.html new file mode 100644 index 00000000..cec02a5b --- /dev/null +++ b/coverage/html/index.html @@ -0,0 +1,307 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_api/ +
75.5%75.5%
+
75.5 %192145
core/ +
74.5%74.5%
+
74.5 %5138
core/crypto/ +
90.6%90.6%
+
90.6 %180163
core/echo/ +
93.3%93.3%
+
93.3 %3028
core/echo/models/ +
66.7%66.7%
+
66.7 %1510
core/heartbit/ +
66.7%66.7%
+
66.7 %96
core/pairing/ +
89.1%89.1%
+
89.1 %303270
core/pairing/utils/ +
54.7%54.7%
+
54.7 %5329
core/relay_auth/ +
86.5%86.5%
+
86.5 %11196
core/relay_client/ +
85.6%85.6%
+
85.6 %201172
core/relay_client/json_rpc_2/ +
0.0%
+
0.0 %6
core/relay_client/json_rpc_2/src/ +
40.8%40.8%
+
40.8 %360147
core/relay_client/websocket/ +
60.0%60.0%
+
60.0 %4024
core/store/ +
75.2%75.2%
+
75.2 %12594
core/verify/ +
68.8%68.8%
+
68.8 %1611
core/verify/models/ +
11.1%11.1%
+
11.1 %91
models/ +
65.2%65.2%
+
65.2 %2315
sign_api/ +
52.9%52.9%
+
52.9 %1211641
sign_api/models/ +
45.5%45.5%
+
45.5 %9945
sign_api/models/auth/ +
45.6%45.6%
+
45.6 %16977
sign_api/utils/ +
80.7%80.7%
+
80.7 %11996
sign_api/utils/auth/ +
21.9%21.9%
+
21.9 %32070
utils/ +
71.2%71.2%
+
71.2 %319227
web3app/ +
64.7%64.7%
+
64.7 %11675
web3wallet/ +
71.7%71.7%
+
71.7 %13899
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/basic_models.dart.func-c.html b/coverage/html/models/basic_models.dart.func-c.html new file mode 100644 index 00000000..586c9e2c --- /dev/null +++ b/coverage/html/models/basic_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/basic_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - basic_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/basic_models.dart.func.html b/coverage/html/models/basic_models.dart.func.html new file mode 100644 index 00000000..bfc2014b --- /dev/null +++ b/coverage/html/models/basic_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/basic_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - basic_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/basic_models.dart.gcov.html b/coverage/html/models/basic_models.dart.gcov.html new file mode 100644 index 00000000..719519e0 --- /dev/null +++ b/coverage/html/models/basic_models.dart.gcov.html @@ -0,0 +1,116 @@ + + + + + + + LCOV - lcov.info - models/basic_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - basic_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
+       3              : 
+       4              : part 'basic_models.g.dart';
+       5              : part 'basic_models.freezed.dart';
+       6              : 
+       7              : /// ERRORS
+       8              : 
+       9              : class WalletConnectErrorSilent {}
+      10              : 
+      11              : @freezed
+      12              : class WalletConnectError with _$WalletConnectError {
+      13              :   // @JsonSerializable(includeIfNull: false)
+      14              :   const factory WalletConnectError({
+      15              :     required int code,
+      16              :     required String message,
+      17              :     String? data,
+      18              :   }) = _WalletConnectError;
+      19              : 
+      20            0 :   factory WalletConnectError.fromJson(Map<String, dynamic> json) =>
+      21            0 :       _$WalletConnectErrorFromJson(json);
+      22              : }
+      23              : 
+      24              : @freezed
+      25              : class RpcOptions with _$RpcOptions {
+      26              :   // @JsonSerializable()
+      27              :   const factory RpcOptions({
+      28              :     required int ttl,
+      29              :     required bool prompt,
+      30              :     required int tag,
+      31              :   }) = _RpcOptions;
+      32              : }
+      33              : 
+      34              : @freezed
+      35              : class ConnectionMetadata with _$ConnectionMetadata {
+      36              :   // @JsonSerializable()
+      37              :   const factory ConnectionMetadata({
+      38              :     required String publicKey,
+      39              :     required PairingMetadata metadata,
+      40              :   }) = _ConnectionMetadata;
+      41              : 
+      42            5 :   factory ConnectionMetadata.fromJson(Map<String, dynamic> json) =>
+      43            5 :       _$ConnectionMetadataFromJson(json);
+      44              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/index-sort-f.html b/coverage/html/models/index-sort-f.html new file mode 100644 index 00000000..946daf35 --- /dev/null +++ b/coverage/html/models/index-sort-f.html @@ -0,0 +1,153 @@ + + + + + + + LCOV - lcov.info - models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
basic_models.dart +
50.0%50.0%
+
50.0 %42-
json_rpc_error.dart +
50.0%50.0%
+
50.0 %126-
json_rpc_request.dart +
100.0%
+
100.0 %22-
json_rpc_response.dart +
100.0%
+
100.0 %22-
uri_parse_result.dart +
100.0%
+
100.0 %33-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/index-sort-l.html b/coverage/html/models/index-sort-l.html new file mode 100644 index 00000000..58982d45 --- /dev/null +++ b/coverage/html/models/index-sort-l.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
basic_models.dart +
50.0%50.0%
+
50.0 %42
json_rpc_error.dart +
50.0%50.0%
+
50.0 %126
json_rpc_request.dart +
100.0%
+
100.0 %22
json_rpc_response.dart +
100.0%
+
100.0 %22
uri_parse_result.dart +
100.0%
+
100.0 %33
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/index.html b/coverage/html/models/index.html new file mode 100644 index 00000000..f9cd7bb6 --- /dev/null +++ b/coverage/html/models/index.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
basic_models.dart +
50.0%50.0%
+
50.0 %42
json_rpc_error.dart +
50.0%50.0%
+
50.0 %126
json_rpc_request.dart +
100.0%
+
100.0 %22
json_rpc_response.dart +
100.0%
+
100.0 %22
uri_parse_result.dart +
100.0%
+
100.0 %33
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_error.dart.func-c.html b/coverage/html/models/json_rpc_error.dart.func-c.html new file mode 100644 index 00000000..be8dcd4b --- /dev/null +++ b/coverage/html/models/json_rpc_error.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_error.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_error.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_error.dart.func.html b/coverage/html/models/json_rpc_error.dart.func.html new file mode 100644 index 00000000..0b444a4e --- /dev/null +++ b/coverage/html/models/json_rpc_error.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_error.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_error.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_error.dart.gcov.html b/coverage/html/models/json_rpc_error.dart.gcov.html new file mode 100644 index 00000000..64d6c799 --- /dev/null +++ b/coverage/html/models/json_rpc_error.dart.gcov.html @@ -0,0 +1,99 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_error.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_error.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : 
+       3              : part 'json_rpc_error.g.dart';
+       4              : part 'json_rpc_error.freezed.dart';
+       5              : 
+       6              : @freezed
+       7              : class JsonRpcError with _$JsonRpcError {
+       8              :   @JsonSerializable(includeIfNull: false)
+       9              :   const factory JsonRpcError({
+      10              :     int? code,
+      11              :     String? message,
+      12              :   }) = _JsonRpcError;
+      13              : 
+      14            0 :   factory JsonRpcError.serverError(String message) =>
+      15            0 :       JsonRpcError(code: -32000, message: message);
+      16            3 :   factory JsonRpcError.invalidParams(String message) =>
+      17            6 :       JsonRpcError(code: -32602, message: message);
+      18            0 :   factory JsonRpcError.invalidRequest(String message) =>
+      19            0 :       JsonRpcError(code: -32600, message: message);
+      20            0 :   factory JsonRpcError.parseError(String message) =>
+      21            0 :       JsonRpcError(code: -32700, message: message);
+      22            3 :   factory JsonRpcError.methodNotFound(String message) =>
+      23            6 :       JsonRpcError(code: -32601, message: message);
+      24              : 
+      25            3 :   factory JsonRpcError.fromJson(Map<String, dynamic> json) =>
+      26            3 :       _$JsonRpcErrorFromJson(json);
+      27              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_request.dart.func-c.html b/coverage/html/models/json_rpc_request.dart.func-c.html new file mode 100644 index 00000000..126b9c9c --- /dev/null +++ b/coverage/html/models/json_rpc_request.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_request.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_request.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_request.dart.func.html b/coverage/html/models/json_rpc_request.dart.func.html new file mode 100644 index 00000000..d44befa1 --- /dev/null +++ b/coverage/html/models/json_rpc_request.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_request.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_request.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_request.dart.gcov.html b/coverage/html/models/json_rpc_request.dart.gcov.html new file mode 100644 index 00000000..f2083d8c --- /dev/null +++ b/coverage/html/models/json_rpc_request.dart.gcov.html @@ -0,0 +1,90 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_request.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_request.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : 
+       3              : part 'json_rpc_request.g.dart';
+       4              : part 'json_rpc_request.freezed.dart';
+       5              : 
+       6              : @freezed
+       7              : class JsonRpcRequest with _$JsonRpcRequest {
+       8              :   @JsonSerializable()
+       9              :   const factory JsonRpcRequest({
+      10              :     required int id,
+      11              :     @Default('2.0') String jsonrpc,
+      12              :     required String method,
+      13              :     dynamic params,
+      14              :   }) = _JsonRpcRequest;
+      15              : 
+      16            6 :   factory JsonRpcRequest.fromJson(Map<String, dynamic> json) =>
+      17            6 :       _$JsonRpcRequestFromJson(json);
+      18              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_response.dart.func-c.html b/coverage/html/models/json_rpc_response.dart.func-c.html new file mode 100644 index 00000000..076881dd --- /dev/null +++ b/coverage/html/models/json_rpc_response.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_response.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_response.dart.func.html b/coverage/html/models/json_rpc_response.dart.func.html new file mode 100644 index 00000000..d79d2f86 --- /dev/null +++ b/coverage/html/models/json_rpc_response.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_response.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/json_rpc_response.dart.gcov.html b/coverage/html/models/json_rpc_response.dart.gcov.html new file mode 100644 index 00000000..20e2c5f8 --- /dev/null +++ b/coverage/html/models/json_rpc_response.dart.gcov.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - models/json_rpc_response.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - json_rpc_response.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+       3              : 
+       4              : part 'json_rpc_response.g.dart';
+       5              : part 'json_rpc_response.freezed.dart';
+       6              : 
+       7              : @Freezed(genericArgumentFactories: true)
+       8              : class JsonRpcResponse<T> with _$JsonRpcResponse<T> {
+       9              :   // @JsonSerializable(genericArgumentFactories: true)
+      10              :   const factory JsonRpcResponse({
+      11              :     required int id,
+      12              :     @Default('2.0') String jsonrpc,
+      13              :     JsonRpcError? error,
+      14              :     T? result,
+      15              :   }) = _JsonRpcResponse<T>;
+      16              : 
+      17            6 :   factory JsonRpcResponse.fromJson(Map<String, dynamic> json) =>
+      18           12 :       _$JsonRpcResponseFromJson(json, (object) => object as T);
+      19              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/uri_parse_result.dart.func-c.html b/coverage/html/models/uri_parse_result.dart.func-c.html new file mode 100644 index 00000000..049e515b --- /dev/null +++ b/coverage/html/models/uri_parse_result.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/uri_parse_result.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - uri_parse_result.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/uri_parse_result.dart.func.html b/coverage/html/models/uri_parse_result.dart.func.html new file mode 100644 index 00000000..c6c5bee7 --- /dev/null +++ b/coverage/html/models/uri_parse_result.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - models/uri_parse_result.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - uri_parse_result.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/models/uri_parse_result.dart.gcov.html b/coverage/html/models/uri_parse_result.dart.gcov.html new file mode 100644 index 00000000..dfbad25d --- /dev/null +++ b/coverage/html/models/uri_parse_result.dart.gcov.html @@ -0,0 +1,116 @@ + + + + + + + LCOV - lcov.info - models/uri_parse_result.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - models - uri_parse_result.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       2              : 
+       3              : enum URIVersion {
+       4              :   v1,
+       5              :   v2,
+       6              : }
+       7              : 
+       8              : class URIParseResult {
+       9              :   final String protocol;
+      10              :   final String topic;
+      11              :   final URIVersion? version;
+      12              :   final URIV1ParsedData? v1Data;
+      13              :   final URIV2ParsedData? v2Data;
+      14              : 
+      15            8 :   URIParseResult({
+      16              :     required this.protocol,
+      17              :     required this.version,
+      18              :     required this.topic,
+      19              :     this.v1Data,
+      20              :     this.v2Data,
+      21              :   });
+      22              : }
+      23              : 
+      24              : class URIV1ParsedData {
+      25              :   final String key;
+      26              :   final String bridge;
+      27              : 
+      28            5 :   URIV1ParsedData({
+      29              :     required this.key,
+      30              :     required this.bridge,
+      31              :   });
+      32              : }
+      33              : 
+      34              : class URIV2ParsedData {
+      35              :   final String symKey;
+      36              :   final Relay relay;
+      37              :   final List<String> methods;
+      38              : 
+      39            8 :   URIV2ParsedData({
+      40              :     required this.symKey,
+      41              :     required this.relay,
+      42              :     required this.methods,
+      43              :   });
+      44              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/ruby.png b/coverage/html/ruby.png new file mode 100644 index 0000000000000000000000000000000000000000..991b6d4ec9e78be165e3ef757eed1aada287364d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS literal 0 HcmV?d00001 diff --git a/coverage/html/sign_api/index-sort-f.html b/coverage/html/sign_api/index-sort-f.html new file mode 100644 index 00000000..12426721 --- /dev/null +++ b/coverage/html/sign_api/index-sort-f.html @@ -0,0 +1,129 @@ + + + + + + + LCOV - lcov.info - sign_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
sessions.dart +
100.0%
+
100.0 %77-
sign_client.dart +
57.6%57.6%
+
57.6 %15891-
sign_engine.dart +
51.9%51.9%
+
51.9 %1046543-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/index-sort-l.html b/coverage/html/sign_api/index-sort-l.html new file mode 100644 index 00000000..19b67aeb --- /dev/null +++ b/coverage/html/sign_api/index-sort-l.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - sign_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
sign_engine.dart +
51.9%51.9%
+
51.9 %1046543
sign_client.dart +
57.6%57.6%
+
57.6 %15891
sessions.dart +
100.0%
+
100.0 %77
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/index.html b/coverage/html/sign_api/index.html new file mode 100644 index 00000000..bad13f86 --- /dev/null +++ b/coverage/html/sign_api/index.html @@ -0,0 +1,109 @@ + + + + + + + LCOV - lcov.info - sign_api + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
sessions.dart +
100.0%
+
100.0 %77
sign_client.dart +
57.6%57.6%
+
57.6 %15891
sign_engine.dart +
51.9%51.9%
+
51.9 %1046543
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html new file mode 100644 index 00000000..df39df89 --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html new file mode 100644 index 00000000..bc6a2b92 --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html new file mode 100644 index 00000000..221634af --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_events.dartCoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       8              : 
+       9              : class AuthRequest extends EventArgs {
+      10              :   final int id;
+      11              :   final String topic;
+      12              :   final AuthPayloadParams payloadParams;
+      13              :   final ConnectionMetadata requester;
+      14              : 
+      15            2 :   AuthRequest({
+      16              :     required this.id,
+      17              :     required this.topic,
+      18              :     required this.payloadParams,
+      19              :     required this.requester,
+      20              :   });
+      21              : 
+      22            0 :   @override
+      23              :   String toString() {
+      24            0 :     return 'AuthRequest(id: $id, topic: $topic, payloadParams: $payloadParams, requester: $requester)';
+      25              :   }
+      26              : }
+      27              : 
+      28              : class AuthResponse extends EventArgs {
+      29              :   final int id;
+      30              :   final String topic;
+      31              :   final Cacao? result;
+      32              :   final WalletConnectError? error;
+      33              :   final JsonRpcError? jsonRpcError;
+      34              : 
+      35            2 :   AuthResponse({
+      36              :     required this.id,
+      37              :     required this.topic,
+      38              :     this.result,
+      39              :     this.error,
+      40              :     this.jsonRpcError,
+      41              :   });
+      42              : 
+      43            0 :   Map<String, dynamic> toJson() => {
+      44            0 :         'id': id,
+      45            0 :         'topic': topic,
+      46            0 :         if (result != null) 'result': result?.toJson(),
+      47            0 :         if (error != null) 'error': error!.toJson(),
+      48            0 :         if (jsonRpcError != null) 'jsonRpcError': jsonRpcError!.toJson(),
+      49              :       };
+      50              : 
+      51            0 :   @override
+      52              :   String toString() {
+      53            0 :     return 'AuthResponse(${jsonEncode(toJson())})';
+      54              :   }
+      55              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html new file mode 100644 index 00000000..1ceaec25 --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html new file mode 100644 index 00000000..501942af --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html new file mode 100644 index 00000000..ee8f1990 --- /dev/null +++ b/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html @@ -0,0 +1,238 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - auth_client_models.dartCoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:freezed_annotation/freezed_annotation.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_utils.dart';
+       8              : 
+       9              : part 'auth_client_models.g.dart';
+      10              : part 'auth_client_models.freezed.dart';
+      11              : 
+      12              : class AuthRequestResponse {
+      13              :   final int id;
+      14              :   final String pairingTopic;
+      15              :   final Completer<AuthResponse> completer;
+      16              :   final Uri? uri;
+      17              : 
+      18            2 :   AuthRequestResponse({
+      19              :     required this.id,
+      20              :     required this.pairingTopic,
+      21              :     required this.completer,
+      22              :     this.uri,
+      23              :   });
+      24              : }
+      25              : 
+      26              : class AuthRequestParams {
+      27              :   /// The Chain ID.
+      28              :   /// Examples: eip155:1 (Eth Mainnet), eip155:43114 (Avalanche)
+      29              :   final String chainId;
+      30              : 
+      31              :   /// The complete URL you are logging into.
+      32              :   /// Example: https://example.com/login
+      33              :   final String aud;
+      34              : 
+      35              :   /// The domain you are logging in to.
+      36              :   /// Example: example.com
+      37              :   final String domain;
+      38              :   final String nonce;
+      39              :   final String? type;
+      40              :   final String? nbf;
+      41              :   final String? exp;
+      42              :   final String? statement;
+      43              :   final String? requestId;
+      44              :   final List<String>? resources;
+      45              :   final int? expiry;
+      46              : 
+      47            3 :   AuthRequestParams({
+      48              :     required this.chainId,
+      49              :     required this.domain,
+      50              :     required this.aud,
+      51              :     String? nonce,
+      52              :     this.type = CacaoHeader.EIP4361,
+      53              :     this.nbf,
+      54              :     this.exp,
+      55              :     this.statement,
+      56              :     this.requestId,
+      57              :     this.resources,
+      58              :     this.expiry,
+      59            3 :   }) : nonce = nonce ?? AuthUtils.generateNonce();
+      60              : 
+      61            0 :   Map<String, dynamic> toJson() => {
+      62            0 :         'chainId': chainId,
+      63            0 :         'aud': aud,
+      64            0 :         'domain': domain,
+      65            0 :         'nonce': nonce,
+      66            0 :         if (type != null) 'type': type,
+      67            0 :         if (nbf != null) 'nbf': nbf,
+      68            0 :         if (exp != null) 'exp': exp,
+      69            0 :         if (statement != null) 'statement': statement,
+      70            0 :         if (requestId != null) 'requestId': requestId,
+      71            0 :         if (resources != null) 'resources': resources,
+      72            0 :         if (expiry != null) 'expiry': expiry,
+      73              :       };
+      74              : }
+      75              : 
+      76              : @freezed
+      77              : class AuthPayloadParams with _$AuthPayloadParams {
+      78              :   @JsonSerializable(includeIfNull: false)
+      79              :   const factory AuthPayloadParams({
+      80              :     required String chainId,
+      81              :     required String aud,
+      82              :     required String domain,
+      83              :     required String nonce,
+      84              :     required String type,
+      85              :     //
+      86              :     required String version,
+      87              :     required String iat,
+      88              :     //
+      89              :     String? nbf,
+      90              :     String? exp,
+      91              :     String? statement,
+      92              :     String? requestId,
+      93              :     List<String>? resources,
+      94              :   }) = _AuthPayloadParams;
+      95              : 
+      96            2 :   factory AuthPayloadParams.fromRequestParams(AuthRequestParams params) {
+      97            2 :     final now = DateTime.now();
+      98            2 :     return AuthPayloadParams(
+      99            2 :       type: params.type ?? CacaoHeader.EIP4361,
+     100            2 :       chainId: params.chainId,
+     101            2 :       domain: params.domain,
+     102            2 :       aud: params.aud,
+     103              :       version: '1',
+     104            2 :       nonce: params.nonce,
+     105            2 :       iat: DateTime.utc(
+     106            2 :         now.year,
+     107            2 :         now.month,
+     108            2 :         now.day,
+     109            2 :         now.hour,
+     110            2 :         now.minute,
+     111            2 :         now.second,
+     112            2 :         now.millisecond,
+     113            2 :       ).toIso8601String(),
+     114            2 :       nbf: params.nbf,
+     115            2 :       exp: params.exp,
+     116            2 :       statement: params.statement,
+     117            2 :       requestId: params.requestId,
+     118            2 :       resources: params.resources,
+     119              :     );
+     120              :   }
+     121              : 
+     122            2 :   factory AuthPayloadParams.fromJson(Map<String, dynamic> json) =>
+     123            2 :       _$AuthPayloadParamsFromJson(json);
+     124              : }
+     125              : 
+     126              : @freezed
+     127              : class PendingAuthRequest with _$PendingAuthRequest {
+     128              :   @JsonSerializable(includeIfNull: false)
+     129              :   const factory PendingAuthRequest({
+     130              :     required int id,
+     131              :     required String pairingTopic,
+     132              :     required ConnectionMetadata metadata,
+     133              :     required CacaoRequestPayload cacaoPayload,
+     134              :   }) = _PendingAuthRequest;
+     135              : 
+     136            0 :   factory PendingAuthRequest.fromJson(Map<String, dynamic> json) =>
+     137            0 :       _$PendingAuthRequestFromJson(json);
+     138              : }
+     139              : 
+     140              : class AuthRequestCompleter {
+     141              :   final int id;
+     142              :   final String pairingTopic;
+     143              :   final String responseTopic;
+     144              :   final PendingAuthRequest request;
+     145              :   final Completer<Cacao> completer;
+     146              : 
+     147            0 :   AuthRequestCompleter({
+     148              :     required this.id,
+     149              :     required this.pairingTopic,
+     150              :     required this.responseTopic,
+     151              :     required this.request,
+     152              :     required this.completer,
+     153              :   });
+     154              : }
+     155              : 
+     156              : class RespondParams {
+     157              :   final int id;
+     158              :   final CacaoSignature? signature;
+     159              :   final WalletConnectError? error;
+     160              : 
+     161            0 :   RespondParams({
+     162              :     required this.id,
+     163              :     this.signature,
+     164              :     this.error,
+     165              :   });
+     166              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html new file mode 100644 index 00000000..1b4ebc61 --- /dev/null +++ b/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - common_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html new file mode 100644 index 00000000..3999380c --- /dev/null +++ b/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - common_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html new file mode 100644 index 00000000..e25fc7f2 --- /dev/null +++ b/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html @@ -0,0 +1,268 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - common_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : 
+       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
+       5              : 
+       6              : part 'common_auth_models.g.dart';
+       7              : part 'common_auth_models.freezed.dart';
+       8              : 
+       9              : @freezed
+      10              : class AuthPublicKey with _$AuthPublicKey {
+      11              :   @JsonSerializable(includeIfNull: false)
+      12              :   const factory AuthPublicKey({
+      13              :     required String publicKey,
+      14              :   }) = _AuthPublicKey;
+      15              : 
+      16            0 :   factory AuthPublicKey.fromJson(Map<String, dynamic> json) =>
+      17            0 :       _$AuthPublicKeyFromJson(json);
+      18              : }
+      19              : 
+      20              : @freezed
+      21              : class CacaoRequestPayload with _$CacaoRequestPayload {
+      22              :   @JsonSerializable(includeIfNull: false)
+      23              :   const factory CacaoRequestPayload({
+      24              :     required String domain,
+      25              :     required String aud,
+      26              :     required String version,
+      27              :     required String nonce,
+      28              :     required String iat,
+      29              :     String? nbf,
+      30              :     String? exp,
+      31              :     String? statement,
+      32              :     String? requestId,
+      33              :     List<String>? resources,
+      34              :   }) = _CacaoRequestPayload;
+      35              : 
+      36            2 :   factory CacaoRequestPayload.fromPayloadParams(AuthPayloadParams params) {
+      37            2 :     return CacaoRequestPayload(
+      38            2 :       domain: params.domain,
+      39            2 :       aud: params.aud,
+      40            2 :       version: params.version,
+      41            2 :       nonce: params.nonce,
+      42            2 :       iat: params.iat,
+      43            2 :       nbf: params.nbf,
+      44            2 :       exp: params.exp,
+      45            2 :       statement: params.statement,
+      46            2 :       requestId: params.requestId,
+      47            2 :       resources: params.resources,
+      48              :     );
+      49              :   }
+      50              : 
+      51            0 :   factory CacaoRequestPayload.fromSessionAuthPayload(
+      52              :     SessionAuthPayload params,
+      53              :   ) {
+      54            0 :     return CacaoRequestPayload(
+      55            0 :       domain: params.domain,
+      56            0 :       aud: params.aud,
+      57            0 :       version: params.version,
+      58            0 :       nonce: params.nonce,
+      59            0 :       iat: params.iat,
+      60            0 :       nbf: params.nbf,
+      61            0 :       exp: params.exp,
+      62            0 :       statement: params.statement,
+      63            0 :       requestId: params.requestId,
+      64            0 :       resources: params.resources,
+      65              :     );
+      66              :   }
+      67              : 
+      68            2 :   factory CacaoRequestPayload.fromCacaoPayload(CacaoPayload payload) {
+      69            2 :     return CacaoRequestPayload(
+      70            2 :       domain: payload.domain,
+      71            2 :       aud: payload.aud,
+      72            2 :       version: payload.version,
+      73            2 :       nonce: payload.nonce,
+      74            2 :       iat: payload.iat,
+      75            2 :       nbf: payload.nbf,
+      76            2 :       exp: payload.exp,
+      77            2 :       statement: payload.statement,
+      78            2 :       requestId: payload.requestId,
+      79            2 :       resources: payload.resources,
+      80              :     );
+      81              :   }
+      82              : 
+      83            0 :   factory CacaoRequestPayload.fromJson(Map<String, dynamic> json) =>
+      84            0 :       _$CacaoRequestPayloadFromJson(json);
+      85              : }
+      86              : 
+      87              : @freezed
+      88              : class CacaoPayload with _$CacaoPayload {
+      89              :   @JsonSerializable(includeIfNull: false)
+      90              :   const factory CacaoPayload({
+      91              :     required String iss,
+      92              :     required String domain,
+      93              :     required String aud,
+      94              :     required String version,
+      95              :     required String nonce,
+      96              :     required String iat,
+      97              :     String? nbf,
+      98              :     String? exp,
+      99              :     String? statement,
+     100              :     String? requestId,
+     101              :     List<String>? resources,
+     102              :   }) = _CacaoPayload;
+     103              : 
+     104            2 :   factory CacaoPayload.fromRequestPayload({
+     105              :     required String issuer,
+     106              :     required CacaoRequestPayload payload,
+     107              :   }) {
+     108            2 :     return CacaoPayload(
+     109              :       iss: issuer,
+     110            2 :       domain: payload.domain,
+     111            2 :       aud: payload.aud,
+     112            2 :       version: payload.version,
+     113            2 :       nonce: payload.nonce,
+     114            2 :       iat: payload.iat,
+     115            2 :       nbf: payload.nbf,
+     116            2 :       exp: payload.exp,
+     117            2 :       statement: payload.statement,
+     118            2 :       requestId: payload.requestId,
+     119            2 :       resources: payload.resources,
+     120              :     );
+     121              :   }
+     122              : 
+     123            2 :   factory CacaoPayload.fromJson(Map<String, dynamic> json) =>
+     124            2 :       _$CacaoPayloadFromJson(json);
+     125              : }
+     126              : 
+     127              : @freezed
+     128              : class CacaoHeader with _$CacaoHeader {
+     129              :   static const EIP4361 = 'eip4361';
+     130              :   static const CAIP122 = 'caip122';
+     131              : 
+     132              :   @JsonSerializable(includeIfNull: false)
+     133              :   const factory CacaoHeader({
+     134              :     @Default('eip4361') String t,
+     135              :   }) = _CacaoHeader;
+     136              : 
+     137            2 :   factory CacaoHeader.fromJson(Map<String, dynamic> json) =>
+     138            2 :       _$CacaoHeaderFromJson(json);
+     139              : }
+     140              : 
+     141              : @freezed
+     142              : class CacaoSignature with _$CacaoSignature {
+     143              :   static const EIP191 = 'eip191';
+     144              :   static const EIP1271 = 'eip1271';
+     145              : 
+     146              :   @JsonSerializable(includeIfNull: false)
+     147              :   const factory CacaoSignature({
+     148              :     required String t,
+     149              :     required String s,
+     150              :     String? m,
+     151              :   }) = _CacaoSignature;
+     152              : 
+     153            2 :   factory CacaoSignature.fromJson(Map<String, dynamic> json) =>
+     154            2 :       _$CacaoSignatureFromJson(json);
+     155              : }
+     156              : 
+     157              : @freezed
+     158              : class Cacao with _$Cacao {
+     159              :   @JsonSerializable(includeIfNull: false)
+     160              :   const factory Cacao({
+     161              :     required CacaoHeader h,
+     162              :     required CacaoPayload p,
+     163              :     required CacaoSignature s,
+     164              :   }) = _Cacao;
+     165              : 
+     166            4 :   factory Cacao.fromJson(Map<String, dynamic> json) => _$CacaoFromJson(json);
+     167              : }
+     168              : 
+     169              : @freezed
+     170              : class StoredCacao with _$StoredCacao {
+     171              :   @JsonSerializable(includeIfNull: false)
+     172              :   const factory StoredCacao({
+     173              :     required int id,
+     174              :     required String pairingTopic,
+     175              :     required CacaoHeader h,
+     176              :     required CacaoPayload p,
+     177              :     required CacaoSignature s,
+     178              :   }) = _StoredCacao;
+     179              : 
+     180            2 :   factory StoredCacao.fromCacao({
+     181              :     required int id,
+     182              :     required String pairingTopic,
+     183              :     required Cacao cacao,
+     184              :   }) {
+     185            2 :     return StoredCacao(
+     186              :       id: id,
+     187              :       pairingTopic: pairingTopic,
+     188            2 :       h: cacao.h,
+     189            2 :       p: cacao.p,
+     190            2 :       s: cacao.s,
+     191              :     );
+     192              :   }
+     193              : 
+     194            0 :   factory StoredCacao.fromJson(Map<String, dynamic> json) =>
+     195            0 :       _$StoredCacaoFromJson(json);
+     196              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/index-sort-f.html b/coverage/html/sign_api/models/auth/index-sort-f.html new file mode 100644 index 00000000..3af50bbb --- /dev/null +++ b/coverage/html/sign_api/models/auth/index-sort-f.html @@ -0,0 +1,153 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_client_events.dart +
16.7%16.7%
+
16.7 %122-
auth_client_models.dart +
62.8%62.8%
+
62.8 %4327-
common_auth_models.dart +
72.7%72.7%
+
72.7 %6648-
session_auth_events.dart +
0.0%
+
0.0 %19-
session_auth_models.dart +
0.0%
+
0.0 %29-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/index-sort-l.html b/coverage/html/sign_api/models/auth/index-sort-l.html new file mode 100644 index 00000000..130f99b7 --- /dev/null +++ b/coverage/html/sign_api/models/auth/index-sort-l.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
session_auth_events.dart +
0.0%
+
0.0 %19
session_auth_models.dart +
0.0%
+
0.0 %29
auth_client_events.dart +
16.7%16.7%
+
16.7 %122
auth_client_models.dart +
62.8%62.8%
+
62.8 %4327
common_auth_models.dart +
72.7%72.7%
+
72.7 %6648
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/index.html b/coverage/html/sign_api/models/auth/index.html new file mode 100644 index 00000000..5777aa86 --- /dev/null +++ b/coverage/html/sign_api/models/auth/index.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client_events.dart +
16.7%16.7%
+
16.7 %122
auth_client_models.dart +
62.8%62.8%
+
62.8 %4327
common_auth_models.dart +
72.7%72.7%
+
72.7 %6648
session_auth_events.dart +
0.0%
+
0.0 %19
session_auth_models.dart +
0.0%
+
0.0 %29
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html new file mode 100644 index 00000000..129489ed --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html new file mode 100644 index 00000000..e50ac9bc --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html new file mode 100644 index 00000000..2db22d45 --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html @@ -0,0 +1,143 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_events.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       9              : 
+      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
+      11              : 
+      12              : class SessionAuthRequest extends EventArgs {
+      13              :   final int id;
+      14              :   final String topic;
+      15              :   final SessionAuthPayload authPayload;
+      16              :   final ConnectionMetadata requester;
+      17              :   final VerifyContext? verifyContext;
+      18              : 
+      19            0 :   SessionAuthRequest({
+      20              :     required this.id,
+      21              :     required this.topic,
+      22              :     required this.authPayload,
+      23              :     required this.requester,
+      24              :     this.verifyContext,
+      25              :   });
+      26              : 
+      27            0 :   Map<String, dynamic> toJson() => {
+      28            0 :         'id': id,
+      29            0 :         'topic': topic,
+      30            0 :         'authPayload': authPayload.toJson(),
+      31            0 :         'requester': requester.toJson(),
+      32            0 :         'verifyContext': verifyContext?.toJson(),
+      33              :       };
+      34              : 
+      35            0 :   @override
+      36              :   String toString() {
+      37            0 :     return 'SessionAuthRequest(${jsonEncode(toJson())})';
+      38              :   }
+      39              : }
+      40              : 
+      41              : class SessionAuthResponse extends EventArgs {
+      42              :   final int id;
+      43              :   final String topic;
+      44              :   final List<Cacao>? auths;
+      45              :   final SessionData? session;
+      46              :   final WalletConnectError? error;
+      47              :   final JsonRpcError? jsonRpcError;
+      48              : 
+      49            0 :   SessionAuthResponse({
+      50              :     required this.id,
+      51              :     required this.topic,
+      52              :     this.auths,
+      53              :     this.session,
+      54              :     this.error,
+      55              :     this.jsonRpcError,
+      56              :   });
+      57              : 
+      58            0 :   Map<String, dynamic> toJson() => {
+      59            0 :         'id': id,
+      60            0 :         'topic': topic,
+      61            0 :         if (auths != null) 'auths': auths,
+      62            0 :         if (session != null) 'session': session!.toJson(),
+      63            0 :         if (error != null) 'error': error!.toJson(),
+      64            0 :         if (jsonRpcError != null) 'jsonRpcError': jsonRpcError!.toJson(),
+      65              :       };
+      66              : 
+      67            0 :   @override
+      68              :   String toString() {
+      69            0 :     return 'SessionAuthResponse(${jsonEncode(toJson())})';
+      70              :   }
+      71              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html new file mode 100644 index 00000000..3c595ca0 --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html new file mode 100644 index 00000000..1271183e --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html new file mode 100644 index 00000000..11cd6682 --- /dev/null +++ b/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html @@ -0,0 +1,189 @@ + + + + + + + LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models/auth - session_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:freezed_annotation/freezed_annotation.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       6              : 
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_events.dart';
+       9              : 
+      10              : part 'session_auth_models.g.dart';
+      11              : part 'session_auth_models.freezed.dart';
+      12              : 
+      13              : // TODO this should be under sign_client_models.dart probably
+      14              : class SessionAuthRequestResponse {
+      15              :   final int id;
+      16              :   final String pairingTopic;
+      17              :   final Completer<SessionAuthResponse> completer;
+      18              :   final Uri? uri;
+      19              : 
+      20            0 :   SessionAuthRequestResponse({
+      21              :     required this.id,
+      22              :     required this.pairingTopic,
+      23              :     required this.completer,
+      24              :     this.uri,
+      25              :   });
+      26              : }
+      27              : 
+      28              : @freezed
+      29              : class SessionAuthRequestParams with _$SessionAuthRequestParams {
+      30              :   @JsonSerializable(includeIfNull: false)
+      31              :   const factory SessionAuthRequestParams({
+      32              :     required List<String> chains,
+      33              :     required String domain,
+      34              :     required String nonce,
+      35              :     required String uri,
+      36              :     //
+      37              :     CacaoHeader? type,
+      38              :     String? nbf,
+      39              :     String? exp,
+      40              :     String? statement,
+      41              :     String? requestId,
+      42              :     List<String>? resources,
+      43              :     int? expiry,
+      44              :     @Default(<String>[]) List<String>? methods,
+      45              :   }) = _SessionAuthRequestParams;
+      46              :   //
+      47            0 :   factory SessionAuthRequestParams.fromJson(Map<String, dynamic> json) =>
+      48            0 :       _$SessionAuthRequestParamsFromJson(json);
+      49              : }
+      50              : 
+      51              : @freezed
+      52              : class SessionAuthPayload with _$SessionAuthPayload {
+      53              :   @JsonSerializable(includeIfNull: false)
+      54              :   const factory SessionAuthPayload({
+      55              :     required List<String> chains,
+      56              :     required String domain,
+      57              :     required String nonce,
+      58              :     required String aud,
+      59              :     required String type,
+      60              :     //
+      61              :     required String version,
+      62              :     required String iat,
+      63              :     //
+      64              :     String? nbf,
+      65              :     String? exp,
+      66              :     String? statement,
+      67              :     String? requestId,
+      68              :     List<String>? resources,
+      69              :   }) = _SessionAuthPayload;
+      70              : 
+      71            0 :   factory SessionAuthPayload.fromRequestParams(
+      72              :     SessionAuthRequestParams params,
+      73              :   ) {
+      74            0 :     final now = DateTime.now();
+      75            0 :     return SessionAuthPayload(
+      76            0 :       chains: params.chains,
+      77            0 :       domain: params.domain,
+      78            0 :       nonce: params.nonce,
+      79            0 :       aud: params.uri,
+      80            0 :       type: params.type?.t ?? 'eip4361',
+      81              :       version: '1',
+      82            0 :       iat: DateTime.utc(
+      83            0 :         now.year,
+      84            0 :         now.month,
+      85            0 :         now.day,
+      86            0 :         now.hour,
+      87            0 :         now.minute,
+      88            0 :         now.second,
+      89            0 :         now.millisecond,
+      90            0 :       ).toIso8601String(),
+      91            0 :       nbf: params.nbf,
+      92            0 :       exp: params.exp,
+      93            0 :       statement: params.statement,
+      94            0 :       requestId: params.requestId,
+      95            0 :       resources: params.resources,
+      96              :     );
+      97              :   }
+      98              : 
+      99            0 :   factory SessionAuthPayload.fromJson(Map<String, dynamic> json) =>
+     100            0 :       _$SessionAuthPayloadFromJson(json);
+     101              : }
+     102              : 
+     103              : @freezed
+     104              : class PendingSessionAuthRequest with _$PendingSessionAuthRequest {
+     105              :   @JsonSerializable(includeIfNull: false)
+     106              :   const factory PendingSessionAuthRequest({
+     107              :     required int id,
+     108              :     required String pairingTopic,
+     109              :     required ConnectionMetadata requester,
+     110              :     required int expiryTimestamp,
+     111              :     required CacaoRequestPayload authPayload,
+     112              :     required VerifyContext verifyContext,
+     113              :   }) = _PendingSessionAuthRequest;
+     114              : 
+     115            0 :   factory PendingSessionAuthRequest.fromJson(Map<String, dynamic> json) =>
+     116            0 :       _$PendingSessionAuthRequestFromJson(json);
+     117              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/index-sort-f.html b/coverage/html/sign_api/models/index-sort-f.html new file mode 100644 index 00000000..ecb8b3de --- /dev/null +++ b/coverage/html/sign_api/models/index-sort-f.html @@ -0,0 +1,153 @@ + + + + + + + LCOV - lcov.info - sign_api/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
json_rpc_models.dart +
64.7%64.7%
+
64.7 %3422-
proposal_models.dart +
33.3%33.3%
+
33.3 %62-
session_models.dart +
33.3%33.3%
+
33.3 %93-
sign_client_events.dart +
36.4%36.4%
+
36.4 %4416-
sign_client_models.dart +
33.3%33.3%
+
33.3 %62-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/index-sort-l.html b/coverage/html/sign_api/models/index-sort-l.html new file mode 100644 index 00000000..4ba99186 --- /dev/null +++ b/coverage/html/sign_api/models/index-sort-l.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
proposal_models.dart +
33.3%33.3%
+
33.3 %62
sign_client_models.dart +
33.3%33.3%
+
33.3 %62
session_models.dart +
33.3%33.3%
+
33.3 %93
sign_client_events.dart +
36.4%36.4%
+
36.4 %4416
json_rpc_models.dart +
64.7%64.7%
+
64.7 %3422
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/index.html b/coverage/html/sign_api/models/index.html new file mode 100644 index 00000000..f50fe465 --- /dev/null +++ b/coverage/html/sign_api/models/index.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
json_rpc_models.dart +
64.7%64.7%
+
64.7 %3422
proposal_models.dart +
33.3%33.3%
+
33.3 %62
session_models.dart +
33.3%33.3%
+
33.3 %93
sign_client_events.dart +
36.4%36.4%
+
36.4 %4416
sign_client_models.dart +
33.3%33.3%
+
33.3 %62
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html b/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html new file mode 100644 index 00000000..33e10dd4 --- /dev/null +++ b/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/json_rpc_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - json_rpc_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.func.html b/coverage/html/sign_api/models/json_rpc_models.dart.func.html new file mode 100644 index 00000000..2e9d7638 --- /dev/null +++ b/coverage/html/sign_api/models/json_rpc_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/json_rpc_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - json_rpc_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html b/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html new file mode 100644 index 00000000..91fe7904 --- /dev/null +++ b/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html @@ -0,0 +1,294 @@ + + + + + + + LCOV - lcov.info - sign_api/models/json_rpc_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - json_rpc_models.dartCoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       9              : 
+      10              : part 'json_rpc_models.g.dart';
+      11              : part 'json_rpc_models.freezed.dart';
+      12              : 
+      13              : @freezed
+      14              : class WcPairingDeleteRequest with _$WcPairingDeleteRequest {
+      15              :   @JsonSerializable()
+      16              :   const factory WcPairingDeleteRequest({
+      17              :     required int code,
+      18              :     required String message,
+      19              :   }) = _WcPairingDeleteRequest;
+      20              : 
+      21            0 :   factory WcPairingDeleteRequest.fromJson(Map<String, dynamic> json) =>
+      22            0 :       _$WcPairingDeleteRequestFromJson(json);
+      23              : }
+      24              : 
+      25              : @freezed
+      26              : class WcPairingPingRequest with _$WcPairingPingRequest {
+      27              :   @JsonSerializable()
+      28              :   const factory WcPairingPingRequest({
+      29              :     required Map<String, dynamic> data,
+      30              :   }) = _WcPairingPingRequest;
+      31              : 
+      32            0 :   factory WcPairingPingRequest.fromJson(Map<String, dynamic> json) =>
+      33            0 :       _$WcPairingPingRequestFromJson(json);
+      34              : }
+      35              : 
+      36              : @freezed
+      37              : class WcSessionProposeRequest with _$WcSessionProposeRequest {
+      38              :   @JsonSerializable(includeIfNull: false)
+      39              :   const factory WcSessionProposeRequest({
+      40              :     required List<Relay> relays,
+      41              :     required Map<String, RequiredNamespace> requiredNamespaces,
+      42              :     Map<String, RequiredNamespace>? optionalNamespaces,
+      43              :     Map<String, String>? sessionProperties,
+      44              :     required ConnectionMetadata proposer,
+      45              :   }) = _WcSessionProposeRequest;
+      46              : 
+      47            4 :   factory WcSessionProposeRequest.fromJson(Map<String, dynamic> json) =>
+      48            4 :       _$WcSessionProposeRequestFromJson(json);
+      49              : }
+      50              : 
+      51              : @freezed
+      52              : class WcSessionProposeResponse with _$WcSessionProposeResponse {
+      53              :   @JsonSerializable()
+      54              :   const factory WcSessionProposeResponse({
+      55              :     required Relay relay,
+      56              :     required String responderPublicKey,
+      57              :   }) = _WcSessionProposeResponse;
+      58              : 
+      59            0 :   factory WcSessionProposeResponse.fromJson(Map<String, dynamic> json) =>
+      60            0 :       _$WcSessionProposeResponseFromJson(json);
+      61              : }
+      62              : 
+      63              : @freezed
+      64              : class WcSessionSettleRequest with _$WcSessionSettleRequest {
+      65              :   @JsonSerializable(includeIfNull: false)
+      66              :   const factory WcSessionSettleRequest({
+      67              :     required Relay relay,
+      68              :     required Map<String, Namespace> namespaces,
+      69              :     Map<String, RequiredNamespace>? requiredNamespaces,
+      70              :     Map<String, RequiredNamespace>? optionalNamespaces,
+      71              :     Map<String, String>? sessionProperties,
+      72              :     required int expiry,
+      73              :     required ConnectionMetadata controller,
+      74              :   }) = _WcSessionSettleRequest;
+      75              : 
+      76            4 :   factory WcSessionSettleRequest.fromJson(Map<String, dynamic> json) =>
+      77            4 :       _$WcSessionSettleRequestFromJson(json);
+      78              : }
+      79              : 
+      80              : @freezed
+      81              : class WcSessionUpdateRequest with _$WcSessionUpdateRequest {
+      82              :   @JsonSerializable()
+      83              :   const factory WcSessionUpdateRequest({
+      84              :     required Map<String, Namespace> namespaces,
+      85              :   }) = _WcSessionUpdateRequest;
+      86              : 
+      87            3 :   factory WcSessionUpdateRequest.fromJson(Map<String, dynamic> json) =>
+      88            3 :       _$WcSessionUpdateRequestFromJson(json);
+      89              : }
+      90              : 
+      91              : @freezed
+      92              : class WcSessionExtendRequest with _$WcSessionExtendRequest {
+      93              :   @JsonSerializable(includeIfNull: false)
+      94              :   const factory WcSessionExtendRequest({
+      95              :     Map<String, dynamic>? data,
+      96              :   }) = _WcSessionExtendRequest;
+      97              : 
+      98            3 :   factory WcSessionExtendRequest.fromJson(Map<String, dynamic> json) =>
+      99            3 :       _$WcSessionExtendRequestFromJson(json);
+     100              : }
+     101              : 
+     102              : @freezed
+     103              : class WcSessionDeleteRequest with _$WcSessionDeleteRequest {
+     104              :   @JsonSerializable(includeIfNull: false)
+     105              :   const factory WcSessionDeleteRequest({
+     106              :     required int code,
+     107              :     required String message,
+     108              :     String? data,
+     109              :   }) = _WcSessionDeleteRequest;
+     110              : 
+     111            3 :   factory WcSessionDeleteRequest.fromJson(Map<String, dynamic> json) =>
+     112            3 :       _$WcSessionDeleteRequestFromJson(json);
+     113              : }
+     114              : 
+     115              : @freezed
+     116              : class WcSessionPingRequest with _$WcSessionPingRequest {
+     117              :   @JsonSerializable(includeIfNull: false)
+     118              :   const factory WcSessionPingRequest({
+     119              :     Map<String, dynamic>? data,
+     120              :   }) = _WcSessionPingRequest;
+     121              : 
+     122            3 :   factory WcSessionPingRequest.fromJson(Map<String, dynamic> json) =>
+     123            3 :       _$WcSessionPingRequestFromJson(json);
+     124              : }
+     125              : 
+     126              : @freezed
+     127              : class WcSessionRequestRequest with _$WcSessionRequestRequest {
+     128              :   @JsonSerializable()
+     129              :   const factory WcSessionRequestRequest({
+     130              :     required String chainId,
+     131              :     required SessionRequestParams request,
+     132              :   }) = _WcSessionRequestRequest;
+     133              : 
+     134            3 :   factory WcSessionRequestRequest.fromJson(Map<String, dynamic> json) =>
+     135            3 :       _$WcSessionRequestRequestFromJson(json);
+     136              : }
+     137              : 
+     138              : @freezed
+     139              : class SessionRequestParams with _$SessionRequestParams {
+     140              :   @JsonSerializable()
+     141              :   const factory SessionRequestParams({
+     142              :     required String method,
+     143              :     required dynamic params,
+     144              :   }) = _SessionRequestParams;
+     145              : 
+     146            3 :   factory SessionRequestParams.fromJson(Map<String, dynamic> json) =>
+     147            3 :       _$SessionRequestParamsFromJson(json);
+     148              : }
+     149              : 
+     150              : @freezed
+     151              : class WcSessionEventRequest with _$WcSessionEventRequest {
+     152              :   @JsonSerializable()
+     153              :   const factory WcSessionEventRequest({
+     154              :     required String chainId,
+     155              :     required SessionEventParams event,
+     156              :   }) = _WcSessionEventRequest;
+     157              : 
+     158            3 :   factory WcSessionEventRequest.fromJson(Map<String, dynamic> json) =>
+     159            3 :       _$WcSessionEventRequestFromJson(json);
+     160              : }
+     161              : 
+     162              : @freezed
+     163              : class SessionEventParams with _$SessionEventParams {
+     164              :   @JsonSerializable()
+     165              :   const factory SessionEventParams({
+     166              :     required String name,
+     167              :     required dynamic data,
+     168              :   }) = _SessionEventParams;
+     169              : 
+     170            3 :   factory SessionEventParams.fromJson(Map<String, dynamic> json) =>
+     171            3 :       _$SessionEventParamsFromJson(json);
+     172              : }
+     173              : 
+     174              : /* AUTHENTICATION MODELS */
+     175              : 
+     176              : @freezed
+     177              : class WcAuthRequestRequest with _$WcAuthRequestRequest {
+     178              :   @JsonSerializable()
+     179              :   const factory WcAuthRequestRequest({
+     180              :     required AuthPayloadParams payloadParams,
+     181              :     required ConnectionMetadata requester,
+     182              :   }) = _WcAuthRequestRequest;
+     183              : 
+     184            2 :   factory WcAuthRequestRequest.fromJson(Map<String, dynamic> json) =>
+     185            2 :       _$WcAuthRequestRequestFromJson(json);
+     186              : }
+     187              : 
+     188              : @freezed
+     189              : class WcAuthRequestResult with _$WcAuthRequestResult {
+     190              :   @JsonSerializable()
+     191              :   const factory WcAuthRequestResult({
+     192              :     required Cacao cacao,
+     193              :   }) = _WcAuthRequestResult;
+     194              : 
+     195            0 :   factory WcAuthRequestResult.fromJson(Map<String, dynamic> json) =>
+     196            0 :       _$WcAuthRequestResultFromJson(json);
+     197              : }
+     198              : 
+     199              : @freezed
+     200              : class WcSessionAuthRequestParams with _$WcSessionAuthRequestParams {
+     201              :   @JsonSerializable()
+     202              :   const factory WcSessionAuthRequestParams({
+     203              :     required SessionAuthPayload authPayload,
+     204              :     required ConnectionMetadata requester,
+     205              :     required int expiryTimestamp,
+     206              :   }) = _WcSessionAuthRequestParams;
+     207              : 
+     208            0 :   factory WcSessionAuthRequestParams.fromJson(Map<String, dynamic> json) =>
+     209            0 :       _$WcSessionAuthRequestParamsFromJson(json);
+     210              : }
+     211              : 
+     212              : @freezed
+     213              : class WcSessionAuthRequestResult with _$WcSessionAuthRequestResult {
+     214              :   @JsonSerializable()
+     215              :   const factory WcSessionAuthRequestResult({
+     216              :     required List<Cacao> cacaos,
+     217              :     required ConnectionMetadata responder,
+     218              :   }) = _WcSessionAuthRequestResult;
+     219              : 
+     220            0 :   factory WcSessionAuthRequestResult.fromJson(Map<String, dynamic> json) =>
+     221            0 :       _$WcSessionAuthRequestResultFromJson(json);
+     222              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/proposal_models.dart.func-c.html b/coverage/html/sign_api/models/proposal_models.dart.func-c.html new file mode 100644 index 00000000..0101bcda --- /dev/null +++ b/coverage/html/sign_api/models/proposal_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/proposal_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - proposal_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/proposal_models.dart.func.html b/coverage/html/sign_api/models/proposal_models.dart.func.html new file mode 100644 index 00000000..9a0c0dec --- /dev/null +++ b/coverage/html/sign_api/models/proposal_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/proposal_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - proposal_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/proposal_models.dart.gcov.html b/coverage/html/sign_api/models/proposal_models.dart.gcov.html new file mode 100644 index 00000000..7544f38a --- /dev/null +++ b/coverage/html/sign_api/models/proposal_models.dart.gcov.html @@ -0,0 +1,123 @@ + + + + + + + LCOV - lcov.info - sign_api/models/proposal_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - proposal_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:freezed_annotation/freezed_annotation.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       5              : 
+       6              : part 'proposal_models.g.dart';
+       7              : part 'proposal_models.freezed.dart';
+       8              : 
+       9              : @freezed
+      10              : class RequiredNamespace with _$RequiredNamespace {
+      11              :   @JsonSerializable(includeIfNull: false)
+      12              :   const factory RequiredNamespace({
+      13              :     List<String>? chains,
+      14              :     required List<String> methods,
+      15              :     required List<String> events,
+      16              :   }) = _RequiredNamespace;
+      17              : 
+      18            4 :   factory RequiredNamespace.fromJson(Map<String, dynamic> json) =>
+      19            4 :       _$RequiredNamespaceFromJson(json);
+      20              : }
+      21              : 
+      22              : @freezed
+      23              : class SessionProposal with _$SessionProposal {
+      24              :   @JsonSerializable()
+      25              :   const factory SessionProposal({
+      26              :     required int id,
+      27              :     required ProposalData params,
+      28              :   }) = _SessionProposal;
+      29              : 
+      30            0 :   factory SessionProposal.fromJson(Map<String, dynamic> json) =>
+      31            0 :       _$SessionProposalFromJson(json);
+      32              : }
+      33              : 
+      34              : @freezed
+      35              : class ProposalData with _$ProposalData {
+      36              :   @JsonSerializable(includeIfNull: false)
+      37              :   const factory ProposalData({
+      38              :     required int id,
+      39              :     required int expiry,
+      40              :     required List<Relay> relays,
+      41              :     required ConnectionMetadata proposer,
+      42              :     required Map<String, RequiredNamespace> requiredNamespaces,
+      43              :     required Map<String, RequiredNamespace> optionalNamespaces,
+      44              :     required String pairingTopic,
+      45              :     Map<String, String>? sessionProperties,
+      46              :     Map<String, Namespace>? generatedNamespaces,
+      47              :   }) = _ProposalData;
+      48              : 
+      49            0 :   factory ProposalData.fromJson(Map<String, dynamic> json) =>
+      50            0 :       _$ProposalDataFromJson(json);
+      51              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/session_models.dart.func-c.html b/coverage/html/sign_api/models/session_models.dart.func-c.html new file mode 100644 index 00000000..91420457 --- /dev/null +++ b/coverage/html/sign_api/models/session_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/session_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - session_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/session_models.dart.func.html b/coverage/html/sign_api/models/session_models.dart.func.html new file mode 100644 index 00000000..9078e316 --- /dev/null +++ b/coverage/html/sign_api/models/session_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/session_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - session_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/session_models.dart.gcov.html b/coverage/html/sign_api/models/session_models.dart.gcov.html new file mode 100644 index 00000000..dff442db --- /dev/null +++ b/coverage/html/sign_api/models/session_models.dart.gcov.html @@ -0,0 +1,159 @@ + + + + + + + LCOV - lcov.info - sign_api/models/session_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - session_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:freezed_annotation/freezed_annotation.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
+       8              : 
+       9              : part 'session_models.g.dart';
+      10              : part 'session_models.freezed.dart';
+      11              : 
+      12              : class SessionProposalCompleter {
+      13              :   final int id;
+      14              :   final String selfPublicKey;
+      15              :   final String pairingTopic;
+      16              :   final Map<String, RequiredNamespace> requiredNamespaces;
+      17              :   final Map<String, RequiredNamespace> optionalNamespaces;
+      18              :   final Map<String, String>? sessionProperties;
+      19              :   final Completer completer;
+      20              : 
+      21            4 :   const SessionProposalCompleter({
+      22              :     required this.id,
+      23              :     required this.selfPublicKey,
+      24              :     required this.pairingTopic,
+      25              :     required this.requiredNamespaces,
+      26              :     required this.optionalNamespaces,
+      27              :     required this.completer,
+      28              :     this.sessionProperties,
+      29              :   });
+      30              : 
+      31            0 :   @override
+      32              :   String toString() {
+      33            0 :     return 'SessionProposalCompleter(id: $id, selfPublicKey: $selfPublicKey, pairingTopic: $pairingTopic, requiredNamespaces: $requiredNamespaces, optionalNamespaces: $optionalNamespaces, sessionProperties: $sessionProperties, completer: $completer)';
+      34              :   }
+      35              : }
+      36              : 
+      37              : @freezed
+      38              : class Namespace with _$Namespace {
+      39              :   @JsonSerializable(includeIfNull: false)
+      40              :   const factory Namespace({
+      41              :     List<String>? chains,
+      42              :     required List<String> accounts,
+      43              :     required List<String> methods,
+      44              :     required List<String> events,
+      45              :   }) = _Namespace;
+      46              : 
+      47            4 :   factory Namespace.fromJson(Map<String, dynamic> json) =>
+      48            4 :       _$NamespaceFromJson(json);
+      49              : }
+      50              : 
+      51              : @freezed
+      52              : class SessionData with _$SessionData {
+      53              :   @JsonSerializable(includeIfNull: false)
+      54              :   const factory SessionData({
+      55              :     required String topic,
+      56              :     required String pairingTopic,
+      57              :     required Relay relay,
+      58              :     required int expiry,
+      59              :     required bool acknowledged,
+      60              :     required String controller,
+      61              :     required Map<String, Namespace> namespaces,
+      62              :     Map<String, RequiredNamespace>? requiredNamespaces,
+      63              :     Map<String, RequiredNamespace>? optionalNamespaces,
+      64              :     Map<String, String>? sessionProperties,
+      65              :     required ConnectionMetadata self,
+      66              :     required ConnectionMetadata peer,
+      67              :   }) = _SessionData;
+      68              : 
+      69            0 :   factory SessionData.fromJson(Map<String, dynamic> json) =>
+      70            0 :       _$SessionDataFromJson(json);
+      71              : }
+      72              : 
+      73              : @freezed
+      74              : class SessionRequest with _$SessionRequest {
+      75              :   @JsonSerializable()
+      76              :   const factory SessionRequest({
+      77              :     required int id,
+      78              :     required String topic,
+      79              :     required String method,
+      80              :     required String chainId,
+      81              :     required dynamic params,
+      82              :     required VerifyContext verifyContext,
+      83              :   }) = _SessionRequest;
+      84              : 
+      85            0 :   factory SessionRequest.fromJson(Map<String, dynamic> json) =>
+      86            0 :       _$SessionRequestFromJson(json);
+      87              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_events.dart.func-c.html b/coverage/html/sign_api/models/sign_client_events.dart.func-c.html new file mode 100644 index 00000000..adb4d8e5 --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_events.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_events.dart.func.html b/coverage/html/sign_api/models/sign_client_events.dart.func.html new file mode 100644 index 00000000..7c1c93ea --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_events.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_events.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_events.dart.gcov.html b/coverage/html/sign_api/models/sign_client_events.dart.gcov.html new file mode 100644 index 00000000..e3a8646a --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_events.dart.gcov.html @@ -0,0 +1,266 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_events.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_events.dartCoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:event/event.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       8              : 
+       9              : class SessionProposalEvent extends EventArgs {
+      10              :   int id;
+      11              :   ProposalData params;
+      12              :   VerifyContext? verifyContext;
+      13              : 
+      14            4 :   SessionProposalEvent(
+      15              :     this.id,
+      16              :     this.params, [
+      17              :     this.verifyContext,
+      18              :   ]);
+      19              : 
+      20            0 :   Map<String, dynamic> toJson() => {
+      21            0 :         'id': id,
+      22            0 :         'params': params.toJson(),
+      23            0 :         'verifyContext': verifyContext?.toJson(),
+      24              :       };
+      25              : 
+      26            0 :   @override
+      27              :   String toString() {
+      28            0 :     return 'SessionProposalEvent(${jsonEncode(toJson())})';
+      29              :   }
+      30              : }
+      31              : 
+      32              : class SessionProposalErrorEvent extends EventArgs {
+      33              :   int id;
+      34              :   Map<String, RequiredNamespace> requiredNamespaces;
+      35              :   Map<String, Namespace> namespaces;
+      36              :   WalletConnectError error;
+      37              : 
+      38            0 :   SessionProposalErrorEvent(
+      39              :     this.id,
+      40              :     this.requiredNamespaces,
+      41              :     this.namespaces,
+      42              :     this.error,
+      43              :   );
+      44              : 
+      45            0 :   @override
+      46              :   String toString() {
+      47            0 :     return 'SessionProposalErrorEvent(id: $id, requiredNamespaces: $requiredNamespaces, namespaces: $namespaces, error: $error)';
+      48              :   }
+      49              : }
+      50              : 
+      51              : class SessionConnect extends EventArgs {
+      52              :   SessionData session;
+      53              : 
+      54            4 :   SessionConnect(
+      55              :     this.session,
+      56              :   );
+      57              : 
+      58            0 :   @override
+      59              :   String toString() {
+      60            0 :     return 'SessionConnect(session: $session)';
+      61              :   }
+      62              : }
+      63              : 
+      64              : class SessionUpdate extends EventArgs {
+      65              :   int id;
+      66              :   String topic;
+      67              :   Map<String, Namespace> namespaces;
+      68              : 
+      69            3 :   SessionUpdate(
+      70              :     this.id,
+      71              :     this.topic,
+      72              :     this.namespaces,
+      73              :   );
+      74              : 
+      75            0 :   @override
+      76              :   String toString() {
+      77            0 :     return 'SessionUpdate(id: $id, topic: $topic, namespaces: $namespaces)';
+      78              :   }
+      79              : }
+      80              : 
+      81              : class SessionExtend extends EventArgs {
+      82              :   int id;
+      83              :   String topic;
+      84              : 
+      85            3 :   SessionExtend(this.id, this.topic);
+      86              : 
+      87            0 :   @override
+      88              :   String toString() {
+      89            0 :     return 'SessionExtend(id: $id, topic: $topic)';
+      90              :   }
+      91              : }
+      92              : 
+      93              : class SessionPing extends EventArgs {
+      94              :   int id;
+      95              :   String topic;
+      96              : 
+      97            3 :   SessionPing(this.id, this.topic);
+      98              : 
+      99            0 :   @override
+     100              :   String toString() {
+     101            0 :     return 'SessionPing(id: $id, topic: $topic)';
+     102              :   }
+     103              : }
+     104              : 
+     105              : class SessionDelete extends EventArgs {
+     106              :   String topic;
+     107              :   int? id;
+     108              : 
+     109            3 :   SessionDelete(
+     110              :     this.topic, {
+     111              :     this.id,
+     112              :   });
+     113              : 
+     114            0 :   @override
+     115              :   String toString() {
+     116            0 :     return 'SessionDelete(topic: $topic, id: $id)';
+     117              :   }
+     118              : }
+     119              : 
+     120              : class SessionExpire extends EventArgs {
+     121              :   final String topic;
+     122              : 
+     123            3 :   SessionExpire(this.topic);
+     124              : 
+     125            0 :   @override
+     126              :   String toString() {
+     127            0 :     return 'SessionExpire(topic: $topic)';
+     128              :   }
+     129              : }
+     130              : 
+     131              : class SessionRequestEvent extends EventArgs {
+     132              :   int id;
+     133              :   String topic;
+     134              :   String method;
+     135              :   String chainId;
+     136              :   dynamic params;
+     137              : 
+     138            3 :   SessionRequestEvent(
+     139              :     this.id,
+     140              :     this.topic,
+     141              :     this.method,
+     142              :     this.chainId,
+     143              :     this.params,
+     144              :   );
+     145              : 
+     146            3 :   factory SessionRequestEvent.fromSessionRequest(
+     147              :     SessionRequest request,
+     148              :   ) {
+     149            3 :     return SessionRequestEvent(
+     150            3 :       request.id,
+     151            3 :       request.topic,
+     152            3 :       request.method,
+     153            3 :       request.chainId,
+     154            3 :       request.params,
+     155              :     );
+     156              :   }
+     157              : 
+     158            0 :   @override
+     159              :   String toString() {
+     160            0 :     return 'SessionRequestEvent(id: $id, topic: $topic, method: $method, chainId: $chainId, params: $params)';
+     161              :   }
+     162              : }
+     163              : 
+     164              : class SessionEvent extends EventArgs {
+     165              :   int id;
+     166              :   String topic;
+     167              :   String name;
+     168              :   String chainId;
+     169              :   dynamic data;
+     170              : 
+     171            3 :   SessionEvent(
+     172              :     this.id,
+     173              :     this.topic,
+     174              :     this.name,
+     175              :     this.chainId,
+     176              :     this.data,
+     177              :   );
+     178              : 
+     179            0 :   @override
+     180              :   String toString() {
+     181            0 :     return 'SessionEvent(id: $id, topic: $topic, name: $name, chainId: $chainId, data: $data)';
+     182              :   }
+     183              : }
+     184              : 
+     185              : class ProposalExpire extends EventArgs {
+     186              :   final int id;
+     187              : 
+     188            0 :   ProposalExpire(this.id);
+     189              : 
+     190            0 :   @override
+     191              :   String toString() {
+     192            0 :     return 'ProposalExpire(id: $id)';
+     193              :   }
+     194              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_models.dart.func-c.html b/coverage/html/sign_api/models/sign_client_models.dart.func-c.html new file mode 100644 index 00000000..21a7c2a8 --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_models.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_models.dart.func.html b/coverage/html/sign_api/models/sign_client_models.dart.func.html new file mode 100644 index 00000000..e413369a --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_models.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_models.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/models/sign_client_models.dart.gcov.html b/coverage/html/sign_api/models/sign_client_models.dart.gcov.html new file mode 100644 index 00000000..ccd1f124 --- /dev/null +++ b/coverage/html/sign_api/models/sign_client_models.dart.gcov.html @@ -0,0 +1,107 @@ + + + + + + + LCOV - lcov.info - sign_api/models/sign_client_models.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/models - sign_client_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : 
+       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       4              : 
+       5              : class ConnectResponse {
+       6              :   final String pairingTopic;
+       7              :   final Completer<SessionData> session;
+       8              :   final Uri? uri;
+       9              : 
+      10            4 :   ConnectResponse({
+      11              :     required this.pairingTopic,
+      12              :     required this.session,
+      13              :     this.uri,
+      14              :   });
+      15              : 
+      16            0 :   @override
+      17              :   String toString() {
+      18            0 :     return 'ConnectResponse(pairingTopic: $pairingTopic, session: $session, uri: $uri)';
+      19              :   }
+      20              : }
+      21              : 
+      22              : class ApproveResponse {
+      23              :   final String topic;
+      24              :   final SessionData? session;
+      25              : 
+      26            4 :   ApproveResponse({
+      27              :     required this.topic,
+      28              :     required this.session,
+      29              :   });
+      30              : 
+      31            0 :   @override
+      32              :   String toString() {
+      33            0 :     return 'ApproveResponse(topic: $topic, session: $session)';
+      34              :   }
+      35              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sessions.dart.func-c.html b/coverage/html/sign_api/sessions.dart.func-c.html new file mode 100644 index 00000000..36a2d025 --- /dev/null +++ b/coverage/html/sign_api/sessions.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sessions.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sessions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sessions.dart.func.html b/coverage/html/sign_api/sessions.dart.func.html new file mode 100644 index 00000000..6b329609 --- /dev/null +++ b/coverage/html/sign_api/sessions.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sessions.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sessions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sessions.dart.gcov.html b/coverage/html/sign_api/sessions.dart.gcov.html new file mode 100644 index 00000000..628e7eef --- /dev/null +++ b/coverage/html/sign_api/sessions.dart.gcov.html @@ -0,0 +1,108 @@ + + + + + + + LCOV - lcov.info - sign_api/sessions.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sessions.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       2              : 
+       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       5              : 
+       6              : class Sessions extends GenericStore<SessionData> implements ISessions {
+       7            6 :   Sessions({
+       8              :     required super.storage,
+       9              :     required super.context,
+      10              :     required super.version,
+      11              :     required super.fromJson,
+      12              :   });
+      13              : 
+      14            5 :   @override
+      15              :   Future<void> update(
+      16              :     String topic, {
+      17              :     int? expiry,
+      18              :     Map<String, Namespace>? namespaces,
+      19              :   }) async {
+      20            5 :     checkInitialized();
+      21              : 
+      22            5 :     SessionData? info = get(topic);
+      23              :     if (info == null) {
+      24              :       return;
+      25              :     }
+      26              : 
+      27              :     if (expiry != null) {
+      28           10 :       info = info.copyWith(expiry: expiry);
+      29              :     }
+      30              :     if (namespaces != null) {
+      31            6 :       info = info.copyWith(namespaces: namespaces);
+      32              :     }
+      33              : 
+      34            5 :     await set(topic, info);
+      35              :   }
+      36              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_client.dart.func-c.html b/coverage/html/sign_api/sign_client.dart.func-c.html new file mode 100644 index 00000000..2eccc994 --- /dev/null +++ b/coverage/html/sign_api/sign_client.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_client.dart.func.html b/coverage/html/sign_api/sign_client.dart.func.html new file mode 100644 index 00000000..a200351e --- /dev/null +++ b/coverage/html/sign_api/sign_client.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_client.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_client.dart.gcov.html b/coverage/html/sign_api/sign_client.dart.gcov.html new file mode 100644 index 00000000..404c9b30 --- /dev/null +++ b/coverage/html/sign_api/sign_client.dart.gcov.html @@ -0,0 +1,748 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_client.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_client.dartCoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
+       5              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       6              : 
+       7              : class SignClient implements ISignClient {
+       8              :   bool _initialized = false;
+       9              : 
+      10              :   @override
+      11              :   final String protocol = 'wc';
+      12              :   @override
+      13              :   final int version = 2;
+      14              : 
+      15            1 :   @override
+      16            2 :   Event<SessionDelete> get onSessionDelete => engine.onSessionDelete;
+      17            1 :   @override
+      18            2 :   Event<SessionConnect> get onSessionConnect => engine.onSessionConnect;
+      19            1 :   @override
+      20            2 :   Event<SessionEvent> get onSessionEvent => engine.onSessionEvent;
+      21            1 :   @override
+      22            2 :   Event<SessionExpire> get onSessionExpire => engine.onSessionExpire;
+      23            1 :   @override
+      24            2 :   Event<SessionExtend> get onSessionExtend => engine.onSessionExtend;
+      25            1 :   @override
+      26            2 :   Event<SessionPing> get onSessionPing => engine.onSessionPing;
+      27            1 :   @override
+      28            2 :   Event<SessionProposalEvent> get onSessionProposal => engine.onSessionProposal;
+      29            0 :   @override
+      30              :   Event<SessionProposalErrorEvent> get onSessionProposalError =>
+      31            0 :       engine.onSessionProposalError;
+      32            1 :   @override
+      33            2 :   Event<SessionProposalEvent> get onProposalExpire => engine.onProposalExpire;
+      34            1 :   @override
+      35            2 :   Event<SessionRequestEvent> get onSessionRequest => engine.onSessionRequest;
+      36            1 :   @override
+      37            2 :   Event<SessionUpdate> get onSessionUpdate => engine.onSessionUpdate;
+      38              : 
+      39            1 :   @override
+      40            2 :   ICore get core => engine.core;
+      41            0 :   @override
+      42            0 :   PairingMetadata get metadata => engine.metadata;
+      43            1 :   @override
+      44            2 :   IGenericStore<ProposalData> get proposals => engine.proposals;
+      45            1 :   @override
+      46            2 :   ISessions get sessions => engine.sessions;
+      47            1 :   @override
+      48            2 :   IGenericStore<SessionRequest> get pendingRequests => engine.pendingRequests;
+      49              : 
+      50              :   @override
+      51              :   late ISignEngine engine;
+      52              : 
+      53            0 :   static Future<SignClient> createInstance({
+      54              :     required String projectId,
+      55              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
+      56              :     required PairingMetadata metadata,
+      57              :     bool memoryStore = false,
+      58              :     LogLevel logLevel = LogLevel.nothing,
+      59              :   }) async {
+      60            0 :     final client = SignClient(
+      61            0 :       core: Core(
+      62              :         projectId: projectId,
+      63              :         relayUrl: relayUrl,
+      64              :         memoryStore: memoryStore,
+      65              :         logLevel: logLevel,
+      66              :       ),
+      67              :       metadata: metadata,
+      68              :     );
+      69            0 :     await client.init();
+      70              : 
+      71              :     return client;
+      72              :   }
+      73              : 
+      74            1 :   SignClient({
+      75              :     required ICore core,
+      76              :     required PairingMetadata metadata,
+      77              :   }) {
+      78            2 :     engine = SignEngine(
+      79              :       core: core,
+      80              :       metadata: metadata,
+      81            1 :       proposals: GenericStore(
+      82            1 :         storage: core.storage,
+      83              :         context: StoreVersions.CONTEXT_PROPOSALS,
+      84              :         version: StoreVersions.VERSION_PROPOSALS,
+      85            0 :         fromJson: (dynamic value) {
+      86            0 :           return ProposalData.fromJson(value);
+      87              :         },
+      88              :       ),
+      89            1 :       sessions: Sessions(
+      90            1 :         storage: core.storage,
+      91              :         context: StoreVersions.CONTEXT_SESSIONS,
+      92              :         version: StoreVersions.VERSION_SESSIONS,
+      93            0 :         fromJson: (dynamic value) {
+      94            0 :           return SessionData.fromJson(value);
+      95              :         },
+      96              :       ),
+      97            1 :       pendingRequests: GenericStore(
+      98            1 :         storage: core.storage,
+      99              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
+     100              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
+     101            0 :         fromJson: (dynamic value) {
+     102            0 :           return SessionRequest.fromJson(value);
+     103              :         },
+     104              :       ),
+     105            1 :       authKeys: GenericStore(
+     106            1 :         storage: core.storage,
+     107              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
+     108              :         version: StoreVersions.VERSION_AUTH_KEYS,
+     109            0 :         fromJson: (dynamic value) {
+     110            0 :           return AuthPublicKey.fromJson(value);
+     111              :         },
+     112              :       ),
+     113            1 :       pairingTopics: GenericStore(
+     114            1 :         storage: core.storage,
+     115              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
+     116              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
+     117            0 :         fromJson: (dynamic value) {
+     118              :           return value;
+     119              :         },
+     120              :       ),
+     121            1 :       authRequests: GenericStore(
+     122            1 :         storage: core.storage,
+     123              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     124              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     125            0 :         fromJson: (dynamic value) {
+     126            0 :           return PendingAuthRequest.fromJson(value);
+     127              :         },
+     128              :       ),
+     129            1 :       completeRequests: GenericStore(
+     130            1 :         storage: core.storage,
+     131              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
+     132              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
+     133            0 :         fromJson: (dynamic value) {
+     134            0 :           return StoredCacao.fromJson(value);
+     135              :         },
+     136              :       ),
+     137            1 :       sessionAuthRequests: GenericStore(
+     138            1 :         storage: core.storage,
+     139              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     140              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     141            0 :         fromJson: (dynamic value) {
+     142            0 :           return PendingSessionAuthRequest.fromJson(value);
+     143              :         },
+     144              :       ),
+     145              :     );
+     146              :   }
+     147              : 
+     148            1 :   @override
+     149              :   Future<void> init() async {
+     150            1 :     if (_initialized) {
+     151              :       return;
+     152              :     }
+     153              : 
+     154            2 :     await core.start();
+     155            2 :     await engine.init();
+     156              : 
+     157            1 :     _initialized = true;
+     158              :   }
+     159              : 
+     160            1 :   @override
+     161              :   Future<ConnectResponse> connect({
+     162              :     Map<String, RequiredNamespace>? requiredNamespaces,
+     163              :     Map<String, RequiredNamespace>? optionalNamespaces,
+     164              :     Map<String, String>? sessionProperties,
+     165              :     String? pairingTopic,
+     166              :     List<Relay>? relays,
+     167              :     List<List<String>>? methods = SignEngine.DEFAULT_METHODS,
+     168              :   }) async {
+     169              :     try {
+     170            2 :       return await engine.connect(
+     171              :         requiredNamespaces: requiredNamespaces,
+     172              :         optionalNamespaces: optionalNamespaces,
+     173              :         sessionProperties: sessionProperties,
+     174              :         pairingTopic: pairingTopic,
+     175              :         relays: relays,
+     176              :         methods: methods,
+     177              :       );
+     178              :     } catch (e) {
+     179              :       // print(e);
+     180              :       rethrow;
+     181              :     }
+     182              :   }
+     183              : 
+     184            1 :   @override
+     185              :   Future<PairingInfo> pair({
+     186              :     required Uri uri,
+     187              :   }) async {
+     188              :     try {
+     189            2 :       return await engine.pair(uri: uri);
+     190              :     } catch (e) {
+     191              :       rethrow;
+     192              :     }
+     193              :   }
+     194              : 
+     195            1 :   @override
+     196              :   Future<ApproveResponse> approve({
+     197              :     required int id,
+     198              :     required Map<String, Namespace> namespaces,
+     199              :     Map<String, String>? sessionProperties,
+     200              :     String? relayProtocol,
+     201              :   }) async {
+     202              :     try {
+     203            2 :       return await engine.approveSession(
+     204              :         id: id,
+     205              :         namespaces: namespaces,
+     206              :         sessionProperties: sessionProperties,
+     207              :         relayProtocol: relayProtocol,
+     208              :       );
+     209              :     } catch (e) {
+     210              :       rethrow;
+     211              :     }
+     212              :   }
+     213              : 
+     214            1 :   @override
+     215              :   Future<void> reject({
+     216              :     required int id,
+     217              :     required WalletConnectError reason,
+     218              :   }) async {
+     219              :     try {
+     220            2 :       return await engine.rejectSession(
+     221              :         id: id,
+     222              :         reason: reason,
+     223              :       );
+     224              :     } catch (e) {
+     225              :       rethrow;
+     226              :     }
+     227              :   }
+     228              : 
+     229            1 :   @override
+     230              :   Future<void> update({
+     231              :     required String topic,
+     232              :     required Map<String, Namespace> namespaces,
+     233              :   }) async {
+     234              :     try {
+     235            2 :       return await engine.updateSession(
+     236              :         topic: topic,
+     237              :         namespaces: namespaces,
+     238              :       );
+     239              :     } catch (e) {
+     240              :       // final error = e as WCError;
+     241              :       rethrow;
+     242              :     }
+     243              :   }
+     244              : 
+     245            1 :   @override
+     246              :   Future<void> extend({
+     247              :     required String topic,
+     248              :   }) async {
+     249              :     try {
+     250            2 :       return await engine.extendSession(topic: topic);
+     251              :     } catch (e) {
+     252              :       rethrow;
+     253              :     }
+     254              :   }
+     255              : 
+     256            1 :   @override
+     257              :   void registerRequestHandler({
+     258              :     required String chainId,
+     259              :     required String method,
+     260              :     void Function(String, dynamic)? handler,
+     261              :   }) {
+     262              :     try {
+     263            2 :       return engine.registerRequestHandler(
+     264              :         chainId: chainId,
+     265              :         method: method,
+     266              :         handler: handler,
+     267              :       );
+     268              :     } catch (e) {
+     269              :       rethrow;
+     270              :     }
+     271              :   }
+     272              : 
+     273            1 :   @override
+     274              :   Future<dynamic> request({
+     275              :     required String topic,
+     276              :     required String chainId,
+     277              :     required SessionRequestParams request,
+     278              :   }) async {
+     279              :     try {
+     280            2 :       return await engine.request(
+     281              :         topic: topic,
+     282              :         chainId: chainId,
+     283              :         request: request,
+     284              :       );
+     285              :     } catch (e) {
+     286              :       rethrow;
+     287              :     }
+     288              :   }
+     289              : 
+     290            0 :   @override
+     291              :   Future<List<dynamic>> requestReadContract({
+     292              :     required DeployedContract deployedContract,
+     293              :     required String functionName,
+     294              :     required String rpcUrl,
+     295              :     EthereumAddress? sender,
+     296              :     List parameters = const [],
+     297              :   }) async {
+     298              :     try {
+     299            0 :       return await engine.requestReadContract(
+     300              :         sender: sender,
+     301              :         deployedContract: deployedContract,
+     302              :         functionName: functionName,
+     303              :         rpcUrl: rpcUrl,
+     304              :         parameters: parameters,
+     305              :       );
+     306              :     } catch (e) {
+     307              :       rethrow;
+     308              :     }
+     309              :   }
+     310              : 
+     311            0 :   @override
+     312              :   Future<dynamic> requestWriteContract({
+     313              :     required String topic,
+     314              :     required String chainId,
+     315              :     required String rpcUrl,
+     316              :     required DeployedContract deployedContract,
+     317              :     required String functionName,
+     318              :     required Transaction transaction,
+     319              :     String? method,
+     320              :     List parameters = const [],
+     321              :   }) async {
+     322              :     try {
+     323            0 :       return await engine.requestWriteContract(
+     324              :         topic: topic,
+     325              :         chainId: chainId,
+     326              :         rpcUrl: rpcUrl,
+     327              :         deployedContract: deployedContract,
+     328              :         functionName: functionName,
+     329              :         transaction: transaction,
+     330              :         method: method,
+     331              :         parameters: parameters,
+     332              :       );
+     333              :     } catch (e) {
+     334              :       rethrow;
+     335              :     }
+     336              :   }
+     337              : 
+     338            1 :   @override
+     339              :   Future<void> respond({
+     340              :     required String topic,
+     341              :     required JsonRpcResponse response,
+     342              :   }) {
+     343              :     try {
+     344            2 :       return engine.respondSessionRequest(
+     345              :         topic: topic,
+     346              :         response: response,
+     347              :       );
+     348              :     } catch (e) {
+     349              :       rethrow;
+     350              :     }
+     351              :   }
+     352              : 
+     353            1 :   @override
+     354              :   void registerEventHandler({
+     355              :     required String chainId,
+     356              :     required String event,
+     357              :     dynamic Function(String, dynamic)? handler,
+     358              :   }) {
+     359              :     try {
+     360            2 :       return engine.registerEventHandler(
+     361              :         chainId: chainId,
+     362              :         event: event,
+     363              :         handler: handler,
+     364              :       );
+     365              :     } catch (e) {
+     366              :       rethrow;
+     367              :     }
+     368              :   }
+     369              : 
+     370            1 :   @override
+     371              :   void registerEventEmitter({
+     372              :     required String chainId,
+     373              :     required String event,
+     374              :   }) {
+     375              :     try {
+     376            2 :       return engine.registerEventEmitter(
+     377              :         chainId: chainId,
+     378              :         event: event,
+     379              :       );
+     380              :     } catch (e) {
+     381              :       rethrow;
+     382              :     }
+     383              :   }
+     384              : 
+     385            1 :   @override
+     386              :   void registerAccount({
+     387              :     required String chainId,
+     388              :     required String accountAddress,
+     389              :   }) {
+     390              :     try {
+     391            2 :       return engine.registerAccount(
+     392              :         chainId: chainId,
+     393              :         accountAddress: accountAddress,
+     394              :       );
+     395              :     } catch (e) {
+     396              :       rethrow;
+     397              :     }
+     398              :   }
+     399              : 
+     400            1 :   @override
+     401              :   Future<void> emit({
+     402              :     required String topic,
+     403              :     required String chainId,
+     404              :     required SessionEventParams event,
+     405              :   }) async {
+     406              :     try {
+     407            2 :       return await engine.emitSessionEvent(
+     408              :         topic: topic,
+     409              :         chainId: chainId,
+     410              :         event: event,
+     411              :       );
+     412              :     } catch (e) {
+     413              :       rethrow;
+     414              :     }
+     415              :   }
+     416              : 
+     417            1 :   @override
+     418              :   Future<void> ping({
+     419              :     required String topic,
+     420              :   }) async {
+     421              :     try {
+     422            2 :       return await engine.ping(topic: topic);
+     423              :     } catch (e) {
+     424              :       rethrow;
+     425              :     }
+     426              :   }
+     427              : 
+     428            1 :   @override
+     429              :   Future<void> disconnect({
+     430              :     required String topic,
+     431              :     required WalletConnectError reason,
+     432              :   }) async {
+     433              :     try {
+     434            2 :       return await engine.disconnectSession(
+     435              :         topic: topic,
+     436              :         reason: reason,
+     437              :       );
+     438              :     } catch (e) {
+     439              :       rethrow;
+     440              :     }
+     441              :   }
+     442              : 
+     443            1 :   @override
+     444              :   SessionData? find({
+     445              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     446              :   }) {
+     447              :     try {
+     448            2 :       return engine.find(requiredNamespaces: requiredNamespaces);
+     449              :     } catch (e) {
+     450              :       rethrow;
+     451              :     }
+     452              :   }
+     453              : 
+     454            1 :   @override
+     455              :   Map<String, SessionData> getActiveSessions() {
+     456              :     try {
+     457            2 :       return engine.getActiveSessions();
+     458              :     } catch (e) {
+     459              :       rethrow;
+     460              :     }
+     461              :   }
+     462              : 
+     463            1 :   @override
+     464              :   Map<String, SessionData> getSessionsForPairing({
+     465              :     required String pairingTopic,
+     466              :   }) {
+     467              :     try {
+     468            2 :       return engine.getSessionsForPairing(
+     469              :         pairingTopic: pairingTopic,
+     470              :       );
+     471              :     } catch (e) {
+     472              :       rethrow;
+     473              :     }
+     474              :   }
+     475              : 
+     476            1 :   @override
+     477              :   Map<String, ProposalData> getPendingSessionProposals() {
+     478              :     try {
+     479            2 :       return engine.getPendingSessionProposals();
+     480              :     } catch (e) {
+     481              :       rethrow;
+     482              :     }
+     483              :   }
+     484              : 
+     485            1 :   @override
+     486              :   Map<String, SessionRequest> getPendingSessionRequests() {
+     487              :     try {
+     488            2 :       return engine.getPendingSessionRequests();
+     489              :     } catch (e) {
+     490              :       rethrow;
+     491              :     }
+     492              :   }
+     493              : 
+     494            0 :   @override
+     495            0 :   IPairingStore get pairings => core.pairing.getStore();
+     496              : 
+     497              :   // FORMER AUTH ENGINE METHODS
+     498              : 
+     499            0 :   @override
+     500            0 :   IGenericStore<PendingAuthRequest> get authRequests => engine.authRequests;
+     501              : 
+     502            0 :   @override
+     503              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
+     504              :     try {
+     505            0 :       return engine.getPendingAuthRequests();
+     506              :     } catch (e) {
+     507              :       rethrow;
+     508              :     }
+     509              :   }
+     510              : 
+     511            0 :   @override
+     512              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
+     513              :     try {
+     514            0 :       return engine.getPendingSessionAuthRequests();
+     515              :     } catch (e) {
+     516              :       rethrow;
+     517              :     }
+     518              :   }
+     519              : 
+     520            0 :   @override
+     521              :   IGenericStore<PendingSessionAuthRequest> get sessionAuthRequests =>
+     522            0 :       engine.sessionAuthRequests;
+     523              : 
+     524            0 :   @override
+     525            0 :   Event<AuthRequest> get onAuthRequest => engine.onAuthRequest;
+     526              : 
+     527            0 :   @override
+     528            0 :   Event<AuthResponse> get onAuthResponse => engine.onAuthResponse;
+     529              : 
+     530              :   // NEW 1-CLICK AUTH METHOD
+     531            0 :   @override
+     532              :   Event<SessionAuthResponse> get onSessionAuthResponse =>
+     533            0 :       engine.onSessionAuthResponse;
+     534              : 
+     535            0 :   @override
+     536              :   Event<SessionAuthRequest> get onSessionAuthRequest =>
+     537            0 :       engine.onSessionAuthRequest;
+     538              : 
+     539            0 :   @override
+     540              :   Future<AuthRequestResponse> requestAuth({
+     541              :     required AuthRequestParams params,
+     542              :     String? pairingTopic,
+     543              :     List<List<String>>? methods = SignEngine.DEFAULT_METHODS_AUTH,
+     544              :   }) {
+     545              :     try {
+     546            0 :       return engine.requestAuth(
+     547              :         params: params,
+     548              :         pairingTopic: pairingTopic,
+     549              :         methods: methods,
+     550              :       );
+     551              :     } catch (e) {
+     552              :       rethrow;
+     553              :     }
+     554              :   }
+     555              : 
+     556              :   // NEW ONE-CLICK AUTH METHOD FOR DAPPS
+     557            0 :   @override
+     558              :   Future<SessionAuthRequestResponse> authenticate({
+     559              :     required SessionAuthRequestParams params,
+     560              :     String? pairingTopic,
+     561              :     List<List<String>>? methods = const [
+     562              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
+     563              :     ],
+     564              :   }) {
+     565              :     try {
+     566            0 :       return engine.authenticate(
+     567              :         params: params,
+     568              :         pairingTopic: pairingTopic,
+     569              :         methods: methods,
+     570              :       );
+     571              :     } catch (e) {
+     572              :       rethrow;
+     573              :     }
+     574              :   }
+     575              : 
+     576            0 :   @override
+     577              :   Future<void> respondAuthRequest({
+     578              :     required int id,
+     579              :     required String iss,
+     580              :     CacaoSignature? signature,
+     581              :     WalletConnectError? error,
+     582              :   }) {
+     583              :     try {
+     584            0 :       return engine.respondAuthRequest(
+     585              :         id: id,
+     586              :         iss: iss,
+     587              :         signature: signature,
+     588              :         error: error,
+     589              :       );
+     590              :     } catch (e) {
+     591              :       rethrow;
+     592              :     }
+     593              :   }
+     594              : 
+     595            0 :   @override
+     596              :   Future<ApproveResponse> approveSessionAuthenticate({
+     597              :     required int id,
+     598              :     List<Cacao>? auths,
+     599              :   }) {
+     600              :     try {
+     601            0 :       return engine.approveSessionAuthenticate(
+     602              :         id: id,
+     603              :         auths: auths,
+     604              :       );
+     605              :     } catch (e) {
+     606              :       rethrow;
+     607              :     }
+     608              :   }
+     609              : 
+     610            0 :   @override
+     611              :   Future<void> rejectSessionAuthenticate({
+     612              :     required int id,
+     613              :     required WalletConnectError reason,
+     614              :   }) {
+     615              :     try {
+     616            0 :       return engine.rejectSessionAuthenticate(
+     617              :         id: id,
+     618              :         reason: reason,
+     619              :       );
+     620              :     } catch (e) {
+     621              :       rethrow;
+     622              :     }
+     623              :   }
+     624              : 
+     625            0 :   @override
+     626            0 :   IGenericStore<AuthPublicKey> get authKeys => engine.authKeys;
+     627              : 
+     628            0 :   @override
+     629            0 :   IGenericStore<StoredCacao> get completeRequests => engine.completeRequests;
+     630              : 
+     631            0 :   @override
+     632              :   Future<bool> validateSignedCacao({
+     633              :     required Cacao cacao,
+     634              :     required String projectId,
+     635              :   }) {
+     636              :     try {
+     637            0 :       return engine.validateSignedCacao(
+     638              :         cacao: cacao,
+     639              :         projectId: projectId,
+     640              :       );
+     641              :     } catch (e) {
+     642              :       rethrow;
+     643              :     }
+     644              :   }
+     645              : 
+     646            0 :   @override
+     647              :   String formatAuthMessage({
+     648              :     required String iss,
+     649              :     required CacaoRequestPayload cacaoPayload,
+     650              :   }) {
+     651              :     try {
+     652            0 :       return engine.formatAuthMessage(
+     653              :         iss: iss,
+     654              :         cacaoPayload: cacaoPayload,
+     655              :       );
+     656              :     } catch (e) {
+     657              :       rethrow;
+     658              :     }
+     659              :   }
+     660              : 
+     661            0 :   @override
+     662              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+     663              :     required String pairingTopic,
+     664              :   }) {
+     665              :     try {
+     666            0 :       return engine.getCompletedRequestsForPairing(
+     667              :         pairingTopic: pairingTopic,
+     668              :       );
+     669              :     } catch (e) {
+     670              :       rethrow;
+     671              :     }
+     672              :   }
+     673              : 
+     674            0 :   @override
+     675            0 :   IGenericStore<String> get pairingTopics => engine.pairingTopics;
+     676              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_engine.dart.func-c.html b/coverage/html/sign_api/sign_engine.dart.func-c.html new file mode 100644 index 00000000..167029cc --- /dev/null +++ b/coverage/html/sign_api/sign_engine.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_engine.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_engine.dart.func.html b/coverage/html/sign_api/sign_engine.dart.func.html new file mode 100644 index 00000000..ae549c60 --- /dev/null +++ b/coverage/html/sign_api/sign_engine.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_engine.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/sign_engine.dart.gcov.html b/coverage/html/sign_api/sign_engine.dart.gcov.html new file mode 100644 index 00000000..7dd10db8 --- /dev/null +++ b/coverage/html/sign_api/sign_engine.dart.gcov.html @@ -0,0 +1,2861 @@ + + + + + + + LCOV - lcov.info - sign_api/sign_engine.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api - sign_engine.dartCoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:async';
+       2              : import 'dart:convert';
+       3              : import 'dart:math';
+       4              : 
+       5              : import 'package:http/http.dart' as http;
+       6              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/custom_credentials.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/sign_api_validator_utils.dart';
+      11              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart';
+      13              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
+      14              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
+      15              : 
+      16              : class SignEngine implements ISignEngine {
+      17              :   static const List<List<String>> DEFAULT_METHODS = [
+      18              :     [
+      19              :       MethodConstants.WC_SESSION_PROPOSE,
+      20              :       MethodConstants.WC_SESSION_REQUEST,
+      21              :     ],
+      22              :   ];
+      23              : 
+      24              :   static const List<List<String>> DEFAULT_METHODS_AUTH = [
+      25              :     [
+      26              :       MethodConstants.WC_AUTH_REQUEST,
+      27              :     ]
+      28              :   ];
+      29              : 
+      30              :   bool _initialized = false;
+      31              : 
+      32              :   @override
+      33              :   final Event<SessionConnect> onSessionConnect = Event<SessionConnect>();
+      34              :   @override
+      35              :   final Event<SessionProposalEvent> onSessionProposal =
+      36              :       Event<SessionProposalEvent>();
+      37              :   @override
+      38              :   final Event<SessionProposalErrorEvent> onSessionProposalError =
+      39              :       Event<SessionProposalErrorEvent>();
+      40              :   @override
+      41              :   final Event<SessionProposalEvent> onProposalExpire =
+      42              :       Event<SessionProposalEvent>();
+      43              :   @override
+      44              :   final Event<SessionUpdate> onSessionUpdate = Event<SessionUpdate>();
+      45              :   @override
+      46              :   final Event<SessionExtend> onSessionExtend = Event<SessionExtend>();
+      47              :   @override
+      48              :   final Event<SessionExpire> onSessionExpire = Event<SessionExpire>();
+      49              :   @override
+      50              :   final Event<SessionRequestEvent> onSessionRequest =
+      51              :       Event<SessionRequestEvent>();
+      52              :   @override
+      53              :   final Event<SessionEvent> onSessionEvent = Event<SessionEvent>();
+      54              :   @override
+      55              :   final Event<SessionPing> onSessionPing = Event<SessionPing>();
+      56              :   @override
+      57              :   final Event<SessionDelete> onSessionDelete = Event<SessionDelete>();
+      58              : 
+      59              :   @override
+      60              :   final ICore core;
+      61              :   @override
+      62              :   final PairingMetadata metadata;
+      63              :   @override
+      64              :   final IGenericStore<ProposalData> proposals;
+      65              :   @override
+      66              :   final ISessions sessions;
+      67              :   @override
+      68              :   final IGenericStore<SessionRequest> pendingRequests;
+      69              : 
+      70              :   List<SessionProposalCompleter> pendingProposals = [];
+      71              : 
+      72              :   // FORMER AUTH ENGINE PROPERTY
+      73              :   @override
+      74              :   late IGenericStore<AuthPublicKey> authKeys;
+      75              :   @override
+      76              :   late IGenericStore<PendingAuthRequest> authRequests;
+      77              :   @override
+      78              :   IGenericStore<StoredCacao> completeRequests;
+      79              :   @override
+      80              :   final Event<AuthRequest> onAuthRequest = Event<AuthRequest>();
+      81              :   @override
+      82              :   final Event<AuthResponse> onAuthResponse = Event<AuthResponse>();
+      83              :   @override
+      84              :   late IGenericStore<String> pairingTopics;
+      85              : 
+      86              :   // NEW 1-CA METHOD
+      87              :   @override
+      88              :   late IGenericStore<PendingSessionAuthRequest> sessionAuthRequests;
+      89              :   @override
+      90              :   final Event<SessionAuthRequest> onSessionAuthRequest =
+      91              :       Event<SessionAuthRequest>();
+      92              :   @override
+      93              :   final Event<SessionAuthResponse> onSessionAuthResponse =
+      94              :       Event<SessionAuthResponse>();
+      95              : 
+      96              :   // FORMER AUTH ENGINE PROPERTY (apparently not used before and not used now)
+      97              :   List<AuthRequestCompleter> pendingAuthRequests = [];
+      98              : 
+      99            5 :   SignEngine({
+     100              :     required this.core,
+     101              :     required this.metadata,
+     102              :     required this.proposals,
+     103              :     required this.sessions,
+     104              :     required this.pendingRequests,
+     105              :     // FORMER AUTH ENGINE PROPERTIES
+     106              :     required this.authKeys,
+     107              :     required this.pairingTopics,
+     108              :     required this.authRequests,
+     109              :     required this.completeRequests,
+     110              :     // NEW 1-CA PROPERTY
+     111              :     required this.sessionAuthRequests,
+     112              :   });
+     113              : 
+     114            5 :   @override
+     115              :   Future<void> init() async {
+     116            5 :     if (_initialized) {
+     117              :       return;
+     118              :     }
+     119              : 
+     120           15 :     await core.pairing.init();
+     121           25 :     await core.verify.init(verifyUrl: metadata.verifyUrl);
+     122           10 :     await proposals.init();
+     123           10 :     await sessions.init();
+     124           10 :     await pendingRequests.init();
+     125              : 
+     126              :     // FORMER AUTH ENGINE PROPERTIES
+     127           10 :     await authKeys.init();
+     128           10 :     await pairingTopics.init();
+     129           10 :     await authRequests.init();
+     130           10 :     await completeRequests.init();
+     131              :     // NEW 1-CA PROPERTY
+     132           10 :     await sessionAuthRequests.init();
+     133              : 
+     134            5 :     _registerInternalEvents();
+     135            5 :     _registerRelayClientFunctions();
+     136            5 :     await _cleanup();
+     137              : 
+     138            5 :     await _resubscribeAll();
+     139              : 
+     140            5 :     _initialized = true;
+     141              :   }
+     142              : 
+     143            5 :   @override
+     144              :   Future<void> checkAndExpire() async {
+     145           14 :     for (var session in sessions.getAll()) {
+     146           16 :       await core.expirer.checkAndExpire(session.topic);
+     147              :     }
+     148              :   }
+     149              : 
+     150            4 :   @override
+     151              :   Future<ConnectResponse> connect({
+     152              :     Map<String, RequiredNamespace>? requiredNamespaces,
+     153              :     Map<String, RequiredNamespace>? optionalNamespaces,
+     154              :     Map<String, String>? sessionProperties,
+     155              :     String? pairingTopic,
+     156              :     List<Relay>? relays,
+     157              :     List<List<String>>? methods = DEFAULT_METHODS,
+     158              :   }) async {
+     159            4 :     _checkInitialized();
+     160              : 
+     161            4 :     await _isValidConnect(
+     162            0 :       requiredNamespaces: requiredNamespaces ?? {},
+     163            4 :       optionalNamespaces: optionalNamespaces ?? {},
+     164              :       sessionProperties: sessionProperties,
+     165              :       pairingTopic: pairingTopic,
+     166              :       relays: relays,
+     167              :     );
+     168              :     String? pTopic = pairingTopic;
+     169              :     Uri? uri;
+     170              : 
+     171              :     if (pTopic == null) {
+     172           12 :       final CreateResponse newTopicAndUri = await core.pairing.create(
+     173              :         methods: methods,
+     174              :       );
+     175            4 :       pTopic = newTopicAndUri.topic;
+     176            4 :       uri = newTopicAndUri.uri;
+     177              :       // print('connect generated topic: $topic');
+     178              :     } else {
+     179           12 :       core.pairing.isValidPairingTopic(topic: pTopic);
+     180              :     }
+     181              : 
+     182           12 :     final publicKey = await core.crypto.generateKeyPair();
+     183            4 :     final int id = JsonRpcUtils.payloadId();
+     184              : 
+     185            4 :     final request = WcSessionProposeRequest(
+     186              :       relays:
+     187            8 :           relays ?? [Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL)],
+     188            0 :       requiredNamespaces: requiredNamespaces ?? {},
+     189            4 :       optionalNamespaces: optionalNamespaces ?? {},
+     190            4 :       proposer: ConnectionMetadata(
+     191              :         publicKey: publicKey,
+     192            4 :         metadata: metadata,
+     193              :       ),
+     194              :       sessionProperties: sessionProperties,
+     195              :     );
+     196              : 
+     197            4 :     final expiry = WalletConnectUtils.calculateExpiry(
+     198              :       WalletConnectConstants.FIVE_MINUTES,
+     199              :     );
+     200            4 :     final ProposalData proposal = ProposalData(
+     201              :       id: id,
+     202              :       expiry: expiry,
+     203            4 :       relays: request.relays,
+     204            4 :       proposer: request.proposer,
+     205            4 :       requiredNamespaces: request.requiredNamespaces,
+     206            4 :       optionalNamespaces: request.optionalNamespaces ?? {},
+     207            4 :       sessionProperties: request.sessionProperties,
+     208              :       pairingTopic: pTopic,
+     209              :     );
+     210            4 :     await _setProposal(
+     211              :       id,
+     212              :       proposal,
+     213              :     );
+     214              : 
+     215            4 :     Completer<SessionData> completer = Completer();
+     216              : 
+     217            8 :     pendingProposals.add(
+     218            4 :       SessionProposalCompleter(
+     219              :         id: id,
+     220              :         selfPublicKey: publicKey,
+     221              :         pairingTopic: pTopic,
+     222            4 :         requiredNamespaces: request.requiredNamespaces,
+     223            4 :         optionalNamespaces: request.optionalNamespaces ?? {},
+     224            4 :         sessionProperties: request.sessionProperties,
+     225              :         completer: completer,
+     226              :       ),
+     227              :     );
+     228            4 :     _connectResponseHandler(
+     229              :       pTopic,
+     230              :       request,
+     231              :       id,
+     232              :     );
+     233              : 
+     234            4 :     final ConnectResponse resp = ConnectResponse(
+     235              :       pairingTopic: pTopic,
+     236              :       session: completer,
+     237              :       uri: uri,
+     238              :     );
+     239              : 
+     240              :     return resp;
+     241              :   }
+     242              : 
+     243            4 :   Future<void> _connectResponseHandler(
+     244              :     String topic,
+     245              :     WcSessionProposeRequest request,
+     246              :     int requestId,
+     247              :   ) async {
+     248              :     // print("sending proposal for $topic");
+     249              :     // print('connectResponseHandler requestId: $requestId');
+     250              :     try {
+     251           12 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
+     252              :         topic,
+     253              :         MethodConstants.WC_SESSION_PROPOSE,
+     254            4 :         request.toJson(),
+     255              :         id: requestId,
+     256              :       );
+     257            4 :       final String peerPublicKey = response['responderPublicKey'];
+     258              : 
+     259            8 :       final ProposalData proposal = proposals.get(
+     260            4 :         requestId.toString(),
+     261              :       )!;
+     262           12 :       final String sessionTopic = await core.crypto.generateSharedKey(
+     263            8 :         proposal.proposer.publicKey,
+     264              :         peerPublicKey,
+     265              :       );
+     266              :       // print('connectResponseHandler session topic: $sessionTopic');
+     267              : 
+     268              :       // Delete the proposal, we are done with it
+     269            4 :       await _deleteProposal(requestId);
+     270              : 
+     271           12 :       await core.relayClient.subscribe(topic: sessionTopic);
+     272           12 :       await core.pairing.activate(topic: topic);
+     273              :     } catch (e) {
+     274              :       // Get the completer and finish it with an error
+     275           12 :       pendingProposals.removeLast().completer.completeError(e);
+     276              :     }
+     277              :   }
+     278              : 
+     279            4 :   @override
+     280              :   Future<PairingInfo> pair({
+     281              :     required Uri uri,
+     282              :   }) async {
+     283            4 :     _checkInitialized();
+     284              : 
+     285           12 :     return await core.pairing.pair(
+     286              :       uri: uri,
+     287              :     );
+     288              :   }
+     289              : 
+     290              :   /// Approves a proposal with the id provided in the parameters.
+     291              :   /// Assumes the proposal is already created.
+     292            4 :   @override
+     293              :   Future<ApproveResponse> approveSession({
+     294              :     required int id,
+     295              :     required Map<String, Namespace> namespaces,
+     296              :     Map<String, String>? sessionProperties,
+     297              :     String? relayProtocol,
+     298              :   }) async {
+     299              :     // print('sign approveSession');
+     300            4 :     _checkInitialized();
+     301              : 
+     302            4 :     await _isValidApprove(
+     303              :       id: id,
+     304              :       namespaces: namespaces,
+     305              :       sessionProperties: sessionProperties,
+     306              :       relayProtocol: relayProtocol,
+     307              :     );
+     308              : 
+     309            8 :     final ProposalData proposal = proposals.get(
+     310            4 :       id.toString(),
+     311              :     )!;
+     312              : 
+     313           12 :     final String selfPubKey = await core.crypto.generateKeyPair();
+     314            8 :     final String peerPubKey = proposal.proposer.publicKey;
+     315           12 :     final String sessionTopic = await core.crypto.generateSharedKey(
+     316              :       selfPubKey,
+     317              :       peerPubKey,
+     318              :     );
+     319              :     // print('approve session topic: $sessionTopic');
+     320              :     final protocol =
+     321              :         relayProtocol ?? WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL;
+     322            4 :     final relay = Relay(protocol);
+     323              : 
+     324              :     // Respond to the proposal
+     325           12 :     await core.pairing.sendResult(
+     326              :       id,
+     327            4 :       proposal.pairingTopic,
+     328              :       MethodConstants.WC_SESSION_PROPOSE,
+     329            4 :       WcSessionProposeResponse(
+     330              :         relay: relay,
+     331              :         responderPublicKey: selfPubKey,
+     332              :       ),
+     333              :     );
+     334            4 :     await _deleteProposal(id);
+     335           16 :     await core.pairing.activate(topic: proposal.pairingTopic);
+     336              : 
+     337           12 :     await core.pairing.updateMetadata(
+     338            4 :       topic: proposal.pairingTopic,
+     339            8 :       metadata: proposal.proposer.metadata,
+     340              :     );
+     341              : 
+     342           12 :     await core.relayClient.subscribe(topic: sessionTopic);
+     343              : 
+     344            4 :     final int expiry = WalletConnectUtils.calculateExpiry(
+     345              :       WalletConnectConstants.SEVEN_DAYS,
+     346              :     );
+     347              : 
+     348            4 :     SessionData session = SessionData(
+     349              :       topic: sessionTopic,
+     350            4 :       pairingTopic: proposal.pairingTopic,
+     351              :       relay: relay,
+     352              :       expiry: expiry,
+     353              :       acknowledged: false,
+     354              :       controller: selfPubKey,
+     355              :       namespaces: namespaces,
+     356            4 :       self: ConnectionMetadata(
+     357              :         publicKey: selfPubKey,
+     358            4 :         metadata: metadata,
+     359              :       ),
+     360            4 :       peer: proposal.proposer,
+     361            4 :       sessionProperties: proposal.sessionProperties,
+     362              :     );
+     363              : 
+     364           12 :     onSessionConnect.broadcast(SessionConnect(session));
+     365              : 
+     366            8 :     await sessions.set(sessionTopic, session);
+     367            4 :     await _setSessionExpiry(sessionTopic, expiry);
+     368              : 
+     369              :     // `wc_sessionSettle` is not critical throughout the entire session.
+     370            8 :     bool acknowledged = await core.pairing
+     371            4 :         .sendRequest(
+     372              :           sessionTopic,
+     373              :           MethodConstants.WC_SESSION_SETTLE,
+     374            4 :           WcSessionSettleRequest(
+     375              :             relay: relay,
+     376              :             namespaces: namespaces,
+     377              :             sessionProperties: sessionProperties,
+     378              :             expiry: expiry,
+     379            4 :             controller: ConnectionMetadata(
+     380              :               publicKey: selfPubKey,
+     381            4 :               metadata: metadata,
+     382              :             ),
+     383              :           ),
+     384              :         )
+     385              :         // Sometimes we don't receive any response for a long time,
+     386              :         // in which case we manually time out to prevent waiting indefinitely.
+     387            4 :         .timeout(const Duration(seconds: 15))
+     388            4 :         .catchError(
+     389            0 :       (_) {
+     390              :         return false;
+     391              :       },
+     392              :     );
+     393              : 
+     394            8 :     session = session.copyWith(
+     395              :       acknowledged: acknowledged,
+     396              :     );
+     397              : 
+     398            8 :     if (acknowledged && sessions.has(sessionTopic)) {
+     399              :       // We directly update the latest value.
+     400            8 :       await sessions.set(
+     401              :         sessionTopic,
+     402              :         session,
+     403              :       );
+     404              :     }
+     405              : 
+     406            4 :     return ApproveResponse(
+     407              :       topic: sessionTopic,
+     408              :       session: session,
+     409              :     );
+     410              :   }
+     411              : 
+     412            3 :   @override
+     413              :   Future<void> rejectSession({
+     414              :     required int id,
+     415              :     required WalletConnectError reason,
+     416              :   }) async {
+     417            3 :     _checkInitialized();
+     418              : 
+     419            3 :     await _isValidReject(id, reason);
+     420              : 
+     421            9 :     ProposalData? proposal = proposals.get(id.toString());
+     422              :     if (proposal != null) {
+     423              :       // Attempt to send a response, if the pairing is not active, this will fail
+     424              :       // but we don't care
+     425              :       try {
+     426              :         final method = MethodConstants.WC_SESSION_PROPOSE;
+     427            3 :         final rpcOpts = MethodConstants.RPC_OPTS[method];
+     428            9 :         await core.pairing.sendError(
+     429              :           id,
+     430            3 :           proposal.pairingTopic,
+     431              :           method,
+     432            9 :           JsonRpcError(code: reason.code, message: reason.message),
+     433            3 :           rpcOptions: rpcOpts?['reject'],
+     434              :         );
+     435              :       } catch (_) {
+     436              :         // print('got here');
+     437              :       }
+     438              :     }
+     439            3 :     await _deleteProposal(id);
+     440              :   }
+     441              : 
+     442            3 :   @override
+     443              :   Future<void> updateSession({
+     444              :     required String topic,
+     445              :     required Map<String, Namespace> namespaces,
+     446              :   }) async {
+     447            3 :     _checkInitialized();
+     448            3 :     await _isValidUpdate(
+     449              :       topic,
+     450              :       namespaces,
+     451              :     );
+     452              : 
+     453            6 :     await sessions.update(
+     454              :       topic,
+     455              :       namespaces: namespaces,
+     456              :     );
+     457              : 
+     458            9 :     await core.pairing.sendRequest(
+     459              :       topic,
+     460              :       MethodConstants.WC_SESSION_UPDATE,
+     461            3 :       WcSessionUpdateRequest(namespaces: namespaces),
+     462              :     );
+     463              :   }
+     464              : 
+     465            3 :   @override
+     466              :   Future<void> extendSession({
+     467              :     required String topic,
+     468              :   }) async {
+     469            3 :     _checkInitialized();
+     470            3 :     await _isValidSessionTopic(topic);
+     471              : 
+     472            9 :     await core.pairing.sendRequest(
+     473              :       topic,
+     474              :       MethodConstants.WC_SESSION_EXTEND,
+     475            3 :       {},
+     476              :     );
+     477              : 
+     478            3 :     await _setSessionExpiry(
+     479              :       topic,
+     480            3 :       WalletConnectUtils.calculateExpiry(
+     481              :         WalletConnectConstants.SEVEN_DAYS,
+     482              :       ),
+     483              :     );
+     484              :   }
+     485              : 
+     486              :   /// Maps a request using chainId:method to its handler
+     487              :   final Map<String, dynamic Function(String, dynamic)?> _methodHandlers = {};
+     488              : 
+     489            3 :   @override
+     490              :   void registerRequestHandler({
+     491              :     required String chainId,
+     492              :     required String method,
+     493              :     dynamic Function(String, dynamic)? handler,
+     494              :   }) {
+     495            9 :     _methodHandlers[_getRegisterKey(chainId, method)] = handler;
+     496              :   }
+     497              : 
+     498            3 :   @override
+     499              :   Future request({
+     500              :     required String topic,
+     501              :     required String chainId,
+     502              :     required SessionRequestParams request,
+     503              :   }) async {
+     504            3 :     _checkInitialized();
+     505            3 :     await _isValidRequest(
+     506              :       topic,
+     507              :       chainId,
+     508              :       request,
+     509              :     );
+     510            9 :     return await core.pairing.sendRequest(
+     511              :       topic,
+     512              :       MethodConstants.WC_SESSION_REQUEST,
+     513            3 :       WcSessionRequestRequest(
+     514              :         chainId: chainId,
+     515              :         request: request,
+     516              :       ),
+     517              :     );
+     518              :   }
+     519              : 
+     520            0 :   @override
+     521              :   Future<List<dynamic>> requestReadContract({
+     522              :     required DeployedContract deployedContract,
+     523              :     required String functionName,
+     524              :     required String rpcUrl,
+     525              :     EthereumAddress? sender,
+     526              :     List<dynamic> parameters = const [],
+     527              :   }) async {
+     528              :     try {
+     529            0 :       final results = await Web3Client(rpcUrl, http.Client()).call(
+     530              :         sender: sender,
+     531              :         contract: deployedContract,
+     532            0 :         function: deployedContract.function(functionName),
+     533              :         params: parameters,
+     534              :       );
+     535              : 
+     536              :       return results;
+     537              :     } catch (e) {
+     538              :       rethrow;
+     539              :     }
+     540              :   }
+     541              : 
+     542            0 :   @override
+     543              :   Future<dynamic> requestWriteContract({
+     544              :     required String topic,
+     545              :     required String chainId,
+     546              :     required String rpcUrl,
+     547              :     required DeployedContract deployedContract,
+     548              :     required String functionName,
+     549              :     required Transaction transaction,
+     550              :     String? method,
+     551              :     List<dynamic> parameters = const [],
+     552              :   }) async {
+     553            0 :     if (transaction.from == null) {
+     554            0 :       throw Exception('Transaction must include `from` value');
+     555              :     }
+     556            0 :     final credentials = CustomCredentials(
+     557              :       signEngine: this,
+     558              :       topic: topic,
+     559              :       chainId: chainId,
+     560            0 :       address: transaction.from!,
+     561              :       method: method,
+     562              :     );
+     563            0 :     final trx = Transaction.callContract(
+     564              :       contract: deployedContract,
+     565            0 :       function: deployedContract.function(functionName),
+     566            0 :       from: credentials.address,
+     567            0 :       value: transaction.value,
+     568            0 :       maxGas: transaction.maxGas,
+     569            0 :       gasPrice: transaction.gasPrice,
+     570            0 :       nonce: transaction.nonce,
+     571            0 :       maxFeePerGas: transaction.maxFeePerGas,
+     572            0 :       maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,
+     573              :       parameters: parameters,
+     574              :     );
+     575              : 
+     576            0 :     if (chainId.contains(':')) {
+     577            0 :       chainId = chainId.split(':').last;
+     578              :     }
+     579            0 :     return await Web3Client(rpcUrl, http.Client()).sendTransaction(
+     580              :       credentials,
+     581              :       trx,
+     582            0 :       chainId: int.parse(chainId),
+     583              :     );
+     584              :   }
+     585              : 
+     586            3 :   @override
+     587              :   Future<void> respondSessionRequest({
+     588              :     required String topic,
+     589              :     required JsonRpcResponse response,
+     590              :   }) async {
+     591            3 :     _checkInitialized();
+     592            3 :     await _isValidResponse(topic, response);
+     593              : 
+     594              :     // final SessionRequest req = pendingRequests.get(response.id.toString())!;
+     595              :     // print('respondSessionRequest: ${req.toJson()}');
+     596            3 :     if (response.result != null) {
+     597            9 :       await core.pairing.sendResult(
+     598            3 :         response.id,
+     599              :         topic,
+     600              :         MethodConstants.WC_SESSION_REQUEST,
+     601            3 :         response.result,
+     602              :       );
+     603              :     } else {
+     604            9 :       await core.pairing.sendError(
+     605            3 :         response.id,
+     606              :         topic,
+     607              :         MethodConstants.WC_SESSION_REQUEST,
+     608            3 :         response.error!,
+     609              :       );
+     610              :     }
+     611              : 
+     612            6 :     await _deletePendingRequest(response.id);
+     613              :   }
+     614              : 
+     615              :   /// Maps a request using chainId:event to its handler
+     616              :   final Map<String, dynamic Function(String, dynamic)?> _eventHandlers = {};
+     617              : 
+     618            3 :   @override
+     619              :   void registerEventHandler({
+     620              :     required String chainId,
+     621              :     required String event,
+     622              :     dynamic Function(String, dynamic)? handler,
+     623              :   }) {
+     624            3 :     _checkInitialized();
+     625            9 :     _eventHandlers[_getRegisterKey(chainId, event)] = handler;
+     626              :   }
+     627              : 
+     628            3 :   @override
+     629              :   Future<void> emitSessionEvent({
+     630              :     required String topic,
+     631              :     required String chainId,
+     632              :     required SessionEventParams event,
+     633              :   }) async {
+     634            3 :     _checkInitialized();
+     635            3 :     await _isValidEmit(
+     636              :       topic,
+     637              :       event,
+     638              :       chainId,
+     639              :     );
+     640            9 :     await core.pairing.sendRequest(
+     641              :       topic,
+     642              :       MethodConstants.WC_SESSION_EVENT,
+     643            3 :       WcSessionEventRequest(
+     644              :         chainId: chainId,
+     645              :         event: event,
+     646              :       ),
+     647              :     );
+     648              :   }
+     649              : 
+     650            3 :   @override
+     651              :   Future<void> ping({
+     652              :     required String topic,
+     653              :   }) async {
+     654            3 :     _checkInitialized();
+     655            3 :     await _isValidPing(topic);
+     656              : 
+     657            6 :     if (sessions.has(topic)) {
+     658            9 :       bool _ = await core.pairing.sendRequest(
+     659              :         topic,
+     660              :         MethodConstants.WC_SESSION_PING,
+     661            3 :         {},
+     662              :       );
+     663           12 :     } else if (core.pairing.getStore().has(topic)) {
+     664            9 :       await core.pairing.ping(topic: topic);
+     665              :     }
+     666              :   }
+     667              : 
+     668            3 :   @override
+     669              :   Future<void> disconnectSession({
+     670              :     required String topic,
+     671              :     required WalletConnectError reason,
+     672              :   }) async {
+     673            3 :     _checkInitialized();
+     674              :     try {
+     675            3 :       await _isValidDisconnect(topic);
+     676              : 
+     677            6 :       if (sessions.has(topic)) {
+     678              :         // Send the request to delete the session, we don't care if it fails
+     679              :         try {
+     680            9 :           core.pairing.sendRequest(
+     681              :             topic,
+     682              :             MethodConstants.WC_SESSION_DELETE,
+     683            3 :             WcSessionDeleteRequest(
+     684            3 :               code: reason.code,
+     685            3 :               message: reason.message,
+     686            3 :               data: reason.data,
+     687              :             ),
+     688              :           );
+     689              :         } catch (_) {}
+     690              : 
+     691            3 :         await _deleteSession(topic);
+     692              :       } else {
+     693            9 :         await core.pairing.disconnect(topic: topic);
+     694              :       }
+     695            0 :     } on WalletConnectError catch (error, s) {
+     696            0 :       core.logger.e(
+     697            0 :         '[$runtimeType] disconnectSession()',
+     698              :         error: error,
+     699              :         stackTrace: s,
+     700              :       );
+     701              :     }
+     702              :   }
+     703              : 
+     704            3 :   @override
+     705              :   SessionData? find({
+     706              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     707              :   }) {
+     708            3 :     _checkInitialized();
+     709           12 :     final compatible = sessions.getAll().where((element) {
+     710            3 :       return SignApiValidatorUtils.isSessionCompatible(
+     711              :         session: element,
+     712              :         requiredNamespaces: requiredNamespaces,
+     713              :       );
+     714              :     });
+     715              : 
+     716            6 :     return compatible.isNotEmpty ? compatible.first : null;
+     717              :   }
+     718              : 
+     719            4 :   @override
+     720              :   Map<String, SessionData> getActiveSessions() {
+     721            4 :     _checkInitialized();
+     722              : 
+     723            4 :     Map<String, SessionData> activeSessions = {};
+     724           16 :     sessions.getAll().forEach((session) {
+     725            8 :       activeSessions[session.topic] = session;
+     726              :     });
+     727              : 
+     728              :     return activeSessions;
+     729              :   }
+     730              : 
+     731            3 :   @override
+     732              :   Map<String, SessionData> getSessionsForPairing({
+     733              :     required String pairingTopic,
+     734              :   }) {
+     735            3 :     _checkInitialized();
+     736              : 
+     737            3 :     Map<String, SessionData> pairingSessions = {};
+     738            3 :     sessions
+     739            3 :         .getAll()
+     740           12 :         .where((session) => session.pairingTopic == pairingTopic)
+     741            6 :         .forEach((session) {
+     742            6 :       pairingSessions[session.topic] = session;
+     743              :     });
+     744              : 
+     745              :     return pairingSessions;
+     746              :   }
+     747              : 
+     748            4 :   @override
+     749              :   Map<String, ProposalData> getPendingSessionProposals() {
+     750            4 :     _checkInitialized();
+     751              : 
+     752            4 :     Map<String, ProposalData> pendingProposals = {};
+     753           16 :     proposals.getAll().forEach((proposal) {
+     754           12 :       pendingProposals[proposal.id.toString()] = proposal;
+     755              :     });
+     756              : 
+     757              :     return pendingProposals;
+     758              :   }
+     759              : 
+     760            3 :   @override
+     761              :   Map<String, SessionRequest> getPendingSessionRequests() {
+     762            3 :     _checkInitialized();
+     763              : 
+     764            3 :     Map<String, SessionRequest> requests = {};
+     765           12 :     pendingRequests.getAll().forEach((r) {
+     766            9 :       requests[r.id.toString()] = r;
+     767              :     });
+     768              : 
+     769              :     return requests;
+     770              :   }
+     771              : 
+     772            1 :   @override
+     773            3 :   IPairingStore get pairings => core.pairing.getStore();
+     774              : 
+     775              :   final Set<String> _eventEmitters = {};
+     776              :   final Set<String> _accounts = {};
+     777              : 
+     778            3 :   @override
+     779              :   void registerEventEmitter({
+     780              :     required String chainId,
+     781              :     required String event,
+     782              :   }) {
+     783            3 :     final bool isChainId = NamespaceUtils.isValidChainId(chainId);
+     784              :     if (!isChainId) {
+     785            3 :       throw Errors.getSdkError(
+     786              :         Errors.UNSUPPORTED_CHAINS,
+     787              :         context:
+     788            3 :             'registerEventEmitter, chain $chainId should conform to "namespace:chainId" format',
+     789              :       );
+     790              :     }
+     791            3 :     final String value = _getRegisterKey(chainId, event);
+     792            3 :     SignApiValidatorUtils.isValidAccounts(
+     793            3 :       accounts: [value],
+     794              :       context: 'registerEventEmitter',
+     795              :     );
+     796            6 :     _eventEmitters.add(value);
+     797              :   }
+     798              : 
+     799            3 :   @override
+     800              :   void registerAccount({
+     801              :     required String chainId,
+     802              :     required String accountAddress,
+     803              :   }) {
+     804            3 :     final bool isChainId = NamespaceUtils.isValidChainId(chainId);
+     805              :     if (!isChainId) {
+     806            3 :       throw Errors.getSdkError(
+     807              :         Errors.UNSUPPORTED_CHAINS,
+     808              :         context:
+     809            3 :             'registerAccount, chain $chainId should conform to "namespace:chainId" format',
+     810              :       );
+     811              :     }
+     812            3 :     final String value = _getRegisterKey(chainId, accountAddress);
+     813            3 :     SignApiValidatorUtils.isValidAccounts(
+     814            3 :       accounts: [value],
+     815              :       context: 'registerAccount',
+     816              :     );
+     817            6 :     _accounts.add(value);
+     818              :   }
+     819              : 
+     820              :   /// ---- PRIVATE HELPERS ---- ////
+     821              : 
+     822            5 :   Future<void> _resubscribeAll() async {
+     823              :     // If the relay is not connected, stop here
+     824           15 :     if (!core.relayClient.isConnected) {
+     825              :       return;
+     826              :     }
+     827              : 
+     828              :     // Subscribe to all the sessions
+     829           10 :     for (final SessionData session in sessions.getAll()) {
+     830              :       // print('Session: subscribing to ${session.topic}');
+     831            0 :       await core.relayClient.subscribe(topic: session.topic);
+     832              :     }
+     833              :   }
+     834              : 
+     835            4 :   void _checkInitialized() {
+     836            4 :     if (!_initialized) {
+     837            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
+     838              :     }
+     839              :   }
+     840              : 
+     841            3 :   String _getRegisterKey(String chainId, String value) {
+     842            3 :     return '$chainId:$value';
+     843              :   }
+     844              : 
+     845            3 :   Future<void> _deleteSession(
+     846              :     String topic, {
+     847              :     bool expirerHasDeleted = false,
+     848              :   }) async {
+     849              :     // print('deleting session: $topic, expirerHasDeleted: $expirerHasDeleted');
+     850            6 :     final SessionData? session = sessions.get(topic);
+     851              :     if (session == null) {
+     852              :       return;
+     853              :     }
+     854            9 :     await core.relayClient.unsubscribe(topic: topic);
+     855              : 
+     856            6 :     await sessions.delete(topic);
+     857           15 :     await core.crypto.deleteKeyPair(session.self.publicKey);
+     858            9 :     await core.crypto.deleteSymKey(topic);
+     859              :     if (expirerHasDeleted) {
+     860            9 :       await core.expirer.delete(topic);
+     861              :     }
+     862              : 
+     863            6 :     onSessionDelete.broadcast(
+     864            3 :       SessionDelete(
+     865              :         topic,
+     866              :       ),
+     867              :     );
+     868              :   }
+     869              : 
+     870            4 :   Future<void> _deleteProposal(
+     871              :     int id, {
+     872              :     bool expirerHasDeleted = false,
+     873              :   }) async {
+     874           12 :     await proposals.delete(id.toString());
+     875              :     if (expirerHasDeleted) {
+     876           12 :       await core.expirer.delete(id.toString());
+     877              :     }
+     878              :   }
+     879              : 
+     880            3 :   Future<void> _deletePendingRequest(
+     881              :     int id, {
+     882              :     bool expirerHasDeleted = false,
+     883              :   }) async {
+     884            9 :     await pendingRequests.delete(id.toString());
+     885              :     if (expirerHasDeleted) {
+     886            0 :       await core.expirer.delete(id.toString());
+     887              :     }
+     888              :   }
+     889              : 
+     890            4 :   Future<void> _setSessionExpiry(String topic, int expiry) async {
+     891            8 :     if (sessions.has(topic)) {
+     892            8 :       await sessions.update(
+     893              :         topic,
+     894              :         expiry: expiry,
+     895              :       );
+     896              :     }
+     897           12 :     await core.expirer.set(topic, expiry);
+     898              :   }
+     899              : 
+     900            4 :   Future<void> _setProposal(int id, ProposalData proposal) async {
+     901           12 :     await proposals.set(id.toString(), proposal);
+     902           20 :     core.expirer.set(id.toString(), proposal.expiry);
+     903              :   }
+     904              : 
+     905            3 :   Future<void> _setPendingRequest(int id, SessionRequest request) async {
+     906            6 :     await pendingRequests.set(
+     907            3 :       id.toString(),
+     908              :       request,
+     909              :     );
+     910            9 :     core.expirer.set(
+     911            3 :       id.toString(),
+     912            3 :       WalletConnectUtils.calculateExpiry(
+     913              :         WalletConnectConstants.FIVE_MINUTES,
+     914              :       ),
+     915              :     );
+     916              :   }
+     917              : 
+     918            5 :   Future<void> _cleanup() async {
+     919            5 :     final List<String> sessionTopics = [];
+     920            5 :     final List<int> proposalIds = [];
+     921              : 
+     922           10 :     for (final SessionData session in sessions.getAll()) {
+     923            0 :       if (WalletConnectUtils.isExpired(session.expiry)) {
+     924            0 :         sessionTopics.add(session.topic);
+     925              :       }
+     926              :     }
+     927           10 :     for (final ProposalData proposal in proposals.getAll()) {
+     928            0 :       if (WalletConnectUtils.isExpired(proposal.expiry)) {
+     929            0 :         proposalIds.add(proposal.id);
+     930              :       }
+     931              :     }
+     932              : 
+     933            5 :     sessionTopics.map((topic) async {
+     934              :       // print('deleting expired session $topic');
+     935            0 :       await _deleteSession(topic);
+     936              :     });
+     937            5 :     proposalIds.map((id) async => await _deleteProposal(id));
+     938              :   }
+     939              : 
+     940              :   /// ---- Relay Events ---- ///
+     941              : 
+     942            5 :   void _registerRelayClientFunctions() {
+     943           15 :     core.pairing.register(
+     944              :       method: MethodConstants.WC_SESSION_PROPOSE,
+     945            5 :       function: _onSessionProposeRequest,
+     946              :       type: ProtocolType.sign,
+     947              :     );
+     948           15 :     core.pairing.register(
+     949              :       method: MethodConstants.WC_SESSION_SETTLE,
+     950            5 :       function: _onSessionSettleRequest,
+     951              :       type: ProtocolType.sign,
+     952              :     );
+     953           15 :     core.pairing.register(
+     954              :       method: MethodConstants.WC_SESSION_UPDATE,
+     955            5 :       function: _onSessionUpdateRequest,
+     956              :       type: ProtocolType.sign,
+     957              :     );
+     958           15 :     core.pairing.register(
+     959              :       method: MethodConstants.WC_SESSION_EXTEND,
+     960            5 :       function: _onSessionExtendRequest,
+     961              :       type: ProtocolType.sign,
+     962              :     );
+     963           15 :     core.pairing.register(
+     964              :       method: MethodConstants.WC_SESSION_PING,
+     965            5 :       function: _onSessionPingRequest,
+     966              :       type: ProtocolType.sign,
+     967              :     );
+     968           15 :     core.pairing.register(
+     969              :       method: MethodConstants.WC_SESSION_DELETE,
+     970            5 :       function: _onSessionDeleteRequest,
+     971              :       type: ProtocolType.sign,
+     972              :     );
+     973           15 :     core.pairing.register(
+     974              :       method: MethodConstants.WC_SESSION_REQUEST,
+     975            5 :       function: _onSessionRequest,
+     976              :       type: ProtocolType.sign,
+     977              :     );
+     978           15 :     core.pairing.register(
+     979              :       method: MethodConstants.WC_SESSION_EVENT,
+     980            5 :       function: _onSessionEventRequest,
+     981              :       type: ProtocolType.sign,
+     982              :     );
+     983              :     // FORMER AUTH ENGINE PROPERTY
+     984           15 :     core.pairing.register(
+     985              :       method: MethodConstants.WC_AUTH_REQUEST,
+     986            5 :       function: _onAuthRequest,
+     987              :       type: ProtocolType.sign,
+     988              :     );
+     989           15 :     core.pairing.register(
+     990              :       method: MethodConstants.WC_SESSION_AUTHENTICATE,
+     991            5 :       function: _onSessionAuthRequest,
+     992              :       type: ProtocolType.sign,
+     993              :     );
+     994              :   }
+     995              : 
+     996            4 :   bool _shouldIgnoreSessionPropose(String topic) {
+     997           12 :     final PairingInfo? pairingInfo = core.pairing.getPairing(topic: topic);
+     998           12 :     final implementSessionAuth = onSessionAuthRequest.subscriberCount > 0;
+     999              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
+    1000            8 :     final containsMethod = (pairingInfo?.methods ?? []).contains(method);
+    1001              : 
+    1002              :     return implementSessionAuth && containsMethod;
+    1003              :   }
+    1004              : 
+    1005            4 :   Future<void> _onSessionProposeRequest(
+    1006              :     String topic,
+    1007              :     JsonRpcRequest payload,
+    1008              :   ) async {
+    1009            4 :     if (_shouldIgnoreSessionPropose(topic)) {
+    1010            0 :       core.logger.t(
+    1011              :         'Session Propose ignored. Session Authenticate will be used instead',
+    1012              :       );
+    1013              :       return;
+    1014              :     }
+    1015              :     try {
+    1016           12 :       core.logger.t(
+    1017            4 :         '_onSessionProposeRequest, topic: $topic, payload: $payload',
+    1018              :       );
+    1019            8 :       final proposeRequest = WcSessionProposeRequest.fromJson(payload.params);
+    1020            4 :       await _isValidConnect(
+    1021            4 :         requiredNamespaces: proposeRequest.requiredNamespaces,
+    1022            4 :         optionalNamespaces: proposeRequest.optionalNamespaces,
+    1023            4 :         sessionProperties: proposeRequest.sessionProperties,
+    1024              :         pairingTopic: topic,
+    1025            4 :         relays: proposeRequest.relays,
+    1026              :       );
+    1027              : 
+    1028              :       // If there are accounts and event emitters, then handle the Namespace generate automatically
+    1029              :       Map<String, Namespace>? namespaces;
+    1030           16 :       if (_accounts.isNotEmpty || _eventEmitters.isNotEmpty) {
+    1031            3 :         namespaces = NamespaceUtils.constructNamespaces(
+    1032            3 :           availableAccounts: _accounts,
+    1033            9 :           availableMethods: _methodHandlers.keys.toSet(),
+    1034            3 :           availableEvents: _eventEmitters,
+    1035            3 :           requiredNamespaces: proposeRequest.requiredNamespaces,
+    1036            3 :           optionalNamespaces: proposeRequest.optionalNamespaces,
+    1037              :         );
+    1038              : 
+    1039              :         // Check that the namespaces are conforming
+    1040              :         try {
+    1041            3 :           SignApiValidatorUtils.isConformingNamespaces(
+    1042            3 :             requiredNamespaces: proposeRequest.requiredNamespaces,
+    1043              :             namespaces: namespaces,
+    1044              :             context: 'onSessionProposeRequest',
+    1045              :           );
+    1046            0 :         } on WalletConnectError catch (err) {
+    1047              :           // If they aren't, send an error
+    1048            0 :           core.logger.t(
+    1049            0 :             '_onSessionProposeRequest WalletConnectError: $err',
+    1050              :           );
+    1051            0 :           final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
+    1052            0 :           await core.pairing.sendError(
+    1053            0 :             payload.id,
+    1054              :             topic,
+    1055            0 :             payload.method,
+    1056            0 :             JsonRpcError(code: err.code, message: err.message),
+    1057            0 :             rpcOptions: rpcOpts?['autoReject'],
+    1058              :           );
+    1059              : 
+    1060              :           // Broadcast that a session proposal error has occurred
+    1061            0 :           onSessionProposalError.broadcast(
+    1062            0 :             SessionProposalErrorEvent(
+    1063            0 :               payload.id,
+    1064            0 :               proposeRequest.requiredNamespaces,
+    1065              :               namespaces,
+    1066              :               err,
+    1067              :             ),
+    1068              :           );
+    1069              :           return;
+    1070              :         }
+    1071              :       }
+    1072              : 
+    1073            4 :       final expiry = WalletConnectUtils.calculateExpiry(
+    1074              :         WalletConnectConstants.FIVE_MINUTES,
+    1075              :       );
+    1076            4 :       final ProposalData proposal = ProposalData(
+    1077            4 :         id: payload.id,
+    1078              :         expiry: expiry,
+    1079            4 :         relays: proposeRequest.relays,
+    1080            4 :         proposer: proposeRequest.proposer,
+    1081            4 :         requiredNamespaces: proposeRequest.requiredNamespaces,
+    1082            4 :         optionalNamespaces: proposeRequest.optionalNamespaces ?? {},
+    1083            4 :         sessionProperties: proposeRequest.sessionProperties,
+    1084              :         pairingTopic: topic,
+    1085              :         generatedNamespaces: namespaces,
+    1086              :       );
+    1087              : 
+    1088            8 :       await _setProposal(payload.id, proposal);
+    1089              : 
+    1090            4 :       final verifyContext = await _getVerifyContext(
+    1091              :         payload,
+    1092            8 :         proposal.proposer.metadata,
+    1093              :       );
+    1094              : 
+    1095            8 :       onSessionProposal.broadcast(
+    1096            4 :         SessionProposalEvent(
+    1097            4 :           payload.id,
+    1098              :           proposal,
+    1099              :           verifyContext,
+    1100              :         ),
+    1101              :       );
+    1102            0 :     } on WalletConnectError catch (err) {
+    1103            0 :       core.logger.e('_onSessionProposeRequest Error: $err');
+    1104            0 :       final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
+    1105            0 :       await core.pairing.sendError(
+    1106            0 :         payload.id,
+    1107              :         topic,
+    1108            0 :         payload.method,
+    1109            0 :         JsonRpcError(code: err.code, message: err.message),
+    1110            0 :         rpcOptions: rpcOpts?['autoReject'],
+    1111              :       );
+    1112              :     }
+    1113              :   }
+    1114              : 
+    1115            4 :   Future<void> _onSessionSettleRequest(
+    1116              :     String topic,
+    1117              :     JsonRpcRequest payload,
+    1118              :   ) async {
+    1119              :     // print('wc session settle');
+    1120            8 :     final request = WcSessionSettleRequest.fromJson(payload.params);
+    1121              :     try {
+    1122           12 :       await _isValidSessionSettleRequest(request.namespaces, request.expiry);
+    1123              : 
+    1124              :       final SessionProposalCompleter sProposalCompleter =
+    1125            8 :           pendingProposals.removeLast();
+    1126              :       // print(sProposalCompleter);
+    1127              : 
+    1128              :       // Create the session
+    1129            4 :       final SessionData session = SessionData(
+    1130              :         topic: topic,
+    1131            4 :         pairingTopic: sProposalCompleter.pairingTopic,
+    1132            4 :         relay: request.relay,
+    1133            4 :         expiry: request.expiry,
+    1134              :         acknowledged: true,
+    1135            8 :         controller: request.controller.publicKey,
+    1136            4 :         namespaces: request.namespaces,
+    1137            4 :         sessionProperties: request.sessionProperties,
+    1138            4 :         self: ConnectionMetadata(
+    1139            4 :           publicKey: sProposalCompleter.selfPublicKey,
+    1140            4 :           metadata: metadata,
+    1141              :         ),
+    1142            4 :         peer: request.controller,
+    1143              :       );
+    1144              : 
+    1145              :       // Update all the things: session, expiry, metadata, pairing
+    1146            8 :       sessions.set(topic, session);
+    1147            8 :       _setSessionExpiry(topic, session.expiry);
+    1148           12 :       await core.pairing.updateMetadata(
+    1149            4 :         topic: sProposalCompleter.pairingTopic,
+    1150            8 :         metadata: request.controller.metadata,
+    1151              :       );
+    1152           12 :       final pairing = core.pairing.getPairing(topic: topic);
+    1153            0 :       if (pairing != null && !pairing.active) {
+    1154            0 :         await core.pairing.activate(topic: topic);
+    1155              :       }
+    1156              : 
+    1157              :       // Send the session back to the completer
+    1158            8 :       sProposalCompleter.completer.complete(session);
+    1159              : 
+    1160              :       // Send back a success!
+    1161              :       // print('responding to session settle: acknolwedged');
+    1162           12 :       await core.pairing.sendResult(
+    1163            4 :         payload.id,
+    1164              :         topic,
+    1165              :         MethodConstants.WC_SESSION_SETTLE,
+    1166              :         true,
+    1167              :       );
+    1168            8 :       onSessionConnect.broadcast(
+    1169            4 :         SessionConnect(session),
+    1170              :       );
+    1171            0 :     } on WalletConnectError catch (err) {
+    1172            0 :       core.logger.e('_onSessionSettleRequest Error: $err');
+    1173            0 :       await core.pairing.sendError(
+    1174            0 :         payload.id,
+    1175              :         topic,
+    1176            0 :         payload.method,
+    1177            0 :         JsonRpcError.invalidParams(
+    1178            0 :           err.message,
+    1179              :         ),
+    1180              :       );
+    1181              :     }
+    1182              :   }
+    1183              : 
+    1184            3 :   Future<void> _onSessionUpdateRequest(
+    1185              :     String topic,
+    1186              :     JsonRpcRequest payload,
+    1187              :   ) async {
+    1188              :     try {
+    1189              :       // print(payload.params);
+    1190            6 :       final request = WcSessionUpdateRequest.fromJson(payload.params);
+    1191            6 :       await _isValidUpdate(topic, request.namespaces);
+    1192            6 :       await sessions.update(
+    1193              :         topic,
+    1194            3 :         namespaces: request.namespaces,
+    1195              :       );
+    1196            9 :       await core.pairing.sendResult(
+    1197            3 :         payload.id,
+    1198              :         topic,
+    1199              :         MethodConstants.WC_SESSION_UPDATE,
+    1200              :         true,
+    1201              :       );
+    1202            6 :       onSessionUpdate.broadcast(
+    1203            3 :         SessionUpdate(
+    1204            3 :           payload.id,
+    1205              :           topic,
+    1206            3 :           request.namespaces,
+    1207              :         ),
+    1208              :       );
+    1209            0 :     } on WalletConnectError catch (err) {
+    1210            0 :       core.logger.e('_onSessionUpdateRequest Error: $err');
+    1211            0 :       await core.pairing.sendError(
+    1212            0 :         payload.id,
+    1213              :         topic,
+    1214            0 :         payload.method,
+    1215            0 :         JsonRpcError.invalidParams(
+    1216            0 :           err.message,
+    1217              :         ),
+    1218              :       );
+    1219              :     }
+    1220              :   }
+    1221              : 
+    1222            3 :   Future<void> _onSessionExtendRequest(
+    1223              :     String topic,
+    1224              :     JsonRpcRequest payload,
+    1225              :   ) async {
+    1226              :     try {
+    1227            6 :       final _ = WcSessionExtendRequest.fromJson(payload.params);
+    1228            3 :       await _isValidSessionTopic(topic);
+    1229            3 :       await _setSessionExpiry(
+    1230              :         topic,
+    1231            3 :         WalletConnectUtils.calculateExpiry(
+    1232              :           WalletConnectConstants.SEVEN_DAYS,
+    1233              :         ),
+    1234              :       );
+    1235            9 :       await core.pairing.sendResult(
+    1236            3 :         payload.id,
+    1237              :         topic,
+    1238              :         MethodConstants.WC_SESSION_EXTEND,
+    1239              :         true,
+    1240              :       );
+    1241            6 :       onSessionExtend.broadcast(
+    1242            3 :         SessionExtend(
+    1243            3 :           payload.id,
+    1244              :           topic,
+    1245              :         ),
+    1246              :       );
+    1247            0 :     } on WalletConnectError catch (err) {
+    1248            0 :       await core.pairing.sendError(
+    1249            0 :         payload.id,
+    1250              :         topic,
+    1251            0 :         payload.method,
+    1252            0 :         JsonRpcError.invalidParams(
+    1253            0 :           err.message,
+    1254              :         ),
+    1255              :       );
+    1256              :     }
+    1257              :   }
+    1258              : 
+    1259            3 :   Future<void> _onSessionPingRequest(
+    1260              :     String topic,
+    1261              :     JsonRpcRequest payload,
+    1262              :   ) async {
+    1263              :     try {
+    1264            6 :       final _ = WcSessionPingRequest.fromJson(payload.params);
+    1265            3 :       await _isValidPing(topic);
+    1266            9 :       await core.pairing.sendResult(
+    1267            3 :         payload.id,
+    1268              :         topic,
+    1269              :         MethodConstants.WC_SESSION_PING,
+    1270              :         true,
+    1271              :       );
+    1272            6 :       onSessionPing.broadcast(
+    1273            3 :         SessionPing(
+    1274            3 :           payload.id,
+    1275              :           topic,
+    1276              :         ),
+    1277              :       );
+    1278            0 :     } on WalletConnectError catch (err) {
+    1279            0 :       await core.pairing.sendError(
+    1280            0 :         payload.id,
+    1281              :         topic,
+    1282            0 :         payload.method,
+    1283            0 :         JsonRpcError.invalidParams(
+    1284            0 :           err.message,
+    1285              :         ),
+    1286              :       );
+    1287              :     }
+    1288              :   }
+    1289              : 
+    1290            3 :   Future<void> _onSessionDeleteRequest(
+    1291              :     String topic,
+    1292              :     JsonRpcRequest payload,
+    1293              :   ) async {
+    1294              :     try {
+    1295            6 :       final _ = WcSessionDeleteRequest.fromJson(payload.params);
+    1296            3 :       await _isValidDisconnect(topic);
+    1297            9 :       await core.pairing.sendResult(
+    1298            3 :         payload.id,
+    1299              :         topic,
+    1300              :         MethodConstants.WC_SESSION_DELETE,
+    1301              :         true,
+    1302              :       );
+    1303            3 :       await _deleteSession(topic);
+    1304            0 :     } on WalletConnectError catch (err) {
+    1305            0 :       await core.pairing.sendError(
+    1306            0 :         payload.id,
+    1307              :         topic,
+    1308            0 :         payload.method,
+    1309            0 :         JsonRpcError.invalidParams(
+    1310            0 :           err.message,
+    1311              :         ),
+    1312              :       );
+    1313              :     }
+    1314              :   }
+    1315              : 
+    1316              :   /// Called when a session request is received
+    1317              :   /// Will attempt to find a handler for the request, if it doesn't,
+    1318              :   /// it will throw an error.
+    1319            3 :   Future<void> _onSessionRequest(String topic, JsonRpcRequest payload) async {
+    1320              :     try {
+    1321            6 :       final request = WcSessionRequestRequest.fromJson(payload.params);
+    1322            3 :       await _isValidRequest(
+    1323              :         topic,
+    1324            3 :         request.chainId,
+    1325            3 :         request.request,
+    1326              :       );
+    1327              : 
+    1328            6 :       final session = sessions.get(topic)!;
+    1329            3 :       final verifyContext = await _getVerifyContext(
+    1330              :         payload,
+    1331            6 :         session.peer.metadata,
+    1332              :       );
+    1333              : 
+    1334            3 :       final sessionRequest = SessionRequest(
+    1335            3 :         id: payload.id,
+    1336              :         topic: topic,
+    1337            6 :         method: request.request.method,
+    1338            3 :         chainId: request.chainId,
+    1339            6 :         params: request.request.params,
+    1340              :         verifyContext: verifyContext,
+    1341              :       );
+    1342              : 
+    1343              :       // print('payload id: ${payload.id}');
+    1344            3 :       await _setPendingRequest(
+    1345            3 :         payload.id,
+    1346              :         sessionRequest,
+    1347              :       );
+    1348              : 
+    1349            3 :       final methodKey = _getRegisterKey(
+    1350            3 :         request.chainId,
+    1351            6 :         request.request.method,
+    1352              :       );
+    1353            6 :       final handler = _methodHandlers[methodKey];
+    1354              :       // If a method handler has been set using registerRequestHandler we use it to process the request
+    1355              :       if (handler != null) {
+    1356              :         try {
+    1357            9 :           await handler(topic, request.request.params);
+    1358            0 :         } on WalletConnectError catch (e) {
+    1359            0 :           await core.pairing.sendError(
+    1360            0 :             payload.id,
+    1361              :             topic,
+    1362            0 :             payload.method,
+    1363            0 :             JsonRpcError.fromJson(
+    1364            0 :               e.toJson(),
+    1365              :             ),
+    1366              :           );
+    1367            0 :           await _deletePendingRequest(payload.id);
+    1368            0 :         } on WalletConnectErrorSilent catch (_) {
+    1369              :           // Do nothing on silent error
+    1370            0 :           await _deletePendingRequest(payload.id);
+    1371              :         } catch (err) {
+    1372            0 :           await core.pairing.sendError(
+    1373            0 :             payload.id,
+    1374              :             topic,
+    1375            0 :             payload.method,
+    1376            0 :             JsonRpcError.invalidParams(
+    1377            0 :               err.toString(),
+    1378              :             ),
+    1379              :           );
+    1380            0 :           await _deletePendingRequest(payload.id);
+    1381              :         }
+    1382              :       } else {
+    1383              :         // Otherwise we send onSessionRequest event
+    1384            6 :         onSessionRequest.broadcast(
+    1385            3 :           SessionRequestEvent.fromSessionRequest(
+    1386              :             sessionRequest,
+    1387              :           ),
+    1388              :         );
+    1389              :       }
+    1390            0 :     } on WalletConnectError catch (err) {
+    1391            0 :       await core.pairing.sendError(
+    1392            0 :         payload.id,
+    1393              :         topic,
+    1394            0 :         payload.method,
+    1395            0 :         JsonRpcError.invalidParams(
+    1396            0 :           err.message,
+    1397              :         ),
+    1398              :       );
+    1399              :     }
+    1400              :   }
+    1401              : 
+    1402            3 :   Future<void> _onSessionEventRequest(
+    1403              :     String topic,
+    1404              :     JsonRpcRequest payload,
+    1405              :   ) async {
+    1406              :     try {
+    1407            6 :       final request = WcSessionEventRequest.fromJson(payload.params);
+    1408            3 :       final SessionEventParams event = request.event;
+    1409            3 :       await _isValidEmit(
+    1410              :         topic,
+    1411              :         event,
+    1412            3 :         request.chainId,
+    1413              :       );
+    1414              : 
+    1415            3 :       final String eventKey = _getRegisterKey(
+    1416            3 :         request.chainId,
+    1417            6 :         request.event.name,
+    1418              :       );
+    1419            6 :       if (_eventHandlers.containsKey(eventKey)) {
+    1420            6 :         final handler = _methodHandlers[eventKey];
+    1421              :         if (handler != null) {
+    1422            0 :           final handler = _eventHandlers[eventKey]!;
+    1423              :           try {
+    1424            0 :             await handler(
+    1425              :               topic,
+    1426            0 :               event.data,
+    1427              :             );
+    1428              :           } catch (err) {
+    1429            0 :             await core.pairing.sendError(
+    1430            0 :               payload.id,
+    1431              :               topic,
+    1432            0 :               payload.method,
+    1433            0 :               JsonRpcError.invalidParams(
+    1434            0 :                 err.toString(),
+    1435              :               ),
+    1436              :             );
+    1437              :           }
+    1438              :         }
+    1439              : 
+    1440            9 :         await core.pairing.sendResult(
+    1441            3 :           payload.id,
+    1442              :           topic,
+    1443              :           MethodConstants.WC_SESSION_REQUEST,
+    1444              :           true,
+    1445              :         );
+    1446              : 
+    1447            6 :         onSessionEvent.broadcast(
+    1448            3 :           SessionEvent(
+    1449            3 :             payload.id,
+    1450              :             topic,
+    1451            3 :             event.name,
+    1452            3 :             request.chainId,
+    1453            3 :             event.data,
+    1454              :           ),
+    1455              :         );
+    1456              :       } else {
+    1457            9 :         await core.pairing.sendError(
+    1458            3 :           payload.id,
+    1459              :           topic,
+    1460            3 :           payload.method,
+    1461            3 :           JsonRpcError.methodNotFound(
+    1462            3 :             'No handler found for chainId:event -> $eventKey',
+    1463              :           ),
+    1464              :         );
+    1465              :       }
+    1466            0 :     } on WalletConnectError catch (err) {
+    1467            0 :       await core.pairing.sendError(
+    1468            0 :         payload.id,
+    1469              :         topic,
+    1470            0 :         payload.method,
+    1471            0 :         JsonRpcError.invalidParams(
+    1472            0 :           err.message,
+    1473              :         ),
+    1474              :       );
+    1475              :     }
+    1476              :   }
+    1477              : 
+    1478              :   /// ---- Event Registers ---- ///
+    1479              : 
+    1480            5 :   void _registerInternalEvents() {
+    1481           25 :     core.relayClient.onRelayClientConnect.subscribe(_onRelayConnect);
+    1482           25 :     core.expirer.onExpire.subscribe(_onExpired);
+    1483           25 :     core.pairing.onPairingDelete.subscribe(_onPairingDelete);
+    1484           25 :     core.pairing.onPairingExpire.subscribe(_onPairingDelete);
+    1485           25 :     core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
+    1486              :   }
+    1487              : 
+    1488            0 :   Future<void> _onRelayConnect(EventArgs? args) async {
+    1489              :     // print('Session: relay connected');
+    1490            0 :     await _resubscribeAll();
+    1491              :   }
+    1492              : 
+    1493            3 :   Future<void> _onPairingDelete(PairingEvent? event) async {
+    1494              :     // Delete all the sessions associated with the pairing
+    1495              :     if (event == null) {
+    1496              :       return;
+    1497              :     }
+    1498              : 
+    1499              :     // Delete the proposals
+    1500            3 :     final List<ProposalData> proposalsToDelete = proposals
+    1501            3 :         .getAll()
+    1502           15 :         .where((proposal) => proposal.pairingTopic == event.topic)
+    1503            3 :         .toList();
+    1504              : 
+    1505            6 :     for (final proposal in proposalsToDelete) {
+    1506            3 :       await _deleteProposal(
+    1507            3 :         proposal.id,
+    1508              :       );
+    1509              :     }
+    1510              : 
+    1511              :     // Delete the sessions
+    1512            3 :     final List<SessionData> sessionsToDelete = sessions
+    1513            3 :         .getAll()
+    1514           15 :         .where((session) => session.pairingTopic == event.topic)
+    1515            3 :         .toList();
+    1516              : 
+    1517            6 :     for (final session in sessionsToDelete) {
+    1518            3 :       await _deleteSession(
+    1519            3 :         session.topic,
+    1520              :       );
+    1521              :     }
+    1522              :   }
+    1523              : 
+    1524            3 :   Future<void> _onExpired(ExpirationEvent? event) async {
+    1525              :     if (event == null) {
+    1526              :       return;
+    1527              :     }
+    1528              : 
+    1529            9 :     if (sessions.has(event.target)) {
+    1530            3 :       await _deleteSession(
+    1531            3 :         event.target,
+    1532              :         expirerHasDeleted: true,
+    1533              :       );
+    1534            6 :       onSessionExpire.broadcast(
+    1535            3 :         SessionExpire(
+    1536            3 :           event.target,
+    1537              :         ),
+    1538              :       );
+    1539            9 :     } else if (proposals.has(event.target)) {
+    1540            9 :       ProposalData proposal = proposals.get(event.target)!;
+    1541            3 :       await _deleteProposal(
+    1542            6 :         int.parse(event.target),
+    1543              :         expirerHasDeleted: true,
+    1544              :       );
+    1545            6 :       onProposalExpire.broadcast(
+    1546            3 :         SessionProposalEvent(
+    1547            6 :           int.parse(event.target),
+    1548              :           proposal,
+    1549              :         ),
+    1550              :       );
+    1551            0 :     } else if (pendingRequests.has(event.target)) {
+    1552            0 :       await _deletePendingRequest(
+    1553            0 :         int.parse(event.target),
+    1554              :         expirerHasDeleted: true,
+    1555              :       );
+    1556              :       return;
+    1557              :     }
+    1558              :   }
+    1559              : 
+    1560            5 :   void _heartbeatSubscription(EventArgs? args) async {
+    1561            5 :     await checkAndExpire();
+    1562              :   }
+    1563              : 
+    1564              :   /// ---- Validation Helpers ---- ///
+    1565              : 
+    1566            3 :   Future<bool> _isValidSessionTopic(String topic) async {
+    1567            6 :     if (!sessions.has(topic)) {
+    1568            3 :       throw Errors.getInternalError(
+    1569              :         Errors.NO_MATCHING_KEY,
+    1570            3 :         context: "session topic doesn't exist: $topic",
+    1571              :       );
+    1572              :     }
+    1573              : 
+    1574            9 :     if (await core.expirer.checkAndExpire(topic)) {
+    1575            3 :       throw Errors.getInternalError(
+    1576              :         Errors.EXPIRED,
+    1577            3 :         context: 'session topic: $topic',
+    1578              :       );
+    1579              :     }
+    1580              : 
+    1581              :     return true;
+    1582              :   }
+    1583              : 
+    1584            3 :   Future<bool> _isValidSessionOrPairingTopic(String topic) async {
+    1585            6 :     if (sessions.has(topic)) {
+    1586            3 :       await _isValidSessionTopic(topic);
+    1587           12 :     } else if (core.pairing.getStore().has(topic)) {
+    1588            9 :       await core.pairing.isValidPairingTopic(topic: topic);
+    1589              :     } else {
+    1590            3 :       throw Errors.getInternalError(
+    1591              :         Errors.NO_MATCHING_KEY,
+    1592            3 :         context: "session or pairing topic doesn't exist: $topic",
+    1593              :       );
+    1594              :     }
+    1595              : 
+    1596              :     return true;
+    1597              :   }
+    1598              : 
+    1599            4 :   Future<bool> _isValidProposalId(int id) async {
+    1600           12 :     if (!proposals.has(id.toString())) {
+    1601            3 :       throw Errors.getInternalError(
+    1602              :         Errors.NO_MATCHING_KEY,
+    1603            3 :         context: "proposal id doesn't exist: $id",
+    1604              :       );
+    1605              :     }
+    1606              : 
+    1607           16 :     if (await core.expirer.checkAndExpire(id.toString())) {
+    1608            3 :       throw Errors.getInternalError(
+    1609              :         Errors.EXPIRED,
+    1610            3 :         context: 'proposal id: $id',
+    1611              :       );
+    1612              :     }
+    1613              : 
+    1614              :     return true;
+    1615              :   }
+    1616              : 
+    1617            3 :   Future<bool> _isValidPendingRequest(int id) async {
+    1618            9 :     if (!pendingRequests.has(id.toString())) {
+    1619            0 :       throw Errors.getInternalError(
+    1620              :         Errors.NO_MATCHING_KEY,
+    1621            0 :         context: "proposal id doesn't exist: $id",
+    1622              :       );
+    1623              :     }
+    1624              : 
+    1625           12 :     if (await core.expirer.checkAndExpire(id.toString())) {
+    1626            0 :       throw Errors.getInternalError(
+    1627              :         Errors.EXPIRED,
+    1628            0 :         context: 'pending request id: $id',
+    1629              :       );
+    1630              :     }
+    1631              : 
+    1632              :     return true;
+    1633              :   }
+    1634              : 
+    1635              :   /// ---- Validations ---- ///
+    1636              : 
+    1637            4 :   Future<bool> _isValidConnect({
+    1638              :     Map<String, RequiredNamespace>? requiredNamespaces,
+    1639              :     Map<String, RequiredNamespace>? optionalNamespaces,
+    1640              :     Map<String, String>? sessionProperties,
+    1641              :     String? pairingTopic,
+    1642              :     List<Relay>? relays,
+    1643              :   }) async {
+    1644              :     // No need to validate sessionProperties. Strict typing enforces Strings are valid
+    1645              :     // No need to see if the relays are a valid array and whatnot. Strict typing enforces that.
+    1646              :     if (pairingTopic != null) {
+    1647           12 :       await core.pairing.isValidPairingTopic(
+    1648              :         topic: pairingTopic,
+    1649              :       );
+    1650              :     }
+    1651              : 
+    1652              :     if (requiredNamespaces != null) {
+    1653            4 :       SignApiValidatorUtils.isValidRequiredNamespaces(
+    1654              :         requiredNamespaces: requiredNamespaces,
+    1655              :         context: 'connect() check requiredNamespaces.',
+    1656              :       );
+    1657              :     }
+    1658              : 
+    1659              :     if (optionalNamespaces != null) {
+    1660            4 :       SignApiValidatorUtils.isValidRequiredNamespaces(
+    1661              :         requiredNamespaces: optionalNamespaces,
+    1662              :         context: 'connect() check optionalNamespaces.',
+    1663              :       );
+    1664              :     }
+    1665              : 
+    1666              :     return true;
+    1667              :   }
+    1668              : 
+    1669            4 :   Future<bool> _isValidApprove({
+    1670              :     required int id,
+    1671              :     required Map<String, Namespace> namespaces,
+    1672              :     Map<String, String>? sessionProperties,
+    1673              :     String? relayProtocol,
+    1674              :   }) async {
+    1675              :     // No need to validate sessionProperties. Strict typing enforces Strings are valid
+    1676            4 :     await _isValidProposalId(id);
+    1677           12 :     final ProposalData proposal = proposals.get(id.toString())!;
+    1678              : 
+    1679              :     // Validate the namespaces
+    1680            4 :     SignApiValidatorUtils.isValidNamespaces(
+    1681              :       namespaces: namespaces,
+    1682              :       context: 'approve()',
+    1683              :     );
+    1684              : 
+    1685              :     // Validate the required and optional namespaces
+    1686            4 :     SignApiValidatorUtils.isValidRequiredNamespaces(
+    1687            4 :       requiredNamespaces: proposal.requiredNamespaces,
+    1688              :       context: 'approve() check requiredNamespaces.',
+    1689              :     );
+    1690            4 :     SignApiValidatorUtils.isValidRequiredNamespaces(
+    1691            4 :       requiredNamespaces: proposal.optionalNamespaces,
+    1692              :       context: 'approve() check optionalNamespaces.',
+    1693              :     );
+    1694              : 
+    1695              :     // Make sure the provided namespaces conforms with the required
+    1696            4 :     SignApiValidatorUtils.isConformingNamespaces(
+    1697            4 :       requiredNamespaces: proposal.requiredNamespaces,
+    1698              :       namespaces: namespaces,
+    1699              :       context: 'approve()',
+    1700              :     );
+    1701              : 
+    1702              :     return true;
+    1703              :   }
+    1704              : 
+    1705            3 :   Future<bool> _isValidReject(int id, WalletConnectError reason) async {
+    1706              :     // No need to validate reason. Strict typing enforces ErrorResponse is valid
+    1707            3 :     await _isValidProposalId(id);
+    1708              :     return true;
+    1709              :   }
+    1710              : 
+    1711            4 :   Future<bool> _isValidSessionSettleRequest(
+    1712              :     Map<String, Namespace> namespaces,
+    1713              :     int expiry,
+    1714              :   ) async {
+    1715            4 :     SignApiValidatorUtils.isValidNamespaces(
+    1716              :       namespaces: namespaces,
+    1717              :       context: 'onSessionSettleRequest()',
+    1718              :     );
+    1719              : 
+    1720            4 :     if (WalletConnectUtils.isExpired(expiry)) {
+    1721            0 :       throw Errors.getInternalError(
+    1722              :         Errors.EXPIRED,
+    1723              :         context: 'onSessionSettleRequest()',
+    1724              :       );
+    1725              :     }
+    1726              : 
+    1727              :     return true;
+    1728              :   }
+    1729              : 
+    1730            3 :   Future<bool> _isValidUpdate(
+    1731              :     String topic,
+    1732              :     Map<String, Namespace> namespaces,
+    1733              :   ) async {
+    1734            3 :     await _isValidSessionTopic(topic);
+    1735            3 :     SignApiValidatorUtils.isValidNamespaces(
+    1736              :       namespaces: namespaces,
+    1737              :       context: 'update()',
+    1738              :     );
+    1739            6 :     final SessionData session = sessions.get(topic)!;
+    1740              : 
+    1741            3 :     SignApiValidatorUtils.isConformingNamespaces(
+    1742            6 :       requiredNamespaces: session.requiredNamespaces ?? {},
+    1743              :       namespaces: namespaces,
+    1744              :       context: 'update()',
+    1745              :     );
+    1746              : 
+    1747              :     return true;
+    1748              :   }
+    1749              : 
+    1750            3 :   Future<bool> _isValidRequest(
+    1751              :     String topic,
+    1752              :     String chainId,
+    1753              :     SessionRequestParams request,
+    1754              :   ) async {
+    1755            3 :     await _isValidSessionTopic(topic);
+    1756            6 :     final SessionData session = sessions.get(topic)!;
+    1757            3 :     SignApiValidatorUtils.isValidNamespacesChainId(
+    1758            3 :       namespaces: session.namespaces,
+    1759              :       chainId: chainId,
+    1760              :     );
+    1761            3 :     SignApiValidatorUtils.isValidNamespacesRequest(
+    1762            3 :       namespaces: session.namespaces,
+    1763              :       chainId: chainId,
+    1764            3 :       method: request.method,
+    1765              :     );
+    1766              : 
+    1767              :     return true;
+    1768              :   }
+    1769              : 
+    1770            3 :   Future<bool> _isValidResponse(
+    1771              :     String topic,
+    1772              :     JsonRpcResponse response,
+    1773              :   ) async {
+    1774            3 :     await _isValidSessionTopic(topic);
+    1775              : 
+    1776            6 :     if (response.result == null && response.error == null) {
+    1777            0 :       throw Errors.getInternalError(
+    1778              :         Errors.MISSING_OR_INVALID,
+    1779              :         context: 'JSON-RPC response and error cannot both be null',
+    1780              :       );
+    1781              :     }
+    1782              : 
+    1783            6 :     await _isValidPendingRequest(response.id);
+    1784              : 
+    1785              :     return true;
+    1786              :   }
+    1787              : 
+    1788            3 :   Future<bool> _isValidPing(
+    1789              :     String topic,
+    1790              :   ) async {
+    1791            3 :     await _isValidSessionOrPairingTopic(topic);
+    1792              : 
+    1793              :     return true;
+    1794              :   }
+    1795              : 
+    1796            3 :   Future<bool> _isValidEmit(
+    1797              :     String topic,
+    1798              :     SessionEventParams event,
+    1799              :     String chainId,
+    1800              :   ) async {
+    1801            3 :     await _isValidSessionTopic(topic);
+    1802            6 :     final SessionData session = sessions.get(topic)!;
+    1803            3 :     SignApiValidatorUtils.isValidNamespacesChainId(
+    1804            3 :       namespaces: session.namespaces,
+    1805              :       chainId: chainId,
+    1806              :     );
+    1807            3 :     SignApiValidatorUtils.isValidNamespacesEvent(
+    1808            3 :       namespaces: session.namespaces,
+    1809              :       chainId: chainId,
+    1810            3 :       eventName: event.name,
+    1811              :     );
+    1812              : 
+    1813              :     return true;
+    1814              :   }
+    1815              : 
+    1816            3 :   Future<bool> _isValidDisconnect(String topic) async {
+    1817            3 :     await _isValidSessionOrPairingTopic(topic);
+    1818              : 
+    1819              :     return true;
+    1820              :   }
+    1821              : 
+    1822            4 :   Future<VerifyContext> _getVerifyContext(
+    1823              :     JsonRpcRequest payload,
+    1824              :     PairingMetadata proposerMetada,
+    1825              :   ) async {
+    1826              :     try {
+    1827            8 :       final jsonStringify = jsonEncode(payload.toJson());
+    1828           16 :       final hash = core.crypto.getUtils().hashMessage(jsonStringify);
+    1829              : 
+    1830           12 :       final result = await core.verify.resolve(attestationId: hash);
+    1831            0 :       final validation = result?.origin == Uri.parse(proposerMetada.url).origin
+    1832              :           ? Validation.VALID
+    1833              :           : Validation.INVALID;
+    1834              : 
+    1835            0 :       return VerifyContext(
+    1836            0 :         origin: result?.origin ?? proposerMetada.url,
+    1837            0 :         verifyUrl: proposerMetada.verifyUrl ?? '',
+    1838            0 :         validation: result?.isScam == true ? Validation.SCAM : validation,
+    1839            0 :         isScam: result?.isScam,
+    1840              :       );
+    1841              :     } catch (e, s) {
+    1842            4 :       if (e is! AttestationNotFound) {
+    1843            0 :         core.logger.e('[$runtimeType] verify error', error: e, stackTrace: s);
+    1844              :       }
+    1845            4 :       return VerifyContext(
+    1846            4 :         origin: proposerMetada.url,
+    1847            4 :         verifyUrl: proposerMetada.verifyUrl ?? '',
+    1848              :         validation: Validation.UNKNOWN,
+    1849              :       );
+    1850              :     }
+    1851              :   }
+    1852              : 
+    1853              :   // NEW 1-CA METHOD (Should this be private?)
+    1854              : 
+    1855            0 :   @override
+    1856              :   Future<bool> validateSignedCacao({
+    1857              :     required Cacao cacao,
+    1858              :     required String projectId,
+    1859              :   }) async {
+    1860            0 :     final CacaoSignature signature = cacao.s;
+    1861            0 :     final CacaoPayload payload = cacao.p;
+    1862              : 
+    1863            0 :     final reconstructed = formatAuthMessage(
+    1864            0 :       iss: payload.iss,
+    1865            0 :       cacaoPayload: CacaoRequestPayload.fromCacaoPayload(payload),
+    1866              :     );
+    1867              : 
+    1868            0 :     final walletAddress = AddressUtils.getDidAddress(payload.iss);
+    1869            0 :     final chainId = AddressUtils.getDidChainId(payload.iss);
+    1870              : 
+    1871            0 :     final isValid = await AuthSignature.verifySignature(
+    1872              :       walletAddress,
+    1873              :       reconstructed,
+    1874              :       signature,
+    1875              :       chainId,
+    1876              :       projectId,
+    1877              :     );
+    1878              : 
+    1879              :     return isValid;
+    1880              :   }
+    1881              : 
+    1882              :   // FORMER AUTH ENGINE PROPERTY
+    1883            0 :   @override
+    1884              :   String formatAuthMessage({
+    1885              :     required String iss,
+    1886              :     required CacaoRequestPayload cacaoPayload,
+    1887              :   }) {
+    1888              :     final header =
+    1889            0 :         '${cacaoPayload.domain} wants you to sign in with your Ethereum account:';
+    1890            0 :     final walletAddress = AddressUtils.getDidAddress(iss);
+    1891              : 
+    1892            0 :     if (cacaoPayload.aud.isEmpty) {
+    1893            0 :       throw WalletConnectError(code: -1, message: 'aud is required');
+    1894              :     }
+    1895              : 
+    1896            0 :     String statement = cacaoPayload.statement ?? '';
+    1897            0 :     final uri = 'URI: ${cacaoPayload.aud}';
+    1898            0 :     final version = 'Version: ${cacaoPayload.version}';
+    1899            0 :     final chainId = 'Chain ID: ${AddressUtils.getDidChainId(iss)}';
+    1900            0 :     final nonce = 'Nonce: ${cacaoPayload.nonce}';
+    1901            0 :     final issuedAt = 'Issued At: ${cacaoPayload.iat}';
+    1902            0 :     final expirationTime = (cacaoPayload.exp != null)
+    1903            0 :         ? 'Expiration Time: ${cacaoPayload.exp}'
+    1904            0 :         : null;
+    1905              :     final notBefore =
+    1906            0 :         (cacaoPayload.nbf != null) ? 'Not Before: ${cacaoPayload.nbf}' : null;
+    1907            0 :     final requestId = (cacaoPayload.requestId != null)
+    1908            0 :         ? 'Request ID: ${cacaoPayload.requestId}'
+    1909            0 :         : null;
+    1910            0 :     final resources = cacaoPayload.resources != null &&
+    1911            0 :             cacaoPayload.resources!.isNotEmpty
+    1912            0 :         ? 'Resources:\n${cacaoPayload.resources!.map((resource) => '- $resource').join('\n')}'
+    1913            0 :         : null;
+    1914            0 :     final recap = ReCapsUtils.getRecapFromResources(
+    1915            0 :       resources: cacaoPayload.resources,
+    1916              :     );
+    1917              :     if (recap != null) {
+    1918            0 :       final decoded = ReCapsUtils.decodeRecap(recap);
+    1919            0 :       statement = ReCapsUtils.formatStatementFromRecap(
+    1920              :         statement: statement,
+    1921              :         recap: decoded,
+    1922              :       );
+    1923              :     }
+    1924              : 
+    1925            0 :     final message = [
+    1926              :       header,
+    1927              :       walletAddress,
+    1928              :       '',
+    1929              :       statement,
+    1930              :       '',
+    1931              :       uri,
+    1932              :       version,
+    1933              :       chainId,
+    1934              :       nonce,
+    1935              :       issuedAt,
+    1936              :       expirationTime,
+    1937              :       notBefore,
+    1938              :       requestId,
+    1939              :       resources,
+    1940            0 :     ].where((element) => element != null).join('\n');
+    1941              : 
+    1942              :     return message;
+    1943              :   }
+    1944              : 
+    1945              :   // FORMER AUTH ENGINE PROPERTY
+    1946            0 :   @override
+    1947              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+    1948              :     required String pairingTopic,
+    1949              :   }) {
+    1950            0 :     Map<int, StoredCacao> completedRequests = {};
+    1951            0 :     completeRequests
+    1952            0 :         .getAll()
+    1953            0 :         .where(
+    1954            0 :           (e) => e.pairingTopic == pairingTopic,
+    1955              :         )
+    1956            0 :         .forEach((key) {
+    1957            0 :       completedRequests[key.id] = key;
+    1958              :     });
+    1959              :     return completedRequests;
+    1960              :   }
+    1961              : 
+    1962              :   // FORMER AUTH ENGINE PROPERTY
+    1963            0 :   @override
+    1964              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
+    1965            0 :     Map<int, PendingAuthRequest> pendingRequests = {};
+    1966            0 :     authRequests.getAll().forEach((key) {
+    1967            0 :       pendingRequests[key.id] = key;
+    1968              :     });
+    1969              :     return pendingRequests;
+    1970              :   }
+    1971              : 
+    1972              :   // FORMER AUTH ENGINE PROPERTY
+    1973            0 :   @override
+    1974              :   Future<AuthRequestResponse> requestAuth({
+    1975              :     required AuthRequestParams params,
+    1976              :     String? pairingTopic,
+    1977              :     List<List<String>>? methods = DEFAULT_METHODS_AUTH,
+    1978              :   }) async {
+    1979            0 :     _checkInitialized();
+    1980              : 
+    1981            0 :     AuthApiValidators.isValidRequest(params);
+    1982              :     String? pTopic = pairingTopic;
+    1983              :     Uri? uri;
+    1984              : 
+    1985              :     if (pTopic == null) {
+    1986            0 :       final CreateResponse newTopicAndUri = await core.pairing.create(
+    1987              :         methods: methods,
+    1988              :       );
+    1989            0 :       pTopic = newTopicAndUri.topic;
+    1990            0 :       uri = newTopicAndUri.uri;
+    1991              :     } else {
+    1992              :       // TODO this should be used when pairingTopic is passed (existent pairing topic case)
+    1993              :       // but it does not seems right
+    1994            0 :       core.pairing.isValidPairingTopic(topic: pTopic);
+    1995              :     }
+    1996              : 
+    1997            0 :     final publicKey = await core.crypto.generateKeyPair();
+    1998              :     // print('requestAuth, publicKey: $publicKey');
+    1999            0 :     final String responseTopic = core.crypto.getUtils().hashKey(publicKey);
+    2000            0 :     final int id = JsonRpcUtils.payloadId();
+    2001              : 
+    2002            0 :     final request = WcAuthRequestRequest(
+    2003            0 :       payloadParams: AuthPayloadParams.fromRequestParams(
+    2004              :         params,
+    2005              :       ),
+    2006            0 :       requester: ConnectionMetadata(
+    2007              :         publicKey: publicKey,
+    2008            0 :         metadata: metadata,
+    2009              :       ),
+    2010              :     );
+    2011              : 
+    2012            0 :     final int expiry = params.expiry ?? WalletConnectConstants.FIVE_MINUTES;
+    2013              : 
+    2014            0 :     await authKeys.set(
+    2015              :       AuthConstants.AUTH_CLIENT_PUBLIC_KEY_NAME,
+    2016            0 :       AuthPublicKey(publicKey: publicKey),
+    2017              :     );
+    2018              : 
+    2019            0 :     await pairingTopics.set(
+    2020              :       responseTopic,
+    2021              :       pTopic,
+    2022              :     );
+    2023              : 
+    2024              :     // Set the one time use receiver public key for decoding the Type 1 envelope
+    2025            0 :     await core.pairing.setReceiverPublicKey(
+    2026              :       topic: responseTopic,
+    2027              :       publicKey: publicKey,
+    2028              :       expiry: expiry,
+    2029              :     );
+    2030              : 
+    2031            0 :     Completer<AuthResponse> completer = Completer();
+    2032              : 
+    2033            0 :     _requestAuthResponseHandler(
+    2034              :       pairingTopic: pTopic,
+    2035              :       responseTopic: responseTopic,
+    2036              :       request: request,
+    2037              :       id: id,
+    2038              :       expiry: expiry,
+    2039              :       completer: completer,
+    2040              :     );
+    2041              : 
+    2042            0 :     return AuthRequestResponse(
+    2043              :       id: id,
+    2044              :       pairingTopic: pTopic,
+    2045              :       completer: completer,
+    2046              :       uri: uri,
+    2047              :     );
+    2048              :   }
+    2049              : 
+    2050              :   // FORMER AUTH ENGINE PROPERTY
+    2051            0 :   Future<void> _requestAuthResponseHandler({
+    2052              :     required String pairingTopic,
+    2053              :     required String responseTopic,
+    2054              :     required WcAuthRequestRequest request,
+    2055              :     required int id,
+    2056              :     required int expiry,
+    2057              :     required Completer<AuthResponse> completer,
+    2058              :   }) async {
+    2059              :     // Subscribe to the responseTopic because we expect the response to use this topic
+    2060            0 :     await core.relayClient.subscribe(topic: responseTopic);
+    2061              : 
+    2062              :     late WcAuthRequestResult result;
+    2063              :     try {
+    2064            0 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
+    2065              :         pairingTopic,
+    2066              :         MethodConstants.WC_AUTH_REQUEST,
+    2067            0 :         request.toJson(),
+    2068              :         id: id,
+    2069              :         ttl: expiry,
+    2070              :       );
+    2071            0 :       result = WcAuthRequestResult.fromJson({'cacao': response});
+    2072              :     } catch (error) {
+    2073            0 :       final response = AuthResponse(
+    2074              :         id: id,
+    2075              :         topic: responseTopic,
+    2076            0 :         jsonRpcError: (error is JsonRpcError) ? error : null,
+    2077            0 :         error: (error is! JsonRpcError)
+    2078            0 :             ? WalletConnectError(
+    2079            0 :                 code: -1,
+    2080            0 :                 message: error.toString(),
+    2081              :               )
+    2082              :             : null,
+    2083              :       );
+    2084            0 :       onAuthResponse.broadcast(response);
+    2085            0 :       completer.complete(response);
+    2086              :       return;
+    2087              :     }
+    2088              : 
+    2089            0 :     await core.pairing.activate(topic: pairingTopic);
+    2090              : 
+    2091            0 :     final Cacao cacao = result.cacao;
+    2092            0 :     await completeRequests.set(
+    2093            0 :       id.toString(),
+    2094            0 :       StoredCacao.fromCacao(
+    2095              :         id: id,
+    2096              :         pairingTopic: pairingTopic,
+    2097              :         cacao: cacao,
+    2098              :       ),
+    2099              :     );
+    2100              : 
+    2101            0 :     final isValid = await validateSignedCacao(
+    2102              :       cacao: cacao,
+    2103            0 :       projectId: core.projectId,
+    2104              :     );
+    2105              : 
+    2106              :     if (!isValid) {
+    2107            0 :       final resp = AuthResponse(
+    2108              :         id: id,
+    2109              :         topic: responseTopic,
+    2110              :         error: const WalletConnectError(
+    2111              :           code: -1,
+    2112              :           message: 'Invalid signature',
+    2113              :         ),
+    2114              :       );
+    2115            0 :       onAuthResponse.broadcast(resp);
+    2116            0 :       completer.complete(resp);
+    2117              :     } else {
+    2118            0 :       final resp = AuthResponse(
+    2119              :         id: id,
+    2120              :         topic: responseTopic,
+    2121              :         result: cacao,
+    2122              :       );
+    2123            0 :       onAuthResponse.broadcast(resp);
+    2124            0 :       completer.complete(resp);
+    2125              :     }
+    2126              :   }
+    2127              : 
+    2128              :   // NEW ONE-CLICK AUTH METHOD FOR DAPPS
+    2129            0 :   @override
+    2130              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
+    2131            0 :     Map<int, PendingSessionAuthRequest> pendingRequests = {};
+    2132            0 :     sessionAuthRequests.getAll().forEach((key) {
+    2133            0 :       pendingRequests[key.id] = key;
+    2134              :     });
+    2135              :     return pendingRequests;
+    2136              :   }
+    2137              : 
+    2138            0 :   @override
+    2139              :   Future<SessionAuthRequestResponse> authenticate({
+    2140              :     required SessionAuthRequestParams params,
+    2141              :     String? pairingTopic,
+    2142              :     List<List<String>>? methods = const [
+    2143              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
+    2144              :     ],
+    2145              :   }) async {
+    2146            0 :     _checkInitialized();
+    2147              : 
+    2148            0 :     AuthApiValidators.isValidAuthenticate(params);
+    2149              : 
+    2150            0 :     final chains = params.chains;
+    2151            0 :     final resources = params.resources ?? [];
+    2152            0 :     final requestMethods = params.methods ?? [];
+    2153              : 
+    2154              :     String? pTopic = pairingTopic;
+    2155              :     Uri? connectionUri;
+    2156              : 
+    2157              :     if (pTopic == null) {
+    2158            0 :       final CreateResponse pairing = await core.pairing.create(
+    2159              :         methods: methods,
+    2160              :       );
+    2161            0 :       pTopic = pairing.topic;
+    2162            0 :       connectionUri = pairing.uri;
+    2163              :     } else {
+    2164            0 :       core.pairing.isValidPairingTopic(topic: pTopic);
+    2165              :     }
+    2166              : 
+    2167            0 :     final publicKey = await core.crypto.generateKeyPair();
+    2168            0 :     final responseTopic = core.crypto.getUtils().hashKey(publicKey);
+    2169              : 
+    2170            0 :     await Future.wait([
+    2171            0 :       authKeys.set(
+    2172              :         AuthConstants.OCAUTH_CLIENT_PUBLIC_KEY_NAME,
+    2173            0 :         AuthPublicKey(publicKey: publicKey),
+    2174              :       ),
+    2175            0 :       pairingTopics.set(responseTopic, pTopic),
+    2176              :     ]);
+    2177              : 
+    2178            0 :     if (requestMethods.isNotEmpty) {
+    2179            0 :       final namespace = NamespaceUtils.getNamespaceFromChain(chains.first);
+    2180            0 :       String recap = ReCapsUtils.createEncodedRecap(
+    2181              :         namespace,
+    2182              :         'request',
+    2183              :         requestMethods,
+    2184              :       );
+    2185            0 :       final existingRecap = ReCapsUtils.getRecapFromResources(
+    2186              :         resources: resources,
+    2187              :       );
+    2188              :       if (existingRecap != null) {
+    2189              :         // per Recaps spec, recap must occupy the last position in the resources array
+    2190              :         // using .removeLast() to remove the element given we already checked it's a recap and will replace it
+    2191            0 :         recap = ReCapsUtils.mergeEncodedRecaps(recap, resources.removeLast());
+    2192              :       }
+    2193            0 :       resources.add(recap);
+    2194              :     }
+    2195              : 
+    2196              :     // Subscribe to the responseTopic because we expect the response to use this topic
+    2197            0 :     await core.relayClient.subscribe(topic: responseTopic);
+    2198              : 
+    2199            0 :     final id = JsonRpcUtils.payloadId();
+    2200            0 :     final proposalId = JsonRpcUtils.payloadId();
+    2201              : 
+    2202              :     // Ensure the expiry is greater than the minimum required for the request - currently 1h
+    2203              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
+    2204            0 :     final opts = MethodConstants.RPC_OPTS[method]!['req']!;
+    2205            0 :     final authRequestExpiry = max((params.expiry ?? 0), opts.ttl);
+    2206            0 :     final expiryTimestamp = DateTime.now().add(
+    2207            0 :       Duration(seconds: authRequestExpiry),
+    2208              :     );
+    2209              : 
+    2210            0 :     final request = WcSessionAuthRequestParams(
+    2211            0 :       authPayload: SessionAuthPayload.fromRequestParams(params).copyWith(
+    2212              :         resources: resources,
+    2213              :       ),
+    2214            0 :       requester: ConnectionMetadata(
+    2215              :         publicKey: publicKey,
+    2216            0 :         metadata: metadata,
+    2217              :       ),
+    2218            0 :       expiryTimestamp: expiryTimestamp.millisecondsSinceEpoch,
+    2219              :     );
+    2220              : 
+    2221              :     // Set the one time use receiver public key for decoding the Type 1 envelope
+    2222            0 :     await core.pairing.setReceiverPublicKey(
+    2223              :       topic: responseTopic,
+    2224              :       publicKey: publicKey,
+    2225              :       expiry: authRequestExpiry,
+    2226              :     );
+    2227              : 
+    2228            0 :     Completer<SessionAuthResponse> completer = Completer();
+    2229              : 
+    2230              :     // ----- build fallback session proposal request ----- //
+    2231              : 
+    2232              :     final fallbackMethod = MethodConstants.WC_SESSION_PROPOSE;
+    2233            0 :     final fallbackOpts = MethodConstants.RPC_OPTS[fallbackMethod]!['req']!;
+    2234            0 :     final fallbackExpiryTimestamp = DateTime.now().add(
+    2235            0 :       Duration(seconds: fallbackOpts.ttl),
+    2236              :     );
+    2237            0 :     final proposalData = ProposalData(
+    2238              :       id: proposalId,
+    2239            0 :       requiredNamespaces: {},
+    2240            0 :       optionalNamespaces: {
+    2241            0 :         'eip155': RequiredNamespace(
+    2242              :           chains: chains,
+    2243            0 :           methods: {'personal_sign', ...requestMethods}.toList(),
+    2244              :           events: EventsConstants.requiredEvents,
+    2245              :         ),
+    2246              :       },
+    2247            0 :       relays: [Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL)],
+    2248            0 :       expiry: fallbackExpiryTimestamp.millisecondsSinceEpoch,
+    2249            0 :       proposer: ConnectionMetadata(
+    2250              :         publicKey: publicKey,
+    2251            0 :         metadata: metadata,
+    2252              :       ),
+    2253              :       pairingTopic: pTopic,
+    2254              :     );
+    2255            0 :     final proposeRequest = WcSessionProposeRequest(
+    2256            0 :       relays: proposalData.relays,
+    2257            0 :       requiredNamespaces: proposalData.requiredNamespaces,
+    2258            0 :       optionalNamespaces: proposalData.optionalNamespaces,
+    2259            0 :       proposer: proposalData.proposer,
+    2260              :     );
+    2261            0 :     await _setProposal(proposalData.id, proposalData);
+    2262              : 
+    2263            0 :     Completer<SessionData> completerFallback = Completer();
+    2264              : 
+    2265            0 :     pendingProposals.add(
+    2266            0 :       SessionProposalCompleter(
+    2267            0 :         id: proposalData.id,
+    2268            0 :         selfPublicKey: proposalData.proposer.publicKey,
+    2269            0 :         pairingTopic: proposalData.pairingTopic,
+    2270            0 :         requiredNamespaces: proposalData.requiredNamespaces,
+    2271            0 :         optionalNamespaces: proposalData.optionalNamespaces,
+    2272              :         completer: completerFallback,
+    2273              :       ),
+    2274              :     );
+    2275              : 
+    2276              :     // ------------------------------------------------------- //
+    2277              : 
+    2278              :     // Send One-Click Auth request
+    2279            0 :     _sessionAuthResponseHandler(
+    2280              :       id: id,
+    2281              :       publicKey: publicKey,
+    2282              :       pairingTopic: pTopic,
+    2283              :       responseTopic: responseTopic,
+    2284              :       request: request,
+    2285              :       expiry: authRequestExpiry,
+    2286              :       completer: completer,
+    2287              :     );
+    2288              : 
+    2289              :     // Send Session Proposal request
+    2290            0 :     _connectResponseHandler(
+    2291              :       pTopic,
+    2292              :       proposeRequest,
+    2293            0 :       proposalData.id,
+    2294              :     );
+    2295              : 
+    2296            0 :     return SessionAuthRequestResponse(
+    2297              :       id: id,
+    2298              :       pairingTopic: pTopic,
+    2299              :       completer: completer,
+    2300              :       uri: connectionUri,
+    2301              :     );
+    2302              :   }
+    2303              : 
+    2304            0 :   Future<void> _sessionAuthResponseHandler({
+    2305              :     required int id,
+    2306              :     required String publicKey,
+    2307              :     required String pairingTopic,
+    2308              :     required String responseTopic,
+    2309              :     required int expiry,
+    2310              :     required WcSessionAuthRequestParams request,
+    2311              :     required Completer<SessionAuthResponse> completer,
+    2312              :   }) async {
+    2313              :     //
+    2314              :     late WcSessionAuthRequestResult result;
+    2315              :     try {
+    2316            0 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
+    2317              :         pairingTopic,
+    2318              :         MethodConstants.WC_SESSION_AUTHENTICATE,
+    2319            0 :         request.toJson(),
+    2320              :         id: id,
+    2321              :         ttl: expiry,
+    2322              :       );
+    2323            0 :       result = WcSessionAuthRequestResult.fromJson(response);
+    2324              :     } catch (error) {
+    2325            0 :       final response = SessionAuthResponse(
+    2326              :         id: id,
+    2327              :         topic: responseTopic,
+    2328            0 :         jsonRpcError: (error is JsonRpcError) ? error : null,
+    2329            0 :         error: (error is! JsonRpcError)
+    2330            0 :             ? WalletConnectError(
+    2331            0 :                 code: -1,
+    2332            0 :                 message: error.toString(),
+    2333              :               )
+    2334              :             : null,
+    2335              :       );
+    2336            0 :       onSessionAuthResponse.broadcast(response);
+    2337            0 :       completer.complete(response);
+    2338              :       return;
+    2339              :     }
+    2340              : 
+    2341            0 :     await core.pairing.activate(topic: pairingTopic);
+    2342              : 
+    2343            0 :     final List<Cacao> cacaos = result.cacaos;
+    2344            0 :     final ConnectionMetadata responder = result.responder;
+    2345              : 
+    2346              :     final approvedMethods = <String>{};
+    2347              :     final approvedAccounts = <String>{};
+    2348              : 
+    2349              :     try {
+    2350            0 :       for (final Cacao cacao in cacaos) {
+    2351            0 :         final isValid = await validateSignedCacao(
+    2352              :           cacao: cacao,
+    2353            0 :           projectId: core.projectId,
+    2354              :         );
+    2355              :         if (!isValid) {
+    2356            0 :           throw Errors.getSdkError(
+    2357              :             Errors.SIGNATURE_VERIFICATION_FAILED,
+    2358              :             context: 'Invalid signature',
+    2359              :           );
+    2360              :         }
+    2361              : 
+    2362              :         // This is used on Auth request, would it be needed on 1-CA?
+    2363              :         // await completeRequests.set(
+    2364              :         //   id.toString(),
+    2365              :         //   StoredCacao.fromCacao(
+    2366              :         //     id: id,
+    2367              :         //     pairingTopic: pairingTopic,
+    2368              :         //     cacao: cacao,
+    2369              :         //   ),
+    2370              :         // );
+    2371              : 
+    2372            0 :         final CacaoPayload payload = cacao.p;
+    2373            0 :         final chainId = AddressUtils.getDidChainId(payload.iss);
+    2374            0 :         final approvedChains = ['eip155:$chainId'];
+    2375              : 
+    2376            0 :         final recap = ReCapsUtils.getRecapFromResources(
+    2377            0 :           resources: payload.resources,
+    2378              :         );
+    2379              :         if (recap != null) {
+    2380            0 :           final methodsfromRecap = ReCapsUtils.getMethodsFromRecap(recap);
+    2381            0 :           final chainsFromRecap = ReCapsUtils.getChainsFromRecap(recap);
+    2382            0 :           approvedMethods.addAll(methodsfromRecap);
+    2383            0 :           approvedChains.addAll(chainsFromRecap);
+    2384              :         }
+    2385              : 
+    2386            0 :         final parsedAddress = AddressUtils.getDidAddress(payload.iss);
+    2387            0 :         for (var chain in approvedChains.toSet()) {
+    2388            0 :           approvedAccounts.add('$chain:$parsedAddress');
+    2389              :         }
+    2390              :       }
+    2391            0 :     } on WalletConnectError catch (e) {
+    2392            0 :       final resp = SessionAuthResponse(
+    2393              :         id: id,
+    2394              :         topic: responseTopic,
+    2395            0 :         error: WalletConnectError(
+    2396            0 :           code: e.code,
+    2397            0 :           message: e.message,
+    2398              :         ),
+    2399              :       );
+    2400            0 :       onSessionAuthResponse.broadcast(resp);
+    2401            0 :       completer.complete(resp);
+    2402              :       return;
+    2403              :     }
+    2404              : 
+    2405            0 :     final sessionTopic = await core.crypto.generateSharedKey(
+    2406              :       publicKey,
+    2407            0 :       responder.publicKey,
+    2408              :     );
+    2409              : 
+    2410              :     SessionData? session;
+    2411            0 :     if (approvedMethods.isNotEmpty) {
+    2412            0 :       session = SessionData(
+    2413              :         topic: sessionTopic,
+    2414              :         acknowledged: true,
+    2415            0 :         self: ConnectionMetadata(
+    2416              :           publicKey: publicKey,
+    2417            0 :           metadata: metadata,
+    2418              :         ),
+    2419              :         peer: responder,
+    2420              :         controller: publicKey,
+    2421            0 :         expiry: WalletConnectUtils.calculateExpiry(
+    2422              :           WalletConnectConstants.SEVEN_DAYS,
+    2423              :         ),
+    2424            0 :         relay: Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL),
+    2425              :         pairingTopic: pairingTopic,
+    2426            0 :         namespaces: NamespaceUtils.buildNamespacesFromAuth(
+    2427              :           accounts: approvedAccounts,
+    2428              :           methods: approvedMethods,
+    2429              :         ),
+    2430              :       );
+    2431              : 
+    2432            0 :       await core.relayClient.subscribe(topic: sessionTopic);
+    2433            0 :       await sessions.set(sessionTopic, session);
+    2434              : 
+    2435            0 :       await core.pairing.updateMetadata(
+    2436              :         topic: pairingTopic,
+    2437            0 :         metadata: responder.metadata,
+    2438              :       );
+    2439              : 
+    2440            0 :       session = sessions.get(sessionTopic);
+    2441              :     }
+    2442              : 
+    2443            0 :     final resp = SessionAuthResponse(
+    2444              :       id: id,
+    2445              :       topic: responseTopic,
+    2446              :       auths: cacaos,
+    2447              :       session: session,
+    2448              :     );
+    2449            0 :     onSessionAuthResponse.broadcast(resp);
+    2450            0 :     completer.complete(resp);
+    2451              :   }
+    2452              : 
+    2453              :   // FORMER AUTH ENGINE PROPERTY
+    2454            0 :   @override
+    2455              :   Future<void> respondAuthRequest({
+    2456              :     required int id,
+    2457              :     required String iss,
+    2458              :     CacaoSignature? signature,
+    2459              :     WalletConnectError? error,
+    2460              :   }) async {
+    2461            0 :     _checkInitialized();
+    2462              : 
+    2463            0 :     Map<int, PendingAuthRequest> pendingRequests = getPendingAuthRequests();
+    2464            0 :     AuthApiValidators.isValidRespond(
+    2465              :       id: id,
+    2466              :       pendingRequests: pendingRequests,
+    2467              :       signature: signature,
+    2468              :       error: error,
+    2469              :     );
+    2470              : 
+    2471            0 :     final PendingAuthRequest pendingRequest = pendingRequests[id]!;
+    2472            0 :     final String receiverPublicKey = pendingRequest.metadata.publicKey;
+    2473            0 :     final String senderPublicKey = await core.crypto.generateKeyPair();
+    2474            0 :     final String responseTopic = core.crypto.getUtils().hashKey(
+    2475              :           receiverPublicKey,
+    2476              :         );
+    2477            0 :     final EncodeOptions encodeOpts = EncodeOptions(
+    2478              :       type: EncodeOptions.TYPE_1,
+    2479              :       receiverPublicKey: receiverPublicKey,
+    2480              :       senderPublicKey: senderPublicKey,
+    2481              :     );
+    2482              : 
+    2483              :     if (error != null) {
+    2484            0 :       await core.pairing.sendError(
+    2485              :         id,
+    2486              :         responseTopic,
+    2487              :         MethodConstants.WC_AUTH_REQUEST,
+    2488            0 :         JsonRpcError.serverError(error.message),
+    2489              :         encodeOptions: encodeOpts,
+    2490              :       );
+    2491              :     } else {
+    2492            0 :       final Cacao cacao = Cacao(
+    2493              :         h: const CacaoHeader(),
+    2494            0 :         p: CacaoPayload.fromRequestPayload(
+    2495              :           issuer: iss,
+    2496            0 :           payload: pendingRequest.cacaoPayload,
+    2497              :         ),
+    2498              :         s: signature!,
+    2499              :       );
+    2500              : 
+    2501              :       // print('auth res id: $id');
+    2502            0 :       await core.pairing.sendResult(
+    2503              :         id,
+    2504              :         responseTopic,
+    2505              :         MethodConstants.WC_AUTH_REQUEST,
+    2506            0 :         cacao.toJson(),
+    2507              :         encodeOptions: encodeOpts,
+    2508              :       );
+    2509              : 
+    2510            0 :       await authRequests.delete(id.toString());
+    2511              : 
+    2512            0 :       await completeRequests.set(
+    2513            0 :         id.toString(),
+    2514            0 :         StoredCacao.fromCacao(
+    2515              :           id: id,
+    2516            0 :           pairingTopic: pendingRequest.pairingTopic,
+    2517              :           cacao: cacao,
+    2518              :         ),
+    2519              :       );
+    2520              :     }
+    2521              :   }
+    2522              : 
+    2523            0 :   @override
+    2524              :   Future<ApproveResponse> approveSessionAuthenticate({
+    2525              :     required int id,
+    2526              :     List<Cacao>? auths,
+    2527              :   }) async {
+    2528            0 :     _checkInitialized();
+    2529              : 
+    2530            0 :     final pendingRequests = getPendingSessionAuthRequests();
+    2531              : 
+    2532            0 :     AuthApiValidators.isValidRespondAuthenticate(
+    2533              :       id: id,
+    2534              :       pendingRequests: pendingRequests,
+    2535              :       auths: auths,
+    2536              :     );
+    2537              : 
+    2538            0 :     final PendingSessionAuthRequest pendingRequest = pendingRequests[id]!;
+    2539            0 :     final receiverPublicKey = pendingRequest.requester.publicKey;
+    2540            0 :     final senderPublicKey = await core.crypto.generateKeyPair();
+    2541            0 :     final responseTopic = core.crypto.getUtils().hashKey(receiverPublicKey);
+    2542              : 
+    2543            0 :     final encodeOpts = EncodeOptions(
+    2544              :       type: EncodeOptions.TYPE_1,
+    2545              :       receiverPublicKey: receiverPublicKey,
+    2546              :       senderPublicKey: senderPublicKey,
+    2547              :     );
+    2548              : 
+    2549              :     final approvedMethods = <String>{};
+    2550              :     final approvedAccounts = <String>{};
+    2551            0 :     for (final Cacao cacao in auths!) {
+    2552            0 :       final isValid = await validateSignedCacao(
+    2553              :         cacao: cacao,
+    2554            0 :         projectId: core.projectId,
+    2555              :       );
+    2556              :       if (!isValid) {
+    2557            0 :         final error = Errors.getSdkError(
+    2558              :           Errors.SIGNATURE_VERIFICATION_FAILED,
+    2559              :           context: 'Signature verification failed',
+    2560              :         );
+    2561            0 :         await core.pairing.sendError(
+    2562              :           id,
+    2563              :           responseTopic,
+    2564              :           MethodConstants.WC_SESSION_AUTHENTICATE,
+    2565            0 :           JsonRpcError(code: error.code, message: error.message),
+    2566              :           encodeOptions: encodeOpts,
+    2567              :         );
+    2568              :         throw error;
+    2569              :       }
+    2570              : 
+    2571            0 :       final CacaoPayload payload = cacao.p;
+    2572            0 :       final chainId = AddressUtils.getDidChainId(payload.iss);
+    2573            0 :       final approvedChains = ['eip155:$chainId'];
+    2574              : 
+    2575            0 :       final recap = ReCapsUtils.getRecapFromResources(
+    2576            0 :         resources: payload.resources,
+    2577              :       );
+    2578              :       if (recap != null) {
+    2579            0 :         final methodsfromRecap = ReCapsUtils.getMethodsFromRecap(recap);
+    2580            0 :         final chainsFromRecap = ReCapsUtils.getChainsFromRecap(recap);
+    2581            0 :         approvedMethods.addAll(methodsfromRecap);
+    2582            0 :         approvedChains.addAll(chainsFromRecap);
+    2583              :       }
+    2584              : 
+    2585            0 :       final parsedAddress = AddressUtils.getDidAddress(payload.iss);
+    2586            0 :       for (var chain in approvedChains.toSet()) {
+    2587            0 :         approvedAccounts.add('$chain:$parsedAddress');
+    2588              :       }
+    2589              :     }
+    2590              : 
+    2591            0 :     final sessionTopic = await core.crypto.generateSharedKey(
+    2592              :       senderPublicKey,
+    2593              :       receiverPublicKey,
+    2594              :     );
+    2595              : 
+    2596              :     SessionData? session;
+    2597            0 :     if (approvedMethods.isNotEmpty) {
+    2598            0 :       session = SessionData(
+    2599              :         topic: sessionTopic,
+    2600              :         acknowledged: true,
+    2601            0 :         self: ConnectionMetadata(
+    2602              :           publicKey: senderPublicKey,
+    2603            0 :           metadata: metadata,
+    2604              :         ),
+    2605            0 :         peer: pendingRequest.requester,
+    2606              :         controller: receiverPublicKey,
+    2607            0 :         expiry: WalletConnectUtils.calculateExpiry(
+    2608              :           WalletConnectConstants.SEVEN_DAYS,
+    2609              :         ),
+    2610            0 :         relay: Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL),
+    2611            0 :         pairingTopic: pendingRequest.pairingTopic,
+    2612            0 :         namespaces: NamespaceUtils.buildNamespacesFromAuth(
+    2613              :           accounts: approvedAccounts,
+    2614              :           methods: approvedMethods,
+    2615              :         ),
+    2616              :       );
+    2617              : 
+    2618            0 :       await core.relayClient.subscribe(topic: sessionTopic);
+    2619            0 :       await sessions.set(sessionTopic, session);
+    2620              : 
+    2621            0 :       session = sessions.get(sessionTopic);
+    2622              :     }
+    2623              : 
+    2624            0 :     final result = WcSessionAuthRequestResult(
+    2625              :       cacaos: auths,
+    2626            0 :       responder: ConnectionMetadata(
+    2627              :         publicKey: senderPublicKey,
+    2628            0 :         metadata: metadata,
+    2629              :       ),
+    2630              :     );
+    2631            0 :     await core.pairing.sendResult(
+    2632              :       id,
+    2633              :       responseTopic,
+    2634              :       MethodConstants.WC_SESSION_AUTHENTICATE,
+    2635            0 :       result.toJson(),
+    2636              :       encodeOptions: encodeOpts,
+    2637              :     );
+    2638              : 
+    2639            0 :     await sessionAuthRequests.delete(id.toString());
+    2640            0 :     await core.pairing.activate(topic: pendingRequest.pairingTopic);
+    2641            0 :     await core.pairing.updateMetadata(
+    2642            0 :       topic: pendingRequest.pairingTopic,
+    2643            0 :       metadata: pendingRequest.requester.metadata,
+    2644              :     );
+    2645              : 
+    2646            0 :     return ApproveResponse(
+    2647              :       topic: sessionTopic,
+    2648              :       session: session,
+    2649              :     );
+    2650              :   }
+    2651              : 
+    2652            0 :   @override
+    2653              :   Future<void> rejectSessionAuthenticate({
+    2654              :     required int id,
+    2655              :     required WalletConnectError reason,
+    2656              :   }) async {
+    2657            0 :     _checkInitialized();
+    2658              : 
+    2659            0 :     final pendingRequests = getPendingSessionAuthRequests();
+    2660              : 
+    2661            0 :     if (!pendingRequests.containsKey(id)) {
+    2662            0 :       throw Errors.getInternalError(
+    2663              :         Errors.MISSING_OR_INVALID,
+    2664              :         context:
+    2665            0 :             'rejectSessionAuthenticate() Could not find pending auth request with id $id',
+    2666              :       );
+    2667              :     }
+    2668              : 
+    2669            0 :     final PendingSessionAuthRequest pendingRequest = pendingRequests[id]!;
+    2670            0 :     final receiverPublicKey = pendingRequest.requester.publicKey;
+    2671            0 :     final senderPublicKey = await core.crypto.generateKeyPair();
+    2672            0 :     final responseTopic = core.crypto.getUtils().hashKey(receiverPublicKey);
+    2673              : 
+    2674            0 :     final encodeOpts = EncodeOptions(
+    2675              :       type: EncodeOptions.TYPE_1,
+    2676              :       receiverPublicKey: receiverPublicKey,
+    2677              :       senderPublicKey: senderPublicKey,
+    2678              :     );
+    2679              : 
+    2680              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
+    2681            0 :     final rpcOpts = MethodConstants.RPC_OPTS[method];
+    2682            0 :     await core.pairing.sendError(
+    2683              :       id,
+    2684              :       responseTopic,
+    2685              :       method,
+    2686            0 :       JsonRpcError(code: reason.code, message: reason.message),
+    2687              :       encodeOptions: encodeOpts,
+    2688            0 :       rpcOptions: rpcOpts?['reject'],
+    2689              :     );
+    2690              : 
+    2691            0 :     await sessionAuthRequests.delete(id.toString());
+    2692            0 :     await _deleteProposal(id);
+    2693              :   }
+    2694              : 
+    2695              :   // FORMER AUTH ENGINE PROPERTY
+    2696            0 :   void _onAuthRequest(String topic, JsonRpcRequest payload) async {
+    2697              :     try {
+    2698            0 :       final request = WcAuthRequestRequest.fromJson(payload.params);
+    2699              : 
+    2700              :       final CacaoRequestPayload cacaoPayload =
+    2701            0 :           CacaoRequestPayload.fromPayloadParams(
+    2702            0 :         request.payloadParams,
+    2703              :       );
+    2704              : 
+    2705            0 :       authRequests.set(
+    2706            0 :         payload.id.toString(),
+    2707            0 :         PendingAuthRequest(
+    2708            0 :           id: payload.id,
+    2709              :           pairingTopic: topic,
+    2710            0 :           metadata: request.requester,
+    2711              :           cacaoPayload: cacaoPayload,
+    2712              :         ),
+    2713              :       );
+    2714              : 
+    2715            0 :       onAuthRequest.broadcast(
+    2716            0 :         AuthRequest(
+    2717            0 :           id: payload.id,
+    2718              :           topic: topic,
+    2719            0 :           requester: request.requester,
+    2720            0 :           payloadParams: request.payloadParams,
+    2721              :         ),
+    2722              :       );
+    2723            0 :     } on WalletConnectError catch (err) {
+    2724            0 :       await core.pairing.sendError(
+    2725            0 :         payload.id,
+    2726              :         topic,
+    2727            0 :         payload.method,
+    2728            0 :         JsonRpcError.invalidParams(
+    2729            0 :           err.message,
+    2730              :         ),
+    2731              :       );
+    2732              :     }
+    2733              :   }
+    2734              : 
+    2735            0 :   void _onSessionAuthRequest(String topic, JsonRpcRequest payload) async {
+    2736            0 :     core.logger.t('_onSessionAuthRequest, topic: $topic, payload: $payload');
+    2737              : 
+    2738            0 :     final sessionAuthRequest = WcSessionAuthRequestParams.fromJson(
+    2739            0 :       payload.params,
+    2740              :     );
+    2741              :     try {
+    2742            0 :       final cacaoPayload = CacaoRequestPayload.fromSessionAuthPayload(
+    2743            0 :         sessionAuthRequest.authPayload,
+    2744              :       );
+    2745              : 
+    2746            0 :       final verifyContext = await _getVerifyContext(payload, metadata);
+    2747              : 
+    2748            0 :       sessionAuthRequests.set(
+    2749            0 :         payload.id.toString(),
+    2750            0 :         PendingSessionAuthRequest(
+    2751            0 :           id: payload.id,
+    2752              :           pairingTopic: topic,
+    2753            0 :           requester: sessionAuthRequest.requester,
+    2754              :           authPayload: cacaoPayload,
+    2755            0 :           expiryTimestamp: sessionAuthRequest.expiryTimestamp,
+    2756              :           verifyContext: verifyContext,
+    2757              :         ),
+    2758              :       );
+    2759              : 
+    2760            0 :       onSessionAuthRequest.broadcast(
+    2761            0 :         SessionAuthRequest(
+    2762            0 :           id: payload.id,
+    2763              :           topic: topic,
+    2764            0 :           requester: sessionAuthRequest.requester,
+    2765            0 :           authPayload: sessionAuthRequest.authPayload,
+    2766              :           verifyContext: verifyContext,
+    2767              :         ),
+    2768              :       );
+    2769            0 :     } on WalletConnectError catch (err) {
+    2770            0 :       final receiverPublicKey = sessionAuthRequest.requester.publicKey;
+    2771            0 :       final senderPublicKey = await core.crypto.generateKeyPair();
+    2772              : 
+    2773            0 :       final encodeOpts = EncodeOptions(
+    2774              :         type: EncodeOptions.TYPE_1,
+    2775              :         receiverPublicKey: receiverPublicKey,
+    2776              :         senderPublicKey: senderPublicKey,
+    2777              :       );
+    2778            0 :       final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
+    2779            0 :       await core.pairing.sendError(
+    2780            0 :         payload.id,
+    2781              :         topic,
+    2782            0 :         payload.method,
+    2783            0 :         JsonRpcError.invalidParams(err.message),
+    2784              :         encodeOptions: encodeOpts,
+    2785            0 :         rpcOptions: rpcOpts?['autoReject'],
+    2786              :       );
+    2787              :     }
+    2788              :   }
+    2789              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html new file mode 100644 index 00000000..ab48e819 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/address_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - address_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.func.html b/coverage/html/sign_api/utils/auth/address_utils.dart.func.html new file mode 100644 index 00000000..1e89e6e2 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/address_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/address_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - address_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html new file mode 100644 index 00000000..c5e4f729 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html @@ -0,0 +1,85 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/address_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - address_utils.dartCoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : class AddressUtils {
+       2            3 :   static String getDidAddress(String iss) {
+       3            6 :     return iss.split(':').last;
+       4              :   }
+       5              : 
+       6            3 :   static String getDidChainId(String iss) {
+       7            6 :     return iss.split(':')[3];
+       8              :   }
+       9              : 
+      10            0 :   static String getNamespaceDidChainId(String iss) {
+      11            0 :     return iss.substring(iss.indexOf(RegExp(r':')) + 1);
+      12              :   }
+      13              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html new file mode 100644 index 00000000..63277826 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_api_validators.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html new file mode 100644 index 00000000..b3c2eaff --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_api_validators.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html new file mode 100644 index 00000000..486eb5bb --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html @@ -0,0 +1,218 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_api_validators.dartCoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
+       2              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       3              : 
+       4              : class AuthApiValidators {
+       5            1 :   static bool isValidRequestExpiry(int expiry) {
+       6            1 :     return AuthConstants.AUTH_REQUEST_EXPIRY_MIN <= expiry &&
+       7            1 :         expiry <= AuthConstants.AUTH_REQUEST_EXPIRY_MAX;
+       8              :   }
+       9              : 
+      10            3 :   static bool isValidRequest(AuthRequestParams params) {
+      11            6 :     if (!NamespaceUtils.isValidUrl(params.aud)) {
+      12            2 :       throw Errors.getInternalError(
+      13              :         Errors.MISSING_OR_INVALID,
+      14              :         context:
+      15            4 :             'requestAuth() invalid aud: ${params.aud}. Must be a valid url.',
+      16              :       );
+      17              :     }
+      18              : 
+      19            6 :     if (params.nonce.isEmpty) {
+      20            1 :       throw Errors.getInternalError(
+      21              :         Errors.MISSING_OR_INVALID,
+      22              :         context: 'requestAuth() nonce must be nonempty.',
+      23              :       );
+      24              :     }
+      25              : 
+      26              :     // params.type == null || params.type == CacaoHeader.EIP4361
+      27            9 :     if (params.type != null && params.type != CacaoHeader.EIP4361) {
+      28            1 :       throw Errors.getInternalError(
+      29              :         Errors.MISSING_OR_INVALID,
+      30              :         context: 'requestAuth() type must null or ${CacaoHeader.EIP4361}.',
+      31              :       );
+      32              :     }
+      33              : 
+      34            3 :     final expiry = params.expiry;
+      35            1 :     if (expiry != null && !isValidRequestExpiry(expiry)) {
+      36            1 :       throw Errors.getInternalError(
+      37              :         Errors.MISSING_OR_INVALID,
+      38              :         context:
+      39            1 :             'requestAuth() expiry: $expiry. Expiry must be a number (in seconds) between ${AuthConstants.AUTH_REQUEST_EXPIRY_MIN} and ${AuthConstants.AUTH_REQUEST_EXPIRY_MAX}',
+      40              :       );
+      41              :     }
+      42              : 
+      43              :     return true;
+      44              :   }
+      45              : 
+      46            3 :   static bool isValidRespond({
+      47              :     required int id,
+      48              :     required Map<int, PendingAuthRequest> pendingRequests,
+      49              :     CacaoSignature? signature,
+      50              :     WalletConnectError? error,
+      51              :   }) {
+      52            3 :     if (!pendingRequests.containsKey(id)) {
+      53            2 :       throw Errors.getInternalError(
+      54              :         Errors.MISSING_OR_INVALID,
+      55            2 :         context: 'respondAuth() invalid id: $id. No pending request found.',
+      56              :       );
+      57              :     }
+      58              : 
+      59              :     if (signature == null && error == null) {
+      60            1 :       throw Errors.getInternalError(
+      61              :         Errors.MISSING_OR_INVALID,
+      62              :         context:
+      63              :             'respondAuth() invalid response. Must contain either signature or error.',
+      64              :       );
+      65              :     }
+      66              : 
+      67              :     return true;
+      68              :   }
+      69              : 
+      70            0 :   static bool isValidAuthenticate(SessionAuthRequestParams params) {
+      71            0 :     if (params.chains.isEmpty) {
+      72            0 :       throw Errors.getInternalError(
+      73              :         Errors.MISSING_OR_INVALID,
+      74              :         context: 'authenticate() invalid chains: Must not be emtpy.',
+      75              :       );
+      76              :     }
+      77              : 
+      78            0 :     if (!NamespaceUtils.isValidUrl(params.uri)) {
+      79            0 :       throw Errors.getInternalError(
+      80              :         Errors.MISSING_OR_INVALID,
+      81              :         context:
+      82            0 :             'authenticate() invalid uri: ${params.uri}. Must be a valid url.',
+      83              :       );
+      84              :     }
+      85              : 
+      86            0 :     if (params.nonce.isEmpty) {
+      87            0 :       throw Errors.getInternalError(
+      88              :         Errors.MISSING_OR_INVALID,
+      89              :         context: 'authenticate() nonce must be nonempty.',
+      90              :       );
+      91              :     }
+      92              : 
+      93            0 :     if (params.type != null && params.type!.t != CacaoHeader.EIP4361) {
+      94            0 :       throw Errors.getInternalError(
+      95              :         Errors.MISSING_OR_INVALID,
+      96              :         context: 'authenticate() type must null or ${CacaoHeader.EIP4361}.',
+      97              :       );
+      98              :     }
+      99              : 
+     100            0 :     final uniqueNamespaces = params.chains.map((chain) {
+     101            0 :       return NamespaceUtils.getNamespaceFromChain(chain);
+     102            0 :     }).toSet();
+     103            0 :     if (uniqueNamespaces.length > 1) {
+     104            0 :       throw Errors.getInternalError(
+     105              :         Errors.NON_CONFORMING_NAMESPACES,
+     106              :         context:
+     107              :             'authenticate() Multi-namespace requests are not supported. Please request single namespace only.',
+     108              :       );
+     109              :     }
+     110              : 
+     111            0 :     final namespace = NamespaceUtils.getNamespaceFromChain(params.chains.first);
+     112            0 :     if (namespace != 'eip155') {
+     113            0 :       throw Errors.getInternalError(
+     114              :         Errors.NON_CONFORMING_NAMESPACES,
+     115              :         context:
+     116              :             'authenticate() Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.',
+     117              :       );
+     118              :     }
+     119              : 
+     120              :     return true;
+     121              :   }
+     122              : 
+     123            0 :   static bool isValidRespondAuthenticate({
+     124              :     required int id,
+     125              :     required Map<int, PendingSessionAuthRequest> pendingRequests,
+     126              :     List<Cacao>? auths,
+     127              :   }) {
+     128            0 :     if (!pendingRequests.containsKey(id)) {
+     129            0 :       throw Errors.getInternalError(
+     130              :         Errors.MISSING_OR_INVALID,
+     131              :         context:
+     132            0 :             'approveSessionAuthenticate() Could not find pending auth request with id $id',
+     133              :       );
+     134              :     }
+     135              : 
+     136            0 :     if (auths == null || auths.isEmpty) {
+     137            0 :       throw Errors.getInternalError(
+     138              :         Errors.MISSING_OR_INVALID,
+     139              :         context:
+     140              :             'approveSessionAuthenticate() invalid response. Must contain Cacao signatures.',
+     141              :       );
+     142              :     }
+     143              : 
+     144              :     return true;
+     145              :   }
+     146              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html new file mode 100644 index 00000000..cafb4812 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_signature.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html new file mode 100644 index 00000000..01e3c1fe --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_signature.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html new file mode 100644 index 00000000..eef1f8b8 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html @@ -0,0 +1,375 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_signature.dartCoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:typed_data';
+       3              : import 'package:convert/convert.dart';
+       4              : import 'package:http/http.dart' as http;
+       5              : 
+       6              : import 'package:pointycastle/digests/keccak.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
+       8              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
+      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
+      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
+      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart';
+      13              : import 'package:web3dart/crypto.dart' as crypto;
+      14              : 
+      15              : class AuthSignature {
+      16            9 :   static final KeccakDigest keccakDigest = KeccakDigest(256);
+      17            3 :   static Uint8List keccak256(Uint8List input) {
+      18            6 :     keccakDigest.reset();
+      19            6 :     return keccakDigest.process(input);
+      20              :   }
+      21              : 
+      22            3 :   static Uint8List hashMessage(String message) {
+      23            3 :     return keccak256(
+      24            3 :       Uint8List.fromList(
+      25            3 :         utf8.encode(
+      26            3 :           [
+      27              :             '\x19Ethereum Signed Message:\n',
+      28            6 :             message.length.toString(),
+      29              :             message,
+      30            3 :           ].join(),
+      31              :         ),
+      32              :       ),
+      33              :     );
+      34              :   }
+      35              : 
+      36            3 :   static int getNormalizedV(int v) {
+      37            6 :     if (v == 0 || v == 27) {
+      38              :       return 27;
+      39              :     }
+      40            6 :     if (v == 1 || v == 28) {
+      41              :       return 28;
+      42              :     }
+      43            0 :     return v & 1 == 1 ? 27 : 28;
+      44              :   }
+      45              : 
+      46            3 :   static bool isValidEip191Signature(
+      47              :     String address,
+      48              :     String message,
+      49              :     String sig,
+      50              :   ) {
+      51              :     // Get the sig bytes
+      52              :     // print(sig);
+      53            3 :     final sigBytes = Uint8List.fromList(
+      54            6 :       hex.decode(sig.substring(2)),
+      55              :     );
+      56              : 
+      57              :     // If the sig bytes aren't 65 bytes long, throw an error
+      58            6 :     if (sigBytes.length != 65) {
+      59            0 :       throw Exception('Invalid signature length');
+      60              :     }
+      61              : 
+      62              :     // Get the r and s values from the sig bytes
+      63            3 :     final r = BigInt.parse(
+      64            6 :       hex.encode(sigBytes.sublist(0, 32)),
+      65              :       radix: 16,
+      66              :     );
+      67            3 :     final s = BigInt.parse(
+      68            6 :       hex.encode(sigBytes.sublist(32, 64)),
+      69              :       radix: 16,
+      70              :     );
+      71              :     // print(sigBytes[64]);
+      72            6 :     final v = getNormalizedV(sigBytes[64]);
+      73              :     // print(r);
+      74              :     // print(s);
+      75              :     // print(v);
+      76              : 
+      77              :     // // Recover the public key from the signature
+      78              :     // Uint8List? publicKeyBytes = AuthSecp256k1.recoverPublicKeyFromSignature(
+      79              :     //   v - 27,
+      80              :     //   r,
+      81              :     //   s,
+      82              :     //   hashMessage(message),
+      83              :     // );
+      84              : 
+      85              :     // // If the public key is null, return false
+      86              :     // if (publicKeyBytes == null) {
+      87              :     //   print('Could not derive publicKey');
+      88              :     //   return false;
+      89              :     // }
+      90              : 
+      91              :     // Convert the public key to an address
+      92            3 :     final publicKeyBytes = crypto.ecRecover(
+      93            3 :       hashMessage(message),
+      94            3 :       crypto.MsgSignature(r, s, v),
+      95              :     );
+      96              :     // print(hex.encode(publicKeyBytes));
+      97            3 :     final hashedPubKeyBytes = keccak256(publicKeyBytes);
+      98            3 :     final addressBytes = hashedPubKeyBytes.sublist(12, 32);
+      99            6 :     final recoveredAddress = '0x${hex.encode(addressBytes)}';
+     100              : 
+     101              :     // final String recoveredAddress = EthSigUtil.recoverSignature(
+     102              :     //   signature: sig,
+     103              :     //   message: hashMessage(message),
+     104              :     //   //  Uint8List.fromList(
+     105              :     //   //   ascii.encode(message),
+     106              :     //   // ),
+     107              :     // );
+     108              : 
+     109              :     // print(recoveredAddress.toLowerCase());
+     110              :     // print(address.toLowerCase());
+     111              : 
+     112            9 :     return recoveredAddress.toLowerCase() == address.toLowerCase();
+     113              :   }
+     114              : 
+     115            0 :   static Future<bool> isValidEip1271Signature(
+     116              :     String address,
+     117              :     String reconstructedMessage,
+     118              :     String cacaoSignature,
+     119              :     String chainId,
+     120              :     String projectId,
+     121              :   ) async {
+     122              :     try {
+     123              :       const String eip1271MagicValue = '0x1626ba7e';
+     124              :       const String dynamicTypeOffset =
+     125              :           '0000000000000000000000000000000000000000000000000000000000000040';
+     126              :       const String dynamicTypeLength =
+     127              :           '0000000000000000000000000000000000000000000000000000000000000041';
+     128            0 :       final String nonPrefixedSignature = cacaoSignature.substring(2);
+     129              :       final String nonPrefixedHashedMessage =
+     130            0 :           hex.encode(hashMessage(reconstructedMessage)).substring(2);
+     131              : 
+     132            0 :       final String data = eip1271MagicValue +
+     133            0 :           nonPrefixedHashedMessage +
+     134            0 :           dynamicTypeOffset +
+     135            0 :           dynamicTypeLength +
+     136              :           nonPrefixedSignature;
+     137              : 
+     138            0 :       final Uri url = Uri.parse(
+     139            0 :         '${AuthConstants.AUTH_DEFAULT_URL}/?chainId=$chainId&projectId=$projectId',
+     140              :       );
+     141            0 :       final Map<String, dynamic> body = JsonRpcUtils.formatJsonRpcRequest(
+     142              :         'eth_call',
+     143            0 :         {
+     144              :           'to': address,
+     145              :           'data': data,
+     146              :         },
+     147              :       );
+     148              : 
+     149            0 :       final http.Response response = await http.post(
+     150              :         url,
+     151              :         body: body,
+     152              :       );
+     153              : 
+     154              :       // print(response.body);
+     155              :       // final jsonBody = jsonDecode(response.body);
+     156              :       final String recoveredValue =
+     157            0 :           response.body.substring(0, eip1271MagicValue.length);
+     158            0 :       return recoveredValue.toLowerCase() == eip1271MagicValue.toLowerCase();
+     159              :     } catch (e) {
+     160              :       return false;
+     161              :     }
+     162              :   }
+     163              : 
+     164              :   // verifies CACAO signature
+     165              :   // Used by the wallet after formatting the message
+     166            3 :   static Future<bool> verifySignature(
+     167              :     String address,
+     168              :     String reconstructedMessage,
+     169              :     CacaoSignature cacaoSignature,
+     170              :     String chainId,
+     171              :     String projectId,
+     172              :   ) async {
+     173            6 :     if (cacaoSignature.t == 'eip191') {
+     174            3 :       return isValidEip191Signature(
+     175              :         address,
+     176              :         reconstructedMessage,
+     177            3 :         cacaoSignature.s,
+     178              :       );
+     179            0 :     } else if (cacaoSignature.t == 'eip1271') {
+     180            0 :       return await isValidEip1271Signature(
+     181              :         address,
+     182              :         reconstructedMessage,
+     183            0 :         cacaoSignature.s,
+     184              :         chainId,
+     185              :         projectId,
+     186              :       );
+     187              :     } else {
+     188            0 :       throw Exception(
+     189            0 :         'verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${cacaoSignature.t}',
+     190              :       );
+     191              :     }
+     192              :   }
+     193              : 
+     194            0 :   static Cacao buildAuthObject({
+     195              :     required CacaoRequestPayload requestPayload,
+     196              :     required CacaoSignature signature,
+     197              :     required String iss,
+     198              :   }) {
+     199            0 :     if (!iss.contains('did:pkh:')) {
+     200            0 :       iss = 'did:pkh:$iss';
+     201              :     }
+     202            0 :     return Cacao(
+     203              :       h: const CacaoHeader(t: CacaoHeader.CAIP122),
+     204            0 :       p: CacaoPayload.fromRequestPayload(
+     205              :         issuer: iss,
+     206              :         payload: requestPayload,
+     207              :       ),
+     208              :       s: signature,
+     209              :     );
+     210              :   }
+     211              : 
+     212            0 :   static SessionAuthPayload populateAuthPayload({
+     213              :     required SessionAuthPayload authPayload,
+     214              :     required List<String> chains,
+     215              :     required List<String> methods,
+     216              :   }) {
+     217            0 :     final statement = authPayload.statement ?? '';
+     218              : 
+     219            0 :     if (chains.isEmpty) return authPayload;
+     220              : 
+     221            0 :     final requested = authPayload.chains;
+     222              :     final supported = chains;
+     223              : 
+     224              :     final approvedChains =
+     225            0 :         supported.where((value) => requested.contains(value)).toList();
+     226            0 :     if (approvedChains.isEmpty) {
+     227            0 :       throw WalletConnectError(code: -1, message: 'No supported chains');
+     228              :     }
+     229              : 
+     230            0 :     final requestedRecaps = ReCapsUtils.getDecodedRecapFromResources(
+     231            0 :       resources: authPayload.resources,
+     232              :     );
+     233              :     if (requestedRecaps == null) return authPayload;
+     234              : 
+     235            0 :     ReCapsUtils.isValidRecap(requestedRecaps);
+     236              : 
+     237            0 :     final resource = ReCapsUtils.getRecapResource(
+     238              :       recap: requestedRecaps,
+     239              :       resource: 'eip155',
+     240              :     );
+     241            0 :     List<String> updatedResources = authPayload.resources ?? [];
+     242              : 
+     243            0 :     if (resource.isNotEmpty) {
+     244            0 :       final actions = ReCapsUtils.getReCapActions(abilities: resource);
+     245              :       final approvedActions =
+     246            0 :           actions.where((value) => methods.contains(value)).toList();
+     247            0 :       if (approvedActions.isEmpty) {
+     248            0 :         throw WalletConnectError(
+     249            0 :           code: -1,
+     250            0 :           message: 'Supported methods don\'t satisfy the requested: $actions, '
+     251              :               'supported: $methods',
+     252              :         );
+     253              :       }
+     254            0 :       final formattedActions = ReCapsUtils.assignAbilityToActions(
+     255              :         'request',
+     256              :         approvedActions,
+     257            0 :         limits: {'chains': approvedChains},
+     258              :       );
+     259            0 :       final updatedRecap = ReCapsUtils.addResourceToRecap(
+     260              :         recap: requestedRecaps,
+     261              :         resource: 'eip155',
+     262              :         actions: formattedActions,
+     263              :       );
+     264              :       // remove recap from resources as we will add the updated one
+     265            0 :       updatedResources = List<String>.from((authPayload.resources ?? []))
+     266            0 :         ..removeLast();
+     267            0 :       updatedResources.add(ReCapsUtils.encodeRecap(updatedRecap));
+     268              :     }
+     269              :     //
+     270            0 :     return SessionAuthPayload.fromJson(authPayload.toJson()).copyWith(
+     271            0 :       statement: ReCapsUtils.buildRecapStatement(
+     272              :         statement,
+     273            0 :         ReCapsUtils.getRecapFromResources(resources: updatedResources),
+     274              :       ),
+     275              :       chains: approvedChains,
+     276            0 :       resources: updatedResources.isNotEmpty ? updatedResources : null,
+     277              :     );
+     278              :   }
+     279              : 
+     280            1 :   static String getAddressFromMessage(String message) {
+     281              :     try {
+     282            1 :       final regexp = RegExp('0x[a-fA-F0-9]{40}');
+     283            1 :       final matches = regexp.allMatches(message);
+     284            2 :       for (final Match m in matches) {
+     285            1 :         return m[0]!;
+     286              :       }
+     287              :       return '';
+     288              :     } catch (_) {}
+     289              :     return '';
+     290              :   }
+     291              : 
+     292            1 :   static String getChainIdFromMessage(String message) {
+     293              :     try {
+     294              :       final pattern = 'Chain ID: ';
+     295            2 :       final regexp = RegExp('$pattern(?<temp1>\\d+)');
+     296            1 :       final matches = regexp.allMatches(message);
+     297            2 :       for (final Match m in matches) {
+     298            3 :         return m[0]!.toString().replaceAll(pattern, '');
+     299              :       }
+     300              :     } catch (_) {}
+     301              :     return '';
+     302              :   }
+     303              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html new file mode 100644 index 00000000..18d315ed --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html new file mode 100644 index 00000000..08898c58 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html new file mode 100644 index 00000000..e42ee3a1 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html @@ -0,0 +1,77 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - auth_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : class AuthUtils {
+       2            3 :   static String generateNonce() {
+       3            9 :     return DateTime.now().millisecondsSinceEpoch.toString();
+       4              :   }
+       5              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/index-sort-f.html b/coverage/html/sign_api/utils/auth/index-sort-f.html new file mode 100644 index 00000000..c98322d5 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/index-sort-f.html @@ -0,0 +1,153 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
address_utils.dart +
66.7%66.7%
+
66.7 %64-
auth_api_validators.dart +
45.5%45.5%
+
45.5 %4420-
auth_signature.dart +
44.4%44.4%
+
44.4 %9944-
auth_utils.dart +
100.0%
+
100.0 %22-
recaps_utils.dart +
0.0%
+
0.0 %169-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/index-sort-l.html b/coverage/html/sign_api/utils/auth/index-sort-l.html new file mode 100644 index 00000000..87f2a26b --- /dev/null +++ b/coverage/html/sign_api/utils/auth/index-sort-l.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
recaps_utils.dart +
0.0%
+
0.0 %169
auth_signature.dart +
44.4%44.4%
+
44.4 %9944
auth_api_validators.dart +
45.5%45.5%
+
45.5 %4420
address_utils.dart +
66.7%66.7%
+
66.7 %64
auth_utils.dart +
100.0%
+
100.0 %22
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/index.html b/coverage/html/sign_api/utils/auth/index.html new file mode 100644 index 00000000..40a1bb06 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/index.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
address_utils.dart +
66.7%66.7%
+
66.7 %64
auth_api_validators.dart +
45.5%45.5%
+
45.5 %4420
auth_signature.dart +
44.4%44.4%
+
44.4 %9944
auth_utils.dart +
100.0%
+
100.0 %22
recaps_utils.dart +
0.0%
+
0.0 %169
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html new file mode 100644 index 00000000..12c1e693 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - recaps_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html new file mode 100644 index 00000000..07179f7f --- /dev/null +++ b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - recaps_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html new file mode 100644 index 00000000..801ed432 --- /dev/null +++ b/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html @@ -0,0 +1,420 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils/auth - recaps_utils.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : 
+       3              : import 'package:flutter/foundation.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+       5              : 
+       6              : class ReCapsUtils {
+       7              :   //
+       8            0 :   static String? getRecapFromResources({List<String>? resources}) {
+       9            0 :     final resourcesList = resources ?? [];
+      10            0 :     if (resourcesList.isEmpty) return null;
+      11              :     // per spec, recap is always the last resource
+      12            0 :     final recap = resourcesList.last;
+      13            0 :     return isRecap(recap) ? recap : null;
+      14              :   }
+      15              : 
+      16            0 :   static bool isRecap(String resource) {
+      17            0 :     return resource.contains('urn:recap:');
+      18              :   }
+      19              : 
+      20            0 :   static List<String> getMethodsFromRecap(String recap) {
+      21            0 :     final decodedRecap = decodeRecap(recap);
+      22            0 :     if (!isValidRecap(decodedRecap)) return [];
+      23              : 
+      24              :     try {
+      25              :       // methods are only available for eip155 as per the current implementation
+      26            0 :       final resource = decodedRecap['att']?['eip155'] as Map<String, dynamic>?;
+      27            0 :       if (resource == null) return [];
+      28              : 
+      29            0 :       return resource.keys.map((k) => k.split('/').last).toList();
+      30              :     } catch (e) {
+      31            0 :       return [];
+      32              :     }
+      33              :   }
+      34              : 
+      35            0 :   static List<String> getChainsFromRecap(String recap) {
+      36            0 :     final decodedRecap = decodeRecap(recap);
+      37            0 :     if (!isValidRecap(decodedRecap)) return [];
+      38              : 
+      39            0 :     final List<dynamic> recapChains = [];
+      40              :     try {
+      41              :       final att =
+      42            0 :           decodedRecap['att'] as Map<String, dynamic>? ?? <String, dynamic>{};
+      43              : 
+      44            0 :       for (var resources in att.values) {
+      45              :         final resourcesMap = resources as Map<String, dynamic>;
+      46            0 :         final resourcesValues = resourcesMap.values.first as List;
+      47            0 :         for (var value in resourcesValues) {
+      48              :           final chainValues = value as Map<String, dynamic>;
+      49            0 :           final chains = chainValues['chains'] as List;
+      50            0 :           recapChains.addAll(chains);
+      51              :         }
+      52              :       }
+      53            0 :       return recapChains.map((e) => e.toString()).toSet().toList();
+      54              :     } catch (e) {
+      55            0 :       return [];
+      56              :     }
+      57              :   }
+      58              : 
+      59            0 :   static Map<String, dynamic> decodeRecap(String recap) {
+      60              :     // Add the padding that was removed during encoding
+      61            0 :     String paddedRecap = recap.replaceAll('urn:recap:', '');
+      62            0 :     final padding = paddedRecap.length % 4;
+      63            0 :     if (padding > 0) {
+      64            0 :       paddedRecap += '=' * (4 - padding);
+      65              :     }
+      66              : 
+      67            0 :     final decoded = utf8.decode(base64.decode(paddedRecap));
+      68            0 :     final decodedRecap = jsonDecode(decoded) as Map<String, dynamic>;
+      69            0 :     isValidRecap(decodedRecap);
+      70              :     return decodedRecap;
+      71              :   }
+      72              : 
+      73            0 :   static bool isValidRecap(Map<String, dynamic> recap) {
+      74            0 :     final att = recap['att'] as Map<String, dynamic>?;
+      75              :     if (att == null) {
+      76            0 :       throw Errors.getInternalError(
+      77              :         Errors.MISSING_OR_INVALID,
+      78              :         context: 'Invalid ReCap. No `att` property found',
+      79              :       );
+      80              :     }
+      81              :     //
+      82            0 :     final resources = att.keys;
+      83            0 :     if (resources.isEmpty) {
+      84            0 :       throw Errors.getInternalError(
+      85              :         Errors.MISSING_OR_INVALID,
+      86              :         context: 'Invalid ReCap. No resources found in `att` property',
+      87              :       );
+      88              :     }
+      89              :     //
+      90            0 :     for (var resource in resources) {
+      91            0 :       final abilities = att[resource];
+      92            0 :       if (abilities is! Map) {
+      93            0 :         throw Errors.getInternalError(
+      94              :           Errors.MISSING_OR_INVALID,
+      95            0 :           context: 'Invalid ReCap. Resource must be an object: $resource',
+      96              :         );
+      97              :       }
+      98            0 :       final resourceAbilities = (abilities as Map<String, dynamic>).keys;
+      99            0 :       if (resourceAbilities.isEmpty) {
+     100            0 :         throw Errors.getInternalError(
+     101              :           Errors.MISSING_OR_INVALID,
+     102            0 :           context: 'Invalid ReCap. Resource object is empty: $resource',
+     103              :         );
+     104              :       }
+     105              :       //
+     106            0 :       for (var ability in resourceAbilities) {
+     107            0 :         final limits = abilities[ability];
+     108            0 :         if (limits is! List) {
+     109            0 :           throw Errors.getInternalError(
+     110              :             Errors.MISSING_OR_INVALID,
+     111            0 :             context: 'Invalid ReCap. Ability limits $ability must be an array '
+     112              :                 'of objects, found: $limits',
+     113              :           );
+     114              :         }
+     115            0 :         if ((limits).isEmpty) {
+     116            0 :           throw Errors.getInternalError(
+     117              :             Errors.MISSING_OR_INVALID,
+     118            0 :             context: 'Invalid ReCap. Value of $ability is empty array, must be '
+     119              :                 'an array with objects',
+     120              :           );
+     121              :         }
+     122              :         //
+     123            0 :         for (var limit in limits) {
+     124            0 :           if (limit is! Map) {
+     125            0 :             throw Errors.getInternalError(
+     126              :               Errors.MISSING_OR_INVALID,
+     127            0 :               context:
+     128              :                   'Invalid ReCap. Ability limits ($ability) must be an array '
+     129              :                   'of objects, found: $limit',
+     130              :             );
+     131              :           }
+     132              :         }
+     133              :       }
+     134              :     }
+     135              : 
+     136              :     return true;
+     137              :   }
+     138              : 
+     139            0 :   static String createEncodedRecap(
+     140              :     String namespace,
+     141              :     String ability,
+     142              :     List<String> methods,
+     143              :   ) {
+     144            0 :     final recap = createRecap(namespace, ability, methods);
+     145            0 :     return encodeRecap(recap);
+     146              :   }
+     147              : 
+     148            0 :   static String encodeRecap(Map<String, dynamic> recap) {
+     149            0 :     isValidRecap(recap);
+     150            0 :     final jsonRecap = jsonEncode(recap);
+     151            0 :     final bytes = utf8.encode(jsonRecap).toList();
+     152              :     // remove the padding from the base64 string as per recap spec
+     153            0 :     return 'urn:recap:${base64.encode(bytes).replaceAll('=', '')}';
+     154              :   }
+     155              : 
+     156            0 :   static Map<String, dynamic> createRecap(
+     157              :     String namespace,
+     158              :     String ability,
+     159              :     List<String> methods, {
+     160              :     Map limits = const {},
+     161              :   }) {
+     162              :     try {
+     163            0 :       final sortedMethods = List<String>.from(methods)
+     164            0 :         ..sort((a, b) => a.compareTo(b));
+     165              : 
+     166            0 :       Map<String, dynamic> abilities = {};
+     167            0 :       for (var method in sortedMethods) {
+     168            0 :         abilities['$ability/$method'] = [
+     169            0 :           ...(abilities['$ability/$method'] ?? []),
+     170            0 :           limits,
+     171              :         ];
+     172              :       }
+     173              : 
+     174            0 :       return {
+     175            0 :         'att': {
+     176            0 :           namespace: Map<String, dynamic>.fromEntries(abilities.entries),
+     177              :         }
+     178              :       };
+     179              :     } catch (e) {
+     180              :       rethrow;
+     181              :     }
+     182              :   }
+     183              : 
+     184            0 :   static String mergeEncodedRecaps(String recap1, String recap2) {
+     185            0 :     final decoded1 = decodeRecap(recap1);
+     186            0 :     final decoded2 = decodeRecap(recap2);
+     187            0 :     final merged = mergeRecaps(decoded1, decoded2);
+     188            0 :     return encodeRecap(merged);
+     189              :   }
+     190              : 
+     191            0 :   static Map<String, dynamic> mergeRecaps(
+     192              :     Map<String, dynamic> recap1,
+     193              :     Map<String, dynamic> recap2,
+     194              :   ) {
+     195            0 :     isValidRecap(recap1);
+     196            0 :     isValidRecap(recap2);
+     197            0 :     final att1 = recap1['att'] as Map<String, dynamic>;
+     198            0 :     final att2 = recap2['att'] as Map<String, dynamic>;
+     199            0 :     final keys = [...att1.keys, ...att2.keys]..sort(
+     200            0 :         (a, b) => a.compareTo(b),
+     201              :       );
+     202            0 :     final mergedRecap = {'att': {}};
+     203              : 
+     204            0 :     for (var key in keys) {
+     205            0 :       final actions1 = att1[key] as Map<String, dynamic>? ?? {};
+     206            0 :       final actions1Keys = actions1.keys;
+     207            0 :       final actions2 = att2[key] as Map<String, dynamic>? ?? {};
+     208            0 :       final actions2Keys = actions2.keys;
+     209            0 :       final actions = [...actions1Keys, ...actions2Keys]..sort(
+     210            0 :           (a, b) => a.compareTo(b),
+     211              :         );
+     212              : 
+     213            0 :       for (var action in actions) {
+     214            0 :         mergedRecap['att']![key] = {
+     215            0 :           ...mergedRecap['att']?[key],
+     216            0 :           [action]: recap1['att'][key]?[action] || recap2['att'][key]?[action],
+     217              :         };
+     218              :       }
+     219              :     }
+     220              : 
+     221              :     return mergedRecap;
+     222              :   }
+     223              : 
+     224            0 :   static Map<String, dynamic>? getDecodedRecapFromResources({
+     225              :     List<String>? resources,
+     226              :   }) {
+     227            0 :     final resource = getRecapFromResources(resources: resources);
+     228              :     if (resource == null) return null;
+     229            0 :     if (!isRecap(resource)) return null;
+     230            0 :     return decodeRecap(resource);
+     231              :   }
+     232              : 
+     233            0 :   static String formatStatementFromRecap({
+     234              :     String statement = '',
+     235              :     Map<String, dynamic> recap = const {},
+     236              :   }) {
+     237            0 :     isValidRecap(recap);
+     238              :     //
+     239              :     final baseStatement =
+     240              :         'I further authorize the stated URI to perform the following actions on my behalf: ';
+     241            0 :     if (statement.contains(baseStatement)) return statement;
+     242              :     //
+     243            0 :     final List<String> statementForRecap = <String>[];
+     244              :     int currentCounter = 0;
+     245            0 :     final att = recap['att'] as Map<String, dynamic>;
+     246            0 :     final resources = att.keys;
+     247            0 :     for (var resource in resources) {
+     248            0 :       final abilities = att[resource];
+     249            0 :       final resourceAbilities = (abilities as Map<String, dynamic>).keys;
+     250            0 :       final actions = resourceAbilities.map((ability) {
+     251            0 :         return {
+     252            0 :           'ability': ability.split('/')[0],
+     253            0 :           'action': ability.split('/')[1],
+     254              :         };
+     255            0 :       }).toList();
+     256            0 :       actions.sort((a, b) => a['action']!.compareTo(b['action']!));
+     257              :       //
+     258            0 :       final uniqueAbilities = <String, dynamic>{};
+     259            0 :       for (var actionMap in actions) {
+     260            0 :         final ability = actionMap['ability']!;
+     261            0 :         final action = actionMap['action']!;
+     262            0 :         if (uniqueAbilities[ability] == null) {
+     263            0 :           uniqueAbilities[ability] = [];
+     264              :         }
+     265            0 :         uniqueAbilities[ability].add(action);
+     266              :       }
+     267              :       //
+     268            0 :       final abilitiesStatements = uniqueAbilities.keys.map((ability) {
+     269            0 :         currentCounter++;
+     270            0 :         final abilities = (uniqueAbilities[ability] as List).join('\', \'');
+     271            0 :         return '($currentCounter) \'$ability\': \'$abilities\' for \'$resource\'.';
+     272            0 :       }).toList();
+     273              : 
+     274            0 :       statementForRecap.add(
+     275            0 :         abilitiesStatements.join(', ').replaceAll('.,', '.'),
+     276              :       );
+     277              :     }
+     278              :     //
+     279            0 :     final recapStatemet = statementForRecap.join(' ');
+     280            0 :     final recapStatement = '$baseStatement$recapStatemet';
+     281              :     // add a space if there is a statement
+     282            0 :     return '${statement.isNotEmpty ? "$statement " : ""}$recapStatement';
+     283              :   }
+     284              : 
+     285            0 :   static List<String> getRecapResource({
+     286              :     required Map<String, dynamic> recap,
+     287              :     required String resource,
+     288              :   }) {
+     289              :     try {
+     290            0 :       final att = recap['att'] as Map<String, dynamic>?;
+     291            0 :       final abilities = att?[resource] as Map<String, dynamic>?;
+     292              :       if (abilities != null) {
+     293            0 :         return abilities.keys.toList();
+     294              :       }
+     295              :     } catch (e) {
+     296            0 :       debugPrint(e.toString());
+     297              :     }
+     298            0 :     return [];
+     299              :   }
+     300              : 
+     301            0 :   static List<String> getReCapActions({required List<String> abilities}) {
+     302              :     try {
+     303            0 :       return abilities.map((ability) => ability.split('/')[1]).toList();
+     304              :     } catch (e) {
+     305            0 :       debugPrint(e.toString());
+     306              :     }
+     307            0 :     return [];
+     308              :   }
+     309              : 
+     310            0 :   static Map<String, dynamic> assignAbilityToActions(
+     311              :     String ability,
+     312              :     List<String> actions, {
+     313              :     Map limits = const {},
+     314              :   }) {
+     315            0 :     final sortedActions = List<String>.from(actions)
+     316            0 :       ..sort((a, b) => a.compareTo(b));
+     317              : 
+     318            0 :     Map<String, dynamic> abilities = {};
+     319            0 :     for (var method in sortedActions) {
+     320            0 :       abilities['$ability/$method'] = [
+     321            0 :         ...(abilities['$ability/$method'] ?? []),
+     322            0 :         limits,
+     323              :       ];
+     324              :     }
+     325              : 
+     326            0 :     return Map<String, dynamic>.fromEntries(abilities.entries);
+     327              :   }
+     328              : 
+     329            0 :   static Map<String, dynamic> addResourceToRecap({
+     330              :     required Map<String, dynamic> recap,
+     331              :     required String resource,
+     332              :     required Map<String, dynamic> actions,
+     333              :   }) {
+     334              :     //
+     335            0 :     final sortedRecap = Map<String, dynamic>.from(recap);
+     336            0 :     sortedRecap['att']![resource] = actions;
+     337            0 :     sortedRecap.keys.toList().sort((a, b) => a.compareTo(b));
+     338            0 :     isValidRecap(sortedRecap);
+     339              :     return sortedRecap;
+     340              :   }
+     341              : 
+     342            0 :   static String buildRecapStatement(String statement, String? recap) {
+     343            0 :     if ((recap ?? '').isEmpty) return statement;
+     344            0 :     final decoded = decodeRecap(recap!);
+     345            0 :     isValidRecap(decoded);
+     346            0 :     return formatStatementFromRecap(statement: statement, recap: decoded);
+     347              :   }
+     348              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html b/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html new file mode 100644 index 00000000..fff10874 --- /dev/null +++ b/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/custom_credentials.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - custom_credentials.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.func.html b/coverage/html/sign_api/utils/custom_credentials.dart.func.html new file mode 100644 index 00000000..f0561ad3 --- /dev/null +++ b/coverage/html/sign_api/utils/custom_credentials.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/custom_credentials.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - custom_credentials.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html b/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html new file mode 100644 index 00000000..2dd62329 --- /dev/null +++ b/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html @@ -0,0 +1,152 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/custom_credentials.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - custom_credentials.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:typed_data';
+       3              : 
+       4              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       5              : import 'package:web3dart/crypto.dart' as crypto;
+       6              : 
+       7              : class CustomCredentials extends CustomTransactionSender {
+       8            0 :   CustomCredentials({
+       9              :     required ISignEngine signEngine,
+      10              :     required String topic,
+      11              :     required String chainId,
+      12              :     required EthereumAddress address,
+      13              :     String? method,
+      14              :   })  : _signEngine = signEngine,
+      15              :         _topic = topic,
+      16              :         _chainId = chainId,
+      17              :         _address = address,
+      18              :         _method = method;
+      19              : 
+      20              :   final ISignEngine _signEngine;
+      21              :   final String _topic;
+      22              :   final String _chainId;
+      23              :   final EthereumAddress _address;
+      24              :   final String? _method;
+      25              : 
+      26            0 :   @override
+      27            0 :   EthereumAddress get address => _address;
+      28              : 
+      29            0 :   @override
+      30              :   Future<String> sendTransaction(Transaction transaction) async {
+      31            0 :     final result = await _sendTransaction(transaction);
+      32            0 :     if (result is Map) {
+      33            0 :       return jsonEncode(result);
+      34              :     }
+      35            0 :     return result.toString();
+      36              :   }
+      37              : 
+      38            0 :   Future<dynamic> _sendTransaction(Transaction transaction) async {
+      39            0 :     final sessionRequestParams = SessionRequestParams(
+      40            0 :       method: _method ?? MethodsConstants.ethSendTransaction,
+      41            0 :       params: [
+      42            0 :         transaction.toJson(),
+      43              :       ],
+      44              :     );
+      45              : 
+      46            0 :     final result = await _signEngine.request(
+      47            0 :       topic: _topic,
+      48            0 :       chainId: _chainId,
+      49              :       request: sessionRequestParams,
+      50              :     );
+      51              :     return result;
+      52              :   }
+      53              : 
+      54            0 :   @override
+      55            0 :   Future<EthereumAddress> extractAddress() => Future.value(_address);
+      56              : 
+      57            0 :   @override
+      58              :   Future<crypto.MsgSignature> signToSignature(
+      59              :     Uint8List payload, {
+      60              :     int? chainId,
+      61              :     bool isEIP1559 = false,
+      62              :   }) {
+      63            0 :     final signature = signToEcSignature(
+      64              :       payload,
+      65              :       chainId: chainId,
+      66              :       isEIP1559: isEIP1559,
+      67              :     );
+      68            0 :     return Future.value(signature);
+      69              :   }
+      70              : 
+      71            0 :   @override
+      72              :   crypto.MsgSignature signToEcSignature(
+      73              :     Uint8List payload, {
+      74              :     int? chainId,
+      75              :     bool isEIP1559 = false,
+      76              :   }) {
+      77              :     // TODO: implement signToEcSignature
+      78            0 :     throw UnimplementedError();
+      79              :   }
+      80              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/index-sort-f.html b/coverage/html/sign_api/utils/index-sort-f.html new file mode 100644 index 00000000..a9e826ab --- /dev/null +++ b/coverage/html/sign_api/utils/index-sort-f.html @@ -0,0 +1,117 @@ + + + + + + + LCOV - lcov.info - sign_api/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
custom_credentials.dart +
0.0%
+
0.0 %23-
sign_api_validator_utils.dart +
100.0%
+
100.0 %9696-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/index-sort-l.html b/coverage/html/sign_api/utils/index-sort-l.html new file mode 100644 index 00000000..6943d71d --- /dev/null +++ b/coverage/html/sign_api/utils/index-sort-l.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - sign_api/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
custom_credentials.dart +
0.0%
+
0.0 %23
sign_api_validator_utils.dart +
100.0%
+
100.0 %9696
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/index.html b/coverage/html/sign_api/utils/index.html new file mode 100644 index 00000000..b11ed9f3 --- /dev/null +++ b/coverage/html/sign_api/utils/index.html @@ -0,0 +1,100 @@ + + + + + + + LCOV - lcov.info - sign_api/utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
custom_credentials.dart +
0.0%
+
0.0 %23
sign_api_validator_utils.dart +
100.0%
+
100.0 %9696
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html new file mode 100644 index 00000000..9b4a7023 --- /dev/null +++ b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - sign_api_validator_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html new file mode 100644 index 00000000..82c1a14c --- /dev/null +++ b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - sign_api_validator_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html new file mode 100644 index 00000000..a53abd39 --- /dev/null +++ b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html @@ -0,0 +1,396 @@ + + + + + + + LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - sign_api/utils - sign_api_validator_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/utils/namespace_utils.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
+       5              : 
+       6              : class SignApiValidatorUtils {
+       7            6 :   static bool isContainedIn({
+       8              :     required List<dynamic> container,
+       9              :     required List<dynamic> contained,
+      10              :   }) {
+      11              :     List<dynamic> matches = contained
+      12            6 :         .where(
+      13           12 :           (x) => container.contains(x),
+      14              :         )
+      15            6 :         .toList();
+      16           18 :     return matches.length == contained.length;
+      17              :   }
+      18              : 
+      19              :   /// This function will throw an error if
+      20              :   /// 1. the nsOrChainId parameter is a chainId, and the chains param exists
+      21              :   /// 2. The list of chains contains an invalid chainId
+      22            5 :   static bool isValidChains({
+      23              :     required String nsOrChainId,
+      24              :     List<String>? chains,
+      25              :     required String context,
+      26              :   }) {
+      27              :     // If the key is a valid chain Id, then the chains should be empty
+      28            5 :     final bool isChainId = NamespaceUtils.isValidChainId(nsOrChainId);
+      29              :     if (isChainId) {
+      30            4 :       if (chains != null && chains.isNotEmpty) {
+      31            4 :         throw Errors.getSdkError(
+      32              :           Errors.UNSUPPORTED_CHAINS,
+      33            4 :           context: '$context, namespace is a chainId, but chains is not empty',
+      34              :         );
+      35              :       }
+      36              :     } else {
+      37           10 :       for (String c in chains!) {
+      38            5 :         if (!NamespaceUtils.isValidChainId(c)) {
+      39            1 :           throw Errors.getSdkError(
+      40              :             Errors.UNSUPPORTED_CHAINS,
+      41              :             context:
+      42            1 :                 '$context, chain $c should conform to "namespace:chainId" format',
+      43              :           );
+      44              :         }
+      45              :       }
+      46              :     }
+      47              : 
+      48              :     return true;
+      49              :   }
+      50              : 
+      51              :   /// Validates the data of the Required Namespaces, ensuring it conforms to CAIP-25
+      52            5 :   static bool isValidRequiredNamespaces({
+      53              :     required Map<String, RequiredNamespace> requiredNamespaces,
+      54              :     required String context,
+      55              :   }) {
+      56           10 :     requiredNamespaces.forEach((key, namespace) {
+      57            5 :       isValidChains(
+      58              :         nsOrChainId: key,
+      59            5 :         chains: namespace.chains,
+      60            5 :         context: '$context requiredNamespace',
+      61              :       );
+      62              :     });
+      63              : 
+      64              :     return true;
+      65              :   }
+      66              : 
+      67              :   /// Loops through each account, and validates it
+      68              :   /// Context is used to provide more information in the error message
+      69            5 :   static bool isValidAccounts({
+      70              :     required List<String> accounts,
+      71              :     required String context,
+      72              :   }) {
+      73           10 :     for (String account in accounts) {
+      74            5 :       if (!NamespaceUtils.isValidAccount(account)) {
+      75            4 :         throw Errors.getSdkError(
+      76              :           Errors.UNSUPPORTED_ACCOUNTS,
+      77              :           context:
+      78            4 :               '$context, account $account should conform to "namespace:chainId:address" format',
+      79              :         );
+      80              :       }
+      81              :     }
+      82              : 
+      83              :     return true;
+      84              :   }
+      85              : 
+      86              :   /// Validates the data of the Namespaces, ensuring it conforms to CAIP-25
+      87            5 :   static bool isValidNamespaces({
+      88              :     required Map<String, Namespace> namespaces,
+      89              :     required String context,
+      90              :   }) {
+      91           10 :     namespaces.forEach((key, namespace) {
+      92            5 :       isValidAccounts(
+      93            5 :         accounts: namespace.accounts,
+      94            5 :         context: '$context namespace',
+      95              :       );
+      96              :     });
+      97              : 
+      98              :     return true;
+      99              :   }
+     100              : 
+     101              :   /// Validates the provided chainId, then ensures that the chainId is contained
+     102              :   /// in the namespaces
+     103            4 :   static bool isValidNamespacesChainId({
+     104              :     required Map<String, Namespace> namespaces,
+     105              :     required String chainId,
+     106              :   }) {
+     107              :     // Validate the chainId
+     108            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
+     109            1 :       throw Errors.getSdkError(
+     110              :         Errors.UNSUPPORTED_CHAINS,
+     111            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
+     112              :       );
+     113              :     }
+     114              : 
+     115              :     // Validate the namespaces
+     116            4 :     isValidNamespaces(
+     117              :       namespaces: namespaces,
+     118              :       context: 'isValidNamespacesChainId',
+     119              :     );
+     120              : 
+     121              :     // Get the chains from the namespaces and
+     122            4 :     List<String> chains = NamespaceUtils.getChainIdsFromNamespaces(
+     123              :       namespaces: namespaces,
+     124              :     );
+     125              : 
+     126            4 :     if (!chains.contains(chainId)) {
+     127            4 :       throw Errors.getSdkError(
+     128              :         Errors.UNSUPPORTED_CHAINS,
+     129            4 :         context: 'The chain $chainId is not supported',
+     130              :       );
+     131              :     }
+     132              : 
+     133              :     return true;
+     134              :   }
+     135              : 
+     136              :   /// Validates the provided chainId, then gets the methods for that chainId
+     137              :   /// and ensures that the method request is contained in the methods
+     138            4 :   static bool isValidNamespacesRequest({
+     139              :     required Map<String, Namespace> namespaces,
+     140              :     required String chainId,
+     141              :     required String method,
+     142              :   }) {
+     143              :     // Validate the chainId
+     144            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
+     145            1 :       throw Errors.getSdkError(
+     146              :         Errors.UNSUPPORTED_CHAINS,
+     147            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
+     148              :       );
+     149              :     }
+     150              : 
+     151              :     // Validate the namespaces
+     152            4 :     isValidNamespaces(
+     153              :       namespaces: namespaces,
+     154              :       context: 'isValidNamespacesRequest',
+     155              :     );
+     156              : 
+     157            4 :     List<dynamic> methods = NamespaceUtils.getNamespacesMethodsForChainId(
+     158              :       namespaces: namespaces,
+     159              :       chainId: chainId,
+     160              :     );
+     161              : 
+     162            4 :     if (!methods.contains(method)) {
+     163            4 :       throw Errors.getSdkError(
+     164              :         Errors.UNSUPPORTED_METHODS,
+     165            4 :         context: 'The method $method is not supported',
+     166              :       );
+     167              :     }
+     168              : 
+     169              :     return true;
+     170              :   }
+     171              : 
+     172              :   /// Validates the provided chainId, then gets the events for that chainId
+     173              :   /// and ensures that the event request is contained in the events
+     174            4 :   static bool isValidNamespacesEvent({
+     175              :     required Map<String, Namespace> namespaces,
+     176              :     required String chainId,
+     177              :     required String eventName,
+     178              :   }) {
+     179              :     // Validate the chainId
+     180            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
+     181            1 :       throw Errors.getSdkError(
+     182              :         Errors.UNSUPPORTED_CHAINS,
+     183            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
+     184              :       );
+     185              :     }
+     186              : 
+     187              :     // Validate the namespaces
+     188            4 :     isValidNamespaces(
+     189              :       namespaces: namespaces,
+     190              :       context: 'isValidNamespacesEvent',
+     191              :     );
+     192              : 
+     193            4 :     List<dynamic> events = NamespaceUtils.getNamespacesEventsForChain(
+     194              :       namespaces: namespaces,
+     195              :       chainId: chainId,
+     196              :     );
+     197              : 
+     198            4 :     if (!events.contains(eventName)) {
+     199            4 :       throw Errors.getSdkError(
+     200              :         Errors.UNSUPPORTED_EVENTS,
+     201            4 :         context: 'The event $eventName is not supported',
+     202              :       );
+     203              :     }
+     204              : 
+     205              :     return true;
+     206              :   }
+     207              : 
+     208              :   /// Makes sure that the chains, methods and events of the required namespaces
+     209              :   /// are contained in the namespaces
+     210            6 :   static bool isConformingNamespaces({
+     211              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     212              :     required Map<String, Namespace> namespaces,
+     213              :     required String context,
+     214              :   }) {
+     215           12 :     List<String> requiredNamespaceKeys = requiredNamespaces.keys.toList();
+     216           12 :     List<String> namespaceKeys = namespaces.keys.toList();
+     217              : 
+     218              :     // If the namespaces doesn't have the correct keys, we can fail automatically
+     219            6 :     if (!isContainedIn(
+     220              :         container: namespaceKeys, contained: requiredNamespaceKeys)) {
+     221            4 :       throw Errors.getSdkError(
+     222              :         Errors.UNSUPPORTED_NAMESPACE_KEY,
+     223            4 :         context: "$context namespaces keys don't satisfy requiredNamespaces",
+     224              :       );
+     225              :     } else {
+     226           12 :       for (var key in requiredNamespaceKeys) {
+     227              :         List<String> requiredNamespaceChains =
+     228            6 :             NamespaceUtils.getChainsFromRequiredNamespace(
+     229              :           nsOrChainId: key,
+     230            6 :           requiredNamespace: requiredNamespaces[key]!,
+     231              :         );
+     232            6 :         List<String> namespaceChains = NamespaceUtils.getChainIdsFromNamespace(
+     233              :           nsOrChainId: key,
+     234            6 :           namespace: namespaces[key]!,
+     235              :         );
+     236              : 
+     237              :         // Check the chains, methods and events for overlaps.
+     238              :         // If any of them don't have it, we fail.
+     239            6 :         final bool chainsOverlap = isContainedIn(
+     240              :           container: namespaceChains,
+     241              :           contained: requiredNamespaceChains,
+     242              :         );
+     243            6 :         final bool methodsOverlap = isContainedIn(
+     244           12 :           container: namespaces[key]!.methods,
+     245           12 :           contained: requiredNamespaces[key]!.methods,
+     246              :         );
+     247            6 :         final bool eventsOverlap = isContainedIn(
+     248           12 :           container: namespaces[key]!.events,
+     249           12 :           contained: requiredNamespaces[key]!.events,
+     250              :         );
+     251              : 
+     252              :         if (!chainsOverlap) {
+     253            5 :           throw Errors.getSdkError(
+     254              :             Errors.UNSUPPORTED_CHAINS,
+     255              :             context:
+     256            5 :                 "$context namespaces chains don't satisfy requiredNamespaces chains for $key. Requested: $requiredNamespaceChains, Supported: $namespaceChains",
+     257              :           );
+     258              :         } else if (!methodsOverlap) {
+     259            2 :           throw Errors.getSdkError(
+     260              :             Errors.UNSUPPORTED_METHODS,
+     261              :             context:
+     262           10 :                 "$context namespaces methods don't satisfy requiredNamespaces methods for $key. Requested: ${requiredNamespaces[key]!.methods}, Supported: ${namespaces[key]!.methods}",
+     263              :           );
+     264              :         } else if (!eventsOverlap) {
+     265            2 :           throw Errors.getSdkError(
+     266              :             Errors.UNSUPPORTED_EVENTS,
+     267              :             context:
+     268           10 :                 "$context namespaces events don't satisfy requiredNamespaces events for $key. Requested: ${requiredNamespaces[key]!.events}, Supported: ${namespaces[key]!.events}",
+     269              :           );
+     270              :         }
+     271              :       }
+     272              :     }
+     273              : 
+     274              :     return true;
+     275              :   }
+     276              : 
+     277            4 :   static bool isSessionCompatible({
+     278              :     required SessionData session,
+     279              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     280              :   }) {
+     281           12 :     List<String> sessionKeys = session.namespaces.keys.toList();
+     282            8 :     List<String> paramsKeys = requiredNamespaces.keys.toList();
+     283              :     bool compatible = true;
+     284              : 
+     285            4 :     if (!isContainedIn(container: sessionKeys, contained: paramsKeys)) {
+     286              :       return false;
+     287              :     }
+     288              : 
+     289            8 :     for (var key in sessionKeys) {
+     290            8 :       Namespace namespace = session.namespaces[key]!;
+     291            4 :       RequiredNamespace requiredNamespace = requiredNamespaces[key]!;
+     292              :       List<String> requiredNamespaceChains =
+     293            4 :           NamespaceUtils.getChainsFromRequiredNamespace(
+     294              :         nsOrChainId: key,
+     295              :         requiredNamespace: requiredNamespace,
+     296              :       );
+     297            4 :       List<String> namespaceChains = NamespaceUtils.getChainIdsFromNamespace(
+     298              :         nsOrChainId: key,
+     299              :         namespace: namespace,
+     300              :       );
+     301              : 
+     302              :       // Check the chains, methods and events for overlaps.
+     303              :       // If any of them don't have it, we fail.
+     304            4 :       final bool chainsOverlap = isContainedIn(
+     305              :         container: namespaceChains,
+     306              :         contained: requiredNamespaceChains,
+     307              :       );
+     308            4 :       final bool methodsOverlap = isContainedIn(
+     309            4 :         container: namespace.methods,
+     310            8 :         contained: requiredNamespaces[key]!.methods,
+     311              :       );
+     312            4 :       final bool eventsOverlap = isContainedIn(
+     313            4 :         container: namespace.events,
+     314            8 :         contained: requiredNamespaces[key]!.events,
+     315              :       );
+     316              : 
+     317              :       if (!chainsOverlap || !methodsOverlap || !eventsOverlap) {
+     318              :         compatible = false;
+     319              :       }
+     320              :     }
+     321              : 
+     322              :     return compatible;
+     323              :   }
+     324              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/snow.png b/coverage/html/snow.png new file mode 100644 index 0000000000000000000000000000000000000000..2cdae107fceec6e7f02ac7acb4a34a82a540caa5 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< literal 0 HcmV?d00001 diff --git a/coverage/html/updown.png b/coverage/html/updown.png new file mode 100644 index 0000000000000000000000000000000000000000..aa56a238b3e6c435265250f9266cd1b8caba0f20 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ literal 0 HcmV?d00001 diff --git a/coverage/html/utils/errors.dart.func-c.html b/coverage/html/utils/errors.dart.func-c.html new file mode 100644 index 00000000..d443337b --- /dev/null +++ b/coverage/html/utils/errors.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/errors.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - errors.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/errors.dart.func.html b/coverage/html/utils/errors.dart.func.html new file mode 100644 index 00000000..a063dfc4 --- /dev/null +++ b/coverage/html/utils/errors.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/errors.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - errors.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/errors.dart.gcov.html b/coverage/html/utils/errors.dart.gcov.html new file mode 100644 index 00000000..147acfa7 --- /dev/null +++ b/coverage/html/utils/errors.dart.gcov.html @@ -0,0 +1,349 @@ + + + + + + + LCOV - lcov.info - utils/errors.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - errors.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
+       2              : 
+       3              : class Errors {
+       4              :   static const INVALID_METHOD = 'INVALID_METHOD';
+       5              :   static const INVALID_EVENT = 'INVALID_EVENT';
+       6              :   static const INVALID_UPDATE_REQUEST = 'INVALID_UPDATE_REQUEST';
+       7              :   static const INVALID_EXTEND_REQUEST = 'INVALID_EXTEND_REQUEST';
+       8              :   static const INVALID_SESSION_SETTLE_REQUEST =
+       9              :       'INVALID_SESSION_SETTLE_REQUEST';
+      10              :   static const UNAUTHORIZED_METHOD = 'UNAUTHORIZED_METHOD';
+      11              :   static const UNAUTHORIZED_EVENT = 'UNAUTHORIZED_EVENT';
+      12              :   static const UNAUTHORIZED_UPDATE_REQUEST = 'UNAUTHORIZED_UPDATE_REQUEST';
+      13              :   static const UNAUTHORIZED_EXTEND_REQUEST = 'UNAUTHORIZED_EXTEND_REQUEST';
+      14              :   static const USER_REJECTED_SIGN = 'USER_REJECTED_SIGN';
+      15              :   static const USER_REJECTED = 'USER_REJECTED';
+      16              :   static const USER_REJECTED_CHAINS = 'USER_REJECTED_CHAINS';
+      17              :   static const USER_REJECTED_METHODS = 'USER_REJECTED_METHODS';
+      18              :   static const USER_REJECTED_EVENTS = 'USER_REJECTED_EVENTS';
+      19              :   static const UNSUPPORTED_CHAINS = 'UNSUPPORTED_CHAINS';
+      20              :   static const UNSUPPORTED_METHODS = 'UNSUPPORTED_METHODS';
+      21              :   static const UNSUPPORTED_EVENTS = 'UNSUPPORTED_EVENTS';
+      22              :   static const UNSUPPORTED_ACCOUNTS = 'UNSUPPORTED_ACCOUNTS';
+      23              :   static const UNSUPPORTED_NAMESPACE_KEY = 'UNSUPPORTED_NAMESPACE_KEY';
+      24              :   static const USER_DISCONNECTED = 'USER_DISCONNECTED';
+      25              :   static const SESSION_SETTLEMENT_FAILED = 'SESSION_SETTLEMENT_FAILED';
+      26              :   static const NO_SESSION_FOR_TOPIC = 'NO_SESSION_FOR_TOPIC';
+      27              :   static const REQUEST_EXPIRED_SESSION = 'SESSION_REQUEST_EXPIRED';
+      28              :   static const WC_METHOD_UNSUPPORTED = 'WC_METHOD_UNSUPPORTED';
+      29              : 
+      30              :   // AUTH
+      31              :   static const MALFORMED_RESPONSE_PARAMS = 'MALFORMED_RESPONSE_PARAMS';
+      32              :   static const MALFORMED_REQUEST_PARAMS = 'MALFORMED_REQUEST_PARAMS';
+      33              :   static const MESSAGE_COMPROMISED = 'MESSAGE_COMPROMISED';
+      34              :   static const SIGNATURE_VERIFICATION_FAILED = 'SIGNATURE_VERIFICATION_FAILED';
+      35              :   static const REQUEST_EXPIRED_AUTH = 'AUTH_REQUEST_EXPIRED';
+      36              :   static const MISSING_ISSUER_AUTH = 'AUTH_MISSING_ISSUER';
+      37              :   static const USER_REJECTED_AUTH = 'AUTH_USER_REJECTED';
+      38              :   static const USER_DISCONNECTED_AUTH = 'AUTH_USER_DISCONNECTED';
+      39              : 
+      40              :   static const SDK_ERRORS = {
+      41              :     /* ----- INVALID (1xxx) ----- */
+      42              :     INVALID_METHOD: {
+      43              :       'message': 'Invalid method.',
+      44              :       'code': 1001,
+      45              :     },
+      46              :     INVALID_EVENT: {
+      47              :       'message': 'Invalid event.',
+      48              :       'code': 1002,
+      49              :     },
+      50              :     INVALID_UPDATE_REQUEST: {
+      51              :       'message': 'Invalid update request.',
+      52              :       'code': 1003,
+      53              :     },
+      54              :     INVALID_EXTEND_REQUEST: {
+      55              :       'message': 'Invalid extend request.',
+      56              :       'code': 1004,
+      57              :     },
+      58              :     INVALID_SESSION_SETTLE_REQUEST: {
+      59              :       'message': 'Invalid session settle request.',
+      60              :       'code': 1005,
+      61              :     },
+      62              :     /* ----- UNAUTHORIZED (3xxx) ----- */
+      63              :     UNAUTHORIZED_METHOD: {
+      64              :       'message': 'Unauthorized method.',
+      65              :       'code': 3001,
+      66              :     },
+      67              :     UNAUTHORIZED_EVENT: {
+      68              :       'message': 'Unauthorized event.',
+      69              :       'code': 3002,
+      70              :     },
+      71              :     UNAUTHORIZED_UPDATE_REQUEST: {
+      72              :       'message': 'Unauthorized update request.',
+      73              :       'code': 3003,
+      74              :     },
+      75              :     UNAUTHORIZED_EXTEND_REQUEST: {
+      76              :       'message': 'Unauthorized extend request.',
+      77              :       'code': 3004,
+      78              :     },
+      79              :     /* ----- REJECTED (5xxx) ----- */
+      80              :     USER_REJECTED_SIGN: {
+      81              :       'message': 'User rejected.',
+      82              :       'code': 4001,
+      83              :     },
+      84              :     /* ----- REJECTED (5xxx) ----- */
+      85              :     USER_REJECTED: {
+      86              :       'message': 'User rejected.',
+      87              :       'code': 5000,
+      88              :     },
+      89              :     USER_REJECTED_CHAINS: {
+      90              :       'message': 'User rejected chains.',
+      91              :       'code': 5001,
+      92              :     },
+      93              :     USER_REJECTED_METHODS: {
+      94              :       'message': 'User rejected methods.',
+      95              :       'code': 5002,
+      96              :     },
+      97              :     USER_REJECTED_EVENTS: {
+      98              :       'message': 'User rejected events.',
+      99              :       'code': 5003,
+     100              :     },
+     101              :     UNSUPPORTED_CHAINS: {
+     102              :       'message': 'Unsupported chains.',
+     103              :       'code': 5100,
+     104              :     },
+     105              :     UNSUPPORTED_METHODS: {
+     106              :       'message': 'Unsupported methods.',
+     107              :       'code': 5101,
+     108              :     },
+     109              :     UNSUPPORTED_EVENTS: {
+     110              :       'message': 'Unsupported events.',
+     111              :       'code': 5102,
+     112              :     },
+     113              :     UNSUPPORTED_ACCOUNTS: {
+     114              :       'message': 'Unsupported accounts.',
+     115              :       'code': 5103,
+     116              :     },
+     117              :     UNSUPPORTED_NAMESPACE_KEY: {
+     118              :       'message': 'Unsupported namespace key.',
+     119              :       'code': 5104,
+     120              :     },
+     121              :     /* ----- REASON (6xxx) ----- */
+     122              :     USER_DISCONNECTED: {
+     123              :       'message': 'User disconnected.',
+     124              :       'code': 6000,
+     125              :     },
+     126              :     /* ----- FAILURE (7xxx) ----- */
+     127              :     SESSION_SETTLEMENT_FAILED: {
+     128              :       'message': 'Session settlement failed.',
+     129              :       'code': 7000,
+     130              :     },
+     131              :     NO_SESSION_FOR_TOPIC: {
+     132              :       'message': 'No session for topic.',
+     133              :       'code': 7001,
+     134              :     },
+     135              :     /* ----- FAILURE (8xxx) ----- */
+     136              :     REQUEST_EXPIRED_SESSION: {
+     137              :       'message': 'Session request expired.',
+     138              :       'code': 8000,
+     139              :     },
+     140              :     /* ----- PAIRING (10xxx) ----- */
+     141              :     WC_METHOD_UNSUPPORTED: {
+     142              :       'message': 'Unsupported wc_ method.',
+     143              :       'code': 10001,
+     144              :     },
+     145              :     /* ----- AUTH VALIDATION (11xxx) ----- */
+     146              :     MALFORMED_RESPONSE_PARAMS: {
+     147              :       'message': 'Malformed response parameters.',
+     148              :       'code': 11001,
+     149              :     },
+     150              :     MALFORMED_REQUEST_PARAMS: {
+     151              :       'message': 'Malformed request parameters.',
+     152              :       'code': 11002,
+     153              :     },
+     154              :     MESSAGE_COMPROMISED: {
+     155              :       'message': 'Message compromised.',
+     156              :       'code': 11003,
+     157              :     },
+     158              :     SIGNATURE_VERIFICATION_FAILED: {
+     159              :       'message': 'Signature verification failed.',
+     160              :       'code': 11004,
+     161              :     },
+     162              :     REQUEST_EXPIRED_AUTH: {
+     163              :       'message': 'Auth request expired.',
+     164              :       'code': 11005,
+     165              :     },
+     166              :     MISSING_ISSUER_AUTH: {
+     167              :       'message': 'Missing Issuer.',
+     168              :       'code': 11006,
+     169              :     },
+     170              :     /* ----- AUTH REJECTED (12xxx) ----- */
+     171              :     USER_REJECTED_AUTH: {
+     172              :       'message': 'User rejected auth request.',
+     173              :       'code': 12001,
+     174              :     },
+     175              :     USER_DISCONNECTED_AUTH: {
+     176              :       'message': 'User disconnect auth.',
+     177              :       'code': 12002,
+     178              :     },
+     179              :   };
+     180              : 
+     181              :   static const NOT_INITIALIZED = 'NOT_INITIALIZED';
+     182              :   static const NO_MATCHING_KEY = 'NO_MATCHING_KEY';
+     183              :   static const RESTORE_WILL_OVERRIDE = 'RESTORE_WILL_OVERRIDE';
+     184              :   static const RESUBSCRIBED = 'RESUBSCRIBED';
+     185              :   static const MISSING_OR_INVALID = 'MISSING_OR_INVALID';
+     186              :   static const EXPIRED = 'EXPIRED';
+     187              :   static const UNKNOWN_TYPE = 'UNKNOWN_TYPE';
+     188              :   static const MISMATCHED_TOPIC = 'MISMATCHED_TOPIC';
+     189              :   static const NON_CONFORMING_NAMESPACES = 'NON_CONFORMING_NAMESPACES';
+     190              : 
+     191              :   static const INTERNAL_ERRORS = {
+     192              :     NOT_INITIALIZED: {
+     193              :       'message': 'Not initialized.',
+     194              :       'code': 1,
+     195              :     },
+     196              :     NO_MATCHING_KEY: {
+     197              :       'message': 'No matching key.',
+     198              :       'code': 2,
+     199              :     },
+     200              :     RESTORE_WILL_OVERRIDE: {
+     201              :       'message': 'Restore will override.',
+     202              :       'code': 3,
+     203              :     },
+     204              :     RESUBSCRIBED: {
+     205              :       'message': 'Resubscribed.',
+     206              :       'code': 4,
+     207              :     },
+     208              :     MISSING_OR_INVALID: {
+     209              :       'message': 'Missing or invalid.',
+     210              :       'code': 5,
+     211              :     },
+     212              :     EXPIRED: {
+     213              :       'message': 'Expired.',
+     214              :       'code': 6,
+     215              :     },
+     216              :     UNKNOWN_TYPE: {
+     217              :       'message': 'Unknown type.',
+     218              :       'code': 7,
+     219              :     },
+     220              :     MISMATCHED_TOPIC: {
+     221              :       'message': 'Mismatched topic.',
+     222              :       'code': 8,
+     223              :     },
+     224              :     NON_CONFORMING_NAMESPACES: {
+     225              :       'message': 'Non conforming namespaces.',
+     226              :       'code': 9,
+     227              :     },
+     228              :   };
+     229              : 
+     230            7 :   static WalletConnectError getInternalError(
+     231              :     String key, {
+     232              :     String context = '',
+     233              :   }) {
+     234            7 :     if (INTERNAL_ERRORS.containsKey(key)) {
+     235            7 :       return WalletConnectError(
+     236           14 :         code: INTERNAL_ERRORS[key]!['code']! as int,
+     237            7 :         message: context != ''
+     238           12 :             ? "${INTERNAL_ERRORS[key]!['message']! as String} $context"
+     239            8 :             : INTERNAL_ERRORS[key]!['message']! as String,
+     240              :       );
+     241              :     }
+     242              :     return const WalletConnectError(
+     243              :         code: -1, message: 'UNKNOWN INTERNAL ERROR');
+     244              :   }
+     245              : 
+     246            6 :   static WalletConnectError getSdkError(
+     247              :     String key, {
+     248              :     String context = '',
+     249              :   }) {
+     250            6 :     if (SDK_ERRORS.containsKey(key)) {
+     251            6 :       return WalletConnectError(
+     252           12 :         code: SDK_ERRORS[key]!['code']! as int,
+     253            6 :         message: context != ''
+     254           12 :             ? "${SDK_ERRORS[key]!['message']! as String} $context"
+     255           14 :             : SDK_ERRORS[key]!['message']! as String,
+     256              :       );
+     257              :     }
+     258              :     return const WalletConnectError(code: -1, message: 'UNKNOWN SDK ERROR');
+     259              :   }
+     260              : }
+     261              : 
+     262              : class WebSocketErrors {
+     263              :   static const int PROJECT_ID_NOT_FOUND = 401;
+     264              :   static const int INVALID_PROJECT_ID = 403;
+     265              :   static const int TOO_MANY_REQUESTS = 1013;
+     266              :   static const String INVALID_PROJECT_ID_OR_JWT =
+     267              :       'Invalid project ID or JWT Token';
+     268              :   static const String INVALID_PROJECT_ID_MESSAGE =
+     269              :       'Invalid project id. Please check your project id.';
+     270              :   static const String PROJECT_ID_NOT_FOUND_MESSAGE = 'Project id not found.';
+     271              :   static const String TOO_MANY_REQUESTS_MESSAGE =
+     272              :       'Too many requests. Please try again later.';
+     273              : 
+     274              :   static const int SERVER_TERMINATING = 1001;
+     275              :   static const int CLIENT_STALE = 4008;
+     276              :   static const int LOAD_REBALANCING = 4010;
+     277              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/extensions.dart.func-c.html b/coverage/html/utils/extensions.dart.func-c.html new file mode 100644 index 00000000..be64b2eb --- /dev/null +++ b/coverage/html/utils/extensions.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/extensions.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - extensions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/extensions.dart.func.html b/coverage/html/utils/extensions.dart.func.html new file mode 100644 index 00000000..9d6d0e10 --- /dev/null +++ b/coverage/html/utils/extensions.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/extensions.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - extensions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/extensions.dart.gcov.html b/coverage/html/utils/extensions.dart.gcov.html new file mode 100644 index 00000000..2eb02495 --- /dev/null +++ b/coverage/html/utils/extensions.dart.gcov.html @@ -0,0 +1,152 @@ + + + + + + + LCOV - lcov.info - utils/extensions.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - extensions.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:typed_data';
+       2              : 
+       3              : import 'package:convert/convert.dart';
+       4              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       5              : import 'package:web3dart/crypto.dart' as crypto;
+       6              : 
+       7              : extension TransactionExtension on Transaction {
+       8            0 :   Map<String, dynamic> toJson() {
+       9            0 :     return {
+      10            0 :       if (from != null) 'from': from!.hex,
+      11            0 :       if (to != null) 'to': to!.hex,
+      12            0 :       if (maxGas != null) 'gas': '0x${maxGas!.toRadixString(16)}',
+      13            0 :       if (gasPrice != null)
+      14            0 :         'gasPrice': '0x${gasPrice!.getInWei.toRadixString(16)}',
+      15            0 :       if (value != null) 'value': '0x${value!.getInWei.toRadixString(16)}',
+      16            0 :       if (data != null) 'data': crypto.bytesToHex(data!),
+      17            0 :       if (nonce != null) 'nonce': nonce,
+      18            0 :       if (maxFeePerGas != null)
+      19            0 :         'maxFeePerGas': '0x${maxFeePerGas!.getInWei.toRadixString(16)}',
+      20            0 :       if (maxPriorityFeePerGas != null)
+      21            0 :         'maxPriorityFeePerGas':
+      22            0 :             '0x${maxPriorityFeePerGas!.getInWei.toRadixString(16)}',
+      23              :     };
+      24              :   }
+      25              : }
+      26              : 
+      27              : extension TransactionExtension2 on Map<String, dynamic> {
+      28            0 :   Transaction toTransaction() {
+      29            0 :     return Transaction(
+      30            0 :       from: EthereumAddress.fromHex(this['from']),
+      31            0 :       to: EthereumAddress.fromHex(this['to']),
+      32            0 :       value: (this['value'] as String?).toEthereAmount(),
+      33            0 :       gasPrice: (this['gasPrice'] as String?).toEthereAmount(),
+      34            0 :       maxFeePerGas: (this['maxFeePerGas'] as String?).toEthereAmount(),
+      35              :       maxPriorityFeePerGas:
+      36            0 :           (this['maxPriorityFeePerGas'] as String?).toEthereAmount(),
+      37            0 :       maxGas: (this['maxGas'] as String?).toIntFromHex(),
+      38            0 :       nonce: this['nonce']?.toInt(),
+      39            0 :       data: _parseTransactionData(this['data']),
+      40              :     );
+      41              :   }
+      42              : }
+      43              : 
+      44            0 : Uint8List? _parseTransactionData(dynamic data) {
+      45            0 :   if (data != null && data != '0x') {
+      46            0 :     if (data.startsWith('0x')) {
+      47            0 :       return Uint8List.fromList(hex.decode(data.substring(2)));
+      48              :     }
+      49            0 :     return Uint8List.fromList(hex.decode(data));
+      50              :   }
+      51              :   return null;
+      52              : }
+      53              : 
+      54              : extension EtheraAmountExtension on String? {
+      55            0 :   EtherAmount? toEthereAmount() {
+      56              :     if (this != null) {
+      57            0 :       final hexValue = this!.replaceFirst('0x', '');
+      58            0 :       return EtherAmount.fromBigInt(
+      59              :         EtherUnit.wei,
+      60            0 :         BigInt.from(int.parse(hexValue, radix: 16)),
+      61              :       );
+      62              :     }
+      63              :     return null;
+      64              :   }
+      65              : 
+      66            0 :   int? toIntFromHex() {
+      67              :     if (this != null) {
+      68            0 :       final hexValue = this!.replaceFirst('0x', '');
+      69            0 :       return int.parse(hexValue, radix: 16);
+      70              :     }
+      71              :     return null;
+      72              :   }
+      73              : 
+      74            0 :   int? toInt() {
+      75              :     if (this != null) {
+      76            0 :       return int.tryParse(this!);
+      77              :     }
+      78              :     return null;
+      79              :   }
+      80              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/index-sort-f.html b/coverage/html/utils/index-sort-f.html new file mode 100644 index 00000000..1185ae09 --- /dev/null +++ b/coverage/html/utils/index-sort-f.html @@ -0,0 +1,153 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
errors.dart +
100.0%
+
100.0 %1414-
extensions.dart +
0.0%
+
0.0 %40-
log_level.dart +
100.0%
+
100.0 %77-
namespace_utils.dart +
76.2%76.2%
+
76.2 %168128-
walletconnect_utils.dart +
86.7%86.7%
+
86.7 %9078-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/index-sort-l.html b/coverage/html/utils/index-sort-l.html new file mode 100644 index 00000000..1bd04649 --- /dev/null +++ b/coverage/html/utils/index-sort-l.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
extensions.dart +
0.0%
+
0.0 %40
namespace_utils.dart +
76.2%76.2%
+
76.2 %168128
walletconnect_utils.dart +
86.7%86.7%
+
86.7 %9078
log_level.dart +
100.0%
+
100.0 %77
errors.dart +
100.0%
+
100.0 %1414
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/index.html b/coverage/html/utils/index.html new file mode 100644 index 00000000..a7edd2ee --- /dev/null +++ b/coverage/html/utils/index.html @@ -0,0 +1,127 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
errors.dart +
100.0%
+
100.0 %1414
extensions.dart +
0.0%
+
0.0 %40
log_level.dart +
100.0%
+
100.0 %77
namespace_utils.dart +
76.2%76.2%
+
76.2 %168128
walletconnect_utils.dart +
86.7%86.7%
+
86.7 %9078
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/log_level.dart.func-c.html b/coverage/html/utils/log_level.dart.func-c.html new file mode 100644 index 00000000..36dea479 --- /dev/null +++ b/coverage/html/utils/log_level.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/log_level.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - log_level.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/log_level.dart.func.html b/coverage/html/utils/log_level.dart.func.html new file mode 100644 index 00000000..6305a1d9 --- /dev/null +++ b/coverage/html/utils/log_level.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/log_level.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - log_level.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/log_level.dart.gcov.html b/coverage/html/utils/log_level.dart.gcov.html new file mode 100644 index 00000000..de0219dc --- /dev/null +++ b/coverage/html/utils/log_level.dart.gcov.html @@ -0,0 +1,102 @@ + + + + + + + LCOV - lcov.info - utils/log_level.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - log_level.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:logger/logger.dart';
+       2              : 
+       3              : enum LogLevel {
+       4              :   verbose,
+       5              :   debug,
+       6              :   info,
+       7              :   warning,
+       8              :   error,
+       9              :   wtf,
+      10              :   nothing;
+      11              : 
+      12           10 :   Level toLevel() {
+      13              :     switch (this) {
+      14           10 :       case LogLevel.verbose:
+      15              :         return Level.trace;
+      16           10 :       case LogLevel.debug:
+      17              :         return Level.debug;
+      18           10 :       case LogLevel.info:
+      19              :         return Level.info;
+      20            6 :       case LogLevel.warning:
+      21              :         return Level.warning;
+      22            6 :       case LogLevel.error:
+      23              :         return Level.error;
+      24            6 :       case LogLevel.wtf:
+      25              :         return Level.fatal;
+      26              :       default:
+      27              :         return Level.off;
+      28              :     }
+      29              :   }
+      30              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/namespace_utils.dart.func-c.html b/coverage/html/utils/namespace_utils.dart.func-c.html new file mode 100644 index 00000000..11a15ec7 --- /dev/null +++ b/coverage/html/utils/namespace_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/namespace_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - namespace_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/namespace_utils.dart.func.html b/coverage/html/utils/namespace_utils.dart.func.html new file mode 100644 index 00000000..0d1b2b48 --- /dev/null +++ b/coverage/html/utils/namespace_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/namespace_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - namespace_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/namespace_utils.dart.gcov.html b/coverage/html/utils/namespace_utils.dart.gcov.html new file mode 100644 index 00000000..39745484 --- /dev/null +++ b/coverage/html/utils/namespace_utils.dart.gcov.html @@ -0,0 +1,515 @@ + + + + + + + LCOV - lcov.info - utils/namespace_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - namespace_utils.dartCoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
+       4              : 
+       5              : class NamespaceUtils {
+       6              :   /// Checks if the string is a chain
+       7            6 :   static bool isValidChainId(String value) {
+       8            6 :     if (value.contains(':')) {
+       9            6 :       List<String> split = value.split(':');
+      10           12 :       return split.length == 2;
+      11              :     }
+      12              :     return false;
+      13              :   }
+      14              : 
+      15              :   /// Checks if the string is an account
+      16            6 :   static bool isValidAccount(String value) {
+      17            6 :     if (value.contains(':')) {
+      18            6 :       List<String> split = value.split(':');
+      19           12 :       if (split.length == 3) {
+      20           18 :         String chainId = '${split[0]}:${split[1]}';
+      21           18 :         return split.length >= 2 && isValidChainId(chainId);
+      22              :       }
+      23              :     }
+      24              :     return false;
+      25              :   }
+      26              : 
+      27            4 :   static bool isValidUrl(String value) {
+      28              :     try {
+      29            4 :       Uri.parse(value);
+      30              :       return true;
+      31              :     } catch (e) {
+      32              :       return false;
+      33              :     }
+      34              :   }
+      35              : 
+      36            1 :   static String getAccount(String namespaceAccount) {
+      37            1 :     if (isValidAccount(namespaceAccount)) {
+      38            2 :       return namespaceAccount.split(':')[2];
+      39              :     }
+      40              :     return namespaceAccount;
+      41              :   }
+      42              : 
+      43            6 :   static String getChainFromAccount(String account) {
+      44            6 :     if (isValidAccount(account)) {
+      45            6 :       List<String> parts = account.split(':');
+      46            6 :       String namespace = parts[0];
+      47            6 :       String reference = parts[1];
+      48            6 :       return '$namespace:$reference';
+      49              :     }
+      50              :     return account;
+      51              :   }
+      52              : 
+      53              :   /// Gets all unique chains from the provided list of accounts
+      54              :   /// This function assumes that all accounts are valid
+      55            6 :   static List<String> getChainsFromAccounts(List<String> accounts) {
+      56              :     Set<String> chains = {};
+      57           12 :     for (var account in accounts) {
+      58            6 :       chains.add(
+      59            6 :         getChainFromAccount(
+      60              :           account,
+      61              :         ),
+      62              :       );
+      63              :     }
+      64              : 
+      65            6 :     return chains.toList();
+      66              :   }
+      67              : 
+      68              :   /// Gets the namespace string id from the chainId
+      69              :   /// If the chain id is not valid, then it returns the chain id
+      70            1 :   static String getNamespaceFromChain(String chainId) {
+      71            1 :     if (isValidChainId(chainId)) {
+      72            2 :       return chainId.split(':')[0];
+      73              :     }
+      74              :     return chainId;
+      75              :   }
+      76              : 
+      77              :   /// Gets all unique namespaces from the provided list of accounts
+      78              :   /// This function assumes that all accounts are valid
+      79            0 :   static Map<String, Namespace> getNamespacesFromAccounts(
+      80              :     List<String> accounts,
+      81              :   ) {
+      82            0 :     Map<String, Namespace> namespaces = {};
+      83            0 :     for (var account in accounts) {
+      84            0 :       final ns = account.split(':')[0];
+      85            0 :       final cid = account.split(':')[1];
+      86            0 :       if (namespaces[ns] == null) {
+      87            0 :         namespaces[ns] = Namespace(
+      88            0 :           accounts: [],
+      89            0 :           methods: [],
+      90            0 :           events: [],
+      91              :         );
+      92              :       }
+      93            0 :       namespaces[ns] = namespaces[ns]!.copyWith(
+      94            0 :         accounts: [
+      95            0 :           ...namespaces[ns]!.accounts,
+      96            0 :           account,
+      97              :         ],
+      98            0 :         chains: [
+      99            0 :           ...(namespaces[ns]?.chains ?? []),
+     100            0 :           '$ns:$cid',
+     101              :         ],
+     102              :       );
+     103              :     }
+     104              : 
+     105              :     return namespaces;
+     106              :   }
+     107              : 
+     108              :   /// Gets the chains from the namespace.
+     109              :   /// If the namespace is a chain, then it returns the chain.
+     110              :   /// Otherwise it gets the chains from the accounts in the namespace.
+     111            6 :   static List<String> getChainIdsFromNamespace({
+     112              :     required String nsOrChainId,
+     113              :     required Namespace namespace,
+     114              :   }) {
+     115            6 :     if (isValidChainId(nsOrChainId)) {
+     116            6 :       return [nsOrChainId];
+     117              :     }
+     118              : 
+     119           12 :     return getChainsFromAccounts(namespace.accounts);
+     120              :   }
+     121              : 
+     122              :   /// Gets the chainIds from the namespace.
+     123            5 :   static List<String> getChainIdsFromNamespaces({
+     124              :     required Map<String, Namespace> namespaces,
+     125              :   }) {
+     126              :     Set<String> chainIds = {};
+     127              : 
+     128           10 :     namespaces.forEach((String ns, Namespace namespace) {
+     129            5 :       chainIds.addAll(
+     130            5 :         getChainIdsFromNamespace(
+     131              :           nsOrChainId: ns,
+     132              :           namespace: namespace,
+     133              :         ),
+     134              :       );
+     135              :     });
+     136              : 
+     137            5 :     return chainIds.toList();
+     138              :   }
+     139              : 
+     140              :   /// Gets the methods from a namespace map for the given chain
+     141            5 :   static List<String> getNamespacesMethodsForChainId({
+     142              :     required String chainId,
+     143              :     required Map<String, Namespace> namespaces,
+     144              :   }) {
+     145            5 :     List<String> methods = [];
+     146           10 :     namespaces.forEach((String nsOrChain, Namespace namespace) {
+     147            5 :       if (nsOrChain == chainId) {
+     148            2 :         methods.addAll(namespace.methods);
+     149              :       } else {
+     150           10 :         List<String> chains = getChainsFromAccounts(namespace.accounts);
+     151            5 :         if (chains.contains(chainId)) {
+     152           10 :           methods.addAll(namespace.methods);
+     153              :         }
+     154              :       }
+     155              :     });
+     156              : 
+     157              :     return methods;
+     158              :   }
+     159              : 
+     160              :   /// Gets the optional methods from a namespace map for the given chain
+     161            0 :   static List<String> getOptionalMethodsForChainId({
+     162              :     required String chainId,
+     163              :     required Map<String, RequiredNamespace> optionalNamespaces,
+     164              :   }) {
+     165            0 :     List<String> methods = [];
+     166            0 :     optionalNamespaces.forEach((String nsOrChain, RequiredNamespace rns) {
+     167            0 :       if (nsOrChain == chainId) {
+     168            0 :         methods.addAll(rns.methods);
+     169              :       } else {
+     170            0 :         if ((rns.chains ?? []).contains('$nsOrChain:$chainId')) {
+     171            0 :           methods.addAll(rns.methods);
+     172              :         }
+     173              :       }
+     174              :     });
+     175              : 
+     176              :     return methods;
+     177              :   }
+     178              : 
+     179              :   /// Gets the methods from a namespace map for the given chain id
+     180            5 :   static List<String> getNamespacesEventsForChain({
+     181              :     required String chainId,
+     182              :     required Map<String, Namespace> namespaces,
+     183              :   }) {
+     184            5 :     List<String> events = [];
+     185           10 :     namespaces.forEach((String nsOrChain, Namespace namespace) {
+     186            5 :       if (nsOrChain == chainId) {
+     187            2 :         events.addAll(namespace.events);
+     188              :       } else {
+     189           10 :         List<String> chains = getChainsFromAccounts(namespace.accounts);
+     190            5 :         if (chains.contains(chainId)) {
+     191           10 :           events.addAll(namespace.events);
+     192              :         }
+     193              :       }
+     194              :     });
+     195              : 
+     196              :     return events;
+     197              :   }
+     198              : 
+     199              :   /// If the namespace is a chain, add it to the list and return it
+     200              :   /// Otherwise, get the chains from the required namespaces
+     201            6 :   static List<String> getChainsFromRequiredNamespace({
+     202              :     required String nsOrChainId,
+     203              :     required RequiredNamespace requiredNamespace,
+     204              :   }) {
+     205            6 :     List<String> chains = [];
+     206            6 :     if (isValidChainId(nsOrChainId)) {
+     207            6 :       chains.add(nsOrChainId);
+     208            6 :     } else if (requiredNamespace.chains != null) {
+     209              :       // We are assuming that the namespace is a chain
+     210              :       // Validate the requiredNamespace before it is sent here
+     211           12 :       chains.addAll(requiredNamespace.chains!);
+     212              :     }
+     213              : 
+     214              :     return chains;
+     215              :   }
+     216              : 
+     217              :   /// Gets the chains from the required namespaces
+     218              :   /// If keys value is provided, it will only get the chains for the provided keys
+     219            1 :   static List<String> getChainIdsFromRequiredNamespaces({
+     220              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     221              :   }) {
+     222              :     Set<String> chainIds = {};
+     223              : 
+     224              :     // Loop through the required namespaces
+     225            2 :     requiredNamespaces.forEach((String ns, RequiredNamespace value) {
+     226            1 :       chainIds.addAll(
+     227            1 :         getChainsFromRequiredNamespace(
+     228              :           nsOrChainId: ns,
+     229              :           requiredNamespace: value,
+     230              :         ),
+     231              :       );
+     232              :     });
+     233              : 
+     234            1 :     return chainIds.toList();
+     235              :   }
+     236              : 
+     237              :   /// Using the availabe accounts, methods, and events, construct the namespaces
+     238              :   /// If optional namespaces are provided, then they will be added to the namespaces as well
+     239            4 :   static Map<String, Namespace> constructNamespaces({
+     240              :     required Set<String> availableAccounts,
+     241              :     required Set<String> availableMethods,
+     242              :     required Set<String> availableEvents,
+     243              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     244              :     Map<String, RequiredNamespace>? optionalNamespaces,
+     245              :   }) {
+     246            4 :     final Map<String, Namespace> namespaces = _constructNamespaces(
+     247              :       availableAccounts: availableAccounts,
+     248              :       availableMethods: availableMethods,
+     249              :       availableEvents: availableEvents,
+     250              :       namespacesMap: requiredNamespaces,
+     251              :     );
+     252            4 :     final Map<String, Namespace> optionals = _constructNamespaces(
+     253              :       availableAccounts: availableAccounts,
+     254              :       availableMethods: availableMethods,
+     255              :       availableEvents: availableEvents,
+     256            1 :       namespacesMap: optionalNamespaces ?? {},
+     257              :     );
+     258              : 
+     259              :     // Loop through the optional keys and if they exist in the namespaces, then merge them and delete them from optional
+     260            8 :     List<String> keys = optionals.keys.toList();
+     261            9 :     for (int i = 0; i < keys.length; i++) {
+     262            1 :       String key = keys[i];
+     263            1 :       if (namespaces.containsKey(key)) {
+     264            2 :         namespaces[key] = Namespace(
+     265            1 :           accounts: namespaces[key]!
+     266            1 :               .accounts
+     267            1 :               .toSet()
+     268            4 :               .union(optionals[key]!.accounts.toSet())
+     269            1 :               .toList(),
+     270            1 :           methods: namespaces[key]!
+     271            1 :               .methods
+     272            1 :               .toSet()
+     273            4 :               .union(optionals[key]!.methods.toSet())
+     274            1 :               .toList(),
+     275            1 :           events: namespaces[key]!
+     276            1 :               .events
+     277            1 :               .toSet()
+     278            4 :               .union(optionals[key]!.events.toSet())
+     279            1 :               .toList(),
+     280              :         );
+     281            1 :         optionals.remove(key);
+     282              :       }
+     283              :     }
+     284              : 
+     285            4 :     return {
+     286              :       ...namespaces,
+     287            4 :       ...optionals,
+     288              :     };
+     289              :   }
+     290              : 
+     291            0 :   static Map<String, Namespace> buildNamespacesFromAuth({
+     292              :     required Set<String> methods,
+     293              :     required Set<String> accounts,
+     294              :   }) {
+     295            0 :     final parsedAccounts = accounts.map(
+     296            0 :       (account) => account.replaceAll('did:pkh:', ''),
+     297              :     );
+     298              : 
+     299            0 :     final namespaces = getNamespacesFromAccounts(parsedAccounts.toList());
+     300              : 
+     301            0 :     final entries = namespaces.entries.map((e) {
+     302            0 :       return MapEntry(
+     303            0 :         e.key,
+     304            0 :         Namespace.fromJson(e.value.toJson()).copyWith(
+     305            0 :           methods: methods.toList(),
+     306              :           events: EventsConstants.allEvents,
+     307              :         ),
+     308              :       );
+     309              :     });
+     310              : 
+     311            0 :     return Map<String, Namespace>.fromEntries(entries);
+     312              :   }
+     313              : 
+     314              :   /// Gets the matching items from the available items using the chainId
+     315              :   /// This function assumes that each element in the available items is in the format of chainId:itemId
+     316            4 :   static Set<String> _getMatching({
+     317              :     required String namespaceOrChainId,
+     318              :     required Set<String> available,
+     319              :     Set<String>? requested,
+     320              :     bool takeLast = true,
+     321              :   }) {
+     322              :     Set<String> matching = {};
+     323              :     // Loop through the available items, and if it starts with the chainId,
+     324              :     // and is in the requested items, add it to the matching items
+     325            8 :     for (var item in available) {
+     326            8 :       if (item.startsWith('$namespaceOrChainId:')) {
+     327           12 :         matching.add(takeLast ? item.split(':').last : item);
+     328              :       }
+     329              :     }
+     330              : 
+     331              :     if (requested != null) {
+     332            4 :       matching = matching.intersection(requested);
+     333              :     }
+     334              : 
+     335              :     return matching;
+     336              :   }
+     337              : 
+     338            4 :   static Map<String, Namespace> _constructNamespaces({
+     339              :     required Set<String> availableAccounts,
+     340              :     required Set<String> availableMethods,
+     341              :     required Set<String> availableEvents,
+     342              :     required Map<String, RequiredNamespace> namespacesMap,
+     343              :   }) {
+     344            4 :     Map<String, Namespace> namespaces = {};
+     345              : 
+     346              :     // Loop through the required namespaces
+     347            8 :     for (final String namespaceOrChainId in namespacesMap.keys) {
+     348              :       // If the key is a chain, add all of the chain specific events, keys, and methods first
+     349            4 :       final List<String> accounts = [];
+     350            4 :       final List<String> events = [];
+     351            4 :       final List<String> methods = [];
+     352            4 :       final namespace = namespacesMap[namespaceOrChainId]!;
+     353            8 :       final chains = namespace.chains ?? [];
+     354            8 :       if (NamespaceUtils.isValidChainId(namespaceOrChainId) || chains.isEmpty) {
+     355              :         // Add the chain specific availableAccounts
+     356            4 :         accounts.addAll(
+     357            4 :           _getMatching(
+     358              :             namespaceOrChainId: namespaceOrChainId,
+     359              :             available: availableAccounts,
+     360              :             takeLast: false,
+     361              :           ),
+     362              :         );
+     363              :         // Add the chain specific events
+     364            4 :         events.addAll(
+     365            4 :           _getMatching(
+     366              :             namespaceOrChainId: namespaceOrChainId,
+     367              :             available: availableEvents,
+     368            8 :             requested: namespace.events.toSet(),
+     369              :           ),
+     370              :         );
+     371              :         // Add the chain specific methods
+     372            4 :         methods.addAll(
+     373            4 :           _getMatching(
+     374              :             namespaceOrChainId: namespaceOrChainId,
+     375              :             available: availableMethods,
+     376            8 :             requested: namespace.methods.toSet(),
+     377              :           ),
+     378              :         );
+     379              :       } else {
+     380              :         // Loop through all of the chains
+     381            8 :         for (final String chainId in chains) {
+     382              :           // Add the chain specific availableAccounts
+     383            4 :           accounts.addAll(
+     384            4 :             _getMatching(
+     385              :               namespaceOrChainId: chainId,
+     386              :               available: availableAccounts,
+     387           12 :             ).map((e) => '$chainId:$e'),
+     388              :           );
+     389              :           // Add the chain specific events
+     390            4 :           events.addAll(
+     391            4 :             _getMatching(
+     392              :               namespaceOrChainId: chainId,
+     393              :               available: availableEvents,
+     394            8 :               requested: namespace.events.toSet(),
+     395              :             ),
+     396              :           );
+     397              :           // Add the chain specific methods
+     398            4 :           methods.addAll(
+     399            4 :             _getMatching(
+     400              :               namespaceOrChainId: chainId,
+     401              :               available: availableMethods,
+     402            8 :               requested: namespace.methods.toSet(),
+     403              :             ),
+     404              :           );
+     405              :         }
+     406              :       }
+     407              : 
+     408              :       // Add the namespace to the list
+     409            8 :       namespaces[namespaceOrChainId] = Namespace(
+     410            8 :         accounts: accounts.toSet().toList(),
+     411            8 :         events: events.toSet().toList(),
+     412            8 :         methods: methods.toSet().toList(),
+     413              :       );
+     414              :     }
+     415              : 
+     416              :     return namespaces;
+     417              :   }
+     418              : 
+     419              :   /// To be used by Wallet to regenerate already generatedNamespaces but adding `chains` parameter
+     420              :   ///
+     421              :   /// Example usage on onSessionProposal(SessionProposalEvent? event)
+     422              :   ///
+     423              :   /// await _web3Wallet!.approveSession(
+     424              :   ///   id: event.id,
+     425              :   ///   namespaces: NamespaceUtils.regenerateNamespacesWithChains(
+     426              :   ///     event.params.generatedNamespaces!,
+     427              :   ///   ),
+     428              :   ///   sessionProperties: event.params.sessionProperties,
+     429              :   /// );
+     430              : 
+     431            0 :   static Map<String, Namespace> regenerateNamespacesWithChains(
+     432              :     Map<String, Namespace> generatedNamespaces,
+     433              :   ) {
+     434            0 :     Map<String, Namespace> regeneratedNamespaces = {};
+     435            0 :     for (var key in generatedNamespaces.keys) {
+     436            0 :       final namespace = generatedNamespaces[key]!.copyWith(
+     437            0 :         chains: getChainsFromAccounts(generatedNamespaces[key]!.accounts),
+     438              :       );
+     439            0 :       regeneratedNamespaces[key] = namespace;
+     440              :     }
+     441              :     return regeneratedNamespaces;
+     442              :   }
+     443              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/walletconnect_utils.dart.func-c.html b/coverage/html/utils/walletconnect_utils.dart.func-c.html new file mode 100644 index 00000000..16648e77 --- /dev/null +++ b/coverage/html/utils/walletconnect_utils.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/walletconnect_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - walletconnect_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/walletconnect_utils.dart.func.html b/coverage/html/utils/walletconnect_utils.dart.func.html new file mode 100644 index 00000000..5c9e25dd --- /dev/null +++ b/coverage/html/utils/walletconnect_utils.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - utils/walletconnect_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - walletconnect_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/utils/walletconnect_utils.dart.gcov.html b/coverage/html/utils/walletconnect_utils.dart.gcov.html new file mode 100644 index 00000000..11a6ee07 --- /dev/null +++ b/coverage/html/utils/walletconnect_utils.dart.gcov.html @@ -0,0 +1,302 @@ + + + + + + + LCOV - lcov.info - utils/walletconnect_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - walletconnect_utils.dartCoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'dart:convert';
+       2              : import 'dart:io';
+       3              : 
+       4              : import 'package:package_info_plus/package_info_plus.dart';
+       5              : import 'package:flutter/foundation.dart' show kIsWeb;
+       6              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       7              : 
+       8              : class WalletConnectUtils {
+       9            7 :   static bool isExpired(int expiry) {
+      10           21 :     return DateTime.now().toUtc().compareTo(
+      11            7 :               DateTime.fromMillisecondsSinceEpoch(
+      12            7 :                 toMilliseconds(expiry),
+      13              :               ),
+      14            7 :             ) >=
+      15              :         0;
+      16              :   }
+      17              : 
+      18            0 :   static DateTime expiryToDateTime(int expiry) {
+      19            0 :     final milliseconds = expiry * 1000;
+      20            0 :     return DateTime.fromMillisecondsSinceEpoch(milliseconds);
+      21              :   }
+      22              : 
+      23            7 :   static int toMilliseconds(int seconds) {
+      24            7 :     return seconds * 1000;
+      25              :   }
+      26              : 
+      27            7 :   static int calculateExpiry(int offset) {
+      28           35 :     return DateTime.now().toUtc().millisecondsSinceEpoch ~/ 1000 + offset;
+      29              :   }
+      30              : 
+      31            9 :   static String getOS() {
+      32              :     if (kIsWeb) {
+      33              :       // TODO change this into an actual value
+      34              :       return 'web-browser';
+      35              :     } else {
+      36           27 :       return <String>[Platform.operatingSystem, Platform.operatingSystemVersion]
+      37            9 :           .join('-');
+      38              :     }
+      39              :   }
+      40              : 
+      41            9 :   static Future<String> getPackageName() async {
+      42            9 :     final packageInfo = await PackageInfo.fromPlatform();
+      43            9 :     return packageInfo.packageName;
+      44              :   }
+      45              : 
+      46            9 :   static String getId() {
+      47              :     if (kIsWeb) {
+      48              :       return 'web';
+      49              :     } else {
+      50            9 :       if (Platform.isAndroid) {
+      51              :         return 'android';
+      52            9 :       } else if (Platform.isIOS) {
+      53              :         return 'ios';
+      54            9 :       } else if (Platform.isLinux) {
+      55              :         return 'linux';
+      56            9 :       } else if (Platform.isMacOS) {
+      57              :         return 'macos';
+      58            0 :       } else if (Platform.isWindows) {
+      59              :         return 'windows';
+      60              :       } else {
+      61              :         return 'unknown';
+      62              :       }
+      63              :     }
+      64              :   }
+      65              : 
+      66            9 :   static String formatUA(
+      67              :     String protocol,
+      68              :     int version,
+      69              :     String sdkVersion,
+      70              :   ) {
+      71            9 :     String os = getOS();
+      72            9 :     String id = getId();
+      73            9 :     return <String>[
+      74           18 :       [protocol, version].join('-'),
+      75           18 :       <String>['Flutter', sdkVersion].join('-'),
+      76              :       os,
+      77              :       id,
+      78            9 :     ].join('/');
+      79              :   }
+      80              : 
+      81            9 :   static String formatRelayRpcUrl({
+      82              :     required String protocol,
+      83              :     required int version,
+      84              :     required String relayUrl,
+      85              :     required String sdkVersion,
+      86              :     required String auth,
+      87              :     String? projectId,
+      88              :     String? packageName,
+      89              :   }) {
+      90            9 :     final Uri uri = Uri.parse(relayUrl);
+      91           18 :     final Map<String, String> queryParams = Uri.splitQueryString(uri.query);
+      92            9 :     final userAgent = formatUA(protocol, version, sdkVersion);
+      93              : 
+      94              :     // Add basic query params
+      95            9 :     final Map<String, String> relayParams = {
+      96              :       'auth': auth,
+      97              :       'ua': userAgent,
+      98              :     };
+      99              : 
+     100              :     // Add projectId query param
+     101            9 :     if ((projectId ?? '').isNotEmpty) {
+     102            9 :       relayParams['projectId'] = projectId!;
+     103              :     }
+     104              : 
+     105              :     // Add bundleId, packageName or origin query param based on platform
+     106            9 :     if ((packageName ?? '').isNotEmpty) {
+     107            9 :       final platform = getId();
+     108            9 :       if (platform == 'ios') {
+     109            0 :         relayParams['bundleId'] = packageName!;
+     110            9 :       } else if (platform == 'android') {
+     111            0 :         relayParams['packageName'] = packageName!;
+     112              :       } else {
+     113            9 :         relayParams['origin'] = packageName!;
+     114              :       }
+     115              :     }
+     116              : 
+     117            9 :     queryParams.addAll(relayParams);
+     118           18 :     return uri.replace(queryParameters: queryParams).toString();
+     119              :   }
+     120              : 
+     121              :   /// ---- URI HANDLING --- ///
+     122              : 
+     123            8 :   static URIParseResult parseUri(Uri uri) {
+     124            8 :     String protocol = uri.scheme;
+     125            8 :     String path = uri.path;
+     126            8 :     final List<String> splitParams = path.split('@');
+     127           16 :     if (splitParams.length == 1) {
+     128              :       throw const WalletConnectError(
+     129              :         code: 0,
+     130              :         message: 'Invalid URI: Missing @',
+     131              :       );
+     132              :     }
+     133           16 :     List<String> methods = (uri.queryParameters['methods'] ?? '')
+     134              :         // Replace all the square brackets with empty string, split by comma
+     135           16 :         .replaceAll(RegExp(r'[\[\]"]+'), '')
+     136            8 :         .split(',');
+     137           30 :     if (methods.length == 1 && methods[0].isEmpty) {
+     138            7 :       methods = [];
+     139              :     }
+     140              :     final URIVersion? version;
+     141            8 :     switch (splitParams[1]) {
+     142            8 :       case '1':
+     143              :         version = URIVersion.v1;
+     144              :         break;
+     145            8 :       case '2':
+     146              :         version = URIVersion.v2;
+     147              :         break;
+     148              :       default:
+     149              :         version = null;
+     150              :     }
+     151              :     final URIV1ParsedData? v1Data;
+     152              :     final URIV2ParsedData? v2Data;
+     153            8 :     if (version == URIVersion.v1) {
+     154            5 :       v1Data = URIV1ParsedData(
+     155           10 :         key: uri.queryParameters['key']!,
+     156           10 :         bridge: uri.queryParameters['bridge']!,
+     157              :       );
+     158              :       v2Data = null;
+     159              :     } else {
+     160              :       v1Data = null;
+     161            8 :       v2Data = URIV2ParsedData(
+     162           16 :         symKey: uri.queryParameters['symKey']!,
+     163            8 :         relay: Relay(
+     164           16 :           uri.queryParameters['relay-protocol']!,
+     165           16 :           data: uri.queryParameters.containsKey('relay-data')
+     166            0 :               ? uri.queryParameters['relay-data']
+     167              :               : null,
+     168              :         ),
+     169              :         methods: methods,
+     170              :       );
+     171              :     }
+     172              : 
+     173            8 :     URIParseResult ret = URIParseResult(
+     174              :       protocol: protocol,
+     175              :       version: version,
+     176            8 :       topic: splitParams[0],
+     177              :       v1Data: v1Data,
+     178              :       v2Data: v2Data,
+     179              :     );
+     180              :     return ret;
+     181              :   }
+     182              : 
+     183            7 :   static Map<String, String> formatRelayParams(
+     184              :     Relay relay, {
+     185              :     String delimiter = '-',
+     186              :   }) {
+     187            7 :     Map<String, String> params = {};
+     188           28 :     params[['relay', 'protocol'].join(delimiter)] = relay.protocol;
+     189            7 :     if (relay.data != null) {
+     190            0 :       params[['relay', 'data'].join(delimiter)] = relay.data!;
+     191              :     }
+     192              :     return params;
+     193              :   }
+     194              : 
+     195            7 :   static Uri formatUri({
+     196              :     required String protocol,
+     197              :     required String version,
+     198              :     required String topic,
+     199              :     required String symKey,
+     200              :     required Relay relay,
+     201              :     required List<List<String>>? methods,
+     202              :     int? expiry,
+     203              :   }) {
+     204            7 :     Map<String, String> params = formatRelayParams(relay);
+     205            7 :     params['symKey'] = symKey;
+     206              :     if (methods != null) {
+     207           18 :       final uriMethods = methods.expand((e) => e).toList();
+     208            6 :       params['methods'] =
+     209           30 :           uriMethods.map((e) => jsonEncode(e)).join(',').replaceAll('"', '');
+     210              :     }
+     211              : 
+     212              :     if (expiry != null) {
+     213           14 :       params['expiryTimestamp'] = expiry.toString();
+     214              :     }
+     215              : 
+     216            7 :     return Uri(
+     217              :       scheme: protocol,
+     218            7 :       path: '$topic@$version',
+     219              :       queryParameters: params,
+     220              :     );
+     221              :   }
+     222              : 
+     223            0 :   static Map<String, T> convertMapTo<T>(Map<String, dynamic> inMap) {
+     224            0 :     Map<String, T> m = {};
+     225            0 :     for (var entry in inMap.entries) {
+     226            0 :       m[entry.key] = entry.value as T;
+     227              :     }
+     228              :     return m;
+     229              :   }
+     230              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/index-sort-f.html b/coverage/html/web3app/index-sort-f.html new file mode 100644 index 00000000..e47e2032 --- /dev/null +++ b/coverage/html/web3app/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - web3app + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
web3app.dart +
64.7%64.7%
+
64.7 %11675-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/index-sort-l.html b/coverage/html/web3app/index-sort-l.html new file mode 100644 index 00000000..461ff737 --- /dev/null +++ b/coverage/html/web3app/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - web3app + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3app.dart +
64.7%64.7%
+
64.7 %11675
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/index.html b/coverage/html/web3app/index.html new file mode 100644 index 00000000..e2fb5e12 --- /dev/null +++ b/coverage/html/web3app/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - web3app + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3app.dart +
64.7%64.7%
+
64.7 %11675
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/web3app.dart.func-c.html b/coverage/html/web3app/web3app.dart.func-c.html new file mode 100644 index 00000000..94575476 --- /dev/null +++ b/coverage/html/web3app/web3app.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - web3app/web3app.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3app - web3app.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/web3app.dart.func.html b/coverage/html/web3app/web3app.dart.func.html new file mode 100644 index 00000000..3ca32b9f --- /dev/null +++ b/coverage/html/web3app/web3app.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - web3app/web3app.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3app - web3app.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3app/web3app.dart.gcov.html b/coverage/html/web3app/web3app.dart.gcov.html new file mode 100644 index 00000000..b2fbb284 --- /dev/null +++ b/coverage/html/web3app/web3app.dart.gcov.html @@ -0,0 +1,526 @@ + + + + + + + LCOV - lcov.info - web3app/web3app.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3app - web3app.dartCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
+       7              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       8              : 
+       9              : class Web3App implements IWeb3App {
+      10              :   static const List<List<String>> DEFAULT_METHODS = [
+      11              :     [
+      12              :       MethodConstants.WC_SESSION_PROPOSE,
+      13              :       MethodConstants.WC_SESSION_REQUEST,
+      14              :     ],
+      15              :     [
+      16              :       MethodConstants.WC_AUTH_REQUEST,
+      17              :     ]
+      18              :   ];
+      19              : 
+      20              :   bool _initialized = false;
+      21              : 
+      22            2 :   static Future<Web3App> createInstance({
+      23              :     required String projectId,
+      24              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
+      25              :     required PairingMetadata metadata,
+      26              :     bool memoryStore = false,
+      27              :     LogLevel logLevel = LogLevel.nothing,
+      28              :     HttpWrapper httpClient = const HttpWrapper(),
+      29              :   }) async {
+      30            2 :     final client = Web3App(
+      31            2 :       core: Core(
+      32              :         projectId: projectId,
+      33              :         relayUrl: relayUrl,
+      34              :         memoryStore: memoryStore,
+      35              :         logLevel: logLevel,
+      36              :         httpClient: httpClient,
+      37              :       ),
+      38              :       metadata: metadata,
+      39              :     );
+      40            2 :     await client.init();
+      41              : 
+      42              :     return client;
+      43              :   }
+      44              : 
+      45              :   ///---------- GENERIC ----------///
+      46              : 
+      47              :   @override
+      48              :   final String protocol = 'wc';
+      49              :   @override
+      50              :   final int version = 2;
+      51              : 
+      52              :   @override
+      53              :   final ICore core;
+      54              :   @override
+      55              :   final PairingMetadata metadata;
+      56              : 
+      57            2 :   Web3App({
+      58              :     required this.core,
+      59              :     required this.metadata,
+      60              :   }) {
+      61            4 :     signEngine = SignEngine(
+      62            2 :       core: core,
+      63            2 :       metadata: metadata,
+      64            2 :       proposals: GenericStore(
+      65            4 :         storage: core.storage,
+      66              :         context: StoreVersions.CONTEXT_PROPOSALS,
+      67              :         version: StoreVersions.VERSION_PROPOSALS,
+      68            0 :         fromJson: (dynamic value) {
+      69            0 :           return ProposalData.fromJson(value);
+      70              :         },
+      71              :       ),
+      72            2 :       sessions: Sessions(
+      73            4 :         storage: core.storage,
+      74              :         context: StoreVersions.CONTEXT_SESSIONS,
+      75              :         version: StoreVersions.VERSION_SESSIONS,
+      76            0 :         fromJson: (dynamic value) {
+      77            0 :           return SessionData.fromJson(value);
+      78              :         },
+      79              :       ),
+      80            2 :       pendingRequests: GenericStore(
+      81            4 :         storage: core.storage,
+      82              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
+      83              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
+      84            0 :         fromJson: (dynamic value) {
+      85            0 :           return SessionRequest.fromJson(value);
+      86              :         },
+      87              :       ),
+      88            2 :       authKeys: GenericStore(
+      89            4 :         storage: core.storage,
+      90              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
+      91              :         version: StoreVersions.VERSION_AUTH_KEYS,
+      92            0 :         fromJson: (dynamic value) {
+      93            0 :           return AuthPublicKey.fromJson(value);
+      94              :         },
+      95              :       ),
+      96            2 :       pairingTopics: GenericStore(
+      97            4 :         storage: core.storage,
+      98              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
+      99              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
+     100            0 :         fromJson: (dynamic value) {
+     101              :           return value;
+     102              :         },
+     103              :       ),
+     104            2 :       authRequests: GenericStore(
+     105            4 :         storage: core.storage,
+     106              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     107              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     108            0 :         fromJson: (dynamic value) {
+     109            0 :           return PendingAuthRequest.fromJson(value);
+     110              :         },
+     111              :       ),
+     112            2 :       completeRequests: GenericStore(
+     113            4 :         storage: core.storage,
+     114              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
+     115              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
+     116            0 :         fromJson: (dynamic value) {
+     117            0 :           return StoredCacao.fromJson(value);
+     118              :         },
+     119              :       ),
+     120            2 :       sessionAuthRequests: GenericStore(
+     121            4 :         storage: core.storage,
+     122              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     123              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     124            0 :         fromJson: (dynamic value) {
+     125            0 :           return PendingSessionAuthRequest.fromJson(value);
+     126              :         },
+     127              :       ),
+     128              :     );
+     129              : 
+     130            4 :     authEngine = AuthEngine(
+     131            2 :       core: core,
+     132            2 :       metadata: metadata,
+     133            4 :       authKeys: signEngine.authKeys,
+     134            4 :       pairingTopics: signEngine.pairingTopics,
+     135            4 :       authRequests: signEngine.authRequests,
+     136            4 :       completeRequests: signEngine.completeRequests,
+     137              :     );
+     138              :   }
+     139              : 
+     140            2 :   @override
+     141              :   Future<void> init() async {
+     142            2 :     if (_initialized) {
+     143              :       return;
+     144              :     }
+     145              : 
+     146            4 :     await core.start();
+     147            4 :     await signEngine.init();
+     148            4 :     await authEngine.init();
+     149              : 
+     150            2 :     _initialized = true;
+     151              :   }
+     152              : 
+     153              :   ///---------- SIGN ENGINE ----------///
+     154              : 
+     155            2 :   @override
+     156            4 :   Event<SessionConnect> get onSessionConnect => signEngine.onSessionConnect;
+     157            1 :   @override
+     158            2 :   Event<SessionEvent> get onSessionEvent => signEngine.onSessionEvent;
+     159            1 :   @override
+     160            2 :   Event<SessionExpire> get onSessionExpire => signEngine.onSessionExpire;
+     161            0 :   @override
+     162              :   Event<SessionProposalEvent> get onProposalExpire =>
+     163            0 :       signEngine.onProposalExpire;
+     164            1 :   @override
+     165            2 :   Event<SessionExtend> get onSessionExtend => signEngine.onSessionExtend;
+     166            1 :   @override
+     167            2 :   Event<SessionPing> get onSessionPing => signEngine.onSessionPing;
+     168            1 :   @override
+     169            2 :   Event<SessionUpdate> get onSessionUpdate => signEngine.onSessionUpdate;
+     170            1 :   @override
+     171            2 :   Event<SessionDelete> get onSessionDelete => signEngine.onSessionDelete;
+     172              : 
+     173            1 :   @override
+     174            2 :   IGenericStore<ProposalData> get proposals => signEngine.proposals;
+     175            1 :   @override
+     176            2 :   ISessions get sessions => signEngine.sessions;
+     177            0 :   @override
+     178              :   IGenericStore<SessionRequest> get pendingRequests =>
+     179            0 :       signEngine.pendingRequests;
+     180              : 
+     181              :   @override
+     182              :   late ISignEngine signEngine;
+     183              : 
+     184            2 :   @override
+     185              :   Future<ConnectResponse> connect({
+     186              :     Map<String, RequiredNamespace>? requiredNamespaces,
+     187              :     Map<String, RequiredNamespace>? optionalNamespaces,
+     188              :     Map<String, String>? sessionProperties,
+     189              :     String? pairingTopic,
+     190              :     List<Relay>? relays,
+     191              :     List<List<String>>? methods = DEFAULT_METHODS,
+     192              :   }) async {
+     193              :     try {
+     194            4 :       return await signEngine.connect(
+     195              :         requiredNamespaces: requiredNamespaces,
+     196              :         optionalNamespaces: optionalNamespaces,
+     197              :         sessionProperties: sessionProperties,
+     198              :         pairingTopic: pairingTopic,
+     199              :         relays: relays,
+     200              :         methods: methods,
+     201              :       );
+     202              :     } catch (e) {
+     203              :       // print(e);
+     204              :       rethrow;
+     205              :     }
+     206              :   }
+     207              : 
+     208            1 :   @override
+     209              :   Future<dynamic> request({
+     210              :     required String topic,
+     211              :     required String chainId,
+     212              :     required SessionRequestParams request,
+     213              :   }) async {
+     214              :     try {
+     215            2 :       return await signEngine.request(
+     216              :         topic: topic,
+     217              :         chainId: chainId,
+     218              :         request: request,
+     219              :       );
+     220              :     } catch (e) {
+     221              :       rethrow;
+     222              :     }
+     223              :   }
+     224              : 
+     225            0 :   @override
+     226              :   Future<List<dynamic>> requestReadContract({
+     227              :     required DeployedContract deployedContract,
+     228              :     required String functionName,
+     229              :     required String rpcUrl,
+     230              :     EthereumAddress? sender,
+     231              :     List parameters = const [],
+     232              :   }) async {
+     233              :     try {
+     234            0 :       return await signEngine.requestReadContract(
+     235              :         sender: sender,
+     236              :         deployedContract: deployedContract,
+     237              :         functionName: functionName,
+     238              :         rpcUrl: rpcUrl,
+     239              :         parameters: parameters,
+     240              :       );
+     241              :     } catch (e) {
+     242              :       rethrow;
+     243              :     }
+     244              :   }
+     245              : 
+     246            0 :   @override
+     247              :   Future<dynamic> requestWriteContract({
+     248              :     required String topic,
+     249              :     required String chainId,
+     250              :     required String rpcUrl,
+     251              :     required DeployedContract deployedContract,
+     252              :     required String functionName,
+     253              :     required Transaction transaction,
+     254              :     String? method,
+     255              :     List parameters = const [],
+     256              :   }) async {
+     257              :     try {
+     258            0 :       return await signEngine.requestWriteContract(
+     259              :         topic: topic,
+     260              :         chainId: chainId,
+     261              :         rpcUrl: rpcUrl,
+     262              :         deployedContract: deployedContract,
+     263              :         functionName: functionName,
+     264              :         transaction: transaction,
+     265              :         method: method,
+     266              :         parameters: parameters,
+     267              :       );
+     268              :     } catch (e) {
+     269              :       rethrow;
+     270              :     }
+     271              :   }
+     272              : 
+     273            1 :   @override
+     274              :   void registerEventHandler({
+     275              :     required String chainId,
+     276              :     required String event,
+     277              :     void Function(String, dynamic)? handler,
+     278              :   }) {
+     279              :     try {
+     280            2 :       return signEngine.registerEventHandler(
+     281              :         chainId: chainId,
+     282              :         event: event,
+     283              :         handler: handler,
+     284              :       );
+     285              :     } catch (e) {
+     286              :       rethrow;
+     287              :     }
+     288              :   }
+     289              : 
+     290            1 :   @override
+     291              :   Future<void> ping({
+     292              :     required String topic,
+     293              :   }) async {
+     294              :     try {
+     295            2 :       return await signEngine.ping(topic: topic);
+     296              :     } catch (e) {
+     297              :       rethrow;
+     298              :     }
+     299              :   }
+     300              : 
+     301            1 :   @override
+     302              :   Future<void> disconnectSession({
+     303              :     required String topic,
+     304              :     required WalletConnectError reason,
+     305              :   }) async {
+     306              :     try {
+     307            2 :       return await signEngine.disconnectSession(
+     308              :         topic: topic,
+     309              :         reason: reason,
+     310              :       );
+     311              :     } catch (e) {
+     312              :       rethrow;
+     313              :     }
+     314              :   }
+     315              : 
+     316            2 :   @override
+     317              :   Map<String, SessionData> getActiveSessions() {
+     318              :     try {
+     319            4 :       return signEngine.getActiveSessions();
+     320              :     } catch (e) {
+     321              :       rethrow;
+     322              :     }
+     323              :   }
+     324              : 
+     325            1 :   @override
+     326              :   Map<String, SessionData> getSessionsForPairing({
+     327              :     required String pairingTopic,
+     328              :   }) {
+     329              :     try {
+     330            2 :       return signEngine.getSessionsForPairing(
+     331              :         pairingTopic: pairingTopic,
+     332              :       );
+     333              :     } catch (e) {
+     334              :       rethrow;
+     335              :     }
+     336              :   }
+     337              : 
+     338            1 :   @override
+     339              :   Map<String, ProposalData> getPendingSessionProposals() {
+     340              :     try {
+     341            2 :       return signEngine.getPendingSessionProposals();
+     342              :     } catch (e) {
+     343              :       rethrow;
+     344              :     }
+     345              :   }
+     346              : 
+     347            2 :   @override
+     348            6 :   IPairingStore get pairings => core.pairing.getStore();
+     349              : 
+     350              :   ///---------- (DEPRECATED) AUTH ENGINE ----------///
+     351              : 
+     352            0 :   @override
+     353            0 :   Event<AuthResponse> get onAuthResponse => authEngine.onAuthResponse;
+     354              : 
+     355            0 :   @override
+     356            0 :   IGenericStore<AuthPublicKey> get authKeys => authEngine.authKeys;
+     357            0 :   @override
+     358            0 :   IGenericStore<String> get pairingTopics => authEngine.pairingTopics;
+     359            0 :   @override
+     360              :   IGenericStore<StoredCacao> get completeRequests =>
+     361            0 :       authEngine.completeRequests;
+     362              : 
+     363              :   @Deprecated(
+     364              :     'AuthEngine/AuthClient is deprecated and will be removed soon.\n'
+     365              :     'Please use authentication methods from SignEngine/SignClient instead',
+     366              :   )
+     367              :   @override
+     368              :   late IAuthEngine authEngine;
+     369              : 
+     370            1 :   @override
+     371              :   Future<AuthRequestResponse> requestAuth({
+     372              :     required AuthRequestParams params,
+     373              :     String? pairingTopic,
+     374              :     List<List<String>>? methods = DEFAULT_METHODS,
+     375              :   }) async {
+     376              :     try {
+     377            2 :       return authEngine.requestAuth(
+     378              :         params: params,
+     379              :         pairingTopic: pairingTopic,
+     380              :         methods: methods,
+     381              :       );
+     382              :     } catch (e) {
+     383              :       rethrow;
+     384              :     }
+     385              :   }
+     386              : 
+     387            0 :   @override
+     388              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+     389              :     required String pairingTopic,
+     390              :   }) {
+     391              :     try {
+     392            0 :       return authEngine.getCompletedRequestsForPairing(
+     393              :         pairingTopic: pairingTopic,
+     394              :       );
+     395              :     } catch (e) {
+     396              :       rethrow;
+     397              :     }
+     398              :   }
+     399              : 
+     400              :   ///---------- ONE-CLICK AUTH SIGN ENGINE ----------///
+     401              : 
+     402            0 :   @override
+     403              :   Event<SessionAuthResponse> get onSessionAuthResponse =>
+     404            0 :       signEngine.onSessionAuthResponse;
+     405              : 
+     406            0 :   @override
+     407              :   Future<SessionAuthRequestResponse> authenticate({
+     408              :     required SessionAuthRequestParams params,
+     409              :     String? pairingTopic,
+     410              :     List<List<String>>? methods = const [
+     411              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
+     412              :     ],
+     413              :   }) async {
+     414              :     try {
+     415            0 :       return signEngine.authenticate(
+     416              :         params: params,
+     417              :         pairingTopic: pairingTopic,
+     418              :         methods: methods,
+     419              :       );
+     420              :     } catch (e) {
+     421              :       rethrow;
+     422              :     }
+     423              :   }
+     424              : 
+     425            0 :   @override
+     426              :   Future<bool> validateSignedCacao({
+     427              :     required Cacao cacao,
+     428              :     required String projectId,
+     429              :   }) {
+     430              :     try {
+     431            0 :       return signEngine.validateSignedCacao(
+     432              :         cacao: cacao,
+     433              :         projectId: projectId,
+     434              :       );
+     435              :     } catch (e) {
+     436              :       rethrow;
+     437              :     }
+     438              :   }
+     439              : 
+     440            0 :   @override
+     441              :   String formatAuthMessage({
+     442              :     required String iss,
+     443              :     required CacaoRequestPayload cacaoPayload,
+     444              :   }) {
+     445              :     try {
+     446            0 :       return signEngine.formatAuthMessage(
+     447              :         iss: iss,
+     448              :         cacaoPayload: cacaoPayload,
+     449              :       );
+     450              :     } catch (e) {
+     451              :       rethrow;
+     452              :     }
+     453              :   }
+     454              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/index-sort-f.html b/coverage/html/web3wallet/index-sort-f.html new file mode 100644 index 00000000..79586ac9 --- /dev/null +++ b/coverage/html/web3wallet/index-sort-f.html @@ -0,0 +1,105 @@ + + + + + + + LCOV - lcov.info - web3wallet + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
web3wallet.dart +
71.7%71.7%
+
71.7 %13899-
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/index-sort-l.html b/coverage/html/web3wallet/index-sort-l.html new file mode 100644 index 00000000..6ae5355a --- /dev/null +++ b/coverage/html/web3wallet/index-sort-l.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - web3wallet + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3wallet.dart +
71.7%71.7%
+
71.7 %13899
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/index.html b/coverage/html/web3wallet/index.html new file mode 100644 index 00000000..e84954e3 --- /dev/null +++ b/coverage/html/web3wallet/index.html @@ -0,0 +1,91 @@ + + + + + + + LCOV - lcov.info - web3wallet + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3wallet.dart +
71.7%71.7%
+
71.7 %13899
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/web3wallet.dart.func-c.html b/coverage/html/web3wallet/web3wallet.dart.func-c.html new file mode 100644 index 00000000..35b071fe --- /dev/null +++ b/coverage/html/web3wallet/web3wallet.dart.func-c.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - web3wallet/web3wallet.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3wallet - web3wallet.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/web3wallet.dart.func.html b/coverage/html/web3wallet/web3wallet.dart.func.html new file mode 100644 index 00000000..edd605f9 --- /dev/null +++ b/coverage/html/web3wallet/web3wallet.dart.func.html @@ -0,0 +1,75 @@ + + + + + + + LCOV - lcov.info - web3wallet/web3wallet.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3wallet - web3wallet.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
+
+ +
+ + + + + + + + + +

Function Name Sort by function nameHit count Sort by function hit count
+
+
+ + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/html/web3wallet/web3wallet.dart.gcov.html b/coverage/html/web3wallet/web3wallet.dart.gcov.html new file mode 100644 index 00000000..6cea2e08 --- /dev/null +++ b/coverage/html/web3wallet/web3wallet.dart.gcov.html @@ -0,0 +1,612 @@ + + + + + + + LCOV - lcov.info - web3wallet/web3wallet.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - web3wallet - web3wallet.dartCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
+
+ + + + + + + + +

+
            Line data    Source code
+
+       1              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
+       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
+       3              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
+       4              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
+       5              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
+       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
+       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
+       8              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
+       9              : 
+      10              : class Web3Wallet implements IWeb3Wallet {
+      11              :   bool _initialized = false;
+      12              : 
+      13            3 :   static Future<Web3Wallet> createInstance({
+      14              :     required String projectId,
+      15              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
+      16              :     String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
+      17              :     required PairingMetadata metadata,
+      18              :     bool memoryStore = false,
+      19              :     LogLevel logLevel = LogLevel.nothing,
+      20              :     IHttpClient httpClient = const HttpWrapper(),
+      21              :   }) async {
+      22            3 :     final client = Web3Wallet(
+      23            3 :       core: Core(
+      24              :         projectId: projectId,
+      25              :         relayUrl: relayUrl,
+      26              :         pushUrl: pushUrl,
+      27              :         memoryStore: memoryStore,
+      28              :         logLevel: logLevel,
+      29              :         httpClient: httpClient,
+      30              :       ),
+      31              :       metadata: metadata,
+      32              :     );
+      33            3 :     await client.init();
+      34              : 
+      35              :     return client;
+      36              :   }
+      37              : 
+      38              :   ///---------- GENERIC ----------///
+      39              : 
+      40              :   @override
+      41              :   final String protocol = 'wc';
+      42              :   @override
+      43              :   final int version = 2;
+      44              : 
+      45              :   @override
+      46              :   final ICore core;
+      47              :   @override
+      48              :   final PairingMetadata metadata;
+      49              : 
+      50            3 :   Web3Wallet({
+      51              :     required this.core,
+      52              :     required this.metadata,
+      53              :   }) {
+      54            6 :     signEngine = SignEngine(
+      55            3 :       core: core,
+      56            3 :       metadata: metadata,
+      57            3 :       proposals: GenericStore(
+      58            6 :         storage: core.storage,
+      59              :         context: StoreVersions.CONTEXT_PROPOSALS,
+      60              :         version: StoreVersions.VERSION_PROPOSALS,
+      61            0 :         fromJson: (dynamic value) {
+      62            0 :           return ProposalData.fromJson(value);
+      63              :         },
+      64              :       ),
+      65            3 :       sessions: Sessions(
+      66            6 :         storage: core.storage,
+      67              :         context: StoreVersions.CONTEXT_SESSIONS,
+      68              :         version: StoreVersions.VERSION_SESSIONS,
+      69            0 :         fromJson: (dynamic value) {
+      70            0 :           return SessionData.fromJson(value);
+      71              :         },
+      72              :       ),
+      73            3 :       pendingRequests: GenericStore(
+      74            6 :         storage: core.storage,
+      75              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
+      76              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
+      77            0 :         fromJson: (dynamic value) {
+      78            0 :           return SessionRequest.fromJson(value);
+      79              :         },
+      80              :       ),
+      81            3 :       authKeys: GenericStore(
+      82            6 :         storage: core.storage,
+      83              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
+      84              :         version: StoreVersions.VERSION_AUTH_KEYS,
+      85            0 :         fromJson: (dynamic value) {
+      86            0 :           return AuthPublicKey.fromJson(value);
+      87              :         },
+      88              :       ),
+      89            3 :       pairingTopics: GenericStore(
+      90            6 :         storage: core.storage,
+      91              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
+      92              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
+      93            0 :         fromJson: (dynamic value) {
+      94              :           return value;
+      95              :         },
+      96              :       ),
+      97            3 :       authRequests: GenericStore(
+      98            6 :         storage: core.storage,
+      99              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     100              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     101            0 :         fromJson: (dynamic value) {
+     102            0 :           return PendingAuthRequest.fromJson(value);
+     103              :         },
+     104              :       ),
+     105            3 :       completeRequests: GenericStore(
+     106            6 :         storage: core.storage,
+     107              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
+     108              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
+     109            0 :         fromJson: (dynamic value) {
+     110            0 :           return StoredCacao.fromJson(value);
+     111              :         },
+     112              :       ),
+     113            3 :       sessionAuthRequests: GenericStore(
+     114            6 :         storage: core.storage,
+     115              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
+     116              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
+     117            0 :         fromJson: (dynamic value) {
+     118            0 :           return PendingSessionAuthRequest.fromJson(value);
+     119              :         },
+     120              :       ),
+     121              :     );
+     122              : 
+     123            6 :     authEngine = AuthEngine(
+     124            3 :       core: core,
+     125            3 :       metadata: metadata,
+     126            6 :       authKeys: signEngine.authKeys,
+     127            6 :       pairingTopics: signEngine.pairingTopics,
+     128            6 :       authRequests: signEngine.authRequests,
+     129            6 :       completeRequests: signEngine.completeRequests,
+     130              :     );
+     131              :   }
+     132              : 
+     133            3 :   @override
+     134              :   Future<void> init() async {
+     135            3 :     if (_initialized) {
+     136              :       return;
+     137              :     }
+     138              : 
+     139            6 :     await core.start();
+     140            6 :     await signEngine.init();
+     141            6 :     await authEngine.init();
+     142              : 
+     143            3 :     _initialized = true;
+     144              :   }
+     145              : 
+     146            2 :   @override
+     147              :   Future<PairingInfo> pair({
+     148              :     required Uri uri,
+     149              :   }) async {
+     150              :     try {
+     151            4 :       return await signEngine.pair(uri: uri);
+     152              :     } catch (e) {
+     153              :       rethrow;
+     154              :     }
+     155              :   }
+     156              : 
+     157              :   ///---------- SIGN ENGINE ----------///
+     158              : 
+     159            1 :   @override
+     160            2 :   Event<SessionConnect> get onSessionConnect => signEngine.onSessionConnect;
+     161            1 :   @override
+     162            2 :   Event<SessionDelete> get onSessionDelete => signEngine.onSessionDelete;
+     163            1 :   @override
+     164            2 :   Event<SessionExpire> get onSessionExpire => signEngine.onSessionExpire;
+     165            2 :   @override
+     166              :   Event<SessionProposalEvent> get onSessionProposal =>
+     167            4 :       signEngine.onSessionProposal;
+     168            0 :   @override
+     169              :   Event<SessionProposalErrorEvent> get onSessionProposalError =>
+     170            0 :       signEngine.onSessionProposalError;
+     171            1 :   @override
+     172              :   Event<SessionProposalEvent> get onProposalExpire =>
+     173            2 :       signEngine.onProposalExpire;
+     174            1 :   @override
+     175              :   Event<SessionRequestEvent> get onSessionRequest =>
+     176            2 :       signEngine.onSessionRequest;
+     177            1 :   @override
+     178            2 :   Event<SessionPing> get onSessionPing => signEngine.onSessionPing;
+     179              : 
+     180            1 :   @override
+     181            2 :   IGenericStore<ProposalData> get proposals => signEngine.proposals;
+     182            1 :   @override
+     183            2 :   ISessions get sessions => signEngine.sessions;
+     184            1 :   @override
+     185              :   IGenericStore<SessionRequest> get pendingRequests =>
+     186            2 :       signEngine.pendingRequests;
+     187              : 
+     188              :   @override
+     189              :   late ISignEngine signEngine;
+     190              : 
+     191            2 :   @override
+     192              :   Future<ApproveResponse> approveSession({
+     193              :     required int id,
+     194              :     required Map<String, Namespace> namespaces,
+     195              :     Map<String, String>? sessionProperties,
+     196              :     String? relayProtocol,
+     197              :   }) async {
+     198              :     try {
+     199            4 :       return await signEngine.approveSession(
+     200              :         id: id,
+     201              :         namespaces: namespaces,
+     202              :         sessionProperties: sessionProperties,
+     203              :         relayProtocol: relayProtocol,
+     204              :       );
+     205              :     } catch (e) {
+     206              :       rethrow;
+     207              :     }
+     208              :   }
+     209              : 
+     210            1 :   @override
+     211              :   Future<void> rejectSession({
+     212              :     required int id,
+     213              :     required WalletConnectError reason,
+     214              :   }) async {
+     215              :     try {
+     216            2 :       return await signEngine.rejectSession(
+     217              :         id: id,
+     218              :         reason: reason,
+     219              :       );
+     220              :     } catch (e) {
+     221              :       rethrow;
+     222              :     }
+     223              :   }
+     224              : 
+     225            1 :   @override
+     226              :   Future<void> updateSession({
+     227              :     required String topic,
+     228              :     required Map<String, Namespace> namespaces,
+     229              :   }) async {
+     230              :     try {
+     231            2 :       return await signEngine.updateSession(
+     232              :         topic: topic,
+     233              :         namespaces: namespaces,
+     234              :       );
+     235              :     } catch (e) {
+     236              :       // final error = e as WCError;
+     237              :       rethrow;
+     238              :     }
+     239              :   }
+     240              : 
+     241            1 :   @override
+     242              :   Future<void> extendSession({
+     243              :     required String topic,
+     244              :   }) async {
+     245              :     try {
+     246            2 :       return await signEngine.extendSession(topic: topic);
+     247              :     } catch (e) {
+     248              :       rethrow;
+     249              :     }
+     250              :   }
+     251              : 
+     252            1 :   @override
+     253              :   void registerRequestHandler({
+     254              :     required String chainId,
+     255              :     required String method,
+     256              :     dynamic Function(String, dynamic)? handler,
+     257              :   }) {
+     258              :     try {
+     259            2 :       return signEngine.registerRequestHandler(
+     260              :         chainId: chainId,
+     261              :         method: method,
+     262              :         handler: handler,
+     263              :       );
+     264              :     } catch (e) {
+     265              :       rethrow;
+     266              :     }
+     267              :   }
+     268              : 
+     269            1 :   @override
+     270              :   Future<void> respondSessionRequest({
+     271              :     required String topic,
+     272              :     required JsonRpcResponse response,
+     273              :   }) {
+     274              :     try {
+     275            2 :       return signEngine.respondSessionRequest(
+     276              :         topic: topic,
+     277              :         response: response,
+     278              :       );
+     279              :     } catch (e) {
+     280              :       rethrow;
+     281              :     }
+     282              :   }
+     283              : 
+     284            1 :   @override
+     285              :   void registerEventEmitter({
+     286              :     required String chainId,
+     287              :     required String event,
+     288              :   }) {
+     289              :     try {
+     290            2 :       return signEngine.registerEventEmitter(
+     291              :         chainId: chainId,
+     292              :         event: event,
+     293              :       );
+     294              :     } catch (e) {
+     295              :       rethrow;
+     296              :     }
+     297              :   }
+     298              : 
+     299            1 :   @override
+     300              :   void registerAccount({
+     301              :     required String chainId,
+     302              :     required String accountAddress,
+     303              :   }) {
+     304              :     try {
+     305            2 :       return signEngine.registerAccount(
+     306              :         chainId: chainId,
+     307              :         accountAddress: accountAddress,
+     308              :       );
+     309              :     } catch (e) {
+     310              :       rethrow;
+     311              :     }
+     312              :   }
+     313              : 
+     314            1 :   @override
+     315              :   Future<void> emitSessionEvent({
+     316              :     required String topic,
+     317              :     required String chainId,
+     318              :     required SessionEventParams event,
+     319              :   }) async {
+     320              :     try {
+     321            2 :       return await signEngine.emitSessionEvent(
+     322              :         topic: topic,
+     323              :         chainId: chainId,
+     324              :         event: event,
+     325              :       );
+     326              :     } catch (e) {
+     327              :       rethrow;
+     328              :     }
+     329              :   }
+     330              : 
+     331            1 :   @override
+     332              :   Future<void> disconnectSession({
+     333              :     required String topic,
+     334              :     required WalletConnectError reason,
+     335              :   }) async {
+     336              :     try {
+     337            2 :       return await signEngine.disconnectSession(
+     338              :         topic: topic,
+     339              :         reason: reason,
+     340              :       );
+     341              :     } catch (e) {
+     342              :       rethrow;
+     343              :     }
+     344              :   }
+     345              : 
+     346            1 :   @override
+     347              :   SessionData? find({
+     348              :     required Map<String, RequiredNamespace> requiredNamespaces,
+     349              :   }) {
+     350              :     try {
+     351            2 :       return signEngine.find(requiredNamespaces: requiredNamespaces);
+     352              :     } catch (e) {
+     353              :       rethrow;
+     354              :     }
+     355              :   }
+     356              : 
+     357            2 :   @override
+     358              :   Map<String, SessionData> getActiveSessions() {
+     359              :     try {
+     360            4 :       return signEngine.getActiveSessions();
+     361              :     } catch (e) {
+     362              :       rethrow;
+     363              :     }
+     364              :   }
+     365              : 
+     366            1 :   @override
+     367              :   Map<String, SessionData> getSessionsForPairing({
+     368              :     required String pairingTopic,
+     369              :   }) {
+     370              :     try {
+     371            2 :       return signEngine.getSessionsForPairing(
+     372              :         pairingTopic: pairingTopic,
+     373              :       );
+     374              :     } catch (e) {
+     375              :       rethrow;
+     376              :     }
+     377              :   }
+     378              : 
+     379            2 :   @override
+     380              :   Map<String, ProposalData> getPendingSessionProposals() {
+     381              :     try {
+     382            4 :       return signEngine.getPendingSessionProposals();
+     383              :     } catch (e) {
+     384              :       rethrow;
+     385              :     }
+     386              :   }
+     387              : 
+     388            1 :   @override
+     389              :   Map<String, SessionRequest> getPendingSessionRequests() {
+     390              :     try {
+     391            2 :       return signEngine.getPendingSessionRequests();
+     392              :     } catch (e) {
+     393              :       rethrow;
+     394              :     }
+     395              :   }
+     396              : 
+     397            2 :   @override
+     398            6 :   IPairingStore get pairings => core.pairing.getStore();
+     399              : 
+     400              :   ///---------- (DEPRECATED) AUTH ENGINE ----------///
+     401              : 
+     402            2 :   @override
+     403            4 :   Event<AuthRequest> get onAuthRequest => authEngine.onAuthRequest;
+     404              : 
+     405            0 :   @override
+     406            0 :   IGenericStore<AuthPublicKey> get authKeys => authEngine.authKeys;
+     407            0 :   @override
+     408            0 :   IGenericStore<String> get pairingTopics => authEngine.pairingTopics;
+     409            0 :   @override
+     410            0 :   IGenericStore<PendingAuthRequest> get authRequests => authEngine.authRequests;
+     411            0 :   @override
+     412              :   IGenericStore<StoredCacao> get completeRequests =>
+     413            0 :       authEngine.completeRequests;
+     414              : 
+     415              :   @Deprecated(
+     416              :     'AuthEngine/AuthClient is deprecated and will be removed soon.\n'
+     417              :     'Please use authentication methods from SignEngine/SignClient instead',
+     418              :   )
+     419              :   @override
+     420              :   late IAuthEngine authEngine;
+     421              : 
+     422            2 :   @override
+     423              :   Future<void> respondAuthRequest({
+     424              :     required int id,
+     425              :     required String iss,
+     426              :     CacaoSignature? signature,
+     427              :     WalletConnectError? error,
+     428              :   }) {
+     429              :     try {
+     430            4 :       return authEngine.respondAuthRequest(
+     431              :         id: id,
+     432              :         iss: iss,
+     433              :         signature: signature,
+     434              :         error: error,
+     435              :       );
+     436              :     } catch (e) {
+     437              :       rethrow;
+     438              :     }
+     439              :   }
+     440              : 
+     441            2 :   @override
+     442              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
+     443              :     try {
+     444            4 :       return authEngine.getPendingAuthRequests();
+     445              :     } catch (e) {
+     446              :       rethrow;
+     447              :     }
+     448              :   }
+     449              : 
+     450            1 :   @override
+     451              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
+     452              :     required String pairingTopic,
+     453              :   }) {
+     454              :     try {
+     455            2 :       return authEngine.getCompletedRequestsForPairing(
+     456              :         pairingTopic: pairingTopic,
+     457              :       );
+     458              :     } catch (e) {
+     459              :       rethrow;
+     460              :     }
+     461              :   }
+     462              : 
+     463              :   ///---------- ONE-CLICK AUTH SIGN ENGINE ----------///
+     464              : 
+     465            0 :   @override
+     466              :   IGenericStore<PendingSessionAuthRequest> get sessionAuthRequests =>
+     467            0 :       signEngine.sessionAuthRequests;
+     468            0 :   @override
+     469              :   Event<SessionAuthRequest> get onSessionAuthRequest =>
+     470            0 :       signEngine.onSessionAuthRequest;
+     471              : 
+     472            0 :   @override
+     473              :   Future<ApproveResponse> approveSessionAuthenticate({
+     474              :     required int id,
+     475              :     List<Cacao>? auths,
+     476              :   }) {
+     477              :     try {
+     478            0 :       return signEngine.approveSessionAuthenticate(
+     479              :         id: id,
+     480              :         auths: auths,
+     481              :       );
+     482              :     } catch (e) {
+     483              :       rethrow;
+     484              :     }
+     485              :   }
+     486              : 
+     487            0 :   @override
+     488              :   Future<void> rejectSessionAuthenticate({
+     489              :     required int id,
+     490              :     required WalletConnectError reason,
+     491              :   }) {
+     492              :     try {
+     493            0 :       return signEngine.rejectSessionAuthenticate(
+     494              :         id: id,
+     495              :         reason: reason,
+     496              :       );
+     497              :     } catch (e) {
+     498              :       rethrow;
+     499              :     }
+     500              :   }
+     501              : 
+     502            0 :   @override
+     503              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
+     504              :     try {
+     505            0 :       return signEngine.getPendingSessionAuthRequests();
+     506              :     } catch (e) {
+     507              :       rethrow;
+     508              :     }
+     509              :   }
+     510              : 
+     511            0 :   @override
+     512              :   String formatAuthMessage({
+     513              :     required String iss,
+     514              :     required CacaoRequestPayload cacaoPayload,
+     515              :   }) {
+     516              :     try {
+     517            0 :       return signEngine.formatAuthMessage(
+     518              :         iss: iss,
+     519              :         cacaoPayload: cacaoPayload,
+     520              :       );
+     521              :     } catch (e) {
+     522              :       rethrow;
+     523              :     }
+     524              :   }
+     525              : 
+     526            0 :   @override
+     527              :   Future<bool> validateSignedCacao({
+     528              :     required Cacao cacao,
+     529              :     required String projectId,
+     530              :   }) {
+     531              :     try {
+     532            0 :       return signEngine.validateSignedCacao(
+     533              :         cacao: cacao,
+     534              :         projectId: projectId,
+     535              :       );
+     536              :     } catch (e) {
+     537              :       rethrow;
+     538              :     }
+     539              :   }
+     540              : }
+        
+
+
+ + + + +
Generated by: LCOV version 2.1-1
+
+ + + diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 00000000..e0eef0de --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,4705 @@ +TN: +SF:lib/apis/auth_api/auth_client.dart +FNF:0 +FNH:0 +DA:22,0 +DA:25,0 +DA:28,0 +DA:29,0 +DA:30,1 +DA:31,2 +DA:33,1 +DA:34,2 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:49,0 +DA:57,0 +DA:58,0 +DA:67,0 +DA:72,1 +DA:76,2 +DA:79,1 +DA:80,1 +DA:83,0 +DA:84,0 +DA:87,1 +DA:88,1 +DA:91,0 +DA:95,1 +DA:96,1 +DA:99,0 +DA:100,0 +DA:103,1 +DA:104,1 +DA:107,0 +DA:108,0 +DA:114,1 +DA:116,1 +DA:120,2 +DA:121,2 +DA:123,1 +DA:126,1 +DA:133,2 +DA:143,0 +DA:151,0 +DA:162,0 +DA:165,0 +DA:171,1 +DA:176,2 +DA:184,1 +DA:190,2 +LF:54 +LH:25 +end_of_record +TN: +SF:lib/apis/auth_api/auth_engine.dart +FNF:0 +FNH:0 +DA:54,3 +DA:63,3 +DA:65,3 +DA:69,9 +DA:70,6 +DA:71,6 +DA:72,6 +DA:73,6 +DA:75,3 +DA:77,3 +DA:80,2 +DA:86,2 +DA:88,2 +DA:93,3 +DA:96,1 +DA:97,1 +DA:99,6 +DA:102,6 +DA:104,8 +DA:105,2 +DA:107,2 +DA:108,2 +DA:111,2 +DA:113,2 +DA:117,2 +DA:119,4 +DA:121,2 +DA:124,4 +DA:130,6 +DA:136,2 +DA:138,2 +DA:147,2 +DA:155,2 +DA:167,6 +DA:170,6 +DA:173,2 +DA:177,0 +DA:178,0 +DA:183,0 +DA:184,0 +DA:188,6 +DA:190,2 +DA:191,2 +DA:192,2 +DA:193,4 +DA:194,2 +DA:195,2 +DA:202,2 +DA:203,2 +DA:204,2 +DA:207,4 +DA:208,4 +DA:210,2 +DA:211,0 +DA:216,2 +DA:217,0 +DA:223,2 +DA:228,4 +DA:232,0 +DA:240,0 +DA:241,0 +DA:243,2 +DA:248,4 +DA:249,2 +DA:253,2 +DA:260,2 +DA:262,2 +DA:263,2 +DA:270,2 +DA:271,4 +DA:272,6 +DA:273,8 +DA:276,2 +DA:283,0 +DA:287,0 +DA:291,2 +DA:293,2 +DA:295,2 +DA:301,6 +DA:305,2 +DA:309,6 +DA:311,4 +DA:312,2 +DA:313,2 +DA:315,2 +DA:322,2 +DA:324,2 +DA:325,8 +DA:326,4 +DA:331,1 +DA:335,1 +DA:336,1 +DA:337,1 +DA:338,1 +DA:339,3 +DA:341,2 +DA:342,2 +DA:347,2 +DA:353,4 +DA:354,2 +DA:355,4 +DA:356,4 +DA:357,4 +DA:358,4 +DA:359,4 +DA:360,2 +DA:361,2 +DA:362,5 +DA:363,1 +DA:365,2 +DA:369,2 +DA:377,6 +DA:384,2 +DA:385,2 +DA:386,0 +DA:392,3 +DA:393,9 +DA:395,3 +DA:400,2 +DA:405,4 +DA:408,2 +DA:409,2 +DA:412,4 +DA:413,4 +DA:414,2 +DA:415,2 +DA:417,2 +DA:422,4 +DA:423,2 +DA:424,2 +DA:426,2 +DA:427,2 +DA:430,0 +DA:431,0 +DA:432,0 +DA:434,0 +DA:435,0 +DA:436,0 +LF:138 +LH:120 +end_of_record +TN: +SF:lib/apis/core/core.dart +FNF:0 +FNH:0 +DA:33,7 +DA:35,7 +DA:72,9 +DA:73,9 +DA:75,0 +DA:77,0 +DA:80,0 +DA:82,0 +DA:88,10 +DA:97,20 +DA:98,10 +DA:99,10 +DA:101,20 +DA:102,20 +DA:105,20 +DA:107,10 +DA:108,10 +DA:111,0 +DA:114,20 +DA:116,10 +DA:117,10 +DA:120,0 +DA:121,0 +DA:124,10 +DA:125,10 +DA:128,0 +DA:132,20 +DA:133,10 +DA:136,0 +DA:138,20 +DA:140,10 +DA:141,10 +DA:144,0 +DA:145,0 +DA:148,10 +DA:149,10 +DA:152,0 +DA:154,10 +DA:155,10 +DA:158,0 +DA:161,20 +DA:163,10 +DA:164,10 +DA:168,20 +DA:174,9 +DA:176,18 +DA:177,18 +DA:178,18 +DA:179,18 +DA:180,18 +DA:181,18 +LF:51 +LH:38 +end_of_record +TN: +SF:lib/apis/core/crypto/crypto.dart +FNF:0 +FNH:0 +DA:24,0 +DA:35,10 +DA:40,10 +DA:41,10 +DA:43,10 +DA:45,10 +DA:49,20 +DA:51,10 +DA:54,0 +DA:56,0 +DA:57,0 +DA:60,0 +DA:62,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:70,6 +DA:72,6 +DA:74,12 +DA:75,6 +DA:78,6 +DA:84,6 +DA:86,6 +DA:87,12 +DA:88,6 +DA:91,8 +DA:96,8 +DA:98,16 +DA:100,16 +DA:104,4 +DA:106,4 +DA:107,8 +DA:110,6 +DA:112,6 +DA:113,12 +DA:116,7 +DA:122,7 +DA:126,14 +DA:128,4 +DA:129,2 +DA:130,2 +DA:131,2 +DA:135,7 +DA:137,14 +DA:138,2 +DA:139,2 +DA:140,2 +DA:143,7 +DA:148,14 +DA:151,7 +DA:152,7 +DA:158,7 +DA:164,7 +DA:166,14 +DA:168,6 +DA:171,14 +DA:172,2 +DA:173,2 +DA:174,2 +DA:176,7 +DA:181,14 +DA:186,9 +DA:188,9 +DA:190,9 +DA:191,18 +DA:192,18 +DA:193,18 +DA:202,0 +DA:204,0 +DA:206,0 +DA:211,6 +DA:212,24 +DA:213,6 +DA:216,6 +DA:217,12 +DA:220,7 +DA:222,14 +DA:238,9 +DA:239,18 +DA:241,18 +DA:242,18 +DA:245,18 +DA:248,10 +DA:249,10 +DA:250,1 +DA:254,7 +DA:256,7 +LF:87 +LH:75 +end_of_record +TN: +SF:lib/apis/core/crypto/crypto_models.dart +FNF:0 +FNH:0 +DA:9,22 +DA:11,0 +DA:12,0 +DA:15,0 +DA:16,0 +DA:27,0 +DA:43,7 +DA:57,7 +DA:72,2 +DA:82,6 +LF:10 +LH:5 +end_of_record +TN: +SF:lib/apis/core/crypto/crypto_utils.dart +FNF:0 +FNH:0 +DA:16,30 +DA:23,6 +DA:25,6 +DA:27,6 +DA:28,12 +DA:29,12 +DA:33,10 +DA:35,10 +DA:36,20 +DA:37,30 +DA:42,10 +DA:44,20 +DA:47,6 +DA:49,6 +DA:50,6 +DA:51,6 +DA:54,6 +DA:56,12 +DA:57,6 +DA:61,6 +DA:63,6 +DA:64,6 +DA:67,8 +DA:69,8 +DA:70,16 +DA:71,8 +DA:72,8 +DA:79,5 +DA:81,5 +DA:82,10 +DA:83,5 +DA:84,5 +DA:90,7 +DA:103,7 +DA:112,8 +DA:114,7 +DA:115,7 +DA:116,7 +DA:117,7 +DA:118,7 +DA:123,7 +DA:125,7 +DA:128,3 +DA:133,7 +DA:135,7 +DA:136,7 +DA:137,7 +DA:139,7 +DA:140,7 +DA:141,7 +DA:145,7 +DA:146,7 +DA:149,7 +DA:156,7 +DA:158,7 +DA:166,3 +DA:170,7 +DA:172,7 +DA:175,7 +DA:177,7 +DA:178,7 +DA:182,7 +DA:183,3 +DA:185,3 +DA:187,3 +DA:189,14 +DA:190,7 +DA:191,7 +DA:192,7 +DA:194,7 +DA:203,7 +DA:208,7 +DA:209,7 +DA:210,6 +DA:212,7 +DA:213,7 +DA:219,7 +DA:226,7 +DA:236,7 +DA:243,7 +DA:247,14 +DA:248,3 +DA:249,3 +LF:83 +LH:83 +end_of_record +TN: +SF:lib/apis/core/echo/echo.dart +FNF:0 +FNH:0 +DA:10,11 +DA:12,1 +DA:14,2 +DA:15,3 +DA:16,2 +DA:22,2 +DA:23,3 +DA:24,4 +DA:27,0 +DA:31,1 +DA:33,2 +DA:34,3 +DA:35,2 +DA:40,2 +DA:41,3 +DA:42,4 +DA:45,0 +LF:17 +LH:15 +end_of_record +TN: +SF:lib/apis/core/echo/echo_client.dart +FNF:0 +FNH:0 +DA:14,11 +DA:16,1 +DA:22,1 +DA:24,3 +DA:25,2 +DA:28,2 +DA:31,2 +DA:32,1 +DA:35,1 +DA:40,3 +DA:42,2 +DA:44,2 +DA:45,1 +LF:13 +LH:13 +end_of_record +TN: +SF:lib/apis/core/echo/models/echo_body.dart +FNF:0 +FNH:0 +DA:11,1 +DA:17,0 +DA:18,0 +DA:20,2 +LF:4 +LH:2 +end_of_record +TN: +SF:lib/apis/core/echo/models/echo_response.dart +FNF:0 +FNH:0 +DA:11,1 +DA:17,1 +DA:18,1 +DA:20,0 +DA:28,1 +DA:30,1 +DA:31,1 +DA:33,0 +DA:42,1 +DA:48,2 +DA:50,0 +LF:11 +LH:8 +end_of_record +TN: +SF:lib/apis/core/heartbit/heartbeat.dart +FNF:0 +FNH:0 +DA:12,10 +DA:14,9 +DA:16,9 +DA:17,18 +DA:18,18 +DA:19,18 +DA:23,0 +DA:25,0 +DA:26,0 +LF:9 +LH:6 +end_of_record +TN: +SF:lib/apis/core/pairing/expirer.dart +FNF:0 +FNH:0 +DA:11,10 +DA:18,0 +DA:20,0 +DA:22,0 +DA:23,0 +DA:32,6 +DA:34,6 +DA:36,12 +DA:37,12 +DA:38,6 +DA:39,4 +DA:47,4 +DA:49,4 +DA:51,8 +DA:56,8 +DA:57,4 +DA:62,4 +LF:17 +LH:13 +end_of_record +TN: +SF:lib/apis/core/pairing/json_rpc_history.dart +FNF:0 +FNH:0 +DA:7,11 +DA:14,1 +DA:16,1 +DA:19,2 +DA:20,2 +DA:24,1 +DA:27,1 +DA:31,2 +DA:32,1 +DA:33,1 +DA:34,0 +DA:36,1 +LF:12 +LH:11 +end_of_record +TN: +SF:lib/apis/core/pairing/pairing.dart +FNF:0 +FNH:0 +DA:29,6 +DA:66,10 +DA:73,9 +DA:75,9 +DA:79,9 +DA:80,9 +DA:81,9 +DA:83,27 +DA:84,18 +DA:85,18 +DA:86,18 +DA:88,9 +DA:90,9 +DA:92,9 +DA:95,6 +DA:97,12 +DA:98,24 +DA:102,7 +DA:104,7 +DA:105,28 +DA:106,21 +DA:107,7 +DA:110,7 +DA:111,7 +DA:116,20 +DA:118,7 +DA:119,14 +DA:120,14 +DA:128,14 +DA:129,7 +DA:134,14 +DA:135,21 +DA:136,21 +DA:138,7 +DA:145,7 +DA:150,7 +DA:153,7 +DA:156,7 +DA:157,14 +DA:158,3 +DA:164,7 +DA:165,14 +DA:166,14 +DA:167,7 +DA:172,14 +DA:176,7 +DA:177,14 +DA:178,21 +DA:180,4 +DA:182,8 +DA:183,4 +DA:184,4 +DA:198,14 +DA:199,21 +DA:200,28 +DA:203,21 +DA:205,14 +DA:206,7 +DA:212,2 +DA:221,7 +DA:223,7 +DA:224,7 +DA:229,14 +DA:230,7 +DA:236,14 +DA:241,21 +DA:244,9 +DA:250,18 +DA:251,6 +DA:252,6 +DA:260,27 +DA:267,2 +DA:273,2 +DA:274,4 +DA:276,2 +DA:279,2 +DA:286,1 +DA:291,1 +DA:294,1 +DA:295,1 +DA:304,2 +DA:308,3 +DA:314,5 +DA:319,5 +DA:320,10 +DA:326,9 +DA:328,18 +DA:331,4 +DA:333,8 +DA:336,5 +DA:338,5 +DA:340,5 +DA:342,10 +DA:344,5 +DA:347,5 +DA:352,4 +DA:354,4 +DA:356,4 +DA:357,8 +DA:360,4 +DA:363,8 +DA:368,8 +DA:370,8 +DA:371,4 +DA:378,5 +DA:380,5 +DA:383,6 +DA:385,12 +DA:386,4 +DA:388,4 +DA:392,18 +DA:393,0 +DA:395,0 +DA:402,6 +DA:411,18 +DA:412,6 +DA:415,6 +DA:422,18 +DA:432,12 +DA:434,4 +DA:438,12 +DA:439,21 +DA:442,18 +DA:444,18 +DA:447,6 +DA:448,6 +DA:453,6 +DA:454,0 +DA:458,12 +DA:459,0 +DA:462,12 +DA:468,6 +DA:476,18 +DA:477,6 +DA:480,6 +DA:484,18 +DA:494,12 +DA:495,18 +DA:498,6 +DA:499,6 +DA:503,3 +DA:512,9 +DA:513,3 +DA:516,3 +DA:520,9 +DA:531,3 +DA:532,0 +DA:533,6 +DA:537,9 +DA:540,3 +DA:541,3 +DA:547,9 +DA:549,27 +DA:554,16 +DA:555,8 +DA:556,0 +DA:558,0 +DA:563,2 +DA:564,6 +DA:565,4 +DA:566,6 +DA:568,6 +DA:572,9 +DA:573,9 +DA:574,9 +DA:575,3 +DA:577,9 +DA:578,10 +DA:580,2 +DA:584,9 +DA:585,9 +DA:586,9 +DA:587,4 +DA:589,9 +DA:591,10 +DA:593,4 +DA:598,9 +DA:599,9 +DA:600,12 +DA:601,9 +DA:603,10 +DA:605,3 +DA:609,7 +DA:610,7 +DA:611,0 +DA:619,9 +DA:620,45 +DA:621,45 +DA:623,9 +DA:625,9 +DA:628,9 +DA:630,9 +DA:635,0 +DA:637,0 +DA:640,6 +DA:647,18 +DA:650,6 +DA:654,18 +DA:655,6 +DA:656,6 +DA:657,6 +DA:658,2 +DA:667,6 +DA:668,24 +DA:672,6 +DA:673,6 +DA:674,18 +DA:675,36 +DA:677,0 +DA:682,6 +DA:694,18 +DA:695,6 +DA:696,15 +DA:697,9 +DA:698,3 +DA:699,6 +DA:704,30 +DA:705,36 +DA:711,5 +DA:715,5 +DA:718,5 +DA:719,5 +DA:722,5 +DA:725,10 +DA:726,5 +DA:731,0 +DA:733,0 +DA:736,0 +DA:742,4 +DA:747,4 +DA:749,4 +DA:750,4 +DA:753,4 +DA:756,8 +DA:757,8 +DA:758,4 +DA:763,0 +DA:764,0 +DA:767,0 +DA:773,0 +DA:777,0 +DA:778,0 +DA:780,0 +DA:783,0 +DA:786,0 +DA:787,0 +DA:790,0 +DA:791,0 +DA:793,0 +DA:794,0 +DA:800,9 +DA:801,45 +DA:804,9 +DA:805,45 +DA:808,4 +DA:813,12 +DA:815,2 +DA:816,2 +DA:817,1 +DA:818,1 +DA:824,6 +DA:825,6 +DA:830,5 +DA:831,5 +DA:834,4 +DA:835,4 +LF:266 +LH:238 +end_of_record +TN: +SF:lib/apis/core/pairing/pairing_store.dart +FNF:0 +FNH:0 +DA:6,11 +DA:13,8 +DA:20,8 +DA:22,8 +DA:28,16 +DA:31,14 +DA:34,10 +DA:37,8 +LF:8 +LH:8 +end_of_record +TN: +SF:lib/apis/core/pairing/utils/json_rpc_utils.dart +FNF:0 +FNH:0 +DA:8,8 +DA:9,8 +DA:10,24 +DA:11,32 +DA:12,8 +DA:15,6 +DA:20,6 +DA:21,6 +DA:28,6 +DA:32,6 +DA:39,3 +DA:40,3 +DA:43,3 +DA:47,7 +DA:51,7 +DA:54,13 +DA:55,24 +DA:57,4 +DA:62,7 +DA:65,4 +DA:68,8 +LF:21 +LH:21 +end_of_record +TN: +SF:lib/apis/core/pairing/utils/pairing_models.dart +FNF:0 +FNH:0 +DA:28,0 +DA:29,0 +DA:44,0 +DA:51,5 +DA:52,5 +DA:63,0 +DA:64,0 +DA:72,7 +DA:78,0 +DA:80,0 +DA:88,4 +DA:93,0 +DA:95,0 +DA:102,0 +DA:104,0 +DA:106,0 +DA:113,4 +DA:117,0 +DA:119,0 +DA:128,7 +DA:134,0 +DA:136,0 +DA:144,7 +DA:149,0 +DA:151,0 +DA:168,0 +DA:169,0 +DA:181,0 +DA:182,0 +DA:190,9 +DA:196,0 +DA:198,0 +LF:32 +LH:8 +end_of_record +TN: +SF:lib/apis/core/relay_auth/relay_auth.dart +FNF:0 +FNH:0 +DA:20,9 +DA:25,0 +DA:26,0 +DA:27,0 +DA:29,9 +DA:30,9 +DA:33,9 +DA:34,18 +DA:35,18 +DA:39,10 +DA:47,36 +DA:48,10 +DA:49,20 +DA:50,10 +DA:51,10 +DA:58,10 +DA:59,10 +DA:64,10 +DA:65,20 +DA:69,20 +DA:72,1 +DA:74,1 +DA:77,3 +DA:78,3 +DA:79,0 +DA:85,3 +DA:86,1 +DA:87,1 +DA:88,2 +DA:89,2 +DA:103,10 +DA:104,10 +DA:107,10 +DA:109,10 +DA:110,10 +DA:111,10 +DA:113,10 +DA:118,1 +DA:120,1 +DA:121,1 +DA:122,1 +DA:123,1 +DA:132,10 +DA:134,20 +DA:136,50 +DA:137,10 +DA:141,10 +DA:145,1 +DA:147,1 +DA:148,4 +DA:149,0 +DA:151,1 +DA:154,1 +DA:155,1 +DA:156,0 +DA:163,3 +DA:166,3 +DA:167,1 +DA:168,0 +DA:175,1 +DA:176,2 +DA:177,0 +DA:186,10 +DA:188,10 +DA:189,30 +DA:190,30 +DA:191,10 +DA:193,20 +DA:196,0 +DA:198,0 +DA:200,0 +DA:201,0 +DA:203,0 +DA:206,10 +DA:208,20 +DA:211,1 +DA:213,3 +DA:216,10 +DA:218,10 +DA:219,30 +DA:220,30 +DA:221,30 +DA:222,10 +DA:225,1 +DA:227,1 +DA:229,3 +DA:230,3 +DA:231,2 +DA:232,3 +DA:234,1 +LF:90 +LH:77 +end_of_record +TN: +SF:lib/apis/core/relay_auth/relay_auth_models.dart +FNF:0 +FNH:0 +DA:14,9 +DA:17,9 +DA:18,9 +DA:20,1 +DA:23,2 +DA:24,2 +DA:35,10 +DA:40,1 +DA:41,1 +DA:43,20 +DA:54,10 +DA:62,1 +DA:63,1 +DA:65,20 +DA:72,10 +DA:78,10 +DA:82,20 +DA:88,1 +DA:93,1 +DA:100,0 +DA:110,0 +LF:21 +LH:19 +end_of_record +TN: +SF:lib/apis/core/relay_client/i_relay_client.dart +FNF:0 +FNH:0 +DA:10,0 +LF:1 +LH:0 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/error_code.dart +FNF:0 +FNH:0 +DA:42,0 +DA:44,0 +DA:46,0 +DA:48,0 +DA:50,0 +DA:52,0 +LF:6 +LH:0 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/client.dart +FNF:0 +FNH:0 +DA:40,24 +DA:46,24 +DA:52,0 +DA:53,0 +DA:54,0 +DA:64,8 +DA:65,24 +DA:66,21 +DA:67,15 +DA:68,10 +DA:70,16 +DA:71,8 +DA:82,8 +DA:83,32 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:90,8 +DA:97,8 +DA:98,24 +DA:99,32 +DA:100,8 +DA:116,8 +DA:117,0 +DA:118,8 +DA:120,8 +DA:121,32 +DA:122,8 +DA:137,0 +DA:138,0 +DA:144,8 +DA:145,8 +DA:146,8 +DA:147,0 +DA:150,8 +DA:152,8 +DA:153,8 +DA:154,8 +DA:156,8 +DA:157,0 +DA:159,24 +DA:175,0 +DA:176,0 +DA:177,0 +DA:181,0 +DA:182,0 +DA:183,0 +DA:184,0 +DA:189,8 +DA:190,8 +DA:191,0 +DA:193,8 +DA:199,8 +DA:200,8 +DA:201,8 +DA:202,8 +DA:203,16 +DA:204,8 +DA:205,21 +DA:207,8 +DA:208,20 +DA:209,8 +DA:210,4 +DA:215,8 +DA:216,8 +DA:217,16 +DA:218,8 +DA:219,8 +DA:220,16 +DA:221,8 +DA:223,4 +DA:224,4 +DA:225,4 +DA:226,8 +DA:227,8 +DA:243,8 +LF:78 +LH:57 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/exception.dart +FNF:0 +FNH:0 +DA:29,4 +DA:34,0 +DA:35,0 +DA:41,0 +DA:42,0 +DA:46,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:54,0 +DA:57,0 +DA:58,0 +DA:59,0 +DA:61,0 +DA:66,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +LF:21 +LH:1 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/parameters.dart +FNF:0 +FNH:0 +DA:31,7 +DA:46,7 +DA:47,7 +DA:48,0 +DA:49,0 +DA:50,0 +DA:52,0 +DA:54,7 +DA:55,7 +DA:56,14 +DA:57,28 +DA:59,0 +DA:62,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:80,0 +DA:81,0 +DA:82,0 +DA:87,7 +DA:88,14 +DA:89,0 +DA:128,0 +DA:129,0 +DA:130,0 +DA:133,0 +DA:134,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:143,0 +DA:144,0 +DA:145,0 +DA:146,0 +DA:149,0 +DA:153,0 +DA:155,7 +DA:156,7 +DA:159,0 +DA:165,0 +DA:170,0 +DA:180,0 +DA:189,0 +DA:195,0 +DA:200,0 +DA:206,0 +DA:211,0 +DA:217,0 +DA:218,0 +DA:223,0 +DA:229,7 +DA:230,21 +DA:235,0 +DA:242,0 +DA:248,0 +DA:255,0 +DA:261,0 +DA:268,7 +DA:269,21 +DA:270,0 +DA:271,0 +DA:274,0 +DA:275,0 +DA:277,0 +DA:278,0 +DA:282,0 +DA:283,0 +DA:286,0 +DA:289,0 +DA:290,0 +DA:291,0 +DA:295,0 +DA:298,0 +DA:301,7 +DA:304,7 +DA:310,0 +DA:312,0 +DA:313,0 +DA:316,0 +DA:319,0 +DA:320,0 +DA:322,0 +DA:325,0 +DA:328,0 +DA:331,0 +DA:334,0 +DA:337,0 +DA:340,0 +DA:343,0 +DA:346,0 +LF:93 +LH:17 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/peer.dart +FNF:0 +FNH:0 +DA:39,56 +DA:41,8 +DA:42,32 +DA:44,0 +DA:45,0 +DA:47,0 +DA:48,0 +DA:62,8 +DA:64,8 +DA:65,32 +DA:84,8 +DA:86,16 +DA:87,40 +DA:90,16 +DA:91,40 +DA:96,8 +DA:98,16 +DA:100,0 +DA:102,0 +DA:104,0 +DA:105,0 +DA:109,8 +DA:111,16 +DA:113,0 +DA:115,0 +DA:119,8 +DA:121,16 +DA:122,16 +DA:123,32 +DA:124,8 +DA:125,16 +DA:126,16 +DA:128,14 +DA:130,0 +DA:131,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:137,0 +DA:142,0 +DA:144,0 +DA:145,0 +DA:146,8 +DA:147,8 +DA:150,8 +DA:152,16 +DA:153,16 +DA:154,8 +LF:49 +LH:29 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/server.dart +FNF:0 +FNH:0 +DA:50,24 +DA:56,24 +DA:84,0 +DA:86,0 +DA:87,0 +DA:106,8 +DA:115,8 +DA:116,32 +DA:117,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:122,8 +DA:129,8 +DA:130,24 +DA:131,32 +DA:132,8 +DA:144,8 +DA:145,16 +DA:146,0 +DA:149,16 +DA:163,0 +DA:164,0 +DA:174,7 +DA:176,7 +DA:177,0 +DA:178,0 +DA:180,0 +DA:182,0 +DA:183,0 +DA:184,0 +DA:185,0 +DA:188,7 +DA:192,28 +DA:196,7 +DA:198,7 +DA:200,7 +DA:201,14 +DA:202,0 +DA:205,7 +DA:206,0 +DA:207,0 +DA:210,0 +DA:212,21 +DA:217,7 +DA:219,14 +DA:221,0 +DA:222,0 +DA:223,0 +DA:224,0 +DA:226,0 +DA:229,0 +DA:230,0 +DA:233,0 +DA:234,0 +DA:235,0 +DA:236,0 +DA:237,0 +DA:238,0 +DA:243,7 +DA:244,7 +DA:245,0 +DA:251,14 +DA:252,0 +DA:258,7 +DA:259,14 +DA:260,0 +DA:261,0 +DA:263,0 +DA:266,7 +DA:267,0 +DA:273,7 +DA:274,14 +DA:275,0 +DA:276,0 +DA:278,0 +DA:281,7 +DA:282,7 +DA:283,14 +DA:284,0 +DA:285,0 +DA:287,0 +DA:291,7 +DA:292,14 +DA:293,0 +DA:294,0 +DA:296,0 +DA:301,0 +DA:302,0 +DA:304,0 +DA:305,0 +DA:306,0 +DA:310,0 +DA:311,0 +DA:312,0 +DA:313,0 +DA:317,0 +LF:97 +LH:38 +end_of_record +TN: +SF:lib/apis/core/relay_client/json_rpc_2/src/utils.dart +FNF:0 +FNH:0 +DA:16,0 +DA:22,0 +DA:23,0 +DA:30,0 +DA:33,0 +DA:35,0 +DA:39,0 +DA:40,0 +DA:42,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:54,16 +DA:55,8 +DA:59,8 +DA:61,16 +DA:62,8 +DA:64,0 +DA:65,0 +DA:66,0 +DA:67,0 +LF:22 +LH:5 +end_of_record +TN: +SF:lib/apis/core/relay_client/message_tracker.dart +FNF:0 +FNH:0 +DA:12,11 +DA:19,8 +DA:20,8 +DA:21,16 +DA:22,8 +DA:23,8 +DA:29,8 +DA:31,8 +DA:33,16 +DA:34,8 +DA:36,8 +DA:40,16 +DA:41,24 +DA:43,24 +DA:44,8 +DA:47,8 +DA:49,8 +DA:50,40 +LF:18 +LH:18 +end_of_record +TN: +SF:lib/apis/core/relay_client/relay_client.dart +FNF:0 +FNH:0 +DA:55,9 +DA:56,25 +DA:58,20 +DA:81,10 +DA:86,10 +DA:88,9 +DA:90,9 +DA:94,18 +DA:95,18 +DA:98,9 +DA:99,9 +DA:101,9 +DA:104,7 +DA:111,7 +DA:113,7 +DA:121,14 +DA:122,7 +DA:123,7 +DA:125,7 +DA:129,15 +DA:133,7 +DA:135,7 +DA:137,21 +DA:139,14 +DA:142,5 +DA:144,5 +DA:146,10 +DA:149,5 +DA:150,5 +DA:151,5 +DA:155,5 +DA:158,12 +DA:162,10 +DA:163,10 +DA:166,10 +DA:169,0 +DA:171,0 +DA:173,0 +DA:175,0 +DA:178,8 +DA:180,8 +DA:182,24 +DA:184,8 +DA:189,9 +DA:190,9 +DA:194,36 +DA:195,63 +DA:198,9 +DA:199,9 +DA:204,18 +DA:205,9 +DA:206,8 +DA:207,8 +DA:209,2 +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:215,10 +DA:216,6 +DA:217,2 +DA:221,9 +DA:222,27 +DA:223,9 +DA:225,9 +DA:227,17 +DA:228,9 +DA:229,18 +DA:230,9 +DA:233,16 +DA:237,9 +DA:238,9 +DA:239,9 +DA:240,45 +DA:241,36 +DA:242,9 +DA:245,18 +DA:248,18 +DA:249,9 +DA:252,9 +DA:253,0 +DA:254,0 +DA:257,36 +DA:258,18 +DA:259,34 +DA:261,32 +DA:263,16 +DA:264,8 +DA:265,8 +DA:267,16 +DA:268,8 +DA:269,8 +DA:271,16 +DA:272,8 +DA:273,8 +DA:276,16 +DA:283,16 +DA:286,8 +DA:287,24 +DA:288,8 +DA:289,8 +DA:290,16 +DA:291,16 +DA:296,16 +DA:297,56 +DA:300,8 +DA:301,8 +DA:302,0 +DA:305,8 +DA:307,32 +DA:309,8 +DA:314,1 +DA:316,1 +DA:317,0 +DA:319,1 +DA:320,1 +DA:323,2 +DA:324,2 +DA:333,9 +DA:334,9 +DA:335,45 +DA:336,9 +DA:340,9 +DA:341,45 +DA:342,9 +DA:345,5 +DA:346,5 +DA:347,0 +DA:351,8 +DA:352,8 +DA:357,7 +DA:358,28 +DA:360,7 +DA:361,24 +DA:366,14 +DA:369,14 +DA:370,7 +DA:378,7 +DA:379,21 +DA:380,21 +DA:381,7 +DA:384,0 +DA:385,0 +DA:388,0 +DA:389,0 +DA:394,7 +DA:395,7 +DA:396,14 +DA:401,8 +DA:407,8 +DA:411,5 +DA:412,0 +DA:415,10 +DA:416,0 +DA:422,16 +DA:429,7 +DA:432,7 +DA:433,7 +DA:434,7 +DA:435,7 +DA:438,4 +DA:439,3 +DA:446,21 +DA:447,14 +DA:452,7 +DA:453,14 +DA:457,0 +DA:458,0 +DA:459,0 +DA:465,8 +DA:466,8 +DA:467,0 +LF:172 +LH:149 +end_of_record +TN: +SF:lib/apis/core/relay_client/relay_client_models.dart +FNF:0 +FNH:0 +DA:11,12 +DA:16,8 +DA:18,8 +DA:25,7 +DA:30,0 +DA:31,0 +DA:37,8 +DA:45,0 +DA:53,0 +DA:56,0 +LF:10 +LH:5 +end_of_record +TN: +SF:lib/apis/core/relay_client/websocket/http_client.dart +FNF:0 +FNH:0 +DA:5,82 +DA:7,0 +DA:12,0 +DA:15,0 +DA:17,0 +DA:20,0 +DA:26,0 +LF:7 +LH:1 +end_of_record +TN: +SF:lib/apis/core/relay_client/websocket/i_http_client.dart +FNF:0 +FNH:0 +DA:4,82 +LF:1 +LH:1 +end_of_record +TN: +SF:lib/apis/core/relay_client/websocket/websocket_handler.dart +FNF:0 +FNH:0 +DA:10,8 +DA:11,8 +DA:15,8 +DA:16,16 +DA:17,8 +DA:18,16 +DA:21,8 +DA:22,8 +DA:24,0 +DA:25,0 +DA:29,8 +DA:33,8 +DA:35,8 +DA:38,8 +DA:42,16 +DA:43,8 +DA:44,16 +DA:48,0 +DA:49,0 +DA:50,0 +DA:54,24 +DA:56,8 +DA:58,0 +DA:59,0 +DA:61,0 +DA:65,16 +DA:76,8 +DA:79,8 +DA:80,24 +DA:83,8 +DA:86,0 +DA:88,0 +LF:32 +LH:22 +end_of_record +TN: +SF:lib/apis/core/store/generic_store.dart +FNF:0 +FNH:0 +DA:14,12 +DA:15,36 +DA:36,12 +DA:43,12 +DA:45,12 +DA:49,24 +DA:50,12 +DA:52,12 +DA:55,8 +DA:57,8 +DA:58,16 +DA:61,12 +DA:63,12 +DA:64,24 +DA:65,20 +DA:70,10 +DA:72,30 +DA:75,12 +DA:77,12 +DA:79,24 +DA:80,18 +DA:81,9 +DA:87,24 +DA:88,12 +DA:95,24 +DA:97,12 +DA:100,9 +DA:102,9 +DA:104,18 +DA:108,18 +DA:109,9 +DA:111,18 +DA:115,9 +DA:118,12 +DA:120,12 +DA:122,24 +DA:123,12 +DA:126,48 +DA:129,12 +DA:132,36 +DA:134,60 +DA:135,48 +DA:141,32 +DA:142,16 +DA:144,4 +DA:145,5 +DA:146,4 +DA:150,24 +DA:154,34 +DA:156,12 +DA:160,2 +DA:165,12 +DA:167,12 +DA:168,0 +LF:54 +LH:53 +end_of_record +TN: +SF:lib/apis/core/store/shared_prefs_store.dart +FNF:0 +FNH:0 +DA:14,0 +DA:15,0 +DA:17,0 +DA:18,0 +DA:20,0 +DA:21,0 +DA:23,12 +DA:28,12 +DA:31,12 +DA:34,12 +DA:36,12 +DA:40,12 +DA:41,0 +DA:44,12 +DA:49,8 +DA:51,8 +DA:53,8 +DA:54,16 +DA:55,16 +DA:58,1 +DA:60,0 +DA:65,12 +DA:67,12 +DA:68,12 +DA:69,24 +DA:71,0 +DA:75,0 +DA:77,0 +DA:78,0 +DA:82,12 +DA:84,12 +DA:86,12 +DA:87,24 +DA:88,12 +DA:92,0 +DA:94,0 +DA:96,0 +DA:97,0 +DA:98,0 +DA:100,0 +DA:101,0 +DA:106,1 +DA:108,1 +DA:110,1 +DA:111,2 +DA:112,1 +DA:115,1 +DA:116,1 +DA:120,0 +DA:121,0 +DA:122,0 +DA:124,0 +DA:128,12 +DA:129,12 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:139,0 +DA:144,1 +DA:145,1 +DA:148,0 +DA:151,12 +DA:152,24 +DA:155,12 +DA:156,12 +DA:157,0 +LF:67 +LH:37 +end_of_record +TN: +SF:lib/apis/core/store/store_models.dart +FNF:0 +FNH:0 +DA:7,12 +DA:17,9 +DA:27,9 +DA:34,12 +LF:4 +LH:4 +end_of_record +TN: +SF:lib/apis/core/verify/models/verify_context.dart +FNF:0 +FNH:0 +DA:12,0 +DA:13,0 +DA:14,0 +DA:15,0 +DA:28,0 +DA:29,0 +DA:41,0 +DA:42,0 +DA:49,8 +LF:9 +LH:1 +end_of_record +TN: +SF:lib/apis/core/verify/verify.dart +FNF:0 +FNH:0 +DA:14,10 +DA:20,5 +DA:24,10 +DA:27,4 +DA:30,12 +DA:31,16 +DA:32,16 +DA:33,4 +DA:38,0 +DA:39,0 +DA:41,0 +DA:43,20 +DA:48,5 +DA:51,5 +DA:52,0 +DA:53,0 +LF:16 +LH:11 +end_of_record +TN: +SF:lib/apis/models/basic_models.dart +FNF:0 +FNH:0 +DA:20,0 +DA:21,0 +DA:42,5 +DA:43,5 +LF:4 +LH:2 +end_of_record +TN: +SF:lib/apis/models/json_rpc_error.dart +FNF:0 +FNH:0 +DA:14,0 +DA:15,0 +DA:16,3 +DA:17,6 +DA:18,0 +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,3 +DA:23,6 +DA:25,3 +DA:26,3 +LF:12 +LH:6 +end_of_record +TN: +SF:lib/apis/models/json_rpc_request.dart +FNF:0 +FNH:0 +DA:16,6 +DA:17,6 +LF:2 +LH:2 +end_of_record +TN: +SF:lib/apis/models/json_rpc_response.dart +FNF:0 +FNH:0 +DA:17,6 +DA:18,12 +LF:2 +LH:2 +end_of_record +TN: +SF:lib/apis/models/uri_parse_result.dart +FNF:0 +FNH:0 +DA:15,8 +DA:28,5 +DA:39,8 +LF:3 +LH:3 +end_of_record +TN: +SF:lib/apis/sign_api/models/auth/auth_client_events.dart +FNF:0 +FNH:0 +DA:15,2 +DA:22,0 +DA:24,0 +DA:35,2 +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:51,0 +DA:53,0 +LF:12 +LH:2 +end_of_record +TN: +SF:lib/apis/sign_api/models/auth/auth_client_models.dart +FNF:0 +FNH:0 +DA:18,2 +DA:47,3 +DA:59,3 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:72,0 +DA:96,2 +DA:97,2 +DA:98,2 +DA:99,2 +DA:100,2 +DA:101,2 +DA:102,2 +DA:104,2 +DA:105,2 +DA:106,2 +DA:107,2 +DA:108,2 +DA:109,2 +DA:110,2 +DA:111,2 +DA:112,2 +DA:113,2 +DA:114,2 +DA:115,2 +DA:116,2 +DA:117,2 +DA:118,2 +DA:122,2 +DA:123,2 +DA:136,0 +DA:137,0 +DA:147,0 +DA:161,0 +LF:43 +LH:27 +end_of_record +TN: +SF:lib/apis/sign_api/models/auth/common_auth_models.dart +FNF:0 +FNH:0 +DA:16,0 +DA:17,0 +DA:36,2 +DA:37,2 +DA:38,2 +DA:39,2 +DA:40,2 +DA:41,2 +DA:42,2 +DA:43,2 +DA:44,2 +DA:45,2 +DA:46,2 +DA:47,2 +DA:51,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:68,2 +DA:69,2 +DA:70,2 +DA:71,2 +DA:72,2 +DA:73,2 +DA:74,2 +DA:75,2 +DA:76,2 +DA:77,2 +DA:78,2 +DA:79,2 +DA:83,0 +DA:84,0 +DA:104,2 +DA:108,2 +DA:110,2 +DA:111,2 +DA:112,2 +DA:113,2 +DA:114,2 +DA:115,2 +DA:116,2 +DA:117,2 +DA:118,2 +DA:119,2 +DA:123,2 +DA:124,2 +DA:137,2 +DA:138,2 +DA:153,2 +DA:154,2 +DA:166,4 +DA:180,2 +DA:185,2 +DA:188,2 +DA:189,2 +DA:190,2 +DA:194,0 +DA:195,0 +LF:66 +LH:48 +end_of_record +TN: +SF:lib/apis/sign_api/models/auth/session_auth_events.dart +FNF:0 +FNH:0 +DA:19,0 +DA:27,0 +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:35,0 +DA:37,0 +DA:49,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:67,0 +DA:69,0 +LF:19 +LH:0 +end_of_record +TN: +SF:lib/apis/sign_api/models/auth/session_auth_models.dart +FNF:0 +FNH:0 +DA:20,0 +DA:47,0 +DA:48,0 +DA:71,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:91,0 +DA:92,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:99,0 +DA:100,0 +DA:115,0 +DA:116,0 +LF:29 +LH:0 +end_of_record +TN: +SF:lib/apis/sign_api/models/json_rpc_models.dart +FNF:0 +FNH:0 +DA:21,0 +DA:22,0 +DA:32,0 +DA:33,0 +DA:47,4 +DA:48,4 +DA:59,0 +DA:60,0 +DA:76,4 +DA:77,4 +DA:87,3 +DA:88,3 +DA:98,3 +DA:99,3 +DA:111,3 +DA:112,3 +DA:122,3 +DA:123,3 +DA:134,3 +DA:135,3 +DA:146,3 +DA:147,3 +DA:158,3 +DA:159,3 +DA:170,3 +DA:171,3 +DA:184,2 +DA:185,2 +DA:195,0 +DA:196,0 +DA:208,0 +DA:209,0 +DA:220,0 +DA:221,0 +LF:34 +LH:22 +end_of_record +TN: +SF:lib/apis/sign_api/models/proposal_models.dart +FNF:0 +FNH:0 +DA:18,4 +DA:19,4 +DA:30,0 +DA:31,0 +DA:49,0 +DA:50,0 +LF:6 +LH:2 +end_of_record +TN: +SF:lib/apis/sign_api/models/session_models.dart +FNF:0 +FNH:0 +DA:21,4 +DA:31,0 +DA:33,0 +DA:47,4 +DA:48,4 +DA:69,0 +DA:70,0 +DA:85,0 +DA:86,0 +LF:9 +LH:3 +end_of_record +TN: +SF:lib/apis/sign_api/models/sign_client_events.dart +FNF:0 +FNH:0 +DA:14,4 +DA:20,0 +DA:21,0 +DA:22,0 +DA:23,0 +DA:26,0 +DA:28,0 +DA:38,0 +DA:45,0 +DA:47,0 +DA:54,4 +DA:58,0 +DA:60,0 +DA:69,3 +DA:75,0 +DA:77,0 +DA:85,3 +DA:87,0 +DA:89,0 +DA:97,3 +DA:99,0 +DA:101,0 +DA:109,3 +DA:114,0 +DA:116,0 +DA:123,3 +DA:125,0 +DA:127,0 +DA:138,3 +DA:146,3 +DA:149,3 +DA:150,3 +DA:151,3 +DA:152,3 +DA:153,3 +DA:154,3 +DA:158,0 +DA:160,0 +DA:171,3 +DA:179,0 +DA:181,0 +DA:188,0 +DA:190,0 +DA:192,0 +LF:44 +LH:16 +end_of_record +TN: +SF:lib/apis/sign_api/models/sign_client_models.dart +FNF:0 +FNH:0 +DA:10,4 +DA:16,0 +DA:18,0 +DA:26,4 +DA:31,0 +DA:33,0 +LF:6 +LH:2 +end_of_record +TN: +SF:lib/apis/sign_api/sessions.dart +FNF:0 +FNH:0 +DA:7,6 +DA:14,5 +DA:20,5 +DA:22,5 +DA:28,10 +DA:31,6 +DA:34,5 +LF:7 +LH:7 +end_of_record +TN: +SF:lib/apis/sign_api/sign_client.dart +FNF:0 +FNH:0 +DA:15,1 +DA:16,2 +DA:17,1 +DA:18,2 +DA:19,1 +DA:20,2 +DA:21,1 +DA:22,2 +DA:23,1 +DA:24,2 +DA:25,1 +DA:26,2 +DA:27,1 +DA:28,2 +DA:29,0 +DA:31,0 +DA:32,1 +DA:33,2 +DA:34,1 +DA:35,2 +DA:36,1 +DA:37,2 +DA:39,1 +DA:40,2 +DA:41,0 +DA:42,0 +DA:43,1 +DA:44,2 +DA:45,1 +DA:46,2 +DA:47,1 +DA:48,2 +DA:53,0 +DA:60,0 +DA:61,0 +DA:69,0 +DA:74,1 +DA:78,2 +DA:81,1 +DA:82,1 +DA:85,0 +DA:86,0 +DA:89,1 +DA:90,1 +DA:93,0 +DA:94,0 +DA:97,1 +DA:98,1 +DA:101,0 +DA:102,0 +DA:105,1 +DA:106,1 +DA:109,0 +DA:110,0 +DA:113,1 +DA:114,1 +DA:117,0 +DA:121,1 +DA:122,1 +DA:125,0 +DA:126,0 +DA:129,1 +DA:130,1 +DA:133,0 +DA:134,0 +DA:137,1 +DA:138,1 +DA:141,0 +DA:142,0 +DA:148,1 +DA:150,1 +DA:154,2 +DA:155,2 +DA:157,1 +DA:160,1 +DA:170,2 +DA:184,1 +DA:189,2 +DA:195,1 +DA:203,2 +DA:214,1 +DA:220,2 +DA:229,1 +DA:235,2 +DA:245,1 +DA:250,2 +DA:256,1 +DA:263,2 +DA:273,1 +DA:280,2 +DA:290,0 +DA:299,0 +DA:311,0 +DA:323,0 +DA:338,1 +DA:344,2 +DA:353,1 +DA:360,2 +DA:370,1 +DA:376,2 +DA:385,1 +DA:391,2 +DA:400,1 +DA:407,2 +DA:417,1 +DA:422,2 +DA:428,1 +DA:434,2 +DA:443,1 +DA:448,2 +DA:454,1 +DA:457,2 +DA:463,1 +DA:468,2 +DA:476,1 +DA:479,2 +DA:485,1 +DA:488,2 +DA:494,0 +DA:495,0 +DA:499,0 +DA:500,0 +DA:502,0 +DA:505,0 +DA:511,0 +DA:514,0 +DA:520,0 +DA:522,0 +DA:524,0 +DA:525,0 +DA:527,0 +DA:528,0 +DA:531,0 +DA:533,0 +DA:535,0 +DA:537,0 +DA:539,0 +DA:546,0 +DA:557,0 +DA:566,0 +DA:576,0 +DA:584,0 +DA:595,0 +DA:601,0 +DA:610,0 +DA:616,0 +DA:625,0 +DA:626,0 +DA:628,0 +DA:629,0 +DA:631,0 +DA:637,0 +DA:646,0 +DA:652,0 +DA:661,0 +DA:666,0 +DA:674,0 +DA:675,0 +LF:158 +LH:91 +end_of_record +TN: +SF:lib/apis/sign_api/sign_engine.dart +FNF:0 +FNH:0 +DA:99,5 +DA:114,5 +DA:116,5 +DA:120,15 +DA:121,25 +DA:122,10 +DA:123,10 +DA:124,10 +DA:127,10 +DA:128,10 +DA:129,10 +DA:130,10 +DA:132,10 +DA:134,5 +DA:135,5 +DA:136,5 +DA:138,5 +DA:140,5 +DA:143,5 +DA:145,14 +DA:146,16 +DA:150,4 +DA:159,4 +DA:161,4 +DA:162,0 +DA:163,4 +DA:172,12 +DA:175,4 +DA:176,4 +DA:179,12 +DA:182,12 +DA:183,4 +DA:185,4 +DA:187,8 +DA:188,0 +DA:189,4 +DA:190,4 +DA:192,4 +DA:197,4 +DA:200,4 +DA:203,4 +DA:204,4 +DA:205,4 +DA:206,4 +DA:207,4 +DA:210,4 +DA:215,4 +DA:217,8 +DA:218,4 +DA:222,4 +DA:223,4 +DA:224,4 +DA:228,4 +DA:234,4 +DA:243,4 +DA:251,12 +DA:254,4 +DA:257,4 +DA:259,8 +DA:260,4 +DA:262,12 +DA:263,8 +DA:269,4 +DA:271,12 +DA:272,12 +DA:275,12 +DA:279,4 +DA:283,4 +DA:285,12 +DA:292,4 +DA:300,4 +DA:302,4 +DA:309,8 +DA:310,4 +DA:313,12 +DA:314,8 +DA:315,12 +DA:322,4 +DA:325,12 +DA:327,4 +DA:329,4 +DA:334,4 +DA:335,16 +DA:337,12 +DA:338,4 +DA:339,8 +DA:342,12 +DA:344,4 +DA:348,4 +DA:350,4 +DA:356,4 +DA:358,4 +DA:360,4 +DA:361,4 +DA:364,12 +DA:366,8 +DA:367,4 +DA:370,8 +DA:371,4 +DA:374,4 +DA:379,4 +DA:381,4 +DA:387,4 +DA:388,4 +DA:389,0 +DA:394,8 +DA:398,8 +DA:400,8 +DA:406,4 +DA:412,3 +DA:417,3 +DA:419,3 +DA:421,9 +DA:427,3 +DA:428,9 +DA:430,3 +DA:432,9 +DA:433,3 +DA:439,3 +DA:442,3 +DA:447,3 +DA:448,3 +DA:453,6 +DA:458,9 +DA:461,3 +DA:465,3 +DA:469,3 +DA:470,3 +DA:472,9 +DA:475,3 +DA:478,3 +DA:480,3 +DA:489,3 +DA:495,9 +DA:498,3 +DA:504,3 +DA:505,3 +DA:510,9 +DA:513,3 +DA:520,0 +DA:529,0 +DA:532,0 +DA:542,0 +DA:553,0 +DA:554,0 +DA:556,0 +DA:560,0 +DA:563,0 +DA:565,0 +DA:566,0 +DA:567,0 +DA:568,0 +DA:569,0 +DA:570,0 +DA:571,0 +DA:572,0 +DA:576,0 +DA:577,0 +DA:579,0 +DA:582,0 +DA:586,3 +DA:591,3 +DA:592,3 +DA:596,3 +DA:597,9 +DA:598,3 +DA:601,3 +DA:604,9 +DA:605,3 +DA:608,3 +DA:612,6 +DA:618,3 +DA:624,3 +DA:625,9 +DA:628,3 +DA:634,3 +DA:635,3 +DA:640,9 +DA:643,3 +DA:650,3 +DA:654,3 +DA:655,3 +DA:657,6 +DA:658,9 +DA:661,3 +DA:663,12 +DA:664,9 +DA:668,3 +DA:673,3 +DA:675,3 +DA:677,6 +DA:680,9 +DA:683,3 +DA:684,3 +DA:685,3 +DA:686,3 +DA:691,3 +DA:693,9 +DA:695,0 +DA:696,0 +DA:697,0 +DA:704,3 +DA:708,3 +DA:709,12 +DA:710,3 +DA:716,6 +DA:719,4 +DA:721,4 +DA:723,4 +DA:724,16 +DA:725,8 +DA:731,3 +DA:735,3 +DA:737,3 +DA:738,3 +DA:739,3 +DA:740,12 +DA:741,6 +DA:742,6 +DA:748,4 +DA:750,4 +DA:752,4 +DA:753,16 +DA:754,12 +DA:760,3 +DA:762,3 +DA:764,3 +DA:765,12 +DA:766,9 +DA:772,1 +DA:773,3 +DA:778,3 +DA:783,3 +DA:785,3 +DA:788,3 +DA:791,3 +DA:792,3 +DA:793,3 +DA:796,6 +DA:799,3 +DA:804,3 +DA:806,3 +DA:809,3 +DA:812,3 +DA:813,3 +DA:814,3 +DA:817,6 +DA:822,5 +DA:824,15 +DA:829,10 +DA:831,0 +DA:835,4 +DA:836,4 +DA:837,0 +DA:841,3 +DA:842,3 +DA:845,3 +DA:850,6 +DA:854,9 +DA:856,6 +DA:857,15 +DA:858,9 +DA:860,9 +DA:863,6 +DA:864,3 +DA:870,4 +DA:874,12 +DA:876,12 +DA:880,3 +DA:884,9 +DA:886,0 +DA:890,4 +DA:891,8 +DA:892,8 +DA:897,12 +DA:900,4 +DA:901,12 +DA:902,20 +DA:905,3 +DA:906,6 +DA:907,3 +DA:910,9 +DA:911,3 +DA:912,3 +DA:918,5 +DA:919,5 +DA:920,5 +DA:922,10 +DA:923,0 +DA:924,0 +DA:927,10 +DA:928,0 +DA:929,0 +DA:933,5 +DA:935,0 +DA:937,5 +DA:942,5 +DA:943,15 +DA:945,5 +DA:948,15 +DA:950,5 +DA:953,15 +DA:955,5 +DA:958,15 +DA:960,5 +DA:963,15 +DA:965,5 +DA:968,15 +DA:970,5 +DA:973,15 +DA:975,5 +DA:978,15 +DA:980,5 +DA:984,15 +DA:986,5 +DA:989,15 +DA:991,5 +DA:996,4 +DA:997,12 +DA:998,12 +DA:1000,8 +DA:1005,4 +DA:1009,4 +DA:1010,0 +DA:1016,12 +DA:1017,4 +DA:1019,8 +DA:1020,4 +DA:1021,4 +DA:1022,4 +DA:1023,4 +DA:1025,4 +DA:1030,16 +DA:1031,3 +DA:1032,3 +DA:1033,9 +DA:1034,3 +DA:1035,3 +DA:1036,3 +DA:1041,3 +DA:1042,3 +DA:1046,0 +DA:1048,0 +DA:1049,0 +DA:1051,0 +DA:1052,0 +DA:1053,0 +DA:1055,0 +DA:1056,0 +DA:1057,0 +DA:1061,0 +DA:1062,0 +DA:1063,0 +DA:1064,0 +DA:1073,4 +DA:1076,4 +DA:1077,4 +DA:1079,4 +DA:1080,4 +DA:1081,4 +DA:1082,4 +DA:1083,4 +DA:1088,8 +DA:1090,4 +DA:1092,8 +DA:1095,8 +DA:1096,4 +DA:1097,4 +DA:1102,0 +DA:1103,0 +DA:1104,0 +DA:1105,0 +DA:1106,0 +DA:1108,0 +DA:1109,0 +DA:1110,0 +DA:1115,4 +DA:1120,8 +DA:1122,12 +DA:1125,8 +DA:1129,4 +DA:1131,4 +DA:1132,4 +DA:1133,4 +DA:1135,8 +DA:1136,4 +DA:1137,4 +DA:1138,4 +DA:1139,4 +DA:1140,4 +DA:1142,4 +DA:1146,8 +DA:1147,8 +DA:1148,12 +DA:1149,4 +DA:1150,8 +DA:1152,12 +DA:1153,0 +DA:1154,0 +DA:1158,8 +DA:1162,12 +DA:1163,4 +DA:1168,8 +DA:1169,4 +DA:1171,0 +DA:1172,0 +DA:1173,0 +DA:1174,0 +DA:1176,0 +DA:1177,0 +DA:1178,0 +DA:1184,3 +DA:1190,6 +DA:1191,6 +DA:1192,6 +DA:1194,3 +DA:1196,9 +DA:1197,3 +DA:1202,6 +DA:1203,3 +DA:1204,3 +DA:1206,3 +DA:1209,0 +DA:1210,0 +DA:1211,0 +DA:1212,0 +DA:1214,0 +DA:1215,0 +DA:1216,0 +DA:1222,3 +DA:1227,6 +DA:1228,3 +DA:1229,3 +DA:1231,3 +DA:1235,9 +DA:1236,3 +DA:1241,6 +DA:1242,3 +DA:1243,3 +DA:1247,0 +DA:1248,0 +DA:1249,0 +DA:1251,0 +DA:1252,0 +DA:1253,0 +DA:1259,3 +DA:1264,6 +DA:1265,3 +DA:1266,9 +DA:1267,3 +DA:1272,6 +DA:1273,3 +DA:1274,3 +DA:1278,0 +DA:1279,0 +DA:1280,0 +DA:1282,0 +DA:1283,0 +DA:1284,0 +DA:1290,3 +DA:1295,6 +DA:1296,3 +DA:1297,9 +DA:1298,3 +DA:1303,3 +DA:1304,0 +DA:1305,0 +DA:1306,0 +DA:1308,0 +DA:1309,0 +DA:1310,0 +DA:1319,3 +DA:1321,6 +DA:1322,3 +DA:1324,3 +DA:1325,3 +DA:1328,6 +DA:1329,3 +DA:1331,6 +DA:1334,3 +DA:1335,3 +DA:1337,6 +DA:1338,3 +DA:1339,6 +DA:1344,3 +DA:1345,3 +DA:1349,3 +DA:1350,3 +DA:1351,6 +DA:1353,6 +DA:1357,9 +DA:1358,0 +DA:1359,0 +DA:1360,0 +DA:1362,0 +DA:1363,0 +DA:1364,0 +DA:1367,0 +DA:1368,0 +DA:1370,0 +DA:1372,0 +DA:1373,0 +DA:1375,0 +DA:1376,0 +DA:1377,0 +DA:1380,0 +DA:1384,6 +DA:1385,3 +DA:1390,0 +DA:1391,0 +DA:1392,0 +DA:1394,0 +DA:1395,0 +DA:1396,0 +DA:1402,3 +DA:1407,6 +DA:1408,3 +DA:1409,3 +DA:1412,3 +DA:1415,3 +DA:1416,3 +DA:1417,6 +DA:1419,6 +DA:1420,6 +DA:1422,0 +DA:1424,0 +DA:1426,0 +DA:1429,0 +DA:1430,0 +DA:1432,0 +DA:1433,0 +DA:1434,0 +DA:1440,9 +DA:1441,3 +DA:1447,6 +DA:1448,3 +DA:1449,3 +DA:1451,3 +DA:1452,3 +DA:1453,3 +DA:1457,9 +DA:1458,3 +DA:1460,3 +DA:1461,3 +DA:1462,3 +DA:1466,0 +DA:1467,0 +DA:1468,0 +DA:1470,0 +DA:1471,0 +DA:1472,0 +DA:1480,5 +DA:1481,25 +DA:1482,25 +DA:1483,25 +DA:1484,25 +DA:1485,25 +DA:1488,0 +DA:1490,0 +DA:1493,3 +DA:1500,3 +DA:1501,3 +DA:1502,15 +DA:1503,3 +DA:1505,6 +DA:1506,3 +DA:1507,3 +DA:1512,3 +DA:1513,3 +DA:1514,15 +DA:1515,3 +DA:1517,6 +DA:1518,3 +DA:1519,3 +DA:1524,3 +DA:1529,9 +DA:1530,3 +DA:1531,3 +DA:1534,6 +DA:1535,3 +DA:1536,3 +DA:1539,9 +DA:1540,9 +DA:1541,3 +DA:1542,6 +DA:1545,6 +DA:1546,3 +DA:1547,6 +DA:1551,0 +DA:1552,0 +DA:1553,0 +DA:1560,5 +DA:1561,5 +DA:1566,3 +DA:1567,6 +DA:1568,3 +DA:1570,3 +DA:1574,9 +DA:1575,3 +DA:1577,3 +DA:1584,3 +DA:1585,6 +DA:1586,3 +DA:1587,12 +DA:1588,9 +DA:1590,3 +DA:1592,3 +DA:1599,4 +DA:1600,12 +DA:1601,3 +DA:1603,3 +DA:1607,16 +DA:1608,3 +DA:1610,3 +DA:1617,3 +DA:1618,9 +DA:1619,0 +DA:1621,0 +DA:1625,12 +DA:1626,0 +DA:1628,0 +DA:1637,4 +DA:1647,12 +DA:1653,4 +DA:1660,4 +DA:1669,4 +DA:1676,4 +DA:1677,12 +DA:1680,4 +DA:1686,4 +DA:1687,4 +DA:1690,4 +DA:1691,4 +DA:1696,4 +DA:1697,4 +DA:1705,3 +DA:1707,3 +DA:1711,4 +DA:1715,4 +DA:1720,4 +DA:1721,0 +DA:1730,3 +DA:1734,3 +DA:1735,3 +DA:1739,6 +DA:1741,3 +DA:1742,6 +DA:1750,3 +DA:1755,3 +DA:1756,6 +DA:1757,3 +DA:1758,3 +DA:1761,3 +DA:1762,3 +DA:1764,3 +DA:1770,3 +DA:1774,3 +DA:1776,6 +DA:1777,0 +DA:1783,6 +DA:1788,3 +DA:1791,3 +DA:1796,3 +DA:1801,3 +DA:1802,6 +DA:1803,3 +DA:1804,3 +DA:1807,3 +DA:1808,3 +DA:1810,3 +DA:1816,3 +DA:1817,3 +DA:1822,4 +DA:1827,8 +DA:1828,16 +DA:1830,12 +DA:1831,0 +DA:1835,0 +DA:1836,0 +DA:1837,0 +DA:1838,0 +DA:1839,0 +DA:1842,4 +DA:1843,0 +DA:1845,4 +DA:1846,4 +DA:1847,4 +DA:1855,0 +DA:1860,0 +DA:1861,0 +DA:1863,0 +DA:1864,0 +DA:1865,0 +DA:1868,0 +DA:1869,0 +DA:1871,0 +DA:1883,0 +DA:1889,0 +DA:1890,0 +DA:1892,0 +DA:1893,0 +DA:1896,0 +DA:1897,0 +DA:1898,0 +DA:1899,0 +DA:1900,0 +DA:1901,0 +DA:1902,0 +DA:1903,0 +DA:1904,0 +DA:1906,0 +DA:1907,0 +DA:1908,0 +DA:1909,0 +DA:1910,0 +DA:1911,0 +DA:1912,0 +DA:1913,0 +DA:1914,0 +DA:1915,0 +DA:1918,0 +DA:1919,0 +DA:1925,0 +DA:1940,0 +DA:1946,0 +DA:1950,0 +DA:1951,0 +DA:1952,0 +DA:1953,0 +DA:1954,0 +DA:1956,0 +DA:1957,0 +DA:1963,0 +DA:1965,0 +DA:1966,0 +DA:1967,0 +DA:1973,0 +DA:1979,0 +DA:1981,0 +DA:1986,0 +DA:1989,0 +DA:1990,0 +DA:1994,0 +DA:1997,0 +DA:1999,0 +DA:2000,0 +DA:2002,0 +DA:2003,0 +DA:2006,0 +DA:2008,0 +DA:2012,0 +DA:2014,0 +DA:2016,0 +DA:2019,0 +DA:2025,0 +DA:2031,0 +DA:2033,0 +DA:2042,0 +DA:2051,0 +DA:2060,0 +DA:2064,0 +DA:2067,0 +DA:2071,0 +DA:2073,0 +DA:2076,0 +DA:2077,0 +DA:2078,0 +DA:2079,0 +DA:2080,0 +DA:2084,0 +DA:2085,0 +DA:2089,0 +DA:2091,0 +DA:2092,0 +DA:2093,0 +DA:2094,0 +DA:2101,0 +DA:2103,0 +DA:2107,0 +DA:2115,0 +DA:2116,0 +DA:2118,0 +DA:2123,0 +DA:2124,0 +DA:2129,0 +DA:2131,0 +DA:2132,0 +DA:2133,0 +DA:2138,0 +DA:2146,0 +DA:2148,0 +DA:2150,0 +DA:2151,0 +DA:2152,0 +DA:2158,0 +DA:2161,0 +DA:2162,0 +DA:2164,0 +DA:2167,0 +DA:2168,0 +DA:2170,0 +DA:2171,0 +DA:2173,0 +DA:2175,0 +DA:2178,0 +DA:2179,0 +DA:2180,0 +DA:2185,0 +DA:2191,0 +DA:2193,0 +DA:2197,0 +DA:2199,0 +DA:2200,0 +DA:2204,0 +DA:2205,0 +DA:2206,0 +DA:2207,0 +DA:2210,0 +DA:2211,0 +DA:2214,0 +DA:2216,0 +DA:2218,0 +DA:2222,0 +DA:2228,0 +DA:2233,0 +DA:2234,0 +DA:2235,0 +DA:2237,0 +DA:2239,0 +DA:2240,0 +DA:2241,0 +DA:2243,0 +DA:2247,0 +DA:2248,0 +DA:2249,0 +DA:2251,0 +DA:2255,0 +DA:2256,0 +DA:2257,0 +DA:2258,0 +DA:2259,0 +DA:2261,0 +DA:2263,0 +DA:2265,0 +DA:2266,0 +DA:2267,0 +DA:2268,0 +DA:2269,0 +DA:2270,0 +DA:2271,0 +DA:2279,0 +DA:2290,0 +DA:2293,0 +DA:2296,0 +DA:2304,0 +DA:2316,0 +DA:2319,0 +DA:2323,0 +DA:2325,0 +DA:2328,0 +DA:2329,0 +DA:2330,0 +DA:2331,0 +DA:2332,0 +DA:2336,0 +DA:2337,0 +DA:2341,0 +DA:2343,0 +DA:2344,0 +DA:2350,0 +DA:2351,0 +DA:2353,0 +DA:2356,0 +DA:2372,0 +DA:2373,0 +DA:2374,0 +DA:2376,0 +DA:2377,0 +DA:2380,0 +DA:2381,0 +DA:2382,0 +DA:2383,0 +DA:2386,0 +DA:2387,0 +DA:2388,0 +DA:2391,0 +DA:2392,0 +DA:2395,0 +DA:2396,0 +DA:2397,0 +DA:2400,0 +DA:2401,0 +DA:2405,0 +DA:2407,0 +DA:2411,0 +DA:2412,0 +DA:2415,0 +DA:2417,0 +DA:2421,0 +DA:2424,0 +DA:2426,0 +DA:2432,0 +DA:2433,0 +DA:2435,0 +DA:2437,0 +DA:2440,0 +DA:2443,0 +DA:2449,0 +DA:2450,0 +DA:2454,0 +DA:2461,0 +DA:2463,0 +DA:2464,0 +DA:2471,0 +DA:2472,0 +DA:2473,0 +DA:2474,0 +DA:2477,0 +DA:2484,0 +DA:2488,0 +DA:2492,0 +DA:2494,0 +DA:2496,0 +DA:2502,0 +DA:2506,0 +DA:2510,0 +DA:2512,0 +DA:2513,0 +DA:2514,0 +DA:2516,0 +DA:2523,0 +DA:2528,0 +DA:2530,0 +DA:2532,0 +DA:2538,0 +DA:2539,0 +DA:2540,0 +DA:2541,0 +DA:2543,0 +DA:2551,0 +DA:2552,0 +DA:2554,0 +DA:2557,0 +DA:2561,0 +DA:2565,0 +DA:2571,0 +DA:2572,0 +DA:2573,0 +DA:2575,0 +DA:2576,0 +DA:2579,0 +DA:2580,0 +DA:2581,0 +DA:2582,0 +DA:2585,0 +DA:2586,0 +DA:2587,0 +DA:2591,0 +DA:2597,0 +DA:2598,0 +DA:2601,0 +DA:2603,0 +DA:2605,0 +DA:2607,0 +DA:2610,0 +DA:2611,0 +DA:2612,0 +DA:2618,0 +DA:2619,0 +DA:2621,0 +DA:2624,0 +DA:2626,0 +DA:2628,0 +DA:2631,0 +DA:2635,0 +DA:2639,0 +DA:2640,0 +DA:2641,0 +DA:2642,0 +DA:2643,0 +DA:2646,0 +DA:2652,0 +DA:2657,0 +DA:2659,0 +DA:2661,0 +DA:2662,0 +DA:2665,0 +DA:2669,0 +DA:2670,0 +DA:2671,0 +DA:2672,0 +DA:2674,0 +DA:2681,0 +DA:2682,0 +DA:2686,0 +DA:2688,0 +DA:2691,0 +DA:2692,0 +DA:2696,0 +DA:2698,0 +DA:2701,0 +DA:2702,0 +DA:2705,0 +DA:2706,0 +DA:2707,0 +DA:2708,0 +DA:2710,0 +DA:2715,0 +DA:2716,0 +DA:2717,0 +DA:2719,0 +DA:2720,0 +DA:2723,0 +DA:2724,0 +DA:2725,0 +DA:2727,0 +DA:2728,0 +DA:2729,0 +DA:2735,0 +DA:2736,0 +DA:2738,0 +DA:2739,0 +DA:2742,0 +DA:2743,0 +DA:2746,0 +DA:2748,0 +DA:2749,0 +DA:2750,0 +DA:2751,0 +DA:2753,0 +DA:2755,0 +DA:2760,0 +DA:2761,0 +DA:2762,0 +DA:2764,0 +DA:2765,0 +DA:2769,0 +DA:2770,0 +DA:2771,0 +DA:2773,0 +DA:2778,0 +DA:2779,0 +DA:2780,0 +DA:2782,0 +DA:2783,0 +DA:2785,0 +LF:1046 +LH:543 +end_of_record +TN: +SF:lib/apis/sign_api/utils/auth/address_utils.dart +FNF:0 +FNH:0 +DA:2,3 +DA:3,6 +DA:6,3 +DA:7,6 +DA:10,0 +DA:11,0 +LF:6 +LH:4 +end_of_record +TN: +SF:lib/apis/sign_api/utils/auth/auth_api_validators.dart +FNF:0 +FNH:0 +DA:5,1 +DA:6,1 +DA:7,1 +DA:10,3 +DA:11,6 +DA:12,2 +DA:15,4 +DA:19,6 +DA:20,1 +DA:27,9 +DA:28,1 +DA:34,3 +DA:35,1 +DA:36,1 +DA:39,1 +DA:46,3 +DA:52,3 +DA:53,2 +DA:55,2 +DA:60,1 +DA:70,0 +DA:71,0 +DA:72,0 +DA:78,0 +DA:79,0 +DA:82,0 +DA:86,0 +DA:87,0 +DA:93,0 +DA:94,0 +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:123,0 +DA:128,0 +DA:129,0 +DA:132,0 +DA:136,0 +DA:137,0 +LF:44 +LH:20 +end_of_record +TN: +SF:lib/apis/sign_api/utils/auth/auth_signature.dart +FNF:0 +FNH:0 +DA:16,9 +DA:17,3 +DA:18,6 +DA:19,6 +DA:22,3 +DA:23,3 +DA:24,3 +DA:25,3 +DA:26,3 +DA:28,6 +DA:30,3 +DA:36,3 +DA:37,6 +DA:40,6 +DA:43,0 +DA:46,3 +DA:53,3 +DA:54,6 +DA:58,6 +DA:59,0 +DA:63,3 +DA:64,6 +DA:67,3 +DA:68,6 +DA:72,6 +DA:92,3 +DA:93,3 +DA:94,3 +DA:97,3 +DA:98,3 +DA:99,6 +DA:112,9 +DA:115,0 +DA:128,0 +DA:130,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:138,0 +DA:139,0 +DA:141,0 +DA:143,0 +DA:149,0 +DA:157,0 +DA:158,0 +DA:166,3 +DA:173,6 +DA:174,3 +DA:177,3 +DA:179,0 +DA:180,0 +DA:183,0 +DA:188,0 +DA:189,0 +DA:194,0 +DA:199,0 +DA:200,0 +DA:202,0 +DA:204,0 +DA:212,0 +DA:217,0 +DA:219,0 +DA:221,0 +DA:225,0 +DA:226,0 +DA:227,0 +DA:230,0 +DA:231,0 +DA:235,0 +DA:237,0 +DA:241,0 +DA:243,0 +DA:244,0 +DA:246,0 +DA:247,0 +DA:248,0 +DA:249,0 +DA:250,0 +DA:254,0 +DA:257,0 +DA:259,0 +DA:265,0 +DA:266,0 +DA:267,0 +DA:270,0 +DA:271,0 +DA:273,0 +DA:276,0 +DA:280,1 +DA:282,1 +DA:283,1 +DA:284,2 +DA:285,1 +DA:292,1 +DA:295,2 +DA:296,1 +DA:297,2 +DA:298,3 +LF:99 +LH:44 +end_of_record +TN: +SF:lib/apis/sign_api/utils/auth/auth_utils.dart +FNF:0 +FNH:0 +DA:2,3 +DA:3,9 +LF:2 +LH:2 +end_of_record +TN: +SF:lib/apis/sign_api/utils/auth/recaps_utils.dart +FNF:0 +FNH:0 +DA:8,0 +DA:9,0 +DA:10,0 +DA:12,0 +DA:13,0 +DA:16,0 +DA:17,0 +DA:20,0 +DA:21,0 +DA:22,0 +DA:26,0 +DA:27,0 +DA:29,0 +DA:31,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:39,0 +DA:42,0 +DA:44,0 +DA:46,0 +DA:47,0 +DA:49,0 +DA:50,0 +DA:53,0 +DA:55,0 +DA:59,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:73,0 +DA:74,0 +DA:76,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:90,0 +DA:91,0 +DA:92,0 +DA:93,0 +DA:95,0 +DA:98,0 +DA:99,0 +DA:100,0 +DA:102,0 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:111,0 +DA:115,0 +DA:116,0 +DA:118,0 +DA:123,0 +DA:124,0 +DA:125,0 +DA:127,0 +DA:139,0 +DA:144,0 +DA:145,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:153,0 +DA:156,0 +DA:163,0 +DA:164,0 +DA:166,0 +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +DA:191,0 +DA:195,0 +DA:196,0 +DA:197,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:202,0 +DA:204,0 +DA:205,0 +DA:206,0 +DA:207,0 +DA:208,0 +DA:209,0 +DA:210,0 +DA:213,0 +DA:214,0 +DA:215,0 +DA:216,0 +DA:224,0 +DA:227,0 +DA:229,0 +DA:230,0 +DA:233,0 +DA:237,0 +DA:241,0 +DA:243,0 +DA:245,0 +DA:246,0 +DA:247,0 +DA:248,0 +DA:249,0 +DA:250,0 +DA:251,0 +DA:252,0 +DA:253,0 +DA:255,0 +DA:256,0 +DA:258,0 +DA:259,0 +DA:260,0 +DA:261,0 +DA:262,0 +DA:263,0 +DA:265,0 +DA:268,0 +DA:269,0 +DA:270,0 +DA:271,0 +DA:272,0 +DA:274,0 +DA:275,0 +DA:279,0 +DA:280,0 +DA:282,0 +DA:285,0 +DA:290,0 +DA:291,0 +DA:293,0 +DA:296,0 +DA:298,0 +DA:301,0 +DA:303,0 +DA:305,0 +DA:307,0 +DA:310,0 +DA:315,0 +DA:316,0 +DA:318,0 +DA:319,0 +DA:320,0 +DA:321,0 +DA:322,0 +DA:326,0 +DA:329,0 +DA:335,0 +DA:336,0 +DA:337,0 +DA:338,0 +DA:342,0 +DA:343,0 +DA:344,0 +DA:345,0 +DA:346,0 +LF:169 +LH:0 +end_of_record +TN: +SF:lib/apis/sign_api/utils/custom_credentials.dart +FNF:0 +FNH:0 +DA:8,0 +DA:26,0 +DA:27,0 +DA:29,0 +DA:31,0 +DA:32,0 +DA:33,0 +DA:35,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:54,0 +DA:55,0 +DA:57,0 +DA:63,0 +DA:68,0 +DA:71,0 +DA:78,0 +LF:23 +LH:0 +end_of_record +TN: +SF:lib/apis/sign_api/utils/sign_api_validator_utils.dart +FNF:0 +FNH:0 +DA:7,6 +DA:12,6 +DA:13,12 +DA:15,6 +DA:16,18 +DA:22,5 +DA:28,5 +DA:30,4 +DA:31,4 +DA:33,4 +DA:37,10 +DA:38,5 +DA:39,1 +DA:42,1 +DA:52,5 +DA:56,10 +DA:57,5 +DA:59,5 +DA:60,5 +DA:69,5 +DA:73,10 +DA:74,5 +DA:75,4 +DA:78,4 +DA:87,5 +DA:91,10 +DA:92,5 +DA:93,5 +DA:94,5 +DA:103,4 +DA:108,4 +DA:109,1 +DA:111,1 +DA:116,4 +DA:122,4 +DA:126,4 +DA:127,4 +DA:129,4 +DA:138,4 +DA:144,4 +DA:145,1 +DA:147,1 +DA:152,4 +DA:157,4 +DA:162,4 +DA:163,4 +DA:165,4 +DA:174,4 +DA:180,4 +DA:181,1 +DA:183,1 +DA:188,4 +DA:193,4 +DA:198,4 +DA:199,4 +DA:201,4 +DA:210,6 +DA:215,12 +DA:216,12 +DA:219,6 +DA:221,4 +DA:223,4 +DA:226,12 +DA:228,6 +DA:230,6 +DA:232,6 +DA:234,6 +DA:239,6 +DA:243,6 +DA:244,12 +DA:245,12 +DA:247,6 +DA:248,12 +DA:249,12 +DA:253,5 +DA:256,5 +DA:259,2 +DA:262,10 +DA:265,2 +DA:268,10 +DA:277,4 +DA:281,12 +DA:282,8 +DA:285,4 +DA:289,8 +DA:290,8 +DA:291,4 +DA:293,4 +DA:297,4 +DA:304,4 +DA:308,4 +DA:309,4 +DA:310,8 +DA:312,4 +DA:313,4 +DA:314,8 +LF:96 +LH:96 +end_of_record +TN: +SF:lib/apis/utils/errors.dart +FNF:0 +FNH:0 +DA:230,7 +DA:234,7 +DA:235,7 +DA:236,14 +DA:237,7 +DA:238,12 +DA:239,8 +DA:246,6 +DA:250,6 +DA:251,6 +DA:252,12 +DA:253,6 +DA:254,12 +DA:255,14 +LF:14 +LH:14 +end_of_record +TN: +SF:lib/apis/utils/extensions.dart +FNF:0 +FNH:0 +DA:8,0 +DA:9,0 +DA:10,0 +DA:11,0 +DA:12,0 +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:49,0 +DA:55,0 +DA:57,0 +DA:58,0 +DA:60,0 +DA:66,0 +DA:68,0 +DA:69,0 +DA:74,0 +DA:76,0 +LF:40 +LH:0 +end_of_record +TN: +SF:lib/apis/utils/log_level.dart +FNF:0 +FNH:0 +DA:12,10 +DA:14,10 +DA:16,10 +DA:18,10 +DA:20,6 +DA:22,6 +DA:24,6 +LF:7 +LH:7 +end_of_record +TN: +SF:lib/apis/utils/namespace_utils.dart +FNF:0 +FNH:0 +DA:7,6 +DA:8,6 +DA:9,6 +DA:10,12 +DA:16,6 +DA:17,6 +DA:18,6 +DA:19,12 +DA:20,18 +DA:21,18 +DA:27,4 +DA:29,4 +DA:36,1 +DA:37,1 +DA:38,2 +DA:43,6 +DA:44,6 +DA:45,6 +DA:46,6 +DA:47,6 +DA:48,6 +DA:55,6 +DA:57,12 +DA:58,6 +DA:59,6 +DA:65,6 +DA:70,1 +DA:71,1 +DA:72,2 +DA:79,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:98,0 +DA:99,0 +DA:100,0 +DA:111,6 +DA:115,6 +DA:116,6 +DA:119,12 +DA:123,5 +DA:128,10 +DA:129,5 +DA:130,5 +DA:137,5 +DA:141,5 +DA:145,5 +DA:146,10 +DA:147,5 +DA:148,2 +DA:150,10 +DA:151,5 +DA:152,10 +DA:161,0 +DA:165,0 +DA:166,0 +DA:167,0 +DA:168,0 +DA:170,0 +DA:171,0 +DA:180,5 +DA:184,5 +DA:185,10 +DA:186,5 +DA:187,2 +DA:189,10 +DA:190,5 +DA:191,10 +DA:201,6 +DA:205,6 +DA:206,6 +DA:207,6 +DA:208,6 +DA:211,12 +DA:219,1 +DA:225,2 +DA:226,1 +DA:227,1 +DA:234,1 +DA:239,4 +DA:246,4 +DA:252,4 +DA:256,1 +DA:260,8 +DA:261,9 +DA:262,1 +DA:263,1 +DA:264,2 +DA:265,1 +DA:266,1 +DA:267,1 +DA:268,4 +DA:269,1 +DA:270,1 +DA:271,1 +DA:272,1 +DA:273,4 +DA:274,1 +DA:275,1 +DA:276,1 +DA:277,1 +DA:278,4 +DA:279,1 +DA:281,1 +DA:285,4 +DA:287,4 +DA:291,0 +DA:295,0 +DA:296,0 +DA:299,0 +DA:301,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:305,0 +DA:311,0 +DA:316,4 +DA:325,8 +DA:326,8 +DA:327,12 +DA:332,4 +DA:338,4 +DA:344,4 +DA:347,8 +DA:349,4 +DA:350,4 +DA:351,4 +DA:352,4 +DA:353,8 +DA:354,8 +DA:356,4 +DA:357,4 +DA:364,4 +DA:365,4 +DA:368,8 +DA:372,4 +DA:373,4 +DA:376,8 +DA:381,8 +DA:383,4 +DA:384,4 +DA:387,12 +DA:390,4 +DA:391,4 +DA:394,8 +DA:398,4 +DA:399,4 +DA:402,8 +DA:409,8 +DA:410,8 +DA:411,8 +DA:412,8 +DA:431,0 +DA:434,0 +DA:435,0 +DA:436,0 +DA:437,0 +DA:439,0 +LF:168 +LH:128 +end_of_record +TN: +SF:lib/apis/utils/walletconnect_utils.dart +FNF:0 +FNH:0 +DA:9,7 +DA:10,21 +DA:11,7 +DA:12,7 +DA:14,7 +DA:18,0 +DA:19,0 +DA:20,0 +DA:23,7 +DA:24,7 +DA:27,7 +DA:28,35 +DA:31,9 +DA:36,27 +DA:37,9 +DA:41,9 +DA:42,9 +DA:43,9 +DA:46,9 +DA:50,9 +DA:52,9 +DA:54,9 +DA:56,9 +DA:58,0 +DA:66,9 +DA:71,9 +DA:72,9 +DA:73,9 +DA:74,18 +DA:75,18 +DA:78,9 +DA:81,9 +DA:90,9 +DA:91,18 +DA:92,9 +DA:95,9 +DA:101,9 +DA:102,9 +DA:106,9 +DA:107,9 +DA:108,9 +DA:109,0 +DA:110,9 +DA:111,0 +DA:113,9 +DA:117,9 +DA:118,18 +DA:123,8 +DA:124,8 +DA:125,8 +DA:126,8 +DA:127,16 +DA:133,16 +DA:135,16 +DA:136,8 +DA:137,30 +DA:138,7 +DA:141,8 +DA:142,8 +DA:145,8 +DA:153,8 +DA:154,5 +DA:155,10 +DA:156,10 +DA:161,8 +DA:162,16 +DA:163,8 +DA:164,16 +DA:165,16 +DA:166,0 +DA:173,8 +DA:176,8 +DA:183,7 +DA:187,7 +DA:188,28 +DA:189,7 +DA:190,0 +DA:195,7 +DA:204,7 +DA:205,7 +DA:207,18 +DA:208,6 +DA:209,30 +DA:213,14 +DA:216,7 +DA:218,7 +DA:223,0 +DA:224,0 +DA:225,0 +DA:226,0 +LF:90 +LH:78 +end_of_record +TN: +SF:lib/apis/web3app/web3app.dart +FNF:0 +FNH:0 +DA:22,2 +DA:30,2 +DA:31,2 +DA:40,2 +DA:57,2 +DA:61,4 +DA:62,2 +DA:63,2 +DA:64,2 +DA:65,4 +DA:68,0 +DA:69,0 +DA:72,2 +DA:73,4 +DA:76,0 +DA:77,0 +DA:80,2 +DA:81,4 +DA:84,0 +DA:85,0 +DA:88,2 +DA:89,4 +DA:92,0 +DA:93,0 +DA:96,2 +DA:97,4 +DA:100,0 +DA:104,2 +DA:105,4 +DA:108,0 +DA:109,0 +DA:112,2 +DA:113,4 +DA:116,0 +DA:117,0 +DA:120,2 +DA:121,4 +DA:124,0 +DA:125,0 +DA:130,4 +DA:131,2 +DA:132,2 +DA:133,4 +DA:134,4 +DA:135,4 +DA:136,4 +DA:140,2 +DA:142,2 +DA:146,4 +DA:147,4 +DA:148,4 +DA:150,2 +DA:155,2 +DA:156,4 +DA:157,1 +DA:158,2 +DA:159,1 +DA:160,2 +DA:161,0 +DA:163,0 +DA:164,1 +DA:165,2 +DA:166,1 +DA:167,2 +DA:168,1 +DA:169,2 +DA:170,1 +DA:171,2 +DA:173,1 +DA:174,2 +DA:175,1 +DA:176,2 +DA:177,0 +DA:179,0 +DA:184,2 +DA:194,4 +DA:208,1 +DA:215,2 +DA:225,0 +DA:234,0 +DA:246,0 +DA:258,0 +DA:273,1 +DA:280,2 +DA:290,1 +DA:295,2 +DA:301,1 +DA:307,2 +DA:316,2 +DA:319,4 +DA:325,1 +DA:330,2 +DA:338,1 +DA:341,2 +DA:347,2 +DA:348,6 +DA:352,0 +DA:353,0 +DA:355,0 +DA:356,0 +DA:357,0 +DA:358,0 +DA:359,0 +DA:361,0 +DA:370,1 +DA:377,2 +DA:387,0 +DA:392,0 +DA:402,0 +DA:404,0 +DA:406,0 +DA:415,0 +DA:425,0 +DA:431,0 +DA:440,0 +DA:446,0 +LF:116 +LH:75 +end_of_record +TN: +SF:lib/apis/web3wallet/web3wallet.dart +FNF:0 +FNH:0 +DA:13,3 +DA:22,3 +DA:23,3 +DA:33,3 +DA:50,3 +DA:54,6 +DA:55,3 +DA:56,3 +DA:57,3 +DA:58,6 +DA:61,0 +DA:62,0 +DA:65,3 +DA:66,6 +DA:69,0 +DA:70,0 +DA:73,3 +DA:74,6 +DA:77,0 +DA:78,0 +DA:81,3 +DA:82,6 +DA:85,0 +DA:86,0 +DA:89,3 +DA:90,6 +DA:93,0 +DA:97,3 +DA:98,6 +DA:101,0 +DA:102,0 +DA:105,3 +DA:106,6 +DA:109,0 +DA:110,0 +DA:113,3 +DA:114,6 +DA:117,0 +DA:118,0 +DA:123,6 +DA:124,3 +DA:125,3 +DA:126,6 +DA:127,6 +DA:128,6 +DA:129,6 +DA:133,3 +DA:135,3 +DA:139,6 +DA:140,6 +DA:141,6 +DA:143,3 +DA:146,2 +DA:151,4 +DA:159,1 +DA:160,2 +DA:161,1 +DA:162,2 +DA:163,1 +DA:164,2 +DA:165,2 +DA:167,4 +DA:168,0 +DA:170,0 +DA:171,1 +DA:173,2 +DA:174,1 +DA:176,2 +DA:177,1 +DA:178,2 +DA:180,1 +DA:181,2 +DA:182,1 +DA:183,2 +DA:184,1 +DA:186,2 +DA:191,2 +DA:199,4 +DA:210,1 +DA:216,2 +DA:225,1 +DA:231,2 +DA:241,1 +DA:246,2 +DA:252,1 +DA:259,2 +DA:269,1 +DA:275,2 +DA:284,1 +DA:290,2 +DA:299,1 +DA:305,2 +DA:314,1 +DA:321,2 +DA:331,1 +DA:337,2 +DA:346,1 +DA:351,2 +DA:357,2 +DA:360,4 +DA:366,1 +DA:371,2 +DA:379,2 +DA:382,4 +DA:388,1 +DA:391,2 +DA:397,2 +DA:398,6 +DA:402,2 +DA:403,4 +DA:405,0 +DA:406,0 +DA:407,0 +DA:408,0 +DA:409,0 +DA:410,0 +DA:411,0 +DA:413,0 +DA:422,2 +DA:430,4 +DA:441,2 +DA:444,4 +DA:450,1 +DA:455,2 +DA:465,0 +DA:467,0 +DA:468,0 +DA:470,0 +DA:472,0 +DA:478,0 +DA:487,0 +DA:493,0 +DA:502,0 +DA:505,0 +DA:511,0 +DA:517,0 +DA:526,0 +DA:532,0 +LF:138 +LH:99 +end_of_record From b2ed25c3fe295f268ba82b239f861be771bc4663 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 5 Aug 2024 12:23:15 +0200 Subject: [PATCH 07/27] removed coverage from tracking --- .gitignore | 1 + coverage/html/amber.png | Bin 141 -> 0 bytes .../auth_api/auth_client.dart.func-c.html | 75 - .../html/auth_api/auth_client.dart.func.html | 75 - .../html/auth_api/auth_client.dart.gcov.html | 270 - .../auth_api/auth_engine.dart.func-c.html | 75 - .../html/auth_api/auth_engine.dart.func.html | 75 - .../html/auth_api/auth_engine.dart.gcov.html | 513 -- coverage/html/auth_api/index-sort-f.html | 117 - coverage/html/auth_api/index-sort-l.html | 100 - coverage/html/auth_api/index.html | 100 - coverage/html/cmd_line | 1 - coverage/html/core/core.dart.func-c.html | 75 - coverage/html/core/core.dart.func.html | 75 - coverage/html/core/core.dart.gcov.html | 255 - .../html/core/crypto/crypto.dart.func-c.html | 75 - .../html/core/crypto/crypto.dart.func.html | 75 - .../html/core/crypto/crypto.dart.gcov.html | 330 -- .../crypto/crypto_models.dart.func-c.html | 75 - .../core/crypto/crypto_models.dart.func.html | 75 - .../core/crypto/crypto_models.dart.gcov.html | 157 - .../core/crypto/crypto_utils.dart.func-c.html | 75 - .../core/crypto/crypto_utils.dart.func.html | 75 - .../core/crypto/crypto_utils.dart.gcov.html | 323 -- coverage/html/core/crypto/index-sort-f.html | 129 - coverage/html/core/crypto/index-sort-l.html | 109 - coverage/html/core/crypto/index.html | 109 - coverage/html/core/echo/echo.dart.func-c.html | 75 - coverage/html/core/echo/echo.dart.func.html | 75 - coverage/html/core/echo/echo.dart.gcov.html | 120 - .../core/echo/echo_client.dart.func-c.html | 75 - .../html/core/echo/echo_client.dart.func.html | 75 - .../html/core/echo/echo_client.dart.gcov.html | 119 - coverage/html/core/echo/index-sort-f.html | 117 - coverage/html/core/echo/index-sort-l.html | 100 - coverage/html/core/echo/index.html | 100 - .../echo/models/echo_body.dart.func-c.html | 75 - .../core/echo/models/echo_body.dart.func.html | 75 - .../core/echo/models/echo_body.dart.gcov.html | 93 - .../models/echo_response.dart.func-c.html | 75 - .../echo/models/echo_response.dart.func.html | 75 - .../echo/models/echo_response.dart.gcov.html | 123 - .../html/core/echo/models/index-sort-f.html | 117 - .../html/core/echo/models/index-sort-l.html | 100 - coverage/html/core/echo/models/index.html | 100 - .../core/heartbit/heartbeat.dart.func-c.html | 75 - .../core/heartbit/heartbeat.dart.func.html | 75 - .../core/heartbit/heartbeat.dart.gcov.html | 103 - coverage/html/core/heartbit/index-sort-f.html | 105 - coverage/html/core/heartbit/index-sort-l.html | 91 - coverage/html/core/heartbit/index.html | 91 - coverage/html/core/index-sort-f.html | 105 - coverage/html/core/index-sort-l.html | 91 - coverage/html/core/index.html | 91 - .../core/pairing/expirer.dart.func-c.html | 75 - .../html/core/pairing/expirer.dart.func.html | 75 - .../html/core/pairing/expirer.dart.gcov.html | 136 - coverage/html/core/pairing/index-sort-f.html | 141 - coverage/html/core/pairing/index-sort-l.html | 118 - coverage/html/core/pairing/index.html | 118 - .../pairing/json_rpc_history.dart.func-c.html | 75 - .../pairing/json_rpc_history.dart.func.html | 75 - .../pairing/json_rpc_history.dart.gcov.html | 110 - .../core/pairing/pairing.dart.func-c.html | 75 - .../html/core/pairing/pairing.dart.func.html | 75 - .../html/core/pairing/pairing.dart.gcov.html | 909 ---- .../pairing/pairing_store.dart.func-c.html | 75 - .../core/pairing/pairing_store.dart.func.html | 75 - .../core/pairing/pairing_store.dart.gcov.html | 111 - .../html/core/pairing/utils/index-sort-f.html | 117 - .../html/core/pairing/utils/index-sort-l.html | 100 - coverage/html/core/pairing/utils/index.html | 100 - .../utils/json_rpc_utils.dart.func-c.html | 75 - .../utils/json_rpc_utils.dart.func.html | 75 - .../utils/json_rpc_utils.dart.gcov.html | 146 - .../utils/pairing_models.dart.func-c.html | 75 - .../utils/pairing_models.dart.func.html | 75 - .../utils/pairing_models.dart.gcov.html | 272 - .../html/core/relay_auth/index-sort-f.html | 117 - .../html/core/relay_auth/index-sort-l.html | 100 - coverage/html/core/relay_auth/index.html | 100 - .../relay_auth/relay_auth.dart.func-c.html | 75 - .../core/relay_auth/relay_auth.dart.func.html | 75 - .../core/relay_auth/relay_auth.dart.gcov.html | 308 -- .../relay_auth_models.dart.func-c.html | 75 - .../relay_auth_models.dart.func.html | 75 - .../relay_auth_models.dart.gcov.html | 186 - .../i_relay_client.dart.func-c.html | 75 - .../i_relay_client.dart.func.html | 75 - .../i_relay_client.dart.gcov.html | 120 - .../html/core/relay_client/index-sort-f.html | 141 - .../html/core/relay_client/index-sort-l.html | 118 - coverage/html/core/relay_client/index.html | 118 - .../json_rpc_2/error_code.dart.func-c.html | 75 - .../json_rpc_2/error_code.dart.func.html | 75 - .../json_rpc_2/error_code.dart.gcov.html | 129 - .../relay_client/json_rpc_2/index-sort-f.html | 105 - .../relay_client/json_rpc_2/index-sort-l.html | 91 - .../core/relay_client/json_rpc_2/index.html | 91 - .../json_rpc_2/src/client.dart.func-c.html | 75 - .../json_rpc_2/src/client.dart.func.html | 75 - .../json_rpc_2/src/client.dart.gcov.html | 316 -- .../json_rpc_2/src/exception.dart.func-c.html | 75 - .../json_rpc_2/src/exception.dart.func.html | 75 - .../json_rpc_2/src/exception.dart.gcov.html | 145 - .../json_rpc_2/src/index-sort-f.html | 165 - .../json_rpc_2/src/index-sort-l.html | 136 - .../relay_client/json_rpc_2/src/index.html | 136 - .../src/parameters.dart.func-c.html | 75 - .../json_rpc_2/src/parameters.dart.func.html | 75 - .../json_rpc_2/src/parameters.dart.gcov.html | 420 -- .../json_rpc_2/src/peer.dart.func-c.html | 75 - .../json_rpc_2/src/peer.dart.func.html | 75 - .../json_rpc_2/src/peer.dart.gcov.html | 228 - .../json_rpc_2/src/server.dart.func-c.html | 75 - .../json_rpc_2/src/server.dart.func.html | 75 - .../json_rpc_2/src/server.dart.gcov.html | 391 -- .../json_rpc_2/src/utils.dart.func-c.html | 75 - .../json_rpc_2/src/utils.dart.func.html | 75 - .../json_rpc_2/src/utils.dart.gcov.html | 142 - .../message_tracker.dart.func-c.html | 75 - .../message_tracker.dart.func.html | 75 - .../message_tracker.dart.gcov.html | 124 - .../relay_client.dart.func-c.html | 75 - .../relay_client/relay_client.dart.func.html | 75 - .../relay_client/relay_client.dart.gcov.html | 542 -- .../relay_client_models.dart.func-c.html | 75 - .../relay_client_models.dart.func.html | 75 - .../relay_client_models.dart.gcov.html | 129 - .../websocket/http_client.dart.func-c.html | 75 - .../websocket/http_client.dart.func.html | 75 - .../websocket/http_client.dart.gcov.html | 100 - .../websocket/i_http_client.dart.func-c.html | 75 - .../websocket/i_http_client.dart.func.html | 75 - .../websocket/i_http_client.dart.gcov.html | 93 - .../relay_client/websocket/index-sort-f.html | 129 - .../relay_client/websocket/index-sort-l.html | 109 - .../core/relay_client/websocket/index.html | 109 - .../websocket_handler.dart.func-c.html | 75 - .../websocket_handler.dart.func.html | 75 - .../websocket_handler.dart.gcov.html | 162 - .../core/store/generic_store.dart.func-c.html | 75 - .../core/store/generic_store.dart.func.html | 75 - .../core/store/generic_store.dart.gcov.html | 243 - coverage/html/core/store/index-sort-f.html | 129 - coverage/html/core/store/index-sort-l.html | 109 - coverage/html/core/store/index.html | 109 - .../store/shared_prefs_store.dart.func-c.html | 75 - .../store/shared_prefs_store.dart.func.html | 75 - .../store/shared_prefs_store.dart.gcov.html | 232 - .../core/store/store_models.dart.func-c.html | 75 - .../core/store/store_models.dart.func.html | 75 - .../core/store/store_models.dart.gcov.html | 107 - coverage/html/core/verify/index-sort-f.html | 105 - coverage/html/core/verify/index-sort-l.html | 91 - coverage/html/core/verify/index.html | 91 - .../html/core/verify/models/index-sort-f.html | 105 - .../html/core/verify/models/index-sort-l.html | 91 - coverage/html/core/verify/models/index.html | 91 - .../models/verify_context.dart.func-c.html | 75 - .../models/verify_context.dart.func.html | 75 - .../models/verify_context.dart.gcov.html | 122 - .../html/core/verify/verify.dart.func-c.html | 75 - .../html/core/verify/verify.dart.func.html | 75 - .../html/core/verify/verify.dart.gcov.html | 132 - coverage/html/emerald.png | Bin 141 -> 0 bytes coverage/html/gcov.css | 1101 ---- coverage/html/glass.png | Bin 167 -> 0 bytes coverage/html/index-sort-f.html | 393 -- coverage/html/index-sort-l.html | 307 -- coverage/html/index.html | 307 -- .../html/models/basic_models.dart.func-c.html | 75 - .../html/models/basic_models.dart.func.html | 75 - .../html/models/basic_models.dart.gcov.html | 116 - coverage/html/models/index-sort-f.html | 153 - coverage/html/models/index-sort-l.html | 127 - coverage/html/models/index.html | 127 - .../models/json_rpc_error.dart.func-c.html | 75 - .../html/models/json_rpc_error.dart.func.html | 75 - .../html/models/json_rpc_error.dart.gcov.html | 99 - .../models/json_rpc_request.dart.func-c.html | 75 - .../models/json_rpc_request.dart.func.html | 75 - .../models/json_rpc_request.dart.gcov.html | 90 - .../models/json_rpc_response.dart.func-c.html | 75 - .../models/json_rpc_response.dart.func.html | 75 - .../models/json_rpc_response.dart.gcov.html | 91 - .../models/uri_parse_result.dart.func-c.html | 75 - .../models/uri_parse_result.dart.func.html | 75 - .../models/uri_parse_result.dart.gcov.html | 116 - coverage/html/ruby.png | Bin 141 -> 0 bytes coverage/html/sign_api/index-sort-f.html | 129 - coverage/html/sign_api/index-sort-l.html | 109 - coverage/html/sign_api/index.html | 109 - .../auth/auth_client_events.dart.func-c.html | 75 - .../auth/auth_client_events.dart.func.html | 75 - .../auth/auth_client_events.dart.gcov.html | 127 - .../auth/auth_client_models.dart.func-c.html | 75 - .../auth/auth_client_models.dart.func.html | 75 - .../auth/auth_client_models.dart.gcov.html | 238 - .../auth/common_auth_models.dart.func-c.html | 75 - .../auth/common_auth_models.dart.func.html | 75 - .../auth/common_auth_models.dart.gcov.html | 268 - .../sign_api/models/auth/index-sort-f.html | 153 - .../sign_api/models/auth/index-sort-l.html | 127 - coverage/html/sign_api/models/auth/index.html | 127 - .../auth/session_auth_events.dart.func-c.html | 75 - .../auth/session_auth_events.dart.func.html | 75 - .../auth/session_auth_events.dart.gcov.html | 143 - .../auth/session_auth_models.dart.func-c.html | 75 - .../auth/session_auth_models.dart.func.html | 75 - .../auth/session_auth_models.dart.gcov.html | 189 - .../html/sign_api/models/index-sort-f.html | 153 - .../html/sign_api/models/index-sort-l.html | 127 - coverage/html/sign_api/models/index.html | 127 - .../models/json_rpc_models.dart.func-c.html | 75 - .../models/json_rpc_models.dart.func.html | 75 - .../models/json_rpc_models.dart.gcov.html | 294 - .../models/proposal_models.dart.func-c.html | 75 - .../models/proposal_models.dart.func.html | 75 - .../models/proposal_models.dart.gcov.html | 123 - .../models/session_models.dart.func-c.html | 75 - .../models/session_models.dart.func.html | 75 - .../models/session_models.dart.gcov.html | 159 - .../sign_client_events.dart.func-c.html | 75 - .../models/sign_client_events.dart.func.html | 75 - .../models/sign_client_events.dart.gcov.html | 266 - .../sign_client_models.dart.func-c.html | 75 - .../models/sign_client_models.dart.func.html | 75 - .../models/sign_client_models.dart.gcov.html | 107 - .../html/sign_api/sessions.dart.func-c.html | 75 - .../html/sign_api/sessions.dart.func.html | 75 - .../html/sign_api/sessions.dart.gcov.html | 108 - .../sign_api/sign_client.dart.func-c.html | 75 - .../html/sign_api/sign_client.dart.func.html | 75 - .../html/sign_api/sign_client.dart.gcov.html | 748 --- .../sign_api/sign_engine.dart.func-c.html | 75 - .../html/sign_api/sign_engine.dart.func.html | 75 - .../html/sign_api/sign_engine.dart.gcov.html | 2861 ---------- .../utils/auth/address_utils.dart.func-c.html | 75 - .../utils/auth/address_utils.dart.func.html | 75 - .../utils/auth/address_utils.dart.gcov.html | 85 - .../auth/auth_api_validators.dart.func-c.html | 75 - .../auth/auth_api_validators.dart.func.html | 75 - .../auth/auth_api_validators.dart.gcov.html | 218 - .../auth/auth_signature.dart.func-c.html | 75 - .../utils/auth/auth_signature.dart.func.html | 75 - .../utils/auth/auth_signature.dart.gcov.html | 375 -- .../utils/auth/auth_utils.dart.func-c.html | 75 - .../utils/auth/auth_utils.dart.func.html | 75 - .../utils/auth/auth_utils.dart.gcov.html | 77 - .../sign_api/utils/auth/index-sort-f.html | 153 - .../sign_api/utils/auth/index-sort-l.html | 127 - coverage/html/sign_api/utils/auth/index.html | 127 - .../utils/auth/recaps_utils.dart.func-c.html | 75 - .../utils/auth/recaps_utils.dart.func.html | 75 - .../utils/auth/recaps_utils.dart.gcov.html | 420 -- .../utils/custom_credentials.dart.func-c.html | 75 - .../utils/custom_credentials.dart.func.html | 75 - .../utils/custom_credentials.dart.gcov.html | 152 - .../html/sign_api/utils/index-sort-f.html | 117 - .../html/sign_api/utils/index-sort-l.html | 100 - coverage/html/sign_api/utils/index.html | 100 - .../sign_api_validator_utils.dart.func-c.html | 75 - .../sign_api_validator_utils.dart.func.html | 75 - .../sign_api_validator_utils.dart.gcov.html | 396 -- coverage/html/snow.png | Bin 141 -> 0 bytes coverage/html/updown.png | Bin 117 -> 0 bytes coverage/html/utils/errors.dart.func-c.html | 75 - coverage/html/utils/errors.dart.func.html | 75 - coverage/html/utils/errors.dart.gcov.html | 349 -- .../html/utils/extensions.dart.func-c.html | 75 - coverage/html/utils/extensions.dart.func.html | 75 - coverage/html/utils/extensions.dart.gcov.html | 152 - coverage/html/utils/index-sort-f.html | 153 - coverage/html/utils/index-sort-l.html | 127 - coverage/html/utils/index.html | 127 - .../html/utils/log_level.dart.func-c.html | 75 - coverage/html/utils/log_level.dart.func.html | 75 - coverage/html/utils/log_level.dart.gcov.html | 102 - .../utils/namespace_utils.dart.func-c.html | 75 - .../html/utils/namespace_utils.dart.func.html | 75 - .../html/utils/namespace_utils.dart.gcov.html | 515 -- .../walletconnect_utils.dart.func-c.html | 75 - .../utils/walletconnect_utils.dart.func.html | 75 - .../utils/walletconnect_utils.dart.gcov.html | 302 -- coverage/html/web3app/index-sort-f.html | 105 - coverage/html/web3app/index-sort-l.html | 91 - coverage/html/web3app/index.html | 91 - .../html/web3app/web3app.dart.func-c.html | 75 - coverage/html/web3app/web3app.dart.func.html | 75 - coverage/html/web3app/web3app.dart.gcov.html | 526 -- coverage/html/web3wallet/index-sort-f.html | 105 - coverage/html/web3wallet/index-sort-l.html | 91 - coverage/html/web3wallet/index.html | 91 - .../web3wallet/web3wallet.dart.func-c.html | 75 - .../html/web3wallet/web3wallet.dart.func.html | 75 - .../html/web3wallet/web3wallet.dart.gcov.html | 612 --- coverage/lcov.info | 4705 ----------------- 298 files changed, 1 insertion(+), 44724 deletions(-) delete mode 100644 coverage/html/amber.png delete mode 100644 coverage/html/auth_api/auth_client.dart.func-c.html delete mode 100644 coverage/html/auth_api/auth_client.dart.func.html delete mode 100644 coverage/html/auth_api/auth_client.dart.gcov.html delete mode 100644 coverage/html/auth_api/auth_engine.dart.func-c.html delete mode 100644 coverage/html/auth_api/auth_engine.dart.func.html delete mode 100644 coverage/html/auth_api/auth_engine.dart.gcov.html delete mode 100644 coverage/html/auth_api/index-sort-f.html delete mode 100644 coverage/html/auth_api/index-sort-l.html delete mode 100644 coverage/html/auth_api/index.html delete mode 100644 coverage/html/cmd_line delete mode 100644 coverage/html/core/core.dart.func-c.html delete mode 100644 coverage/html/core/core.dart.func.html delete mode 100644 coverage/html/core/core.dart.gcov.html delete mode 100644 coverage/html/core/crypto/crypto.dart.func-c.html delete mode 100644 coverage/html/core/crypto/crypto.dart.func.html delete mode 100644 coverage/html/core/crypto/crypto.dart.gcov.html delete mode 100644 coverage/html/core/crypto/crypto_models.dart.func-c.html delete mode 100644 coverage/html/core/crypto/crypto_models.dart.func.html delete mode 100644 coverage/html/core/crypto/crypto_models.dart.gcov.html delete mode 100644 coverage/html/core/crypto/crypto_utils.dart.func-c.html delete mode 100644 coverage/html/core/crypto/crypto_utils.dart.func.html delete mode 100644 coverage/html/core/crypto/crypto_utils.dart.gcov.html delete mode 100644 coverage/html/core/crypto/index-sort-f.html delete mode 100644 coverage/html/core/crypto/index-sort-l.html delete mode 100644 coverage/html/core/crypto/index.html delete mode 100644 coverage/html/core/echo/echo.dart.func-c.html delete mode 100644 coverage/html/core/echo/echo.dart.func.html delete mode 100644 coverage/html/core/echo/echo.dart.gcov.html delete mode 100644 coverage/html/core/echo/echo_client.dart.func-c.html delete mode 100644 coverage/html/core/echo/echo_client.dart.func.html delete mode 100644 coverage/html/core/echo/echo_client.dart.gcov.html delete mode 100644 coverage/html/core/echo/index-sort-f.html delete mode 100644 coverage/html/core/echo/index-sort-l.html delete mode 100644 coverage/html/core/echo/index.html delete mode 100644 coverage/html/core/echo/models/echo_body.dart.func-c.html delete mode 100644 coverage/html/core/echo/models/echo_body.dart.func.html delete mode 100644 coverage/html/core/echo/models/echo_body.dart.gcov.html delete mode 100644 coverage/html/core/echo/models/echo_response.dart.func-c.html delete mode 100644 coverage/html/core/echo/models/echo_response.dart.func.html delete mode 100644 coverage/html/core/echo/models/echo_response.dart.gcov.html delete mode 100644 coverage/html/core/echo/models/index-sort-f.html delete mode 100644 coverage/html/core/echo/models/index-sort-l.html delete mode 100644 coverage/html/core/echo/models/index.html delete mode 100644 coverage/html/core/heartbit/heartbeat.dart.func-c.html delete mode 100644 coverage/html/core/heartbit/heartbeat.dart.func.html delete mode 100644 coverage/html/core/heartbit/heartbeat.dart.gcov.html delete mode 100644 coverage/html/core/heartbit/index-sort-f.html delete mode 100644 coverage/html/core/heartbit/index-sort-l.html delete mode 100644 coverage/html/core/heartbit/index.html delete mode 100644 coverage/html/core/index-sort-f.html delete mode 100644 coverage/html/core/index-sort-l.html delete mode 100644 coverage/html/core/index.html delete mode 100644 coverage/html/core/pairing/expirer.dart.func-c.html delete mode 100644 coverage/html/core/pairing/expirer.dart.func.html delete mode 100644 coverage/html/core/pairing/expirer.dart.gcov.html delete mode 100644 coverage/html/core/pairing/index-sort-f.html delete mode 100644 coverage/html/core/pairing/index-sort-l.html delete mode 100644 coverage/html/core/pairing/index.html delete mode 100644 coverage/html/core/pairing/json_rpc_history.dart.func-c.html delete mode 100644 coverage/html/core/pairing/json_rpc_history.dart.func.html delete mode 100644 coverage/html/core/pairing/json_rpc_history.dart.gcov.html delete mode 100644 coverage/html/core/pairing/pairing.dart.func-c.html delete mode 100644 coverage/html/core/pairing/pairing.dart.func.html delete mode 100644 coverage/html/core/pairing/pairing.dart.gcov.html delete mode 100644 coverage/html/core/pairing/pairing_store.dart.func-c.html delete mode 100644 coverage/html/core/pairing/pairing_store.dart.func.html delete mode 100644 coverage/html/core/pairing/pairing_store.dart.gcov.html delete mode 100644 coverage/html/core/pairing/utils/index-sort-f.html delete mode 100644 coverage/html/core/pairing/utils/index-sort-l.html delete mode 100644 coverage/html/core/pairing/utils/index.html delete mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html delete mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html delete mode 100644 coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html delete mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.func-c.html delete mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.func.html delete mode 100644 coverage/html/core/pairing/utils/pairing_models.dart.gcov.html delete mode 100644 coverage/html/core/relay_auth/index-sort-f.html delete mode 100644 coverage/html/core/relay_auth/index-sort-l.html delete mode 100644 coverage/html/core/relay_auth/index.html delete mode 100644 coverage/html/core/relay_auth/relay_auth.dart.func-c.html delete mode 100644 coverage/html/core/relay_auth/relay_auth.dart.func.html delete mode 100644 coverage/html/core/relay_auth/relay_auth.dart.gcov.html delete mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html delete mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.func.html delete mode 100644 coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/i_relay_client.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/i_relay_client.dart.func.html delete mode 100644 coverage/html/core/relay_client/i_relay_client.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/index-sort-f.html delete mode 100644 coverage/html/core/relay_client/index-sort-l.html delete mode 100644 coverage/html/core/relay_client/index.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/index-sort-f.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/index-sort-l.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/index.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/index.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html delete mode 100644 coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/message_tracker.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/message_tracker.dart.func.html delete mode 100644 coverage/html/core/relay_client/message_tracker.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/relay_client.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/relay_client.dart.func.html delete mode 100644 coverage/html/core/relay_client/relay_client.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/relay_client_models.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/relay_client_models.dart.func.html delete mode 100644 coverage/html/core/relay_client/relay_client_models.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.func.html delete mode 100644 coverage/html/core/relay_client/websocket/http_client.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.func.html delete mode 100644 coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html delete mode 100644 coverage/html/core/relay_client/websocket/index-sort-f.html delete mode 100644 coverage/html/core/relay_client/websocket/index-sort-l.html delete mode 100644 coverage/html/core/relay_client/websocket/index.html delete mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html delete mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html delete mode 100644 coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html delete mode 100644 coverage/html/core/store/generic_store.dart.func-c.html delete mode 100644 coverage/html/core/store/generic_store.dart.func.html delete mode 100644 coverage/html/core/store/generic_store.dart.gcov.html delete mode 100644 coverage/html/core/store/index-sort-f.html delete mode 100644 coverage/html/core/store/index-sort-l.html delete mode 100644 coverage/html/core/store/index.html delete mode 100644 coverage/html/core/store/shared_prefs_store.dart.func-c.html delete mode 100644 coverage/html/core/store/shared_prefs_store.dart.func.html delete mode 100644 coverage/html/core/store/shared_prefs_store.dart.gcov.html delete mode 100644 coverage/html/core/store/store_models.dart.func-c.html delete mode 100644 coverage/html/core/store/store_models.dart.func.html delete mode 100644 coverage/html/core/store/store_models.dart.gcov.html delete mode 100644 coverage/html/core/verify/index-sort-f.html delete mode 100644 coverage/html/core/verify/index-sort-l.html delete mode 100644 coverage/html/core/verify/index.html delete mode 100644 coverage/html/core/verify/models/index-sort-f.html delete mode 100644 coverage/html/core/verify/models/index-sort-l.html delete mode 100644 coverage/html/core/verify/models/index.html delete mode 100644 coverage/html/core/verify/models/verify_context.dart.func-c.html delete mode 100644 coverage/html/core/verify/models/verify_context.dart.func.html delete mode 100644 coverage/html/core/verify/models/verify_context.dart.gcov.html delete mode 100644 coverage/html/core/verify/verify.dart.func-c.html delete mode 100644 coverage/html/core/verify/verify.dart.func.html delete mode 100644 coverage/html/core/verify/verify.dart.gcov.html delete mode 100644 coverage/html/emerald.png delete mode 100644 coverage/html/gcov.css delete mode 100644 coverage/html/glass.png delete mode 100644 coverage/html/index-sort-f.html delete mode 100644 coverage/html/index-sort-l.html delete mode 100644 coverage/html/index.html delete mode 100644 coverage/html/models/basic_models.dart.func-c.html delete mode 100644 coverage/html/models/basic_models.dart.func.html delete mode 100644 coverage/html/models/basic_models.dart.gcov.html delete mode 100644 coverage/html/models/index-sort-f.html delete mode 100644 coverage/html/models/index-sort-l.html delete mode 100644 coverage/html/models/index.html delete mode 100644 coverage/html/models/json_rpc_error.dart.func-c.html delete mode 100644 coverage/html/models/json_rpc_error.dart.func.html delete mode 100644 coverage/html/models/json_rpc_error.dart.gcov.html delete mode 100644 coverage/html/models/json_rpc_request.dart.func-c.html delete mode 100644 coverage/html/models/json_rpc_request.dart.func.html delete mode 100644 coverage/html/models/json_rpc_request.dart.gcov.html delete mode 100644 coverage/html/models/json_rpc_response.dart.func-c.html delete mode 100644 coverage/html/models/json_rpc_response.dart.func.html delete mode 100644 coverage/html/models/json_rpc_response.dart.gcov.html delete mode 100644 coverage/html/models/uri_parse_result.dart.func-c.html delete mode 100644 coverage/html/models/uri_parse_result.dart.func.html delete mode 100644 coverage/html/models/uri_parse_result.dart.gcov.html delete mode 100644 coverage/html/ruby.png delete mode 100644 coverage/html/sign_api/index-sort-f.html delete mode 100644 coverage/html/sign_api/index-sort-l.html delete mode 100644 coverage/html/sign_api/index.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.func.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/auth/index-sort-f.html delete mode 100644 coverage/html/sign_api/models/auth/index-sort-l.html delete mode 100644 coverage/html/sign_api/models/auth/index.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.func.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/index-sort-f.html delete mode 100644 coverage/html/sign_api/models/index-sort-l.html delete mode 100644 coverage/html/sign_api/models/index.html delete mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/json_rpc_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/proposal_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/proposal_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/proposal_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/session_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/session_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/session_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/sign_client_events.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/sign_client_events.dart.func.html delete mode 100644 coverage/html/sign_api/models/sign_client_events.dart.gcov.html delete mode 100644 coverage/html/sign_api/models/sign_client_models.dart.func-c.html delete mode 100644 coverage/html/sign_api/models/sign_client_models.dart.func.html delete mode 100644 coverage/html/sign_api/models/sign_client_models.dart.gcov.html delete mode 100644 coverage/html/sign_api/sessions.dart.func-c.html delete mode 100644 coverage/html/sign_api/sessions.dart.func.html delete mode 100644 coverage/html/sign_api/sessions.dart.gcov.html delete mode 100644 coverage/html/sign_api/sign_client.dart.func-c.html delete mode 100644 coverage/html/sign_api/sign_client.dart.func.html delete mode 100644 coverage/html/sign_api/sign_client.dart.gcov.html delete mode 100644 coverage/html/sign_api/sign_engine.dart.func-c.html delete mode 100644 coverage/html/sign_api/sign_engine.dart.func.html delete mode 100644 coverage/html/sign_api/sign_engine.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.func.html delete mode 100644 coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.func.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.func.html delete mode 100644 coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/auth/index-sort-f.html delete mode 100644 coverage/html/sign_api/utils/auth/index-sort-l.html delete mode 100644 coverage/html/sign_api/utils/auth/index.html delete mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html delete mode 100644 coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.func.html delete mode 100644 coverage/html/sign_api/utils/custom_credentials.dart.gcov.html delete mode 100644 coverage/html/sign_api/utils/index-sort-f.html delete mode 100644 coverage/html/sign_api/utils/index-sort-l.html delete mode 100644 coverage/html/sign_api/utils/index.html delete mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html delete mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html delete mode 100644 coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html delete mode 100644 coverage/html/snow.png delete mode 100644 coverage/html/updown.png delete mode 100644 coverage/html/utils/errors.dart.func-c.html delete mode 100644 coverage/html/utils/errors.dart.func.html delete mode 100644 coverage/html/utils/errors.dart.gcov.html delete mode 100644 coverage/html/utils/extensions.dart.func-c.html delete mode 100644 coverage/html/utils/extensions.dart.func.html delete mode 100644 coverage/html/utils/extensions.dart.gcov.html delete mode 100644 coverage/html/utils/index-sort-f.html delete mode 100644 coverage/html/utils/index-sort-l.html delete mode 100644 coverage/html/utils/index.html delete mode 100644 coverage/html/utils/log_level.dart.func-c.html delete mode 100644 coverage/html/utils/log_level.dart.func.html delete mode 100644 coverage/html/utils/log_level.dart.gcov.html delete mode 100644 coverage/html/utils/namespace_utils.dart.func-c.html delete mode 100644 coverage/html/utils/namespace_utils.dart.func.html delete mode 100644 coverage/html/utils/namespace_utils.dart.gcov.html delete mode 100644 coverage/html/utils/walletconnect_utils.dart.func-c.html delete mode 100644 coverage/html/utils/walletconnect_utils.dart.func.html delete mode 100644 coverage/html/utils/walletconnect_utils.dart.gcov.html delete mode 100644 coverage/html/web3app/index-sort-f.html delete mode 100644 coverage/html/web3app/index-sort-l.html delete mode 100644 coverage/html/web3app/index.html delete mode 100644 coverage/html/web3app/web3app.dart.func-c.html delete mode 100644 coverage/html/web3app/web3app.dart.func.html delete mode 100644 coverage/html/web3app/web3app.dart.gcov.html delete mode 100644 coverage/html/web3wallet/index-sort-f.html delete mode 100644 coverage/html/web3wallet/index-sort-l.html delete mode 100644 coverage/html/web3wallet/index.html delete mode 100644 coverage/html/web3wallet/web3wallet.dart.func-c.html delete mode 100644 coverage/html/web3wallet/web3wallet.dart.func.html delete mode 100644 coverage/html/web3wallet/web3wallet.dart.gcov.html delete mode 100644 coverage/lcov.info diff --git a/.gitignore b/.gitignore index c68c1976..de3a30be 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ .pub/ pubspec.lock /build/ +coverage/ # Web related lib/generated_plugin_registrant.dart diff --git a/coverage/html/amber.png b/coverage/html/amber.png deleted file mode 100644 index 2cab170d8359081983a4e343848dfe06bc490f12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG - - - - - - LCOV - lcov.info - auth_api/auth_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/auth_client.dart.func.html b/coverage/html/auth_api/auth_client.dart.func.html deleted file mode 100644 index 5e7a70a6..00000000 --- a/coverage/html/auth_api/auth_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api/auth_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/auth_client.dart.gcov.html b/coverage/html/auth_api/auth_client.dart.gcov.html deleted file mode 100644 index 6bb4fd81..00000000 --- a/coverage/html/auth_api/auth_client.dart.gcov.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api/auth_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_client.dartCoverageTotalHit
Test:lcov.infoLines:46.3 %5425
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_client.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/core.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-      16              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      17              : import 'package:walletconnect_flutter_v2/apis/utils/log_level.dart';
-      18              : 
-      19              : class AuthClient implements IAuthClient {
-      20              :   bool _initialized = false;
-      21              : 
-      22            0 :   @override
-      23              :   String get protocol => 'wc';
-      24              : 
-      25            0 :   @override
-      26              :   int get version => 2;
-      27              : 
-      28            0 :   @override
-      29            0 :   Event<AuthRequest> get onAuthRequest => engine.onAuthRequest;
-      30            1 :   @override
-      31            2 :   Event<AuthResponse> get onAuthResponse => engine.onAuthResponse;
-      32              : 
-      33            1 :   @override
-      34            2 :   ICore get core => engine.core;
-      35            0 :   @override
-      36            0 :   PairingMetadata get metadata => engine.metadata;
-      37            0 :   @override
-      38            0 :   IGenericStore<AuthPublicKey> get authKeys => engine.authKeys;
-      39            0 :   @override
-      40            0 :   IGenericStore<String> get pairingTopics => engine.pairingTopics;
-      41            0 :   @override
-      42            0 :   IGenericStore<PendingAuthRequest> get authRequests => engine.authRequests;
-      43            0 :   @override
-      44            0 :   IGenericStore<StoredCacao> get completeRequests => engine.completeRequests;
-      45              : 
-      46              :   @override
-      47              :   late IAuthEngine engine;
-      48              : 
-      49            0 :   static Future<AuthClient> createInstance({
-      50              :     required String projectId,
-      51              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
-      52              :     required PairingMetadata metadata,
-      53              :     bool memoryStore = false,
-      54              :     IHttpClient httpClient = const HttpWrapper(),
-      55              :     LogLevel logLevel = LogLevel.nothing,
-      56              :   }) async {
-      57            0 :     final client = AuthClient(
-      58            0 :       core: Core(
-      59              :         projectId: projectId,
-      60              :         relayUrl: relayUrl,
-      61              :         memoryStore: memoryStore,
-      62              :         httpClient: httpClient,
-      63              :         logLevel: logLevel,
-      64              :       ),
-      65              :       metadata: metadata,
-      66              :     );
-      67            0 :     await client.init();
-      68              : 
-      69              :     return client;
-      70              :   }
-      71              : 
-      72            1 :   AuthClient({
-      73              :     required ICore core,
-      74              :     required PairingMetadata metadata,
-      75              :   }) {
-      76            2 :     engine = AuthEngine(
-      77              :       core: core,
-      78              :       metadata: metadata,
-      79            1 :       authKeys: GenericStore(
-      80            1 :         storage: core.storage,
-      81              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
-      82              :         version: StoreVersions.VERSION_AUTH_KEYS,
-      83            0 :         fromJson: (dynamic value) {
-      84            0 :           return AuthPublicKey.fromJson(value);
-      85              :         },
-      86              :       ),
-      87            1 :       pairingTopics: GenericStore(
-      88            1 :         storage: core.storage,
-      89              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
-      90              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
-      91            0 :         fromJson: (dynamic value) {
-      92              :           return value as String;
-      93              :         },
-      94              :       ),
-      95            1 :       authRequests: GenericStore(
-      96            1 :         storage: core.storage,
-      97              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-      98              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-      99            0 :         fromJson: (dynamic value) {
-     100            0 :           return PendingAuthRequest.fromJson(value);
-     101              :         },
-     102              :       ),
-     103            1 :       completeRequests: GenericStore(
-     104            1 :         storage: core.storage,
-     105              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
-     106              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
-     107            0 :         fromJson: (dynamic value) {
-     108            0 :           return StoredCacao.fromJson(value);
-     109              :         },
-     110              :       ),
-     111              :     );
-     112              :   }
-     113              : 
-     114            1 :   @override
-     115              :   Future<void> init() async {
-     116            1 :     if (_initialized) {
-     117              :       return;
-     118              :     }
-     119              : 
-     120            2 :     await core.start();
-     121            2 :     await engine.init();
-     122              : 
-     123            1 :     _initialized = true;
-     124              :   }
-     125              : 
-     126            1 :   @override
-     127              :   Future<AuthRequestResponse> request({
-     128              :     required AuthRequestParams params,
-     129              :     String? pairingTopic,
-     130              :     List<List<String>>? methods = AuthEngine.DEFAULT_METHODS,
-     131              :   }) async {
-     132              :     try {
-     133            2 :       return engine.requestAuth(
-     134              :         params: params,
-     135              :         pairingTopic: pairingTopic,
-     136              :         methods: methods,
-     137              :       );
-     138              :     } catch (e) {
-     139              :       rethrow;
-     140              :     }
-     141              :   }
-     142              : 
-     143            0 :   @override
-     144              :   Future<void> respond({
-     145              :     required int id,
-     146              :     required String iss,
-     147              :     CacaoSignature? signature,
-     148              :     WalletConnectError? error,
-     149              :   }) async {
-     150              :     try {
-     151            0 :       return engine.respondAuthRequest(
-     152              :         id: id,
-     153              :         iss: iss,
-     154              :         signature: signature,
-     155              :         error: error,
-     156              :       );
-     157              :     } catch (e) {
-     158              :       rethrow;
-     159              :     }
-     160              :   }
-     161              : 
-     162            0 :   @override
-     163              :   Map<int, PendingAuthRequest> getPendingRequests() {
-     164              :     try {
-     165            0 :       return engine.getPendingAuthRequests();
-     166              :     } catch (e) {
-     167              :       rethrow;
-     168              :     }
-     169              :   }
-     170              : 
-     171            1 :   @override
-     172              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-     173              :     required String pairingTopic,
-     174              :   }) {
-     175              :     try {
-     176            2 :       return engine.getCompletedRequestsForPairing(
-     177              :         pairingTopic: pairingTopic,
-     178              :       );
-     179              :     } catch (e) {
-     180              :       rethrow;
-     181              :     }
-     182              :   }
-     183              : 
-     184            1 :   @override
-     185              :   String formatMessage({
-     186              :     required String iss,
-     187              :     required CacaoRequestPayload cacaoPayload,
-     188              :   }) {
-     189              :     try {
-     190            2 :       return engine.formatAuthMessage(
-     191              :         iss: iss,
-     192              :         cacaoPayload: cacaoPayload,
-     193              :       );
-     194              :     } catch (e) {
-     195              :       rethrow;
-     196              :     }
-     197              :   }
-     198              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/auth_engine.dart.func-c.html b/coverage/html/auth_api/auth_engine.dart.func-c.html deleted file mode 100644 index 05177775..00000000 --- a/coverage/html/auth_api/auth_engine.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api/auth_engine.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/auth_engine.dart.func.html b/coverage/html/auth_api/auth_engine.dart.func.html deleted file mode 100644 index 6fb8d3f6..00000000 --- a/coverage/html/auth_api/auth_engine.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api/auth_engine.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/auth_engine.dart.gcov.html b/coverage/html/auth_api/auth_engine.dart.gcov.html deleted file mode 100644 index 84453b82..00000000 --- a/coverage/html/auth_api/auth_engine.dart.gcov.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api/auth_engine.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_api - auth_engine.dartCoverageTotalHit
Test:lcov.infoLines:87.0 %138120
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/json_rpc_models.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/address_utils.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_api_validators.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_signature.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-      16              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-      17              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
-      18              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-      19              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-      20              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
-      21              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      22              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-      23              : import 'package:walletconnect_flutter_v2/apis/utils/method_constants.dart';
-      24              : 
-      25              : class AuthEngine implements IAuthEngine {
-      26              :   static const List<List<String>> DEFAULT_METHODS = [
-      27              :     [
-      28              :       MethodConstants.WC_AUTH_REQUEST,
-      29              :     ]
-      30              :   ];
-      31              : 
-      32              :   bool _initialized = false;
-      33              : 
-      34              :   @override
-      35              :   final Event<AuthRequest> onAuthRequest = Event();
-      36              :   @override
-      37              :   final Event<AuthResponse> onAuthResponse = Event();
-      38              : 
-      39              :   @override
-      40              :   final ICore core;
-      41              :   @override
-      42              :   final PairingMetadata metadata;
-      43              :   @override
-      44              :   late IGenericStore<AuthPublicKey> authKeys;
-      45              :   @override
-      46              :   late IGenericStore<String> pairingTopics;
-      47              :   @override
-      48              :   late IGenericStore<PendingAuthRequest> authRequests;
-      49              :   @override
-      50              :   late IGenericStore<StoredCacao> completeRequests;
-      51              : 
-      52              :   List<AuthRequestCompleter> pendingAuthRequests = [];
-      53              : 
-      54            3 :   AuthEngine({
-      55              :     required this.core,
-      56              :     required this.metadata,
-      57              :     required this.authKeys,
-      58              :     required this.pairingTopics,
-      59              :     required this.authRequests,
-      60              :     required this.completeRequests,
-      61              :   });
-      62              : 
-      63            3 :   @override
-      64              :   Future<void> init() async {
-      65            3 :     if (_initialized) {
-      66              :       return;
-      67              :     }
-      68              : 
-      69            9 :     await core.pairing.init();
-      70            6 :     await authKeys.init();
-      71            6 :     await pairingTopics.init();
-      72            6 :     await authRequests.init();
-      73            6 :     await completeRequests.init();
-      74              : 
-      75            3 :     _registerRelayClientFunctions();
-      76              : 
-      77            3 :     _initialized = true;
-      78              :   }
-      79              : 
-      80            2 :   @override
-      81              :   Future<AuthRequestResponse> requestAuth({
-      82              :     required AuthRequestParams params,
-      83              :     String? pairingTopic,
-      84              :     List<List<String>>? methods = DEFAULT_METHODS,
-      85              :   }) async {
-      86            2 :     _checkInitialized();
-      87              : 
-      88            2 :     AuthApiValidators.isValidRequest(params);
-      89              :     String? pTopic = pairingTopic;
-      90              :     Uri? uri;
-      91              : 
-      92              :     if (pTopic == null) {
-      93            3 :       final CreateResponse newTopicAndUri = await core.pairing.create(
-      94              :         methods: methods,
-      95              :       );
-      96            1 :       pTopic = newTopicAndUri.topic;
-      97            1 :       uri = newTopicAndUri.uri;
-      98              :     } else {
-      99            6 :       core.pairing.isValidPairingTopic(topic: pTopic);
-     100              :     }
-     101              : 
-     102            6 :     final publicKey = await core.crypto.generateKeyPair();
-     103              :     // print('requestAuth, publicKey: $publicKey');
-     104            8 :     final String responseTopic = core.crypto.getUtils().hashKey(publicKey);
-     105            2 :     final int id = JsonRpcUtils.payloadId();
-     106              : 
-     107            2 :     WcAuthRequestRequest request = WcAuthRequestRequest(
-     108            2 :       payloadParams: AuthPayloadParams.fromRequestParams(
-     109              :         params,
-     110              :       ),
-     111            2 :       requester: ConnectionMetadata(
-     112              :         publicKey: publicKey,
-     113            2 :         metadata: metadata,
-     114              :       ),
-     115              :     );
-     116              : 
-     117            2 :     final int expiry = params.expiry ?? WalletConnectConstants.FIVE_MINUTES;
-     118              : 
-     119            4 :     await authKeys.set(
-     120              :       AuthConstants.AUTH_CLIENT_PUBLIC_KEY_NAME,
-     121            2 :       AuthPublicKey(publicKey: publicKey),
-     122              :     );
-     123              : 
-     124            4 :     await pairingTopics.set(
-     125              :       responseTopic,
-     126              :       pTopic,
-     127              :     );
-     128              : 
-     129              :     // Set the one time use receiver public key for decoding the Type 1 envelope
-     130            6 :     await core.pairing.setReceiverPublicKey(
-     131              :       topic: responseTopic,
-     132              :       publicKey: publicKey,
-     133              :       expiry: expiry,
-     134              :     );
-     135              : 
-     136            2 :     Completer<AuthResponse> completer = Completer();
-     137              : 
-     138            2 :     _requestAuthResponseHandler(
-     139              :       pairingTopic: pTopic,
-     140              :       responseTopic: responseTopic,
-     141              :       request: request,
-     142              :       id: id,
-     143              :       expiry: expiry,
-     144              :       completer: completer,
-     145              :     );
-     146              : 
-     147            2 :     return AuthRequestResponse(
-     148              :       id: id,
-     149              :       pairingTopic: pTopic,
-     150              :       completer: completer,
-     151              :       uri: uri,
-     152              :     );
-     153              :   }
-     154              : 
-     155            2 :   Future<void> _requestAuthResponseHandler({
-     156              :     required String pairingTopic,
-     157              :     required String responseTopic,
-     158              :     required WcAuthRequestRequest request,
-     159              :     required int id,
-     160              :     required int expiry,
-     161              :     required Completer<AuthResponse> completer,
-     162              :   }) async {
-     163              :     Map<String, dynamic>? resp;
-     164              : 
-     165              :     // Subscribe to the responseTopic because we expect the response to use this topic
-     166              :     // print('got here');
-     167            6 :     await core.relayClient.subscribe(topic: responseTopic);
-     168              : 
-     169              :     try {
-     170            6 :       resp = await core.pairing.sendRequest(
-     171              :         pairingTopic,
-     172              :         MethodConstants.WC_AUTH_REQUEST,
-     173            2 :         request.toJson(),
-     174              :         id: id,
-     175              :         ttl: expiry,
-     176              :       );
-     177            0 :     } on JsonRpcError catch (e) {
-     178            0 :       final resp = AuthResponse(
-     179              :         id: id,
-     180              :         topic: responseTopic,
-     181              :         jsonRpcError: e,
-     182              :       );
-     183            0 :       onAuthResponse.broadcast(resp);
-     184            0 :       completer.complete(resp);
-     185              :       return;
-     186              :     }
-     187              : 
-     188            6 :     await core.pairing.activate(topic: pairingTopic);
-     189              : 
-     190            2 :     final Cacao cacao = Cacao.fromJson(resp!);
-     191            2 :     final CacaoSignature sig = cacao.s;
-     192            2 :     final CacaoPayload payload = cacao.p;
-     193            4 :     await completeRequests.set(
-     194            2 :       id.toString(),
-     195            2 :       StoredCacao.fromCacao(
-     196              :         id: id,
-     197              :         pairingTopic: pairingTopic,
-     198              :         cacao: cacao,
-     199              :       ),
-     200              :     );
-     201              : 
-     202            2 :     final String reconstructed = formatAuthMessage(
-     203            2 :       iss: payload.iss,
-     204            2 :       cacaoPayload: CacaoRequestPayload.fromCacaoPayload(payload),
-     205              :     );
-     206              : 
-     207            4 :     final String walletAddress = AddressUtils.getDidAddress(payload.iss);
-     208            4 :     final String chainId = AddressUtils.getDidChainId(payload.iss);
-     209              : 
-     210            2 :     if (walletAddress.isEmpty) {
-     211            0 :       throw Errors.getSdkError(
-     212              :         Errors.MISSING_OR_INVALID,
-     213              :         context: 'authResponse walletAddress is empty',
-     214              :       );
-     215              :     }
-     216            2 :     if (chainId.isEmpty) {
-     217            0 :       throw Errors.getSdkError(
-     218              :         Errors.MISSING_OR_INVALID,
-     219              :         context: 'authResponse chainId is empty',
-     220              :       );
-     221              :     }
-     222              : 
-     223            2 :     final bool isValid = await AuthSignature.verifySignature(
-     224              :       walletAddress,
-     225              :       reconstructed,
-     226              :       sig,
-     227              :       chainId,
-     228            4 :       core.projectId,
-     229              :     );
-     230              : 
-     231              :     if (!isValid) {
-     232            0 :       final resp = AuthResponse(
-     233              :         id: id,
-     234              :         topic: responseTopic,
-     235              :         error: const WalletConnectError(
-     236              :           code: -1,
-     237              :           message: 'Invalid signature',
-     238              :         ),
-     239              :       );
-     240            0 :       onAuthResponse.broadcast(resp);
-     241            0 :       completer.complete(resp);
-     242              :     } else {
-     243            2 :       final resp = AuthResponse(
-     244              :         id: id,
-     245              :         topic: responseTopic,
-     246              :         result: cacao,
-     247              :       );
-     248            4 :       onAuthResponse.broadcast(resp);
-     249            2 :       completer.complete(resp);
-     250              :     }
-     251              :   }
-     252              : 
-     253            2 :   @override
-     254              :   Future<void> respondAuthRequest({
-     255              :     required int id,
-     256              :     required String iss,
-     257              :     CacaoSignature? signature,
-     258              :     WalletConnectError? error,
-     259              :   }) async {
-     260            2 :     _checkInitialized();
-     261              : 
-     262            2 :     Map<int, PendingAuthRequest> pendingRequests = getPendingAuthRequests();
-     263            2 :     AuthApiValidators.isValidRespond(
-     264              :       id: id,
-     265              :       pendingRequests: pendingRequests,
-     266              :       signature: signature,
-     267              :       error: error,
-     268              :     );
-     269              : 
-     270            2 :     final PendingAuthRequest pendingRequest = pendingRequests[id]!;
-     271            4 :     final String receiverPublicKey = pendingRequest.metadata.publicKey;
-     272            6 :     final String senderPublicKey = await core.crypto.generateKeyPair();
-     273            8 :     final String responseTopic = core.crypto.getUtils().hashKey(
-     274              :           receiverPublicKey,
-     275              :         );
-     276            2 :     final EncodeOptions encodeOpts = EncodeOptions(
-     277              :       type: EncodeOptions.TYPE_1,
-     278              :       receiverPublicKey: receiverPublicKey,
-     279              :       senderPublicKey: senderPublicKey,
-     280              :     );
-     281              : 
-     282              :     if (error != null) {
-     283            0 :       await core.pairing.sendError(
-     284              :         id,
-     285              :         responseTopic,
-     286              :         MethodConstants.WC_AUTH_REQUEST,
-     287            0 :         JsonRpcError.serverError(error.message),
-     288              :         encodeOptions: encodeOpts,
-     289              :       );
-     290              :     } else {
-     291            2 :       final Cacao cacao = Cacao(
-     292              :         h: const CacaoHeader(),
-     293            2 :         p: CacaoPayload.fromRequestPayload(
-     294              :           issuer: iss,
-     295            2 :           payload: pendingRequest.cacaoPayload,
-     296              :         ),
-     297              :         s: signature!,
-     298              :       );
-     299              : 
-     300              :       // print('auth res id: $id');
-     301            6 :       await core.pairing.sendResult(
-     302              :         id,
-     303              :         responseTopic,
-     304              :         MethodConstants.WC_AUTH_REQUEST,
-     305            2 :         cacao.toJson(),
-     306              :         encodeOptions: encodeOpts,
-     307              :       );
-     308              : 
-     309            6 :       await authRequests.delete(id.toString());
-     310              : 
-     311            4 :       await completeRequests.set(
-     312            2 :         id.toString(),
-     313            2 :         StoredCacao.fromCacao(
-     314              :           id: id,
-     315            2 :           pairingTopic: pendingRequest.pairingTopic,
-     316              :           cacao: cacao,
-     317              :         ),
-     318              :       );
-     319              :     }
-     320              :   }
-     321              : 
-     322            2 :   @override
-     323              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
-     324            2 :     Map<int, PendingAuthRequest> pendingRequests = {};
-     325            8 :     authRequests.getAll().forEach((key) {
-     326            4 :       pendingRequests[key.id] = key;
-     327              :     });
-     328              :     return pendingRequests;
-     329              :   }
-     330              : 
-     331            1 :   @override
-     332              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-     333              :     required String pairingTopic,
-     334              :   }) {
-     335            1 :     Map<int, StoredCacao> completedRequests = {};
-     336            1 :     completeRequests
-     337            1 :         .getAll()
-     338            1 :         .where(
-     339            3 :           (e) => e.pairingTopic == pairingTopic,
-     340              :         )
-     341            2 :         .forEach((key) {
-     342            2 :       completedRequests[key.id] = key;
-     343              :     });
-     344              :     return completedRequests;
-     345              :   }
-     346              : 
-     347            2 :   @override
-     348              :   String formatAuthMessage({
-     349              :     required String iss,
-     350              :     required CacaoRequestPayload cacaoPayload,
-     351              :   }) {
-     352              :     final header =
-     353            4 :         '${cacaoPayload.domain} wants you to sign in with your Ethereum account:';
-     354            2 :     final walletAddress = AddressUtils.getDidAddress(iss);
-     355            4 :     final uri = 'URI: ${cacaoPayload.aud}';
-     356            4 :     final version = 'Version: ${cacaoPayload.version}';
-     357            4 :     final chainId = 'Chain ID: ${AddressUtils.getDidChainId(iss)}';
-     358            4 :     final nonce = 'Nonce: ${cacaoPayload.nonce}';
-     359            4 :     final issuedAt = 'Issued At: ${cacaoPayload.iat}';
-     360            2 :     final resources = cacaoPayload.resources != null &&
-     361            2 :             cacaoPayload.resources!.isNotEmpty
-     362            5 :         ? 'Resources:\n${cacaoPayload.resources!.map((resource) => '- $resource').join('\n')}'
-     363            1 :         : null;
-     364              : 
-     365            2 :     final message = [
-     366              :       header,
-     367              :       walletAddress,
-     368              :       '',
-     369            2 :       cacaoPayload.statement,
-     370              :       '',
-     371              :       uri,
-     372              :       version,
-     373              :       chainId,
-     374              :       nonce,
-     375              :       issuedAt,
-     376              :       resources,
-     377            6 :     ].where((element) => element != null).join('\n');
-     378              : 
-     379              :     return message;
-     380              :   }
-     381              : 
-     382              :   /// ---- PRIVATE HELPERS ---- ///
-     383              : 
-     384            2 :   void _checkInitialized() {
-     385            2 :     if (!_initialized) {
-     386            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     387              :     }
-     388              :   }
-     389              : 
-     390              :   /// ---- Relay Events ---- ///
-     391              : 
-     392            3 :   void _registerRelayClientFunctions() {
-     393            9 :     core.pairing.register(
-     394              :       method: MethodConstants.WC_AUTH_REQUEST,
-     395            3 :       function: _onAuthRequest,
-     396              :       type: ProtocolType.auth,
-     397              :     );
-     398              :   }
-     399              : 
-     400            2 :   void _onAuthRequest(
-     401              :     String topic,
-     402              :     JsonRpcRequest payload,
-     403              :   ) async {
-     404              :     try {
-     405            4 :       final request = WcAuthRequestRequest.fromJson(payload.params);
-     406              : 
-     407              :       final CacaoRequestPayload cacaoPayload =
-     408            2 :           CacaoRequestPayload.fromPayloadParams(
-     409            2 :         request.payloadParams,
-     410              :       );
-     411              : 
-     412            4 :       authRequests.set(
-     413            4 :         payload.id.toString(),
-     414            2 :         PendingAuthRequest(
-     415            2 :           id: payload.id,
-     416              :           pairingTopic: topic,
-     417            2 :           metadata: request.requester,
-     418              :           cacaoPayload: cacaoPayload,
-     419              :         ),
-     420              :       );
-     421              : 
-     422            4 :       onAuthRequest.broadcast(
-     423            2 :         AuthRequest(
-     424            2 :           id: payload.id,
-     425              :           topic: topic,
-     426            2 :           requester: request.requester,
-     427            2 :           payloadParams: request.payloadParams,
-     428              :         ),
-     429              :       );
-     430            0 :     } on WalletConnectError catch (err) {
-     431            0 :       await core.pairing.sendError(
-     432            0 :         payload.id,
-     433              :         topic,
-     434            0 :         payload.method,
-     435            0 :         JsonRpcError.invalidParams(
-     436            0 :           err.message,
-     437              :         ),
-     438              :       );
-     439              :     }
-     440              :   }
-     441              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/index-sort-f.html b/coverage/html/auth_api/index-sort-f.html deleted file mode 100644 index 283b5b22..00000000 --- a/coverage/html/auth_api/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_client.dart -
46.3%46.3%
-
46.3 %5425-
auth_engine.dart -
87.0%87.0%
-
87.0 %138120-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/index-sort-l.html b/coverage/html/auth_api/index-sort-l.html deleted file mode 100644 index 49efc2e8..00000000 --- a/coverage/html/auth_api/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client.dart -
46.3%46.3%
-
46.3 %5425
auth_engine.dart -
87.0%87.0%
-
87.0 %138120
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/auth_api/index.html b/coverage/html/auth_api/index.html deleted file mode 100644 index 279fd510..00000000 --- a/coverage/html/auth_api/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - auth_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - auth_apiCoverageTotalHit
Test:lcov.infoLines:75.5 %192145
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client.dart -
46.3%46.3%
-
46.3 %5425
auth_engine.dart -
87.0%87.0%
-
87.0 %138120
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/cmd_line b/coverage/html/cmd_line deleted file mode 100644 index fff562af..00000000 --- a/coverage/html/cmd_line +++ /dev/null @@ -1 +0,0 @@ -genhtml --rc genhtml_hi_limit=75 --rc genhtml_med_limit=50 -o coverage/html coverage/lcov.info --no-function-coverage diff --git a/coverage/html/core/core.dart.func-c.html b/coverage/html/core/core.dart.func-c.html deleted file mode 100644 index cb2e0536..00000000 --- a/coverage/html/core/core.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/core.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core - core.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/core.dart.func.html b/coverage/html/core/core.dart.func.html deleted file mode 100644 index 77fdda59..00000000 --- a/coverage/html/core/core.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/core.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core - core.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/core.dart.gcov.html b/coverage/html/core/core.dart.gcov.html deleted file mode 100644 index ecd9d828..00000000 --- a/coverage/html/core/core.dart.gcov.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - LCOV - lcov.info - core/core.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core - core.dartCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:logger/logger.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/echo/echo.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/echo/echo_client.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/heartbeat.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/i_heartbeat.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/core/pairing/expirer.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_expirer.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/core/pairing/json_rpc_history.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/core/pairing/pairing.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/core/pairing/pairing_store.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-      16              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/message_tracker.dart';
-      17              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart';
-      18              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
-      19              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-      20              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
-      21              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-      22              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
-      23              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_relay_client.dart';
-      24              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing.dart';
-      25              : import 'package:walletconnect_flutter_v2/apis/core/store/shared_prefs_store.dart';
-      26              : import 'package:walletconnect_flutter_v2/apis/core/verify/i_verify.dart';
-      27              : import 'package:walletconnect_flutter_v2/apis/core/verify/verify.dart';
-      28              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      29              : import 'package:walletconnect_flutter_v2/apis/utils/log_level.dart';
-      30              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
-      31              : 
-      32              : class Core implements ICore {
-      33            7 :   @override
-      34              :   String get protocol => 'wc';
-      35            7 :   @override
-      36              :   String get version => '2';
-      37              : 
-      38              :   @override
-      39              :   final String projectId;
-      40              : 
-      41              :   @override
-      42              :   String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL;
-      43              : 
-      44              :   @override
-      45              :   String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL;
-      46              : 
-      47              :   @override
-      48              :   late ICrypto crypto;
-      49              : 
-      50              :   @override
-      51              :   late IRelayClient relayClient;
-      52              : 
-      53              :   @override
-      54              :   late IExpirer expirer;
-      55              : 
-      56              :   @override
-      57              :   late IPairing pairing;
-      58              : 
-      59              :   @override
-      60              :   late IEcho echo;
-      61              : 
-      62              :   @override
-      63              :   late IHeartBeat heartbeat;
-      64              : 
-      65              :   @override
-      66              :   late IVerify verify;
-      67              : 
-      68              :   Logger _logger = Logger(
-      69              :     level: Level.off,
-      70              :     printer: PrettyPrinter(),
-      71              :   );
-      72            9 :   @override
-      73            9 :   Logger get logger => _logger;
-      74              : 
-      75            0 :   @override
-      76              :   void addLogListener(LogCallback callback) {
-      77            0 :     Logger.addLogListener(callback);
-      78              :   }
-      79              : 
-      80            0 :   @override
-      81              :   bool removeLogListener(LogCallback callback) {
-      82            0 :     return Logger.removeLogListener(callback);
-      83              :   }
-      84              : 
-      85              :   @override
-      86              :   late IStore<Map<String, dynamic>> storage;
-      87              : 
-      88           10 :   Core({
-      89              :     required this.projectId,
-      90              :     this.relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
-      91              :     this.pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
-      92              :     bool memoryStore = false,
-      93              :     LogLevel logLevel = LogLevel.nothing,
-      94              :     IHttpClient httpClient = const HttpWrapper(),
-      95              :     IWebSocketHandler? webSocketHandler,
-      96              :   }) {
-      97           20 :     _logger = Logger(
-      98           10 :       level: logLevel.toLevel(),
-      99           10 :       printer: PrettyPrinter(methodCount: null),
-     100              :     );
-     101           20 :     heartbeat = HeartBeat();
-     102           20 :     storage = SharedPrefsStores(
-     103              :       memoryStore: memoryStore,
-     104              :     );
-     105           20 :     crypto = Crypto(
-     106              :       core: this,
-     107           10 :       keyChain: GenericStore<String>(
-     108           10 :         storage: storage,
-     109              :         context: StoreVersions.CONTEXT_KEYCHAIN,
-     110              :         version: StoreVersions.VERSION_KEYCHAIN,
-     111            0 :         fromJson: (dynamic value) => value as String,
-     112              :       ),
-     113              :     );
-     114           20 :     relayClient = RelayClient(
-     115              :       core: this,
-     116           10 :       messageTracker: MessageTracker(
-     117           10 :         storage: storage,
-     118              :         context: StoreVersions.CONTEXT_MESSAGE_TRACKER,
-     119              :         version: StoreVersions.VERSION_MESSAGE_TRACKER,
-     120            0 :         fromJson: (dynamic value) {
-     121            0 :           return WalletConnectUtils.convertMapTo<String>(value);
-     122              :         },
-     123              :       ),
-     124           10 :       topicMap: GenericStore<String>(
-     125           10 :         storage: storage,
-     126              :         context: StoreVersions.CONTEXT_TOPIC_MAP,
-     127              :         version: StoreVersions.VERSION_TOPIC_MAP,
-     128            0 :         fromJson: (dynamic value) => value as String,
-     129              :       ),
-     130              :       socketHandler: webSocketHandler,
-     131              :     );
-     132           20 :     expirer = Expirer(
-     133           10 :       storage: storage,
-     134              :       context: StoreVersions.CONTEXT_EXPIRER,
-     135              :       version: StoreVersions.VERSION_EXPIRER,
-     136            0 :       fromJson: (dynamic value) => value as int,
-     137              :     );
-     138           20 :     pairing = Pairing(
-     139              :       core: this,
-     140           10 :       pairings: PairingStore(
-     141           10 :         storage: storage,
-     142              :         context: StoreVersions.CONTEXT_PAIRINGS,
-     143              :         version: StoreVersions.VERSION_PAIRINGS,
-     144            0 :         fromJson: (dynamic value) {
-     145            0 :           return PairingInfo.fromJson(value as Map<String, dynamic>);
-     146              :         },
-     147              :       ),
-     148           10 :       history: JsonRpcHistory(
-     149           10 :         storage: storage,
-     150              :         context: StoreVersions.CONTEXT_JSON_RPC_HISTORY,
-     151              :         version: StoreVersions.VERSION_JSON_RPC_HISTORY,
-     152            0 :         fromJson: (dynamic value) => JsonRpcRecord.fromJson(value),
-     153              :       ),
-     154           10 :       topicToReceiverPublicKey: GenericStore(
-     155           10 :         storage: storage,
-     156              :         context: StoreVersions.CONTEXT_TOPIC_TO_RECEIVER_PUBLIC_KEY,
-     157              :         version: StoreVersions.VERSION_TOPIC_TO_RECEIVER_PUBLIC_KEY,
-     158            0 :         fromJson: (dynamic value) => ReceiverPublicKey.fromJson(value),
-     159              :       ),
-     160              :     );
-     161           20 :     echo = Echo(
-     162              :       core: this,
-     163           10 :       echoClient: EchoClient(
-     164           10 :         baseUrl: pushUrl,
-     165              :         httpClient: httpClient,
-     166              :       ),
-     167              :     );
-     168           20 :     verify = Verify(
-     169              :       core: this,
-     170              :       httpClient: httpClient,
-     171              :     );
-     172              :   }
-     173              : 
-     174            9 :   @override
-     175              :   Future<void> start() async {
-     176           18 :     await storage.init();
-     177           18 :     await crypto.init();
-     178           18 :     await relayClient.init();
-     179           18 :     await expirer.init();
-     180           18 :     await pairing.init();
-     181           18 :     heartbeat.init();
-     182              :   }
-     183              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto.dart.func-c.html b/coverage/html/core/crypto/crypto.dart.func-c.html deleted file mode 100644 index c5f2096b..00000000 --- a/coverage/html/core/crypto/crypto.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto.dart.func.html b/coverage/html/core/crypto/crypto.dart.func.html deleted file mode 100644 index c43d455e..00000000 --- a/coverage/html/core/crypto/crypto.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto.dart.gcov.html b/coverage/html/core/crypto/crypto.dart.gcov.html deleted file mode 100644 index 9490ac60..00000000 --- a/coverage/html/core/crypto/crypto.dart.gcov.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto.dartCoverageTotalHit
Test:lcov.infoLines:86.2 %8775
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:typed_data';
-       3              : 
-       4              : import 'package:convert/convert.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_utils.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto_utils.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/i_relay_auth.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth_models.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-      16              : 
-      17              : class Crypto implements ICrypto {
-      18              :   static const cryptoContext = 'crypto';
-      19              :   static const cryptoClientSeed = 'client_ed25519_seed';
-      20              :   static const clientSeed = 'CLIENT_SEED';
-      21              : 
-      22              :   bool _initialized = false;
-      23              : 
-      24            0 :   @override
-      25              :   String get name => cryptoContext;
-      26              : 
-      27              :   final ICore core;
-      28              : 
-      29              :   @override
-      30              :   IGenericStore<String> keyChain;
-      31              : 
-      32              :   ICryptoUtils utils;
-      33              :   IRelayAuth relayAuth;
-      34              : 
-      35           10 :   Crypto({
-      36              :     required this.core,
-      37              :     required this.keyChain,
-      38              :     CryptoUtils? utils,
-      39              :     RelayAuth? relayAuth,
-      40           10 :   })  : utils = utils ?? CryptoUtils(),
-      41           10 :         relayAuth = relayAuth ?? RelayAuth();
-      42              : 
-      43           10 :   @override
-      44              :   Future<void> init() async {
-      45           10 :     if (_initialized) {
-      46              :       return;
-      47              :     }
-      48              : 
-      49           20 :     await keyChain.init();
-      50              : 
-      51           10 :     _initialized = true;
-      52              :   }
-      53              : 
-      54            0 :   @override
-      55              :   bool hasKeys(String tag) {
-      56            0 :     _checkInitialized();
-      57            0 :     return keyChain.has(tag);
-      58              :   }
-      59              : 
-      60            0 :   @override
-      61              :   Future<String> getClientId() async {
-      62            0 :     _checkInitialized();
-      63              : 
-      64              :     // If we don't have a pub key associated with the seed yet, make one
-      65            0 :     final Uint8List seed = await _getClientSeed();
-      66            0 :     final RelayAuthKeyPair keyPair = await relayAuth.generateKeyPair(seed);
-      67            0 :     return relayAuth.encodeIss(keyPair.publicKeyBytes);
-      68              :   }
-      69              : 
-      70            6 :   @override
-      71              :   Future<String> generateKeyPair() async {
-      72            6 :     _checkInitialized();
-      73              : 
-      74           12 :     CryptoKeyPair keyPair = utils.generateKeyPair();
-      75            6 :     return await _setPrivateKey(keyPair);
-      76              :   }
-      77              : 
-      78            6 :   @override
-      79              :   Future<String> generateSharedKey(
-      80              :     String selfPublicKey,
-      81              :     String peerPublicKey, {
-      82              :     String? overrideTopic,
-      83              :   }) async {
-      84            6 :     _checkInitialized();
-      85              : 
-      86            6 :     String privKey = _getPrivateKey(selfPublicKey)!;
-      87           12 :     String symKey = await utils.deriveSymKey(privKey, peerPublicKey);
-      88            6 :     return await setSymKey(symKey, overrideTopic: overrideTopic);
-      89              :   }
-      90              : 
-      91            8 :   @override
-      92              :   Future<String> setSymKey(
-      93              :     String symKey, {
-      94              :     String? overrideTopic,
-      95              :   }) async {
-      96            8 :     _checkInitialized();
-      97              : 
-      98           16 :     final String topic = overrideTopic ?? utils.hashKey(symKey);
-      99              :     // print('crypto setSymKey, symKey: $symKey, overrideTopic: $topic');
-     100           16 :     await keyChain.set(topic, symKey);
-     101              :     return topic;
-     102              :   }
-     103              : 
-     104            4 :   @override
-     105              :   Future<void> deleteKeyPair(String publicKey) async {
-     106            4 :     _checkInitialized();
-     107            8 :     await keyChain.delete(publicKey);
-     108              :   }
-     109              : 
-     110            6 :   @override
-     111              :   Future<void> deleteSymKey(String topic) async {
-     112            6 :     _checkInitialized();
-     113           12 :     await keyChain.delete(topic);
-     114              :   }
-     115              : 
-     116            7 :   @override
-     117              :   Future<String?> encode(
-     118              :     String topic,
-     119              :     Map<String, dynamic> payload, {
-     120              :     EncodeOptions? options,
-     121              :   }) async {
-     122            7 :     _checkInitialized();
-     123              : 
-     124              :     EncodingValidation params;
-     125              :     if (options == null) {
-     126           14 :       params = utils.validateEncoding();
-     127              :     } else {
-     128            4 :       params = utils.validateEncoding(
-     129            2 :         type: options.type,
-     130            2 :         senderPublicKey: options.senderPublicKey,
-     131            2 :         receiverPublicKey: options.receiverPublicKey,
-     132              :       );
-     133              :     }
-     134              : 
-     135            7 :     final String message = jsonEncode(payload);
-     136              : 
-     137           14 :     if (utils.isTypeOneEnvelope(params)) {
-     138            2 :       final String selfPublicKey = params.senderPublicKey!;
-     139            2 :       final String peerPublicKey = params.receiverPublicKey!;
-     140            2 :       topic = await generateSharedKey(selfPublicKey, peerPublicKey);
-     141              :     }
-     142              : 
-     143            7 :     final String? symKey = _getSymKey(topic);
-     144              :     if (symKey == null) {
-     145              :       return null;
-     146              :     }
-     147              : 
-     148           14 :     final String result = await utils.encrypt(
-     149              :       message,
-     150              :       symKey,
-     151            7 :       type: params.type,
-     152            7 :       senderPublicKey: params.senderPublicKey,
-     153              :     );
-     154              : 
-     155              :     return result;
-     156              :   }
-     157              : 
-     158            7 :   @override
-     159              :   Future<String?> decode(
-     160              :     String topic,
-     161              :     String encoded, {
-     162              :     DecodeOptions? options,
-     163              :   }) async {
-     164            7 :     _checkInitialized();
-     165              : 
-     166           14 :     final EncodingValidation params = utils.validateDecoding(
-     167              :       encoded,
-     168            6 :       receiverPublicKey: options?.receiverPublicKey,
-     169              :     );
-     170              : 
-     171           14 :     if (utils.isTypeOneEnvelope(params)) {
-     172            2 :       final String selfPublicKey = params.receiverPublicKey!;
-     173            2 :       final String peerPublicKey = params.senderPublicKey!;
-     174            2 :       topic = await generateSharedKey(selfPublicKey, peerPublicKey);
-     175              :     }
-     176            7 :     final String? symKey = _getSymKey(topic);
-     177              :     if (symKey == null) {
-     178              :       return null;
-     179              :     }
-     180              : 
-     181           14 :     final String message = await utils.decrypt(symKey, encoded);
-     182              : 
-     183              :     return message;
-     184              :   }
-     185              : 
-     186            9 :   @override
-     187              :   Future<String> signJWT(String aud) async {
-     188            9 :     _checkInitialized();
-     189              : 
-     190            9 :     final Uint8List seed = await _getClientSeed();
-     191           18 :     final RelayAuthKeyPair keyPair = await relayAuth.generateKeyPair(seed);
-     192           18 :     final String sub = utils.generateRandomBytes32();
-     193           18 :     final jwt = await relayAuth.signJWT(
-     194              :       sub: sub,
-     195              :       aud: aud,
-     196              :       ttl: WalletConnectConstants.ONE_DAY,
-     197              :       keyPair: keyPair,
-     198              :     );
-     199              :     return jwt;
-     200              :   }
-     201              : 
-     202            0 :   @override
-     203              :   int getPayloadType(String encoded) {
-     204            0 :     _checkInitialized();
-     205              : 
-     206            0 :     return utils.deserialize(encoded).type;
-     207              :   }
-     208              : 
-     209              :   // PRIVATE FUNCTIONS
-     210              : 
-     211            6 :   Future<String> _setPrivateKey(CryptoKeyPair keyPair) async {
-     212           24 :     await keyChain.set(keyPair.publicKey, keyPair.privateKey);
-     213            6 :     return keyPair.publicKey;
-     214              :   }
-     215              : 
-     216            6 :   String? _getPrivateKey(String publicKey) {
-     217           12 :     return keyChain.get(publicKey);
-     218              :   }
-     219              : 
-     220            7 :   String? _getSymKey(String topic) {
-     221              :     // print('crypto getSymKey: $topic');
-     222           14 :     return keyChain.get(topic);
-     223              :   }
-     224              : 
-     225              :   // Future<String> _getClientKeyFromSeed() async {
-     226              :   //   // Get the seed
-     227              :   //   String seed = await _getClientSeed();
-     228              : 
-     229              :   //   String pubKey = keyChain.get(seed);
-     230              :   //   if (pubKey == '') {
-     231              :   //     pubKey = await generateKeyPair();
-     232              :   //     await keyChain.set(seed, pubKey);
-     233              :   //   }
-     234              : 
-     235              :   //   return pubKey;
-     236              :   // }
-     237              : 
-     238            9 :   Future<Uint8List> _getClientSeed() async {
-     239           18 :     String? seed = keyChain.get(clientSeed);
-     240              :     if (seed == null) {
-     241           18 :       seed = utils.generateRandomBytes32();
-     242           18 :       await keyChain.set(clientSeed, seed);
-     243              :     }
-     244              : 
-     245           18 :     return Uint8List.fromList(hex.decode(seed));
-     246              :   }
-     247              : 
-     248           10 :   void _checkInitialized() {
-     249           10 :     if (!_initialized) {
-     250            1 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     251              :     }
-     252              :   }
-     253              : 
-     254            7 :   @override
-     255              :   ICryptoUtils getUtils() {
-     256            7 :     return utils;
-     257              :   }
-     258              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_models.dart.func-c.html b/coverage/html/core/crypto/crypto_models.dart.func-c.html deleted file mode 100644 index b6a7d772..00000000 --- a/coverage/html/core/crypto/crypto_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_models.dart.func.html b/coverage/html/core/crypto/crypto_models.dart.func.html deleted file mode 100644 index 44e29f08..00000000 --- a/coverage/html/core/crypto/crypto_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_models.dart.gcov.html b/coverage/html/core/crypto/crypto_models.dart.gcov.html deleted file mode 100644 index 7352f6b6..00000000 --- a/coverage/html/core/crypto/crypto_models.dart.gcov.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:typed_data';
-       2              : 
-       3              : import 'package:convert/convert.dart';
-       4              : 
-       5              : class CryptoKeyPair {
-       6              :   final String privateKey;
-       7              :   final String publicKey;
-       8              : 
-       9           22 :   const CryptoKeyPair(this.privateKey, this.publicKey);
-      10              : 
-      11            0 :   Uint8List getPrivateKeyBytes() {
-      12            0 :     return Uint8List.fromList(hex.decode(privateKey));
-      13              :   }
-      14              : 
-      15            0 :   Uint8List getPublicKeyBytes() {
-      16            0 :     return Uint8List.fromList(hex.decode(publicKey));
-      17              :   }
-      18              : }
-      19              : 
-      20              : class EncryptParams {
-      21              :   String message;
-      22              :   String symKey;
-      23              :   int? type;
-      24              :   String? iv;
-      25              :   String? senderPublicKey;
-      26              : 
-      27            0 :   EncryptParams(
-      28              :     this.message,
-      29              :     this.symKey, {
-      30              :     this.type,
-      31              :     this.iv,
-      32              :     this.senderPublicKey,
-      33              :   });
-      34              : }
-      35              : 
-      36              : class EncodingParams {
-      37              :   int type;
-      38              :   Uint8List sealed;
-      39              :   Uint8List iv;
-      40              :   Uint8List ivSealed;
-      41              :   Uint8List? senderPublicKey;
-      42              : 
-      43            7 :   EncodingParams(
-      44              :     this.type,
-      45              :     this.sealed,
-      46              :     this.iv,
-      47              :     this.ivSealed, {
-      48              :     this.senderPublicKey,
-      49              :   });
-      50              : }
-      51              : 
-      52              : class EncodingValidation {
-      53              :   int type;
-      54              :   String? senderPublicKey;
-      55              :   String? receiverPublicKey;
-      56              : 
-      57            7 :   EncodingValidation(
-      58              :     this.type, {
-      59              :     this.senderPublicKey,
-      60              :     this.receiverPublicKey,
-      61              :   });
-      62              : }
-      63              : 
-      64              : class EncodeOptions {
-      65              :   static const TYPE_0 = 0;
-      66              :   static const TYPE_1 = 1;
-      67              : 
-      68              :   int? type;
-      69              :   String? senderPublicKey;
-      70              :   String? receiverPublicKey;
-      71              : 
-      72            2 :   EncodeOptions({
-      73              :     this.type,
-      74              :     this.senderPublicKey,
-      75              :     this.receiverPublicKey,
-      76              :   });
-      77              : }
-      78              : 
-      79              : class DecodeOptions {
-      80              :   String? receiverPublicKey;
-      81              : 
-      82            6 :   DecodeOptions({
-      83              :     this.receiverPublicKey,
-      84              :   });
-      85              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_utils.dart.func-c.html b/coverage/html/core/crypto/crypto_utils.dart.func-c.html deleted file mode 100644 index 964b663f..00000000 --- a/coverage/html/core/crypto/crypto_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_utils.dart.func.html b/coverage/html/core/crypto/crypto_utils.dart.func.html deleted file mode 100644 index 664030ba..00000000 --- a/coverage/html/core/crypto/crypto_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/crypto_utils.dart.gcov.html b/coverage/html/core/crypto/crypto_utils.dart.gcov.html deleted file mode 100644 index 93f9bb6a..00000000 --- a/coverage/html/core/crypto/crypto_utils.dart.gcov.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto/crypto_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/crypto - crypto_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %8383
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:math';
-       3              : import 'dart:typed_data';
-       4              : 
-       5              : import 'package:convert/convert.dart';
-       6              : import 'package:cryptography/cryptography.dart' as dc;
-       7              : import 'package:pointycastle/digests/sha256.dart';
-       8              : import 'package:pointycastle/key_derivators/hkdf.dart';
-       9              : import 'package:pointycastle/pointycastle.dart' show HkdfParameters;
-      10              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto_utils.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-      13              : import 'package:x25519/x25519.dart' as x;
-      14              : 
-      15              : class CryptoUtils extends ICryptoUtils {
-      16           30 :   static final _random = Random.secure();
-      17              : 
-      18              :   static const IV_LENGTH = 12;
-      19              :   static const KEY_LENGTH = 32;
-      20              : 
-      21              :   static const TYPE_LENGTH = 1;
-      22              : 
-      23            6 :   @override
-      24              :   CryptoKeyPair generateKeyPair() {
-      25            6 :     final kp = x.generateKeyPair();
-      26              : 
-      27            6 :     return CryptoKeyPair(
-      28           12 :       hex.encode(kp.privateKey),
-      29           12 :       hex.encode(kp.publicKey),
-      30              :     );
-      31              :   }
-      32              : 
-      33           10 :   @override
-      34              :   Uint8List randomBytes(int length) {
-      35           10 :     final Uint8List random = Uint8List(length);
-      36           20 :     for (int i = 0; i < length; i++) {
-      37           30 :       random[i] = _random.nextInt(256);
-      38              :     }
-      39              :     return random;
-      40              :   }
-      41              : 
-      42           10 :   @override
-      43              :   String generateRandomBytes32() {
-      44           20 :     return hex.encode(randomBytes(32));
-      45              :   }
-      46              : 
-      47            6 :   @override
-      48              :   Future<String> deriveSymKey(String privKeyA, String pubKeyB) async {
-      49            6 :     final Uint8List sharedKey1 = x.X25519(
-      50            6 :       hex.decode(privKeyA),
-      51            6 :       hex.decode(pubKeyB),
-      52              :     );
-      53              : 
-      54            6 :     Uint8List out = Uint8List(KEY_LENGTH);
-      55              : 
-      56           12 :     final HKDFKeyDerivator hkdf = HKDFKeyDerivator(SHA256Digest());
-      57            6 :     final HkdfParameters params = HkdfParameters(
-      58              :       sharedKey1,
-      59              :       KEY_LENGTH,
-      60              :     );
-      61            6 :     hkdf.init(params);
-      62              :     // final pc.KeyParameter keyParam = hkdf.extract(null, sharedKey1);
-      63            6 :     hkdf.deriveKey(null, 0, out, 0);
-      64            6 :     return hex.encode(out);
-      65              :   }
-      66              : 
-      67            8 :   @override
-      68              :   String hashKey(String key) {
-      69            8 :     return hex.encode(
-      70           16 :       SHA256Digest().process(
-      71            8 :         Uint8List.fromList(
-      72            8 :           hex.decode(key),
-      73              :         ),
-      74              :       ),
-      75              :     );
-      76              :     // return hex.encode(Hash.sha256(hex.decode(key)));
-      77              :   }
-      78              : 
-      79            5 :   @override
-      80              :   String hashMessage(String message) {
-      81            5 :     return hex.encode(
-      82           10 :       SHA256Digest().process(
-      83            5 :         Uint8List.fromList(
-      84            5 :           utf8.encode(message),
-      85              :         ),
-      86              :       ),
-      87              :     );
-      88              :   }
-      89              : 
-      90            7 :   @override
-      91              :   Future<String> encrypt(
-      92              :     String message,
-      93              :     String symKey, {
-      94              :     int? type,
-      95              :     String? iv,
-      96              :     String? senderPublicKey,
-      97              :   }) async {
-      98              :     final int decodedType = type ?? EncodeOptions.TYPE_0;
-      99              :     // print(message);
-     100              :     // print(symKey);
-     101              : 
-     102              :     // Check for type 1 envelope, throw an error if data is invalid
-     103            7 :     if (decodedType == EncodeOptions.TYPE_1 && senderPublicKey == null) {
-     104              :       throw const WalletConnectError(
-     105              :         code: -1,
-     106              :         message: 'Missing sender public key for type 1 envelope',
-     107              :       );
-     108              :     }
-     109              : 
-     110              :     // final String senderPublicKey = senderPublicKey !=
-     111              :     final Uint8List usedIV =
-     112            8 :         (iv != null ? hex.decode(iv) : randomBytes(IV_LENGTH)) as Uint8List;
-     113              : 
-     114            7 :     final chacha = dc.Chacha20.poly1305Aead();
-     115            7 :     dc.SecretBox b = await chacha.encrypt(
-     116            7 :       utf8.encode(message),
-     117            7 :       secretKey: dc.SecretKey(
-     118            7 :         hex.decode(symKey),
-     119              :       ),
-     120              :       nonce: usedIV,
-     121              :     );
-     122              : 
-     123            7 :     return serialize(
-     124              :       decodedType,
-     125            7 :       b.concatenation(),
-     126              :       usedIV,
-     127              :       senderPublicKey: senderPublicKey != null
-     128            3 :           ? hex.decode(senderPublicKey) as Uint8List
-     129              :           : null,
-     130              :     );
-     131              :   }
-     132              : 
-     133            7 :   @override
-     134              :   Future<String> decrypt(String symKey, String encoded) async {
-     135            7 :     final chacha = dc.Chacha20.poly1305Aead();
-     136            7 :     final dc.SecretKey secretKey = dc.SecretKey(
-     137            7 :       hex.decode(symKey),
-     138              :     );
-     139            7 :     final EncodingParams encodedData = deserialize(encoded);
-     140            7 :     final dc.SecretBox b = dc.SecretBox.fromConcatenation(
-     141            7 :       encodedData.ivSealed,
-     142              :       nonceLength: 12,
-     143              :       macLength: 16,
-     144              :     );
-     145            7 :     List<int> data = await chacha.decrypt(b, secretKey: secretKey);
-     146            7 :     return utf8.decode(data);
-     147              :   }
-     148              : 
-     149            7 :   @override
-     150              :   String serialize(
-     151              :     int type,
-     152              :     Uint8List sealed,
-     153              :     Uint8List iv, {
-     154              :     Uint8List? senderPublicKey,
-     155              :   }) {
-     156            7 :     List<int> l = [type];
-     157              : 
-     158            7 :     if (type == EncodeOptions.TYPE_1) {
-     159              :       if (senderPublicKey == null) {
-     160              :         throw const WalletConnectError(
-     161              :           code: -1,
-     162              :           message: 'Missing sender public key for type 1 envelope',
-     163              :         );
-     164              :       }
-     165              : 
-     166            3 :       l.addAll(senderPublicKey);
-     167              :     }
-     168              : 
-     169              :     // l.addAll(iv);
-     170            7 :     l.addAll(sealed);
-     171              : 
-     172            7 :     return base64Encode(l);
-     173              :   }
-     174              : 
-     175            7 :   @override
-     176              :   EncodingParams deserialize(String encoded) {
-     177            7 :     final Uint8List bytes = base64Decode(encoded);
-     178            7 :     final int type = bytes[0];
-     179              : 
-     180              :     int index = TYPE_LENGTH;
-     181              :     Uint8List? senderPublicKey;
-     182            7 :     if (type == EncodeOptions.TYPE_1) {
-     183            3 :       senderPublicKey = bytes.sublist(
-     184              :         index,
-     185            3 :         index + KEY_LENGTH,
-     186              :       );
-     187            3 :       index += KEY_LENGTH;
-     188              :     }
-     189           14 :     Uint8List iv = bytes.sublist(index, index + IV_LENGTH);
-     190            7 :     Uint8List ivSealed = bytes.sublist(index);
-     191            7 :     index += IV_LENGTH;
-     192            7 :     Uint8List sealed = bytes.sublist(index);
-     193              : 
-     194            7 :     return EncodingParams(
-     195              :       type,
-     196              :       sealed,
-     197              :       iv,
-     198              :       ivSealed,
-     199              :       senderPublicKey: senderPublicKey,
-     200              :     );
-     201              :   }
-     202              : 
-     203            7 :   @override
-     204              :   EncodingValidation validateDecoding(
-     205              :     String encoded, {
-     206              :     String? receiverPublicKey,
-     207              :   }) {
-     208            7 :     final EncodingParams deserialized = deserialize(encoded);
-     209            7 :     final String? senderPublicKey = deserialized.senderPublicKey != null
-     210            6 :         ? hex.encode(deserialized.senderPublicKey!)
-     211              :         : null;
-     212            7 :     return validateEncoding(
-     213            7 :       type: deserialized.type,
-     214              :       senderPublicKey: senderPublicKey,
-     215              :       receiverPublicKey: receiverPublicKey,
-     216              :     );
-     217              :   }
-     218              : 
-     219            7 :   @override
-     220              :   EncodingValidation validateEncoding({
-     221              :     int? type,
-     222              :     String? senderPublicKey,
-     223              :     String? receiverPublicKey,
-     224              :   }) {
-     225              :     final int t = type ?? EncodeOptions.TYPE_0;
-     226            7 :     if (t == EncodeOptions.TYPE_1) {
-     227              :       if (senderPublicKey == null) {
-     228              :         throw const WalletConnectError(
-     229              :             code: -1, message: 'Missing sender public key');
-     230              :       }
-     231              :       if (receiverPublicKey == null) {
-     232              :         throw const WalletConnectError(
-     233              :             code: -1, message: 'Missing receiver public key');
-     234              :       }
-     235              :     }
-     236            7 :     return EncodingValidation(
-     237              :       t,
-     238              :       senderPublicKey: senderPublicKey,
-     239              :       receiverPublicKey: receiverPublicKey,
-     240              :     );
-     241              :   }
-     242              : 
-     243            7 :   @override
-     244              :   bool isTypeOneEnvelope(
-     245              :     EncodingValidation result,
-     246              :   ) {
-     247           14 :     return result.type == EncodeOptions.TYPE_1 &&
-     248            3 :         result.senderPublicKey != null &&
-     249            3 :         result.receiverPublicKey != null;
-     250              :   }
-     251              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/index-sort-f.html b/coverage/html/core/crypto/index-sort-f.html deleted file mode 100644 index c179cdd0..00000000 --- a/coverage/html/core/crypto/index-sort-f.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
crypto.dart -
86.2%86.2%
-
86.2 %8775-
crypto_models.dart -
50.0%50.0%
-
50.0 %105-
crypto_utils.dart -
100.0%
-
100.0 %8383-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/index-sort-l.html b/coverage/html/core/crypto/index-sort-l.html deleted file mode 100644 index ab3f42b3..00000000 --- a/coverage/html/core/crypto/index-sort-l.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
crypto_models.dart -
50.0%50.0%
-
50.0 %105
crypto.dart -
86.2%86.2%
-
86.2 %8775
crypto_utils.dart -
100.0%
-
100.0 %8383
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/crypto/index.html b/coverage/html/core/crypto/index.html deleted file mode 100644 index 7788838f..00000000 --- a/coverage/html/core/crypto/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/crypto - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/cryptoCoverageTotalHit
Test:lcov.infoLines:90.6 %180163
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
crypto.dart -
86.2%86.2%
-
86.2 %8775
crypto_models.dart -
50.0%50.0%
-
50.0 %105
crypto_utils.dart -
100.0%
-
100.0 %8383
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo.dart.func-c.html b/coverage/html/core/echo/echo.dart.func-c.html deleted file mode 100644 index 95be6f5e..00000000 --- a/coverage/html/core/echo/echo.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo.dart.func.html b/coverage/html/core/echo/echo.dart.func.html deleted file mode 100644 index a8a531c8..00000000 --- a/coverage/html/core/echo/echo.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo.dart.gcov.html b/coverage/html/core/echo/echo.dart.gcov.html deleted file mode 100644 index ccfe5963..00000000 --- a/coverage/html/core/echo/echo.dart.gcov.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo.dartCoverageTotalHit
Test:lcov.infoLines:88.2 %1715
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo_client.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-       4              : 
-       5              : class Echo implements IEcho {
-       6              :   static const SUCCESS_STATUS = 'SUCCESS';
-       7              :   final ICore core;
-       8              :   final IEchoClient echoClient;
-       9              : 
-      10           11 :   Echo({required this.core, required this.echoClient});
-      11              : 
-      12            1 :   @override
-      13              :   Future<void> register(String firebaseAccessToken) async {
-      14            2 :     final projectId = core.projectId;
-      15            3 :     final clientId = await core.crypto.getClientId();
-      16            2 :     final response = await echoClient.register(
-      17              :       projectId: projectId,
-      18              :       clientId: clientId,
-      19              :       firebaseAccessToken: firebaseAccessToken,
-      20              :     );
-      21              : 
-      22            2 :     if (response.status != SUCCESS_STATUS) {
-      23            3 :       if (response.errors != null && response.errors!.isNotEmpty) {
-      24            4 :         throw ArgumentError(response.errors!.first.message);
-      25              :       }
-      26              : 
-      27            0 :       throw Exception('Unknown error');
-      28              :     }
-      29              :   }
-      30              : 
-      31            1 :   @override
-      32              :   Future<void> unregister() async {
-      33            2 :     final projectId = core.projectId;
-      34            3 :     final clientId = await core.crypto.getClientId();
-      35            2 :     final response = await echoClient.unregister(
-      36              :       projectId: projectId,
-      37              :       clientId: clientId,
-      38              :     );
-      39              : 
-      40            2 :     if (response.status != SUCCESS_STATUS) {
-      41            3 :       if (response.errors != null && response.errors!.isNotEmpty) {
-      42            4 :         throw ArgumentError(response.errors!.first.message);
-      43              :       }
-      44              : 
-      45            0 :       throw Exception('Unknown error');
-      46              :     }
-      47              :   }
-      48              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo_client.dart.func-c.html b/coverage/html/core/echo/echo_client.dart.func-c.html deleted file mode 100644 index 60067cb5..00000000 --- a/coverage/html/core/echo/echo_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo_client.dart.func.html b/coverage/html/core/echo/echo_client.dart.func.html deleted file mode 100644 index 941b8213..00000000 --- a/coverage/html/core/echo/echo_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/echo_client.dart.gcov.html b/coverage/html/core/echo/echo_client.dart.gcov.html deleted file mode 100644 index 59b3d006..00000000 --- a/coverage/html/core/echo/echo_client.dart.gcov.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/echo_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo - echo_client.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1313
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:http/http.dart' as http;
-       4              : import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo_client.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/echo/models/echo_body.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/echo/models/echo_response.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-       8              : 
-       9              : class EchoClient implements IEchoClient {
-      10              :   static const headers = {'Content-Type': 'application/json'};
-      11              :   final IHttpClient httpClient;
-      12              :   final String baseUrl;
-      13              : 
-      14           11 :   EchoClient({required this.baseUrl, required this.httpClient});
-      15              : 
-      16            1 :   @override
-      17              :   Future<EchoResponse> register({
-      18              :     required String projectId,
-      19              :     required String clientId,
-      20              :     required String firebaseAccessToken,
-      21              :   }) async {
-      22            1 :     final body = EchoBody(clientId: clientId, token: firebaseAccessToken);
-      23              : 
-      24            3 :     final url = Uri.parse('$baseUrl/$projectId/clients?auth=$clientId');
-      25            2 :     final http.Response response = await httpClient.post(
-      26              :       url,
-      27              :       headers: headers,
-      28            2 :       body: jsonEncode(body.toJson()),
-      29              :     );
-      30              : 
-      31            2 :     final jsonMap = json.decode(response.body);
-      32            1 :     return EchoResponse.fromJson(jsonMap);
-      33              :   }
-      34              : 
-      35            1 :   @override
-      36              :   Future<EchoResponse> unregister({
-      37              :     required String projectId,
-      38              :     required String clientId,
-      39              :   }) async {
-      40            3 :     final url = Uri.parse('$baseUrl/$projectId/clients/$clientId');
-      41              :     final http.Response response =
-      42            2 :         await httpClient.delete(url, headers: headers);
-      43              : 
-      44            2 :     final jsonMap = json.decode(response.body);
-      45            1 :     return EchoResponse.fromJson(jsonMap);
-      46              :   }
-      47              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/index-sort-f.html b/coverage/html/core/echo/index-sort-f.html deleted file mode 100644 index fd52e9f6..00000000 --- a/coverage/html/core/echo/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
echo.dart -
88.2%88.2%
-
88.2 %1715-
echo_client.dart -
100.0%
-
100.0 %1313-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/index-sort-l.html b/coverage/html/core/echo/index-sort-l.html deleted file mode 100644 index f0cb662f..00000000 --- a/coverage/html/core/echo/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo.dart -
88.2%88.2%
-
88.2 %1715
echo_client.dart -
100.0%
-
100.0 %1313
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/index.html b/coverage/html/core/echo/index.html deleted file mode 100644 index b60e9c16..00000000 --- a/coverage/html/core/echo/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echoCoverageTotalHit
Test:lcov.infoLines:93.3 %3028
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo.dart -
88.2%88.2%
-
88.2 %1715
echo_client.dart -
100.0%
-
100.0 %1313
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_body.dart.func-c.html b/coverage/html/core/echo/models/echo_body.dart.func-c.html deleted file mode 100644 index fcad873d..00000000 --- a/coverage/html/core/echo/models/echo_body.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_body.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_body.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_body.dart.func.html b/coverage/html/core/echo/models/echo_body.dart.func.html deleted file mode 100644 index 22c00c55..00000000 --- a/coverage/html/core/echo/models/echo_body.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_body.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_body.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_body.dart.gcov.html b/coverage/html/core/echo/models/echo_body.dart.gcov.html deleted file mode 100644 index 99b01738..00000000 --- a/coverage/html/core/echo/models/echo_body.dart.gcov.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_body.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_body.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:json_annotation/json_annotation.dart';
-       2              : 
-       3              : part 'echo_body.g.dart';
-       4              : 
-       5              : @JsonSerializable(fieldRename: FieldRename.snake)
-       6              : class EchoBody {
-       7              :   final String clientId;
-       8              :   final String token;
-       9              :   final String type;
-      10              : 
-      11            1 :   EchoBody({
-      12              :     required this.clientId,
-      13              :     required this.token,
-      14              :     this.type = 'fcm',
-      15              :   });
-      16              : 
-      17            0 :   factory EchoBody.fromJson(Map<String, dynamic> json) =>
-      18            0 :       _$EchoBodyFromJson(json);
-      19              : 
-      20            2 :   Map<String, dynamic> toJson() => _$EchoBodyToJson(this);
-      21              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_response.dart.func-c.html b/coverage/html/core/echo/models/echo_response.dart.func-c.html deleted file mode 100644 index b25c49ba..00000000 --- a/coverage/html/core/echo/models/echo_response.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_response.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_response.dart.func.html b/coverage/html/core/echo/models/echo_response.dart.func.html deleted file mode 100644 index 4519efdd..00000000 --- a/coverage/html/core/echo/models/echo_response.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_response.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/echo_response.dart.gcov.html b/coverage/html/core/echo/models/echo_response.dart.gcov.html deleted file mode 100644 index 455f0318..00000000 --- a/coverage/html/core/echo/models/echo_response.dart.gcov.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models/echo_response.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/models - echo_response.dartCoverageTotalHit
Test:lcov.infoLines:72.7 %118
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:json_annotation/json_annotation.dart';
-       2              : 
-       3              : part 'echo_response.g.dart';
-       4              : 
-       5              : @JsonSerializable(fieldRename: FieldRename.snake)
-       6              : class EchoResponse {
-       7              :   final List<ResponseError>? errors;
-       8              :   final List<Field>? fields;
-       9              :   final String status;
-      10              : 
-      11            1 :   EchoResponse({
-      12              :     this.errors,
-      13              :     this.fields,
-      14              :     required this.status,
-      15              :   });
-      16              : 
-      17            1 :   factory EchoResponse.fromJson(Map<String, dynamic> json) =>
-      18            1 :       _$EchoResponseFromJson(json);
-      19              : 
-      20            0 :   Map<String, dynamic> toJson() => _$EchoResponseToJson(this);
-      21              : }
-      22              : 
-      23              : @JsonSerializable(fieldRename: FieldRename.snake)
-      24              : class ResponseError {
-      25              :   final String message;
-      26              :   final String name;
-      27              : 
-      28            1 :   ResponseError({required this.message, required this.name});
-      29              : 
-      30            1 :   factory ResponseError.fromJson(Map<String, dynamic> json) =>
-      31            1 :       _$ResponseErrorFromJson(json);
-      32              : 
-      33            0 :   Map<String, dynamic> toJson() => _$ResponseErrorToJson(this);
-      34              : }
-      35              : 
-      36              : @JsonSerializable(fieldRename: FieldRename.snake)
-      37              : class Field {
-      38              :   final String description;
-      39              :   final String field;
-      40              :   final String location;
-      41              : 
-      42            1 :   Field({
-      43              :     required this.description,
-      44              :     required this.field,
-      45              :     required this.location,
-      46              :   });
-      47              : 
-      48            2 :   factory Field.fromJson(Map<String, dynamic> json) => _$FieldFromJson(json);
-      49              : 
-      50            0 :   Map<String, dynamic> toJson() => _$FieldToJson(this);
-      51              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/index-sort-f.html b/coverage/html/core/echo/models/index-sort-f.html deleted file mode 100644 index b9323b45..00000000 --- a/coverage/html/core/echo/models/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
echo_body.dart -
50.0%50.0%
-
50.0 %42-
echo_response.dart -
72.7%72.7%
-
72.7 %118-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/index-sort-l.html b/coverage/html/core/echo/models/index-sort-l.html deleted file mode 100644 index e4f3b175..00000000 --- a/coverage/html/core/echo/models/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo_body.dart -
50.0%50.0%
-
50.0 %42
echo_response.dart -
72.7%72.7%
-
72.7 %118
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/echo/models/index.html b/coverage/html/core/echo/models/index.html deleted file mode 100644 index b7c8864c..00000000 --- a/coverage/html/core/echo/models/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/echo/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/echo/modelsCoverageTotalHit
Test:lcov.infoLines:66.7 %1510
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
echo_body.dart -
50.0%50.0%
-
50.0 %42
echo_response.dart -
72.7%72.7%
-
72.7 %118
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/heartbeat.dart.func-c.html b/coverage/html/core/heartbit/heartbeat.dart.func-c.html deleted file mode 100644 index cbdfc6b4..00000000 --- a/coverage/html/core/heartbit/heartbeat.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit/heartbeat.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbit - heartbeat.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/heartbeat.dart.func.html b/coverage/html/core/heartbit/heartbeat.dart.func.html deleted file mode 100644 index df62e08b..00000000 --- a/coverage/html/core/heartbit/heartbeat.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit/heartbeat.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbit - heartbeat.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/heartbeat.dart.gcov.html b/coverage/html/core/heartbit/heartbeat.dart.gcov.html deleted file mode 100644 index 6a728a27..00000000 --- a/coverage/html/core/heartbit/heartbeat.dart.gcov.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit/heartbeat.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbit - heartbeat.dartCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/heartbit/i_heartbeat.dart';
-       5              : 
-       6              : class HeartBeat implements IHeartBeat {
-       7              :   Timer? _heartbeatTimer;
-       8              : 
-       9              :   @override
-      10              :   int interval;
-      11              : 
-      12           10 :   HeartBeat({this.interval = 5});
-      13              : 
-      14            9 :   @override
-      15              :   void init() {
-      16            9 :     if (_heartbeatTimer != null) return;
-      17           18 :     _heartbeatTimer = Timer.periodic(
-      18           18 :       Duration(seconds: interval),
-      19           18 :       (timer) => onPulse.broadcast(),
-      20              :     );
-      21              :   }
-      22              : 
-      23            0 :   @override
-      24              :   void stop() {
-      25            0 :     _heartbeatTimer?.cancel();
-      26            0 :     _heartbeatTimer = null;
-      27              :   }
-      28              : 
-      29              :   @override
-      30              :   final Event<EventArgs> onPulse = Event();
-      31              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/index-sort-f.html b/coverage/html/core/heartbit/index-sort-f.html deleted file mode 100644 index 06aa4960..00000000 --- a/coverage/html/core/heartbit/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
heartbeat.dart -
66.7%66.7%
-
66.7 %96-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/index-sort-l.html b/coverage/html/core/heartbit/index-sort-l.html deleted file mode 100644 index c779ba3d..00000000 --- a/coverage/html/core/heartbit/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
heartbeat.dart -
66.7%66.7%
-
66.7 %96
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/heartbit/index.html b/coverage/html/core/heartbit/index.html deleted file mode 100644 index ff323e89..00000000 --- a/coverage/html/core/heartbit/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/heartbit - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/heartbitCoverageTotalHit
Test:lcov.infoLines:66.7 %96
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
heartbeat.dart -
66.7%66.7%
-
66.7 %96
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/index-sort-f.html b/coverage/html/core/index-sort-f.html deleted file mode 100644 index 3e1b0180..00000000 --- a/coverage/html/core/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - core - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
core.dart -
74.5%74.5%
-
74.5 %5138-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/index-sort-l.html b/coverage/html/core/index-sort-l.html deleted file mode 100644 index 701c0090..00000000 --- a/coverage/html/core/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core.dart -
74.5%74.5%
-
74.5 %5138
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/index.html b/coverage/html/core/index.html deleted file mode 100644 index e34b4ac2..00000000 --- a/coverage/html/core/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - coreCoverageTotalHit
Test:lcov.infoLines:74.5 %5138
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core.dart -
74.5%74.5%
-
74.5 %5138
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/expirer.dart.func-c.html b/coverage/html/core/pairing/expirer.dart.func-c.html deleted file mode 100644 index e3e71c0e..00000000 --- a/coverage/html/core/pairing/expirer.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/expirer.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - expirer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/expirer.dart.func.html b/coverage/html/core/pairing/expirer.dart.func.html deleted file mode 100644 index da3aad6f..00000000 --- a/coverage/html/core/pairing/expirer.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/expirer.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - expirer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/expirer.dart.gcov.html b/coverage/html/core/pairing/expirer.dart.gcov.html deleted file mode 100644 index fee3ae31..00000000 --- a/coverage/html/core/pairing/expirer.dart.gcov.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/expirer.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - expirer.dartCoverageTotalHit
Test:lcov.infoLines:76.5 %1713
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_expirer.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
-       6              : 
-       7              : class Expirer extends GenericStore<int> implements IExpirer {
-       8              :   @override
-       9              :   final Event<ExpirationEvent> onExpire = Event();
-      10              : 
-      11           10 :   Expirer({
-      12              :     required super.storage,
-      13              :     required super.context,
-      14              :     required super.version,
-      15              :     required super.fromJson,
-      16              :   });
-      17              : 
-      18            0 :   @override
-      19              :   Future<bool> checkExpiry(String key, int expiry) async {
-      20            0 :     checkInitialized();
-      21              : 
-      22            0 :     if (WalletConnectUtils.isExpired(expiry)) {
-      23            0 :       await expire(key);
-      24              :       return true;
-      25              :     }
-      26              :     return false;
-      27              :   }
-      28              : 
-      29              :   /// Checks if the key has expired and deletes it if it has
-      30              :   /// Returns true if the key was deleted
-      31              :   /// Returns false if the key was not deleted
-      32            6 :   @override
-      33              :   Future<bool> checkAndExpire(String key) async {
-      34            6 :     checkInitialized();
-      35              : 
-      36           12 :     if (data.containsKey(key)) {
-      37           12 :       int expiration = data[key]!;
-      38            6 :       if (WalletConnectUtils.isExpired(expiration)) {
-      39            4 :         await expire(key);
-      40              :         return true;
-      41              :       }
-      42              :     }
-      43              : 
-      44              :     return false;
-      45              :   }
-      46              : 
-      47            4 :   @override
-      48              :   Future<void> expire(String key) async {
-      49            4 :     checkInitialized();
-      50              : 
-      51            8 :     int? expiry = data.remove(key);
-      52              :     if (expiry == null) {
-      53              :       return;
-      54              :     }
-      55              :     // print('Expiring $key');
-      56            8 :     onExpire.broadcast(
-      57            4 :       ExpirationEvent(
-      58              :         target: key,
-      59              :         expiry: expiry,
-      60              :       ),
-      61              :     );
-      62            4 :     await persist();
-      63              :   }
-      64              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/index-sort-f.html b/coverage/html/core/pairing/index-sort-f.html deleted file mode 100644 index 9521c990..00000000 --- a/coverage/html/core/pairing/index-sort-f.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
expirer.dart -
76.5%76.5%
-
76.5 %1713-
json_rpc_history.dart -
91.7%91.7%
-
91.7 %1211-
pairing.dart -
89.5%89.5%
-
89.5 %266238-
pairing_store.dart -
100.0%
-
100.0 %88-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/index-sort-l.html b/coverage/html/core/pairing/index-sort-l.html deleted file mode 100644 index c66716f2..00000000 --- a/coverage/html/core/pairing/index-sort-l.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
expirer.dart -
76.5%76.5%
-
76.5 %1713
pairing.dart -
89.5%89.5%
-
89.5 %266238
json_rpc_history.dart -
91.7%91.7%
-
91.7 %1211
pairing_store.dart -
100.0%
-
100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/index.html b/coverage/html/core/pairing/index.html deleted file mode 100644 index f7995060..00000000 --- a/coverage/html/core/pairing/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairingCoverageTotalHit
Test:lcov.infoLines:89.1 %303270
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
expirer.dart -
76.5%76.5%
-
76.5 %1713
json_rpc_history.dart -
91.7%91.7%
-
91.7 %1211
pairing.dart -
89.5%89.5%
-
89.5 %266238
pairing_store.dart -
100.0%
-
100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/json_rpc_history.dart.func-c.html b/coverage/html/core/pairing/json_rpc_history.dart.func-c.html deleted file mode 100644 index d500c7e4..00000000 --- a/coverage/html/core/pairing/json_rpc_history.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/json_rpc_history.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - json_rpc_history.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/json_rpc_history.dart.func.html b/coverage/html/core/pairing/json_rpc_history.dart.func.html deleted file mode 100644 index ee21ab03..00000000 --- a/coverage/html/core/pairing/json_rpc_history.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/json_rpc_history.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - json_rpc_history.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/json_rpc_history.dart.gcov.html b/coverage/html/core/pairing/json_rpc_history.dart.gcov.html deleted file mode 100644 index 8e215e39..00000000 --- a/coverage/html/core/pairing/json_rpc_history.dart.gcov.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/json_rpc_history.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - json_rpc_history.dartCoverageTotalHit
Test:lcov.infoLines:91.7 %1211
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_json_rpc_history.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       4              : 
-       5              : class JsonRpcHistory extends GenericStore<JsonRpcRecord>
-       6              :     implements IJsonRpcHistory {
-       7           11 :   JsonRpcHistory({
-       8              :     required super.storage,
-       9              :     required super.context,
-      10              :     required super.version,
-      11              :     required super.fromJson,
-      12              :   });
-      13              : 
-      14            1 :   @override
-      15              :   Future<void> resolve(Map<String, dynamic> response) async {
-      16            1 :     checkInitialized();
-      17              : 
-      18              :     // If we don't have a matching id, stop
-      19            2 :     String sId = response['id'].toString();
-      20            2 :     if (!data.containsKey(sId)) {
-      21              :       return;
-      22              :     }
-      23              : 
-      24            1 :     JsonRpcRecord record = get(sId)!;
-      25              : 
-      26              :     // If we already recorded a response, stop
-      27            1 :     if (record.response != null) {
-      28              :       return;
-      29              :     }
-      30              : 
-      31            2 :     record = record.copyWith(
-      32            1 :       response: response.containsKey('result')
-      33            1 :           ? response['result']
-      34            0 :           : response['error'],
-      35              :     );
-      36            1 :     await set(sId, record);
-      37              :   }
-      38              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing.dart.func-c.html b/coverage/html/core/pairing/pairing.dart.func-c.html deleted file mode 100644 index e55a9469..00000000 --- a/coverage/html/core/pairing/pairing.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing.dart.func.html b/coverage/html/core/pairing/pairing.dart.func.html deleted file mode 100644 index 9e103990..00000000 --- a/coverage/html/core/pairing/pairing.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing.dart.gcov.html b/coverage/html/core/pairing/pairing.dart.gcov.html deleted file mode 100644 index 3c04729e..00000000 --- a/coverage/html/core/pairing/pairing.dart.gcov.html +++ /dev/null @@ -1,909 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing.dartCoverageTotalHit
Test:lcov.infoLines:89.5 %266238
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : import 'dart:convert';
-       3              : 
-       4              : import 'package:event/event.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_json_rpc_history.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing_store.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/models/uri_parse_result.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-      16              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
-      17              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_response.dart';
-      18              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-      19              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      20              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-      21              : import 'package:walletconnect_flutter_v2/apis/utils/method_constants.dart';
-      22              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
-      23              : 
-      24              : class PendingRequestResponse {
-      25              :   Completer completer;
-      26              :   dynamic response;
-      27              :   JsonRpcError? error;
-      28              : 
-      29            6 :   PendingRequestResponse({
-      30              :     required this.completer,
-      31              :     this.response,
-      32              :     this.error,
-      33              :   });
-      34              : }
-      35              : 
-      36              : class Pairing implements IPairing {
-      37              :   bool _initialized = false;
-      38              : 
-      39              :   @override
-      40              :   final Event<PairingEvent> onPairingCreate = Event<PairingEvent>();
-      41              :   @override
-      42              :   final Event<PairingActivateEvent> onPairingActivate =
-      43              :       Event<PairingActivateEvent>();
-      44              :   @override
-      45              :   final Event<PairingEvent> onPairingPing = Event<PairingEvent>();
-      46              :   @override
-      47              :   final Event<PairingInvalidEvent> onPairingInvalid =
-      48              :       Event<PairingInvalidEvent>();
-      49              :   @override
-      50              :   final Event<PairingEvent> onPairingDelete = Event<PairingEvent>();
-      51              :   @override
-      52              :   final Event<PairingEvent> onPairingExpire = Event<PairingEvent>();
-      53              : 
-      54              :   /// Stores all the pending requests
-      55              :   Map<int, PendingRequestResponse> pendingRequests = {};
-      56              : 
-      57              :   final ICore core;
-      58              :   final IPairingStore pairings;
-      59              :   final IJsonRpcHistory history;
-      60              : 
-      61              :   /// Stores the public key of Type 1 Envelopes for a topic
-      62              :   /// Once a receiver public key has been used, it is removed from the store
-      63              :   /// Thus, this store works under the assumption that a public key will only be used once
-      64              :   final IGenericStore<ReceiverPublicKey> topicToReceiverPublicKey;
-      65              : 
-      66           10 :   Pairing({
-      67              :     required this.core,
-      68              :     required this.pairings,
-      69              :     required this.history,
-      70              :     required this.topicToReceiverPublicKey,
-      71              :   });
-      72              : 
-      73            9 :   @override
-      74              :   Future<void> init() async {
-      75            9 :     if (_initialized) {
-      76              :       return;
-      77              :     }
-      78              : 
-      79            9 :     _registerRelayEvents();
-      80            9 :     _registerExpirerEvents();
-      81            9 :     _registerheartbeatSubscription();
-      82              : 
-      83           27 :     await core.expirer.init();
-      84           18 :     await pairings.init();
-      85           18 :     await history.init();
-      86           18 :     await topicToReceiverPublicKey.init();
-      87              : 
-      88            9 :     await _cleanup();
-      89              : 
-      90            9 :     await _resubscribeAll();
-      91              : 
-      92            9 :     _initialized = true;
-      93              :   }
-      94              : 
-      95            6 :   @override
-      96              :   Future<void> checkAndExpire() async {
-      97           12 :     for (var pairing in getPairings()) {
-      98           24 :       await core.expirer.checkAndExpire(pairing.topic);
-      99              :     }
-     100              :   }
-     101              : 
-     102            7 :   @override
-     103              :   Future<CreateResponse> create({List<List<String>>? methods}) async {
-     104            7 :     _checkInitialized();
-     105           28 :     final String symKey = core.crypto.getUtils().generateRandomBytes32();
-     106           21 :     final String topic = await core.crypto.setSymKey(symKey);
-     107            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
-     108              :       WalletConnectConstants.FIVE_MINUTES,
-     109              :     );
-     110            7 :     final Relay relay = Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL);
-     111            7 :     final PairingInfo pairing = PairingInfo(
-     112              :       topic: topic,
-     113              :       expiry: expiry,
-     114              :       relay: relay,
-     115              :       active: false,
-     116           20 :       methods: methods?.expand((e) => e).toList() ?? [],
-     117              :     );
-     118            7 :     final Uri uri = WalletConnectUtils.formatUri(
-     119           14 :       protocol: core.protocol,
-     120           14 :       version: core.version,
-     121              :       topic: topic,
-     122              :       symKey: symKey,
-     123              :       relay: relay,
-     124              :       methods: methods,
-     125              :       expiry: expiry,
-     126              :     );
-     127              : 
-     128           14 :     onPairingCreate.broadcast(
-     129            7 :       PairingEvent(
-     130              :         topic: topic,
-     131              :       ),
-     132              :     );
-     133              : 
-     134           14 :     await pairings.set(topic, pairing);
-     135           21 :     await core.relayClient.subscribe(topic: topic);
-     136           21 :     await core.expirer.set(topic, expiry);
-     137              : 
-     138            7 :     return CreateResponse(
-     139              :       topic: topic,
-     140              :       uri: uri,
-     141              :       pairingInfo: pairing,
-     142              :     );
-     143              :   }
-     144              : 
-     145            7 :   @override
-     146              :   Future<PairingInfo> pair({
-     147              :     required Uri uri,
-     148              :     bool activatePairing = false,
-     149              :   }) async {
-     150            7 :     _checkInitialized();
-     151              : 
-     152              :     // print(uri.queryParameters);
-     153            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
-     154              :       WalletConnectConstants.FIVE_MINUTES,
-     155              :     );
-     156            7 :     final URIParseResult parsedUri = WalletConnectUtils.parseUri(uri);
-     157           14 :     if (parsedUri.version != URIVersion.v2) {
-     158            3 :       throw Errors.getInternalError(
-     159              :         Errors.MISSING_OR_INVALID,
-     160              :         context: 'URI is not WalletConnect version 2 URI',
-     161              :       );
-     162              :     }
-     163              : 
-     164            7 :     final String topic = parsedUri.topic;
-     165           14 :     final Relay relay = parsedUri.v2Data!.relay;
-     166           14 :     final String symKey = parsedUri.v2Data!.symKey;
-     167            7 :     final PairingInfo pairing = PairingInfo(
-     168              :       topic: topic,
-     169              :       expiry: expiry,
-     170              :       relay: relay,
-     171              :       active: false,
-     172           14 :       methods: parsedUri.v2Data!.methods,
-     173              :     );
-     174              : 
-     175              :     try {
-     176            7 :       JsonRpcUtils.validateMethods(
-     177           14 :         parsedUri.v2Data!.methods,
-     178           21 :         routerMapRequest.values.toList(),
-     179              :       );
-     180            4 :     } on WalletConnectError catch (e) {
-     181              :       // Tell people that the pairing is invalid
-     182            8 :       onPairingInvalid.broadcast(
-     183            4 :         PairingInvalidEvent(
-     184            4 :           message: e.message,
-     185              :         ),
-     186              :       );
-     187              : 
-     188              :       // Delete the pairing: "publish internally with reason"
-     189              :       // await _deletePairing(
-     190              :       //   topic,
-     191              :       //   false,
-     192              :       // );
-     193              : 
-     194              :       rethrow;
-     195              :     }
-     196              : 
-     197              :     try {
-     198           14 :       await pairings.set(topic, pairing);
-     199           21 :       await core.crypto.setSymKey(symKey, overrideTopic: topic);
-     200           28 :       await core.relayClient.subscribe(topic: topic).timeout(
-     201              :             const Duration(seconds: 15),
-     202              :           );
-     203           21 :       await core.expirer.set(topic, expiry);
-     204              : 
-     205           14 :       onPairingCreate.broadcast(
-     206            7 :         PairingEvent(
-     207              :           topic: topic,
-     208              :         ),
-     209              :       );
-     210              : 
-     211              :       if (activatePairing) {
-     212            2 :         await activate(topic: topic);
-     213              :       }
-     214              :     } catch (e) {
-     215              :       rethrow;
-     216              :     }
-     217              : 
-     218              :     return pairing;
-     219              :   }
-     220              : 
-     221            7 :   @override
-     222              :   Future<void> activate({required String topic}) async {
-     223            7 :     _checkInitialized();
-     224            7 :     final int expiry = WalletConnectUtils.calculateExpiry(
-     225              :       WalletConnectConstants.THIRTY_DAYS,
-     226              :     );
-     227              :     // print('Activating pairing with topic: $topic');
-     228              : 
-     229           14 :     onPairingActivate.broadcast(
-     230            7 :       PairingActivateEvent(
-     231              :         topic: topic,
-     232              :         expiry: expiry,
-     233              :       ),
-     234              :     );
-     235              : 
-     236           14 :     await pairings.update(
-     237              :       topic,
-     238              :       expiry: expiry,
-     239              :       active: true,
-     240              :     );
-     241           21 :     await core.expirer.set(topic, expiry);
-     242              :   }
-     243              : 
-     244            9 :   @override
-     245              :   void register({
-     246              :     required String method,
-     247              :     required Function(String, JsonRpcRequest) function,
-     248              :     required ProtocolType type,
-     249              :   }) {
-     250           18 :     if (routerMapRequest.containsKey(method)) {
-     251            6 :       final registered = routerMapRequest[method];
-     252            6 :       if (registered!.type == type) {
-     253              :         throw const WalletConnectError(
-     254              :           code: -1,
-     255              :           message: 'Method already exists',
-     256              :         );
-     257              :       }
-     258              :     }
-     259              : 
-     260           27 :     routerMapRequest[method] = RegisteredFunction(
-     261              :       method: method,
-     262              :       function: function,
-     263              :       type: type,
-     264              :     );
-     265              :   }
-     266              : 
-     267            2 :   @override
-     268              :   Future<void> setReceiverPublicKey({
-     269              :     required String topic,
-     270              :     required String publicKey,
-     271              :     int? expiry,
-     272              :   }) async {
-     273            2 :     _checkInitialized();
-     274            4 :     await topicToReceiverPublicKey.set(
-     275              :       topic,
-     276            2 :       ReceiverPublicKey(
-     277              :         topic: topic,
-     278              :         publicKey: publicKey,
-     279            2 :         expiry: WalletConnectUtils.calculateExpiry(
-     280              :           expiry ?? WalletConnectConstants.FIVE_MINUTES,
-     281              :         ),
-     282              :       ),
-     283              :     );
-     284              :   }
-     285              : 
-     286            1 :   @override
-     287              :   Future<void> updateExpiry({
-     288              :     required String topic,
-     289              :     required int expiry,
-     290              :   }) async {
-     291            1 :     _checkInitialized();
-     292              : 
-     293              :     // Validate the expiry is less than 30 days
-     294            1 :     if (expiry >
-     295            1 :         WalletConnectUtils.calculateExpiry(
-     296              :           WalletConnectConstants.THIRTY_DAYS,
-     297              :         )) {
-     298              :       throw const WalletConnectError(
-     299              :         code: -1,
-     300              :         message: 'Expiry cannot be more than 30 days away',
-     301              :       );
-     302              :     }
-     303              : 
-     304            2 :     await pairings.update(
-     305              :       topic,
-     306              :       expiry: expiry,
-     307              :     );
-     308            3 :     await core.expirer.set(
-     309              :       topic,
-     310              :       expiry,
-     311              :     );
-     312              :   }
-     313              : 
-     314            5 :   @override
-     315              :   Future<void> updateMetadata({
-     316              :     required String topic,
-     317              :     required PairingMetadata metadata,
-     318              :   }) async {
-     319            5 :     _checkInitialized();
-     320           10 :     await pairings.update(
-     321              :       topic,
-     322              :       metadata: metadata,
-     323              :     );
-     324              :   }
-     325              : 
-     326            9 :   @override
-     327              :   List<PairingInfo> getPairings() {
-     328           18 :     return pairings.getAll();
-     329              :   }
-     330              : 
-     331            4 :   @override
-     332              :   PairingInfo? getPairing({required String topic}) {
-     333            8 :     return pairings.get(topic);
-     334              :   }
-     335              : 
-     336            5 :   @override
-     337              :   Future<void> ping({required String topic}) async {
-     338            5 :     _checkInitialized();
-     339              : 
-     340            5 :     await _isValidPing(topic);
-     341              : 
-     342           10 :     if (pairings.has(topic)) {
-     343              :       // try {
-     344            5 :       final bool _ = await sendRequest(
-     345              :         topic,
-     346              :         MethodConstants.WC_PAIRING_PING,
-     347            5 :         {},
-     348              :       );
-     349              :     }
-     350              :   }
-     351              : 
-     352            4 :   @override
-     353              :   Future<void> disconnect({required String topic}) async {
-     354            4 :     _checkInitialized();
-     355              : 
-     356            4 :     await _isValidDisconnect(topic);
-     357            8 :     if (pairings.has(topic)) {
-     358              :       // Send the request to delete the pairing, we don't care if it fails
-     359              :       try {
-     360            4 :         sendRequest(
-     361              :           topic,
-     362              :           MethodConstants.WC_PAIRING_DELETE,
-     363            8 :           Errors.getSdkError(Errors.USER_DISCONNECTED).toJson(),
-     364              :         );
-     365              :       } catch (_) {}
-     366              : 
-     367              :       // Delete the pairing
-     368            8 :       await pairings.delete(topic);
-     369              : 
-     370            8 :       onPairingDelete.broadcast(
-     371            4 :         PairingEvent(
-     372              :           topic: topic,
-     373              :         ),
-     374              :       );
-     375              :     }
-     376              :   }
-     377              : 
-     378            5 :   @override
-     379              :   IPairingStore getStore() {
-     380            5 :     return pairings;
-     381              :   }
-     382              : 
-     383            6 :   @override
-     384              :   Future<void> isValidPairingTopic({required String topic}) async {
-     385           12 :     if (!pairings.has(topic)) {
-     386            4 :       throw Errors.getInternalError(
-     387              :         Errors.NO_MATCHING_KEY,
-     388            4 :         context: "pairing topic doesn't exist: $topic",
-     389              :       );
-     390              :     }
-     391              : 
-     392           18 :     if (await core.expirer.checkAndExpire(topic)) {
-     393            0 :       throw Errors.getInternalError(
-     394              :         Errors.EXPIRED,
-     395            0 :         context: 'pairing topic: $topic',
-     396              :       );
-     397              :     }
-     398              :   }
-     399              : 
-     400              :   // RELAY COMMUNICATION HELPERS
-     401              : 
-     402            6 :   @override
-     403              :   Future sendRequest(
-     404              :     String topic,
-     405              :     String method,
-     406              :     dynamic params, {
-     407              :     int? id,
-     408              :     int? ttl,
-     409              :     EncodeOptions? encodeOptions,
-     410              :   }) async {
-     411           18 :     core.logger.t(
-     412            6 :       'pairing sendRequest, id: $id topic: $topic, method: $method, params: $params, ttl: $ttl',
-     413              :     );
-     414              : 
-     415            6 :     final payload = JsonRpcUtils.formatJsonRpcRequest(
-     416              :       method,
-     417              :       params,
-     418              :       id: id,
-     419              :     );
-     420              :     // print('sending request: $payload');
-     421              : 
-     422           18 :     final message = await core.crypto.encode(
-     423              :       topic,
-     424              :       payload,
-     425              :       options: encodeOptions,
-     426              :     );
-     427              : 
-     428              :     if (message == null) {
-     429              :       return;
-     430              :     }
-     431              : 
-     432           12 :     RpcOptions opts = MethodConstants.RPC_OPTS[method]!['req']!;
-     433              :     if (ttl != null) {
-     434            4 :       opts = opts.copyWith(ttl: ttl);
-     435              :     }
-     436              : 
-     437              :     // print('adding payload to pending requests: ${payload['id']}');
-     438           12 :     final resp = PendingRequestResponse(completer: Completer());
-     439           21 :     resp.completer.future.catchError((err) {
-     440              :       // Catch the error so that it won't throw an uncaught error
-     441              :     });
-     442           18 :     pendingRequests[payload['id']] = resp;
-     443              :     // print('sent request');
-     444           18 :     await core.relayClient.publish(
-     445              :       topic: topic,
-     446              :       message: message,
-     447            6 :       ttl: opts.ttl,
-     448            6 :       tag: opts.tag,
-     449              :     );
-     450              : 
-     451              :     // Get the result from the completer, if it's an error, throw it
-     452              :     try {
-     453            6 :       if (resp.error != null) {
-     454            0 :         throw resp.error!;
-     455              :       }
-     456              : 
-     457              :       // print('checking if completed');
-     458           12 :       if (resp.completer.isCompleted) {
-     459            0 :         return resp.response;
-     460              :       }
-     461              : 
-     462           12 :       return await resp.completer.future;
-     463              :     } catch (e) {
-     464              :       rethrow;
-     465              :     }
-     466              :   }
-     467              : 
-     468            6 :   @override
-     469              :   Future<void> sendResult(
-     470              :     int id,
-     471              :     String topic,
-     472              :     String method,
-     473              :     dynamic result, {
-     474              :     EncodeOptions? encodeOptions,
-     475              :   }) async {
-     476           18 :     core.logger.t(
-     477            6 :       'pairing sendResult, id: $id topic: $topic, method: $method, result: $result',
-     478              :     );
-     479              :     final Map<String, dynamic> payload =
-     480            6 :         JsonRpcUtils.formatJsonRpcResponse<dynamic>(
-     481              :       id,
-     482              :       result,
-     483              :     );
-     484           18 :     final String? message = await core.crypto.encode(
-     485              :       topic,
-     486              :       payload,
-     487              :       options: encodeOptions,
-     488              :     );
-     489              : 
-     490              :     if (message == null) {
-     491              :       return;
-     492              :     }
-     493              : 
-     494           12 :     final RpcOptions opts = MethodConstants.RPC_OPTS[method]!['res']!;
-     495           18 :     await core.relayClient.publish(
-     496              :       topic: topic,
-     497              :       message: message,
-     498            6 :       ttl: opts.ttl,
-     499            6 :       tag: opts.tag,
-     500              :     );
-     501              :   }
-     502              : 
-     503            3 :   @override
-     504              :   Future<void> sendError(
-     505              :     int id,
-     506              :     String topic,
-     507              :     String method,
-     508              :     JsonRpcError error, {
-     509              :     EncodeOptions? encodeOptions,
-     510              :     RpcOptions? rpcOptions,
-     511              :   }) async {
-     512            9 :     core.logger.t(
-     513            3 :       'pairing sendError, id: $id topic: $topic, method: $method, error: $error',
-     514              :     );
-     515              : 
-     516            3 :     final Map<String, dynamic> payload = JsonRpcUtils.formatJsonRpcError(
-     517              :       id,
-     518              :       error,
-     519              :     );
-     520            9 :     final String? message = await core.crypto.encode(
-     521              :       topic,
-     522              :       payload,
-     523              :       options: encodeOptions,
-     524              :     );
-     525              : 
-     526              :     if (message == null) {
-     527              :       return;
-     528              :     }
-     529              : 
-     530              :     final fallbackMethod = MethodConstants.UNREGISTERED_METHOD;
-     531            3 :     final fallbackRpcOpts = MethodConstants.RPC_OPTS[method] ??
-     532            0 :         MethodConstants.RPC_OPTS[fallbackMethod]!;
-     533            6 :     final fallbackOpts = fallbackRpcOpts['reject'] ?? fallbackRpcOpts['res']!;
-     534              : 
-     535              :     final RpcOptions opts = rpcOptions ?? fallbackOpts;
-     536              : 
-     537            9 :     await core.relayClient.publish(
-     538              :       topic: topic,
-     539              :       message: message,
-     540            3 :       ttl: opts.ttl,
-     541            3 :       tag: opts.tag,
-     542              :     );
-     543              :   }
-     544              : 
-     545              :   /// ---- Private Helpers ---- ///
-     546              : 
-     547            9 :   Future<void> _resubscribeAll() async {
-     548              :     // If the relay is not active, stop here
-     549           27 :     if (!core.relayClient.isConnected) {
-     550              :       return;
-     551              :     }
-     552              : 
-     553              :     // Resubscribe to all active pairings
-     554           16 :     final List<PairingInfo> activePairings = pairings.getAll();
-     555            8 :     for (final PairingInfo pairing in activePairings) {
-     556            0 :       if (pairing.active) {
-     557              :         // print('Resubscribing to topic: ${pairing.topic}');
-     558            0 :         await core.relayClient.subscribe(topic: pairing.topic);
-     559              :       }
-     560              :     }
-     561              :   }
-     562              : 
-     563            2 :   Future<void> _deletePairing(String topic, bool expirerHasDeleted) async {
-     564            6 :     await core.relayClient.unsubscribe(topic: topic);
-     565            4 :     await pairings.delete(topic);
-     566            6 :     await core.crypto.deleteSymKey(topic);
-     567              :     if (expirerHasDeleted) {
-     568            6 :       await core.expirer.delete(topic);
-     569              :     }
-     570              :   }
-     571              : 
-     572            9 :   Future<void> _cleanup() async {
-     573            9 :     final List<PairingInfo> expiredPairings = getPairings()
-     574            9 :         .where(
-     575            3 :           (PairingInfo info) => WalletConnectUtils.isExpired(info.expiry),
-     576              :         )
-     577            9 :         .toList();
-     578           10 :     for (final PairingInfo pairing in expiredPairings) {
-     579              :       // print('deleting expired pairing: ${pairing.topic}');
-     580            2 :       await _deletePairing(pairing.topic, true);
-     581              :     }
-     582              : 
-     583              :     // Cleanup all history records
-     584            9 :     final List<JsonRpcRecord> expiredHistory = history
-     585            9 :         .getAll()
-     586            9 :         .where(
-     587            4 :           (record) => WalletConnectUtils.isExpired(record.expiry ?? -1),
-     588              :         )
-     589            9 :         .toList();
-     590              :     // Loop through the expired records and delete them
-     591           10 :     for (final JsonRpcRecord record in expiredHistory) {
-     592              :       // print('deleting expired history record: ${record.id}');
-     593            4 :       await history.delete(record.id.toString());
-     594              :     }
-     595              : 
-     596              :     // Cleanup all of the expired receiver public keys
-     597              :     final List<ReceiverPublicKey> expiredReceiverPublicKeys =
-     598            9 :         topicToReceiverPublicKey
-     599            9 :             .getAll()
-     600           12 :             .where((receiver) => WalletConnectUtils.isExpired(receiver.expiry))
-     601            9 :             .toList();
-     602              :     // Loop through the expired receiver public keys and delete them
-     603           10 :     for (final ReceiverPublicKey receiver in expiredReceiverPublicKeys) {
-     604              :       // print('deleting expired receiver public key: $receiver');
-     605            3 :       await topicToReceiverPublicKey.delete(receiver.topic);
-     606              :     }
-     607              :   }
-     608              : 
-     609            7 :   void _checkInitialized() {
-     610            7 :     if (!_initialized) {
-     611            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     612              :     }
-     613              :   }
-     614              : 
-     615              :   /// ---- Relay Event Router ---- ///
-     616              : 
-     617              :   Map<String, RegisteredFunction> routerMapRequest = {};
-     618              : 
-     619            9 :   void _registerRelayEvents() {
-     620           45 :     core.relayClient.onRelayClientConnect.subscribe(_onRelayConnect);
-     621           45 :     core.relayClient.onRelayClientMessage.subscribe(_onMessageEvent);
-     622              : 
-     623            9 :     register(
-     624              :       method: MethodConstants.WC_PAIRING_PING,
-     625            9 :       function: _onPairingPingRequest,
-     626              :       type: ProtocolType.pair,
-     627              :     );
-     628            9 :     register(
-     629              :       method: MethodConstants.WC_PAIRING_DELETE,
-     630            9 :       function: _onPairingDeleteRequest,
-     631              :       type: ProtocolType.pair,
-     632              :     );
-     633              :   }
-     634              : 
-     635            0 :   Future<void> _onRelayConnect(EventArgs? args) async {
-     636              :     // print('Pairing: Relay connected');
-     637            0 :     await _resubscribeAll();
-     638              :   }
-     639              : 
-     640            6 :   void _onMessageEvent(MessageEvent? event) async {
-     641              :     if (event == null) {
-     642              :       return;
-     643              :     }
-     644              : 
-     645              :     // If we have a reciever public key for the topic, use it
-     646              :     ReceiverPublicKey? receiverPublicKey =
-     647           18 :         topicToReceiverPublicKey.get(event.topic);
-     648              :     // If there was a public key, delete it. One use.
-     649              :     if (receiverPublicKey != null) {
-     650            6 :       await topicToReceiverPublicKey.delete(event.topic);
-     651              :     }
-     652              : 
-     653              :     // Decode the message
-     654           18 :     String? payloadString = await core.crypto.decode(
-     655            6 :       event.topic,
-     656            6 :       event.message,
-     657            6 :       options: DecodeOptions(
-     658            2 :         receiverPublicKey: receiverPublicKey?.publicKey,
-     659              :       ),
-     660              :     );
-     661              : 
-     662              :     if (payloadString == null) {
-     663              :       return;
-     664              :     }
-     665              :     // print(payloadString);
-     666              : 
-     667            6 :     Map<String, dynamic> data = jsonDecode(payloadString);
-     668           24 :     core.logger.i('Pairing _onMessageEvent, Received data: $data');
-     669              : 
-     670              :     // If it's an rpc request, handle it
-     671              :     // print('Pairing: Received data: $data');
-     672            6 :     if (data.containsKey('method')) {
-     673            6 :       final request = JsonRpcRequest.fromJson(data);
-     674           18 :       if (routerMapRequest.containsKey(request.method)) {
-     675           36 :         routerMapRequest[request.method]!.function(event.topic, request);
-     676              :       } else {
-     677            0 :         _onUnkownRpcMethodRequest(event.topic, request);
-     678              :       }
-     679              :     }
-     680              :     // Otherwise handle it as a response
-     681              :     else {
-     682            6 :       final response = JsonRpcResponse.fromJson(data);
-     683              : 
-     684              :       // Only handle the response if we have a record of the request
-     685              :       // final JsonRpcRecord? record = history.get(response.id.toString());
-     686              :       // // print(record);
-     687              :       // if (record == null) {
-     688              :       //   return;
-     689              :       // }
-     690              : 
-     691              :       // print(
-     692              :       //   'pendingRequests: ${pendingRequests.keys} has ${response.id} is ${pendingRequests.containsKey(response.id)}',
-     693              :       // );
-     694           18 :       if (pendingRequests.containsKey(response.id)) {
-     695            6 :         if (response.error != null) {
-     696           15 :           pendingRequests[response.id]!.error = response.error;
-     697            9 :           pendingRequests[response.id]!
-     698            3 :               .completer
-     699            6 :               .completeError(response.error!);
-     700              :         } else {
-     701              :           // print(
-     702              :           //   'completing: ${response.result}',
-     703              :           // );
-     704           30 :           pendingRequests[response.id]!.response = response.result;
-     705           36 :           pendingRequests[response.id]!.completer.complete(response.result);
-     706              :         }
-     707              :       }
-     708              :     }
-     709              :   }
-     710              : 
-     711            5 :   Future<void> _onPairingPingRequest(
-     712              :     String topic,
-     713              :     JsonRpcRequest request,
-     714              :   ) async {
-     715            5 :     final int id = request.id;
-     716              :     try {
-     717              :       // print('ping req');
-     718            5 :       await _isValidPing(topic);
-     719            5 :       await sendResult(
-     720              :         id,
-     721              :         topic,
-     722            5 :         request.method,
-     723              :         true,
-     724              :       );
-     725           10 :       onPairingPing.broadcast(
-     726            5 :         PairingEvent(
-     727              :           id: id,
-     728              :           topic: topic,
-     729              :         ),
-     730              :       );
-     731            0 :     } on JsonRpcError catch (e) {
-     732              :       // print(e);
-     733            0 :       await sendError(
-     734              :         id,
-     735              :         topic,
-     736            0 :         request.method,
-     737              :         e,
-     738              :       );
-     739              :     }
-     740              :   }
-     741              : 
-     742            4 :   Future<void> _onPairingDeleteRequest(
-     743              :     String topic,
-     744              :     JsonRpcRequest request,
-     745              :   ) async {
-     746              :     // print('delete');
-     747            4 :     final int id = request.id;
-     748              :     try {
-     749            4 :       await _isValidDisconnect(topic);
-     750            4 :       await sendResult(
-     751              :         id,
-     752              :         topic,
-     753            4 :         request.method,
-     754              :         true,
-     755              :       );
-     756            8 :       await pairings.delete(topic);
-     757            8 :       onPairingDelete.broadcast(
-     758            4 :         PairingEvent(
-     759              :           id: id,
-     760              :           topic: topic,
-     761              :         ),
-     762              :       );
-     763            0 :     } on JsonRpcError catch (e) {
-     764            0 :       await sendError(
-     765              :         id,
-     766              :         topic,
-     767            0 :         request.method,
-     768              :         e,
-     769              :       );
-     770              :     }
-     771              :   }
-     772              : 
-     773            0 :   Future<void> _onUnkownRpcMethodRequest(
-     774              :     String topic,
-     775              :     JsonRpcRequest request,
-     776              :   ) async {
-     777            0 :     final int id = request.id;
-     778            0 :     final String method = request.method;
-     779              :     try {
-     780            0 :       if (routerMapRequest.containsKey(method)) {
-     781              :         return;
-     782              :       }
-     783            0 :       final String message = Errors.getSdkError(
-     784              :         Errors.WC_METHOD_UNSUPPORTED,
-     785              :         context: method,
-     786            0 :       ).message;
-     787            0 :       await sendError(
-     788              :         id,
-     789              :         topic,
-     790            0 :         request.method,
-     791            0 :         JsonRpcError.methodNotFound(message),
-     792              :       );
-     793            0 :     } on JsonRpcError catch (e) {
-     794            0 :       await sendError(id, topic, request.method, e);
-     795              :     }
-     796              :   }
-     797              : 
-     798              :   /// ---- Expirer Events ---- ///
-     799              : 
-     800            9 :   void _registerExpirerEvents() {
-     801           45 :     core.expirer.onExpire.subscribe(_onExpired);
-     802              :   }
-     803              : 
-     804            9 :   void _registerheartbeatSubscription() {
-     805           45 :     core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
-     806              :   }
-     807              : 
-     808            4 :   Future<void> _onExpired(ExpirationEvent? event) async {
-     809              :     if (event == null) {
-     810              :       return;
-     811              :     }
-     812              : 
-     813           12 :     if (pairings.has(event.target)) {
-     814              :       // Clean up the pairing
-     815            2 :       await _deletePairing(event.target, true);
-     816            2 :       onPairingExpire.broadcast(
-     817            1 :         PairingEvent(
-     818            1 :           topic: event.target,
-     819              :         ),
-     820              :       );
-     821              :     }
-     822              :   }
-     823              : 
-     824            6 :   void _heartbeatSubscription(EventArgs? args) async {
-     825            6 :     await checkAndExpire();
-     826              :   }
-     827              : 
-     828              :   /// ---- Validators ---- ///
-     829              : 
-     830            5 :   Future<void> _isValidPing(String topic) async {
-     831            5 :     await isValidPairingTopic(topic: topic);
-     832              :   }
-     833              : 
-     834            4 :   Future<void> _isValidDisconnect(String topic) async {
-     835            4 :     await isValidPairingTopic(topic: topic);
-     836              :   }
-     837              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing_store.dart.func-c.html b/coverage/html/core/pairing/pairing_store.dart.func-c.html deleted file mode 100644 index 0a7fb0a9..00000000 --- a/coverage/html/core/pairing/pairing_store.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing_store.dart.func.html b/coverage/html/core/pairing/pairing_store.dart.func.html deleted file mode 100644 index f5c265d0..00000000 --- a/coverage/html/core/pairing/pairing_store.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/pairing_store.dart.gcov.html b/coverage/html/core/pairing/pairing_store.dart.gcov.html deleted file mode 100644 index c71d2c06..00000000 --- a/coverage/html/core/pairing/pairing_store.dart.gcov.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/pairing_store.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing - pairing_store.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %88
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/pairing/i_pairing_store.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       4              : 
-       5              : class PairingStore extends GenericStore<PairingInfo> implements IPairingStore {
-       6           11 :   PairingStore({
-       7              :     required super.storage,
-       8              :     required super.context,
-       9              :     required super.version,
-      10              :     required super.fromJson,
-      11              :   });
-      12              : 
-      13            8 :   @override
-      14              :   Future<void> update(
-      15              :     String topic, {
-      16              :     int? expiry,
-      17              :     bool? active,
-      18              :     PairingMetadata? metadata,
-      19              :   }) async {
-      20            8 :     checkInitialized();
-      21              : 
-      22            8 :     PairingInfo? info = get(topic);
-      23              :     if (info == null) {
-      24              :       return;
-      25              :     }
-      26              : 
-      27              :     if (expiry != null) {
-      28           16 :       info = info.copyWith(expiry: expiry);
-      29              :     }
-      30              :     if (active != null) {
-      31           14 :       info = info.copyWith(active: active);
-      32              :     }
-      33              :     if (metadata != null) {
-      34           10 :       info = info.copyWith(peerMetadata: metadata);
-      35              :     }
-      36              : 
-      37            8 :     await set(topic, info);
-      38              :   }
-      39              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/index-sort-f.html b/coverage/html/core/pairing/utils/index-sort-f.html deleted file mode 100644 index 9dc16bf2..00000000 --- a/coverage/html/core/pairing/utils/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
json_rpc_utils.dart -
100.0%
-
100.0 %2121-
pairing_models.dart -
25.0%25.0%
-
25.0 %328-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/index-sort-l.html b/coverage/html/core/pairing/utils/index-sort-l.html deleted file mode 100644 index d4a6011b..00000000 --- a/coverage/html/core/pairing/utils/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
pairing_models.dart -
25.0%25.0%
-
25.0 %328
json_rpc_utils.dart -
100.0%
-
100.0 %2121
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/index.html b/coverage/html/core/pairing/utils/index.html deleted file mode 100644 index efa9530f..00000000 --- a/coverage/html/core/pairing/utils/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utilsCoverageTotalHit
Test:lcov.infoLines:54.7 %5329
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
json_rpc_utils.dart -
100.0%
-
100.0 %2121
pairing_models.dart -
25.0%25.0%
-
25.0 %328
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html deleted file mode 100644 index 5c1c5d15..00000000 --- a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - json_rpc_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html deleted file mode 100644 index d0099607..00000000 --- a/coverage/html/core/pairing/utils/json_rpc_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - json_rpc_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html b/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html deleted file mode 100644 index 0d1f7173..00000000 --- a/coverage/html/core/pairing/utils/json_rpc_utils.dart.gcov.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/json_rpc_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - json_rpc_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %2121
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:math';
-       2              : 
-       3              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-       6              : 
-       7              : class JsonRpcUtils {
-       8            8 :   static int payloadId({int entropy = 3}) {
-       9            8 :     int addedZeroes = (pow(10, entropy) as int);
-      10           24 :     int date = DateTime.now().millisecondsSinceEpoch * addedZeroes;
-      11           32 :     int extra = (Random().nextDouble() * addedZeroes).floor();
-      12            8 :     return date + extra;
-      13              :   }
-      14              : 
-      15            6 :   static Map<String, dynamic> formatJsonRpcRequest(
-      16              :     String method,
-      17              :     dynamic params, {
-      18              :     int? id,
-      19              :   }) {
-      20            6 :     return {
-      21            6 :       'id': id ??= payloadId(),
-      22              :       'jsonrpc': '2.0',
-      23              :       'method': method,
-      24              :       'params': params,
-      25              :     };
-      26              :   }
-      27              : 
-      28            6 :   static Map<String, dynamic> formatJsonRpcResponse<T>(
-      29              :     int id,
-      30              :     T result,
-      31              :   ) {
-      32            6 :     return {
-      33              :       'id': id,
-      34              :       'jsonrpc': '2.0',
-      35              :       'result': result,
-      36              :     };
-      37              :   }
-      38              : 
-      39            3 :   static Map<String, dynamic> formatJsonRpcError(int id, JsonRpcError error) {
-      40            3 :     return {
-      41              :       'id': id,
-      42              :       'jsonrpc': '2.0',
-      43            3 :       'error': error.toJson(),
-      44              :     };
-      45              :   }
-      46              : 
-      47            7 :   static bool validateMethods(
-      48              :     List<String> methods,
-      49              :     List<RegisteredFunction> registeredMethods,
-      50              :   ) {
-      51            7 :     List<String> unsupportedMethods = [];
-      52              : 
-      53              :     // Loop through the methods, and validate that each one exists in the registered methods
-      54           13 :     for (String method in methods) {
-      55           24 :       if (!registeredMethods.any((element) => element.method == method)) {
-      56              :         // print("Adding method: $method");
-      57            4 :         unsupportedMethods.add(method);
-      58              :       }
-      59              :     }
-      60              : 
-      61              :     // If there are any unsupported methods, throw an error
-      62            7 :     if (unsupportedMethods.isNotEmpty) {
-      63              :       // print(
-      64              :       //     'Unsupported Methods: $unsupportedMethods, Length: ${unsupportedMethods.length}');
-      65            4 :       throw Errors.getSdkError(
-      66              :         Errors.WC_METHOD_UNSUPPORTED,
-      67              :         context:
-      68            8 :             'The following methods are not registered: ${unsupportedMethods.join(', ')}.',
-      69              :       );
-      70              :     }
-      71              : 
-      72              :     return true;
-      73              :   }
-      74              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html b/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html deleted file mode 100644 index 76b6eb7b..00000000 --- a/coverage/html/core/pairing/utils/pairing_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/pairing_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - pairing_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.func.html b/coverage/html/core/pairing/utils/pairing_models.dart.func.html deleted file mode 100644 index ea8f9656..00000000 --- a/coverage/html/core/pairing/utils/pairing_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/pairing_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - pairing_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html b/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html deleted file mode 100644 index 6173aaf2..00000000 --- a/coverage/html/core/pairing/utils/pairing_models.dart.gcov.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - LCOV - lcov.info - core/pairing/utils/pairing_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/pairing/utils - pairing_models.dartCoverageTotalHit
Test:lcov.infoLines:25.0 %328
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:freezed_annotation/freezed_annotation.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_request.dart';
-       6              : 
-       7              : part 'pairing_models.g.dart';
-       8              : part 'pairing_models.freezed.dart';
-       9              : 
-      10              : enum ProtocolType {
-      11              :   pair,
-      12              :   sign,
-      13              :   auth,
-      14              : }
-      15              : 
-      16              : @freezed
-      17              : class PairingInfo with _$PairingInfo {
-      18              :   @JsonSerializable()
-      19              :   const factory PairingInfo({
-      20              :     required String topic,
-      21              :     required int expiry,
-      22              :     required Relay relay,
-      23              :     required bool active,
-      24              :     List<String>? methods,
-      25              :     PairingMetadata? peerMetadata,
-      26              :   }) = _PairingInfo;
-      27              : 
-      28            0 :   factory PairingInfo.fromJson(Map<String, dynamic> json) =>
-      29            0 :       _$PairingInfoFromJson(json);
-      30              : }
-      31              : 
-      32              : @freezed
-      33              : class PairingMetadata with _$PairingMetadata {
-      34              :   @JsonSerializable(includeIfNull: false)
-      35              :   const factory PairingMetadata({
-      36              :     required String name,
-      37              :     required String description,
-      38              :     required String url,
-      39              :     required List<String> icons,
-      40              :     String? verifyUrl,
-      41              :     Redirect? redirect,
-      42              :   }) = _PairingMetadata;
-      43              : 
-      44            0 :   factory PairingMetadata.empty() => const PairingMetadata(
-      45              :         name: '',
-      46              :         description: '',
-      47              :         url: '',
-      48              :         icons: [],
-      49              :       );
-      50              : 
-      51            5 :   factory PairingMetadata.fromJson(Map<String, dynamic> json) =>
-      52            5 :       _$PairingMetadataFromJson(json);
-      53              : }
-      54              : 
-      55              : @freezed
-      56              : class Redirect with _$Redirect {
-      57              :   @JsonSerializable()
-      58              :   const factory Redirect({
-      59              :     String? native,
-      60              :     String? universal,
-      61              :   }) = _Redirect;
-      62              : 
-      63            0 :   factory Redirect.fromJson(Map<String, dynamic> json) =>
-      64            0 :       _$RedirectFromJson(json);
-      65              : }
-      66              : 
-      67              : class CreateResponse {
-      68              :   String topic;
-      69              :   Uri uri;
-      70              :   PairingInfo pairingInfo;
-      71              : 
-      72            7 :   CreateResponse({
-      73              :     required this.topic,
-      74              :     required this.uri,
-      75              :     required this.pairingInfo,
-      76              :   });
-      77              : 
-      78            0 :   @override
-      79              :   String toString() {
-      80            0 :     return 'CreateResponse(topic: $topic, uri: $uri, pairingInfo: ${pairingInfo.toJson()})';
-      81              :   }
-      82              : }
-      83              : 
-      84              : class ExpirationEvent extends EventArgs {
-      85              :   String target;
-      86              :   int expiry;
-      87              : 
-      88            4 :   ExpirationEvent({
-      89              :     required this.target,
-      90              :     required this.expiry,
-      91              :   });
-      92              : 
-      93            0 :   @override
-      94              :   String toString() {
-      95            0 :     return 'ExpirationEvent(target: $target, expiry: $expiry)';
-      96              :   }
-      97              : }
-      98              : 
-      99              : class HistoryEvent extends EventArgs {
-     100              :   JsonRpcRecord record;
-     101              : 
-     102            0 :   HistoryEvent({required this.record});
-     103              : 
-     104            0 :   @override
-     105              :   String toString() {
-     106            0 :     return 'HistoryEvent(record: $record)';
-     107              :   }
-     108              : }
-     109              : 
-     110              : class PairingInvalidEvent extends EventArgs {
-     111              :   String message;
-     112              : 
-     113            4 :   PairingInvalidEvent({
-     114              :     required this.message,
-     115              :   });
-     116              : 
-     117            0 :   @override
-     118              :   String toString() {
-     119            0 :     return 'PairingInvalidEvent(message: $message)';
-     120              :   }
-     121              : }
-     122              : 
-     123              : class PairingEvent extends EventArgs {
-     124              :   int? id;
-     125              :   String? topic;
-     126              :   JsonRpcError? error;
-     127              : 
-     128            7 :   PairingEvent({
-     129              :     this.id,
-     130              :     this.topic,
-     131              :     this.error,
-     132              :   });
-     133              : 
-     134            0 :   @override
-     135              :   String toString() {
-     136            0 :     return 'PairingEvent(id: $id, topic: $topic, error: $error)';
-     137              :   }
-     138              : }
-     139              : 
-     140              : class PairingActivateEvent extends EventArgs {
-     141              :   String topic;
-     142              :   int expiry;
-     143              : 
-     144            7 :   PairingActivateEvent({
-     145              :     required this.topic,
-     146              :     required this.expiry,
-     147              :   });
-     148              : 
-     149            0 :   @override
-     150              :   String toString() {
-     151            0 :     return 'PairingActivateEvent(topic: $topic, expiry: $expiry)';
-     152              :   }
-     153              : }
-     154              : 
-     155              : @freezed
-     156              : class JsonRpcRecord with _$JsonRpcRecord {
-     157              :   @JsonSerializable(includeIfNull: false)
-     158              :   const factory JsonRpcRecord({
-     159              :     required int id,
-     160              :     required String topic,
-     161              :     required String method,
-     162              :     required dynamic params,
-     163              :     String? chainId,
-     164              :     int? expiry,
-     165              :     dynamic response,
-     166              :   }) = _JsonRpcRecord;
-     167              : 
-     168            0 :   factory JsonRpcRecord.fromJson(Map<String, dynamic> json) =>
-     169            0 :       _$JsonRpcRecordFromJson(json);
-     170              : }
-     171              : 
-     172              : @freezed
-     173              : class ReceiverPublicKey with _$ReceiverPublicKey {
-     174              :   @JsonSerializable(includeIfNull: false)
-     175              :   const factory ReceiverPublicKey({
-     176              :     required String topic,
-     177              :     required String publicKey,
-     178              :     required int expiry,
-     179              :   }) = _ReceiverPublicKey;
-     180              : 
-     181            0 :   factory ReceiverPublicKey.fromJson(Map<String, dynamic> json) =>
-     182            0 :       _$ReceiverPublicKeyFromJson(json);
-     183              : }
-     184              : 
-     185              : class RegisteredFunction {
-     186              :   String method;
-     187              :   Function(String, JsonRpcRequest) function;
-     188              :   ProtocolType type;
-     189              : 
-     190            9 :   RegisteredFunction({
-     191              :     required this.method,
-     192              :     required this.function,
-     193              :     required this.type,
-     194              :   });
-     195              : 
-     196            0 :   @override
-     197              :   String toString() {
-     198            0 :     return 'RegisteredFunction(method: $method, function: $function, type: $type)';
-     199              :   }
-     200              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/index-sort-f.html b/coverage/html/core/relay_auth/index-sort-f.html deleted file mode 100644 index afb25eec..00000000 --- a/coverage/html/core/relay_auth/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
relay_auth.dart -
85.6%85.6%
-
85.6 %9077-
relay_auth_models.dart -
90.5%90.5%
-
90.5 %2119-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/index-sort-l.html b/coverage/html/core/relay_auth/index-sort-l.html deleted file mode 100644 index 3b4c0c97..00000000 --- a/coverage/html/core/relay_auth/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
relay_auth.dart -
85.6%85.6%
-
85.6 %9077
relay_auth_models.dart -
90.5%90.5%
-
90.5 %2119
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/index.html b/coverage/html/core/relay_auth/index.html deleted file mode 100644 index f409ad6b..00000000 --- a/coverage/html/core/relay_auth/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_authCoverageTotalHit
Test:lcov.infoLines:86.5 %11196
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
relay_auth.dart -
85.6%85.6%
-
85.6 %9077
relay_auth_models.dart -
90.5%90.5%
-
90.5 %2119
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth.dart.func-c.html b/coverage/html/core/relay_auth/relay_auth.dart.func-c.html deleted file mode 100644 index 8ba3c348..00000000 --- a/coverage/html/core/relay_auth/relay_auth.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth.dart.func.html b/coverage/html/core/relay_auth/relay_auth.dart.func.html deleted file mode 100644 index 99949ba7..00000000 --- a/coverage/html/core/relay_auth/relay_auth.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth.dart.gcov.html b/coverage/html/core/relay_auth/relay_auth.dart.gcov.html deleted file mode 100644 index b75424a9..00000000 --- a/coverage/html/core/relay_auth/relay_auth.dart.gcov.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth.dartCoverageTotalHit
Test:lcov.infoLines:85.6 %9077
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:typed_data';
-       3              : 
-       4              : import 'package:bs58/bs58.dart';
-       5              : import 'package:ed25519_edwards/ed25519_edwards.dart' as ed;
-       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/i_relay_auth.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth_models.dart';
-       8              : 
-       9              : class RelayAuth implements IRelayAuth {
-      10              :   static const String multicodecEd25519Header = 'K36';
-      11              :   static const String multicodecEd25519Base = 'z';
-      12              :   static const int multicodecEd25519Length = 32;
-      13              : 
-      14              :   static const String JWT_DELIMITER = '.';
-      15              : 
-      16              :   static const String DID_DELIMITER = ':';
-      17              :   static const String DID_PREFIX = 'did';
-      18              :   static const String DID_METHOD = 'key';
-      19              : 
-      20            9 :   @override
-      21              :   Future<RelayAuthKeyPair> generateKeyPair([Uint8List? seed]) async {
-      22              :     ed.PrivateKey privateKey;
-      23              :     ed.PublicKey publicKey;
-      24              :     if (seed == null) {
-      25            0 :       final keyPair = ed.generateKey();
-      26            0 :       privateKey = keyPair.privateKey;
-      27            0 :       publicKey = keyPair.publicKey;
-      28              :     } else {
-      29            9 :       privateKey = ed.newKeyFromSeed(seed);
-      30            9 :       publicKey = ed.public(privateKey);
-      31              :     }
-      32              : 
-      33            9 :     return RelayAuthKeyPair(
-      34           18 :       Uint8List.fromList(privateKey.bytes),
-      35           18 :       Uint8List.fromList(publicKey.bytes),
-      36              :     );
-      37              :   }
-      38              : 
-      39           10 :   @override
-      40              :   Future<String> signJWT({
-      41              :     required String sub,
-      42              :     required String aud,
-      43              :     required int ttl,
-      44              :     required RelayAuthKeyPair keyPair,
-      45              :     int? iat,
-      46              :   }) async {
-      47           36 :     iat ??= DateTime.now().millisecondsSinceEpoch ~/ 1000 - 60;
-      48           10 :     final JWTHeader header = JWTHeader();
-      49           20 :     final String iss = encodeIss(keyPair.publicKeyBytes);
-      50           10 :     final int exp = iat + ttl;
-      51           10 :     final JWTPayload payload = JWTPayload(
-      52              :       iss,
-      53              :       sub,
-      54              :       aud,
-      55              :       iat,
-      56              :       exp,
-      57              :     );
-      58           10 :     final Uint8List data = encodeData(
-      59           10 :       JWTData(
-      60              :         header,
-      61              :         payload,
-      62              :       ),
-      63              :     );
-      64           10 :     Uint8List signature = ed.sign(
-      65           20 :       ed.PrivateKey(keyPair.privateKeyBytes),
-      66              :       data,
-      67              :     );
-      68              :     // List<int> signature = keyPair.sign(data);
-      69           20 :     return encodeJWT(JWTSigned(signature, payload));
-      70              :   }
-      71              : 
-      72            1 :   @override
-      73              :   Future<bool> verifyJWT(String jwt) async {
-      74            1 :     JWTDecoded decoded = decodeJWT(jwt);
-      75              : 
-      76              :     // Check the header
-      77            3 :     if (decoded.header.alg != JWTHeader.JWT_ALG ||
-      78            3 :         decoded.header.typ != JWTHeader.JWT_TYP) {
-      79            0 :       throw VerifyJWTError(
-      80              :         jwt,
-      81              :         'JWT must use EdDSA algorithm',
-      82              :       );
-      83              :     }
-      84              : 
-      85            3 :     final Uint8List publicKey = decodeIss(decoded.payload.iss);
-      86            1 :     return ed.verify(
-      87            1 :       ed.PublicKey(publicKey),
-      88            2 :       Uint8List.fromList(decoded.data),
-      89            2 :       Uint8List.fromList(decoded.signature),
-      90              :     );
-      91              :     // final VerifyKey vKey = VerifyKey(publicKey);
-      92              :     // final SignedMessage signedMessage = SignedMessage.fromList(
-      93              :     //   signedMessage: Uint8List.fromList(
-      94              :     //     decoded.signature,
-      95              :     //   ),
-      96              :     // );
-      97              :     // return vKey.verify(
-      98              :     //   signature: signedMessage.signature,
-      99              :     //   message: Uint8List.fromList(decoded.data),
-     100              :     // );
-     101              :   }
-     102              : 
-     103           10 :   String stripEquals(String s) {
-     104           10 :     return s.replaceAll('=', '');
-     105              :   }
-     106              : 
-     107           10 :   @override
-     108              :   String encodeJson(Map<String, dynamic> value) {
-     109           10 :     return stripEquals(
-     110           10 :       base64Url.encode(
-     111           10 :         jsonEncode(
-     112              :           value,
-     113           10 :         ).codeUnits,
-     114              :       ),
-     115              :     );
-     116              :   }
-     117              : 
-     118            1 :   @override
-     119              :   Map<String, dynamic> decodeJson(String s) {
-     120            1 :     return jsonDecode(
-     121            1 :       utf8.decode(
-     122            1 :         base64Url.decode(
-     123            1 :           base64Url.normalize(
-     124              :             s,
-     125              :           ),
-     126              :         ),
-     127              :       ),
-     128              :     );
-     129              :   }
-     130              : 
-     131              :   /// Encodes the public key into a multicodec issuer
-     132           10 :   @override
-     133              :   String encodeIss(Uint8List publicKey) {
-     134           20 :     Uint8List header = base58.decode(multicodecEd25519Header);
-     135              :     final String multicodec =
-     136           50 :         '$multicodecEd25519Base${base58.encode(Uint8List.fromList(header + publicKey))}';
-     137           10 :     return <String>[
-     138              :       DID_PREFIX,
-     139              :       DID_METHOD,
-     140              :       multicodec,
-     141           10 :     ].join(DID_DELIMITER);
-     142              :   }
-     143              : 
-     144              :   /// Gets the public key from the issuer
-     145            1 :   @override
-     146              :   Uint8List decodeIss(String issuer) {
-     147            1 :     List<String> split = issuer.split(DID_DELIMITER);
-     148            4 :     if (split[0] != DID_PREFIX || split[1] != DID_METHOD) {
-     149            0 :       throw IssuerDecodeError(issuer, 'Issuer must be a DID with method "key"');
-     150              :     }
-     151            1 :     final String multicodec = split[2];
-     152              : 
-     153              :     // Check the base
-     154            1 :     String base = multicodec[0];
-     155            1 :     if (base != multicodecEd25519Base) {
-     156            0 :       throw IssuerDecodeError(
-     157              :         issuer,
-     158              :         'Issuer must be a key in the multicodec format',
-     159              :       );
-     160              :     }
-     161              : 
-     162              :     // Decode
-     163            3 :     final Uint8List bytes = base58.decode(multicodec.substring(1));
-     164              : 
-     165              :     // Check the header
-     166            3 :     String header = base58.encode(bytes.sublist(0, 2));
-     167            1 :     if (header != multicodecEd25519Header) {
-     168            0 :       throw IssuerDecodeError(
-     169              :         issuer,
-     170              :         'Issuer must be a public key with type "Ed25519',
-     171              :       );
-     172              :     }
-     173              : 
-     174              :     // Slice off the public key and validate the length
-     175            1 :     final Uint8List publicKey = bytes.sublist(2);
-     176            2 :     if (publicKey.length != multicodecEd25519Length) {
-     177            0 :       throw IssuerDecodeError(
-     178              :         issuer,
-     179              :         'Issuer must be public key with length 32 bytes',
-     180              :       );
-     181              :     }
-     182              : 
-     183              :     return publicKey;
-     184              :   }
-     185              : 
-     186           10 :   @override
-     187              :   Uint8List encodeData(JWTData params) {
-     188           10 :     final String data = <String>[
-     189           30 :       encodeJson(params.header.toJson()),
-     190           30 :       encodeJson(params.payload.toJson()),
-     191           10 :     ].join(JWT_DELIMITER);
-     192              : 
-     193           20 :     return Uint8List.fromList(utf8.encode(data));
-     194              :   }
-     195              : 
-     196            0 :   @override
-     197              :   JWTData decodeData(Uint8List data) {
-     198            0 :     final List<String> params = utf8.decode(data).split(JWT_DELIMITER);
-     199              : 
-     200            0 :     JWTHeader header = JWTHeader.fromJson(jsonDecode(params[0]));
-     201            0 :     JWTPayload payload = JWTPayload.fromJson(jsonDecode(params[1]));
-     202              : 
-     203            0 :     return JWTData(header, payload);
-     204              :   }
-     205              : 
-     206           10 :   @override
-     207              :   String encodeSig(Uint8List bytes) {
-     208           20 :     return stripEquals(base64Url.encode(bytes));
-     209              :   }
-     210              : 
-     211            1 :   @override
-     212              :   Uint8List decodeSig(String encoded) {
-     213            3 :     return Uint8List.fromList(base64Url.decode(base64Url.normalize(encoded)));
-     214              :   }
-     215              : 
-     216           10 :   @override
-     217              :   String encodeJWT(JWTSigned params) {
-     218           10 :     return <String>[
-     219           30 :       encodeJson(params.header.toJson()),
-     220           30 :       encodeJson(params.payload.toJson()),
-     221           30 :       encodeSig(Uint8List.fromList(params.signature)),
-     222           10 :     ].join(JWT_DELIMITER);
-     223              :   }
-     224              : 
-     225            1 :   @override
-     226              :   JWTDecoded decodeJWT(String encoded) {
-     227            1 :     final List<String> params = encoded.split(JWT_DELIMITER);
-     228              : 
-     229            3 :     JWTHeader header = JWTHeader.fromJson(decodeJson(params[0]));
-     230            3 :     JWTPayload payload = JWTPayload.fromJson(decodeJson(params[1]));
-     231            2 :     Uint8List signature = decodeSig(params[2]);
-     232            3 :     List<int> data = utf8.encode(params.sublist(0, 2).join(JWT_DELIMITER));
-     233              : 
-     234            1 :     return JWTDecoded(data, signature, payload, header: header);
-     235              :   }
-     236              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html b/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html deleted file mode 100644 index 2fd74161..00000000 --- a/coverage/html/core/relay_auth/relay_auth_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.func.html b/coverage/html/core/relay_auth/relay_auth_models.dart.func.html deleted file mode 100644 index 5e31e8d2..00000000 --- a/coverage/html/core/relay_auth/relay_auth_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html b/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html deleted file mode 100644 index 6439cfe6..00000000 --- a/coverage/html/core/relay_auth/relay_auth_models.dart.gcov.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_auth/relay_auth_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_auth - relay_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:90.5 %2119
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:typed_data';
-       2              : 
-       3              : import 'package:convert/convert.dart';
-       4              : import 'package:json_annotation/json_annotation.dart';
-       5              : 
-       6              : part 'relay_auth_models.g.dart';
-       7              : 
-       8              : class RelayAuthKeyPair {
-       9              :   final Uint8List privateKeyBytes;
-      10              :   final Uint8List publicKeyBytes;
-      11              :   final String privateKey;
-      12              :   final String publicKey;
-      13              : 
-      14            9 :   RelayAuthKeyPair(
-      15              :     this.privateKeyBytes,
-      16              :     this.publicKeyBytes,
-      17            9 :   )   : privateKey = hex.encode(privateKeyBytes),
-      18            9 :         publicKey = hex.encode(publicKeyBytes);
-      19              : 
-      20            1 :   RelayAuthKeyPair.fromStrings(
-      21              :     this.privateKey,
-      22              :     this.publicKey,
-      23            2 :   )   : privateKeyBytes = Uint8List.fromList(hex.decode(privateKey)),
-      24            2 :         publicKeyBytes = Uint8List.fromList(hex.decode(publicKey));
-      25              : }
-      26              : 
-      27              : @JsonSerializable()
-      28              : class JWTHeader {
-      29              :   static const JWT_ALG = 'EdDSA';
-      30              :   static const JWT_TYP = 'JWT';
-      31              : 
-      32              :   String alg;
-      33              :   String typ;
-      34              : 
-      35           10 :   JWTHeader({
-      36              :     this.alg = 'EdDSA',
-      37              :     this.typ = 'JWT',
-      38              :   });
-      39              : 
-      40            1 :   factory JWTHeader.fromJson(Map<String, dynamic> json) =>
-      41            1 :       _$JWTHeaderFromJson(json);
-      42              : 
-      43           20 :   Map<String, dynamic> toJson() => _$JWTHeaderToJson(this);
-      44              : }
-      45              : 
-      46              : @JsonSerializable()
-      47              : class JWTPayload {
-      48              :   String iss;
-      49              :   String sub;
-      50              :   String aud;
-      51              :   int iat;
-      52              :   int exp;
-      53              : 
-      54           10 :   JWTPayload(
-      55              :     this.iss,
-      56              :     this.sub,
-      57              :     this.aud,
-      58              :     this.iat,
-      59              :     this.exp,
-      60              :   );
-      61              : 
-      62            1 :   factory JWTPayload.fromJson(Map<String, dynamic> json) =>
-      63            1 :       _$JWTPayloadFromJson(json);
-      64              : 
-      65           20 :   Map<String, dynamic> toJson() => _$JWTPayloadToJson(this);
-      66              : }
-      67              : 
-      68              : class JWTData {
-      69              :   JWTHeader header;
-      70              :   JWTPayload payload;
-      71              : 
-      72           10 :   JWTData(this.header, this.payload);
-      73              : }
-      74              : 
-      75              : class JWTSigned extends JWTData {
-      76              :   List<int> signature;
-      77              : 
-      78           10 :   JWTSigned(
-      79              :     this.signature,
-      80              :     JWTPayload payload, {
-      81              :     JWTHeader? header,
-      82           20 :   }) : super(header ?? JWTHeader(), payload);
-      83              : }
-      84              : 
-      85              : class JWTDecoded extends JWTSigned {
-      86              :   List<int> data;
-      87              : 
-      88            1 :   JWTDecoded(
-      89              :     this.data,
-      90              :     List<int> signature,
-      91              :     JWTPayload payload, {
-      92              :     JWTHeader? header,
-      93            1 :   }) : super(signature, payload, header: header);
-      94              : }
-      95              : 
-      96              : class IssuerDecodeError {
-      97              :   String received;
-      98              :   String message;
-      99              : 
-     100            0 :   IssuerDecodeError(
-     101              :     this.received,
-     102              :     this.message,
-     103              :   );
-     104              : }
-     105              : 
-     106              : class VerifyJWTError {
-     107              :   String jwt;
-     108              :   String message;
-     109              : 
-     110            0 :   VerifyJWTError(
-     111              :     this.jwt,
-     112              :     this.message,
-     113              :   );
-     114              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/i_relay_client.dart.func-c.html b/coverage/html/core/relay_client/i_relay_client.dart.func-c.html deleted file mode 100644 index 54f8658c..00000000 --- a/coverage/html/core/relay_client/i_relay_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/i_relay_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - i_relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/i_relay_client.dart.func.html b/coverage/html/core/relay_client/i_relay_client.dart.func.html deleted file mode 100644 index ee7c9d5b..00000000 --- a/coverage/html/core/relay_client/i_relay_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/i_relay_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - i_relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/i_relay_client.dart.gcov.html b/coverage/html/core/relay_client/i_relay_client.dart.gcov.html deleted file mode 100644 index f6d8c43a..00000000 --- a/coverage/html/core/relay_client/i_relay_client.dart.gcov.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/i_relay_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - i_relay_client.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %10
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       3              : 
-       4              : class PublishOptions {
-       5              :   final Relay? relay;
-       6              :   final int? ttl;
-       7              :   final bool? prompt;
-       8              :   final int? tag;
-       9              : 
-      10            0 :   PublishOptions(this.relay, this.ttl, this.prompt, this.tag);
-      11              : }
-      12              : 
-      13              : abstract class IRelayClient {
-      14              :   /// Relay Client Events
-      15              :   abstract final Event<MessageEvent> onRelayClientMessage;
-      16              :   abstract final Event onRelayClientConnect;
-      17              :   abstract final Event onRelayClientDisconnect;
-      18              :   abstract final Event<ErrorEvent> onRelayClientError;
-      19              : 
-      20              :   /// JSON RPC Events
-      21              :   // Event<EventArgs> onJsonRpcPayload();
-      22              :   // Event<EventArgs> onJsonRpcConnect();
-      23              :   // Event<EventArgs> onJsonRpcDisconnect();
-      24              :   // Event<ErrorEvent> onJsonRpcError();
-      25              : 
-      26              :   /// Subscriber Events
-      27              :   abstract final Event<SubscriptionEvent> onSubscriptionCreated;
-      28              :   abstract final Event<SubscriptionDeletionEvent> onSubscriptionDeleted;
-      29              :   // Event<EventArgs> onSubscriptionExpired();
-      30              :   // Event<EventArgs> onSubscriptionDisabled();
-      31              :   abstract final Event onSubscriptionSync;
-      32              :   abstract final Event onSubscriptionResubscribed;
-      33              : 
-      34              :   /// Returns true if the client is connected to a relay server
-      35              :   bool get isConnected;
-      36              : 
-      37              :   Future<void> init();
-      38              :   Future<void> publish({
-      39              :     required String topic,
-      40              :     required String message,
-      41              :     required int ttl,
-      42              :     required int tag,
-      43              :   });
-      44              :   Future<String> subscribe({required String topic});
-      45              :   Future<void> unsubscribe({required String topic});
-      46              :   Future<void> connect({String? relayUrl});
-      47              :   Future<void> disconnect();
-      48              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/index-sort-f.html b/coverage/html/core/relay_client/index-sort-f.html deleted file mode 100644 index 7cfdd313..00000000 --- a/coverage/html/core/relay_client/index-sort-f.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
i_relay_client.dart -
0.0%
-
0.0 %1-
message_tracker.dart -
100.0%
-
100.0 %1818-
relay_client.dart -
86.6%86.6%
-
86.6 %172149-
relay_client_models.dart -
50.0%50.0%
-
50.0 %105-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/index-sort-l.html b/coverage/html/core/relay_client/index-sort-l.html deleted file mode 100644 index 3026d9c7..00000000 --- a/coverage/html/core/relay_client/index-sort-l.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
i_relay_client.dart -
0.0%
-
0.0 %1
relay_client_models.dart -
50.0%50.0%
-
50.0 %105
relay_client.dart -
86.6%86.6%
-
86.6 %172149
message_tracker.dart -
100.0%
-
100.0 %1818
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/index.html b/coverage/html/core/relay_client/index.html deleted file mode 100644 index 46c46c2e..00000000 --- a/coverage/html/core/relay_client/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_clientCoverageTotalHit
Test:lcov.infoLines:85.6 %201172
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
i_relay_client.dart -
0.0%
-
0.0 %1
message_tracker.dart -
100.0%
-
100.0 %1818
relay_client.dart -
86.6%86.6%
-
86.6 %172149
relay_client_models.dart -
50.0%50.0%
-
50.0 %105
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html deleted file mode 100644 index 79cbf549..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2 - error_code.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html deleted file mode 100644 index c1058981..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2 - error_code.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html deleted file mode 100644 index 6247e776..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/error_code.dart.gcov.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/error_code.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2 - error_code.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : // ignore_for_file: constant_identifier_names
-       6              : 
-       7              : /// Error codes defined in the [JSON-RPC 2.0 specificiation][spec].
-       8              : ///
-       9              : /// These codes are generally used for protocol-level communication. Most of
-      10              : /// them shouldn't be used by the application. Those that should have
-      11              : /// convenience constructors in [RpcException].
-      12              : ///
-      13              : /// [spec]: http://www.jsonrpc.org/specification#error_object
-      14              : /// An error code indicating that invalid JSON was received by the server.
-      15              : const PARSE_ERROR = -32700;
-      16              : 
-      17              : /// An error code indicating that the request JSON was invalid according to the
-      18              : /// JSON-RPC 2.0 spec.
-      19              : const INVALID_REQUEST = -32600;
-      20              : 
-      21              : /// An error code indicating that the requested method does not exist or is
-      22              : /// unavailable.
-      23              : const METHOD_NOT_FOUND = -32601;
-      24              : 
-      25              : /// An error code indicating that the request parameters are invalid for the
-      26              : /// requested method.
-      27              : const INVALID_PARAMS = -32602;
-      28              : 
-      29              : /// An internal JSON-RPC error.
-      30              : const INTERNAL_ERROR = -32603;
-      31              : 
-      32              : /// An unexpected error occurred on the server.
-      33              : ///
-      34              : /// The spec reserves the range from -32000 to -32099 for implementation-defined
-      35              : /// server exceptions, but for now we only use one of those values.
-      36              : const SERVER_ERROR = -32000;
-      37              : 
-      38              : /// Returns a human-readable name for [errorCode] if it's one specified by the
-      39              : /// JSON-RPC 2.0 spec.
-      40              : ///
-      41              : /// If [errorCode] isn't defined in the JSON-RPC 2.0 spec, returns null.
-      42            0 : String? name(int errorCode) {
-      43              :   switch (errorCode) {
-      44            0 :     case PARSE_ERROR:
-      45              :       return 'parse error';
-      46            0 :     case INVALID_REQUEST:
-      47              :       return 'invalid request';
-      48            0 :     case METHOD_NOT_FOUND:
-      49              :       return 'method not found';
-      50            0 :     case INVALID_PARAMS:
-      51              :       return 'invalid parameters';
-      52            0 :     case INTERNAL_ERROR:
-      53              :       return 'internal error';
-      54              :     default:
-      55              :       return null;
-      56              :   }
-      57              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html b/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html deleted file mode 100644 index c449153c..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2 - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
error_code.dart -
0.0%
-
0.0 %6-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html b/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html deleted file mode 100644 index 83dd21b6..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2 - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
error_code.dart -
0.0%
-
0.0 %6
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/index.html b/coverage/html/core/relay_client/json_rpc_2/index.html deleted file mode 100644 index e92c9983..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2 - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2CoverageTotalHit
Test:lcov.infoLines:0.0 %60
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
error_code.dart -
0.0%
-
0.0 %6
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html deleted file mode 100644 index 8648fe37..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html deleted file mode 100644 index cfc385b8..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html deleted file mode 100644 index 9dd27861..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/client.dart.gcov.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - client.dartCoverageTotalHit
Test:lcov.infoLines:73.1 %7857
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import 'dart:async';
-       6              : 
-       7              : import 'package:stack_trace/stack_trace.dart';
-       8              : import 'package:stream_channel/stream_channel.dart';
-       9              : 
-      10              : import 'exception.dart';
-      11              : import 'utils.dart';
-      12              : 
-      13              : /// A JSON-RPC 2.0 client.
-      14              : ///
-      15              : /// A client calls methods on a server and handles the server's responses to
-      16              : /// those method calls. Methods can be called with [sendRequest], or with
-      17              : /// [sendNotification] if no response is expected.
-      18              : class Client {
-      19              :   final StreamChannel<dynamic> _channel;
-      20              : 
-      21              :   /// The next request id.
-      22              :   var _id = 0;
-      23              : 
-      24              :   /// The current batch of requests to be sent together.
-      25              :   ///
-      26              :   /// Each element is a JSON RPC spec compliant message.
-      27              :   List<Map<String, dynamic>>? _batch;
-      28              : 
-      29              :   /// The map of request ids to pending requests.
-      30              :   final _pendingRequests = <int, _Request>{};
-      31              : 
-      32              :   final _done = Completer<void>();
-      33              : 
-      34              :   /// Returns a [Future] that completes when the underlying connection is
-      35              :   /// closed.
-      36              :   ///
-      37              :   /// This is the same future that's returned by [listen] and [close]. It may
-      38              :   /// complete before [close] is called if the remote endpoint closes the
-      39              :   /// connection.
-      40           24 :   Future get done => _done.future;
-      41              : 
-      42              :   /// Whether the underlying connection is closed.
-      43              :   ///
-      44              :   /// Note that this will be `true` before [close] is called if the remote
-      45              :   /// endpoint closes the connection.
-      46           24 :   bool get isClosed => _done.isCompleted;
-      47              : 
-      48              :   /// Creates a [Client] that communicates over [channel].
-      49              :   ///
-      50              :   /// Note that the client won't begin listening to [responses] until
-      51              :   /// [Client.listen] is called.
-      52            0 :   Client(StreamChannel<String> channel)
-      53            0 :       : this.withoutJson(
-      54            0 :             jsonDocument.bind(channel).transformStream(ignoreFormatExceptions));
-      55              : 
-      56              :   /// Creates a [Client] that communicates using decoded messages over
-      57              :   /// [channel].
-      58              :   ///
-      59              :   /// Unlike [Client], this doesn't read or write JSON strings. Instead, it
-      60              :   /// reads and writes decoded maps or lists.
-      61              :   ///
-      62              :   /// Note that the client won't begin listening to [responses] until
-      63              :   /// [Client.listen] is called.
-      64            8 :   Client.withoutJson(this._channel) {
-      65           24 :     done.whenComplete(() {
-      66           21 :       for (var request in _pendingRequests.values) {
-      67           15 :         request.completer.completeError(StateError(
-      68           10 :             'The client closed with pending request "${request.method}".'));
-      69              :       }
-      70           16 :       _pendingRequests.clear();
-      71            8 :     }).catchError((_) {
-      72              :       // Avoid an unhandled error.
-      73              :     });
-      74              :   }
-      75              : 
-      76              :   /// Starts listening to the underlying stream.
-      77              :   ///
-      78              :   /// Returns a [Future] that will complete when the connection is closed or
-      79              :   /// when it has an error. This is the same as [done].
-      80              :   ///
-      81              :   /// [listen] may only be called once.
-      82            8 :   Future listen() {
-      83           32 :     _channel.stream.listen(_handleResponse, onError: (error, stackTrace) {
-      84            0 :       _done.completeError(error, stackTrace);
-      85            0 :       _channel.sink.close();
-      86            0 :     }, onDone: () {
-      87            0 :       if (!_done.isCompleted) _done.complete();
-      88            0 :       close();
-      89              :     });
-      90            8 :     return done;
-      91              :   }
-      92              : 
-      93              :   /// Closes the underlying connection.
-      94              :   ///
-      95              :   /// Returns a [Future] that completes when all resources have been released.
-      96              :   /// This is the same as [done].
-      97            8 :   Future close() {
-      98           24 :     _channel.sink.close();
-      99           32 :     if (!_done.isCompleted) _done.complete();
-     100            8 :     return done;
-     101              :   }
-     102              : 
-     103              :   /// Sends a JSON-RPC 2 request to invoke the given [method].
-     104              :   ///
-     105              :   /// If passed, [parameters] is the parameters for the method. This must be
-     106              :   /// either an [Iterable] (to pass parameters by position) or a [Map] with
-     107              :   /// [String] keys (to pass parameters by name). Either way, it must be
-     108              :   /// JSON-serializable.
-     109              :   ///
-     110              :   /// If the request succeeds, this returns the response result as a decoded
-     111              :   /// JSON-serializable object. If it fails, it throws an [RpcException]
-     112              :   /// describing the failure.
-     113              :   ///
-     114              :   /// Throws a [StateError] if the client is closed while the request is in
-     115              :   /// flight, or if the client is closed when this method is called.
-     116            8 :   Future sendRequest(String method, [parameters, int? id]) {
-     117            0 :     var idAct = id ?? _id++;
-     118            8 :     _send(method, parameters, idAct);
-     119              : 
-     120            8 :     var completer = Completer.sync();
-     121           32 :     _pendingRequests[idAct] = _Request(method, completer, Chain.current());
-     122            8 :     return completer.future;
-     123              :   }
-     124              : 
-     125              :   /// Sends a JSON-RPC 2 request to invoke the given [method] without expecting
-     126              :   /// a response.
-     127              :   ///
-     128              :   /// If passed, [parameters] is the parameters for the method. This must be
-     129              :   /// either an [Iterable] (to pass parameters by position) or a [Map] with
-     130              :   /// [String] keys (to pass parameters by name). Either way, it must be
-     131              :   /// JSON-serializable.
-     132              :   ///
-     133              :   /// Since this is just a notification to which the server isn't expected to
-     134              :   /// send a response, it has no return value.
-     135              :   ///
-     136              :   /// Throws a [StateError] if the client is closed when this method is called.
-     137            0 :   void sendNotification(String method, [parameters]) =>
-     138            0 :       _send(method, parameters);
-     139              : 
-     140              :   /// A helper method for [sendRequest] and [sendNotification].
-     141              :   ///
-     142              :   /// Sends a request to invoke [method] with [parameters]. If [id] is given,
-     143              :   /// the request uses that id.
-     144            8 :   void _send(String method, parameters, [int? id]) {
-     145            8 :     if (parameters is Iterable) parameters = parameters.toList();
-     146            8 :     if (parameters is! Map && parameters is! List && parameters != null) {
-     147            0 :       throw ArgumentError('Only maps and lists may be used as JSON-RPC '
-     148              :           'parameters, was "$parameters".');
-     149              :     }
-     150            8 :     if (isClosed) throw StateError('The client is closed.');
-     151              : 
-     152            8 :     var message = <String, dynamic>{'jsonrpc': '2.0', 'method': method};
-     153            8 :     if (id != null) message['id'] = id;
-     154            8 :     if (parameters != null) message['params'] = parameters;
-     155              : 
-     156            8 :     if (_batch != null) {
-     157            0 :       _batch!.add(message);
-     158              :     } else {
-     159           24 :       _channel.sink.add(message);
-     160              :     }
-     161              :   }
-     162              : 
-     163              :   /// Runs [callback] and batches any requests sent until it returns.
-     164              :   ///
-     165              :   /// A batch of requests is sent in a single message on the underlying stream,
-     166              :   /// and the responses are likewise sent back in a single message.
-     167              :   ///
-     168              :   /// [callback] may be synchronous or asynchronous. If it returns a [Future],
-     169              :   /// requests will be batched until that Future returns; otherwise, requests
-     170              :   /// will only be batched while synchronously executing [callback].
-     171              :   ///
-     172              :   /// If this is called in the context of another [withBatch] call, it just
-     173              :   /// invokes [callback] without creating another batch. This means that
-     174              :   /// responses are batched until the first batch ends.
-     175            0 :   void withBatch(Function() callback) {
-     176            0 :     if (_batch != null) {
-     177            0 :       callback();
-     178              :       return;
-     179              :     }
-     180              : 
-     181            0 :     _batch = [];
-     182            0 :     return tryFinally(callback, () {
-     183            0 :       _channel.sink.add(_batch);
-     184            0 :       _batch = null;
-     185              :     });
-     186              :   }
-     187              : 
-     188              :   /// Handles a decoded response from the server.
-     189            8 :   void _handleResponse(response) {
-     190            8 :     if (response is List) {
-     191            0 :       response.forEach(_handleSingleResponse);
-     192              :     } else {
-     193            8 :       _handleSingleResponse(response);
-     194              :     }
-     195              :   }
-     196              : 
-     197              :   /// Handles a decoded response from the server after batches have been
-     198              :   /// resolved.
-     199            8 :   void _handleSingleResponse(response) {
-     200            8 :     if (!_isResponseValid(response)) return;
-     201            8 :     var id = response['id'];
-     202            8 :     id = (id is String) ? int.parse(id) : id;
-     203           16 :     var request = _pendingRequests.remove(id)!;
-     204            8 :     if (response.containsKey('result')) {
-     205           21 :       request.completer.complete(response['result']);
-     206              :     } else {
-     207            8 :       request.completer.completeError(
-     208           20 :           RpcException(response['error']['code'], response['error']['message'],
-     209            8 :               data: response['error']['data']),
-     210            4 :           request.chain);
-     211              :     }
-     212              :   }
-     213              : 
-     214              :   /// Determines whether the server's response is valid per the spec.
-     215            8 :   bool _isResponseValid(response) {
-     216            8 :     if (response is! Map) return false;
-     217           16 :     if (response['jsonrpc'] != '2.0') return false;
-     218            8 :     var id = response['id'];
-     219            8 :     id = (id is String) ? int.parse(id) : id;
-     220           16 :     if (!_pendingRequests.containsKey(id)) return false;
-     221            8 :     if (response.containsKey('result')) return true;
-     222              : 
-     223            4 :     if (!response.containsKey('error')) return false;
-     224            4 :     var error = response['error'];
-     225            4 :     if (error is! Map) return false;
-     226            8 :     if (error['code'] is! int) return false;
-     227            8 :     if (error['message'] is! String) return false;
-     228              :     return true;
-     229              :   }
-     230              : }
-     231              : 
-     232              : /// A pending request to the server.
-     233              : class _Request {
-     234              :   /// THe method that was sent.
-     235              :   final String method;
-     236              : 
-     237              :   /// The completer to use to complete the response future.
-     238              :   final Completer completer;
-     239              : 
-     240              :   /// The stack chain from where the request was made.
-     241              :   final Chain chain;
-     242              : 
-     243            8 :   _Request(this.method, this.completer, this.chain);
-     244              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html deleted file mode 100644 index c6018733..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - exception.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html deleted file mode 100644 index 58967808..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - exception.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html deleted file mode 100644 index c1d60b31..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/exception.dart.gcov.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/exception.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - exception.dartCoverageTotalHit
Test:lcov.infoLines:4.8 %211
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import '../error_code.dart' as error_code;
-       6              : 
-       7              : /// An exception from a JSON-RPC server that can be translated into an error
-       8              : /// response.
-       9              : class RpcException implements Exception {
-      10              :   /// The error code.
-      11              :   ///
-      12              :   /// All non-negative error codes are available for use by application
-      13              :   /// developers.
-      14              :   final int code;
-      15              : 
-      16              :   /// The error message.
-      17              :   ///
-      18              :   /// This should be limited to a concise single sentence. Further information
-      19              :   /// should be supplied via [data].
-      20              :   final String message;
-      21              : 
-      22              :   /// Extra application-defined information about the error.
-      23              :   ///
-      24              :   /// This must be a JSON-serializable object. If it's a [Map] without a
-      25              :   /// `"request"` key, a copy of the request that caused the error will
-      26              :   /// automatically be injected.
-      27              :   final Object? data;
-      28              : 
-      29            4 :   RpcException(this.code, this.message, {this.data});
-      30              : 
-      31              :   /// An exception indicating that the method named [methodName] was not found.
-      32              :   ///
-      33              :   /// This should usually be used only by fallback handlers.
-      34            0 :   RpcException.methodNotFound(String methodName)
-      35            0 :       : this(error_code.METHOD_NOT_FOUND, 'Unknown method "$methodName".');
-      36              : 
-      37              :   /// An exception indicating that the parameters for the requested method were
-      38              :   /// invalid.
-      39              :   ///
-      40              :   /// Methods can use this to reject requests with invalid parameters.
-      41            0 :   RpcException.invalidParams(String message)
-      42            0 :       : this(error_code.INVALID_PARAMS, message);
-      43              : 
-      44              :   /// Converts this exception into a JSON-serializable object that's a valid
-      45              :   /// JSON-RPC 2.0 error response.
-      46            0 :   Map<String, dynamic> serialize(request) {
-      47              :     dynamic modifiedData;
-      48            0 :     if (data is Map && !(data as Map).containsKey('request')) {
-      49            0 :       modifiedData = Map.from(data as Map);
-      50            0 :       modifiedData['request'] = request;
-      51            0 :     } else if (data == null) {
-      52            0 :       modifiedData = {'request': request};
-      53              :     } else {
-      54            0 :       modifiedData = data;
-      55              :     }
-      56              : 
-      57            0 :     var id = request is Map ? request['id'] : null;
-      58            0 :     if (id is! String && id is! num) id = null;
-      59            0 :     return {
-      60              :       'jsonrpc': '2.0',
-      61            0 :       'error': {'code': code, 'message': message, 'data': modifiedData},
-      62              :       'id': id
-      63              :     };
-      64              :   }
-      65              : 
-      66            0 :   @override
-      67              :   String toString() {
-      68            0 :     var prefix = 'JSON-RPC error $code';
-      69            0 :     var errorName = error_code.name(code);
-      70            0 :     if (errorName != null) prefix += ' ($errorName)';
-      71            0 :     return '$prefix: $message';
-      72              :   }
-      73              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html deleted file mode 100644 index ffac39ce..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-f.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
client.dart -
73.1%73.1%
-
73.1 %7857-
exception.dart -
4.8%4.8%
-
4.8 %211-
parameters.dart -
18.3%18.3%
-
18.3 %9317-
peer.dart -
59.2%59.2%
-
59.2 %4929-
server.dart -
39.2%39.2%
-
39.2 %9738-
utils.dart -
22.7%22.7%
-
22.7 %225-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html b/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html deleted file mode 100644 index 9b765e9c..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/index-sort-l.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
exception.dart -
4.8%4.8%
-
4.8 %211
parameters.dart -
18.3%18.3%
-
18.3 %9317
utils.dart -
22.7%22.7%
-
22.7 %225
server.dart -
39.2%39.2%
-
39.2 %9738
peer.dart -
59.2%59.2%
-
59.2 %4929
client.dart -
73.1%73.1%
-
73.1 %7857
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/index.html b/coverage/html/core/relay_client/json_rpc_2/src/index.html deleted file mode 100644 index ab6c1d41..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/index.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/srcCoverageTotalHit
Test:lcov.infoLines:40.8 %360147
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
client.dart -
73.1%73.1%
-
73.1 %7857
exception.dart -
4.8%4.8%
-
4.8 %211
parameters.dart -
18.3%18.3%
-
18.3 %9317
peer.dart -
59.2%59.2%
-
59.2 %4929
server.dart -
39.2%39.2%
-
39.2 %9738
utils.dart -
22.7%22.7%
-
22.7 %225
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html deleted file mode 100644 index 8f03765c..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html deleted file mode 100644 index 98937a45..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html deleted file mode 100644 index 859acf14..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/parameters.dart.gcov.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/parameters.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - parameters.dartCoverageTotalHit
Test:lcov.infoLines:18.3 %9317
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import 'dart:convert';
-       6              : 
-       7              : import 'exception.dart';
-       8              : 
-       9              : /// A wrapper for the parameters to a server method.
-      10              : ///
-      11              : /// JSON-RPC 2.0 allows parameters that are either a list or a map. This class
-      12              : /// provides functions that not only assert that the parameters object is the
-      13              : /// correct type, but also that the expected arguments exist and are themselves
-      14              : /// the correct type.
-      15              : ///
-      16              : /// Example usage:
-      17              : ///
-      18              : ///     server.registerMethod("subtract", (params) {
-      19              : ///       return params["minuend"].asNum - params["subtrahend"].asNum;
-      20              : ///     });
-      21              : class Parameters {
-      22              :   /// The name of the method that this request called.
-      23              :   final String method;
-      24              : 
-      25              :   /// The underlying value of the parameters object.
-      26              :   ///
-      27              :   /// If this is accessed for a [Parameter] that was not passed, the request
-      28              :   /// will be automatically rejected. To avoid this, use [Parameter.valueOr].
-      29              :   final dynamic value;
-      30              : 
-      31            7 :   Parameters(this.method, this.value);
-      32              : 
-      33              :   /// Returns a single parameter.
-      34              :   ///
-      35              :   /// If [key] is a [String], the request is expected to provide named
-      36              :   /// parameters. If it's an [int], the request is expected to provide
-      37              :   /// positional parameters. Requests that don't do so will be rejected
-      38              :   /// automatically.
-      39              :   ///
-      40              :   /// Whether or not the given parameter exists, this returns a [Parameter]
-      41              :   /// object. If a parameter's value is accessed through a getter like [value]
-      42              :   /// or [Parameter.asNum], the request will be rejected if that parameter
-      43              :   /// doesn't exist. On the other hand, if it's accessed through a method with a
-      44              :   /// default value like [Parameter.valueOr] or [Parameter.asNumOr], the default
-      45              :   /// value will be returned.
-      46            7 :   Parameter operator [](key) {
-      47            7 :     if (key is int) {
-      48            0 :       _assertPositional();
-      49            0 :       if (key < value.length) {
-      50            0 :         return Parameter._(method, value[key], this, key);
-      51              :       } else {
-      52            0 :         return _MissingParameter(method, this, key);
-      53              :       }
-      54            7 :     } else if (key is String) {
-      55            7 :       _assertNamed();
-      56           14 :       if (value.containsKey(key)) {
-      57           28 :         return Parameter._(method, value[key], this, key);
-      58              :       } else {
-      59            0 :         return _MissingParameter(method, this, key);
-      60              :       }
-      61              :     } else {
-      62            0 :       throw ArgumentError('Parameters[] only takes an int or a string, was '
-      63              :           '"$key".');
-      64              :     }
-      65              :   }
-      66              : 
-      67              :   /// Asserts that [value] exists and is a [List] and returns it.
-      68            0 :   List get asList {
-      69            0 :     _assertPositional();
-      70            0 :     return value;
-      71              :   }
-      72              : 
-      73              :   /// Asserts that [value] exists and is a [Map] and returns it.
-      74            0 :   Map get asMap {
-      75            0 :     _assertNamed();
-      76            0 :     return value;
-      77              :   }
-      78              : 
-      79              :   /// Asserts that [value] is a positional argument list.
-      80            0 :   void _assertPositional() {
-      81            0 :     if (value is List) return;
-      82            0 :     throw RpcException.invalidParams('Parameters for method "$method" '
-      83              :         'must be passed by position.');
-      84              :   }
-      85              : 
-      86              :   /// Asserts that [value] is a named argument map.
-      87            7 :   void _assertNamed() {
-      88           14 :     if (value is Map) return;
-      89            0 :     throw RpcException.invalidParams('Parameters for method "$method" '
-      90              :         'must be passed by name.');
-      91              :   }
-      92              : }
-      93              : 
-      94              : /// A wrapper for a single parameter to a server method.
-      95              : ///
-      96              : /// This provides numerous functions for asserting the type of the parameter in
-      97              : /// question. These functions each have a version that asserts that the
-      98              : /// parameter exists (for example, [asNum] and [asString]) and a version that
-      99              : /// returns a default value if the parameter doesn't exist (for example,
-     100              : /// [asNumOr] and [asStringOr]). If an assertion fails, the request is
-     101              : /// automatically rejected.
-     102              : ///
-     103              : /// This extends [Parameters] to make it easy to access nested parameters. For
-     104              : /// example:
-     105              : ///
-     106              : ///     // "params.value" is "{'scores': {'home': [5, 10, 17]}}"
-     107              : ///     params['scores']['home'][2].asInt // => 17
-     108              : class Parameter extends Parameters {
-     109              :   // The parent parameters, used to construct [_path].
-     110              :   final Parameters _parent;
-     111              : 
-     112              :   /// The key used to access [this], used to construct [_path].
-     113              :   final dynamic _key;
-     114              : 
-     115              :   /// A human-readable representation of the path of getters used to get this.
-     116              :   ///
-     117              :   /// Named parameters are represented as `.name`, whereas positional parameters
-     118              :   /// are represented as `[index]`. For example: `"foo[0].bar.baz"`. Named
-     119              :   /// parameters that contain characters that are neither alphanumeric,
-     120              :   /// underscores, or hyphens will be JSON-encoded. For example: `"foo
-     121              :   /// bar"."baz.bang"`. If quotes are used for an individual component, they
-     122              :   /// won't be used for the entire string.
-     123              :   ///
-     124              :   /// An exception is made for single-level parameters. A single-level
-     125              :   /// positional parameter is just represented by the index plus one, because
-     126              :   /// "parameter 1" is clearer than "parameter [0]". A single-level named
-     127              :   /// parameter is represented by that name in quotes.
-     128            0 :   String get _path {
-     129            0 :     if (_parent is! Parameter) {
-     130            0 :       return _key is int ? (_key + 1).toString() : jsonEncode(_key);
-     131              :     }
-     132              : 
-     133            0 :     String quoteKey(key) {
-     134            0 :       if (key.contains(RegExp(r'[^a-zA-Z0-9_-]'))) return jsonEncode(key);
-     135              :       return key;
-     136              :     }
-     137              : 
-     138            0 :     String computePath(params) {
-     139            0 :       if (params._parent is! Parameter) {
-     140            0 :         return params._key is int ? '[${params._key}]' : quoteKey(params._key);
-     141              :       }
-     142              : 
-     143            0 :       var path = computePath(params._parent);
-     144            0 :       return params._key is int
-     145            0 :           ? '$path[${params._key}]'
-     146            0 :           : '$path.${quoteKey(params._key)}';
-     147              :     }
-     148              : 
-     149            0 :     return computePath(this);
-     150              :   }
-     151              : 
-     152              :   /// Whether this parameter exists.
-     153            0 :   bool get exists => true;
-     154              : 
-     155            7 :   Parameter._(String method, value, this._parent, this._key)
-     156            7 :       : super(method, value);
-     157              : 
-     158              :   /// Returns [value], or [defaultValue] if this parameter wasn't passed.
-     159            0 :   dynamic valueOr(defaultValue) => value;
-     160              : 
-     161              :   /// Asserts that [value] exists and is a number and returns it.
-     162              :   ///
-     163              :   /// [asNumOr] may be used to provide a default value instead of rejecting the
-     164              :   /// request if [value] doesn't exist.
-     165            0 :   num get asNum => _getTyped('a number', (value) => value is num);
-     166              : 
-     167              :   /// Asserts that [value] is a number and returns it.
-     168              :   ///
-     169              :   /// If [value] doesn't exist, this returns [defaultValue].
-     170            0 :   num asNumOr(num defaultValue) => asNum;
-     171              : 
-     172              :   /// Asserts that [value] exists and is an integer and returns it.
-     173              :   ///
-     174              :   /// [asIntOr] may be used to provide a default value instead of rejecting the
-     175              :   /// request if [value] doesn't exist.
-     176              :   ///
-     177              :   /// Note that which values count as integers varies between the Dart VM and
-     178              :   /// dart2js. The value `1.0` will be considered an integer under dart2js but
-     179              :   /// not under the VM.
-     180            0 :   int get asInt => _getTyped('an integer', (value) => value is int);
-     181              : 
-     182              :   /// Asserts that [value] is an integer and returns it.
-     183              :   ///
-     184              :   /// If [value] doesn't exist, this returns [defaultValue].
-     185              :   ///
-     186              :   /// Note that which values count as integers varies between the Dart VM and
-     187              :   /// dart2js. The value `1.0` will be considered an integer under dart2js but
-     188              :   /// not under the VM.
-     189            0 :   int asIntOr(int defaultValue) => asInt;
-     190              : 
-     191              :   /// Asserts that [value] exists and is a boolean and returns it.
-     192              :   ///
-     193              :   /// [asBoolOr] may be used to provide a default value instead of rejecting the
-     194              :   /// request if [value] doesn't exist.
-     195            0 :   bool get asBool => _getTyped('a boolean', (value) => value is bool);
-     196              : 
-     197              :   /// Asserts that [value] is a boolean and returns it.
-     198              :   ///
-     199              :   /// If [value] doesn't exist, this returns [defaultValue].
-     200            0 :   bool asBoolOr(bool defaultValue) => asBool;
-     201              : 
-     202              :   /// Asserts that [value] exists and is a string and returns it.
-     203              :   ///
-     204              :   /// [asStringOr] may be used to provide a default value instead of rejecting
-     205              :   /// the request if [value] doesn't exist.
-     206            0 :   String get asString => _getTyped('a string', (value) => value is String);
-     207              : 
-     208              :   /// Asserts that [value] is a string and returns it.
-     209              :   ///
-     210              :   /// If [value] doesn't exist, this returns [defaultValue].
-     211            0 :   String asStringOr(String defaultValue) => asString;
-     212              : 
-     213              :   /// Asserts that [value] exists and is a [List] and returns it.
-     214              :   ///
-     215              :   /// [asListOr] may be used to provide a default value instead of rejecting the
-     216              :   /// request if [value] doesn't exist.
-     217            0 :   @override
-     218            0 :   List get asList => _getTyped('an Array', (value) => value is List);
-     219              : 
-     220              :   /// Asserts that [value] is a [List] and returns it.
-     221              :   ///
-     222              :   /// If [value] doesn't exist, this returns [defaultValue].
-     223            0 :   List asListOr(List defaultValue) => asList;
-     224              : 
-     225              :   /// Asserts that [value] exists and is a [Map] and returns it.
-     226              :   ///
-     227              :   /// [asMapOr] may be used to provide a default value instead of rejecting the
-     228              :   /// request if [value] doesn't exist.
-     229            7 :   @override
-     230           21 :   Map get asMap => _getTyped('an Object', (value) => value is Map);
-     231              : 
-     232              :   /// Asserts that [value] is a [Map] and returns it.
-     233              :   ///
-     234              :   /// If [value] doesn't exist, this returns [defaultValue].
-     235            0 :   Map asMapOr(Map defaultValue) => asMap;
-     236              : 
-     237              :   /// Asserts that [value] exists, is a string, and can be parsed as a
-     238              :   /// [DateTime] and returns it.
-     239              :   ///
-     240              :   /// [asDateTimeOr] may be used to provide a default value instead of rejecting
-     241              :   /// the request if [value] doesn't exist.
-     242            0 :   DateTime get asDateTime => _getParsed('date/time', DateTime.parse);
-     243              : 
-     244              :   /// Asserts that [value] exists, is a string, and can be parsed as a
-     245              :   /// [DateTime] and returns it.
-     246              :   ///
-     247              :   /// If [value] doesn't exist, this returns [defaultValue].
-     248            0 :   DateTime asDateTimeOr(DateTime defaultValue) => asDateTime;
-     249              : 
-     250              :   /// Asserts that [value] exists, is a string, and can be parsed as a
-     251              :   /// [Uri] and returns it.
-     252              :   ///
-     253              :   /// [asUriOr] may be used to provide a default value instead of rejecting the
-     254              :   /// request if [value] doesn't exist.
-     255            0 :   Uri get asUri => _getParsed('URI', Uri.parse);
-     256              : 
-     257              :   /// Asserts that [value] exists, is a string, and can be parsed as a
-     258              :   /// [Uri] and returns it.
-     259              :   ///
-     260              :   /// If [value] doesn't exist, this returns [defaultValue].
-     261            0 :   Uri asUriOr(Uri defaultValue) => asUri;
-     262              : 
-     263              :   /// Get a parameter named [named] that matches [test], or the value of calling
-     264              :   /// [orElse].
-     265              :   ///
-     266              :   /// [type] is used for the error message. It should begin with an indefinite
-     267              :   /// article.
-     268            7 :   dynamic _getTyped(String type, bool Function(dynamic) test) {
-     269           21 :     if (test(value)) return value;
-     270            0 :     throw RpcException.invalidParams('Parameter $_path for method '
-     271            0 :         '"$method" must be $type, but was ${jsonEncode(value)}.');
-     272              :   }
-     273              : 
-     274            0 :   dynamic _getParsed(String description, Function(String) parse) {
-     275            0 :     var string = asString;
-     276              :     try {
-     277            0 :       return parse(string);
-     278            0 :     } on FormatException catch (error) {
-     279              :       // DateTime.parse doesn't actually include any useful information in the
-     280              :       // FormatException, just the string that was being parsed. There's no use
-     281              :       // in including that in the RPC exception. See issue 17753.
-     282            0 :       var message = error.message;
-     283            0 :       if (message == string) {
-     284              :         message = '';
-     285              :       } else {
-     286            0 :         message = '\n$message';
-     287              :       }
-     288              : 
-     289            0 :       throw RpcException.invalidParams('Parameter $_path for method '
-     290            0 :           '"$method" must be a valid $description, but was '
-     291            0 :           '${jsonEncode(string)}.$message');
-     292              :     }
-     293              :   }
-     294              : 
-     295            0 :   @override
-     296              :   void _assertPositional() {
-     297              :     // Throw the standard exception for a mis-typed list.
-     298            0 :     asList;
-     299              :   }
-     300              : 
-     301            7 :   @override
-     302              :   void _assertNamed() {
-     303              :     // Throw the standard exception for a mis-typed map.
-     304            7 :     asMap;
-     305              :   }
-     306              : }
-     307              : 
-     308              : /// A subclass of [Parameter] representing a missing parameter.
-     309              : class _MissingParameter extends Parameter {
-     310            0 :   @override
-     311              :   dynamic get value {
-     312            0 :     throw RpcException.invalidParams('Request for method "$method" is '
-     313            0 :         'missing required parameter $_path.');
-     314              :   }
-     315              : 
-     316            0 :   @override
-     317              :   bool get exists => false;
-     318              : 
-     319            0 :   _MissingParameter(String method, Parameters parent, key)
-     320            0 :       : super._(method, null, parent, key);
-     321              : 
-     322            0 :   @override
-     323              :   dynamic valueOr(defaultValue) => defaultValue;
-     324              : 
-     325            0 :   @override
-     326              :   num asNumOr(num defaultValue) => defaultValue;
-     327              : 
-     328            0 :   @override
-     329              :   int asIntOr(int defaultValue) => defaultValue;
-     330              : 
-     331            0 :   @override
-     332              :   bool asBoolOr(bool defaultValue) => defaultValue;
-     333              : 
-     334            0 :   @override
-     335              :   String asStringOr(String defaultValue) => defaultValue;
-     336              : 
-     337            0 :   @override
-     338              :   List asListOr(List defaultValue) => defaultValue;
-     339              : 
-     340            0 :   @override
-     341              :   Map asMapOr(Map defaultValue) => defaultValue;
-     342              : 
-     343            0 :   @override
-     344              :   DateTime asDateTimeOr(DateTime defaultValue) => defaultValue;
-     345              : 
-     346            0 :   @override
-     347              :   Uri asUriOr(Uri defaultValue) => defaultValue;
-     348              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html deleted file mode 100644 index 30a72ab9..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - peer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html deleted file mode 100644 index 6c77c970..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - peer.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html deleted file mode 100644 index 44c451d4..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/peer.dart.gcov.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/peer.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - peer.dartCoverageTotalHit
Test:lcov.infoLines:59.2 %4929
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import 'dart:async';
-       6              : 
-       7              : import 'package:stream_channel/stream_channel.dart';
-       8              : 
-       9              : import 'client.dart';
-      10              : import 'parameters.dart';
-      11              : import 'server.dart';
-      12              : import 'utils.dart';
-      13              : 
-      14              : /// A JSON-RPC 2.0 client *and* server.
-      15              : ///
-      16              : /// This supports bidirectional peer-to-peer communication with another JSON-RPC
-      17              : /// 2.0 endpoint. It sends both requests and responses across the same
-      18              : /// communication channel and expects to connect to a peer that does the same.
-      19              : class Peer implements Client, Server {
-      20              :   final StreamChannel<dynamic> _channel;
-      21              : 
-      22              :   /// The underlying client that handles request-sending and response-receiving
-      23              :   /// logic.
-      24              :   late final Client _client;
-      25              : 
-      26              :   /// The underlying server that handles request-receiving and response-sending
-      27              :   /// logic.
-      28              :   late final Server _server;
-      29              : 
-      30              :   /// A stream controller that forwards incoming messages to [_server] if
-      31              :   /// they're requests.
-      32              :   final _serverIncomingForwarder = StreamController(sync: true);
-      33              : 
-      34              :   /// A stream controller that forwards incoming messages to [_client] if
-      35              :   /// they're responses.
-      36              :   final _clientIncomingForwarder = StreamController(sync: true);
-      37              : 
-      38              :   @override
-      39           56 :   late final Future done = Future.wait([_client.done, _server.done]);
-      40              : 
-      41            8 :   @override
-      42           32 :   bool get isClosed => _client.isClosed || _server.isClosed;
-      43              : 
-      44            0 :   @override
-      45            0 :   ErrorCallback? get onUnhandledError => _server.onUnhandledError;
-      46              : 
-      47            0 :   @override
-      48            0 :   bool get strictProtocolChecks => _server.strictProtocolChecks;
-      49              : 
-      50              :   /// Creates a [Peer] that communicates over [channel].
-      51              :   ///
-      52              :   /// Note that the peer won't begin listening to [channel] until [Peer.listen]
-      53              :   /// is called.
-      54              :   ///
-      55              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
-      56              :   /// If this is not provided, unhandled exceptions will be swallowed.
-      57              :   ///
-      58              :   /// If [strictProtocolChecks] is false, the underlying [Server] will accept
-      59              :   /// some requests which are not conformant with the JSON-RPC 2.0
-      60              :   /// specification. In particular, requests missing the `jsonrpc` parameter
-      61              :   /// will be accepted.
-      62            8 :   Peer(StreamChannel<String> channel,
-      63              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true})
-      64            8 :       : this.withoutJson(
-      65           32 :             jsonDocument.bind(channel).transform(respondToFormatExceptions),
-      66              :             onUnhandledError: onUnhandledError,
-      67              :             strictProtocolChecks: strictProtocolChecks);
-      68              : 
-      69              :   /// Creates a [Peer] that communicates using decoded messages over [channel].
-      70              :   ///
-      71              :   /// Unlike [Peer], this doesn't read or write JSON strings. Instead, it
-      72              :   /// reads and writes decoded maps or lists.
-      73              :   ///
-      74              :   /// Note that the peer won't begin listening to [channel] until
-      75              :   /// [Peer.listen] is called.
-      76              :   ///
-      77              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
-      78              :   /// If this is not provided, unhandled exceptions will be swallowed.
-      79              :   ///
-      80              :   /// If [strictProtocolChecks] is false, the underlying [Server] will accept
-      81              :   /// some requests which are not conformant with the JSON-RPC 2.0
-      82              :   /// specification. In particular, requests missing the `jsonrpc` parameter
-      83              :   /// will be accepted.
-      84            8 :   Peer.withoutJson(this._channel,
-      85              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true}) {
-      86           16 :     _server = Server.withoutJson(
-      87           40 :         StreamChannel(_serverIncomingForwarder.stream, _channel.sink),
-      88              :         onUnhandledError: onUnhandledError,
-      89              :         strictProtocolChecks: strictProtocolChecks);
-      90           16 :     _client = Client.withoutJson(
-      91           40 :         StreamChannel(_clientIncomingForwarder.stream, _channel.sink));
-      92              :   }
-      93              : 
-      94              :   // Client methods.
-      95              : 
-      96            8 :   @override
-      97              :   Future sendRequest(String method, [parameters, int? id]) =>
-      98           16 :       _client.sendRequest(method, parameters, id);
-      99              : 
-     100            0 :   @override
-     101              :   void sendNotification(String method, [parameters]) =>
-     102            0 :       _client.sendNotification(method, parameters);
-     103              : 
-     104            0 :   @override
-     105            0 :   void withBatch(Function() callback) => _client.withBatch(callback);
-     106              : 
-     107              :   // Server methods.
-     108              : 
-     109            8 :   @override
-     110              :   void registerMethod(String name, Function callback) =>
-     111           16 :       _server.registerMethod(name, callback);
-     112              : 
-     113            0 :   @override
-     114              :   void registerFallback(Function(Parameters parameters) callback) =>
-     115            0 :       _server.registerFallback(callback);
-     116              : 
-     117              :   // Shared methods.
-     118              : 
-     119            8 :   @override
-     120              :   Future listen() {
-     121           16 :     _client.listen();
-     122           16 :     _server.listen();
-     123           32 :     _channel.stream.listen((message) {
-     124            8 :       if (message is Map) {
-     125           16 :         if (message.containsKey('result') || message.containsKey('error')) {
-     126           16 :           _clientIncomingForwarder.add(message);
-     127              :         } else {
-     128           14 :           _serverIncomingForwarder.add(message);
-     129              :         }
-     130            0 :       } else if (message is List &&
-     131            0 :           message.isNotEmpty &&
-     132            0 :           message.first is Map) {
-     133            0 :         if (message.first.containsKey('result') ||
-     134            0 :             message.first.containsKey('error')) {
-     135            0 :           _clientIncomingForwarder.add(message);
-     136              :         } else {
-     137            0 :           _serverIncomingForwarder.add(message);
-     138              :         }
-     139              :       } else {
-     140              :         // Non-Map and -List messages are ill-formed, so we pass them to the
-     141              :         // server since it knows how to send error responses.
-     142            0 :         _serverIncomingForwarder.add(message);
-     143              :       }
-     144            0 :     }, onError: (error, stackTrace) {
-     145            0 :       _serverIncomingForwarder.addError(error, stackTrace);
-     146            8 :     }, onDone: close);
-     147            8 :     return done;
-     148              :   }
-     149              : 
-     150            8 :   @override
-     151              :   Future close() {
-     152           16 :     _client.close();
-     153           16 :     _server.close();
-     154            8 :     return done;
-     155              :   }
-     156              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html deleted file mode 100644 index 35e2d24a..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - server.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html deleted file mode 100644 index e8fba5e2..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - server.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html deleted file mode 100644 index 943d9e9d..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/server.dart.gcov.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/server.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - server.dartCoverageTotalHit
Test:lcov.infoLines:39.2 %9738
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import 'dart:async';
-       6              : import 'dart:collection';
-       7              : import 'dart:convert';
-       8              : 
-       9              : import 'package:stack_trace/stack_trace.dart';
-      10              : import 'package:stream_channel/stream_channel.dart';
-      11              : 
-      12              : import '../error_code.dart' as error_code;
-      13              : import 'exception.dart';
-      14              : import 'parameters.dart';
-      15              : import 'utils.dart';
-      16              : 
-      17              : /// A callback for unhandled exceptions.
-      18              : typedef ErrorCallback = void Function(dynamic error, dynamic stackTrace);
-      19              : 
-      20              : /// A JSON-RPC 2.0 server.
-      21              : ///
-      22              : /// A server exposes methods that are called by requests, to which it provides
-      23              : /// responses. Methods can be registered using [registerMethod] and
-      24              : /// [registerFallback]. Requests can be handled using [handleRequest] and
-      25              : /// [parseRequest].
-      26              : ///
-      27              : /// Note that since requests can arrive asynchronously and methods can run
-      28              : /// asynchronously, it's possible for multiple methods to be invoked at the same
-      29              : /// time, or even for a single method to be invoked multiple times at once.
-      30              : class Server {
-      31              :   final StreamChannel<dynamic> _channel;
-      32              : 
-      33              :   /// The methods registered for this server.
-      34              :   final _methods = <String, Function>{};
-      35              : 
-      36              :   /// The fallback methods for this server.
-      37              :   ///
-      38              :   /// These are tried in order until one of them doesn't throw a
-      39              :   /// [RpcException.methodNotFound] exception.
-      40              :   final _fallbacks = Queue<Function>();
-      41              : 
-      42              :   final _done = Completer<void>();
-      43              : 
-      44              :   /// Returns a [Future] that completes when the underlying connection is
-      45              :   /// closed.
-      46              :   ///
-      47              :   /// This is the same future that's returned by [listen] and [close]. It may
-      48              :   /// complete before [close] is called if the remote endpoint closes the
-      49              :   /// connection.
-      50           24 :   Future get done => _done.future;
-      51              : 
-      52              :   /// Whether the underlying connection is closed.
-      53              :   ///
-      54              :   /// Note that this will be `true` before [close] is called if the remote
-      55              :   /// endpoint closes the connection.
-      56           24 :   bool get isClosed => _done.isCompleted;
-      57              : 
-      58              :   /// A callback that is fired on unhandled exceptions.
-      59              :   ///
-      60              :   /// In the case where a user provided callback results in an exception that
-      61              :   /// cannot be properly routed back to the client, this handler will be
-      62              :   /// invoked. If it is not set, the exception will be swallowed.
-      63              :   final ErrorCallback? onUnhandledError;
-      64              : 
-      65              :   /// Whether to strictly enforce the JSON-RPC 2.0 specification for received
-      66              :   /// messages.
-      67              :   ///
-      68              :   /// If `false`, this [Server] will accept some requests which are not
-      69              :   /// conformant with the JSON-RPC 2.0 specification. In particular, requests
-      70              :   /// missing the `jsonrpc` parameter will be accepted.
-      71              :   final bool strictProtocolChecks;
-      72              : 
-      73              :   /// Creates a [Server] that communicates over [channel].
-      74              :   ///
-      75              :   /// Note that the server won't begin listening to [requests] until
-      76              :   /// [Server.listen] is called.
-      77              :   ///
-      78              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
-      79              :   /// If this is not provided, unhandled exceptions will be swallowed.
-      80              :   ///
-      81              :   /// If [strictProtocolChecks] is false, this [Server] will accept some
-      82              :   /// requests which are not conformant with the JSON-RPC 2.0 specification. In
-      83              :   /// particular, requests missing the `jsonrpc` parameter will be accepted.
-      84            0 :   Server(StreamChannel<String> channel,
-      85              :       {ErrorCallback? onUnhandledError, bool strictProtocolChecks = true})
-      86            0 :       : this.withoutJson(
-      87            0 :             jsonDocument.bind(channel).transform(respondToFormatExceptions),
-      88              :             onUnhandledError: onUnhandledError,
-      89              :             strictProtocolChecks: strictProtocolChecks);
-      90              : 
-      91              :   /// Creates a [Server] that communicates using decoded messages over
-      92              :   /// [channel].
-      93              :   ///
-      94              :   /// Unlike [Server], this doesn't read or write JSON strings. Instead, it
-      95              :   /// reads and writes decoded maps or lists.
-      96              :   ///
-      97              :   /// Note that the server won't begin listening to [requests] until
-      98              :   /// [Server.listen] is called.
-      99              :   ///
-     100              :   /// Unhandled exceptions in callbacks will be forwarded to [onUnhandledError].
-     101              :   /// If this is not provided, unhandled exceptions will be swallowed.
-     102              :   ///
-     103              :   /// If [strictProtocolChecks] is false, this [Server] will accept some
-     104              :   /// requests which are not conformant with the JSON-RPC 2.0 specification. In
-     105              :   /// particular, requests missing the `jsonrpc` parameter will be accepted.
-     106            8 :   Server.withoutJson(this._channel,
-     107              :       {this.onUnhandledError, this.strictProtocolChecks = true});
-     108              : 
-     109              :   /// Starts listening to the underlying stream.
-     110              :   ///
-     111              :   /// Returns a [Future] that will complete when the connection is closed or
-     112              :   /// when it has an error. This is the same as [done].
-     113              :   ///
-     114              :   /// [listen] may only be called once.
-     115            8 :   Future listen() {
-     116           32 :     _channel.stream.listen(_handleRequest, onError: (error, stackTrace) {
-     117            0 :       _done.completeError(error, stackTrace);
-     118            0 :       _channel.sink.close();
-     119            0 :     }, onDone: () {
-     120            0 :       if (!_done.isCompleted) _done.complete();
-     121              :     });
-     122            8 :     return done;
-     123              :   }
-     124              : 
-     125              :   /// Closes the underlying connection.
-     126              :   ///
-     127              :   /// Returns a [Future] that completes when all resources have been released.
-     128              :   /// This is the same as [done].
-     129            8 :   Future close() {
-     130           24 :     _channel.sink.close();
-     131           32 :     if (!_done.isCompleted) _done.complete();
-     132            8 :     return done;
-     133              :   }
-     134              : 
-     135              :   /// Registers a method named [name] on this server.
-     136              :   ///
-     137              :   /// [callback] can take either zero or one arguments. If it takes zero, any
-     138              :   /// requests for that method that include parameters will be rejected. If it
-     139              :   /// takes one, it will be passed a [Parameters] object.
-     140              :   ///
-     141              :   /// [callback] can return either a JSON-serializable object or a Future that
-     142              :   /// completes to a JSON-serializable object. Any errors in [callback] will be
-     143              :   /// reported to the client as JSON-RPC 2.0 errors.
-     144            8 :   void registerMethod(String name, Function callback) {
-     145           16 :     if (_methods.containsKey(name)) {
-     146            0 :       throw ArgumentError('There\'s already a method named "$name".');
-     147              :     }
-     148              : 
-     149           16 :     _methods[name] = callback;
-     150              :   }
-     151              : 
-     152              :   /// Registers a fallback method on this server.
-     153              :   ///
-     154              :   /// A server may have any number of fallback methods. When a request comes in
-     155              :   /// that doesn't match any named methods, each fallback is tried in order. A
-     156              :   /// fallback can pass on handling a request by throwing a
-     157              :   /// [RpcException.methodNotFound] exception.
-     158              :   ///
-     159              :   /// [callback] can return either a JSON-serializable object or a Future that
-     160              :   /// completes to a JSON-serializable object. Any errors in [callback] will be
-     161              :   /// reported to the client as JSON-RPC 2.0 errors. [callback] may send custom
-     162              :   /// errors by throwing an [RpcException].
-     163            0 :   void registerFallback(Function(Parameters parameters) callback) {
-     164            0 :     _fallbacks.add(callback);
-     165              :   }
-     166              : 
-     167              :   /// Handle a request.
-     168              :   ///
-     169              :   /// [request] is expected to be a JSON-serializable object representing a
-     170              :   /// request sent by a client. This calls the appropriate method or methods for
-     171              :   /// handling that request and returns a JSON-serializable response, or `null`
-     172              :   /// if no response should be sent. [callback] may send custom
-     173              :   /// errors by throwing an [RpcException].
-     174            7 :   Future _handleRequest(request) async {
-     175              :     dynamic response;
-     176            7 :     if (request is List) {
-     177            0 :       if (request.isEmpty) {
-     178            0 :         response = RpcException(error_code.INVALID_REQUEST,
-     179              :                 'A batch must contain at least one request.')
-     180            0 :             .serialize(request);
-     181              :       } else {
-     182            0 :         var results = await Future.wait(request.map(_handleSingleRequest));
-     183            0 :         var nonNull = results.where((result) => result != null);
-     184            0 :         if (nonNull.isEmpty) return;
-     185            0 :         response = nonNull.toList();
-     186              :       }
-     187              :     } else {
-     188            7 :       response = await _handleSingleRequest(request);
-     189              :       if (response == null) return;
-     190              :     }
-     191              : 
-     192           28 :     if (!isClosed) _channel.sink.add(response);
-     193              :   }
-     194              : 
-     195              :   /// Handles an individual parsed request.
-     196            7 :   Future _handleSingleRequest(request) async {
-     197              :     try {
-     198            7 :       _validateRequest(request);
-     199              : 
-     200            7 :       var name = request['method'];
-     201           14 :       var method = _methods[name];
-     202            0 :       method ??= _tryFallbacks;
-     203              : 
-     204              :       Object? result;
-     205            7 :       if (method is ZeroArgumentFunction) {
-     206            0 :         if (request.containsKey('params')) {
-     207            0 :           throw RpcException.invalidParams('No parameters are allowed for '
-     208              :               'method "$name".');
-     209              :         }
-     210            0 :         result = await method();
-     211              :       } else {
-     212           21 :         result = await method(Parameters(name, request['params']));
-     213              :       }
-     214              : 
-     215              :       // A request without an id is a notification, which should not be sent a
-     216              :       // response, even if one is generated on the server.
-     217            7 :       if (!request.containsKey('id')) return null;
-     218              : 
-     219           14 :       return {'jsonrpc': '2.0', 'result': result, 'id': request['id']};
-     220              :     } catch (error, stackTrace) {
-     221            0 :       if (error is RpcException) {
-     222            0 :         if (error.code == error_code.INVALID_REQUEST ||
-     223            0 :             request.containsKey('id')) {
-     224            0 :           return error.serialize(request);
-     225              :         } else {
-     226            0 :           onUnhandledError?.call(error, stackTrace);
-     227              :           return null;
-     228              :         }
-     229            0 :       } else if (!request.containsKey('id')) {
-     230            0 :         onUnhandledError?.call(error, stackTrace);
-     231              :         return null;
-     232              :       }
-     233            0 :       final chain = Chain.forTrace(stackTrace);
-     234            0 :       return RpcException(error_code.SERVER_ERROR, getErrorMessage(error),
-     235            0 :           data: {
-     236            0 :             'full': '$error',
-     237            0 :             'stack': '$chain',
-     238            0 :           }).serialize(request);
-     239              :     }
-     240              :   }
-     241              : 
-     242              :   /// Validates that [request] matches the JSON-RPC spec.
-     243            7 :   void _validateRequest(request) {
-     244            7 :     if (request is! Map) {
-     245            0 :       throw RpcException(
-     246              :           error_code.INVALID_REQUEST,
-     247              :           'Request must be '
-     248              :           'an Array or an Object.');
-     249              :     }
-     250              : 
-     251           14 :     if (strictProtocolChecks && !request.containsKey('jsonrpc')) {
-     252            0 :       throw RpcException(
-     253              :           error_code.INVALID_REQUEST,
-     254              :           'Request must '
-     255              :           'contain a "jsonrpc" key.');
-     256              :     }
-     257              : 
-     258            7 :     if ((strictProtocolChecks || request.containsKey('jsonrpc')) &&
-     259           14 :         request['jsonrpc'] != '2.0') {
-     260            0 :       throw RpcException(
-     261            0 :           error_code.INVALID_REQUEST,
-     262              :           'Invalid JSON-RPC '
-     263            0 :           'version ${jsonEncode(request['jsonrpc'])}, expected "2.0".');
-     264              :     }
-     265              : 
-     266            7 :     if (!request.containsKey('method')) {
-     267            0 :       throw RpcException(
-     268              :           error_code.INVALID_REQUEST,
-     269              :           'Request must '
-     270              :           'contain a "method" key.');
-     271              :     }
-     272              : 
-     273            7 :     var method = request['method'];
-     274           14 :     if (request['method'] is! String) {
-     275            0 :       throw RpcException(
-     276            0 :           error_code.INVALID_REQUEST,
-     277              :           'Request method must '
-     278            0 :           'be a string, but was ${jsonEncode(method)}.');
-     279              :     }
-     280              : 
-     281            7 :     if (request.containsKey('params')) {
-     282            7 :       var params = request['params'];
-     283           14 :       if (params is! List && params is! Map) {
-     284            0 :         throw RpcException(
-     285            0 :             error_code.INVALID_REQUEST,
-     286              :             'Request params must '
-     287            0 :             'be an Array or an Object, but was ${jsonEncode(params)}.');
-     288              :       }
-     289              :     }
-     290              : 
-     291            7 :     var id = request['id'];
-     292           14 :     if (id != null && id is! String && id is! num) {
-     293            0 :       throw RpcException(
-     294            0 :           error_code.INVALID_REQUEST,
-     295              :           'Request id must be a '
-     296            0 :           'string, number, or null, but was ${jsonEncode(id)}.');
-     297              :     }
-     298              :   }
-     299              : 
-     300              :   /// Try all the fallback methods in order.
-     301            0 :   Future _tryFallbacks(Parameters params) {
-     302            0 :     var iterator = _fallbacks.toList().iterator;
-     303              : 
-     304            0 :     Future tryNext() async {
-     305            0 :       if (!iterator.moveNext()) {
-     306            0 :         throw RpcException.methodNotFound(params.method);
-     307              :       }
-     308              : 
-     309              :       try {
-     310            0 :         return await iterator.current(params);
-     311            0 :       } on RpcException catch (error) {
-     312            0 :         if (error.code != error_code.METHOD_NOT_FOUND) rethrow;
-     313            0 :         return tryNext();
-     314              :       }
-     315              :     }
-     316              : 
-     317            0 :     return tryNext();
-     318              :   }
-     319              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html deleted file mode 100644 index e2c4c6f7..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html deleted file mode 100644 index 72222ef4..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html b/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html deleted file mode 100644 index ca94c96a..00000000 --- a/coverage/html/core/relay_client/json_rpc_2/src/utils.dart.gcov.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/json_rpc_2/src/utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/json_rpc_2/src - utils.dartCoverageTotalHit
Test:lcov.infoLines:22.7 %225
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-       2              : // for details. All rights reserved. Use of this source code is governed by a
-       3              : // BSD-style license that can be found in the LICENSE file.
-       4              : 
-       5              : import 'dart:async';
-       6              : 
-       7              : import 'package:stream_channel/stream_channel.dart';
-       8              : 
-       9              : import '../error_code.dart' as error_code;
-      10              : import 'exception.dart';
-      11              : 
-      12              : typedef ZeroArgumentFunction = Function();
-      13              : 
-      14              : /// A regular expression to match the exception prefix that some exceptions'
-      15              : /// [Object.toString] values contain.
-      16            0 : final _exceptionPrefix = RegExp(r'^([A-Z][a-zA-Z]*)?(Exception|Error): ');
-      17              : 
-      18              : /// Get a string description of an exception.
-      19              : ///
-      20              : /// Many exceptions include the exception class name at the beginning of their
-      21              : /// [toString], so we remove that if it exists.
-      22            0 : String getErrorMessage(error) =>
-      23            0 :     error.toString().replaceFirst(_exceptionPrefix, '');
-      24              : 
-      25              : /// Like `try`/`finally`, run [body] and ensure that [whenComplete] runs
-      26              : /// afterwards, regardless of whether [body] succeeded.
-      27              : ///
-      28              : /// This is synchronicity-agnostic relative to [body]. If [body] returns a
-      29              : /// [Future], this wil run asynchronously; otherwise it will run synchronously.
-      30            0 : void tryFinally(Function() body, Function() whenComplete) {
-      31              :   dynamic result;
-      32              :   try {
-      33            0 :     result = body();
-      34              :   } catch (_) {
-      35            0 :     whenComplete();
-      36              :     rethrow;
-      37              :   }
-      38              : 
-      39            0 :   if (result is! Future) {
-      40            0 :     whenComplete();
-      41              :   } else {
-      42            0 :     result.whenComplete(whenComplete);
-      43              :   }
-      44              : }
-      45              : 
-      46              : /// A transformer that silently drops [FormatException]s.
-      47            0 : final ignoreFormatExceptions = StreamTransformer<Object?, Object?>.fromHandlers(
-      48            0 :     handleError: (error, stackTrace, sink) {
-      49            0 :   if (error is FormatException) return;
-      50            0 :   sink.addError(error, stackTrace);
-      51              : });
-      52              : 
-      53              : /// A transformer that sends error responses on [FormatException]s.
-      54           16 : final StreamChannelTransformer<Object?, Object?> respondToFormatExceptions =
-      55            8 :     _RespondToFormatExceptionsTransformer();
-      56              : 
-      57              : class _RespondToFormatExceptionsTransformer
-      58              :     implements StreamChannelTransformer<Object?, Object?> {
-      59            8 :   @override
-      60              :   StreamChannel<Object?> bind(StreamChannel<Object?> channel) {
-      61           16 :     return channel.changeStream((stream) {
-      62            8 :       return stream.handleError((dynamic error) {
-      63              :         final formatException = error as FormatException;
-      64            0 :         var exception = RpcException(
-      65            0 :             error_code.PARSE_ERROR, 'Invalid JSON: ${formatException.message}');
-      66            0 :         channel.sink.add(exception.serialize(formatException.source));
-      67            0 :       }, test: (error) => error is FormatException);
-      68              :     });
-      69              :   }
-      70              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/message_tracker.dart.func-c.html b/coverage/html/core/relay_client/message_tracker.dart.func-c.html deleted file mode 100644 index 9bbe532d..00000000 --- a/coverage/html/core/relay_client/message_tracker.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/message_tracker.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - message_tracker.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/message_tracker.dart.func.html b/coverage/html/core/relay_client/message_tracker.dart.func.html deleted file mode 100644 index f735d54f..00000000 --- a/coverage/html/core/relay_client/message_tracker.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/message_tracker.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - message_tracker.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/message_tracker.dart.gcov.html b/coverage/html/core/relay_client/message_tracker.dart.gcov.html deleted file mode 100644 index 1a9f3a38..00000000 --- a/coverage/html/core/relay_client/message_tracker.dart.gcov.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/message_tracker.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - message_tracker.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1818
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:typed_data';
-       3              : 
-       4              : import 'package:convert/convert.dart';
-       5              : import 'package:pointycastle/digests/sha256.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_message_tracker.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/store/store_models.dart';
-       9              : 
-      10              : class MessageTracker extends GenericStore<Map<String, String>>
-      11              :     implements IMessageTracker {
-      12           11 :   MessageTracker({
-      13              :     required super.storage,
-      14              :     required super.context,
-      15              :     required super.version,
-      16              :     required super.fromJson,
-      17              :   });
-      18              : 
-      19            8 :   String hashMessage(String message) {
-      20            8 :     return hex.encode(
-      21           16 :       SHA256Digest().process(
-      22            8 :         Uint8List.fromList(
-      23            8 :           utf8.encode(message),
-      24              :         ),
-      25              :       ),
-      26              :     );
-      27              :   }
-      28              : 
-      29            8 :   @override
-      30              :   Future<void> recordMessageEvent(String topic, String message) async {
-      31            8 :     final String hash = hashMessage(message);
-      32              : 
-      33           16 :     onCreate.broadcast(
-      34            8 :       StoreCreateEvent(
-      35              :         topic,
-      36            8 :         {hash: message},
-      37              :       ),
-      38              :     );
-      39              : 
-      40           16 :     if (!data.containsKey(topic)) {
-      41           24 :       data[topic] = {};
-      42              :     }
-      43           24 :     data[topic]![hash] = message;
-      44            8 :     await persist();
-      45              :   }
-      46              : 
-      47            8 :   @override
-      48              :   bool messageIsRecorded(String topic, String message) {
-      49            8 :     final String hash = hashMessage(message);
-      50           40 :     return data.containsKey(topic) && data[topic]!.containsKey(hash);
-      51              :   }
-      52              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client.dart.func-c.html b/coverage/html/core/relay_client/relay_client.dart.func-c.html deleted file mode 100644 index 04c62e61..00000000 --- a/coverage/html/core/relay_client/relay_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client.dart.func.html b/coverage/html/core/relay_client/relay_client.dart.func.html deleted file mode 100644 index da54d500..00000000 --- a/coverage/html/core/relay_client/relay_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client.dart.gcov.html b/coverage/html/core/relay_client/relay_client.dart.gcov.html deleted file mode 100644 index 8bc73788..00000000 --- a/coverage/html/core/relay_client/relay_client.dart.gcov.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client.dartCoverageTotalHit
Test:lcov.infoLines:86.6 %172149
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_message_tracker.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_relay_client.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/json_rpc_2/src/parameters.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/json_rpc_2/src/peer.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/websocket_handler.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-      15              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-      16              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-      17              : import 'package:walletconnect_flutter_v2/apis/utils/walletconnect_utils.dart';
-      18              : 
-      19              : class RelayClient implements IRelayClient {
-      20              :   static const JSON_RPC_PUBLISH = 'publish';
-      21              :   static const JSON_RPC_SUBSCRIPTION = 'subscription';
-      22              :   static const JSON_RPC_SUBSCRIBE = 'subscribe';
-      23              :   static const JSON_RPC_UNSUBSCRIBE = 'unsubscribe';
-      24              : 
-      25              :   /// Events ///
-      26              :   /// Relay Client
-      27              : 
-      28              :   @override
-      29              :   final Event<EventArgs> onRelayClientConnect = Event();
-      30              : 
-      31              :   @override
-      32              :   final Event<EventArgs> onRelayClientDisconnect = Event();
-      33              : 
-      34              :   @override
-      35              :   final Event<ErrorEvent> onRelayClientError = Event<ErrorEvent>();
-      36              : 
-      37              :   @override
-      38              :   final Event<MessageEvent> onRelayClientMessage = Event<MessageEvent>();
-      39              : 
-      40              :   /// Subscriptions
-      41              :   @override
-      42              :   final Event<SubscriptionEvent> onSubscriptionCreated =
-      43              :       Event<SubscriptionEvent>();
-      44              : 
-      45              :   @override
-      46              :   final Event<SubscriptionDeletionEvent> onSubscriptionDeleted =
-      47              :       Event<SubscriptionDeletionEvent>();
-      48              : 
-      49              :   @override
-      50              :   final Event<EventArgs> onSubscriptionResubscribed = Event();
-      51              : 
-      52              :   @override
-      53              :   final Event<EventArgs> onSubscriptionSync = Event();
-      54              : 
-      55            9 :   @override
-      56           25 :   bool get isConnected => jsonRPC != null && !jsonRPC!.isClosed;
-      57              : 
-      58           20 :   bool get _relayIsClosed => jsonRPC != null && jsonRPC!.isClosed;
-      59              : 
-      60              :   bool _initialized = false;
-      61              :   bool _active = true;
-      62              :   bool _connecting = false;
-      63              :   Future _connectingFuture = Future.value();
-      64              :   bool _handledClose = false;
-      65              : 
-      66              :   // late WebSocketChannel socket;
-      67              :   // IWebSocketHandler? socket;
-      68              :   Peer? jsonRPC;
-      69              : 
-      70              :   /// Stores all the subs that haven't been completed
-      71              :   Map<String, Future<dynamic>> pendingSubscriptions = {};
-      72              : 
-      73              :   IMessageTracker messageTracker;
-      74              :   IGenericStore<String> topicMap;
-      75              :   final IWebSocketHandler socketHandler;
-      76              : 
-      77              :   ICore core;
-      78              : 
-      79              :   bool _subscribedToHeartbeat = false;
-      80              : 
-      81           10 :   RelayClient({
-      82              :     required this.core,
-      83              :     required this.messageTracker,
-      84              :     required this.topicMap,
-      85              :     IWebSocketHandler? socketHandler,
-      86           10 :   }) : socketHandler = socketHandler ?? WebSocketHandler();
-      87              : 
-      88            9 :   @override
-      89              :   Future<void> init() async {
-      90            9 :     if (_initialized) {
-      91              :       return;
-      92              :     }
-      93              : 
-      94           18 :     await messageTracker.init();
-      95           18 :     await topicMap.init();
-      96              : 
-      97              :     // Setup the json RPC server
-      98            9 :     await _connect();
-      99            9 :     _subscribeToHeartbeat();
-     100              : 
-     101            9 :     _initialized = true;
-     102              :   }
-     103              : 
-     104            7 :   @override
-     105              :   Future<void> publish({
-     106              :     required String topic,
-     107              :     required String message,
-     108              :     required int ttl,
-     109              :     required int tag,
-     110              :   }) async {
-     111            7 :     _checkInitialized();
-     112              : 
-     113            7 :     Map<String, dynamic> data = {
-     114              :       'message': message,
-     115              :       'ttl': ttl,
-     116              :       'topic': topic,
-     117              :       'tag': tag,
-     118              :     };
-     119              : 
-     120              :     try {
-     121           14 :       await messageTracker.recordMessageEvent(topic, message);
-     122            7 :       var _ = await _sendJsonRpcRequest(
-     123            7 :         _buildMethod(JSON_RPC_PUBLISH),
-     124              :         data,
-     125            7 :         JsonRpcUtils.payloadId(entropy: 6),
-     126              :       );
-     127              :     } catch (e) {
-     128              :       // print(e);
-     129           15 :       onRelayClientError.broadcast(ErrorEvent(e));
-     130              :     }
-     131              :   }
-     132              : 
-     133            7 :   @override
-     134              :   Future<String> subscribe({required String topic}) async {
-     135            7 :     _checkInitialized();
-     136              : 
-     137           21 :     pendingSubscriptions[topic] = _onSubscribe(topic);
-     138              : 
-     139           14 :     return await pendingSubscriptions[topic];
-     140              :   }
-     141              : 
-     142            5 :   @override
-     143              :   Future<void> unsubscribe({required String topic}) async {
-     144            5 :     _checkInitialized();
-     145              : 
-     146           10 :     String id = topicMap.get(topic) ?? '';
-     147              : 
-     148              :     try {
-     149            5 :       await _sendJsonRpcRequest(
-     150            5 :         _buildMethod(JSON_RPC_UNSUBSCRIBE),
-     151            5 :         {
-     152              :           'topic': topic,
-     153              :           'id': id,
-     154              :         },
-     155            5 :         JsonRpcUtils.payloadId(entropy: 6),
-     156              :       );
-     157              :     } catch (e) {
-     158           12 :       onRelayClientError.broadcast(ErrorEvent(e));
-     159              :     }
-     160              : 
-     161              :     // Remove the subscription
-     162           10 :     pendingSubscriptions.remove(topic);
-     163           10 :     await topicMap.delete(topic);
-     164              : 
-     165              :     // Delete all the messages
-     166           10 :     await messageTracker.delete(topic);
-     167              :   }
-     168              : 
-     169            0 :   @override
-     170              :   Future<void> connect({String? relayUrl}) async {
-     171            0 :     _checkInitialized();
-     172              : 
-     173            0 :     core.logger.i('RelayClient: Connecting to relay');
-     174              : 
-     175            0 :     await _connect(relayUrl: relayUrl);
-     176              :   }
-     177              : 
-     178            8 :   @override
-     179              :   Future<void> disconnect() async {
-     180            8 :     _checkInitialized();
-     181              : 
-     182           24 :     core.logger.i('RelayClient: Disconnecting from relay');
-     183              : 
-     184            8 :     await _disconnect();
-     185              :   }
-     186              : 
-     187              :   /// PRIVATE FUNCTIONS ///
-     188              : 
-     189            9 :   Future<void> _connect({String? relayUrl}) async {
-     190            9 :     if (isConnected) {
-     191              :       return;
-     192              :     }
-     193              : 
-     194           36 :     core.relayUrl = relayUrl ?? core.relayUrl;
-     195           63 :     core.logger.d('[$runtimeType] Connecting to relay ${core.relayUrl}');
-     196              : 
-     197              :     // If we have tried connecting to the relay before, disconnect
-     198            9 :     if (_active) {
-     199            9 :       await _disconnect();
-     200              :     }
-     201              : 
-     202              :     try {
-     203              :       // Connect and track the connection progress, then start the heartbeat
-     204           18 :       _connectingFuture = _createJsonRPCProvider();
-     205            9 :       await _connectingFuture;
-     206            8 :       _connecting = false;
-     207            8 :       _subscribeToHeartbeat();
-     208              :       //
-     209            2 :     } on TimeoutException catch (e) {
-     210            0 :       core.logger.d('[$runtimeType] Connect timeout: $e');
-     211            0 :       onRelayClientError.broadcast(ErrorEvent('Connection to relay timeout'));
-     212            0 :       _connecting = false;
-     213            0 :       _connect();
-     214              :     } catch (e) {
-     215           10 :       core.logger.d('[$runtimeType] Connect error: $e');
-     216            6 :       onRelayClientError.broadcast(ErrorEvent(e));
-     217            2 :       _connecting = false;
-     218              :     }
-     219              :   }
-     220              : 
-     221            9 :   Future<void> _disconnect() async {
-     222           27 :     core.logger.t('RelayClient Internal: Disconnecting from relay');
-     223            9 :     _active = false;
-     224              : 
-     225            9 :     final bool shouldBroadcastDisonnect = isConnected;
-     226              : 
-     227           17 :     await jsonRPC?.close();
-     228            9 :     jsonRPC = null;
-     229           18 :     await socketHandler.close();
-     230            9 :     _unsubscribeToHeartbeat();
-     231              : 
-     232              :     if (shouldBroadcastDisonnect) {
-     233           16 :       onRelayClientDisconnect.broadcast();
-     234              :     }
-     235              :   }
-     236              : 
-     237            9 :   Future<void> _createJsonRPCProvider() async {
-     238            9 :     _connecting = true;
-     239            9 :     _active = true;
-     240           45 :     final auth = await core.crypto.signJWT(core.relayUrl);
-     241           36 :     core.logger.t('Signed JWT: $auth');
-     242            9 :     final url = WalletConnectUtils.formatRelayRpcUrl(
-     243              :       protocol: WalletConnectConstants.CORE_PROTOCOL,
-     244              :       version: WalletConnectConstants.CORE_VERSION,
-     245           18 :       relayUrl: core.relayUrl,
-     246              :       sdkVersion: WalletConnectConstants.SDK_VERSION,
-     247              :       auth: auth,
-     248           18 :       projectId: core.projectId,
-     249            9 :       packageName: (await WalletConnectUtils.getPackageName()),
-     250              :     );
-     251              : 
-     252            9 :     if (jsonRPC != null) {
-     253            0 :       await jsonRPC!.close();
-     254            0 :       jsonRPC = null;
-     255              :     }
-     256              : 
-     257           36 :     core.logger.t('Initializing WebSocket with $url');
-     258           18 :     await socketHandler.setup(url: url);
-     259           34 :     await socketHandler.connect().timeout(Duration(seconds: 5));
-     260              : 
-     261           32 :     jsonRPC = Peer(socketHandler.channel!);
-     262              : 
-     263           16 :     jsonRPC!.registerMethod(
-     264            8 :       _buildMethod(JSON_RPC_SUBSCRIPTION),
-     265            8 :       _handleSubscription,
-     266              :     );
-     267           16 :     jsonRPC!.registerMethod(
-     268            8 :       _buildMethod(JSON_RPC_SUBSCRIBE),
-     269            8 :       _handleSubscribe,
-     270              :     );
-     271           16 :     jsonRPC!.registerMethod(
-     272            8 :       _buildMethod(JSON_RPC_UNSUBSCRIBE),
-     273            8 :       _handleUnsubscribe,
-     274              :     );
-     275              : 
-     276           16 :     if (jsonRPC!.isClosed) {
-     277              :       throw const WalletConnectError(
-     278              :         code: 0,
-     279              :         message: 'WebSocket closed',
-     280              :       );
-     281              :     }
-     282              : 
-     283           16 :     jsonRPC!.listen();
-     284              : 
-     285              :     // When jsonRPC closes, emit the event
-     286            8 :     _handledClose = false;
-     287           24 :     jsonRPC!.done.then(
-     288            8 :       (value) {
-     289            8 :         _handleRelayClose(
-     290           16 :           socketHandler.closeCode,
-     291           16 :           socketHandler.closeReason,
-     292              :         );
-     293              :       },
-     294              :     );
-     295              : 
-     296           16 :     onRelayClientConnect.broadcast();
-     297           56 :     core.logger.d('[$runtimeType] Connected to relay ${core.relayUrl}');
-     298              :   }
-     299              : 
-     300            8 :   Future<void> _handleRelayClose(int? code, String? reason) async {
-     301            8 :     if (_handledClose) {
-     302            0 :       core.logger.i('Relay close already handled');
-     303              :       return;
-     304              :     }
-     305            8 :     _handledClose = true;
-     306              : 
-     307           32 :     core.logger.i('Handling relay close, code: $code, reason: $reason');
-     308              :     // If the relay isn't active (Disconnected manually), don't do anything
-     309            8 :     if (!_active) {
-     310              :       return;
-     311              :     }
-     312              : 
-     313              :     // If the code requires reconnect, do so
-     314            1 :     final reconnectCodes = [1001, 4008, 4010, 1002, 1005, 10002];
-     315              :     if (code != null) {
-     316            1 :       if (reconnectCodes.contains(code)) {
-     317            0 :         await connect();
-     318              :       } else {
-     319            1 :         await disconnect();
-     320            1 :         final errorReason = code == 3000
-     321              :             ? reason ?? WebSocketErrors.INVALID_PROJECT_ID_OR_JWT
-     322              :             : '';
-     323            2 :         onRelayClientError.broadcast(
-     324            2 :           ErrorEvent(WalletConnectError(
-     325              :             code: code,
-     326              :             message: errorReason,
-     327              :           )),
-     328              :         );
-     329              :       }
-     330              :     }
-     331              :   }
-     332              : 
-     333            9 :   void _subscribeToHeartbeat() {
-     334            9 :     if (!_subscribedToHeartbeat) {
-     335           45 :       core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
-     336            9 :       _subscribedToHeartbeat = true;
-     337              :     }
-     338              :   }
-     339              : 
-     340            9 :   void _unsubscribeToHeartbeat() {
-     341           45 :     core.heartbeat.onPulse.unsubscribe(_heartbeatSubscription);
-     342            9 :     _subscribedToHeartbeat = false;
-     343              :   }
-     344              : 
-     345            5 :   void _heartbeatSubscription(EventArgs? args) async {
-     346            5 :     if (_relayIsClosed) {
-     347            0 :       await _handleRelayClose(10002, null);
-     348              :     }
-     349              :   }
-     350              : 
-     351            8 :   String _buildMethod(String method) {
-     352            8 :     return '${WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL}_$method';
-     353              :   }
-     354              : 
-     355              :   /// JSON RPC MESSAGE HANDLERS
-     356              : 
-     357            7 :   Future<bool> handlePublish(String topic, String message) async {
-     358           28 :     core.logger.t('Handling Publish Message: $topic, $message');
-     359              :     // If we want to ignore the message, stop
-     360            7 :     if (await _shouldIgnoreMessageEvent(topic, message)) {
-     361           24 :       core.logger.w('Ignoring Message: $topic, $message');
-     362              :       return false;
-     363              :     }
-     364              : 
-     365              :     // Record a message event
-     366           14 :     await messageTracker.recordMessageEvent(topic, message);
-     367              : 
-     368              :     // Broadcast the message
-     369           14 :     onRelayClientMessage.broadcast(
-     370            7 :       MessageEvent(
-     371              :         topic,
-     372              :         message,
-     373              :       ),
-     374              :     );
-     375              :     return true;
-     376              :   }
-     377              : 
-     378            7 :   Future<bool> _handleSubscription(Parameters params) async {
-     379           21 :     String topic = params['data']['topic'].value;
-     380           21 :     String message = params['data']['message'].value;
-     381            7 :     return await handlePublish(topic, message);
-     382              :   }
-     383              : 
-     384            0 :   int _handleSubscribe(Parameters params) {
-     385            0 :     return params.hashCode;
-     386              :   }
-     387              : 
-     388            0 :   void _handleUnsubscribe(Parameters params) {
-     389            0 :     core.logger.i('[$runtimeType] _handleUnsubscribe $params');
-     390              :   }
-     391              : 
-     392              :   /// MESSAGE HANDLING
-     393              : 
-     394            7 :   Future<bool> _shouldIgnoreMessageEvent(String topic, String message) async {
-     395            7 :     if (!await _isSubscribed(topic)) return true;
-     396           14 :     return messageTracker.messageIsRecorded(topic, message);
-     397              :   }
-     398              : 
-     399              :   /// SUBSCRIPTION HANDLING
-     400              : 
-     401            8 :   Future _sendJsonRpcRequest(
-     402              :     String method, [
-     403              :     dynamic parameters,
-     404              :     int? id,
-     405              :   ]) async {
-     406              :     // If we are connected and we know it send the message!
-     407            8 :     if (isConnected) {
-     408              :       // Here so we dont return null
-     409              :     }
-     410              :     // If we are connecting, then wait for the connection to establish and then send the message
-     411            5 :     else if (_connecting) {
-     412            0 :       await _connectingFuture;
-     413              :     }
-     414              :     // If we aren't connected but should be (active), try to (re)connect and then send the message
-     415           10 :     else if (!isConnected && _active) {
-     416            0 :       await connect();
-     417              :     }
-     418              :     // In all other cases return null
-     419              :     else {
-     420              :       return null;
-     421              :     }
-     422           16 :     return await jsonRPC!.sendRequest(
-     423              :       method,
-     424              :       parameters,
-     425              :       id,
-     426              :     );
-     427              :   }
-     428              : 
-     429            7 :   Future<String> _onSubscribe(String topic) async {
-     430              :     String? requestId;
-     431              :     try {
-     432            7 :       requestId = await _sendJsonRpcRequest(
-     433            7 :         _buildMethod(JSON_RPC_SUBSCRIBE),
-     434            7 :         {'topic': topic},
-     435            7 :         JsonRpcUtils.payloadId(entropy: 6),
-     436              :       );
-     437              :     } catch (e) {
-     438            4 :       core.logger.w('RelayClient, onSubscribe error. Topic: $topic, Error: $e');
-     439            3 :       onRelayClientError.broadcast(ErrorEvent(e));
-     440              :     }
-     441              : 
-     442              :     if (requestId == null) {
-     443              :       return '';
-     444              :     }
-     445              : 
-     446           21 :     await topicMap.set(topic, requestId.toString());
-     447           14 :     pendingSubscriptions.remove(topic);
-     448              : 
-     449              :     return requestId;
-     450              :   }
-     451              : 
-     452            7 :   Future<bool> _isSubscribed(String topic) async {
-     453           14 :     if (topicMap.has(topic)) {
-     454              :       return true;
-     455              :     }
-     456              : 
-     457            0 :     if (pendingSubscriptions.containsKey(topic)) {
-     458            0 :       await pendingSubscriptions[topic];
-     459            0 :       return topicMap.has(topic);
-     460              :     }
-     461              : 
-     462              :     return false;
-     463              :   }
-     464              : 
-     465            8 :   void _checkInitialized() {
-     466            8 :     if (!_initialized) {
-     467            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     468              :     }
-     469              :   }
-     470              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client_models.dart.func-c.html b/coverage/html/core/relay_client/relay_client_models.dart.func-c.html deleted file mode 100644 index 730cbd9d..00000000 --- a/coverage/html/core/relay_client/relay_client_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client_models.dart.func.html b/coverage/html/core/relay_client/relay_client_models.dart.func.html deleted file mode 100644 index a077498a..00000000 --- a/coverage/html/core/relay_client/relay_client_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/relay_client_models.dart.gcov.html b/coverage/html/core/relay_client/relay_client_models.dart.gcov.html deleted file mode 100644 index 18cb008d..00000000 --- a/coverage/html/core/relay_client/relay_client_models.dart.gcov.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/relay_client_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client - relay_client_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %105
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:json_annotation/json_annotation.dart';
-       3              : 
-       4              : part 'relay_client_models.g.dart';
-       5              : 
-       6              : @JsonSerializable()
-       7              : class Relay {
-       8              :   final String protocol;
-       9              :   final String? data;
-      10              : 
-      11           12 :   Relay(
-      12              :     this.protocol, {
-      13              :     this.data,
-      14              :   });
-      15              : 
-      16            8 :   factory Relay.fromJson(Map<String, dynamic> json) => _$RelayFromJson(json);
-      17              : 
-      18            8 :   Map<String, dynamic> toJson() => _$RelayToJson(this);
-      19              : }
-      20              : 
-      21              : class MessageEvent extends EventArgs {
-      22              :   String topic;
-      23              :   String message;
-      24              : 
-      25            7 :   MessageEvent(
-      26              :     this.topic,
-      27              :     this.message,
-      28              :   );
-      29              : 
-      30            0 :   @override
-      31            0 :   String toString() => 'topic: $topic, message: $message';
-      32              : }
-      33              : 
-      34              : class ErrorEvent extends EventArgs {
-      35              :   dynamic error;
-      36              : 
-      37            8 :   ErrorEvent(
-      38              :     this.error,
-      39              :   );
-      40              : }
-      41              : 
-      42              : class SubscriptionEvent extends EventArgs {
-      43              :   String id;
-      44              : 
-      45            0 :   SubscriptionEvent(
-      46              :     this.id,
-      47              :   );
-      48              : }
-      49              : 
-      50              : class SubscriptionDeletionEvent extends SubscriptionEvent {
-      51              :   String reason;
-      52              : 
-      53            0 :   SubscriptionDeletionEvent(
-      54              :     id,
-      55              :     this.reason,
-      56            0 :   ) : super(id);
-      57              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html b/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html deleted file mode 100644 index 5d77f2cd..00000000 --- a/coverage/html/core/relay_client/websocket/http_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/http_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.func.html b/coverage/html/core/relay_client/websocket/http_client.dart.func.html deleted file mode 100644 index af594287..00000000 --- a/coverage/html/core/relay_client/websocket/http_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/http_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html b/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html deleted file mode 100644 index fecb7aa9..00000000 --- a/coverage/html/core/relay_client/websocket/http_client.dart.gcov.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/http_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - http_client.dartCoverageTotalHit
Test:lcov.infoLines:14.3 %71
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:http/http.dart' as http;
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-       3              : 
-       4              : class HttpWrapper extends IHttpClient {
-       5           82 :   const HttpWrapper();
-       6              : 
-       7            0 :   @override
-       8              :   Future<http.Response> get(
-       9              :     Uri url, {
-      10              :     Map<String, String>? headers,
-      11              :   }) async {
-      12            0 :     return await http.get(url, headers: headers);
-      13              :   }
-      14              : 
-      15            0 :   @override
-      16              :   Future<http.Response> delete(Uri url, {Map<String, String>? headers}) async {
-      17            0 :     return await http.delete(url, headers: headers);
-      18              :   }
-      19              : 
-      20            0 :   @override
-      21              :   Future<http.Response> post(
-      22              :     Uri url, {
-      23              :     Map<String, String>? headers,
-      24              :     Object? body,
-      25              :   }) async {
-      26            0 :     return await http.post(url, headers: headers, body: body);
-      27              :   }
-      28              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html deleted file mode 100644 index 065db477..00000000 --- a/coverage/html/core/relay_client/websocket/i_http_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - i_http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html deleted file mode 100644 index ada9bcaa..00000000 --- a/coverage/html/core/relay_client/websocket/i_http_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - i_http_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html b/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html deleted file mode 100644 index e8aee9f9..00000000 --- a/coverage/html/core/relay_client/websocket/i_http_client.dart.gcov.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/i_http_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - i_http_client.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %11
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:http/http.dart' as http;
-       2              : 
-       3              : abstract class IHttpClient {
-       4           82 :   const IHttpClient();
-       5              : 
-       6              :   Future<http.Response> get(
-       7              :     Uri url, {
-       8              :     Map<String, String>? headers,
-       9              :   });
-      10              : 
-      11              :   Future<http.Response> post(
-      12              :     Uri url, {
-      13              :     Map<String, String>? headers,
-      14              :     Object? body,
-      15              :   });
-      16              : 
-      17              :   Future<http.Response> delete(
-      18              :     Uri url, {
-      19              :     Map<String, String>? headers,
-      20              :   });
-      21              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/index-sort-f.html b/coverage/html/core/relay_client/websocket/index-sort-f.html deleted file mode 100644 index 150716ab..00000000 --- a/coverage/html/core/relay_client/websocket/index-sort-f.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
http_client.dart -
14.3%14.3%
-
14.3 %71-
i_http_client.dart -
100.0%
-
100.0 %11-
websocket_handler.dart -
68.8%68.8%
-
68.8 %3222-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/index-sort-l.html b/coverage/html/core/relay_client/websocket/index-sort-l.html deleted file mode 100644 index 41517308..00000000 --- a/coverage/html/core/relay_client/websocket/index-sort-l.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
http_client.dart -
14.3%14.3%
-
14.3 %71
websocket_handler.dart -
68.8%68.8%
-
68.8 %3222
i_http_client.dart -
100.0%
-
100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/index.html b/coverage/html/core/relay_client/websocket/index.html deleted file mode 100644 index c199af58..00000000 --- a/coverage/html/core/relay_client/websocket/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocketCoverageTotalHit
Test:lcov.infoLines:60.0 %4024
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
http_client.dart -
14.3%14.3%
-
14.3 %71
i_http_client.dart -
100.0%
-
100.0 %11
websocket_handler.dart -
68.8%68.8%
-
68.8 %3222
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html deleted file mode 100644 index 9a0650fa..00000000 --- a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - websocket_handler.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html deleted file mode 100644 index d1963b84..00000000 --- a/coverage/html/core/relay_client/websocket/websocket_handler.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - websocket_handler.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html b/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html deleted file mode 100644 index daa1f8e4..00000000 --- a/coverage/html/core/relay_client/websocket/websocket_handler.dart.gcov.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - lcov.info - core/relay_client/websocket/websocket_handler.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/relay_client/websocket - websocket_handler.dartCoverageTotalHit
Test:lcov.infoLines:68.8 %3222
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:stream_channel/stream_channel.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_websocket_handler.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       6              : import 'package:web_socket_channel/web_socket_channel.dart';
-       7              : 
-       8              : class WebSocketHandler implements IWebSocketHandler {
-       9              :   String? _url;
-      10            8 :   @override
-      11            8 :   String? get url => _url;
-      12              : 
-      13              :   WebSocketChannel? _socket;
-      14              : 
-      15            8 :   @override
-      16           16 :   int? get closeCode => _socket?.closeCode;
-      17            8 :   @override
-      18           16 :   String? get closeReason => _socket?.closeReason;
-      19              : 
-      20              :   StreamChannel<String>? _channel;
-      21            8 :   @override
-      22            8 :   StreamChannel<String>? get channel => _channel;
-      23              : 
-      24            0 :   @override
-      25            0 :   Future<void> get ready => _socket!.ready;
-      26              : 
-      27              :   // const WebSocketHandler();
-      28              : 
-      29            8 :   @override
-      30              :   Future<void> setup({
-      31              :     required String url,
-      32              :   }) async {
-      33            8 :     _url = url;
-      34              : 
-      35            8 :     await close();
-      36              :   }
-      37              : 
-      38            8 :   @override
-      39              :   Future<void> connect() async {
-      40              :     // print('connecting');
-      41              :     try {
-      42           16 :       _socket = WebSocketChannel.connect(
-      43            8 :         Uri.parse(
-      44           16 :           '$url&useOnCloseEvent=true',
-      45              :         ),
-      46              :       );
-      47              :     } catch (e) {
-      48            0 :       throw WalletConnectError(
-      49            0 :         code: -1,
-      50            0 :         message: 'No internet connection: ${e.toString()}',
-      51              :       );
-      52              :     }
-      53              : 
-      54           24 :     _channel = _socket!.cast<String>();
-      55              : 
-      56            8 :     if (_channel == null) {
-      57              :       // print('Socket channel is null, waiting...');
-      58            0 :       await Future.delayed(const Duration(milliseconds: 500));
-      59            0 :       if (_channel == null) {
-      60              :         // print('Socket channel is still null, throwing ');
-      61            0 :         throw Exception('Socket channel is null');
-      62              :       }
-      63              :     }
-      64              : 
-      65           16 :     await _socket!.ready;
-      66              : 
-      67              :     // Check if the request was successful (status code 200)
-      68              :     // try {} catch (e) {
-      69              :     //   throw WalletConnectError(
-      70              :     //     code: 400,
-      71              :     //     message: 'WebSocket connection failed, missing or invalid project id.',
-      72              :     //   );
-      73              :     // }
-      74              :   }
-      75              : 
-      76            8 :   @override
-      77              :   Future<void> close() async {
-      78              :     try {
-      79            8 :       if (_socket != null) {
-      80           24 :         await _socket?.sink.close();
-      81              :       }
-      82              :     } catch (_) {}
-      83            8 :     _socket = null;
-      84              :   }
-      85              : 
-      86            0 :   @override
-      87              :   String toString() {
-      88            0 :     return 'WebSocketHandler{url: $url, _socket: $_socket, _channel: $_channel}';
-      89              :   }
-      90              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/generic_store.dart.func-c.html b/coverage/html/core/store/generic_store.dart.func-c.html deleted file mode 100644 index f6155c70..00000000 --- a/coverage/html/core/store/generic_store.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/generic_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - generic_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/generic_store.dart.func.html b/coverage/html/core/store/generic_store.dart.func.html deleted file mode 100644 index b996a19e..00000000 --- a/coverage/html/core/store/generic_store.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/generic_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - generic_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/generic_store.dart.gcov.html b/coverage/html/core/store/generic_store.dart.gcov.html deleted file mode 100644 index cd27193a..00000000 --- a/coverage/html/core/store/generic_store.dart.gcov.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/generic_store.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - generic_store.dartCoverageTotalHit
Test:lcov.infoLines:98.1 %5453
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : import 'package:flutter/material.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/store/store_models.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-       7              : 
-       8              : class GenericStore<T> implements IGenericStore<T> {
-       9              :   @override
-      10              :   final String context;
-      11              :   @override
-      12              :   final String version;
-      13              : 
-      14           12 :   @override
-      15           36 :   String get storageKey => '$version//$context';
-      16              :   @override
-      17              :   final IStore storage;
-      18              : 
-      19              :   @override
-      20              :   final Event<StoreCreateEvent<T>> onCreate = Event();
-      21              :   @override
-      22              :   final Event<StoreUpdateEvent<T>> onUpdate = Event();
-      23              :   @override
-      24              :   final Event<StoreDeleteEvent<T>> onDelete = Event();
-      25              :   @override
-      26              :   final Event<StoreSyncEvent> onSync = Event();
-      27              : 
-      28              :   bool _initialized = false;
-      29              : 
-      30              :   /// Stores map of key to pairing info
-      31              :   Map<String, T> data = {};
-      32              : 
-      33              :   @override
-      34              :   final T Function(dynamic) fromJson;
-      35              : 
-      36           12 :   GenericStore({
-      37              :     required this.storage,
-      38              :     required this.context,
-      39              :     required this.version,
-      40              :     required this.fromJson,
-      41              :   });
-      42              : 
-      43           12 :   @override
-      44              :   Future<void> init() async {
-      45           12 :     if (_initialized) {
-      46              :       return;
-      47              :     }
-      48              : 
-      49           24 :     await storage.init();
-      50           12 :     await restore();
-      51              : 
-      52           12 :     _initialized = true;
-      53              :   }
-      54              : 
-      55            8 :   @override
-      56              :   bool has(String key) {
-      57            8 :     checkInitialized();
-      58           16 :     return data.containsKey(key);
-      59              :   }
-      60              : 
-      61           12 :   @override
-      62              :   T? get(String key) {
-      63           12 :     checkInitialized();
-      64           24 :     if (data.containsKey(key)) {
-      65           20 :       return data[key]!;
-      66              :     }
-      67              :     return null;
-      68              :   }
-      69              : 
-      70           10 :   @override
-      71              :   List<T> getAll() {
-      72           30 :     return data.values.toList();
-      73              :   }
-      74              : 
-      75           12 :   @override
-      76              :   Future<void> set(String key, T value) async {
-      77           12 :     checkInitialized();
-      78              : 
-      79           24 :     if (data.containsKey(key)) {
-      80           18 :       onUpdate.broadcast(
-      81            9 :         StoreUpdateEvent(
-      82              :           key,
-      83              :           value,
-      84              :         ),
-      85              :       );
-      86              :     } else {
-      87           24 :       onCreate.broadcast(
-      88           12 :         StoreCreateEvent(
-      89              :           key,
-      90              :           value,
-      91              :         ),
-      92              :       );
-      93              :     }
-      94              : 
-      95           24 :     data[key] = value;
-      96              : 
-      97           12 :     await persist();
-      98              :   }
-      99              : 
-     100            9 :   @override
-     101              :   Future<void> delete(String key) async {
-     102            9 :     checkInitialized();
-     103              : 
-     104           18 :     if (!data.containsKey(key)) {
-     105              :       return;
-     106              :     }
-     107              : 
-     108           18 :     onDelete.broadcast(
-     109            9 :       StoreDeleteEvent(
-     110              :         key,
-     111           18 :         data.remove(key) as T,
-     112              :       ),
-     113              :     );
-     114              : 
-     115            9 :     await persist();
-     116              :   }
-     117              : 
-     118           12 :   @override
-     119              :   Future<void> persist() async {
-     120           12 :     checkInitialized();
-     121              : 
-     122           24 :     onSync.broadcast(
-     123           12 :       StoreSyncEvent(),
-     124              :     );
-     125              : 
-     126           48 :     await storage.set(storageKey, data);
-     127              :   }
-     128              : 
-     129           12 :   @override
-     130              :   Future<void> restore() async {
-     131              :     // If we haven't stored our version yet, we need to store it and stop
-     132           36 :     if (!storage.has(context)) {
-     133              :       // print('Storing $context');
-     134           60 :       await storage.set(context, {'version': version});
-     135           48 :       await storage.set(storageKey, <String, dynamic>{});
-     136              :       return;
-     137              :     }
-     138              : 
-     139              :     // If we have stored our version, but it doesn't match, we need to delete the previous data,
-     140              :     // create a new version, and stop
-     141           32 :     final String storedVersion = storage.get(context)['version'];
-     142           16 :     if (storedVersion != version) {
-     143              :       // print('Updating storage from $storedVersion to $version');
-     144            4 :       await storage.delete('$storedVersion//$context');
-     145            5 :       await storage.set(context, {'version': version});
-     146            4 :       await storage.set(storageKey, <String, dynamic>{});
-     147              :       return;
-     148              :     }
-     149              : 
-     150           24 :     if (storage.has(storageKey)) {
-     151              :       // If there is invalid data, delete the stored data
-     152              :       // print('Restoring $storageKey');
-     153              :       try {
-     154           34 :         for (var entry in storage.get(storageKey).entries) {
-     155              :           // print(entry);
-     156           12 :           data[entry.key] = fromJson(entry.value);
-     157              :         }
-     158              :       } catch (e) {
-     159              :         // print('Error restoring $storageKey: $e');
-     160            2 :         await storage.delete(storedVersion);
-     161              :       }
-     162              :     }
-     163              :   }
-     164              : 
-     165           12 :   @protected
-     166              :   void checkInitialized() {
-     167           12 :     if (!_initialized) {
-     168            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     169              :     }
-     170              :   }
-     171              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/index-sort-f.html b/coverage/html/core/store/index-sort-f.html deleted file mode 100644 index 18d19607..00000000 --- a/coverage/html/core/store/index-sort-f.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
generic_store.dart -
98.1%98.1%
-
98.1 %5453-
shared_prefs_store.dart -
55.2%55.2%
-
55.2 %6737-
store_models.dart -
100.0%
-
100.0 %44-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/index-sort-l.html b/coverage/html/core/store/index-sort-l.html deleted file mode 100644 index 4bddb2d2..00000000 --- a/coverage/html/core/store/index-sort-l.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
shared_prefs_store.dart -
55.2%55.2%
-
55.2 %6737
generic_store.dart -
98.1%98.1%
-
98.1 %5453
store_models.dart -
100.0%
-
100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/index.html b/coverage/html/core/store/index.html deleted file mode 100644 index 8b9b99c1..00000000 --- a/coverage/html/core/store/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/storeCoverageTotalHit
Test:lcov.infoLines:75.2 %12594
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
generic_store.dart -
98.1%98.1%
-
98.1 %5453
shared_prefs_store.dart -
55.2%55.2%
-
55.2 %6737
store_models.dart -
100.0%
-
100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/shared_prefs_store.dart.func-c.html b/coverage/html/core/store/shared_prefs_store.dart.func-c.html deleted file mode 100644 index 86aff844..00000000 --- a/coverage/html/core/store/shared_prefs_store.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/shared_prefs_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - shared_prefs_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/shared_prefs_store.dart.func.html b/coverage/html/core/store/shared_prefs_store.dart.func.html deleted file mode 100644 index ac040d97..00000000 --- a/coverage/html/core/store/shared_prefs_store.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/shared_prefs_store.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - shared_prefs_store.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/shared_prefs_store.dart.gcov.html b/coverage/html/core/store/shared_prefs_store.dart.gcov.html deleted file mode 100644 index 077f0ad1..00000000 --- a/coverage/html/core/store/shared_prefs_store.dart.gcov.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/shared_prefs_store.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - shared_prefs_store.dartCoverageTotalHit
Test:lcov.infoLines:55.2 %6737
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:shared_preferences/shared_preferences.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-       7              : 
-       8              : class SharedPrefsStores implements IStore<Map<String, dynamic>> {
-       9              :   late SharedPreferences prefs;
-      10              :   bool _initialized = false;
-      11              : 
-      12              :   final Map<String, Map<String, dynamic>> _map;
-      13              : 
-      14            0 :   @override
-      15            0 :   Map<String, Map<String, dynamic>> get map => _map;
-      16              : 
-      17            0 :   @override
-      18            0 :   List<String> get keys => map.keys.toList();
-      19              : 
-      20            0 :   @override
-      21            0 :   List<Map<String, dynamic>> get values => map.values.toList();
-      22              : 
-      23           12 :   @override
-      24              :   String get storagePrefix => WalletConnectConstants.CORE_STORAGE_PREFIX;
-      25              : 
-      26              :   final bool memoryStore;
-      27              : 
-      28           12 :   SharedPrefsStores({
-      29              :     Map<String, Map<String, dynamic>>? defaultValue,
-      30              :     this.memoryStore = false,
-      31           12 :   }) : _map = defaultValue ?? {};
-      32              : 
-      33              :   /// Initializes the store, loading all persistent values into memory.
-      34           12 :   @override
-      35              :   Future<void> init() async {
-      36           12 :     if (_initialized) {
-      37              :       return;
-      38              :     }
-      39              : 
-      40           12 :     if (!memoryStore) {
-      41            0 :       prefs = await SharedPreferences.getInstance();
-      42              :     }
-      43              : 
-      44           12 :     _initialized = true;
-      45              :   }
-      46              : 
-      47              :   /// Gets the value of the specified key, if it hasn't been cached yet, it caches it.
-      48              :   /// If the key doesn't exist it throws an error.
-      49            8 :   @override
-      50              :   Map<String, dynamic>? get(String key) {
-      51            8 :     _checkInitialized();
-      52              : 
-      53            8 :     final String keyWithPrefix = _addPrefix(key);
-      54           16 :     if (_map.containsKey(keyWithPrefix)) {
-      55           16 :       return _map[keyWithPrefix];
-      56              :     }
-      57              : 
-      58            1 :     Map<String, dynamic>? value = _getPref(keyWithPrefix);
-      59              :     if (value != null) {
-      60            0 :       _map[keyWithPrefix] = value;
-      61              :     }
-      62              :     return value;
-      63              :   }
-      64              : 
-      65           12 :   @override
-      66              :   bool has(String key) {
-      67           12 :     final String keyWithPrefix = _addPrefix(key);
-      68           12 :     if (memoryStore) {
-      69           24 :       return _map.containsKey(keyWithPrefix);
-      70              :     }
-      71            0 :     return prefs.containsKey(keyWithPrefix);
-      72              :   }
-      73              : 
-      74              :   /// Gets all of the values of the store
-      75            0 :   @override
-      76              :   List<Map<String, dynamic>> getAll() {
-      77            0 :     _checkInitialized();
-      78            0 :     return values;
-      79              :   }
-      80              : 
-      81              :   /// Sets the value of a key within the store, overwriting the value if it exists.
-      82           12 :   @override
-      83              :   Future<void> set(String key, Map<String, dynamic> value) async {
-      84           12 :     _checkInitialized();
-      85              : 
-      86           12 :     final String keyWithPrefix = _addPrefix(key);
-      87           24 :     _map[keyWithPrefix] = value;
-      88           12 :     await _updatePref(keyWithPrefix, value);
-      89              :   }
-      90              : 
-      91              :   /// Updates the value of a key. Fails if it does not exist.
-      92            0 :   @override
-      93              :   Future<void> update(String key, Map<String, dynamic> value) async {
-      94            0 :     _checkInitialized();
-      95              : 
-      96            0 :     final String keyWithPrefix = _addPrefix(key);
-      97            0 :     if (!map.containsKey(keyWithPrefix)) {
-      98            0 :       throw Errors.getInternalError(Errors.NO_MATCHING_KEY);
-      99              :     } else {
-     100            0 :       _map[keyWithPrefix] = value;
-     101            0 :       await _updatePref(keyWithPrefix, value);
-     102              :     }
-     103              :   }
-     104              : 
-     105              :   /// Removes the key from the persistent store
-     106            1 :   @override
-     107              :   Future<void> delete(String key) async {
-     108            1 :     _checkInitialized();
-     109              : 
-     110            1 :     final String keyWithPrefix = _addPrefix(key);
-     111            2 :     _map.remove(keyWithPrefix);
-     112            1 :     await _removePref(keyWithPrefix);
-     113              :   }
-     114              : 
-     115            1 :   Map<String, dynamic>? _getPref(String key) {
-     116            1 :     if (memoryStore) {
-     117              :       return null;
-     118              :     }
-     119              : 
-     120            0 :     if (prefs.containsKey(key)) {
-     121            0 :       final value = prefs.getString(key)!;
-     122            0 :       return jsonDecode(value);
-     123              :     } else {
-     124            0 :       throw Errors.getInternalError(Errors.NO_MATCHING_KEY);
-     125              :     }
-     126              :   }
-     127              : 
-     128           12 :   Future<void> _updatePref(String key, Map<String, dynamic> value) async {
-     129           12 :     if (memoryStore) {
-     130              :       return;
-     131              :     }
-     132              : 
-     133              :     try {
-     134            0 :       final stringValue = jsonEncode(value);
-     135            0 :       await prefs.setString(key, stringValue);
-     136            0 :     } on Exception catch (e) {
-     137            0 :       throw Errors.getInternalError(
-     138              :         Errors.MISSING_OR_INVALID,
-     139            0 :         context: e.toString(),
-     140              :       );
-     141              :     }
-     142              :   }
-     143              : 
-     144            1 :   Future<void> _removePref(String key) async {
-     145            1 :     if (memoryStore) {
-     146              :       return;
-     147              :     }
-     148            0 :     await prefs.remove(key);
-     149              :   }
-     150              : 
-     151           12 :   String _addPrefix(String key) {
-     152           24 :     return '$storagePrefix$key';
-     153              :   }
-     154              : 
-     155           12 :   void _checkInitialized() {
-     156           12 :     if (!_initialized) {
-     157            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     158              :     }
-     159              :   }
-     160              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/store_models.dart.func-c.html b/coverage/html/core/store/store_models.dart.func-c.html deleted file mode 100644 index 3330a52f..00000000 --- a/coverage/html/core/store/store_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/store_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - store_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/store_models.dart.func.html b/coverage/html/core/store/store_models.dart.func.html deleted file mode 100644 index 99277502..00000000 --- a/coverage/html/core/store/store_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/store_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - store_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/store/store_models.dart.gcov.html b/coverage/html/core/store/store_models.dart.gcov.html deleted file mode 100644 index b6a1c2fd..00000000 --- a/coverage/html/core/store/store_models.dart.gcov.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - LCOV - lcov.info - core/store/store_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/store - store_models.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %44
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:event/event.dart';
-       2              : 
-       3              : class StoreCreateEvent<T> extends EventArgs {
-       4              :   final String key;
-       5              :   final T value;
-       6              : 
-       7           12 :   StoreCreateEvent(
-       8              :     this.key,
-       9              :     this.value,
-      10              :   );
-      11              : }
-      12              : 
-      13              : class StoreUpdateEvent<T> extends EventArgs {
-      14              :   final String key;
-      15              :   final T value;
-      16              : 
-      17            9 :   StoreUpdateEvent(
-      18              :     this.key,
-      19              :     this.value,
-      20              :   );
-      21              : }
-      22              : 
-      23              : class StoreDeleteEvent<T> extends EventArgs {
-      24              :   final String key;
-      25              :   final T value;
-      26              : 
-      27            9 :   StoreDeleteEvent(
-      28              :     this.key,
-      29              :     this.value,
-      30              :   );
-      31              : }
-      32              : 
-      33              : class StoreSyncEvent extends EventArgs {
-      34           12 :   StoreSyncEvent();
-      35              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/index-sort-f.html b/coverage/html/core/verify/index-sort-f.html deleted file mode 100644 index 05fef30b..00000000 --- a/coverage/html/core/verify/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
verify.dart -
68.8%68.8%
-
68.8 %1611-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/index-sort-l.html b/coverage/html/core/verify/index-sort-l.html deleted file mode 100644 index b58f2163..00000000 --- a/coverage/html/core/verify/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify.dart -
68.8%68.8%
-
68.8 %1611
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/index.html b/coverage/html/core/verify/index.html deleted file mode 100644 index 364763fc..00000000 --- a/coverage/html/core/verify/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verifyCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify.dart -
68.8%68.8%
-
68.8 %1611
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/index-sort-f.html b/coverage/html/core/verify/models/index-sort-f.html deleted file mode 100644 index 8d4773bf..00000000 --- a/coverage/html/core/verify/models/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
verify_context.dart -
11.1%11.1%
-
11.1 %91-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/index-sort-l.html b/coverage/html/core/verify/models/index-sort-l.html deleted file mode 100644 index e8f1561b..00000000 --- a/coverage/html/core/verify/models/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify_context.dart -
11.1%11.1%
-
11.1 %91
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/index.html b/coverage/html/core/verify/models/index.html deleted file mode 100644 index b92f34cd..00000000 --- a/coverage/html/core/verify/models/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/modelsCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
verify_context.dart -
11.1%11.1%
-
11.1 %91
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/verify_context.dart.func-c.html b/coverage/html/core/verify/models/verify_context.dart.func-c.html deleted file mode 100644 index db576da9..00000000 --- a/coverage/html/core/verify/models/verify_context.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models/verify_context.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/models - verify_context.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/verify_context.dart.func.html b/coverage/html/core/verify/models/verify_context.dart.func.html deleted file mode 100644 index 3ec78b10..00000000 --- a/coverage/html/core/verify/models/verify_context.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models/verify_context.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/models - verify_context.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/models/verify_context.dart.gcov.html b/coverage/html/core/verify/models/verify_context.dart.gcov.html deleted file mode 100644 index 0aec3ceb..00000000 --- a/coverage/html/core/verify/models/verify_context.dart.gcov.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/models/verify_context.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify/models - verify_context.dartCoverageTotalHit
Test:lcov.infoLines:11.1 %91
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : 
-       3              : part 'verify_context.g.dart';
-       4              : part 'verify_context.freezed.dart';
-       5              : 
-       6              : enum Validation {
-       7              :   UNKNOWN,
-       8              :   VALID,
-       9              :   INVALID,
-      10              :   SCAM;
-      11              : 
-      12            0 :   bool get invalid => this == INVALID;
-      13            0 :   bool get valid => this == VALID;
-      14            0 :   bool get unknown => this == UNKNOWN;
-      15            0 :   bool get scam => this == SCAM;
-      16              : }
-      17              : 
-      18              : @freezed
-      19              : class VerifyContext with _$VerifyContext {
-      20              :   @JsonSerializable()
-      21              :   const factory VerifyContext({
-      22              :     required String origin,
-      23              :     required Validation validation,
-      24              :     required String verifyUrl,
-      25              :     bool? isScam,
-      26              :   }) = _VerifyContext;
-      27              : 
-      28            0 :   factory VerifyContext.fromJson(Map<String, dynamic> json) =>
-      29            0 :       _$VerifyContextFromJson(json);
-      30              : }
-      31              : 
-      32              : @freezed
-      33              : class AttestationResponse with _$AttestationResponse {
-      34              :   @JsonSerializable()
-      35              :   const factory AttestationResponse({
-      36              :     required String origin,
-      37              :     required String attestationId,
-      38              :     bool? isScam,
-      39              :   }) = _AttestationResponse;
-      40              : 
-      41            0 :   factory AttestationResponse.fromJson(Map<String, dynamic> json) =>
-      42            0 :       _$AttestationResponseFromJson(json);
-      43              : }
-      44              : 
-      45              : class AttestationNotFound implements Exception {
-      46              :   int code;
-      47              :   String message;
-      48              : 
-      49            8 :   AttestationNotFound({required this.code, required this.message}) : super();
-      50              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/verify.dart.func-c.html b/coverage/html/core/verify/verify.dart.func-c.html deleted file mode 100644 index 75309f44..00000000 --- a/coverage/html/core/verify/verify.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/verify.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify - verify.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/verify.dart.func.html b/coverage/html/core/verify/verify.dart.func.html deleted file mode 100644 index c7702288..00000000 --- a/coverage/html/core/verify/verify.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/verify.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify - verify.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/core/verify/verify.dart.gcov.html b/coverage/html/core/verify/verify.dart.gcov.html deleted file mode 100644 index 80e3521d..00000000 --- a/coverage/html/core/verify/verify.dart.gcov.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - LCOV - lcov.info - core/verify/verify.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - core/verify - verify.dartCoverageTotalHit
Test:lcov.infoLines:68.8 %1611
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:walletconnect_flutter_v2/apis/core/i_core.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/verify/i_verify.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-       8              : 
-       9              : class Verify implements IVerify {
-      10              :   final ICore _core;
-      11              :   final IHttpClient _httpClient;
-      12              :   late String _verifyUrl;
-      13              : 
-      14           10 :   Verify({
-      15              :     required ICore core,
-      16              :     required IHttpClient httpClient,
-      17              :   })  : _core = core,
-      18              :         _httpClient = httpClient;
-      19              : 
-      20            5 :   @override
-      21              :   Future<void> init({String? verifyUrl}) async {
-      22              :     // TODO custom verifyUrl is not yet allowed.
-      23              :     // Always using walletconnect urls for now
-      24           10 :     _verifyUrl = _setVerifyUrl(verifyUrl: verifyUrl);
-      25              :   }
-      26              : 
-      27            4 :   @override
-      28              :   Future<AttestationResponse?> resolve({required String attestationId}) async {
-      29              :     try {
-      30           12 :       final uri = Uri.parse('$_verifyUrl/attestation/$attestationId');
-      31           16 :       final response = await _httpClient.get(uri).timeout(Duration(seconds: 5));
-      32           16 :       if (response.statusCode == 404 || response.body.isEmpty) {
-      33            4 :         throw AttestationNotFound(
-      34              :           code: 404,
-      35              :           message: 'Attestion for this dapp could not be found',
-      36              :         );
-      37              :       }
-      38            0 :       if (response.statusCode != 200) {
-      39            0 :         throw Exception('Attestation response error: ${response.statusCode}');
-      40              :       }
-      41            0 :       return AttestationResponse.fromJson(jsonDecode(response.body));
-      42              :     } catch (e) {
-      43           20 :       _core.logger.d('[$runtimeType] resolve $e');
-      44              :       rethrow;
-      45              :     }
-      46              :   }
-      47              : 
-      48            5 :   String _setVerifyUrl({String? verifyUrl}) {
-      49              :     String url = verifyUrl ?? WalletConnectConstants.VERIFY_SERVER;
-      50              : 
-      51            5 :     if (!WalletConnectConstants.TRUSTED_VERIFY_URLS.contains(url)) {
-      52            0 :       _core.logger.i(
-      53            0 :         '[$runtimeType] verifyUrl $url not included in trusted list, '
-      54              :         'assigning default: ${WalletConnectConstants.VERIFY_SERVER}',
-      55              :       );
-      56              :       url = WalletConnectConstants.VERIFY_SERVER;
-      57              :     }
-      58              :     return url;
-      59              :   }
-      60              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/emerald.png b/coverage/html/emerald.png deleted file mode 100644 index 38ad4f4068b935643d2486f323005fb294a9bd7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 diff --git a/coverage/html/gcov.css b/coverage/html/gcov.css deleted file mode 100644 index 6c23ba93..00000000 --- a/coverage/html/gcov.css +++ /dev/null @@ -1,1101 +0,0 @@ -/* All views: initial background and text color */ -body -{ - color: #000000; - background-color: #ffffff; -} - -/* All views: standard link format*/ -a:link -{ - color: #284fa8; - text-decoration: underline; -} - -/* All views: standard link - visited format */ -a:visited -{ - color: #00cb40; - text-decoration: underline; -} - -/* All views: standard link - activated format */ -a:active -{ - color: #ff0040; - text-decoration: underline; -} - -/* All views: main title format */ -td.title -{ - text-align: center; - padding-bottom: 10px; - font-family: sans-serif; - font-size: 20pt; - font-style: italic; - font-weight: bold; -} -/* "Line coverage date bins" leader */ -td.subTableHeader -{ - text-align: center; - padding-bottom: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: center; -} - -/* All views: header item format */ -td.headerItem -{ - text-align: right; - padding-right: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: top; - white-space: nowrap; -} - -/* All views: header item value format */ -td.headerValue -{ - text-align: left; - color: #284fa8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; -} - -/* All views: header item coverage table heading */ -td.headerCovTableHead -{ - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; -} - -/* All views: header item coverage table entry */ -td.headerCovTableEntry -{ - text-align: right; - color: #284fa8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #dae7fe; -} - -/* All views: header item coverage table entry for high coverage rate */ -td.headerCovTableEntryHi -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #a7fc9d; -} - -/* All views: header item coverage table entry for medium coverage rate */ -td.headerCovTableEntryMed -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #ffea20; -} - -/* All views: header item coverage table entry for ow coverage rate */ -td.headerCovTableEntryLo -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #ff0000; -} - -/* All views: header legend value for legend entry */ -td.headerValueLeg -{ - text-align: left; - color: #000000; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - padding-top: 4px; -} - -/* All views: color of horizontal ruler */ -td.ruler -{ - background-color: #6688d4; -} - -/* All views: version string format */ -td.versionInfo -{ - text-align: center; - padding-top: 2px; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all)/Test case descriptions: - table headline format */ -td.tableHead -{ - text-align: center; - color: #ffffff; - background-color: #6688d4; - font-family: sans-serif; - font-size: 120%; - font-weight: bold; - white-space: nowrap; - padding-left: 4px; - padding-right: 4px; -} - -span.tableHeadSort -{ - padding-right: 4px; -} - -/* Directory view/File view (all): filename entry format */ -td.coverFile -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - background-color: #dae7fe; - font-family: monospace; -} - -/* Directory view/File view (all): directory name entry format */ -td.coverDirectory -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - background-color: #b8d0ff; - font-family: monospace; -} - -/* Directory view/File view (all): filename entry format */ -td.overallOwner -{ - text-align: center; - font-weight: bold; - font-family: sans-serif; - background-color: #dae7fe; - padding-right: 10px; - padding-left: 10px; -} - -/* Directory view/File view (all): filename entry format */ -td.ownerName -{ - text-align: right; - font-style: italic; - font-family: sans-serif; - background-color: #E5DBDB; - padding-right: 10px; - padding-left: 20px; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.owner_coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #E5DBDB; -} - -/* Directory view/File view (all): bar-graph outline color */ -td.coverBarOutline -{ - background-color: #000000; -} - -/* Directory view/File view (all): percentage entry for files with - high coverage rate */ -td.coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #a7fc9d; - font-weight: bold; - font-family: sans-serif; -} - -/* 'owner' entry: slightly lighter color than 'coverPerHi' */ -td.owner_coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #82E0AA; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry */ -td.coverNumDflt -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - white-space: nowrap; - font-family: sans-serif; -} - -/* td background color and font for the 'owner' section of the table */ -td.ownerTla -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #E5DBDB; - white-space: nowrap; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all): line count entry for files with - high coverage rate */ -td.coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #a7fc9d; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #82E0AA; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - medium coverage rate */ -td.coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ffea20; - font-weight: bold; - font-family: sans-serif; -} - -td.owner_coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #F9E79F; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - medium coverage rate */ -td.coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ffea20; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #F9E79F; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - low coverage rate */ -td.coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - font-weight: bold; - font-family: sans-serif; -} - -td.owner_coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - low coverage rate */ -td.coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; - white-space: nowrap; - font-family: sans-serif; -} - -/* File view (all): "show/hide details" link format */ -a.detail:link -{ - color: #b8d0ff; - font-size:80%; -} - -/* File view (all): "show/hide details" link - visited format */ -a.detail:visited -{ - color: #b8d0ff; - font-size:80%; -} - -/* File view (all): "show/hide details" link - activated format */ -a.detail:active -{ - color: #ffffff; - font-size:80%; -} - -/* File view (detail): test name entry */ -td.testName -{ - text-align: right; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* File view (detail): test percentage entry */ -td.testPer -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* File view (detail): test lines count entry */ -td.testNum -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* Test case descriptions: test name format*/ -dt -{ - font-family: sans-serif; - font-weight: bold; -} - -/* Test case descriptions: description table body */ -td.testDescription -{ - padding-top: 10px; - padding-left: 30px; - padding-bottom: 10px; - padding-right: 30px; - background-color: #dae7fe; -} - -/* Source code view: function entry */ -td.coverFn -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - background-color: #dae7fe; - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-weight: bold; - font-family: sans-serif; -} - -td.coverFnAlias -{ - text-align: right; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - /* make this a slightly different color than the leader - otherwise, - otherwise the alias is hard to distinguish in the table */ - background-color: #E5DBDB; /* very light pale grey/blue */ - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnAliasLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; /* lighter red */ - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnAliasHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: source code format */ -pre.source -{ - font-family: monospace; - white-space: pre; - margin-top: 2px; -} - -/* elided/removed code */ -span.elidedSource -{ - font-family: sans-serif; - /*font-size: 8pt; */ - font-style: italic; - background-color: lightgrey; -} - -/* Source code view: line number format */ -span.lineNum -{ - background-color: #efe383; -} - -/* Source code view: line number format when there are deleted - lines in the corresponding location */ -span.lineNumWithDelete -{ - foreground-color: #efe383; - background-color: lightgrey; -} - -/* Source code view: format for Cov legend */ -span.coverLegendCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #cad7fe; -} - -/* Source code view: format for NoCov legend */ -span.coverLegendNoCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #ff6230; -} - -/* Source code view: format for the source code heading line */ -pre.sourceHeading -{ - white-space: pre; - font-family: monospace; - font-weight: bold; - margin: 0px; -} - -/* All views: header legend value for low rate */ -td.headerValueLegL -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 4px; - padding-right: 2px; - background-color: #ff0000; - font-size: 80%; -} - -/* All views: header legend value for med rate */ -td.headerValueLegM -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 2px; - background-color: #ffea20; - font-size: 80%; -} - -/* All views: header legend value for hi rate */ -td.headerValueLegH -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 4px; - background-color: #a7fc9d; - font-size: 80%; -} - -/* All views except source code view: legend format for low coverage */ -span.coverLegendCovLo -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #ff0000; -} - -/* All views except source code view: legend format for med coverage */ -span.coverLegendCovMed -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #ffea20; -} - -/* All views except source code view: legend format for hi coverage */ -span.coverLegendCovHi -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #a7fc9d; -} - -a.branchTla:link -{ - color: #000000; -} - -a.branchTla:visited -{ - color: #000000; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0): -Newly added code is not tested" */ -td.tlaUNC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUNC { - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0): -Newly added code is not tested" */ -span.tlaUNC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUNC { - background-color: #FF6230; -} -a.tlaBgUNC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUNC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0): -Unchanged code is no longer tested" */ -td.tlaLBC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgLBC { - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0): -Unchanged code is no longer tested" */ -span.tlaLBC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgLBC { - background-color: #FF6230; -} -a.tlaBgLBC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadLBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0): -Previously unused code is untested" */ -td.tlaUIC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUIC { - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0): -Previously unused code is untested" */ -span.tlaUIC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUIC { - background-color: #FF6230; -} -a.tlaBgUIC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUIC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0): -Unchanged code was untested before, is untested now" */ -td.tlaUBC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUBC { - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0): -Unchanged code was untested before, is untested now" */ -span.tlaUBC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUBC { - background-color: #FF6230; -} -a.tlaBgUBC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1): -Unchanged code is tested now" */ -td.tlaGBC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGBC { - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1): -Unchanged code is tested now" */ -span.tlaGBC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGBC { - background-color: #CAD7FE; -} -a.tlaBgGBC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1): -Previously unused code is tested now" */ -td.tlaGIC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGIC { - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1): -Previously unused code is tested now" */ -span.tlaGIC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGIC { - background-color: #CAD7FE; -} -a.tlaBgGIC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGIC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1): -Newly added code is tested" */ -td.tlaGNC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGNC { - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1): -Newly added code is tested" */ -span.tlaGNC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGNC { - background-color: #CAD7FE; -} -a.tlaBgGNC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGNC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1): -Unchanged code was tested before and is still tested" */ -td.tlaCBC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgCBC { - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1): -Unchanged code was tested before and is still tested" */ -span.tlaCBC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgCBC { - background-color: #CAD7FE; -} -a.tlaBgCBC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadCBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #): -Previously untested code is unused now" */ -td.tlaEUB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgEUB { - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #): -Previously untested code is unused now" */ -span.tlaEUB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgEUB { - background-color: #FFFFFF; -} -a.tlaBgEUB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadEUB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #): -Previously tested code is unused now" */ -td.tlaECB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgECB { - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #): -Previously tested code is unused now" */ -span.tlaECB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgECB { - background-color: #FFFFFF; -} -a.tlaBgECB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadECB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -): -Previously untested code has been deleted" */ -td.tlaDUB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgDUB { - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -): -Previously untested code has been deleted" */ -span.tlaDUB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgDUB { - background-color: #FFFFFF; -} -a.tlaBgDUB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadDUB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -): -Previously tested code has been deleted" */ -td.tlaDCB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgDCB { - background-color: #FFFFFF; -} - -/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -): -Previously tested code has been deleted" */ -span.tlaDCB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgDCB { - background-color: #FFFFFF; -} -a.tlaBgDCB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadDCB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view: format for date/owner bin that is not hit */ -span.missBins -{ - background-color: #ff0000 /* red */ -} diff --git a/coverage/html/glass.png b/coverage/html/glass.png deleted file mode 100644 index e1abc00680a3093c49fdb775ae6bdb6764c95af2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv diff --git a/coverage/html/index-sort-f.html b/coverage/html/index-sort-f.html deleted file mode 100644 index 7312040d..00000000 --- a/coverage/html/index-sort-f.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_api/ -
75.5%75.5%
-
75.5 %192145-
core/ -
74.5%74.5%
-
74.5 %5138-
core/crypto/ -
90.6%90.6%
-
90.6 %180163-
core/echo/ -
93.3%93.3%
-
93.3 %3028-
core/echo/models/ -
66.7%66.7%
-
66.7 %1510-
core/heartbit/ -
66.7%66.7%
-
66.7 %96-
core/pairing/ -
89.1%89.1%
-
89.1 %303270-
core/pairing/utils/ -
54.7%54.7%
-
54.7 %5329-
core/relay_auth/ -
86.5%86.5%
-
86.5 %11196-
core/relay_client/ -
85.6%85.6%
-
85.6 %201172-
core/relay_client/json_rpc_2/ -
0.0%
-
0.0 %6-
core/relay_client/json_rpc_2/src/ -
40.8%40.8%
-
40.8 %360147-
core/relay_client/websocket/ -
60.0%60.0%
-
60.0 %4024-
core/store/ -
75.2%75.2%
-
75.2 %12594-
core/verify/ -
68.8%68.8%
-
68.8 %1611-
core/verify/models/ -
11.1%11.1%
-
11.1 %91-
models/ -
65.2%65.2%
-
65.2 %2315-
sign_api/ -
52.9%52.9%
-
52.9 %1211641-
sign_api/models/ -
45.5%45.5%
-
45.5 %9945-
sign_api/models/auth/ -
45.6%45.6%
-
45.6 %16977-
sign_api/utils/ -
80.7%80.7%
-
80.7 %11996-
sign_api/utils/auth/ -
21.9%21.9%
-
21.9 %32070-
utils/ -
71.2%71.2%
-
71.2 %319227-
web3app/ -
64.7%64.7%
-
64.7 %11675-
web3wallet/ -
71.7%71.7%
-
71.7 %13899-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/index-sort-l.html b/coverage/html/index-sort-l.html deleted file mode 100644 index 5af4387e..00000000 --- a/coverage/html/index-sort-l.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
core/relay_client/json_rpc_2/ -
0.0%
-
0.0 %6
core/verify/models/ -
11.1%11.1%
-
11.1 %91
sign_api/utils/auth/ -
21.9%21.9%
-
21.9 %32070
core/relay_client/json_rpc_2/src/ -
40.8%40.8%
-
40.8 %360147
sign_api/models/ -
45.5%45.5%
-
45.5 %9945
sign_api/models/auth/ -
45.6%45.6%
-
45.6 %16977
sign_api/ -
52.9%52.9%
-
52.9 %1211641
core/pairing/utils/ -
54.7%54.7%
-
54.7 %5329
core/relay_client/websocket/ -
60.0%60.0%
-
60.0 %4024
web3app/ -
64.7%64.7%
-
64.7 %11675
models/ -
65.2%65.2%
-
65.2 %2315
core/heartbit/ -
66.7%66.7%
-
66.7 %96
core/echo/models/ -
66.7%66.7%
-
66.7 %1510
core/verify/ -
68.8%68.8%
-
68.8 %1611
utils/ -
71.2%71.2%
-
71.2 %319227
web3wallet/ -
71.7%71.7%
-
71.7 %13899
core/ -
74.5%74.5%
-
74.5 %5138
core/store/ -
75.2%75.2%
-
75.2 %12594
auth_api/ -
75.5%75.5%
-
75.5 %192145
sign_api/utils/ -
80.7%80.7%
-
80.7 %11996
core/relay_client/ -
85.6%85.6%
-
85.6 %201172
core/relay_auth/ -
86.5%86.5%
-
86.5 %11196
core/pairing/ -
89.1%89.1%
-
89.1 %303270
core/crypto/ -
90.6%90.6%
-
90.6 %180163
core/echo/ -
93.3%93.3%
-
93.3 %3028
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/index.html b/coverage/html/index.html deleted file mode 100644 index cec02a5b..00000000 --- a/coverage/html/index.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:lcov.infoLines:61.2 %42152579
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_api/ -
75.5%75.5%
-
75.5 %192145
core/ -
74.5%74.5%
-
74.5 %5138
core/crypto/ -
90.6%90.6%
-
90.6 %180163
core/echo/ -
93.3%93.3%
-
93.3 %3028
core/echo/models/ -
66.7%66.7%
-
66.7 %1510
core/heartbit/ -
66.7%66.7%
-
66.7 %96
core/pairing/ -
89.1%89.1%
-
89.1 %303270
core/pairing/utils/ -
54.7%54.7%
-
54.7 %5329
core/relay_auth/ -
86.5%86.5%
-
86.5 %11196
core/relay_client/ -
85.6%85.6%
-
85.6 %201172
core/relay_client/json_rpc_2/ -
0.0%
-
0.0 %6
core/relay_client/json_rpc_2/src/ -
40.8%40.8%
-
40.8 %360147
core/relay_client/websocket/ -
60.0%60.0%
-
60.0 %4024
core/store/ -
75.2%75.2%
-
75.2 %12594
core/verify/ -
68.8%68.8%
-
68.8 %1611
core/verify/models/ -
11.1%11.1%
-
11.1 %91
models/ -
65.2%65.2%
-
65.2 %2315
sign_api/ -
52.9%52.9%
-
52.9 %1211641
sign_api/models/ -
45.5%45.5%
-
45.5 %9945
sign_api/models/auth/ -
45.6%45.6%
-
45.6 %16977
sign_api/utils/ -
80.7%80.7%
-
80.7 %11996
sign_api/utils/auth/ -
21.9%21.9%
-
21.9 %32070
utils/ -
71.2%71.2%
-
71.2 %319227
web3app/ -
64.7%64.7%
-
64.7 %11675
web3wallet/ -
71.7%71.7%
-
71.7 %13899
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/basic_models.dart.func-c.html b/coverage/html/models/basic_models.dart.func-c.html deleted file mode 100644 index 586c9e2c..00000000 --- a/coverage/html/models/basic_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/basic_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - basic_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/basic_models.dart.func.html b/coverage/html/models/basic_models.dart.func.html deleted file mode 100644 index bfc2014b..00000000 --- a/coverage/html/models/basic_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/basic_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - basic_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/basic_models.dart.gcov.html b/coverage/html/models/basic_models.dart.gcov.html deleted file mode 100644 index 719519e0..00000000 --- a/coverage/html/models/basic_models.dart.gcov.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - LCOV - lcov.info - models/basic_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - basic_models.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %42
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart';
-       3              : 
-       4              : part 'basic_models.g.dart';
-       5              : part 'basic_models.freezed.dart';
-       6              : 
-       7              : /// ERRORS
-       8              : 
-       9              : class WalletConnectErrorSilent {}
-      10              : 
-      11              : @freezed
-      12              : class WalletConnectError with _$WalletConnectError {
-      13              :   // @JsonSerializable(includeIfNull: false)
-      14              :   const factory WalletConnectError({
-      15              :     required int code,
-      16              :     required String message,
-      17              :     String? data,
-      18              :   }) = _WalletConnectError;
-      19              : 
-      20            0 :   factory WalletConnectError.fromJson(Map<String, dynamic> json) =>
-      21            0 :       _$WalletConnectErrorFromJson(json);
-      22              : }
-      23              : 
-      24              : @freezed
-      25              : class RpcOptions with _$RpcOptions {
-      26              :   // @JsonSerializable()
-      27              :   const factory RpcOptions({
-      28              :     required int ttl,
-      29              :     required bool prompt,
-      30              :     required int tag,
-      31              :   }) = _RpcOptions;
-      32              : }
-      33              : 
-      34              : @freezed
-      35              : class ConnectionMetadata with _$ConnectionMetadata {
-      36              :   // @JsonSerializable()
-      37              :   const factory ConnectionMetadata({
-      38              :     required String publicKey,
-      39              :     required PairingMetadata metadata,
-      40              :   }) = _ConnectionMetadata;
-      41              : 
-      42            5 :   factory ConnectionMetadata.fromJson(Map<String, dynamic> json) =>
-      43            5 :       _$ConnectionMetadataFromJson(json);
-      44              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/index-sort-f.html b/coverage/html/models/index-sort-f.html deleted file mode 100644 index 946daf35..00000000 --- a/coverage/html/models/index-sort-f.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - lcov.info - models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
basic_models.dart -
50.0%50.0%
-
50.0 %42-
json_rpc_error.dart -
50.0%50.0%
-
50.0 %126-
json_rpc_request.dart -
100.0%
-
100.0 %22-
json_rpc_response.dart -
100.0%
-
100.0 %22-
uri_parse_result.dart -
100.0%
-
100.0 %33-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/index-sort-l.html b/coverage/html/models/index-sort-l.html deleted file mode 100644 index 58982d45..00000000 --- a/coverage/html/models/index-sort-l.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
basic_models.dart -
50.0%50.0%
-
50.0 %42
json_rpc_error.dart -
50.0%50.0%
-
50.0 %126
json_rpc_request.dart -
100.0%
-
100.0 %22
json_rpc_response.dart -
100.0%
-
100.0 %22
uri_parse_result.dart -
100.0%
-
100.0 %33
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/index.html b/coverage/html/models/index.html deleted file mode 100644 index f9cd7bb6..00000000 --- a/coverage/html/models/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - modelsCoverageTotalHit
Test:lcov.infoLines:65.2 %2315
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
basic_models.dart -
50.0%50.0%
-
50.0 %42
json_rpc_error.dart -
50.0%50.0%
-
50.0 %126
json_rpc_request.dart -
100.0%
-
100.0 %22
json_rpc_response.dart -
100.0%
-
100.0 %22
uri_parse_result.dart -
100.0%
-
100.0 %33
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_error.dart.func-c.html b/coverage/html/models/json_rpc_error.dart.func-c.html deleted file mode 100644 index be8dcd4b..00000000 --- a/coverage/html/models/json_rpc_error.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_error.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_error.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_error.dart.func.html b/coverage/html/models/json_rpc_error.dart.func.html deleted file mode 100644 index 0b444a4e..00000000 --- a/coverage/html/models/json_rpc_error.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_error.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_error.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_error.dart.gcov.html b/coverage/html/models/json_rpc_error.dart.gcov.html deleted file mode 100644 index 64d6c799..00000000 --- a/coverage/html/models/json_rpc_error.dart.gcov.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_error.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_error.dartCoverageTotalHit
Test:lcov.infoLines:50.0 %126
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : 
-       3              : part 'json_rpc_error.g.dart';
-       4              : part 'json_rpc_error.freezed.dart';
-       5              : 
-       6              : @freezed
-       7              : class JsonRpcError with _$JsonRpcError {
-       8              :   @JsonSerializable(includeIfNull: false)
-       9              :   const factory JsonRpcError({
-      10              :     int? code,
-      11              :     String? message,
-      12              :   }) = _JsonRpcError;
-      13              : 
-      14            0 :   factory JsonRpcError.serverError(String message) =>
-      15            0 :       JsonRpcError(code: -32000, message: message);
-      16            3 :   factory JsonRpcError.invalidParams(String message) =>
-      17            6 :       JsonRpcError(code: -32602, message: message);
-      18            0 :   factory JsonRpcError.invalidRequest(String message) =>
-      19            0 :       JsonRpcError(code: -32600, message: message);
-      20            0 :   factory JsonRpcError.parseError(String message) =>
-      21            0 :       JsonRpcError(code: -32700, message: message);
-      22            3 :   factory JsonRpcError.methodNotFound(String message) =>
-      23            6 :       JsonRpcError(code: -32601, message: message);
-      24              : 
-      25            3 :   factory JsonRpcError.fromJson(Map<String, dynamic> json) =>
-      26            3 :       _$JsonRpcErrorFromJson(json);
-      27              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_request.dart.func-c.html b/coverage/html/models/json_rpc_request.dart.func-c.html deleted file mode 100644 index 126b9c9c..00000000 --- a/coverage/html/models/json_rpc_request.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_request.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_request.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_request.dart.func.html b/coverage/html/models/json_rpc_request.dart.func.html deleted file mode 100644 index d44befa1..00000000 --- a/coverage/html/models/json_rpc_request.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_request.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_request.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_request.dart.gcov.html b/coverage/html/models/json_rpc_request.dart.gcov.html deleted file mode 100644 index f2083d8c..00000000 --- a/coverage/html/models/json_rpc_request.dart.gcov.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_request.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_request.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : 
-       3              : part 'json_rpc_request.g.dart';
-       4              : part 'json_rpc_request.freezed.dart';
-       5              : 
-       6              : @freezed
-       7              : class JsonRpcRequest with _$JsonRpcRequest {
-       8              :   @JsonSerializable()
-       9              :   const factory JsonRpcRequest({
-      10              :     required int id,
-      11              :     @Default('2.0') String jsonrpc,
-      12              :     required String method,
-      13              :     dynamic params,
-      14              :   }) = _JsonRpcRequest;
-      15              : 
-      16            6 :   factory JsonRpcRequest.fromJson(Map<String, dynamic> json) =>
-      17            6 :       _$JsonRpcRequestFromJson(json);
-      18              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_response.dart.func-c.html b/coverage/html/models/json_rpc_response.dart.func-c.html deleted file mode 100644 index 076881dd..00000000 --- a/coverage/html/models/json_rpc_response.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_response.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_response.dart.func.html b/coverage/html/models/json_rpc_response.dart.func.html deleted file mode 100644 index d79d2f86..00000000 --- a/coverage/html/models/json_rpc_response.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_response.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_response.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/json_rpc_response.dart.gcov.html b/coverage/html/models/json_rpc_response.dart.gcov.html deleted file mode 100644 index 20e2c5f8..00000000 --- a/coverage/html/models/json_rpc_response.dart.gcov.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - models/json_rpc_response.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - json_rpc_response.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-       3              : 
-       4              : part 'json_rpc_response.g.dart';
-       5              : part 'json_rpc_response.freezed.dart';
-       6              : 
-       7              : @Freezed(genericArgumentFactories: true)
-       8              : class JsonRpcResponse<T> with _$JsonRpcResponse<T> {
-       9              :   // @JsonSerializable(genericArgumentFactories: true)
-      10              :   const factory JsonRpcResponse({
-      11              :     required int id,
-      12              :     @Default('2.0') String jsonrpc,
-      13              :     JsonRpcError? error,
-      14              :     T? result,
-      15              :   }) = _JsonRpcResponse<T>;
-      16              : 
-      17            6 :   factory JsonRpcResponse.fromJson(Map<String, dynamic> json) =>
-      18           12 :       _$JsonRpcResponseFromJson(json, (object) => object as T);
-      19              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/uri_parse_result.dart.func-c.html b/coverage/html/models/uri_parse_result.dart.func-c.html deleted file mode 100644 index 049e515b..00000000 --- a/coverage/html/models/uri_parse_result.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/uri_parse_result.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - uri_parse_result.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/uri_parse_result.dart.func.html b/coverage/html/models/uri_parse_result.dart.func.html deleted file mode 100644 index c6c5bee7..00000000 --- a/coverage/html/models/uri_parse_result.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - models/uri_parse_result.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - uri_parse_result.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/models/uri_parse_result.dart.gcov.html b/coverage/html/models/uri_parse_result.dart.gcov.html deleted file mode 100644 index dfbad25d..00000000 --- a/coverage/html/models/uri_parse_result.dart.gcov.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - LCOV - lcov.info - models/uri_parse_result.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - models - uri_parse_result.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %33
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       2              : 
-       3              : enum URIVersion {
-       4              :   v1,
-       5              :   v2,
-       6              : }
-       7              : 
-       8              : class URIParseResult {
-       9              :   final String protocol;
-      10              :   final String topic;
-      11              :   final URIVersion? version;
-      12              :   final URIV1ParsedData? v1Data;
-      13              :   final URIV2ParsedData? v2Data;
-      14              : 
-      15            8 :   URIParseResult({
-      16              :     required this.protocol,
-      17              :     required this.version,
-      18              :     required this.topic,
-      19              :     this.v1Data,
-      20              :     this.v2Data,
-      21              :   });
-      22              : }
-      23              : 
-      24              : class URIV1ParsedData {
-      25              :   final String key;
-      26              :   final String bridge;
-      27              : 
-      28            5 :   URIV1ParsedData({
-      29              :     required this.key,
-      30              :     required this.bridge,
-      31              :   });
-      32              : }
-      33              : 
-      34              : class URIV2ParsedData {
-      35              :   final String symKey;
-      36              :   final Relay relay;
-      37              :   final List<String> methods;
-      38              : 
-      39            8 :   URIV2ParsedData({
-      40              :     required this.symKey,
-      41              :     required this.relay,
-      42              :     required this.methods,
-      43              :   });
-      44              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/ruby.png b/coverage/html/ruby.png deleted file mode 100644 index 991b6d4ec9e78be165e3ef757eed1aada287364d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS diff --git a/coverage/html/sign_api/index-sort-f.html b/coverage/html/sign_api/index-sort-f.html deleted file mode 100644 index 12426721..00000000 --- a/coverage/html/sign_api/index-sort-f.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
sessions.dart -
100.0%
-
100.0 %77-
sign_client.dart -
57.6%57.6%
-
57.6 %15891-
sign_engine.dart -
51.9%51.9%
-
51.9 %1046543-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/index-sort-l.html b/coverage/html/sign_api/index-sort-l.html deleted file mode 100644 index 19b67aeb..00000000 --- a/coverage/html/sign_api/index-sort-l.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
sign_engine.dart -
51.9%51.9%
-
51.9 %1046543
sign_client.dart -
57.6%57.6%
-
57.6 %15891
sessions.dart -
100.0%
-
100.0 %77
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/index.html b/coverage/html/sign_api/index.html deleted file mode 100644 index bad13f86..00000000 --- a/coverage/html/sign_api/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_apiCoverageTotalHit
Test:lcov.infoLines:52.9 %1211641
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
sessions.dart -
100.0%
-
100.0 %77
sign_client.dart -
57.6%57.6%
-
57.6 %15891
sign_engine.dart -
51.9%51.9%
-
51.9 %1046543
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html deleted file mode 100644 index df39df89..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_events.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html deleted file mode 100644 index bc6a2b92..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_events.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html b/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html deleted file mode 100644 index 221634af..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_events.dart.gcov.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_events.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_events.dartCoverageTotalHit
Test:lcov.infoLines:16.7 %122
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       8              : 
-       9              : class AuthRequest extends EventArgs {
-      10              :   final int id;
-      11              :   final String topic;
-      12              :   final AuthPayloadParams payloadParams;
-      13              :   final ConnectionMetadata requester;
-      14              : 
-      15            2 :   AuthRequest({
-      16              :     required this.id,
-      17              :     required this.topic,
-      18              :     required this.payloadParams,
-      19              :     required this.requester,
-      20              :   });
-      21              : 
-      22            0 :   @override
-      23              :   String toString() {
-      24            0 :     return 'AuthRequest(id: $id, topic: $topic, payloadParams: $payloadParams, requester: $requester)';
-      25              :   }
-      26              : }
-      27              : 
-      28              : class AuthResponse extends EventArgs {
-      29              :   final int id;
-      30              :   final String topic;
-      31              :   final Cacao? result;
-      32              :   final WalletConnectError? error;
-      33              :   final JsonRpcError? jsonRpcError;
-      34              : 
-      35            2 :   AuthResponse({
-      36              :     required this.id,
-      37              :     required this.topic,
-      38              :     this.result,
-      39              :     this.error,
-      40              :     this.jsonRpcError,
-      41              :   });
-      42              : 
-      43            0 :   Map<String, dynamic> toJson() => {
-      44            0 :         'id': id,
-      45            0 :         'topic': topic,
-      46            0 :         if (result != null) 'result': result?.toJson(),
-      47            0 :         if (error != null) 'error': error!.toJson(),
-      48            0 :         if (jsonRpcError != null) 'jsonRpcError': jsonRpcError!.toJson(),
-      49              :       };
-      50              : 
-      51            0 :   @override
-      52              :   String toString() {
-      53            0 :     return 'AuthResponse(${jsonEncode(toJson())})';
-      54              :   }
-      55              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html deleted file mode 100644 index 1ceaec25..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html deleted file mode 100644 index 501942af..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html b/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html deleted file mode 100644 index ee8f1990..00000000 --- a/coverage/html/sign_api/models/auth/auth_client_models.dart.gcov.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/auth_client_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - auth_client_models.dartCoverageTotalHit
Test:lcov.infoLines:62.8 %4327
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:freezed_annotation/freezed_annotation.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_events.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_utils.dart';
-       8              : 
-       9              : part 'auth_client_models.g.dart';
-      10              : part 'auth_client_models.freezed.dart';
-      11              : 
-      12              : class AuthRequestResponse {
-      13              :   final int id;
-      14              :   final String pairingTopic;
-      15              :   final Completer<AuthResponse> completer;
-      16              :   final Uri? uri;
-      17              : 
-      18            2 :   AuthRequestResponse({
-      19              :     required this.id,
-      20              :     required this.pairingTopic,
-      21              :     required this.completer,
-      22              :     this.uri,
-      23              :   });
-      24              : }
-      25              : 
-      26              : class AuthRequestParams {
-      27              :   /// The Chain ID.
-      28              :   /// Examples: eip155:1 (Eth Mainnet), eip155:43114 (Avalanche)
-      29              :   final String chainId;
-      30              : 
-      31              :   /// The complete URL you are logging into.
-      32              :   /// Example: https://example.com/login
-      33              :   final String aud;
-      34              : 
-      35              :   /// The domain you are logging in to.
-      36              :   /// Example: example.com
-      37              :   final String domain;
-      38              :   final String nonce;
-      39              :   final String? type;
-      40              :   final String? nbf;
-      41              :   final String? exp;
-      42              :   final String? statement;
-      43              :   final String? requestId;
-      44              :   final List<String>? resources;
-      45              :   final int? expiry;
-      46              : 
-      47            3 :   AuthRequestParams({
-      48              :     required this.chainId,
-      49              :     required this.domain,
-      50              :     required this.aud,
-      51              :     String? nonce,
-      52              :     this.type = CacaoHeader.EIP4361,
-      53              :     this.nbf,
-      54              :     this.exp,
-      55              :     this.statement,
-      56              :     this.requestId,
-      57              :     this.resources,
-      58              :     this.expiry,
-      59            3 :   }) : nonce = nonce ?? AuthUtils.generateNonce();
-      60              : 
-      61            0 :   Map<String, dynamic> toJson() => {
-      62            0 :         'chainId': chainId,
-      63            0 :         'aud': aud,
-      64            0 :         'domain': domain,
-      65            0 :         'nonce': nonce,
-      66            0 :         if (type != null) 'type': type,
-      67            0 :         if (nbf != null) 'nbf': nbf,
-      68            0 :         if (exp != null) 'exp': exp,
-      69            0 :         if (statement != null) 'statement': statement,
-      70            0 :         if (requestId != null) 'requestId': requestId,
-      71            0 :         if (resources != null) 'resources': resources,
-      72            0 :         if (expiry != null) 'expiry': expiry,
-      73              :       };
-      74              : }
-      75              : 
-      76              : @freezed
-      77              : class AuthPayloadParams with _$AuthPayloadParams {
-      78              :   @JsonSerializable(includeIfNull: false)
-      79              :   const factory AuthPayloadParams({
-      80              :     required String chainId,
-      81              :     required String aud,
-      82              :     required String domain,
-      83              :     required String nonce,
-      84              :     required String type,
-      85              :     //
-      86              :     required String version,
-      87              :     required String iat,
-      88              :     //
-      89              :     String? nbf,
-      90              :     String? exp,
-      91              :     String? statement,
-      92              :     String? requestId,
-      93              :     List<String>? resources,
-      94              :   }) = _AuthPayloadParams;
-      95              : 
-      96            2 :   factory AuthPayloadParams.fromRequestParams(AuthRequestParams params) {
-      97            2 :     final now = DateTime.now();
-      98            2 :     return AuthPayloadParams(
-      99            2 :       type: params.type ?? CacaoHeader.EIP4361,
-     100            2 :       chainId: params.chainId,
-     101            2 :       domain: params.domain,
-     102            2 :       aud: params.aud,
-     103              :       version: '1',
-     104            2 :       nonce: params.nonce,
-     105            2 :       iat: DateTime.utc(
-     106            2 :         now.year,
-     107            2 :         now.month,
-     108            2 :         now.day,
-     109            2 :         now.hour,
-     110            2 :         now.minute,
-     111            2 :         now.second,
-     112            2 :         now.millisecond,
-     113            2 :       ).toIso8601String(),
-     114            2 :       nbf: params.nbf,
-     115            2 :       exp: params.exp,
-     116            2 :       statement: params.statement,
-     117            2 :       requestId: params.requestId,
-     118            2 :       resources: params.resources,
-     119              :     );
-     120              :   }
-     121              : 
-     122            2 :   factory AuthPayloadParams.fromJson(Map<String, dynamic> json) =>
-     123            2 :       _$AuthPayloadParamsFromJson(json);
-     124              : }
-     125              : 
-     126              : @freezed
-     127              : class PendingAuthRequest with _$PendingAuthRequest {
-     128              :   @JsonSerializable(includeIfNull: false)
-     129              :   const factory PendingAuthRequest({
-     130              :     required int id,
-     131              :     required String pairingTopic,
-     132              :     required ConnectionMetadata metadata,
-     133              :     required CacaoRequestPayload cacaoPayload,
-     134              :   }) = _PendingAuthRequest;
-     135              : 
-     136            0 :   factory PendingAuthRequest.fromJson(Map<String, dynamic> json) =>
-     137            0 :       _$PendingAuthRequestFromJson(json);
-     138              : }
-     139              : 
-     140              : class AuthRequestCompleter {
-     141              :   final int id;
-     142              :   final String pairingTopic;
-     143              :   final String responseTopic;
-     144              :   final PendingAuthRequest request;
-     145              :   final Completer<Cacao> completer;
-     146              : 
-     147            0 :   AuthRequestCompleter({
-     148              :     required this.id,
-     149              :     required this.pairingTopic,
-     150              :     required this.responseTopic,
-     151              :     required this.request,
-     152              :     required this.completer,
-     153              :   });
-     154              : }
-     155              : 
-     156              : class RespondParams {
-     157              :   final int id;
-     158              :   final CacaoSignature? signature;
-     159              :   final WalletConnectError? error;
-     160              : 
-     161            0 :   RespondParams({
-     162              :     required this.id,
-     163              :     this.signature,
-     164              :     this.error,
-     165              :   });
-     166              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html deleted file mode 100644 index 1b4ebc61..00000000 --- a/coverage/html/sign_api/models/auth/common_auth_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - common_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html deleted file mode 100644 index 3999380c..00000000 --- a/coverage/html/sign_api/models/auth/common_auth_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - common_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html b/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html deleted file mode 100644 index e25fc7f2..00000000 --- a/coverage/html/sign_api/models/auth/common_auth_models.dart.gcov.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/common_auth_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - common_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:72.7 %6648
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : 
-       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
-       5              : 
-       6              : part 'common_auth_models.g.dart';
-       7              : part 'common_auth_models.freezed.dart';
-       8              : 
-       9              : @freezed
-      10              : class AuthPublicKey with _$AuthPublicKey {
-      11              :   @JsonSerializable(includeIfNull: false)
-      12              :   const factory AuthPublicKey({
-      13              :     required String publicKey,
-      14              :   }) = _AuthPublicKey;
-      15              : 
-      16            0 :   factory AuthPublicKey.fromJson(Map<String, dynamic> json) =>
-      17            0 :       _$AuthPublicKeyFromJson(json);
-      18              : }
-      19              : 
-      20              : @freezed
-      21              : class CacaoRequestPayload with _$CacaoRequestPayload {
-      22              :   @JsonSerializable(includeIfNull: false)
-      23              :   const factory CacaoRequestPayload({
-      24              :     required String domain,
-      25              :     required String aud,
-      26              :     required String version,
-      27              :     required String nonce,
-      28              :     required String iat,
-      29              :     String? nbf,
-      30              :     String? exp,
-      31              :     String? statement,
-      32              :     String? requestId,
-      33              :     List<String>? resources,
-      34              :   }) = _CacaoRequestPayload;
-      35              : 
-      36            2 :   factory CacaoRequestPayload.fromPayloadParams(AuthPayloadParams params) {
-      37            2 :     return CacaoRequestPayload(
-      38            2 :       domain: params.domain,
-      39            2 :       aud: params.aud,
-      40            2 :       version: params.version,
-      41            2 :       nonce: params.nonce,
-      42            2 :       iat: params.iat,
-      43            2 :       nbf: params.nbf,
-      44            2 :       exp: params.exp,
-      45            2 :       statement: params.statement,
-      46            2 :       requestId: params.requestId,
-      47            2 :       resources: params.resources,
-      48              :     );
-      49              :   }
-      50              : 
-      51            0 :   factory CacaoRequestPayload.fromSessionAuthPayload(
-      52              :     SessionAuthPayload params,
-      53              :   ) {
-      54            0 :     return CacaoRequestPayload(
-      55            0 :       domain: params.domain,
-      56            0 :       aud: params.aud,
-      57            0 :       version: params.version,
-      58            0 :       nonce: params.nonce,
-      59            0 :       iat: params.iat,
-      60            0 :       nbf: params.nbf,
-      61            0 :       exp: params.exp,
-      62            0 :       statement: params.statement,
-      63            0 :       requestId: params.requestId,
-      64            0 :       resources: params.resources,
-      65              :     );
-      66              :   }
-      67              : 
-      68            2 :   factory CacaoRequestPayload.fromCacaoPayload(CacaoPayload payload) {
-      69            2 :     return CacaoRequestPayload(
-      70            2 :       domain: payload.domain,
-      71            2 :       aud: payload.aud,
-      72            2 :       version: payload.version,
-      73            2 :       nonce: payload.nonce,
-      74            2 :       iat: payload.iat,
-      75            2 :       nbf: payload.nbf,
-      76            2 :       exp: payload.exp,
-      77            2 :       statement: payload.statement,
-      78            2 :       requestId: payload.requestId,
-      79            2 :       resources: payload.resources,
-      80              :     );
-      81              :   }
-      82              : 
-      83            0 :   factory CacaoRequestPayload.fromJson(Map<String, dynamic> json) =>
-      84            0 :       _$CacaoRequestPayloadFromJson(json);
-      85              : }
-      86              : 
-      87              : @freezed
-      88              : class CacaoPayload with _$CacaoPayload {
-      89              :   @JsonSerializable(includeIfNull: false)
-      90              :   const factory CacaoPayload({
-      91              :     required String iss,
-      92              :     required String domain,
-      93              :     required String aud,
-      94              :     required String version,
-      95              :     required String nonce,
-      96              :     required String iat,
-      97              :     String? nbf,
-      98              :     String? exp,
-      99              :     String? statement,
-     100              :     String? requestId,
-     101              :     List<String>? resources,
-     102              :   }) = _CacaoPayload;
-     103              : 
-     104            2 :   factory CacaoPayload.fromRequestPayload({
-     105              :     required String issuer,
-     106              :     required CacaoRequestPayload payload,
-     107              :   }) {
-     108            2 :     return CacaoPayload(
-     109              :       iss: issuer,
-     110            2 :       domain: payload.domain,
-     111            2 :       aud: payload.aud,
-     112            2 :       version: payload.version,
-     113            2 :       nonce: payload.nonce,
-     114            2 :       iat: payload.iat,
-     115            2 :       nbf: payload.nbf,
-     116            2 :       exp: payload.exp,
-     117            2 :       statement: payload.statement,
-     118            2 :       requestId: payload.requestId,
-     119            2 :       resources: payload.resources,
-     120              :     );
-     121              :   }
-     122              : 
-     123            2 :   factory CacaoPayload.fromJson(Map<String, dynamic> json) =>
-     124            2 :       _$CacaoPayloadFromJson(json);
-     125              : }
-     126              : 
-     127              : @freezed
-     128              : class CacaoHeader with _$CacaoHeader {
-     129              :   static const EIP4361 = 'eip4361';
-     130              :   static const CAIP122 = 'caip122';
-     131              : 
-     132              :   @JsonSerializable(includeIfNull: false)
-     133              :   const factory CacaoHeader({
-     134              :     @Default('eip4361') String t,
-     135              :   }) = _CacaoHeader;
-     136              : 
-     137            2 :   factory CacaoHeader.fromJson(Map<String, dynamic> json) =>
-     138            2 :       _$CacaoHeaderFromJson(json);
-     139              : }
-     140              : 
-     141              : @freezed
-     142              : class CacaoSignature with _$CacaoSignature {
-     143              :   static const EIP191 = 'eip191';
-     144              :   static const EIP1271 = 'eip1271';
-     145              : 
-     146              :   @JsonSerializable(includeIfNull: false)
-     147              :   const factory CacaoSignature({
-     148              :     required String t,
-     149              :     required String s,
-     150              :     String? m,
-     151              :   }) = _CacaoSignature;
-     152              : 
-     153            2 :   factory CacaoSignature.fromJson(Map<String, dynamic> json) =>
-     154            2 :       _$CacaoSignatureFromJson(json);
-     155              : }
-     156              : 
-     157              : @freezed
-     158              : class Cacao with _$Cacao {
-     159              :   @JsonSerializable(includeIfNull: false)
-     160              :   const factory Cacao({
-     161              :     required CacaoHeader h,
-     162              :     required CacaoPayload p,
-     163              :     required CacaoSignature s,
-     164              :   }) = _Cacao;
-     165              : 
-     166            4 :   factory Cacao.fromJson(Map<String, dynamic> json) => _$CacaoFromJson(json);
-     167              : }
-     168              : 
-     169              : @freezed
-     170              : class StoredCacao with _$StoredCacao {
-     171              :   @JsonSerializable(includeIfNull: false)
-     172              :   const factory StoredCacao({
-     173              :     required int id,
-     174              :     required String pairingTopic,
-     175              :     required CacaoHeader h,
-     176              :     required CacaoPayload p,
-     177              :     required CacaoSignature s,
-     178              :   }) = _StoredCacao;
-     179              : 
-     180            2 :   factory StoredCacao.fromCacao({
-     181              :     required int id,
-     182              :     required String pairingTopic,
-     183              :     required Cacao cacao,
-     184              :   }) {
-     185            2 :     return StoredCacao(
-     186              :       id: id,
-     187              :       pairingTopic: pairingTopic,
-     188            2 :       h: cacao.h,
-     189            2 :       p: cacao.p,
-     190            2 :       s: cacao.s,
-     191              :     );
-     192              :   }
-     193              : 
-     194            0 :   factory StoredCacao.fromJson(Map<String, dynamic> json) =>
-     195            0 :       _$StoredCacaoFromJson(json);
-     196              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/index-sort-f.html b/coverage/html/sign_api/models/auth/index-sort-f.html deleted file mode 100644 index 3af50bbb..00000000 --- a/coverage/html/sign_api/models/auth/index-sort-f.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
auth_client_events.dart -
16.7%16.7%
-
16.7 %122-
auth_client_models.dart -
62.8%62.8%
-
62.8 %4327-
common_auth_models.dart -
72.7%72.7%
-
72.7 %6648-
session_auth_events.dart -
0.0%
-
0.0 %19-
session_auth_models.dart -
0.0%
-
0.0 %29-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/index-sort-l.html b/coverage/html/sign_api/models/auth/index-sort-l.html deleted file mode 100644 index 130f99b7..00000000 --- a/coverage/html/sign_api/models/auth/index-sort-l.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
session_auth_events.dart -
0.0%
-
0.0 %19
session_auth_models.dart -
0.0%
-
0.0 %29
auth_client_events.dart -
16.7%16.7%
-
16.7 %122
auth_client_models.dart -
62.8%62.8%
-
62.8 %4327
common_auth_models.dart -
72.7%72.7%
-
72.7 %6648
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/index.html b/coverage/html/sign_api/models/auth/index.html deleted file mode 100644 index 5777aa86..00000000 --- a/coverage/html/sign_api/models/auth/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/authCoverageTotalHit
Test:lcov.infoLines:45.6 %16977
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
auth_client_events.dart -
16.7%16.7%
-
16.7 %122
auth_client_models.dart -
62.8%62.8%
-
62.8 %4327
common_auth_models.dart -
72.7%72.7%
-
72.7 %6648
session_auth_events.dart -
0.0%
-
0.0 %19
session_auth_models.dart -
0.0%
-
0.0 %29
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html deleted file mode 100644 index 129489ed..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_events.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html deleted file mode 100644 index e50ac9bc..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_events.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html b/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html deleted file mode 100644 index 2db22d45..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_events.dart.gcov.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_events.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_events.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %190
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/models/json_rpc_error.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       9              : 
-      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
-      11              : 
-      12              : class SessionAuthRequest extends EventArgs {
-      13              :   final int id;
-      14              :   final String topic;
-      15              :   final SessionAuthPayload authPayload;
-      16              :   final ConnectionMetadata requester;
-      17              :   final VerifyContext? verifyContext;
-      18              : 
-      19            0 :   SessionAuthRequest({
-      20              :     required this.id,
-      21              :     required this.topic,
-      22              :     required this.authPayload,
-      23              :     required this.requester,
-      24              :     this.verifyContext,
-      25              :   });
-      26              : 
-      27            0 :   Map<String, dynamic> toJson() => {
-      28            0 :         'id': id,
-      29            0 :         'topic': topic,
-      30            0 :         'authPayload': authPayload.toJson(),
-      31            0 :         'requester': requester.toJson(),
-      32            0 :         'verifyContext': verifyContext?.toJson(),
-      33              :       };
-      34              : 
-      35            0 :   @override
-      36              :   String toString() {
-      37            0 :     return 'SessionAuthRequest(${jsonEncode(toJson())})';
-      38              :   }
-      39              : }
-      40              : 
-      41              : class SessionAuthResponse extends EventArgs {
-      42              :   final int id;
-      43              :   final String topic;
-      44              :   final List<Cacao>? auths;
-      45              :   final SessionData? session;
-      46              :   final WalletConnectError? error;
-      47              :   final JsonRpcError? jsonRpcError;
-      48              : 
-      49            0 :   SessionAuthResponse({
-      50              :     required this.id,
-      51              :     required this.topic,
-      52              :     this.auths,
-      53              :     this.session,
-      54              :     this.error,
-      55              :     this.jsonRpcError,
-      56              :   });
-      57              : 
-      58            0 :   Map<String, dynamic> toJson() => {
-      59            0 :         'id': id,
-      60            0 :         'topic': topic,
-      61            0 :         if (auths != null) 'auths': auths,
-      62            0 :         if (session != null) 'session': session!.toJson(),
-      63            0 :         if (error != null) 'error': error!.toJson(),
-      64            0 :         if (jsonRpcError != null) 'jsonRpcError': jsonRpcError!.toJson(),
-      65              :       };
-      66              : 
-      67            0 :   @override
-      68              :   String toString() {
-      69            0 :     return 'SessionAuthResponse(${jsonEncode(toJson())})';
-      70              :   }
-      71              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html deleted file mode 100644 index 3c595ca0..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html deleted file mode 100644 index 1271183e..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html b/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html deleted file mode 100644 index 11cd6682..00000000 --- a/coverage/html/sign_api/models/auth/session_auth_models.dart.gcov.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/auth/session_auth_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models/auth - session_auth_models.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %290
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:freezed_annotation/freezed_annotation.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       6              : 
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_events.dart';
-       9              : 
-      10              : part 'session_auth_models.g.dart';
-      11              : part 'session_auth_models.freezed.dart';
-      12              : 
-      13              : // TODO this should be under sign_client_models.dart probably
-      14              : class SessionAuthRequestResponse {
-      15              :   final int id;
-      16              :   final String pairingTopic;
-      17              :   final Completer<SessionAuthResponse> completer;
-      18              :   final Uri? uri;
-      19              : 
-      20            0 :   SessionAuthRequestResponse({
-      21              :     required this.id,
-      22              :     required this.pairingTopic,
-      23              :     required this.completer,
-      24              :     this.uri,
-      25              :   });
-      26              : }
-      27              : 
-      28              : @freezed
-      29              : class SessionAuthRequestParams with _$SessionAuthRequestParams {
-      30              :   @JsonSerializable(includeIfNull: false)
-      31              :   const factory SessionAuthRequestParams({
-      32              :     required List<String> chains,
-      33              :     required String domain,
-      34              :     required String nonce,
-      35              :     required String uri,
-      36              :     //
-      37              :     CacaoHeader? type,
-      38              :     String? nbf,
-      39              :     String? exp,
-      40              :     String? statement,
-      41              :     String? requestId,
-      42              :     List<String>? resources,
-      43              :     int? expiry,
-      44              :     @Default(<String>[]) List<String>? methods,
-      45              :   }) = _SessionAuthRequestParams;
-      46              :   //
-      47            0 :   factory SessionAuthRequestParams.fromJson(Map<String, dynamic> json) =>
-      48            0 :       _$SessionAuthRequestParamsFromJson(json);
-      49              : }
-      50              : 
-      51              : @freezed
-      52              : class SessionAuthPayload with _$SessionAuthPayload {
-      53              :   @JsonSerializable(includeIfNull: false)
-      54              :   const factory SessionAuthPayload({
-      55              :     required List<String> chains,
-      56              :     required String domain,
-      57              :     required String nonce,
-      58              :     required String aud,
-      59              :     required String type,
-      60              :     //
-      61              :     required String version,
-      62              :     required String iat,
-      63              :     //
-      64              :     String? nbf,
-      65              :     String? exp,
-      66              :     String? statement,
-      67              :     String? requestId,
-      68              :     List<String>? resources,
-      69              :   }) = _SessionAuthPayload;
-      70              : 
-      71            0 :   factory SessionAuthPayload.fromRequestParams(
-      72              :     SessionAuthRequestParams params,
-      73              :   ) {
-      74            0 :     final now = DateTime.now();
-      75            0 :     return SessionAuthPayload(
-      76            0 :       chains: params.chains,
-      77            0 :       domain: params.domain,
-      78            0 :       nonce: params.nonce,
-      79            0 :       aud: params.uri,
-      80            0 :       type: params.type?.t ?? 'eip4361',
-      81              :       version: '1',
-      82            0 :       iat: DateTime.utc(
-      83            0 :         now.year,
-      84            0 :         now.month,
-      85            0 :         now.day,
-      86            0 :         now.hour,
-      87            0 :         now.minute,
-      88            0 :         now.second,
-      89            0 :         now.millisecond,
-      90            0 :       ).toIso8601String(),
-      91            0 :       nbf: params.nbf,
-      92            0 :       exp: params.exp,
-      93            0 :       statement: params.statement,
-      94            0 :       requestId: params.requestId,
-      95            0 :       resources: params.resources,
-      96              :     );
-      97              :   }
-      98              : 
-      99            0 :   factory SessionAuthPayload.fromJson(Map<String, dynamic> json) =>
-     100            0 :       _$SessionAuthPayloadFromJson(json);
-     101              : }
-     102              : 
-     103              : @freezed
-     104              : class PendingSessionAuthRequest with _$PendingSessionAuthRequest {
-     105              :   @JsonSerializable(includeIfNull: false)
-     106              :   const factory PendingSessionAuthRequest({
-     107              :     required int id,
-     108              :     required String pairingTopic,
-     109              :     required ConnectionMetadata requester,
-     110              :     required int expiryTimestamp,
-     111              :     required CacaoRequestPayload authPayload,
-     112              :     required VerifyContext verifyContext,
-     113              :   }) = _PendingSessionAuthRequest;
-     114              : 
-     115            0 :   factory PendingSessionAuthRequest.fromJson(Map<String, dynamic> json) =>
-     116            0 :       _$PendingSessionAuthRequestFromJson(json);
-     117              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/index-sort-f.html b/coverage/html/sign_api/models/index-sort-f.html deleted file mode 100644 index ecb8b3de..00000000 --- a/coverage/html/sign_api/models/index-sort-f.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
json_rpc_models.dart -
64.7%64.7%
-
64.7 %3422-
proposal_models.dart -
33.3%33.3%
-
33.3 %62-
session_models.dart -
33.3%33.3%
-
33.3 %93-
sign_client_events.dart -
36.4%36.4%
-
36.4 %4416-
sign_client_models.dart -
33.3%33.3%
-
33.3 %62-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/index-sort-l.html b/coverage/html/sign_api/models/index-sort-l.html deleted file mode 100644 index 4ba99186..00000000 --- a/coverage/html/sign_api/models/index-sort-l.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
proposal_models.dart -
33.3%33.3%
-
33.3 %62
sign_client_models.dart -
33.3%33.3%
-
33.3 %62
session_models.dart -
33.3%33.3%
-
33.3 %93
sign_client_events.dart -
36.4%36.4%
-
36.4 %4416
json_rpc_models.dart -
64.7%64.7%
-
64.7 %3422
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/index.html b/coverage/html/sign_api/models/index.html deleted file mode 100644 index f50fe465..00000000 --- a/coverage/html/sign_api/models/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/modelsCoverageTotalHit
Test:lcov.infoLines:45.5 %9945
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
json_rpc_models.dart -
64.7%64.7%
-
64.7 %3422
proposal_models.dart -
33.3%33.3%
-
33.3 %62
session_models.dart -
33.3%33.3%
-
33.3 %93
sign_client_events.dart -
36.4%36.4%
-
36.4 %4416
sign_client_models.dart -
33.3%33.3%
-
33.3 %62
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html b/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html deleted file mode 100644 index 33e10dd4..00000000 --- a/coverage/html/sign_api/models/json_rpc_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/json_rpc_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - json_rpc_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.func.html b/coverage/html/sign_api/models/json_rpc_models.dart.func.html deleted file mode 100644 index 2e9d7638..00000000 --- a/coverage/html/sign_api/models/json_rpc_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/json_rpc_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - json_rpc_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html b/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html deleted file mode 100644 index 91fe7904..00000000 --- a/coverage/html/sign_api/models/json_rpc_models.dart.gcov.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/json_rpc_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - json_rpc_models.dartCoverageTotalHit
Test:lcov.infoLines:64.7 %3422
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/auth_client_models.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       9              : 
-      10              : part 'json_rpc_models.g.dart';
-      11              : part 'json_rpc_models.freezed.dart';
-      12              : 
-      13              : @freezed
-      14              : class WcPairingDeleteRequest with _$WcPairingDeleteRequest {
-      15              :   @JsonSerializable()
-      16              :   const factory WcPairingDeleteRequest({
-      17              :     required int code,
-      18              :     required String message,
-      19              :   }) = _WcPairingDeleteRequest;
-      20              : 
-      21            0 :   factory WcPairingDeleteRequest.fromJson(Map<String, dynamic> json) =>
-      22            0 :       _$WcPairingDeleteRequestFromJson(json);
-      23              : }
-      24              : 
-      25              : @freezed
-      26              : class WcPairingPingRequest with _$WcPairingPingRequest {
-      27              :   @JsonSerializable()
-      28              :   const factory WcPairingPingRequest({
-      29              :     required Map<String, dynamic> data,
-      30              :   }) = _WcPairingPingRequest;
-      31              : 
-      32            0 :   factory WcPairingPingRequest.fromJson(Map<String, dynamic> json) =>
-      33            0 :       _$WcPairingPingRequestFromJson(json);
-      34              : }
-      35              : 
-      36              : @freezed
-      37              : class WcSessionProposeRequest with _$WcSessionProposeRequest {
-      38              :   @JsonSerializable(includeIfNull: false)
-      39              :   const factory WcSessionProposeRequest({
-      40              :     required List<Relay> relays,
-      41              :     required Map<String, RequiredNamespace> requiredNamespaces,
-      42              :     Map<String, RequiredNamespace>? optionalNamespaces,
-      43              :     Map<String, String>? sessionProperties,
-      44              :     required ConnectionMetadata proposer,
-      45              :   }) = _WcSessionProposeRequest;
-      46              : 
-      47            4 :   factory WcSessionProposeRequest.fromJson(Map<String, dynamic> json) =>
-      48            4 :       _$WcSessionProposeRequestFromJson(json);
-      49              : }
-      50              : 
-      51              : @freezed
-      52              : class WcSessionProposeResponse with _$WcSessionProposeResponse {
-      53              :   @JsonSerializable()
-      54              :   const factory WcSessionProposeResponse({
-      55              :     required Relay relay,
-      56              :     required String responderPublicKey,
-      57              :   }) = _WcSessionProposeResponse;
-      58              : 
-      59            0 :   factory WcSessionProposeResponse.fromJson(Map<String, dynamic> json) =>
-      60            0 :       _$WcSessionProposeResponseFromJson(json);
-      61              : }
-      62              : 
-      63              : @freezed
-      64              : class WcSessionSettleRequest with _$WcSessionSettleRequest {
-      65              :   @JsonSerializable(includeIfNull: false)
-      66              :   const factory WcSessionSettleRequest({
-      67              :     required Relay relay,
-      68              :     required Map<String, Namespace> namespaces,
-      69              :     Map<String, RequiredNamespace>? requiredNamespaces,
-      70              :     Map<String, RequiredNamespace>? optionalNamespaces,
-      71              :     Map<String, String>? sessionProperties,
-      72              :     required int expiry,
-      73              :     required ConnectionMetadata controller,
-      74              :   }) = _WcSessionSettleRequest;
-      75              : 
-      76            4 :   factory WcSessionSettleRequest.fromJson(Map<String, dynamic> json) =>
-      77            4 :       _$WcSessionSettleRequestFromJson(json);
-      78              : }
-      79              : 
-      80              : @freezed
-      81              : class WcSessionUpdateRequest with _$WcSessionUpdateRequest {
-      82              :   @JsonSerializable()
-      83              :   const factory WcSessionUpdateRequest({
-      84              :     required Map<String, Namespace> namespaces,
-      85              :   }) = _WcSessionUpdateRequest;
-      86              : 
-      87            3 :   factory WcSessionUpdateRequest.fromJson(Map<String, dynamic> json) =>
-      88            3 :       _$WcSessionUpdateRequestFromJson(json);
-      89              : }
-      90              : 
-      91              : @freezed
-      92              : class WcSessionExtendRequest with _$WcSessionExtendRequest {
-      93              :   @JsonSerializable(includeIfNull: false)
-      94              :   const factory WcSessionExtendRequest({
-      95              :     Map<String, dynamic>? data,
-      96              :   }) = _WcSessionExtendRequest;
-      97              : 
-      98            3 :   factory WcSessionExtendRequest.fromJson(Map<String, dynamic> json) =>
-      99            3 :       _$WcSessionExtendRequestFromJson(json);
-     100              : }
-     101              : 
-     102              : @freezed
-     103              : class WcSessionDeleteRequest with _$WcSessionDeleteRequest {
-     104              :   @JsonSerializable(includeIfNull: false)
-     105              :   const factory WcSessionDeleteRequest({
-     106              :     required int code,
-     107              :     required String message,
-     108              :     String? data,
-     109              :   }) = _WcSessionDeleteRequest;
-     110              : 
-     111            3 :   factory WcSessionDeleteRequest.fromJson(Map<String, dynamic> json) =>
-     112            3 :       _$WcSessionDeleteRequestFromJson(json);
-     113              : }
-     114              : 
-     115              : @freezed
-     116              : class WcSessionPingRequest with _$WcSessionPingRequest {
-     117              :   @JsonSerializable(includeIfNull: false)
-     118              :   const factory WcSessionPingRequest({
-     119              :     Map<String, dynamic>? data,
-     120              :   }) = _WcSessionPingRequest;
-     121              : 
-     122            3 :   factory WcSessionPingRequest.fromJson(Map<String, dynamic> json) =>
-     123            3 :       _$WcSessionPingRequestFromJson(json);
-     124              : }
-     125              : 
-     126              : @freezed
-     127              : class WcSessionRequestRequest with _$WcSessionRequestRequest {
-     128              :   @JsonSerializable()
-     129              :   const factory WcSessionRequestRequest({
-     130              :     required String chainId,
-     131              :     required SessionRequestParams request,
-     132              :   }) = _WcSessionRequestRequest;
-     133              : 
-     134            3 :   factory WcSessionRequestRequest.fromJson(Map<String, dynamic> json) =>
-     135            3 :       _$WcSessionRequestRequestFromJson(json);
-     136              : }
-     137              : 
-     138              : @freezed
-     139              : class SessionRequestParams with _$SessionRequestParams {
-     140              :   @JsonSerializable()
-     141              :   const factory SessionRequestParams({
-     142              :     required String method,
-     143              :     required dynamic params,
-     144              :   }) = _SessionRequestParams;
-     145              : 
-     146            3 :   factory SessionRequestParams.fromJson(Map<String, dynamic> json) =>
-     147            3 :       _$SessionRequestParamsFromJson(json);
-     148              : }
-     149              : 
-     150              : @freezed
-     151              : class WcSessionEventRequest with _$WcSessionEventRequest {
-     152              :   @JsonSerializable()
-     153              :   const factory WcSessionEventRequest({
-     154              :     required String chainId,
-     155              :     required SessionEventParams event,
-     156              :   }) = _WcSessionEventRequest;
-     157              : 
-     158            3 :   factory WcSessionEventRequest.fromJson(Map<String, dynamic> json) =>
-     159            3 :       _$WcSessionEventRequestFromJson(json);
-     160              : }
-     161              : 
-     162              : @freezed
-     163              : class SessionEventParams with _$SessionEventParams {
-     164              :   @JsonSerializable()
-     165              :   const factory SessionEventParams({
-     166              :     required String name,
-     167              :     required dynamic data,
-     168              :   }) = _SessionEventParams;
-     169              : 
-     170            3 :   factory SessionEventParams.fromJson(Map<String, dynamic> json) =>
-     171            3 :       _$SessionEventParamsFromJson(json);
-     172              : }
-     173              : 
-     174              : /* AUTHENTICATION MODELS */
-     175              : 
-     176              : @freezed
-     177              : class WcAuthRequestRequest with _$WcAuthRequestRequest {
-     178              :   @JsonSerializable()
-     179              :   const factory WcAuthRequestRequest({
-     180              :     required AuthPayloadParams payloadParams,
-     181              :     required ConnectionMetadata requester,
-     182              :   }) = _WcAuthRequestRequest;
-     183              : 
-     184            2 :   factory WcAuthRequestRequest.fromJson(Map<String, dynamic> json) =>
-     185            2 :       _$WcAuthRequestRequestFromJson(json);
-     186              : }
-     187              : 
-     188              : @freezed
-     189              : class WcAuthRequestResult with _$WcAuthRequestResult {
-     190              :   @JsonSerializable()
-     191              :   const factory WcAuthRequestResult({
-     192              :     required Cacao cacao,
-     193              :   }) = _WcAuthRequestResult;
-     194              : 
-     195            0 :   factory WcAuthRequestResult.fromJson(Map<String, dynamic> json) =>
-     196            0 :       _$WcAuthRequestResultFromJson(json);
-     197              : }
-     198              : 
-     199              : @freezed
-     200              : class WcSessionAuthRequestParams with _$WcSessionAuthRequestParams {
-     201              :   @JsonSerializable()
-     202              :   const factory WcSessionAuthRequestParams({
-     203              :     required SessionAuthPayload authPayload,
-     204              :     required ConnectionMetadata requester,
-     205              :     required int expiryTimestamp,
-     206              :   }) = _WcSessionAuthRequestParams;
-     207              : 
-     208            0 :   factory WcSessionAuthRequestParams.fromJson(Map<String, dynamic> json) =>
-     209            0 :       _$WcSessionAuthRequestParamsFromJson(json);
-     210              : }
-     211              : 
-     212              : @freezed
-     213              : class WcSessionAuthRequestResult with _$WcSessionAuthRequestResult {
-     214              :   @JsonSerializable()
-     215              :   const factory WcSessionAuthRequestResult({
-     216              :     required List<Cacao> cacaos,
-     217              :     required ConnectionMetadata responder,
-     218              :   }) = _WcSessionAuthRequestResult;
-     219              : 
-     220            0 :   factory WcSessionAuthRequestResult.fromJson(Map<String, dynamic> json) =>
-     221            0 :       _$WcSessionAuthRequestResultFromJson(json);
-     222              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/proposal_models.dart.func-c.html b/coverage/html/sign_api/models/proposal_models.dart.func-c.html deleted file mode 100644 index 0101bcda..00000000 --- a/coverage/html/sign_api/models/proposal_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/proposal_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - proposal_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/proposal_models.dart.func.html b/coverage/html/sign_api/models/proposal_models.dart.func.html deleted file mode 100644 index 9a0c0dec..00000000 --- a/coverage/html/sign_api/models/proposal_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/proposal_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - proposal_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/proposal_models.dart.gcov.html b/coverage/html/sign_api/models/proposal_models.dart.gcov.html deleted file mode 100644 index 7544f38a..00000000 --- a/coverage/html/sign_api/models/proposal_models.dart.gcov.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/proposal_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - proposal_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:freezed_annotation/freezed_annotation.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       5              : 
-       6              : part 'proposal_models.g.dart';
-       7              : part 'proposal_models.freezed.dart';
-       8              : 
-       9              : @freezed
-      10              : class RequiredNamespace with _$RequiredNamespace {
-      11              :   @JsonSerializable(includeIfNull: false)
-      12              :   const factory RequiredNamespace({
-      13              :     List<String>? chains,
-      14              :     required List<String> methods,
-      15              :     required List<String> events,
-      16              :   }) = _RequiredNamespace;
-      17              : 
-      18            4 :   factory RequiredNamespace.fromJson(Map<String, dynamic> json) =>
-      19            4 :       _$RequiredNamespaceFromJson(json);
-      20              : }
-      21              : 
-      22              : @freezed
-      23              : class SessionProposal with _$SessionProposal {
-      24              :   @JsonSerializable()
-      25              :   const factory SessionProposal({
-      26              :     required int id,
-      27              :     required ProposalData params,
-      28              :   }) = _SessionProposal;
-      29              : 
-      30            0 :   factory SessionProposal.fromJson(Map<String, dynamic> json) =>
-      31            0 :       _$SessionProposalFromJson(json);
-      32              : }
-      33              : 
-      34              : @freezed
-      35              : class ProposalData with _$ProposalData {
-      36              :   @JsonSerializable(includeIfNull: false)
-      37              :   const factory ProposalData({
-      38              :     required int id,
-      39              :     required int expiry,
-      40              :     required List<Relay> relays,
-      41              :     required ConnectionMetadata proposer,
-      42              :     required Map<String, RequiredNamespace> requiredNamespaces,
-      43              :     required Map<String, RequiredNamespace> optionalNamespaces,
-      44              :     required String pairingTopic,
-      45              :     Map<String, String>? sessionProperties,
-      46              :     Map<String, Namespace>? generatedNamespaces,
-      47              :   }) = _ProposalData;
-      48              : 
-      49            0 :   factory ProposalData.fromJson(Map<String, dynamic> json) =>
-      50            0 :       _$ProposalDataFromJson(json);
-      51              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/session_models.dart.func-c.html b/coverage/html/sign_api/models/session_models.dart.func-c.html deleted file mode 100644 index 91420457..00000000 --- a/coverage/html/sign_api/models/session_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/session_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - session_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/session_models.dart.func.html b/coverage/html/sign_api/models/session_models.dart.func.html deleted file mode 100644 index 9078e316..00000000 --- a/coverage/html/sign_api/models/session_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/session_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - session_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/session_models.dart.gcov.html b/coverage/html/sign_api/models/session_models.dart.gcov.html deleted file mode 100644 index dff442db..00000000 --- a/coverage/html/sign_api/models/session_models.dart.gcov.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/session_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - session_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %93
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:freezed_annotation/freezed_annotation.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client_models.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
-       8              : 
-       9              : part 'session_models.g.dart';
-      10              : part 'session_models.freezed.dart';
-      11              : 
-      12              : class SessionProposalCompleter {
-      13              :   final int id;
-      14              :   final String selfPublicKey;
-      15              :   final String pairingTopic;
-      16              :   final Map<String, RequiredNamespace> requiredNamespaces;
-      17              :   final Map<String, RequiredNamespace> optionalNamespaces;
-      18              :   final Map<String, String>? sessionProperties;
-      19              :   final Completer completer;
-      20              : 
-      21            4 :   const SessionProposalCompleter({
-      22              :     required this.id,
-      23              :     required this.selfPublicKey,
-      24              :     required this.pairingTopic,
-      25              :     required this.requiredNamespaces,
-      26              :     required this.optionalNamespaces,
-      27              :     required this.completer,
-      28              :     this.sessionProperties,
-      29              :   });
-      30              : 
-      31            0 :   @override
-      32              :   String toString() {
-      33            0 :     return 'SessionProposalCompleter(id: $id, selfPublicKey: $selfPublicKey, pairingTopic: $pairingTopic, requiredNamespaces: $requiredNamespaces, optionalNamespaces: $optionalNamespaces, sessionProperties: $sessionProperties, completer: $completer)';
-      34              :   }
-      35              : }
-      36              : 
-      37              : @freezed
-      38              : class Namespace with _$Namespace {
-      39              :   @JsonSerializable(includeIfNull: false)
-      40              :   const factory Namespace({
-      41              :     List<String>? chains,
-      42              :     required List<String> accounts,
-      43              :     required List<String> methods,
-      44              :     required List<String> events,
-      45              :   }) = _Namespace;
-      46              : 
-      47            4 :   factory Namespace.fromJson(Map<String, dynamic> json) =>
-      48            4 :       _$NamespaceFromJson(json);
-      49              : }
-      50              : 
-      51              : @freezed
-      52              : class SessionData with _$SessionData {
-      53              :   @JsonSerializable(includeIfNull: false)
-      54              :   const factory SessionData({
-      55              :     required String topic,
-      56              :     required String pairingTopic,
-      57              :     required Relay relay,
-      58              :     required int expiry,
-      59              :     required bool acknowledged,
-      60              :     required String controller,
-      61              :     required Map<String, Namespace> namespaces,
-      62              :     Map<String, RequiredNamespace>? requiredNamespaces,
-      63              :     Map<String, RequiredNamespace>? optionalNamespaces,
-      64              :     Map<String, String>? sessionProperties,
-      65              :     required ConnectionMetadata self,
-      66              :     required ConnectionMetadata peer,
-      67              :   }) = _SessionData;
-      68              : 
-      69            0 :   factory SessionData.fromJson(Map<String, dynamic> json) =>
-      70            0 :       _$SessionDataFromJson(json);
-      71              : }
-      72              : 
-      73              : @freezed
-      74              : class SessionRequest with _$SessionRequest {
-      75              :   @JsonSerializable()
-      76              :   const factory SessionRequest({
-      77              :     required int id,
-      78              :     required String topic,
-      79              :     required String method,
-      80              :     required String chainId,
-      81              :     required dynamic params,
-      82              :     required VerifyContext verifyContext,
-      83              :   }) = _SessionRequest;
-      84              : 
-      85            0 :   factory SessionRequest.fromJson(Map<String, dynamic> json) =>
-      86            0 :       _$SessionRequestFromJson(json);
-      87              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_events.dart.func-c.html b/coverage/html/sign_api/models/sign_client_events.dart.func-c.html deleted file mode 100644 index adb4d8e5..00000000 --- a/coverage/html/sign_api/models/sign_client_events.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_events.dart.func.html b/coverage/html/sign_api/models/sign_client_events.dart.func.html deleted file mode 100644 index 7c1c93ea..00000000 --- a/coverage/html/sign_api/models/sign_client_events.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_events.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_events.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_events.dart.gcov.html b/coverage/html/sign_api/models/sign_client_events.dart.gcov.html deleted file mode 100644 index e3a8646a..00000000 --- a/coverage/html/sign_api/models/sign_client_events.dart.gcov.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_events.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_events.dartCoverageTotalHit
Test:lcov.infoLines:36.4 %4416
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:event/event.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/verify/models/verify_context.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       8              : 
-       9              : class SessionProposalEvent extends EventArgs {
-      10              :   int id;
-      11              :   ProposalData params;
-      12              :   VerifyContext? verifyContext;
-      13              : 
-      14            4 :   SessionProposalEvent(
-      15              :     this.id,
-      16              :     this.params, [
-      17              :     this.verifyContext,
-      18              :   ]);
-      19              : 
-      20            0 :   Map<String, dynamic> toJson() => {
-      21            0 :         'id': id,
-      22            0 :         'params': params.toJson(),
-      23            0 :         'verifyContext': verifyContext?.toJson(),
-      24              :       };
-      25              : 
-      26            0 :   @override
-      27              :   String toString() {
-      28            0 :     return 'SessionProposalEvent(${jsonEncode(toJson())})';
-      29              :   }
-      30              : }
-      31              : 
-      32              : class SessionProposalErrorEvent extends EventArgs {
-      33              :   int id;
-      34              :   Map<String, RequiredNamespace> requiredNamespaces;
-      35              :   Map<String, Namespace> namespaces;
-      36              :   WalletConnectError error;
-      37              : 
-      38            0 :   SessionProposalErrorEvent(
-      39              :     this.id,
-      40              :     this.requiredNamespaces,
-      41              :     this.namespaces,
-      42              :     this.error,
-      43              :   );
-      44              : 
-      45            0 :   @override
-      46              :   String toString() {
-      47            0 :     return 'SessionProposalErrorEvent(id: $id, requiredNamespaces: $requiredNamespaces, namespaces: $namespaces, error: $error)';
-      48              :   }
-      49              : }
-      50              : 
-      51              : class SessionConnect extends EventArgs {
-      52              :   SessionData session;
-      53              : 
-      54            4 :   SessionConnect(
-      55              :     this.session,
-      56              :   );
-      57              : 
-      58            0 :   @override
-      59              :   String toString() {
-      60            0 :     return 'SessionConnect(session: $session)';
-      61              :   }
-      62              : }
-      63              : 
-      64              : class SessionUpdate extends EventArgs {
-      65              :   int id;
-      66              :   String topic;
-      67              :   Map<String, Namespace> namespaces;
-      68              : 
-      69            3 :   SessionUpdate(
-      70              :     this.id,
-      71              :     this.topic,
-      72              :     this.namespaces,
-      73              :   );
-      74              : 
-      75            0 :   @override
-      76              :   String toString() {
-      77            0 :     return 'SessionUpdate(id: $id, topic: $topic, namespaces: $namespaces)';
-      78              :   }
-      79              : }
-      80              : 
-      81              : class SessionExtend extends EventArgs {
-      82              :   int id;
-      83              :   String topic;
-      84              : 
-      85            3 :   SessionExtend(this.id, this.topic);
-      86              : 
-      87            0 :   @override
-      88              :   String toString() {
-      89            0 :     return 'SessionExtend(id: $id, topic: $topic)';
-      90              :   }
-      91              : }
-      92              : 
-      93              : class SessionPing extends EventArgs {
-      94              :   int id;
-      95              :   String topic;
-      96              : 
-      97            3 :   SessionPing(this.id, this.topic);
-      98              : 
-      99            0 :   @override
-     100              :   String toString() {
-     101            0 :     return 'SessionPing(id: $id, topic: $topic)';
-     102              :   }
-     103              : }
-     104              : 
-     105              : class SessionDelete extends EventArgs {
-     106              :   String topic;
-     107              :   int? id;
-     108              : 
-     109            3 :   SessionDelete(
-     110              :     this.topic, {
-     111              :     this.id,
-     112              :   });
-     113              : 
-     114            0 :   @override
-     115              :   String toString() {
-     116            0 :     return 'SessionDelete(topic: $topic, id: $id)';
-     117              :   }
-     118              : }
-     119              : 
-     120              : class SessionExpire extends EventArgs {
-     121              :   final String topic;
-     122              : 
-     123            3 :   SessionExpire(this.topic);
-     124              : 
-     125            0 :   @override
-     126              :   String toString() {
-     127            0 :     return 'SessionExpire(topic: $topic)';
-     128              :   }
-     129              : }
-     130              : 
-     131              : class SessionRequestEvent extends EventArgs {
-     132              :   int id;
-     133              :   String topic;
-     134              :   String method;
-     135              :   String chainId;
-     136              :   dynamic params;
-     137              : 
-     138            3 :   SessionRequestEvent(
-     139              :     this.id,
-     140              :     this.topic,
-     141              :     this.method,
-     142              :     this.chainId,
-     143              :     this.params,
-     144              :   );
-     145              : 
-     146            3 :   factory SessionRequestEvent.fromSessionRequest(
-     147              :     SessionRequest request,
-     148              :   ) {
-     149            3 :     return SessionRequestEvent(
-     150            3 :       request.id,
-     151            3 :       request.topic,
-     152            3 :       request.method,
-     153            3 :       request.chainId,
-     154            3 :       request.params,
-     155              :     );
-     156              :   }
-     157              : 
-     158            0 :   @override
-     159              :   String toString() {
-     160            0 :     return 'SessionRequestEvent(id: $id, topic: $topic, method: $method, chainId: $chainId, params: $params)';
-     161              :   }
-     162              : }
-     163              : 
-     164              : class SessionEvent extends EventArgs {
-     165              :   int id;
-     166              :   String topic;
-     167              :   String name;
-     168              :   String chainId;
-     169              :   dynamic data;
-     170              : 
-     171            3 :   SessionEvent(
-     172              :     this.id,
-     173              :     this.topic,
-     174              :     this.name,
-     175              :     this.chainId,
-     176              :     this.data,
-     177              :   );
-     178              : 
-     179            0 :   @override
-     180              :   String toString() {
-     181            0 :     return 'SessionEvent(id: $id, topic: $topic, name: $name, chainId: $chainId, data: $data)';
-     182              :   }
-     183              : }
-     184              : 
-     185              : class ProposalExpire extends EventArgs {
-     186              :   final int id;
-     187              : 
-     188            0 :   ProposalExpire(this.id);
-     189              : 
-     190            0 :   @override
-     191              :   String toString() {
-     192            0 :     return 'ProposalExpire(id: $id)';
-     193              :   }
-     194              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_models.dart.func-c.html b/coverage/html/sign_api/models/sign_client_models.dart.func-c.html deleted file mode 100644 index 21a7c2a8..00000000 --- a/coverage/html/sign_api/models/sign_client_models.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_models.dart.func.html b/coverage/html/sign_api/models/sign_client_models.dart.func.html deleted file mode 100644 index e413369a..00000000 --- a/coverage/html/sign_api/models/sign_client_models.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_models.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_models.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/models/sign_client_models.dart.gcov.html b/coverage/html/sign_api/models/sign_client_models.dart.gcov.html deleted file mode 100644 index ccd1f124..00000000 --- a/coverage/html/sign_api/models/sign_client_models.dart.gcov.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/models/sign_client_models.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/models - sign_client_models.dartCoverageTotalHit
Test:lcov.infoLines:33.3 %62
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : 
-       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       4              : 
-       5              : class ConnectResponse {
-       6              :   final String pairingTopic;
-       7              :   final Completer<SessionData> session;
-       8              :   final Uri? uri;
-       9              : 
-      10            4 :   ConnectResponse({
-      11              :     required this.pairingTopic,
-      12              :     required this.session,
-      13              :     this.uri,
-      14              :   });
-      15              : 
-      16            0 :   @override
-      17              :   String toString() {
-      18            0 :     return 'ConnectResponse(pairingTopic: $pairingTopic, session: $session, uri: $uri)';
-      19              :   }
-      20              : }
-      21              : 
-      22              : class ApproveResponse {
-      23              :   final String topic;
-      24              :   final SessionData? session;
-      25              : 
-      26            4 :   ApproveResponse({
-      27              :     required this.topic,
-      28              :     required this.session,
-      29              :   });
-      30              : 
-      31            0 :   @override
-      32              :   String toString() {
-      33            0 :     return 'ApproveResponse(topic: $topic, session: $session)';
-      34              :   }
-      35              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sessions.dart.func-c.html b/coverage/html/sign_api/sessions.dart.func-c.html deleted file mode 100644 index 36a2d025..00000000 --- a/coverage/html/sign_api/sessions.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sessions.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sessions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sessions.dart.func.html b/coverage/html/sign_api/sessions.dart.func.html deleted file mode 100644 index 6b329609..00000000 --- a/coverage/html/sign_api/sessions.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sessions.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sessions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sessions.dart.gcov.html b/coverage/html/sign_api/sessions.dart.gcov.html deleted file mode 100644 index 628e7eef..00000000 --- a/coverage/html/sign_api/sessions.dart.gcov.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sessions.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sessions.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       2              : 
-       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       5              : 
-       6              : class Sessions extends GenericStore<SessionData> implements ISessions {
-       7            6 :   Sessions({
-       8              :     required super.storage,
-       9              :     required super.context,
-      10              :     required super.version,
-      11              :     required super.fromJson,
-      12              :   });
-      13              : 
-      14            5 :   @override
-      15              :   Future<void> update(
-      16              :     String topic, {
-      17              :     int? expiry,
-      18              :     Map<String, Namespace>? namespaces,
-      19              :   }) async {
-      20            5 :     checkInitialized();
-      21              : 
-      22            5 :     SessionData? info = get(topic);
-      23              :     if (info == null) {
-      24              :       return;
-      25              :     }
-      26              : 
-      27              :     if (expiry != null) {
-      28           10 :       info = info.copyWith(expiry: expiry);
-      29              :     }
-      30              :     if (namespaces != null) {
-      31            6 :       info = info.copyWith(namespaces: namespaces);
-      32              :     }
-      33              : 
-      34            5 :     await set(topic, info);
-      35              :   }
-      36              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_client.dart.func-c.html b/coverage/html/sign_api/sign_client.dart.func-c.html deleted file mode 100644 index 2eccc994..00000000 --- a/coverage/html/sign_api/sign_client.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_client.dart.func.html b/coverage/html/sign_api/sign_client.dart.func.html deleted file mode 100644 index a200351e..00000000 --- a/coverage/html/sign_api/sign_client.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_client.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_client.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_client.dart.gcov.html b/coverage/html/sign_api/sign_client.dart.gcov.html deleted file mode 100644 index 404c9b30..00000000 --- a/coverage/html/sign_api/sign_client.dart.gcov.html +++ /dev/null @@ -1,748 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_client.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_client.dartCoverageTotalHit
Test:lcov.infoLines:57.6 %15891
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
-       5              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       6              : 
-       7              : class SignClient implements ISignClient {
-       8              :   bool _initialized = false;
-       9              : 
-      10              :   @override
-      11              :   final String protocol = 'wc';
-      12              :   @override
-      13              :   final int version = 2;
-      14              : 
-      15            1 :   @override
-      16            2 :   Event<SessionDelete> get onSessionDelete => engine.onSessionDelete;
-      17            1 :   @override
-      18            2 :   Event<SessionConnect> get onSessionConnect => engine.onSessionConnect;
-      19            1 :   @override
-      20            2 :   Event<SessionEvent> get onSessionEvent => engine.onSessionEvent;
-      21            1 :   @override
-      22            2 :   Event<SessionExpire> get onSessionExpire => engine.onSessionExpire;
-      23            1 :   @override
-      24            2 :   Event<SessionExtend> get onSessionExtend => engine.onSessionExtend;
-      25            1 :   @override
-      26            2 :   Event<SessionPing> get onSessionPing => engine.onSessionPing;
-      27            1 :   @override
-      28            2 :   Event<SessionProposalEvent> get onSessionProposal => engine.onSessionProposal;
-      29            0 :   @override
-      30              :   Event<SessionProposalErrorEvent> get onSessionProposalError =>
-      31            0 :       engine.onSessionProposalError;
-      32            1 :   @override
-      33            2 :   Event<SessionProposalEvent> get onProposalExpire => engine.onProposalExpire;
-      34            1 :   @override
-      35            2 :   Event<SessionRequestEvent> get onSessionRequest => engine.onSessionRequest;
-      36            1 :   @override
-      37            2 :   Event<SessionUpdate> get onSessionUpdate => engine.onSessionUpdate;
-      38              : 
-      39            1 :   @override
-      40            2 :   ICore get core => engine.core;
-      41            0 :   @override
-      42            0 :   PairingMetadata get metadata => engine.metadata;
-      43            1 :   @override
-      44            2 :   IGenericStore<ProposalData> get proposals => engine.proposals;
-      45            1 :   @override
-      46            2 :   ISessions get sessions => engine.sessions;
-      47            1 :   @override
-      48            2 :   IGenericStore<SessionRequest> get pendingRequests => engine.pendingRequests;
-      49              : 
-      50              :   @override
-      51              :   late ISignEngine engine;
-      52              : 
-      53            0 :   static Future<SignClient> createInstance({
-      54              :     required String projectId,
-      55              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
-      56              :     required PairingMetadata metadata,
-      57              :     bool memoryStore = false,
-      58              :     LogLevel logLevel = LogLevel.nothing,
-      59              :   }) async {
-      60            0 :     final client = SignClient(
-      61            0 :       core: Core(
-      62              :         projectId: projectId,
-      63              :         relayUrl: relayUrl,
-      64              :         memoryStore: memoryStore,
-      65              :         logLevel: logLevel,
-      66              :       ),
-      67              :       metadata: metadata,
-      68              :     );
-      69            0 :     await client.init();
-      70              : 
-      71              :     return client;
-      72              :   }
-      73              : 
-      74            1 :   SignClient({
-      75              :     required ICore core,
-      76              :     required PairingMetadata metadata,
-      77              :   }) {
-      78            2 :     engine = SignEngine(
-      79              :       core: core,
-      80              :       metadata: metadata,
-      81            1 :       proposals: GenericStore(
-      82            1 :         storage: core.storage,
-      83              :         context: StoreVersions.CONTEXT_PROPOSALS,
-      84              :         version: StoreVersions.VERSION_PROPOSALS,
-      85            0 :         fromJson: (dynamic value) {
-      86            0 :           return ProposalData.fromJson(value);
-      87              :         },
-      88              :       ),
-      89            1 :       sessions: Sessions(
-      90            1 :         storage: core.storage,
-      91              :         context: StoreVersions.CONTEXT_SESSIONS,
-      92              :         version: StoreVersions.VERSION_SESSIONS,
-      93            0 :         fromJson: (dynamic value) {
-      94            0 :           return SessionData.fromJson(value);
-      95              :         },
-      96              :       ),
-      97            1 :       pendingRequests: GenericStore(
-      98            1 :         storage: core.storage,
-      99              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
-     100              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
-     101            0 :         fromJson: (dynamic value) {
-     102            0 :           return SessionRequest.fromJson(value);
-     103              :         },
-     104              :       ),
-     105            1 :       authKeys: GenericStore(
-     106            1 :         storage: core.storage,
-     107              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
-     108              :         version: StoreVersions.VERSION_AUTH_KEYS,
-     109            0 :         fromJson: (dynamic value) {
-     110            0 :           return AuthPublicKey.fromJson(value);
-     111              :         },
-     112              :       ),
-     113            1 :       pairingTopics: GenericStore(
-     114            1 :         storage: core.storage,
-     115              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
-     116              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
-     117            0 :         fromJson: (dynamic value) {
-     118              :           return value;
-     119              :         },
-     120              :       ),
-     121            1 :       authRequests: GenericStore(
-     122            1 :         storage: core.storage,
-     123              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     124              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     125            0 :         fromJson: (dynamic value) {
-     126            0 :           return PendingAuthRequest.fromJson(value);
-     127              :         },
-     128              :       ),
-     129            1 :       completeRequests: GenericStore(
-     130            1 :         storage: core.storage,
-     131              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
-     132              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
-     133            0 :         fromJson: (dynamic value) {
-     134            0 :           return StoredCacao.fromJson(value);
-     135              :         },
-     136              :       ),
-     137            1 :       sessionAuthRequests: GenericStore(
-     138            1 :         storage: core.storage,
-     139              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     140              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     141            0 :         fromJson: (dynamic value) {
-     142            0 :           return PendingSessionAuthRequest.fromJson(value);
-     143              :         },
-     144              :       ),
-     145              :     );
-     146              :   }
-     147              : 
-     148            1 :   @override
-     149              :   Future<void> init() async {
-     150            1 :     if (_initialized) {
-     151              :       return;
-     152              :     }
-     153              : 
-     154            2 :     await core.start();
-     155            2 :     await engine.init();
-     156              : 
-     157            1 :     _initialized = true;
-     158              :   }
-     159              : 
-     160            1 :   @override
-     161              :   Future<ConnectResponse> connect({
-     162              :     Map<String, RequiredNamespace>? requiredNamespaces,
-     163              :     Map<String, RequiredNamespace>? optionalNamespaces,
-     164              :     Map<String, String>? sessionProperties,
-     165              :     String? pairingTopic,
-     166              :     List<Relay>? relays,
-     167              :     List<List<String>>? methods = SignEngine.DEFAULT_METHODS,
-     168              :   }) async {
-     169              :     try {
-     170            2 :       return await engine.connect(
-     171              :         requiredNamespaces: requiredNamespaces,
-     172              :         optionalNamespaces: optionalNamespaces,
-     173              :         sessionProperties: sessionProperties,
-     174              :         pairingTopic: pairingTopic,
-     175              :         relays: relays,
-     176              :         methods: methods,
-     177              :       );
-     178              :     } catch (e) {
-     179              :       // print(e);
-     180              :       rethrow;
-     181              :     }
-     182              :   }
-     183              : 
-     184            1 :   @override
-     185              :   Future<PairingInfo> pair({
-     186              :     required Uri uri,
-     187              :   }) async {
-     188              :     try {
-     189            2 :       return await engine.pair(uri: uri);
-     190              :     } catch (e) {
-     191              :       rethrow;
-     192              :     }
-     193              :   }
-     194              : 
-     195            1 :   @override
-     196              :   Future<ApproveResponse> approve({
-     197              :     required int id,
-     198              :     required Map<String, Namespace> namespaces,
-     199              :     Map<String, String>? sessionProperties,
-     200              :     String? relayProtocol,
-     201              :   }) async {
-     202              :     try {
-     203            2 :       return await engine.approveSession(
-     204              :         id: id,
-     205              :         namespaces: namespaces,
-     206              :         sessionProperties: sessionProperties,
-     207              :         relayProtocol: relayProtocol,
-     208              :       );
-     209              :     } catch (e) {
-     210              :       rethrow;
-     211              :     }
-     212              :   }
-     213              : 
-     214            1 :   @override
-     215              :   Future<void> reject({
-     216              :     required int id,
-     217              :     required WalletConnectError reason,
-     218              :   }) async {
-     219              :     try {
-     220            2 :       return await engine.rejectSession(
-     221              :         id: id,
-     222              :         reason: reason,
-     223              :       );
-     224              :     } catch (e) {
-     225              :       rethrow;
-     226              :     }
-     227              :   }
-     228              : 
-     229            1 :   @override
-     230              :   Future<void> update({
-     231              :     required String topic,
-     232              :     required Map<String, Namespace> namespaces,
-     233              :   }) async {
-     234              :     try {
-     235            2 :       return await engine.updateSession(
-     236              :         topic: topic,
-     237              :         namespaces: namespaces,
-     238              :       );
-     239              :     } catch (e) {
-     240              :       // final error = e as WCError;
-     241              :       rethrow;
-     242              :     }
-     243              :   }
-     244              : 
-     245            1 :   @override
-     246              :   Future<void> extend({
-     247              :     required String topic,
-     248              :   }) async {
-     249              :     try {
-     250            2 :       return await engine.extendSession(topic: topic);
-     251              :     } catch (e) {
-     252              :       rethrow;
-     253              :     }
-     254              :   }
-     255              : 
-     256            1 :   @override
-     257              :   void registerRequestHandler({
-     258              :     required String chainId,
-     259              :     required String method,
-     260              :     void Function(String, dynamic)? handler,
-     261              :   }) {
-     262              :     try {
-     263            2 :       return engine.registerRequestHandler(
-     264              :         chainId: chainId,
-     265              :         method: method,
-     266              :         handler: handler,
-     267              :       );
-     268              :     } catch (e) {
-     269              :       rethrow;
-     270              :     }
-     271              :   }
-     272              : 
-     273            1 :   @override
-     274              :   Future<dynamic> request({
-     275              :     required String topic,
-     276              :     required String chainId,
-     277              :     required SessionRequestParams request,
-     278              :   }) async {
-     279              :     try {
-     280            2 :       return await engine.request(
-     281              :         topic: topic,
-     282              :         chainId: chainId,
-     283              :         request: request,
-     284              :       );
-     285              :     } catch (e) {
-     286              :       rethrow;
-     287              :     }
-     288              :   }
-     289              : 
-     290            0 :   @override
-     291              :   Future<List<dynamic>> requestReadContract({
-     292              :     required DeployedContract deployedContract,
-     293              :     required String functionName,
-     294              :     required String rpcUrl,
-     295              :     EthereumAddress? sender,
-     296              :     List parameters = const [],
-     297              :   }) async {
-     298              :     try {
-     299            0 :       return await engine.requestReadContract(
-     300              :         sender: sender,
-     301              :         deployedContract: deployedContract,
-     302              :         functionName: functionName,
-     303              :         rpcUrl: rpcUrl,
-     304              :         parameters: parameters,
-     305              :       );
-     306              :     } catch (e) {
-     307              :       rethrow;
-     308              :     }
-     309              :   }
-     310              : 
-     311            0 :   @override
-     312              :   Future<dynamic> requestWriteContract({
-     313              :     required String topic,
-     314              :     required String chainId,
-     315              :     required String rpcUrl,
-     316              :     required DeployedContract deployedContract,
-     317              :     required String functionName,
-     318              :     required Transaction transaction,
-     319              :     String? method,
-     320              :     List parameters = const [],
-     321              :   }) async {
-     322              :     try {
-     323            0 :       return await engine.requestWriteContract(
-     324              :         topic: topic,
-     325              :         chainId: chainId,
-     326              :         rpcUrl: rpcUrl,
-     327              :         deployedContract: deployedContract,
-     328              :         functionName: functionName,
-     329              :         transaction: transaction,
-     330              :         method: method,
-     331              :         parameters: parameters,
-     332              :       );
-     333              :     } catch (e) {
-     334              :       rethrow;
-     335              :     }
-     336              :   }
-     337              : 
-     338            1 :   @override
-     339              :   Future<void> respond({
-     340              :     required String topic,
-     341              :     required JsonRpcResponse response,
-     342              :   }) {
-     343              :     try {
-     344            2 :       return engine.respondSessionRequest(
-     345              :         topic: topic,
-     346              :         response: response,
-     347              :       );
-     348              :     } catch (e) {
-     349              :       rethrow;
-     350              :     }
-     351              :   }
-     352              : 
-     353            1 :   @override
-     354              :   void registerEventHandler({
-     355              :     required String chainId,
-     356              :     required String event,
-     357              :     dynamic Function(String, dynamic)? handler,
-     358              :   }) {
-     359              :     try {
-     360            2 :       return engine.registerEventHandler(
-     361              :         chainId: chainId,
-     362              :         event: event,
-     363              :         handler: handler,
-     364              :       );
-     365              :     } catch (e) {
-     366              :       rethrow;
-     367              :     }
-     368              :   }
-     369              : 
-     370            1 :   @override
-     371              :   void registerEventEmitter({
-     372              :     required String chainId,
-     373              :     required String event,
-     374              :   }) {
-     375              :     try {
-     376            2 :       return engine.registerEventEmitter(
-     377              :         chainId: chainId,
-     378              :         event: event,
-     379              :       );
-     380              :     } catch (e) {
-     381              :       rethrow;
-     382              :     }
-     383              :   }
-     384              : 
-     385            1 :   @override
-     386              :   void registerAccount({
-     387              :     required String chainId,
-     388              :     required String accountAddress,
-     389              :   }) {
-     390              :     try {
-     391            2 :       return engine.registerAccount(
-     392              :         chainId: chainId,
-     393              :         accountAddress: accountAddress,
-     394              :       );
-     395              :     } catch (e) {
-     396              :       rethrow;
-     397              :     }
-     398              :   }
-     399              : 
-     400            1 :   @override
-     401              :   Future<void> emit({
-     402              :     required String topic,
-     403              :     required String chainId,
-     404              :     required SessionEventParams event,
-     405              :   }) async {
-     406              :     try {
-     407            2 :       return await engine.emitSessionEvent(
-     408              :         topic: topic,
-     409              :         chainId: chainId,
-     410              :         event: event,
-     411              :       );
-     412              :     } catch (e) {
-     413              :       rethrow;
-     414              :     }
-     415              :   }
-     416              : 
-     417            1 :   @override
-     418              :   Future<void> ping({
-     419              :     required String topic,
-     420              :   }) async {
-     421              :     try {
-     422            2 :       return await engine.ping(topic: topic);
-     423              :     } catch (e) {
-     424              :       rethrow;
-     425              :     }
-     426              :   }
-     427              : 
-     428            1 :   @override
-     429              :   Future<void> disconnect({
-     430              :     required String topic,
-     431              :     required WalletConnectError reason,
-     432              :   }) async {
-     433              :     try {
-     434            2 :       return await engine.disconnectSession(
-     435              :         topic: topic,
-     436              :         reason: reason,
-     437              :       );
-     438              :     } catch (e) {
-     439              :       rethrow;
-     440              :     }
-     441              :   }
-     442              : 
-     443            1 :   @override
-     444              :   SessionData? find({
-     445              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     446              :   }) {
-     447              :     try {
-     448            2 :       return engine.find(requiredNamespaces: requiredNamespaces);
-     449              :     } catch (e) {
-     450              :       rethrow;
-     451              :     }
-     452              :   }
-     453              : 
-     454            1 :   @override
-     455              :   Map<String, SessionData> getActiveSessions() {
-     456              :     try {
-     457            2 :       return engine.getActiveSessions();
-     458              :     } catch (e) {
-     459              :       rethrow;
-     460              :     }
-     461              :   }
-     462              : 
-     463            1 :   @override
-     464              :   Map<String, SessionData> getSessionsForPairing({
-     465              :     required String pairingTopic,
-     466              :   }) {
-     467              :     try {
-     468            2 :       return engine.getSessionsForPairing(
-     469              :         pairingTopic: pairingTopic,
-     470              :       );
-     471              :     } catch (e) {
-     472              :       rethrow;
-     473              :     }
-     474              :   }
-     475              : 
-     476            1 :   @override
-     477              :   Map<String, ProposalData> getPendingSessionProposals() {
-     478              :     try {
-     479            2 :       return engine.getPendingSessionProposals();
-     480              :     } catch (e) {
-     481              :       rethrow;
-     482              :     }
-     483              :   }
-     484              : 
-     485            1 :   @override
-     486              :   Map<String, SessionRequest> getPendingSessionRequests() {
-     487              :     try {
-     488            2 :       return engine.getPendingSessionRequests();
-     489              :     } catch (e) {
-     490              :       rethrow;
-     491              :     }
-     492              :   }
-     493              : 
-     494            0 :   @override
-     495            0 :   IPairingStore get pairings => core.pairing.getStore();
-     496              : 
-     497              :   // FORMER AUTH ENGINE METHODS
-     498              : 
-     499            0 :   @override
-     500            0 :   IGenericStore<PendingAuthRequest> get authRequests => engine.authRequests;
-     501              : 
-     502            0 :   @override
-     503              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
-     504              :     try {
-     505            0 :       return engine.getPendingAuthRequests();
-     506              :     } catch (e) {
-     507              :       rethrow;
-     508              :     }
-     509              :   }
-     510              : 
-     511            0 :   @override
-     512              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
-     513              :     try {
-     514            0 :       return engine.getPendingSessionAuthRequests();
-     515              :     } catch (e) {
-     516              :       rethrow;
-     517              :     }
-     518              :   }
-     519              : 
-     520            0 :   @override
-     521              :   IGenericStore<PendingSessionAuthRequest> get sessionAuthRequests =>
-     522            0 :       engine.sessionAuthRequests;
-     523              : 
-     524            0 :   @override
-     525            0 :   Event<AuthRequest> get onAuthRequest => engine.onAuthRequest;
-     526              : 
-     527            0 :   @override
-     528            0 :   Event<AuthResponse> get onAuthResponse => engine.onAuthResponse;
-     529              : 
-     530              :   // NEW 1-CLICK AUTH METHOD
-     531            0 :   @override
-     532              :   Event<SessionAuthResponse> get onSessionAuthResponse =>
-     533            0 :       engine.onSessionAuthResponse;
-     534              : 
-     535            0 :   @override
-     536              :   Event<SessionAuthRequest> get onSessionAuthRequest =>
-     537            0 :       engine.onSessionAuthRequest;
-     538              : 
-     539            0 :   @override
-     540              :   Future<AuthRequestResponse> requestAuth({
-     541              :     required AuthRequestParams params,
-     542              :     String? pairingTopic,
-     543              :     List<List<String>>? methods = SignEngine.DEFAULT_METHODS_AUTH,
-     544              :   }) {
-     545              :     try {
-     546            0 :       return engine.requestAuth(
-     547              :         params: params,
-     548              :         pairingTopic: pairingTopic,
-     549              :         methods: methods,
-     550              :       );
-     551              :     } catch (e) {
-     552              :       rethrow;
-     553              :     }
-     554              :   }
-     555              : 
-     556              :   // NEW ONE-CLICK AUTH METHOD FOR DAPPS
-     557            0 :   @override
-     558              :   Future<SessionAuthRequestResponse> authenticate({
-     559              :     required SessionAuthRequestParams params,
-     560              :     String? pairingTopic,
-     561              :     List<List<String>>? methods = const [
-     562              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
-     563              :     ],
-     564              :   }) {
-     565              :     try {
-     566            0 :       return engine.authenticate(
-     567              :         params: params,
-     568              :         pairingTopic: pairingTopic,
-     569              :         methods: methods,
-     570              :       );
-     571              :     } catch (e) {
-     572              :       rethrow;
-     573              :     }
-     574              :   }
-     575              : 
-     576            0 :   @override
-     577              :   Future<void> respondAuthRequest({
-     578              :     required int id,
-     579              :     required String iss,
-     580              :     CacaoSignature? signature,
-     581              :     WalletConnectError? error,
-     582              :   }) {
-     583              :     try {
-     584            0 :       return engine.respondAuthRequest(
-     585              :         id: id,
-     586              :         iss: iss,
-     587              :         signature: signature,
-     588              :         error: error,
-     589              :       );
-     590              :     } catch (e) {
-     591              :       rethrow;
-     592              :     }
-     593              :   }
-     594              : 
-     595            0 :   @override
-     596              :   Future<ApproveResponse> approveSessionAuthenticate({
-     597              :     required int id,
-     598              :     List<Cacao>? auths,
-     599              :   }) {
-     600              :     try {
-     601            0 :       return engine.approveSessionAuthenticate(
-     602              :         id: id,
-     603              :         auths: auths,
-     604              :       );
-     605              :     } catch (e) {
-     606              :       rethrow;
-     607              :     }
-     608              :   }
-     609              : 
-     610            0 :   @override
-     611              :   Future<void> rejectSessionAuthenticate({
-     612              :     required int id,
-     613              :     required WalletConnectError reason,
-     614              :   }) {
-     615              :     try {
-     616            0 :       return engine.rejectSessionAuthenticate(
-     617              :         id: id,
-     618              :         reason: reason,
-     619              :       );
-     620              :     } catch (e) {
-     621              :       rethrow;
-     622              :     }
-     623              :   }
-     624              : 
-     625            0 :   @override
-     626            0 :   IGenericStore<AuthPublicKey> get authKeys => engine.authKeys;
-     627              : 
-     628            0 :   @override
-     629            0 :   IGenericStore<StoredCacao> get completeRequests => engine.completeRequests;
-     630              : 
-     631            0 :   @override
-     632              :   Future<bool> validateSignedCacao({
-     633              :     required Cacao cacao,
-     634              :     required String projectId,
-     635              :   }) {
-     636              :     try {
-     637            0 :       return engine.validateSignedCacao(
-     638              :         cacao: cacao,
-     639              :         projectId: projectId,
-     640              :       );
-     641              :     } catch (e) {
-     642              :       rethrow;
-     643              :     }
-     644              :   }
-     645              : 
-     646            0 :   @override
-     647              :   String formatAuthMessage({
-     648              :     required String iss,
-     649              :     required CacaoRequestPayload cacaoPayload,
-     650              :   }) {
-     651              :     try {
-     652            0 :       return engine.formatAuthMessage(
-     653              :         iss: iss,
-     654              :         cacaoPayload: cacaoPayload,
-     655              :       );
-     656              :     } catch (e) {
-     657              :       rethrow;
-     658              :     }
-     659              :   }
-     660              : 
-     661            0 :   @override
-     662              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-     663              :     required String pairingTopic,
-     664              :   }) {
-     665              :     try {
-     666            0 :       return engine.getCompletedRequestsForPairing(
-     667              :         pairingTopic: pairingTopic,
-     668              :       );
-     669              :     } catch (e) {
-     670              :       rethrow;
-     671              :     }
-     672              :   }
-     673              : 
-     674            0 :   @override
-     675            0 :   IGenericStore<String> get pairingTopics => engine.pairingTopics;
-     676              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_engine.dart.func-c.html b/coverage/html/sign_api/sign_engine.dart.func-c.html deleted file mode 100644 index 167029cc..00000000 --- a/coverage/html/sign_api/sign_engine.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_engine.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_engine.dart.func.html b/coverage/html/sign_api/sign_engine.dart.func.html deleted file mode 100644 index ae549c60..00000000 --- a/coverage/html/sign_api/sign_engine.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_engine.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_engine.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/sign_engine.dart.gcov.html b/coverage/html/sign_api/sign_engine.dart.gcov.html deleted file mode 100644 index 7dd10db8..00000000 --- a/coverage/html/sign_api/sign_engine.dart.gcov.html +++ /dev/null @@ -1,2861 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/sign_engine.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api - sign_engine.dartCoverageTotalHit
Test:lcov.infoLines:51.9 %1046543
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:async';
-       2              : import 'dart:convert';
-       3              : import 'dart:math';
-       4              : 
-       5              : import 'package:http/http.dart' as http;
-       6              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/custom_credentials.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/sign_api_validator_utils.dart';
-      11              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart';
-      13              : import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart';
-      14              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
-      15              : 
-      16              : class SignEngine implements ISignEngine {
-      17              :   static const List<List<String>> DEFAULT_METHODS = [
-      18              :     [
-      19              :       MethodConstants.WC_SESSION_PROPOSE,
-      20              :       MethodConstants.WC_SESSION_REQUEST,
-      21              :     ],
-      22              :   ];
-      23              : 
-      24              :   static const List<List<String>> DEFAULT_METHODS_AUTH = [
-      25              :     [
-      26              :       MethodConstants.WC_AUTH_REQUEST,
-      27              :     ]
-      28              :   ];
-      29              : 
-      30              :   bool _initialized = false;
-      31              : 
-      32              :   @override
-      33              :   final Event<SessionConnect> onSessionConnect = Event<SessionConnect>();
-      34              :   @override
-      35              :   final Event<SessionProposalEvent> onSessionProposal =
-      36              :       Event<SessionProposalEvent>();
-      37              :   @override
-      38              :   final Event<SessionProposalErrorEvent> onSessionProposalError =
-      39              :       Event<SessionProposalErrorEvent>();
-      40              :   @override
-      41              :   final Event<SessionProposalEvent> onProposalExpire =
-      42              :       Event<SessionProposalEvent>();
-      43              :   @override
-      44              :   final Event<SessionUpdate> onSessionUpdate = Event<SessionUpdate>();
-      45              :   @override
-      46              :   final Event<SessionExtend> onSessionExtend = Event<SessionExtend>();
-      47              :   @override
-      48              :   final Event<SessionExpire> onSessionExpire = Event<SessionExpire>();
-      49              :   @override
-      50              :   final Event<SessionRequestEvent> onSessionRequest =
-      51              :       Event<SessionRequestEvent>();
-      52              :   @override
-      53              :   final Event<SessionEvent> onSessionEvent = Event<SessionEvent>();
-      54              :   @override
-      55              :   final Event<SessionPing> onSessionPing = Event<SessionPing>();
-      56              :   @override
-      57              :   final Event<SessionDelete> onSessionDelete = Event<SessionDelete>();
-      58              : 
-      59              :   @override
-      60              :   final ICore core;
-      61              :   @override
-      62              :   final PairingMetadata metadata;
-      63              :   @override
-      64              :   final IGenericStore<ProposalData> proposals;
-      65              :   @override
-      66              :   final ISessions sessions;
-      67              :   @override
-      68              :   final IGenericStore<SessionRequest> pendingRequests;
-      69              : 
-      70              :   List<SessionProposalCompleter> pendingProposals = [];
-      71              : 
-      72              :   // FORMER AUTH ENGINE PROPERTY
-      73              :   @override
-      74              :   late IGenericStore<AuthPublicKey> authKeys;
-      75              :   @override
-      76              :   late IGenericStore<PendingAuthRequest> authRequests;
-      77              :   @override
-      78              :   IGenericStore<StoredCacao> completeRequests;
-      79              :   @override
-      80              :   final Event<AuthRequest> onAuthRequest = Event<AuthRequest>();
-      81              :   @override
-      82              :   final Event<AuthResponse> onAuthResponse = Event<AuthResponse>();
-      83              :   @override
-      84              :   late IGenericStore<String> pairingTopics;
-      85              : 
-      86              :   // NEW 1-CA METHOD
-      87              :   @override
-      88              :   late IGenericStore<PendingSessionAuthRequest> sessionAuthRequests;
-      89              :   @override
-      90              :   final Event<SessionAuthRequest> onSessionAuthRequest =
-      91              :       Event<SessionAuthRequest>();
-      92              :   @override
-      93              :   final Event<SessionAuthResponse> onSessionAuthResponse =
-      94              :       Event<SessionAuthResponse>();
-      95              : 
-      96              :   // FORMER AUTH ENGINE PROPERTY (apparently not used before and not used now)
-      97              :   List<AuthRequestCompleter> pendingAuthRequests = [];
-      98              : 
-      99            5 :   SignEngine({
-     100              :     required this.core,
-     101              :     required this.metadata,
-     102              :     required this.proposals,
-     103              :     required this.sessions,
-     104              :     required this.pendingRequests,
-     105              :     // FORMER AUTH ENGINE PROPERTIES
-     106              :     required this.authKeys,
-     107              :     required this.pairingTopics,
-     108              :     required this.authRequests,
-     109              :     required this.completeRequests,
-     110              :     // NEW 1-CA PROPERTY
-     111              :     required this.sessionAuthRequests,
-     112              :   });
-     113              : 
-     114            5 :   @override
-     115              :   Future<void> init() async {
-     116            5 :     if (_initialized) {
-     117              :       return;
-     118              :     }
-     119              : 
-     120           15 :     await core.pairing.init();
-     121           25 :     await core.verify.init(verifyUrl: metadata.verifyUrl);
-     122           10 :     await proposals.init();
-     123           10 :     await sessions.init();
-     124           10 :     await pendingRequests.init();
-     125              : 
-     126              :     // FORMER AUTH ENGINE PROPERTIES
-     127           10 :     await authKeys.init();
-     128           10 :     await pairingTopics.init();
-     129           10 :     await authRequests.init();
-     130           10 :     await completeRequests.init();
-     131              :     // NEW 1-CA PROPERTY
-     132           10 :     await sessionAuthRequests.init();
-     133              : 
-     134            5 :     _registerInternalEvents();
-     135            5 :     _registerRelayClientFunctions();
-     136            5 :     await _cleanup();
-     137              : 
-     138            5 :     await _resubscribeAll();
-     139              : 
-     140            5 :     _initialized = true;
-     141              :   }
-     142              : 
-     143            5 :   @override
-     144              :   Future<void> checkAndExpire() async {
-     145           14 :     for (var session in sessions.getAll()) {
-     146           16 :       await core.expirer.checkAndExpire(session.topic);
-     147              :     }
-     148              :   }
-     149              : 
-     150            4 :   @override
-     151              :   Future<ConnectResponse> connect({
-     152              :     Map<String, RequiredNamespace>? requiredNamespaces,
-     153              :     Map<String, RequiredNamespace>? optionalNamespaces,
-     154              :     Map<String, String>? sessionProperties,
-     155              :     String? pairingTopic,
-     156              :     List<Relay>? relays,
-     157              :     List<List<String>>? methods = DEFAULT_METHODS,
-     158              :   }) async {
-     159            4 :     _checkInitialized();
-     160              : 
-     161            4 :     await _isValidConnect(
-     162            0 :       requiredNamespaces: requiredNamespaces ?? {},
-     163            4 :       optionalNamespaces: optionalNamespaces ?? {},
-     164              :       sessionProperties: sessionProperties,
-     165              :       pairingTopic: pairingTopic,
-     166              :       relays: relays,
-     167              :     );
-     168              :     String? pTopic = pairingTopic;
-     169              :     Uri? uri;
-     170              : 
-     171              :     if (pTopic == null) {
-     172           12 :       final CreateResponse newTopicAndUri = await core.pairing.create(
-     173              :         methods: methods,
-     174              :       );
-     175            4 :       pTopic = newTopicAndUri.topic;
-     176            4 :       uri = newTopicAndUri.uri;
-     177              :       // print('connect generated topic: $topic');
-     178              :     } else {
-     179           12 :       core.pairing.isValidPairingTopic(topic: pTopic);
-     180              :     }
-     181              : 
-     182           12 :     final publicKey = await core.crypto.generateKeyPair();
-     183            4 :     final int id = JsonRpcUtils.payloadId();
-     184              : 
-     185            4 :     final request = WcSessionProposeRequest(
-     186              :       relays:
-     187            8 :           relays ?? [Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL)],
-     188            0 :       requiredNamespaces: requiredNamespaces ?? {},
-     189            4 :       optionalNamespaces: optionalNamespaces ?? {},
-     190            4 :       proposer: ConnectionMetadata(
-     191              :         publicKey: publicKey,
-     192            4 :         metadata: metadata,
-     193              :       ),
-     194              :       sessionProperties: sessionProperties,
-     195              :     );
-     196              : 
-     197            4 :     final expiry = WalletConnectUtils.calculateExpiry(
-     198              :       WalletConnectConstants.FIVE_MINUTES,
-     199              :     );
-     200            4 :     final ProposalData proposal = ProposalData(
-     201              :       id: id,
-     202              :       expiry: expiry,
-     203            4 :       relays: request.relays,
-     204            4 :       proposer: request.proposer,
-     205            4 :       requiredNamespaces: request.requiredNamespaces,
-     206            4 :       optionalNamespaces: request.optionalNamespaces ?? {},
-     207            4 :       sessionProperties: request.sessionProperties,
-     208              :       pairingTopic: pTopic,
-     209              :     );
-     210            4 :     await _setProposal(
-     211              :       id,
-     212              :       proposal,
-     213              :     );
-     214              : 
-     215            4 :     Completer<SessionData> completer = Completer();
-     216              : 
-     217            8 :     pendingProposals.add(
-     218            4 :       SessionProposalCompleter(
-     219              :         id: id,
-     220              :         selfPublicKey: publicKey,
-     221              :         pairingTopic: pTopic,
-     222            4 :         requiredNamespaces: request.requiredNamespaces,
-     223            4 :         optionalNamespaces: request.optionalNamespaces ?? {},
-     224            4 :         sessionProperties: request.sessionProperties,
-     225              :         completer: completer,
-     226              :       ),
-     227              :     );
-     228            4 :     _connectResponseHandler(
-     229              :       pTopic,
-     230              :       request,
-     231              :       id,
-     232              :     );
-     233              : 
-     234            4 :     final ConnectResponse resp = ConnectResponse(
-     235              :       pairingTopic: pTopic,
-     236              :       session: completer,
-     237              :       uri: uri,
-     238              :     );
-     239              : 
-     240              :     return resp;
-     241              :   }
-     242              : 
-     243            4 :   Future<void> _connectResponseHandler(
-     244              :     String topic,
-     245              :     WcSessionProposeRequest request,
-     246              :     int requestId,
-     247              :   ) async {
-     248              :     // print("sending proposal for $topic");
-     249              :     // print('connectResponseHandler requestId: $requestId');
-     250              :     try {
-     251           12 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
-     252              :         topic,
-     253              :         MethodConstants.WC_SESSION_PROPOSE,
-     254            4 :         request.toJson(),
-     255              :         id: requestId,
-     256              :       );
-     257            4 :       final String peerPublicKey = response['responderPublicKey'];
-     258              : 
-     259            8 :       final ProposalData proposal = proposals.get(
-     260            4 :         requestId.toString(),
-     261              :       )!;
-     262           12 :       final String sessionTopic = await core.crypto.generateSharedKey(
-     263            8 :         proposal.proposer.publicKey,
-     264              :         peerPublicKey,
-     265              :       );
-     266              :       // print('connectResponseHandler session topic: $sessionTopic');
-     267              : 
-     268              :       // Delete the proposal, we are done with it
-     269            4 :       await _deleteProposal(requestId);
-     270              : 
-     271           12 :       await core.relayClient.subscribe(topic: sessionTopic);
-     272           12 :       await core.pairing.activate(topic: topic);
-     273              :     } catch (e) {
-     274              :       // Get the completer and finish it with an error
-     275           12 :       pendingProposals.removeLast().completer.completeError(e);
-     276              :     }
-     277              :   }
-     278              : 
-     279            4 :   @override
-     280              :   Future<PairingInfo> pair({
-     281              :     required Uri uri,
-     282              :   }) async {
-     283            4 :     _checkInitialized();
-     284              : 
-     285           12 :     return await core.pairing.pair(
-     286              :       uri: uri,
-     287              :     );
-     288              :   }
-     289              : 
-     290              :   /// Approves a proposal with the id provided in the parameters.
-     291              :   /// Assumes the proposal is already created.
-     292            4 :   @override
-     293              :   Future<ApproveResponse> approveSession({
-     294              :     required int id,
-     295              :     required Map<String, Namespace> namespaces,
-     296              :     Map<String, String>? sessionProperties,
-     297              :     String? relayProtocol,
-     298              :   }) async {
-     299              :     // print('sign approveSession');
-     300            4 :     _checkInitialized();
-     301              : 
-     302            4 :     await _isValidApprove(
-     303              :       id: id,
-     304              :       namespaces: namespaces,
-     305              :       sessionProperties: sessionProperties,
-     306              :       relayProtocol: relayProtocol,
-     307              :     );
-     308              : 
-     309            8 :     final ProposalData proposal = proposals.get(
-     310            4 :       id.toString(),
-     311              :     )!;
-     312              : 
-     313           12 :     final String selfPubKey = await core.crypto.generateKeyPair();
-     314            8 :     final String peerPubKey = proposal.proposer.publicKey;
-     315           12 :     final String sessionTopic = await core.crypto.generateSharedKey(
-     316              :       selfPubKey,
-     317              :       peerPubKey,
-     318              :     );
-     319              :     // print('approve session topic: $sessionTopic');
-     320              :     final protocol =
-     321              :         relayProtocol ?? WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL;
-     322            4 :     final relay = Relay(protocol);
-     323              : 
-     324              :     // Respond to the proposal
-     325           12 :     await core.pairing.sendResult(
-     326              :       id,
-     327            4 :       proposal.pairingTopic,
-     328              :       MethodConstants.WC_SESSION_PROPOSE,
-     329            4 :       WcSessionProposeResponse(
-     330              :         relay: relay,
-     331              :         responderPublicKey: selfPubKey,
-     332              :       ),
-     333              :     );
-     334            4 :     await _deleteProposal(id);
-     335           16 :     await core.pairing.activate(topic: proposal.pairingTopic);
-     336              : 
-     337           12 :     await core.pairing.updateMetadata(
-     338            4 :       topic: proposal.pairingTopic,
-     339            8 :       metadata: proposal.proposer.metadata,
-     340              :     );
-     341              : 
-     342           12 :     await core.relayClient.subscribe(topic: sessionTopic);
-     343              : 
-     344            4 :     final int expiry = WalletConnectUtils.calculateExpiry(
-     345              :       WalletConnectConstants.SEVEN_DAYS,
-     346              :     );
-     347              : 
-     348            4 :     SessionData session = SessionData(
-     349              :       topic: sessionTopic,
-     350            4 :       pairingTopic: proposal.pairingTopic,
-     351              :       relay: relay,
-     352              :       expiry: expiry,
-     353              :       acknowledged: false,
-     354              :       controller: selfPubKey,
-     355              :       namespaces: namespaces,
-     356            4 :       self: ConnectionMetadata(
-     357              :         publicKey: selfPubKey,
-     358            4 :         metadata: metadata,
-     359              :       ),
-     360            4 :       peer: proposal.proposer,
-     361            4 :       sessionProperties: proposal.sessionProperties,
-     362              :     );
-     363              : 
-     364           12 :     onSessionConnect.broadcast(SessionConnect(session));
-     365              : 
-     366            8 :     await sessions.set(sessionTopic, session);
-     367            4 :     await _setSessionExpiry(sessionTopic, expiry);
-     368              : 
-     369              :     // `wc_sessionSettle` is not critical throughout the entire session.
-     370            8 :     bool acknowledged = await core.pairing
-     371            4 :         .sendRequest(
-     372              :           sessionTopic,
-     373              :           MethodConstants.WC_SESSION_SETTLE,
-     374            4 :           WcSessionSettleRequest(
-     375              :             relay: relay,
-     376              :             namespaces: namespaces,
-     377              :             sessionProperties: sessionProperties,
-     378              :             expiry: expiry,
-     379            4 :             controller: ConnectionMetadata(
-     380              :               publicKey: selfPubKey,
-     381            4 :               metadata: metadata,
-     382              :             ),
-     383              :           ),
-     384              :         )
-     385              :         // Sometimes we don't receive any response for a long time,
-     386              :         // in which case we manually time out to prevent waiting indefinitely.
-     387            4 :         .timeout(const Duration(seconds: 15))
-     388            4 :         .catchError(
-     389            0 :       (_) {
-     390              :         return false;
-     391              :       },
-     392              :     );
-     393              : 
-     394            8 :     session = session.copyWith(
-     395              :       acknowledged: acknowledged,
-     396              :     );
-     397              : 
-     398            8 :     if (acknowledged && sessions.has(sessionTopic)) {
-     399              :       // We directly update the latest value.
-     400            8 :       await sessions.set(
-     401              :         sessionTopic,
-     402              :         session,
-     403              :       );
-     404              :     }
-     405              : 
-     406            4 :     return ApproveResponse(
-     407              :       topic: sessionTopic,
-     408              :       session: session,
-     409              :     );
-     410              :   }
-     411              : 
-     412            3 :   @override
-     413              :   Future<void> rejectSession({
-     414              :     required int id,
-     415              :     required WalletConnectError reason,
-     416              :   }) async {
-     417            3 :     _checkInitialized();
-     418              : 
-     419            3 :     await _isValidReject(id, reason);
-     420              : 
-     421            9 :     ProposalData? proposal = proposals.get(id.toString());
-     422              :     if (proposal != null) {
-     423              :       // Attempt to send a response, if the pairing is not active, this will fail
-     424              :       // but we don't care
-     425              :       try {
-     426              :         final method = MethodConstants.WC_SESSION_PROPOSE;
-     427            3 :         final rpcOpts = MethodConstants.RPC_OPTS[method];
-     428            9 :         await core.pairing.sendError(
-     429              :           id,
-     430            3 :           proposal.pairingTopic,
-     431              :           method,
-     432            9 :           JsonRpcError(code: reason.code, message: reason.message),
-     433            3 :           rpcOptions: rpcOpts?['reject'],
-     434              :         );
-     435              :       } catch (_) {
-     436              :         // print('got here');
-     437              :       }
-     438              :     }
-     439            3 :     await _deleteProposal(id);
-     440              :   }
-     441              : 
-     442            3 :   @override
-     443              :   Future<void> updateSession({
-     444              :     required String topic,
-     445              :     required Map<String, Namespace> namespaces,
-     446              :   }) async {
-     447            3 :     _checkInitialized();
-     448            3 :     await _isValidUpdate(
-     449              :       topic,
-     450              :       namespaces,
-     451              :     );
-     452              : 
-     453            6 :     await sessions.update(
-     454              :       topic,
-     455              :       namespaces: namespaces,
-     456              :     );
-     457              : 
-     458            9 :     await core.pairing.sendRequest(
-     459              :       topic,
-     460              :       MethodConstants.WC_SESSION_UPDATE,
-     461            3 :       WcSessionUpdateRequest(namespaces: namespaces),
-     462              :     );
-     463              :   }
-     464              : 
-     465            3 :   @override
-     466              :   Future<void> extendSession({
-     467              :     required String topic,
-     468              :   }) async {
-     469            3 :     _checkInitialized();
-     470            3 :     await _isValidSessionTopic(topic);
-     471              : 
-     472            9 :     await core.pairing.sendRequest(
-     473              :       topic,
-     474              :       MethodConstants.WC_SESSION_EXTEND,
-     475            3 :       {},
-     476              :     );
-     477              : 
-     478            3 :     await _setSessionExpiry(
-     479              :       topic,
-     480            3 :       WalletConnectUtils.calculateExpiry(
-     481              :         WalletConnectConstants.SEVEN_DAYS,
-     482              :       ),
-     483              :     );
-     484              :   }
-     485              : 
-     486              :   /// Maps a request using chainId:method to its handler
-     487              :   final Map<String, dynamic Function(String, dynamic)?> _methodHandlers = {};
-     488              : 
-     489            3 :   @override
-     490              :   void registerRequestHandler({
-     491              :     required String chainId,
-     492              :     required String method,
-     493              :     dynamic Function(String, dynamic)? handler,
-     494              :   }) {
-     495            9 :     _methodHandlers[_getRegisterKey(chainId, method)] = handler;
-     496              :   }
-     497              : 
-     498            3 :   @override
-     499              :   Future request({
-     500              :     required String topic,
-     501              :     required String chainId,
-     502              :     required SessionRequestParams request,
-     503              :   }) async {
-     504            3 :     _checkInitialized();
-     505            3 :     await _isValidRequest(
-     506              :       topic,
-     507              :       chainId,
-     508              :       request,
-     509              :     );
-     510            9 :     return await core.pairing.sendRequest(
-     511              :       topic,
-     512              :       MethodConstants.WC_SESSION_REQUEST,
-     513            3 :       WcSessionRequestRequest(
-     514              :         chainId: chainId,
-     515              :         request: request,
-     516              :       ),
-     517              :     );
-     518              :   }
-     519              : 
-     520            0 :   @override
-     521              :   Future<List<dynamic>> requestReadContract({
-     522              :     required DeployedContract deployedContract,
-     523              :     required String functionName,
-     524              :     required String rpcUrl,
-     525              :     EthereumAddress? sender,
-     526              :     List<dynamic> parameters = const [],
-     527              :   }) async {
-     528              :     try {
-     529            0 :       final results = await Web3Client(rpcUrl, http.Client()).call(
-     530              :         sender: sender,
-     531              :         contract: deployedContract,
-     532            0 :         function: deployedContract.function(functionName),
-     533              :         params: parameters,
-     534              :       );
-     535              : 
-     536              :       return results;
-     537              :     } catch (e) {
-     538              :       rethrow;
-     539              :     }
-     540              :   }
-     541              : 
-     542            0 :   @override
-     543              :   Future<dynamic> requestWriteContract({
-     544              :     required String topic,
-     545              :     required String chainId,
-     546              :     required String rpcUrl,
-     547              :     required DeployedContract deployedContract,
-     548              :     required String functionName,
-     549              :     required Transaction transaction,
-     550              :     String? method,
-     551              :     List<dynamic> parameters = const [],
-     552              :   }) async {
-     553            0 :     if (transaction.from == null) {
-     554            0 :       throw Exception('Transaction must include `from` value');
-     555              :     }
-     556            0 :     final credentials = CustomCredentials(
-     557              :       signEngine: this,
-     558              :       topic: topic,
-     559              :       chainId: chainId,
-     560            0 :       address: transaction.from!,
-     561              :       method: method,
-     562              :     );
-     563            0 :     final trx = Transaction.callContract(
-     564              :       contract: deployedContract,
-     565            0 :       function: deployedContract.function(functionName),
-     566            0 :       from: credentials.address,
-     567            0 :       value: transaction.value,
-     568            0 :       maxGas: transaction.maxGas,
-     569            0 :       gasPrice: transaction.gasPrice,
-     570            0 :       nonce: transaction.nonce,
-     571            0 :       maxFeePerGas: transaction.maxFeePerGas,
-     572            0 :       maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,
-     573              :       parameters: parameters,
-     574              :     );
-     575              : 
-     576            0 :     if (chainId.contains(':')) {
-     577            0 :       chainId = chainId.split(':').last;
-     578              :     }
-     579            0 :     return await Web3Client(rpcUrl, http.Client()).sendTransaction(
-     580              :       credentials,
-     581              :       trx,
-     582            0 :       chainId: int.parse(chainId),
-     583              :     );
-     584              :   }
-     585              : 
-     586            3 :   @override
-     587              :   Future<void> respondSessionRequest({
-     588              :     required String topic,
-     589              :     required JsonRpcResponse response,
-     590              :   }) async {
-     591            3 :     _checkInitialized();
-     592            3 :     await _isValidResponse(topic, response);
-     593              : 
-     594              :     // final SessionRequest req = pendingRequests.get(response.id.toString())!;
-     595              :     // print('respondSessionRequest: ${req.toJson()}');
-     596            3 :     if (response.result != null) {
-     597            9 :       await core.pairing.sendResult(
-     598            3 :         response.id,
-     599              :         topic,
-     600              :         MethodConstants.WC_SESSION_REQUEST,
-     601            3 :         response.result,
-     602              :       );
-     603              :     } else {
-     604            9 :       await core.pairing.sendError(
-     605            3 :         response.id,
-     606              :         topic,
-     607              :         MethodConstants.WC_SESSION_REQUEST,
-     608            3 :         response.error!,
-     609              :       );
-     610              :     }
-     611              : 
-     612            6 :     await _deletePendingRequest(response.id);
-     613              :   }
-     614              : 
-     615              :   /// Maps a request using chainId:event to its handler
-     616              :   final Map<String, dynamic Function(String, dynamic)?> _eventHandlers = {};
-     617              : 
-     618            3 :   @override
-     619              :   void registerEventHandler({
-     620              :     required String chainId,
-     621              :     required String event,
-     622              :     dynamic Function(String, dynamic)? handler,
-     623              :   }) {
-     624            3 :     _checkInitialized();
-     625            9 :     _eventHandlers[_getRegisterKey(chainId, event)] = handler;
-     626              :   }
-     627              : 
-     628            3 :   @override
-     629              :   Future<void> emitSessionEvent({
-     630              :     required String topic,
-     631              :     required String chainId,
-     632              :     required SessionEventParams event,
-     633              :   }) async {
-     634            3 :     _checkInitialized();
-     635            3 :     await _isValidEmit(
-     636              :       topic,
-     637              :       event,
-     638              :       chainId,
-     639              :     );
-     640            9 :     await core.pairing.sendRequest(
-     641              :       topic,
-     642              :       MethodConstants.WC_SESSION_EVENT,
-     643            3 :       WcSessionEventRequest(
-     644              :         chainId: chainId,
-     645              :         event: event,
-     646              :       ),
-     647              :     );
-     648              :   }
-     649              : 
-     650            3 :   @override
-     651              :   Future<void> ping({
-     652              :     required String topic,
-     653              :   }) async {
-     654            3 :     _checkInitialized();
-     655            3 :     await _isValidPing(topic);
-     656              : 
-     657            6 :     if (sessions.has(topic)) {
-     658            9 :       bool _ = await core.pairing.sendRequest(
-     659              :         topic,
-     660              :         MethodConstants.WC_SESSION_PING,
-     661            3 :         {},
-     662              :       );
-     663           12 :     } else if (core.pairing.getStore().has(topic)) {
-     664            9 :       await core.pairing.ping(topic: topic);
-     665              :     }
-     666              :   }
-     667              : 
-     668            3 :   @override
-     669              :   Future<void> disconnectSession({
-     670              :     required String topic,
-     671              :     required WalletConnectError reason,
-     672              :   }) async {
-     673            3 :     _checkInitialized();
-     674              :     try {
-     675            3 :       await _isValidDisconnect(topic);
-     676              : 
-     677            6 :       if (sessions.has(topic)) {
-     678              :         // Send the request to delete the session, we don't care if it fails
-     679              :         try {
-     680            9 :           core.pairing.sendRequest(
-     681              :             topic,
-     682              :             MethodConstants.WC_SESSION_DELETE,
-     683            3 :             WcSessionDeleteRequest(
-     684            3 :               code: reason.code,
-     685            3 :               message: reason.message,
-     686            3 :               data: reason.data,
-     687              :             ),
-     688              :           );
-     689              :         } catch (_) {}
-     690              : 
-     691            3 :         await _deleteSession(topic);
-     692              :       } else {
-     693            9 :         await core.pairing.disconnect(topic: topic);
-     694              :       }
-     695            0 :     } on WalletConnectError catch (error, s) {
-     696            0 :       core.logger.e(
-     697            0 :         '[$runtimeType] disconnectSession()',
-     698              :         error: error,
-     699              :         stackTrace: s,
-     700              :       );
-     701              :     }
-     702              :   }
-     703              : 
-     704            3 :   @override
-     705              :   SessionData? find({
-     706              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     707              :   }) {
-     708            3 :     _checkInitialized();
-     709           12 :     final compatible = sessions.getAll().where((element) {
-     710            3 :       return SignApiValidatorUtils.isSessionCompatible(
-     711              :         session: element,
-     712              :         requiredNamespaces: requiredNamespaces,
-     713              :       );
-     714              :     });
-     715              : 
-     716            6 :     return compatible.isNotEmpty ? compatible.first : null;
-     717              :   }
-     718              : 
-     719            4 :   @override
-     720              :   Map<String, SessionData> getActiveSessions() {
-     721            4 :     _checkInitialized();
-     722              : 
-     723            4 :     Map<String, SessionData> activeSessions = {};
-     724           16 :     sessions.getAll().forEach((session) {
-     725            8 :       activeSessions[session.topic] = session;
-     726              :     });
-     727              : 
-     728              :     return activeSessions;
-     729              :   }
-     730              : 
-     731            3 :   @override
-     732              :   Map<String, SessionData> getSessionsForPairing({
-     733              :     required String pairingTopic,
-     734              :   }) {
-     735            3 :     _checkInitialized();
-     736              : 
-     737            3 :     Map<String, SessionData> pairingSessions = {};
-     738            3 :     sessions
-     739            3 :         .getAll()
-     740           12 :         .where((session) => session.pairingTopic == pairingTopic)
-     741            6 :         .forEach((session) {
-     742            6 :       pairingSessions[session.topic] = session;
-     743              :     });
-     744              : 
-     745              :     return pairingSessions;
-     746              :   }
-     747              : 
-     748            4 :   @override
-     749              :   Map<String, ProposalData> getPendingSessionProposals() {
-     750            4 :     _checkInitialized();
-     751              : 
-     752            4 :     Map<String, ProposalData> pendingProposals = {};
-     753           16 :     proposals.getAll().forEach((proposal) {
-     754           12 :       pendingProposals[proposal.id.toString()] = proposal;
-     755              :     });
-     756              : 
-     757              :     return pendingProposals;
-     758              :   }
-     759              : 
-     760            3 :   @override
-     761              :   Map<String, SessionRequest> getPendingSessionRequests() {
-     762            3 :     _checkInitialized();
-     763              : 
-     764            3 :     Map<String, SessionRequest> requests = {};
-     765           12 :     pendingRequests.getAll().forEach((r) {
-     766            9 :       requests[r.id.toString()] = r;
-     767              :     });
-     768              : 
-     769              :     return requests;
-     770              :   }
-     771              : 
-     772            1 :   @override
-     773            3 :   IPairingStore get pairings => core.pairing.getStore();
-     774              : 
-     775              :   final Set<String> _eventEmitters = {};
-     776              :   final Set<String> _accounts = {};
-     777              : 
-     778            3 :   @override
-     779              :   void registerEventEmitter({
-     780              :     required String chainId,
-     781              :     required String event,
-     782              :   }) {
-     783            3 :     final bool isChainId = NamespaceUtils.isValidChainId(chainId);
-     784              :     if (!isChainId) {
-     785            3 :       throw Errors.getSdkError(
-     786              :         Errors.UNSUPPORTED_CHAINS,
-     787              :         context:
-     788            3 :             'registerEventEmitter, chain $chainId should conform to "namespace:chainId" format',
-     789              :       );
-     790              :     }
-     791            3 :     final String value = _getRegisterKey(chainId, event);
-     792            3 :     SignApiValidatorUtils.isValidAccounts(
-     793            3 :       accounts: [value],
-     794              :       context: 'registerEventEmitter',
-     795              :     );
-     796            6 :     _eventEmitters.add(value);
-     797              :   }
-     798              : 
-     799            3 :   @override
-     800              :   void registerAccount({
-     801              :     required String chainId,
-     802              :     required String accountAddress,
-     803              :   }) {
-     804            3 :     final bool isChainId = NamespaceUtils.isValidChainId(chainId);
-     805              :     if (!isChainId) {
-     806            3 :       throw Errors.getSdkError(
-     807              :         Errors.UNSUPPORTED_CHAINS,
-     808              :         context:
-     809            3 :             'registerAccount, chain $chainId should conform to "namespace:chainId" format',
-     810              :       );
-     811              :     }
-     812            3 :     final String value = _getRegisterKey(chainId, accountAddress);
-     813            3 :     SignApiValidatorUtils.isValidAccounts(
-     814            3 :       accounts: [value],
-     815              :       context: 'registerAccount',
-     816              :     );
-     817            6 :     _accounts.add(value);
-     818              :   }
-     819              : 
-     820              :   /// ---- PRIVATE HELPERS ---- ////
-     821              : 
-     822            5 :   Future<void> _resubscribeAll() async {
-     823              :     // If the relay is not connected, stop here
-     824           15 :     if (!core.relayClient.isConnected) {
-     825              :       return;
-     826              :     }
-     827              : 
-     828              :     // Subscribe to all the sessions
-     829           10 :     for (final SessionData session in sessions.getAll()) {
-     830              :       // print('Session: subscribing to ${session.topic}');
-     831            0 :       await core.relayClient.subscribe(topic: session.topic);
-     832              :     }
-     833              :   }
-     834              : 
-     835            4 :   void _checkInitialized() {
-     836            4 :     if (!_initialized) {
-     837            0 :       throw Errors.getInternalError(Errors.NOT_INITIALIZED);
-     838              :     }
-     839              :   }
-     840              : 
-     841            3 :   String _getRegisterKey(String chainId, String value) {
-     842            3 :     return '$chainId:$value';
-     843              :   }
-     844              : 
-     845            3 :   Future<void> _deleteSession(
-     846              :     String topic, {
-     847              :     bool expirerHasDeleted = false,
-     848              :   }) async {
-     849              :     // print('deleting session: $topic, expirerHasDeleted: $expirerHasDeleted');
-     850            6 :     final SessionData? session = sessions.get(topic);
-     851              :     if (session == null) {
-     852              :       return;
-     853              :     }
-     854            9 :     await core.relayClient.unsubscribe(topic: topic);
-     855              : 
-     856            6 :     await sessions.delete(topic);
-     857           15 :     await core.crypto.deleteKeyPair(session.self.publicKey);
-     858            9 :     await core.crypto.deleteSymKey(topic);
-     859              :     if (expirerHasDeleted) {
-     860            9 :       await core.expirer.delete(topic);
-     861              :     }
-     862              : 
-     863            6 :     onSessionDelete.broadcast(
-     864            3 :       SessionDelete(
-     865              :         topic,
-     866              :       ),
-     867              :     );
-     868              :   }
-     869              : 
-     870            4 :   Future<void> _deleteProposal(
-     871              :     int id, {
-     872              :     bool expirerHasDeleted = false,
-     873              :   }) async {
-     874           12 :     await proposals.delete(id.toString());
-     875              :     if (expirerHasDeleted) {
-     876           12 :       await core.expirer.delete(id.toString());
-     877              :     }
-     878              :   }
-     879              : 
-     880            3 :   Future<void> _deletePendingRequest(
-     881              :     int id, {
-     882              :     bool expirerHasDeleted = false,
-     883              :   }) async {
-     884            9 :     await pendingRequests.delete(id.toString());
-     885              :     if (expirerHasDeleted) {
-     886            0 :       await core.expirer.delete(id.toString());
-     887              :     }
-     888              :   }
-     889              : 
-     890            4 :   Future<void> _setSessionExpiry(String topic, int expiry) async {
-     891            8 :     if (sessions.has(topic)) {
-     892            8 :       await sessions.update(
-     893              :         topic,
-     894              :         expiry: expiry,
-     895              :       );
-     896              :     }
-     897           12 :     await core.expirer.set(topic, expiry);
-     898              :   }
-     899              : 
-     900            4 :   Future<void> _setProposal(int id, ProposalData proposal) async {
-     901           12 :     await proposals.set(id.toString(), proposal);
-     902           20 :     core.expirer.set(id.toString(), proposal.expiry);
-     903              :   }
-     904              : 
-     905            3 :   Future<void> _setPendingRequest(int id, SessionRequest request) async {
-     906            6 :     await pendingRequests.set(
-     907            3 :       id.toString(),
-     908              :       request,
-     909              :     );
-     910            9 :     core.expirer.set(
-     911            3 :       id.toString(),
-     912            3 :       WalletConnectUtils.calculateExpiry(
-     913              :         WalletConnectConstants.FIVE_MINUTES,
-     914              :       ),
-     915              :     );
-     916              :   }
-     917              : 
-     918            5 :   Future<void> _cleanup() async {
-     919            5 :     final List<String> sessionTopics = [];
-     920            5 :     final List<int> proposalIds = [];
-     921              : 
-     922           10 :     for (final SessionData session in sessions.getAll()) {
-     923            0 :       if (WalletConnectUtils.isExpired(session.expiry)) {
-     924            0 :         sessionTopics.add(session.topic);
-     925              :       }
-     926              :     }
-     927           10 :     for (final ProposalData proposal in proposals.getAll()) {
-     928            0 :       if (WalletConnectUtils.isExpired(proposal.expiry)) {
-     929            0 :         proposalIds.add(proposal.id);
-     930              :       }
-     931              :     }
-     932              : 
-     933            5 :     sessionTopics.map((topic) async {
-     934              :       // print('deleting expired session $topic');
-     935            0 :       await _deleteSession(topic);
-     936              :     });
-     937            5 :     proposalIds.map((id) async => await _deleteProposal(id));
-     938              :   }
-     939              : 
-     940              :   /// ---- Relay Events ---- ///
-     941              : 
-     942            5 :   void _registerRelayClientFunctions() {
-     943           15 :     core.pairing.register(
-     944              :       method: MethodConstants.WC_SESSION_PROPOSE,
-     945            5 :       function: _onSessionProposeRequest,
-     946              :       type: ProtocolType.sign,
-     947              :     );
-     948           15 :     core.pairing.register(
-     949              :       method: MethodConstants.WC_SESSION_SETTLE,
-     950            5 :       function: _onSessionSettleRequest,
-     951              :       type: ProtocolType.sign,
-     952              :     );
-     953           15 :     core.pairing.register(
-     954              :       method: MethodConstants.WC_SESSION_UPDATE,
-     955            5 :       function: _onSessionUpdateRequest,
-     956              :       type: ProtocolType.sign,
-     957              :     );
-     958           15 :     core.pairing.register(
-     959              :       method: MethodConstants.WC_SESSION_EXTEND,
-     960            5 :       function: _onSessionExtendRequest,
-     961              :       type: ProtocolType.sign,
-     962              :     );
-     963           15 :     core.pairing.register(
-     964              :       method: MethodConstants.WC_SESSION_PING,
-     965            5 :       function: _onSessionPingRequest,
-     966              :       type: ProtocolType.sign,
-     967              :     );
-     968           15 :     core.pairing.register(
-     969              :       method: MethodConstants.WC_SESSION_DELETE,
-     970            5 :       function: _onSessionDeleteRequest,
-     971              :       type: ProtocolType.sign,
-     972              :     );
-     973           15 :     core.pairing.register(
-     974              :       method: MethodConstants.WC_SESSION_REQUEST,
-     975            5 :       function: _onSessionRequest,
-     976              :       type: ProtocolType.sign,
-     977              :     );
-     978           15 :     core.pairing.register(
-     979              :       method: MethodConstants.WC_SESSION_EVENT,
-     980            5 :       function: _onSessionEventRequest,
-     981              :       type: ProtocolType.sign,
-     982              :     );
-     983              :     // FORMER AUTH ENGINE PROPERTY
-     984           15 :     core.pairing.register(
-     985              :       method: MethodConstants.WC_AUTH_REQUEST,
-     986            5 :       function: _onAuthRequest,
-     987              :       type: ProtocolType.sign,
-     988              :     );
-     989           15 :     core.pairing.register(
-     990              :       method: MethodConstants.WC_SESSION_AUTHENTICATE,
-     991            5 :       function: _onSessionAuthRequest,
-     992              :       type: ProtocolType.sign,
-     993              :     );
-     994              :   }
-     995              : 
-     996            4 :   bool _shouldIgnoreSessionPropose(String topic) {
-     997           12 :     final PairingInfo? pairingInfo = core.pairing.getPairing(topic: topic);
-     998           12 :     final implementSessionAuth = onSessionAuthRequest.subscriberCount > 0;
-     999              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
-    1000            8 :     final containsMethod = (pairingInfo?.methods ?? []).contains(method);
-    1001              : 
-    1002              :     return implementSessionAuth && containsMethod;
-    1003              :   }
-    1004              : 
-    1005            4 :   Future<void> _onSessionProposeRequest(
-    1006              :     String topic,
-    1007              :     JsonRpcRequest payload,
-    1008              :   ) async {
-    1009            4 :     if (_shouldIgnoreSessionPropose(topic)) {
-    1010            0 :       core.logger.t(
-    1011              :         'Session Propose ignored. Session Authenticate will be used instead',
-    1012              :       );
-    1013              :       return;
-    1014              :     }
-    1015              :     try {
-    1016           12 :       core.logger.t(
-    1017            4 :         '_onSessionProposeRequest, topic: $topic, payload: $payload',
-    1018              :       );
-    1019            8 :       final proposeRequest = WcSessionProposeRequest.fromJson(payload.params);
-    1020            4 :       await _isValidConnect(
-    1021            4 :         requiredNamespaces: proposeRequest.requiredNamespaces,
-    1022            4 :         optionalNamespaces: proposeRequest.optionalNamespaces,
-    1023            4 :         sessionProperties: proposeRequest.sessionProperties,
-    1024              :         pairingTopic: topic,
-    1025            4 :         relays: proposeRequest.relays,
-    1026              :       );
-    1027              : 
-    1028              :       // If there are accounts and event emitters, then handle the Namespace generate automatically
-    1029              :       Map<String, Namespace>? namespaces;
-    1030           16 :       if (_accounts.isNotEmpty || _eventEmitters.isNotEmpty) {
-    1031            3 :         namespaces = NamespaceUtils.constructNamespaces(
-    1032            3 :           availableAccounts: _accounts,
-    1033            9 :           availableMethods: _methodHandlers.keys.toSet(),
-    1034            3 :           availableEvents: _eventEmitters,
-    1035            3 :           requiredNamespaces: proposeRequest.requiredNamespaces,
-    1036            3 :           optionalNamespaces: proposeRequest.optionalNamespaces,
-    1037              :         );
-    1038              : 
-    1039              :         // Check that the namespaces are conforming
-    1040              :         try {
-    1041            3 :           SignApiValidatorUtils.isConformingNamespaces(
-    1042            3 :             requiredNamespaces: proposeRequest.requiredNamespaces,
-    1043              :             namespaces: namespaces,
-    1044              :             context: 'onSessionProposeRequest',
-    1045              :           );
-    1046            0 :         } on WalletConnectError catch (err) {
-    1047              :           // If they aren't, send an error
-    1048            0 :           core.logger.t(
-    1049            0 :             '_onSessionProposeRequest WalletConnectError: $err',
-    1050              :           );
-    1051            0 :           final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
-    1052            0 :           await core.pairing.sendError(
-    1053            0 :             payload.id,
-    1054              :             topic,
-    1055            0 :             payload.method,
-    1056            0 :             JsonRpcError(code: err.code, message: err.message),
-    1057            0 :             rpcOptions: rpcOpts?['autoReject'],
-    1058              :           );
-    1059              : 
-    1060              :           // Broadcast that a session proposal error has occurred
-    1061            0 :           onSessionProposalError.broadcast(
-    1062            0 :             SessionProposalErrorEvent(
-    1063            0 :               payload.id,
-    1064            0 :               proposeRequest.requiredNamespaces,
-    1065              :               namespaces,
-    1066              :               err,
-    1067              :             ),
-    1068              :           );
-    1069              :           return;
-    1070              :         }
-    1071              :       }
-    1072              : 
-    1073            4 :       final expiry = WalletConnectUtils.calculateExpiry(
-    1074              :         WalletConnectConstants.FIVE_MINUTES,
-    1075              :       );
-    1076            4 :       final ProposalData proposal = ProposalData(
-    1077            4 :         id: payload.id,
-    1078              :         expiry: expiry,
-    1079            4 :         relays: proposeRequest.relays,
-    1080            4 :         proposer: proposeRequest.proposer,
-    1081            4 :         requiredNamespaces: proposeRequest.requiredNamespaces,
-    1082            4 :         optionalNamespaces: proposeRequest.optionalNamespaces ?? {},
-    1083            4 :         sessionProperties: proposeRequest.sessionProperties,
-    1084              :         pairingTopic: topic,
-    1085              :         generatedNamespaces: namespaces,
-    1086              :       );
-    1087              : 
-    1088            8 :       await _setProposal(payload.id, proposal);
-    1089              : 
-    1090            4 :       final verifyContext = await _getVerifyContext(
-    1091              :         payload,
-    1092            8 :         proposal.proposer.metadata,
-    1093              :       );
-    1094              : 
-    1095            8 :       onSessionProposal.broadcast(
-    1096            4 :         SessionProposalEvent(
-    1097            4 :           payload.id,
-    1098              :           proposal,
-    1099              :           verifyContext,
-    1100              :         ),
-    1101              :       );
-    1102            0 :     } on WalletConnectError catch (err) {
-    1103            0 :       core.logger.e('_onSessionProposeRequest Error: $err');
-    1104            0 :       final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
-    1105            0 :       await core.pairing.sendError(
-    1106            0 :         payload.id,
-    1107              :         topic,
-    1108            0 :         payload.method,
-    1109            0 :         JsonRpcError(code: err.code, message: err.message),
-    1110            0 :         rpcOptions: rpcOpts?['autoReject'],
-    1111              :       );
-    1112              :     }
-    1113              :   }
-    1114              : 
-    1115            4 :   Future<void> _onSessionSettleRequest(
-    1116              :     String topic,
-    1117              :     JsonRpcRequest payload,
-    1118              :   ) async {
-    1119              :     // print('wc session settle');
-    1120            8 :     final request = WcSessionSettleRequest.fromJson(payload.params);
-    1121              :     try {
-    1122           12 :       await _isValidSessionSettleRequest(request.namespaces, request.expiry);
-    1123              : 
-    1124              :       final SessionProposalCompleter sProposalCompleter =
-    1125            8 :           pendingProposals.removeLast();
-    1126              :       // print(sProposalCompleter);
-    1127              : 
-    1128              :       // Create the session
-    1129            4 :       final SessionData session = SessionData(
-    1130              :         topic: topic,
-    1131            4 :         pairingTopic: sProposalCompleter.pairingTopic,
-    1132            4 :         relay: request.relay,
-    1133            4 :         expiry: request.expiry,
-    1134              :         acknowledged: true,
-    1135            8 :         controller: request.controller.publicKey,
-    1136            4 :         namespaces: request.namespaces,
-    1137            4 :         sessionProperties: request.sessionProperties,
-    1138            4 :         self: ConnectionMetadata(
-    1139            4 :           publicKey: sProposalCompleter.selfPublicKey,
-    1140            4 :           metadata: metadata,
-    1141              :         ),
-    1142            4 :         peer: request.controller,
-    1143              :       );
-    1144              : 
-    1145              :       // Update all the things: session, expiry, metadata, pairing
-    1146            8 :       sessions.set(topic, session);
-    1147            8 :       _setSessionExpiry(topic, session.expiry);
-    1148           12 :       await core.pairing.updateMetadata(
-    1149            4 :         topic: sProposalCompleter.pairingTopic,
-    1150            8 :         metadata: request.controller.metadata,
-    1151              :       );
-    1152           12 :       final pairing = core.pairing.getPairing(topic: topic);
-    1153            0 :       if (pairing != null && !pairing.active) {
-    1154            0 :         await core.pairing.activate(topic: topic);
-    1155              :       }
-    1156              : 
-    1157              :       // Send the session back to the completer
-    1158            8 :       sProposalCompleter.completer.complete(session);
-    1159              : 
-    1160              :       // Send back a success!
-    1161              :       // print('responding to session settle: acknolwedged');
-    1162           12 :       await core.pairing.sendResult(
-    1163            4 :         payload.id,
-    1164              :         topic,
-    1165              :         MethodConstants.WC_SESSION_SETTLE,
-    1166              :         true,
-    1167              :       );
-    1168            8 :       onSessionConnect.broadcast(
-    1169            4 :         SessionConnect(session),
-    1170              :       );
-    1171            0 :     } on WalletConnectError catch (err) {
-    1172            0 :       core.logger.e('_onSessionSettleRequest Error: $err');
-    1173            0 :       await core.pairing.sendError(
-    1174            0 :         payload.id,
-    1175              :         topic,
-    1176            0 :         payload.method,
-    1177            0 :         JsonRpcError.invalidParams(
-    1178            0 :           err.message,
-    1179              :         ),
-    1180              :       );
-    1181              :     }
-    1182              :   }
-    1183              : 
-    1184            3 :   Future<void> _onSessionUpdateRequest(
-    1185              :     String topic,
-    1186              :     JsonRpcRequest payload,
-    1187              :   ) async {
-    1188              :     try {
-    1189              :       // print(payload.params);
-    1190            6 :       final request = WcSessionUpdateRequest.fromJson(payload.params);
-    1191            6 :       await _isValidUpdate(topic, request.namespaces);
-    1192            6 :       await sessions.update(
-    1193              :         topic,
-    1194            3 :         namespaces: request.namespaces,
-    1195              :       );
-    1196            9 :       await core.pairing.sendResult(
-    1197            3 :         payload.id,
-    1198              :         topic,
-    1199              :         MethodConstants.WC_SESSION_UPDATE,
-    1200              :         true,
-    1201              :       );
-    1202            6 :       onSessionUpdate.broadcast(
-    1203            3 :         SessionUpdate(
-    1204            3 :           payload.id,
-    1205              :           topic,
-    1206            3 :           request.namespaces,
-    1207              :         ),
-    1208              :       );
-    1209            0 :     } on WalletConnectError catch (err) {
-    1210            0 :       core.logger.e('_onSessionUpdateRequest Error: $err');
-    1211            0 :       await core.pairing.sendError(
-    1212            0 :         payload.id,
-    1213              :         topic,
-    1214            0 :         payload.method,
-    1215            0 :         JsonRpcError.invalidParams(
-    1216            0 :           err.message,
-    1217              :         ),
-    1218              :       );
-    1219              :     }
-    1220              :   }
-    1221              : 
-    1222            3 :   Future<void> _onSessionExtendRequest(
-    1223              :     String topic,
-    1224              :     JsonRpcRequest payload,
-    1225              :   ) async {
-    1226              :     try {
-    1227            6 :       final _ = WcSessionExtendRequest.fromJson(payload.params);
-    1228            3 :       await _isValidSessionTopic(topic);
-    1229            3 :       await _setSessionExpiry(
-    1230              :         topic,
-    1231            3 :         WalletConnectUtils.calculateExpiry(
-    1232              :           WalletConnectConstants.SEVEN_DAYS,
-    1233              :         ),
-    1234              :       );
-    1235            9 :       await core.pairing.sendResult(
-    1236            3 :         payload.id,
-    1237              :         topic,
-    1238              :         MethodConstants.WC_SESSION_EXTEND,
-    1239              :         true,
-    1240              :       );
-    1241            6 :       onSessionExtend.broadcast(
-    1242            3 :         SessionExtend(
-    1243            3 :           payload.id,
-    1244              :           topic,
-    1245              :         ),
-    1246              :       );
-    1247            0 :     } on WalletConnectError catch (err) {
-    1248            0 :       await core.pairing.sendError(
-    1249            0 :         payload.id,
-    1250              :         topic,
-    1251            0 :         payload.method,
-    1252            0 :         JsonRpcError.invalidParams(
-    1253            0 :           err.message,
-    1254              :         ),
-    1255              :       );
-    1256              :     }
-    1257              :   }
-    1258              : 
-    1259            3 :   Future<void> _onSessionPingRequest(
-    1260              :     String topic,
-    1261              :     JsonRpcRequest payload,
-    1262              :   ) async {
-    1263              :     try {
-    1264            6 :       final _ = WcSessionPingRequest.fromJson(payload.params);
-    1265            3 :       await _isValidPing(topic);
-    1266            9 :       await core.pairing.sendResult(
-    1267            3 :         payload.id,
-    1268              :         topic,
-    1269              :         MethodConstants.WC_SESSION_PING,
-    1270              :         true,
-    1271              :       );
-    1272            6 :       onSessionPing.broadcast(
-    1273            3 :         SessionPing(
-    1274            3 :           payload.id,
-    1275              :           topic,
-    1276              :         ),
-    1277              :       );
-    1278            0 :     } on WalletConnectError catch (err) {
-    1279            0 :       await core.pairing.sendError(
-    1280            0 :         payload.id,
-    1281              :         topic,
-    1282            0 :         payload.method,
-    1283            0 :         JsonRpcError.invalidParams(
-    1284            0 :           err.message,
-    1285              :         ),
-    1286              :       );
-    1287              :     }
-    1288              :   }
-    1289              : 
-    1290            3 :   Future<void> _onSessionDeleteRequest(
-    1291              :     String topic,
-    1292              :     JsonRpcRequest payload,
-    1293              :   ) async {
-    1294              :     try {
-    1295            6 :       final _ = WcSessionDeleteRequest.fromJson(payload.params);
-    1296            3 :       await _isValidDisconnect(topic);
-    1297            9 :       await core.pairing.sendResult(
-    1298            3 :         payload.id,
-    1299              :         topic,
-    1300              :         MethodConstants.WC_SESSION_DELETE,
-    1301              :         true,
-    1302              :       );
-    1303            3 :       await _deleteSession(topic);
-    1304            0 :     } on WalletConnectError catch (err) {
-    1305            0 :       await core.pairing.sendError(
-    1306            0 :         payload.id,
-    1307              :         topic,
-    1308            0 :         payload.method,
-    1309            0 :         JsonRpcError.invalidParams(
-    1310            0 :           err.message,
-    1311              :         ),
-    1312              :       );
-    1313              :     }
-    1314              :   }
-    1315              : 
-    1316              :   /// Called when a session request is received
-    1317              :   /// Will attempt to find a handler for the request, if it doesn't,
-    1318              :   /// it will throw an error.
-    1319            3 :   Future<void> _onSessionRequest(String topic, JsonRpcRequest payload) async {
-    1320              :     try {
-    1321            6 :       final request = WcSessionRequestRequest.fromJson(payload.params);
-    1322            3 :       await _isValidRequest(
-    1323              :         topic,
-    1324            3 :         request.chainId,
-    1325            3 :         request.request,
-    1326              :       );
-    1327              : 
-    1328            6 :       final session = sessions.get(topic)!;
-    1329            3 :       final verifyContext = await _getVerifyContext(
-    1330              :         payload,
-    1331            6 :         session.peer.metadata,
-    1332              :       );
-    1333              : 
-    1334            3 :       final sessionRequest = SessionRequest(
-    1335            3 :         id: payload.id,
-    1336              :         topic: topic,
-    1337            6 :         method: request.request.method,
-    1338            3 :         chainId: request.chainId,
-    1339            6 :         params: request.request.params,
-    1340              :         verifyContext: verifyContext,
-    1341              :       );
-    1342              : 
-    1343              :       // print('payload id: ${payload.id}');
-    1344            3 :       await _setPendingRequest(
-    1345            3 :         payload.id,
-    1346              :         sessionRequest,
-    1347              :       );
-    1348              : 
-    1349            3 :       final methodKey = _getRegisterKey(
-    1350            3 :         request.chainId,
-    1351            6 :         request.request.method,
-    1352              :       );
-    1353            6 :       final handler = _methodHandlers[methodKey];
-    1354              :       // If a method handler has been set using registerRequestHandler we use it to process the request
-    1355              :       if (handler != null) {
-    1356              :         try {
-    1357            9 :           await handler(topic, request.request.params);
-    1358            0 :         } on WalletConnectError catch (e) {
-    1359            0 :           await core.pairing.sendError(
-    1360            0 :             payload.id,
-    1361              :             topic,
-    1362            0 :             payload.method,
-    1363            0 :             JsonRpcError.fromJson(
-    1364            0 :               e.toJson(),
-    1365              :             ),
-    1366              :           );
-    1367            0 :           await _deletePendingRequest(payload.id);
-    1368            0 :         } on WalletConnectErrorSilent catch (_) {
-    1369              :           // Do nothing on silent error
-    1370            0 :           await _deletePendingRequest(payload.id);
-    1371              :         } catch (err) {
-    1372            0 :           await core.pairing.sendError(
-    1373            0 :             payload.id,
-    1374              :             topic,
-    1375            0 :             payload.method,
-    1376            0 :             JsonRpcError.invalidParams(
-    1377            0 :               err.toString(),
-    1378              :             ),
-    1379              :           );
-    1380            0 :           await _deletePendingRequest(payload.id);
-    1381              :         }
-    1382              :       } else {
-    1383              :         // Otherwise we send onSessionRequest event
-    1384            6 :         onSessionRequest.broadcast(
-    1385            3 :           SessionRequestEvent.fromSessionRequest(
-    1386              :             sessionRequest,
-    1387              :           ),
-    1388              :         );
-    1389              :       }
-    1390            0 :     } on WalletConnectError catch (err) {
-    1391            0 :       await core.pairing.sendError(
-    1392            0 :         payload.id,
-    1393              :         topic,
-    1394            0 :         payload.method,
-    1395            0 :         JsonRpcError.invalidParams(
-    1396            0 :           err.message,
-    1397              :         ),
-    1398              :       );
-    1399              :     }
-    1400              :   }
-    1401              : 
-    1402            3 :   Future<void> _onSessionEventRequest(
-    1403              :     String topic,
-    1404              :     JsonRpcRequest payload,
-    1405              :   ) async {
-    1406              :     try {
-    1407            6 :       final request = WcSessionEventRequest.fromJson(payload.params);
-    1408            3 :       final SessionEventParams event = request.event;
-    1409            3 :       await _isValidEmit(
-    1410              :         topic,
-    1411              :         event,
-    1412            3 :         request.chainId,
-    1413              :       );
-    1414              : 
-    1415            3 :       final String eventKey = _getRegisterKey(
-    1416            3 :         request.chainId,
-    1417            6 :         request.event.name,
-    1418              :       );
-    1419            6 :       if (_eventHandlers.containsKey(eventKey)) {
-    1420            6 :         final handler = _methodHandlers[eventKey];
-    1421              :         if (handler != null) {
-    1422            0 :           final handler = _eventHandlers[eventKey]!;
-    1423              :           try {
-    1424            0 :             await handler(
-    1425              :               topic,
-    1426            0 :               event.data,
-    1427              :             );
-    1428              :           } catch (err) {
-    1429            0 :             await core.pairing.sendError(
-    1430            0 :               payload.id,
-    1431              :               topic,
-    1432            0 :               payload.method,
-    1433            0 :               JsonRpcError.invalidParams(
-    1434            0 :                 err.toString(),
-    1435              :               ),
-    1436              :             );
-    1437              :           }
-    1438              :         }
-    1439              : 
-    1440            9 :         await core.pairing.sendResult(
-    1441            3 :           payload.id,
-    1442              :           topic,
-    1443              :           MethodConstants.WC_SESSION_REQUEST,
-    1444              :           true,
-    1445              :         );
-    1446              : 
-    1447            6 :         onSessionEvent.broadcast(
-    1448            3 :           SessionEvent(
-    1449            3 :             payload.id,
-    1450              :             topic,
-    1451            3 :             event.name,
-    1452            3 :             request.chainId,
-    1453            3 :             event.data,
-    1454              :           ),
-    1455              :         );
-    1456              :       } else {
-    1457            9 :         await core.pairing.sendError(
-    1458            3 :           payload.id,
-    1459              :           topic,
-    1460            3 :           payload.method,
-    1461            3 :           JsonRpcError.methodNotFound(
-    1462            3 :             'No handler found for chainId:event -> $eventKey',
-    1463              :           ),
-    1464              :         );
-    1465              :       }
-    1466            0 :     } on WalletConnectError catch (err) {
-    1467            0 :       await core.pairing.sendError(
-    1468            0 :         payload.id,
-    1469              :         topic,
-    1470            0 :         payload.method,
-    1471            0 :         JsonRpcError.invalidParams(
-    1472            0 :           err.message,
-    1473              :         ),
-    1474              :       );
-    1475              :     }
-    1476              :   }
-    1477              : 
-    1478              :   /// ---- Event Registers ---- ///
-    1479              : 
-    1480            5 :   void _registerInternalEvents() {
-    1481           25 :     core.relayClient.onRelayClientConnect.subscribe(_onRelayConnect);
-    1482           25 :     core.expirer.onExpire.subscribe(_onExpired);
-    1483           25 :     core.pairing.onPairingDelete.subscribe(_onPairingDelete);
-    1484           25 :     core.pairing.onPairingExpire.subscribe(_onPairingDelete);
-    1485           25 :     core.heartbeat.onPulse.subscribe(_heartbeatSubscription);
-    1486              :   }
-    1487              : 
-    1488            0 :   Future<void> _onRelayConnect(EventArgs? args) async {
-    1489              :     // print('Session: relay connected');
-    1490            0 :     await _resubscribeAll();
-    1491              :   }
-    1492              : 
-    1493            3 :   Future<void> _onPairingDelete(PairingEvent? event) async {
-    1494              :     // Delete all the sessions associated with the pairing
-    1495              :     if (event == null) {
-    1496              :       return;
-    1497              :     }
-    1498              : 
-    1499              :     // Delete the proposals
-    1500            3 :     final List<ProposalData> proposalsToDelete = proposals
-    1501            3 :         .getAll()
-    1502           15 :         .where((proposal) => proposal.pairingTopic == event.topic)
-    1503            3 :         .toList();
-    1504              : 
-    1505            6 :     for (final proposal in proposalsToDelete) {
-    1506            3 :       await _deleteProposal(
-    1507            3 :         proposal.id,
-    1508              :       );
-    1509              :     }
-    1510              : 
-    1511              :     // Delete the sessions
-    1512            3 :     final List<SessionData> sessionsToDelete = sessions
-    1513            3 :         .getAll()
-    1514           15 :         .where((session) => session.pairingTopic == event.topic)
-    1515            3 :         .toList();
-    1516              : 
-    1517            6 :     for (final session in sessionsToDelete) {
-    1518            3 :       await _deleteSession(
-    1519            3 :         session.topic,
-    1520              :       );
-    1521              :     }
-    1522              :   }
-    1523              : 
-    1524            3 :   Future<void> _onExpired(ExpirationEvent? event) async {
-    1525              :     if (event == null) {
-    1526              :       return;
-    1527              :     }
-    1528              : 
-    1529            9 :     if (sessions.has(event.target)) {
-    1530            3 :       await _deleteSession(
-    1531            3 :         event.target,
-    1532              :         expirerHasDeleted: true,
-    1533              :       );
-    1534            6 :       onSessionExpire.broadcast(
-    1535            3 :         SessionExpire(
-    1536            3 :           event.target,
-    1537              :         ),
-    1538              :       );
-    1539            9 :     } else if (proposals.has(event.target)) {
-    1540            9 :       ProposalData proposal = proposals.get(event.target)!;
-    1541            3 :       await _deleteProposal(
-    1542            6 :         int.parse(event.target),
-    1543              :         expirerHasDeleted: true,
-    1544              :       );
-    1545            6 :       onProposalExpire.broadcast(
-    1546            3 :         SessionProposalEvent(
-    1547            6 :           int.parse(event.target),
-    1548              :           proposal,
-    1549              :         ),
-    1550              :       );
-    1551            0 :     } else if (pendingRequests.has(event.target)) {
-    1552            0 :       await _deletePendingRequest(
-    1553            0 :         int.parse(event.target),
-    1554              :         expirerHasDeleted: true,
-    1555              :       );
-    1556              :       return;
-    1557              :     }
-    1558              :   }
-    1559              : 
-    1560            5 :   void _heartbeatSubscription(EventArgs? args) async {
-    1561            5 :     await checkAndExpire();
-    1562              :   }
-    1563              : 
-    1564              :   /// ---- Validation Helpers ---- ///
-    1565              : 
-    1566            3 :   Future<bool> _isValidSessionTopic(String topic) async {
-    1567            6 :     if (!sessions.has(topic)) {
-    1568            3 :       throw Errors.getInternalError(
-    1569              :         Errors.NO_MATCHING_KEY,
-    1570            3 :         context: "session topic doesn't exist: $topic",
-    1571              :       );
-    1572              :     }
-    1573              : 
-    1574            9 :     if (await core.expirer.checkAndExpire(topic)) {
-    1575            3 :       throw Errors.getInternalError(
-    1576              :         Errors.EXPIRED,
-    1577            3 :         context: 'session topic: $topic',
-    1578              :       );
-    1579              :     }
-    1580              : 
-    1581              :     return true;
-    1582              :   }
-    1583              : 
-    1584            3 :   Future<bool> _isValidSessionOrPairingTopic(String topic) async {
-    1585            6 :     if (sessions.has(topic)) {
-    1586            3 :       await _isValidSessionTopic(topic);
-    1587           12 :     } else if (core.pairing.getStore().has(topic)) {
-    1588            9 :       await core.pairing.isValidPairingTopic(topic: topic);
-    1589              :     } else {
-    1590            3 :       throw Errors.getInternalError(
-    1591              :         Errors.NO_MATCHING_KEY,
-    1592            3 :         context: "session or pairing topic doesn't exist: $topic",
-    1593              :       );
-    1594              :     }
-    1595              : 
-    1596              :     return true;
-    1597              :   }
-    1598              : 
-    1599            4 :   Future<bool> _isValidProposalId(int id) async {
-    1600           12 :     if (!proposals.has(id.toString())) {
-    1601            3 :       throw Errors.getInternalError(
-    1602              :         Errors.NO_MATCHING_KEY,
-    1603            3 :         context: "proposal id doesn't exist: $id",
-    1604              :       );
-    1605              :     }
-    1606              : 
-    1607           16 :     if (await core.expirer.checkAndExpire(id.toString())) {
-    1608            3 :       throw Errors.getInternalError(
-    1609              :         Errors.EXPIRED,
-    1610            3 :         context: 'proposal id: $id',
-    1611              :       );
-    1612              :     }
-    1613              : 
-    1614              :     return true;
-    1615              :   }
-    1616              : 
-    1617            3 :   Future<bool> _isValidPendingRequest(int id) async {
-    1618            9 :     if (!pendingRequests.has(id.toString())) {
-    1619            0 :       throw Errors.getInternalError(
-    1620              :         Errors.NO_MATCHING_KEY,
-    1621            0 :         context: "proposal id doesn't exist: $id",
-    1622              :       );
-    1623              :     }
-    1624              : 
-    1625           12 :     if (await core.expirer.checkAndExpire(id.toString())) {
-    1626            0 :       throw Errors.getInternalError(
-    1627              :         Errors.EXPIRED,
-    1628            0 :         context: 'pending request id: $id',
-    1629              :       );
-    1630              :     }
-    1631              : 
-    1632              :     return true;
-    1633              :   }
-    1634              : 
-    1635              :   /// ---- Validations ---- ///
-    1636              : 
-    1637            4 :   Future<bool> _isValidConnect({
-    1638              :     Map<String, RequiredNamespace>? requiredNamespaces,
-    1639              :     Map<String, RequiredNamespace>? optionalNamespaces,
-    1640              :     Map<String, String>? sessionProperties,
-    1641              :     String? pairingTopic,
-    1642              :     List<Relay>? relays,
-    1643              :   }) async {
-    1644              :     // No need to validate sessionProperties. Strict typing enforces Strings are valid
-    1645              :     // No need to see if the relays are a valid array and whatnot. Strict typing enforces that.
-    1646              :     if (pairingTopic != null) {
-    1647           12 :       await core.pairing.isValidPairingTopic(
-    1648              :         topic: pairingTopic,
-    1649              :       );
-    1650              :     }
-    1651              : 
-    1652              :     if (requiredNamespaces != null) {
-    1653            4 :       SignApiValidatorUtils.isValidRequiredNamespaces(
-    1654              :         requiredNamespaces: requiredNamespaces,
-    1655              :         context: 'connect() check requiredNamespaces.',
-    1656              :       );
-    1657              :     }
-    1658              : 
-    1659              :     if (optionalNamespaces != null) {
-    1660            4 :       SignApiValidatorUtils.isValidRequiredNamespaces(
-    1661              :         requiredNamespaces: optionalNamespaces,
-    1662              :         context: 'connect() check optionalNamespaces.',
-    1663              :       );
-    1664              :     }
-    1665              : 
-    1666              :     return true;
-    1667              :   }
-    1668              : 
-    1669            4 :   Future<bool> _isValidApprove({
-    1670              :     required int id,
-    1671              :     required Map<String, Namespace> namespaces,
-    1672              :     Map<String, String>? sessionProperties,
-    1673              :     String? relayProtocol,
-    1674              :   }) async {
-    1675              :     // No need to validate sessionProperties. Strict typing enforces Strings are valid
-    1676            4 :     await _isValidProposalId(id);
-    1677           12 :     final ProposalData proposal = proposals.get(id.toString())!;
-    1678              : 
-    1679              :     // Validate the namespaces
-    1680            4 :     SignApiValidatorUtils.isValidNamespaces(
-    1681              :       namespaces: namespaces,
-    1682              :       context: 'approve()',
-    1683              :     );
-    1684              : 
-    1685              :     // Validate the required and optional namespaces
-    1686            4 :     SignApiValidatorUtils.isValidRequiredNamespaces(
-    1687            4 :       requiredNamespaces: proposal.requiredNamespaces,
-    1688              :       context: 'approve() check requiredNamespaces.',
-    1689              :     );
-    1690            4 :     SignApiValidatorUtils.isValidRequiredNamespaces(
-    1691            4 :       requiredNamespaces: proposal.optionalNamespaces,
-    1692              :       context: 'approve() check optionalNamespaces.',
-    1693              :     );
-    1694              : 
-    1695              :     // Make sure the provided namespaces conforms with the required
-    1696            4 :     SignApiValidatorUtils.isConformingNamespaces(
-    1697            4 :       requiredNamespaces: proposal.requiredNamespaces,
-    1698              :       namespaces: namespaces,
-    1699              :       context: 'approve()',
-    1700              :     );
-    1701              : 
-    1702              :     return true;
-    1703              :   }
-    1704              : 
-    1705            3 :   Future<bool> _isValidReject(int id, WalletConnectError reason) async {
-    1706              :     // No need to validate reason. Strict typing enforces ErrorResponse is valid
-    1707            3 :     await _isValidProposalId(id);
-    1708              :     return true;
-    1709              :   }
-    1710              : 
-    1711            4 :   Future<bool> _isValidSessionSettleRequest(
-    1712              :     Map<String, Namespace> namespaces,
-    1713              :     int expiry,
-    1714              :   ) async {
-    1715            4 :     SignApiValidatorUtils.isValidNamespaces(
-    1716              :       namespaces: namespaces,
-    1717              :       context: 'onSessionSettleRequest()',
-    1718              :     );
-    1719              : 
-    1720            4 :     if (WalletConnectUtils.isExpired(expiry)) {
-    1721            0 :       throw Errors.getInternalError(
-    1722              :         Errors.EXPIRED,
-    1723              :         context: 'onSessionSettleRequest()',
-    1724              :       );
-    1725              :     }
-    1726              : 
-    1727              :     return true;
-    1728              :   }
-    1729              : 
-    1730            3 :   Future<bool> _isValidUpdate(
-    1731              :     String topic,
-    1732              :     Map<String, Namespace> namespaces,
-    1733              :   ) async {
-    1734            3 :     await _isValidSessionTopic(topic);
-    1735            3 :     SignApiValidatorUtils.isValidNamespaces(
-    1736              :       namespaces: namespaces,
-    1737              :       context: 'update()',
-    1738              :     );
-    1739            6 :     final SessionData session = sessions.get(topic)!;
-    1740              : 
-    1741            3 :     SignApiValidatorUtils.isConformingNamespaces(
-    1742            6 :       requiredNamespaces: session.requiredNamespaces ?? {},
-    1743              :       namespaces: namespaces,
-    1744              :       context: 'update()',
-    1745              :     );
-    1746              : 
-    1747              :     return true;
-    1748              :   }
-    1749              : 
-    1750            3 :   Future<bool> _isValidRequest(
-    1751              :     String topic,
-    1752              :     String chainId,
-    1753              :     SessionRequestParams request,
-    1754              :   ) async {
-    1755            3 :     await _isValidSessionTopic(topic);
-    1756            6 :     final SessionData session = sessions.get(topic)!;
-    1757            3 :     SignApiValidatorUtils.isValidNamespacesChainId(
-    1758            3 :       namespaces: session.namespaces,
-    1759              :       chainId: chainId,
-    1760              :     );
-    1761            3 :     SignApiValidatorUtils.isValidNamespacesRequest(
-    1762            3 :       namespaces: session.namespaces,
-    1763              :       chainId: chainId,
-    1764            3 :       method: request.method,
-    1765              :     );
-    1766              : 
-    1767              :     return true;
-    1768              :   }
-    1769              : 
-    1770            3 :   Future<bool> _isValidResponse(
-    1771              :     String topic,
-    1772              :     JsonRpcResponse response,
-    1773              :   ) async {
-    1774            3 :     await _isValidSessionTopic(topic);
-    1775              : 
-    1776            6 :     if (response.result == null && response.error == null) {
-    1777            0 :       throw Errors.getInternalError(
-    1778              :         Errors.MISSING_OR_INVALID,
-    1779              :         context: 'JSON-RPC response and error cannot both be null',
-    1780              :       );
-    1781              :     }
-    1782              : 
-    1783            6 :     await _isValidPendingRequest(response.id);
-    1784              : 
-    1785              :     return true;
-    1786              :   }
-    1787              : 
-    1788            3 :   Future<bool> _isValidPing(
-    1789              :     String topic,
-    1790              :   ) async {
-    1791            3 :     await _isValidSessionOrPairingTopic(topic);
-    1792              : 
-    1793              :     return true;
-    1794              :   }
-    1795              : 
-    1796            3 :   Future<bool> _isValidEmit(
-    1797              :     String topic,
-    1798              :     SessionEventParams event,
-    1799              :     String chainId,
-    1800              :   ) async {
-    1801            3 :     await _isValidSessionTopic(topic);
-    1802            6 :     final SessionData session = sessions.get(topic)!;
-    1803            3 :     SignApiValidatorUtils.isValidNamespacesChainId(
-    1804            3 :       namespaces: session.namespaces,
-    1805              :       chainId: chainId,
-    1806              :     );
-    1807            3 :     SignApiValidatorUtils.isValidNamespacesEvent(
-    1808            3 :       namespaces: session.namespaces,
-    1809              :       chainId: chainId,
-    1810            3 :       eventName: event.name,
-    1811              :     );
-    1812              : 
-    1813              :     return true;
-    1814              :   }
-    1815              : 
-    1816            3 :   Future<bool> _isValidDisconnect(String topic) async {
-    1817            3 :     await _isValidSessionOrPairingTopic(topic);
-    1818              : 
-    1819              :     return true;
-    1820              :   }
-    1821              : 
-    1822            4 :   Future<VerifyContext> _getVerifyContext(
-    1823              :     JsonRpcRequest payload,
-    1824              :     PairingMetadata proposerMetada,
-    1825              :   ) async {
-    1826              :     try {
-    1827            8 :       final jsonStringify = jsonEncode(payload.toJson());
-    1828           16 :       final hash = core.crypto.getUtils().hashMessage(jsonStringify);
-    1829              : 
-    1830           12 :       final result = await core.verify.resolve(attestationId: hash);
-    1831            0 :       final validation = result?.origin == Uri.parse(proposerMetada.url).origin
-    1832              :           ? Validation.VALID
-    1833              :           : Validation.INVALID;
-    1834              : 
-    1835            0 :       return VerifyContext(
-    1836            0 :         origin: result?.origin ?? proposerMetada.url,
-    1837            0 :         verifyUrl: proposerMetada.verifyUrl ?? '',
-    1838            0 :         validation: result?.isScam == true ? Validation.SCAM : validation,
-    1839            0 :         isScam: result?.isScam,
-    1840              :       );
-    1841              :     } catch (e, s) {
-    1842            4 :       if (e is! AttestationNotFound) {
-    1843            0 :         core.logger.e('[$runtimeType] verify error', error: e, stackTrace: s);
-    1844              :       }
-    1845            4 :       return VerifyContext(
-    1846            4 :         origin: proposerMetada.url,
-    1847            4 :         verifyUrl: proposerMetada.verifyUrl ?? '',
-    1848              :         validation: Validation.UNKNOWN,
-    1849              :       );
-    1850              :     }
-    1851              :   }
-    1852              : 
-    1853              :   // NEW 1-CA METHOD (Should this be private?)
-    1854              : 
-    1855            0 :   @override
-    1856              :   Future<bool> validateSignedCacao({
-    1857              :     required Cacao cacao,
-    1858              :     required String projectId,
-    1859              :   }) async {
-    1860            0 :     final CacaoSignature signature = cacao.s;
-    1861            0 :     final CacaoPayload payload = cacao.p;
-    1862              : 
-    1863            0 :     final reconstructed = formatAuthMessage(
-    1864            0 :       iss: payload.iss,
-    1865            0 :       cacaoPayload: CacaoRequestPayload.fromCacaoPayload(payload),
-    1866              :     );
-    1867              : 
-    1868            0 :     final walletAddress = AddressUtils.getDidAddress(payload.iss);
-    1869            0 :     final chainId = AddressUtils.getDidChainId(payload.iss);
-    1870              : 
-    1871            0 :     final isValid = await AuthSignature.verifySignature(
-    1872              :       walletAddress,
-    1873              :       reconstructed,
-    1874              :       signature,
-    1875              :       chainId,
-    1876              :       projectId,
-    1877              :     );
-    1878              : 
-    1879              :     return isValid;
-    1880              :   }
-    1881              : 
-    1882              :   // FORMER AUTH ENGINE PROPERTY
-    1883            0 :   @override
-    1884              :   String formatAuthMessage({
-    1885              :     required String iss,
-    1886              :     required CacaoRequestPayload cacaoPayload,
-    1887              :   }) {
-    1888              :     final header =
-    1889            0 :         '${cacaoPayload.domain} wants you to sign in with your Ethereum account:';
-    1890            0 :     final walletAddress = AddressUtils.getDidAddress(iss);
-    1891              : 
-    1892            0 :     if (cacaoPayload.aud.isEmpty) {
-    1893            0 :       throw WalletConnectError(code: -1, message: 'aud is required');
-    1894              :     }
-    1895              : 
-    1896            0 :     String statement = cacaoPayload.statement ?? '';
-    1897            0 :     final uri = 'URI: ${cacaoPayload.aud}';
-    1898            0 :     final version = 'Version: ${cacaoPayload.version}';
-    1899            0 :     final chainId = 'Chain ID: ${AddressUtils.getDidChainId(iss)}';
-    1900            0 :     final nonce = 'Nonce: ${cacaoPayload.nonce}';
-    1901            0 :     final issuedAt = 'Issued At: ${cacaoPayload.iat}';
-    1902            0 :     final expirationTime = (cacaoPayload.exp != null)
-    1903            0 :         ? 'Expiration Time: ${cacaoPayload.exp}'
-    1904            0 :         : null;
-    1905              :     final notBefore =
-    1906            0 :         (cacaoPayload.nbf != null) ? 'Not Before: ${cacaoPayload.nbf}' : null;
-    1907            0 :     final requestId = (cacaoPayload.requestId != null)
-    1908            0 :         ? 'Request ID: ${cacaoPayload.requestId}'
-    1909            0 :         : null;
-    1910            0 :     final resources = cacaoPayload.resources != null &&
-    1911            0 :             cacaoPayload.resources!.isNotEmpty
-    1912            0 :         ? 'Resources:\n${cacaoPayload.resources!.map((resource) => '- $resource').join('\n')}'
-    1913            0 :         : null;
-    1914            0 :     final recap = ReCapsUtils.getRecapFromResources(
-    1915            0 :       resources: cacaoPayload.resources,
-    1916              :     );
-    1917              :     if (recap != null) {
-    1918            0 :       final decoded = ReCapsUtils.decodeRecap(recap);
-    1919            0 :       statement = ReCapsUtils.formatStatementFromRecap(
-    1920              :         statement: statement,
-    1921              :         recap: decoded,
-    1922              :       );
-    1923              :     }
-    1924              : 
-    1925            0 :     final message = [
-    1926              :       header,
-    1927              :       walletAddress,
-    1928              :       '',
-    1929              :       statement,
-    1930              :       '',
-    1931              :       uri,
-    1932              :       version,
-    1933              :       chainId,
-    1934              :       nonce,
-    1935              :       issuedAt,
-    1936              :       expirationTime,
-    1937              :       notBefore,
-    1938              :       requestId,
-    1939              :       resources,
-    1940            0 :     ].where((element) => element != null).join('\n');
-    1941              : 
-    1942              :     return message;
-    1943              :   }
-    1944              : 
-    1945              :   // FORMER AUTH ENGINE PROPERTY
-    1946            0 :   @override
-    1947              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-    1948              :     required String pairingTopic,
-    1949              :   }) {
-    1950            0 :     Map<int, StoredCacao> completedRequests = {};
-    1951            0 :     completeRequests
-    1952            0 :         .getAll()
-    1953            0 :         .where(
-    1954            0 :           (e) => e.pairingTopic == pairingTopic,
-    1955              :         )
-    1956            0 :         .forEach((key) {
-    1957            0 :       completedRequests[key.id] = key;
-    1958              :     });
-    1959              :     return completedRequests;
-    1960              :   }
-    1961              : 
-    1962              :   // FORMER AUTH ENGINE PROPERTY
-    1963            0 :   @override
-    1964              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
-    1965            0 :     Map<int, PendingAuthRequest> pendingRequests = {};
-    1966            0 :     authRequests.getAll().forEach((key) {
-    1967            0 :       pendingRequests[key.id] = key;
-    1968              :     });
-    1969              :     return pendingRequests;
-    1970              :   }
-    1971              : 
-    1972              :   // FORMER AUTH ENGINE PROPERTY
-    1973            0 :   @override
-    1974              :   Future<AuthRequestResponse> requestAuth({
-    1975              :     required AuthRequestParams params,
-    1976              :     String? pairingTopic,
-    1977              :     List<List<String>>? methods = DEFAULT_METHODS_AUTH,
-    1978              :   }) async {
-    1979            0 :     _checkInitialized();
-    1980              : 
-    1981            0 :     AuthApiValidators.isValidRequest(params);
-    1982              :     String? pTopic = pairingTopic;
-    1983              :     Uri? uri;
-    1984              : 
-    1985              :     if (pTopic == null) {
-    1986            0 :       final CreateResponse newTopicAndUri = await core.pairing.create(
-    1987              :         methods: methods,
-    1988              :       );
-    1989            0 :       pTopic = newTopicAndUri.topic;
-    1990            0 :       uri = newTopicAndUri.uri;
-    1991              :     } else {
-    1992              :       // TODO this should be used when pairingTopic is passed (existent pairing topic case)
-    1993              :       // but it does not seems right
-    1994            0 :       core.pairing.isValidPairingTopic(topic: pTopic);
-    1995              :     }
-    1996              : 
-    1997            0 :     final publicKey = await core.crypto.generateKeyPair();
-    1998              :     // print('requestAuth, publicKey: $publicKey');
-    1999            0 :     final String responseTopic = core.crypto.getUtils().hashKey(publicKey);
-    2000            0 :     final int id = JsonRpcUtils.payloadId();
-    2001              : 
-    2002            0 :     final request = WcAuthRequestRequest(
-    2003            0 :       payloadParams: AuthPayloadParams.fromRequestParams(
-    2004              :         params,
-    2005              :       ),
-    2006            0 :       requester: ConnectionMetadata(
-    2007              :         publicKey: publicKey,
-    2008            0 :         metadata: metadata,
-    2009              :       ),
-    2010              :     );
-    2011              : 
-    2012            0 :     final int expiry = params.expiry ?? WalletConnectConstants.FIVE_MINUTES;
-    2013              : 
-    2014            0 :     await authKeys.set(
-    2015              :       AuthConstants.AUTH_CLIENT_PUBLIC_KEY_NAME,
-    2016            0 :       AuthPublicKey(publicKey: publicKey),
-    2017              :     );
-    2018              : 
-    2019            0 :     await pairingTopics.set(
-    2020              :       responseTopic,
-    2021              :       pTopic,
-    2022              :     );
-    2023              : 
-    2024              :     // Set the one time use receiver public key for decoding the Type 1 envelope
-    2025            0 :     await core.pairing.setReceiverPublicKey(
-    2026              :       topic: responseTopic,
-    2027              :       publicKey: publicKey,
-    2028              :       expiry: expiry,
-    2029              :     );
-    2030              : 
-    2031            0 :     Completer<AuthResponse> completer = Completer();
-    2032              : 
-    2033            0 :     _requestAuthResponseHandler(
-    2034              :       pairingTopic: pTopic,
-    2035              :       responseTopic: responseTopic,
-    2036              :       request: request,
-    2037              :       id: id,
-    2038              :       expiry: expiry,
-    2039              :       completer: completer,
-    2040              :     );
-    2041              : 
-    2042            0 :     return AuthRequestResponse(
-    2043              :       id: id,
-    2044              :       pairingTopic: pTopic,
-    2045              :       completer: completer,
-    2046              :       uri: uri,
-    2047              :     );
-    2048              :   }
-    2049              : 
-    2050              :   // FORMER AUTH ENGINE PROPERTY
-    2051            0 :   Future<void> _requestAuthResponseHandler({
-    2052              :     required String pairingTopic,
-    2053              :     required String responseTopic,
-    2054              :     required WcAuthRequestRequest request,
-    2055              :     required int id,
-    2056              :     required int expiry,
-    2057              :     required Completer<AuthResponse> completer,
-    2058              :   }) async {
-    2059              :     // Subscribe to the responseTopic because we expect the response to use this topic
-    2060            0 :     await core.relayClient.subscribe(topic: responseTopic);
-    2061              : 
-    2062              :     late WcAuthRequestResult result;
-    2063              :     try {
-    2064            0 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
-    2065              :         pairingTopic,
-    2066              :         MethodConstants.WC_AUTH_REQUEST,
-    2067            0 :         request.toJson(),
-    2068              :         id: id,
-    2069              :         ttl: expiry,
-    2070              :       );
-    2071            0 :       result = WcAuthRequestResult.fromJson({'cacao': response});
-    2072              :     } catch (error) {
-    2073            0 :       final response = AuthResponse(
-    2074              :         id: id,
-    2075              :         topic: responseTopic,
-    2076            0 :         jsonRpcError: (error is JsonRpcError) ? error : null,
-    2077            0 :         error: (error is! JsonRpcError)
-    2078            0 :             ? WalletConnectError(
-    2079            0 :                 code: -1,
-    2080            0 :                 message: error.toString(),
-    2081              :               )
-    2082              :             : null,
-    2083              :       );
-    2084            0 :       onAuthResponse.broadcast(response);
-    2085            0 :       completer.complete(response);
-    2086              :       return;
-    2087              :     }
-    2088              : 
-    2089            0 :     await core.pairing.activate(topic: pairingTopic);
-    2090              : 
-    2091            0 :     final Cacao cacao = result.cacao;
-    2092            0 :     await completeRequests.set(
-    2093            0 :       id.toString(),
-    2094            0 :       StoredCacao.fromCacao(
-    2095              :         id: id,
-    2096              :         pairingTopic: pairingTopic,
-    2097              :         cacao: cacao,
-    2098              :       ),
-    2099              :     );
-    2100              : 
-    2101            0 :     final isValid = await validateSignedCacao(
-    2102              :       cacao: cacao,
-    2103            0 :       projectId: core.projectId,
-    2104              :     );
-    2105              : 
-    2106              :     if (!isValid) {
-    2107            0 :       final resp = AuthResponse(
-    2108              :         id: id,
-    2109              :         topic: responseTopic,
-    2110              :         error: const WalletConnectError(
-    2111              :           code: -1,
-    2112              :           message: 'Invalid signature',
-    2113              :         ),
-    2114              :       );
-    2115            0 :       onAuthResponse.broadcast(resp);
-    2116            0 :       completer.complete(resp);
-    2117              :     } else {
-    2118            0 :       final resp = AuthResponse(
-    2119              :         id: id,
-    2120              :         topic: responseTopic,
-    2121              :         result: cacao,
-    2122              :       );
-    2123            0 :       onAuthResponse.broadcast(resp);
-    2124            0 :       completer.complete(resp);
-    2125              :     }
-    2126              :   }
-    2127              : 
-    2128              :   // NEW ONE-CLICK AUTH METHOD FOR DAPPS
-    2129            0 :   @override
-    2130              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
-    2131            0 :     Map<int, PendingSessionAuthRequest> pendingRequests = {};
-    2132            0 :     sessionAuthRequests.getAll().forEach((key) {
-    2133            0 :       pendingRequests[key.id] = key;
-    2134              :     });
-    2135              :     return pendingRequests;
-    2136              :   }
-    2137              : 
-    2138            0 :   @override
-    2139              :   Future<SessionAuthRequestResponse> authenticate({
-    2140              :     required SessionAuthRequestParams params,
-    2141              :     String? pairingTopic,
-    2142              :     List<List<String>>? methods = const [
-    2143              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
-    2144              :     ],
-    2145              :   }) async {
-    2146            0 :     _checkInitialized();
-    2147              : 
-    2148            0 :     AuthApiValidators.isValidAuthenticate(params);
-    2149              : 
-    2150            0 :     final chains = params.chains;
-    2151            0 :     final resources = params.resources ?? [];
-    2152            0 :     final requestMethods = params.methods ?? [];
-    2153              : 
-    2154              :     String? pTopic = pairingTopic;
-    2155              :     Uri? connectionUri;
-    2156              : 
-    2157              :     if (pTopic == null) {
-    2158            0 :       final CreateResponse pairing = await core.pairing.create(
-    2159              :         methods: methods,
-    2160              :       );
-    2161            0 :       pTopic = pairing.topic;
-    2162            0 :       connectionUri = pairing.uri;
-    2163              :     } else {
-    2164            0 :       core.pairing.isValidPairingTopic(topic: pTopic);
-    2165              :     }
-    2166              : 
-    2167            0 :     final publicKey = await core.crypto.generateKeyPair();
-    2168            0 :     final responseTopic = core.crypto.getUtils().hashKey(publicKey);
-    2169              : 
-    2170            0 :     await Future.wait([
-    2171            0 :       authKeys.set(
-    2172              :         AuthConstants.OCAUTH_CLIENT_PUBLIC_KEY_NAME,
-    2173            0 :         AuthPublicKey(publicKey: publicKey),
-    2174              :       ),
-    2175            0 :       pairingTopics.set(responseTopic, pTopic),
-    2176              :     ]);
-    2177              : 
-    2178            0 :     if (requestMethods.isNotEmpty) {
-    2179            0 :       final namespace = NamespaceUtils.getNamespaceFromChain(chains.first);
-    2180            0 :       String recap = ReCapsUtils.createEncodedRecap(
-    2181              :         namespace,
-    2182              :         'request',
-    2183              :         requestMethods,
-    2184              :       );
-    2185            0 :       final existingRecap = ReCapsUtils.getRecapFromResources(
-    2186              :         resources: resources,
-    2187              :       );
-    2188              :       if (existingRecap != null) {
-    2189              :         // per Recaps spec, recap must occupy the last position in the resources array
-    2190              :         // using .removeLast() to remove the element given we already checked it's a recap and will replace it
-    2191            0 :         recap = ReCapsUtils.mergeEncodedRecaps(recap, resources.removeLast());
-    2192              :       }
-    2193            0 :       resources.add(recap);
-    2194              :     }
-    2195              : 
-    2196              :     // Subscribe to the responseTopic because we expect the response to use this topic
-    2197            0 :     await core.relayClient.subscribe(topic: responseTopic);
-    2198              : 
-    2199            0 :     final id = JsonRpcUtils.payloadId();
-    2200            0 :     final proposalId = JsonRpcUtils.payloadId();
-    2201              : 
-    2202              :     // Ensure the expiry is greater than the minimum required for the request - currently 1h
-    2203              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
-    2204            0 :     final opts = MethodConstants.RPC_OPTS[method]!['req']!;
-    2205            0 :     final authRequestExpiry = max((params.expiry ?? 0), opts.ttl);
-    2206            0 :     final expiryTimestamp = DateTime.now().add(
-    2207            0 :       Duration(seconds: authRequestExpiry),
-    2208              :     );
-    2209              : 
-    2210            0 :     final request = WcSessionAuthRequestParams(
-    2211            0 :       authPayload: SessionAuthPayload.fromRequestParams(params).copyWith(
-    2212              :         resources: resources,
-    2213              :       ),
-    2214            0 :       requester: ConnectionMetadata(
-    2215              :         publicKey: publicKey,
-    2216            0 :         metadata: metadata,
-    2217              :       ),
-    2218            0 :       expiryTimestamp: expiryTimestamp.millisecondsSinceEpoch,
-    2219              :     );
-    2220              : 
-    2221              :     // Set the one time use receiver public key for decoding the Type 1 envelope
-    2222            0 :     await core.pairing.setReceiverPublicKey(
-    2223              :       topic: responseTopic,
-    2224              :       publicKey: publicKey,
-    2225              :       expiry: authRequestExpiry,
-    2226              :     );
-    2227              : 
-    2228            0 :     Completer<SessionAuthResponse> completer = Completer();
-    2229              : 
-    2230              :     // ----- build fallback session proposal request ----- //
-    2231              : 
-    2232              :     final fallbackMethod = MethodConstants.WC_SESSION_PROPOSE;
-    2233            0 :     final fallbackOpts = MethodConstants.RPC_OPTS[fallbackMethod]!['req']!;
-    2234            0 :     final fallbackExpiryTimestamp = DateTime.now().add(
-    2235            0 :       Duration(seconds: fallbackOpts.ttl),
-    2236              :     );
-    2237            0 :     final proposalData = ProposalData(
-    2238              :       id: proposalId,
-    2239            0 :       requiredNamespaces: {},
-    2240            0 :       optionalNamespaces: {
-    2241            0 :         'eip155': RequiredNamespace(
-    2242              :           chains: chains,
-    2243            0 :           methods: {'personal_sign', ...requestMethods}.toList(),
-    2244              :           events: EventsConstants.requiredEvents,
-    2245              :         ),
-    2246              :       },
-    2247            0 :       relays: [Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL)],
-    2248            0 :       expiry: fallbackExpiryTimestamp.millisecondsSinceEpoch,
-    2249            0 :       proposer: ConnectionMetadata(
-    2250              :         publicKey: publicKey,
-    2251            0 :         metadata: metadata,
-    2252              :       ),
-    2253              :       pairingTopic: pTopic,
-    2254              :     );
-    2255            0 :     final proposeRequest = WcSessionProposeRequest(
-    2256            0 :       relays: proposalData.relays,
-    2257            0 :       requiredNamespaces: proposalData.requiredNamespaces,
-    2258            0 :       optionalNamespaces: proposalData.optionalNamespaces,
-    2259            0 :       proposer: proposalData.proposer,
-    2260              :     );
-    2261            0 :     await _setProposal(proposalData.id, proposalData);
-    2262              : 
-    2263            0 :     Completer<SessionData> completerFallback = Completer();
-    2264              : 
-    2265            0 :     pendingProposals.add(
-    2266            0 :       SessionProposalCompleter(
-    2267            0 :         id: proposalData.id,
-    2268            0 :         selfPublicKey: proposalData.proposer.publicKey,
-    2269            0 :         pairingTopic: proposalData.pairingTopic,
-    2270            0 :         requiredNamespaces: proposalData.requiredNamespaces,
-    2271            0 :         optionalNamespaces: proposalData.optionalNamespaces,
-    2272              :         completer: completerFallback,
-    2273              :       ),
-    2274              :     );
-    2275              : 
-    2276              :     // ------------------------------------------------------- //
-    2277              : 
-    2278              :     // Send One-Click Auth request
-    2279            0 :     _sessionAuthResponseHandler(
-    2280              :       id: id,
-    2281              :       publicKey: publicKey,
-    2282              :       pairingTopic: pTopic,
-    2283              :       responseTopic: responseTopic,
-    2284              :       request: request,
-    2285              :       expiry: authRequestExpiry,
-    2286              :       completer: completer,
-    2287              :     );
-    2288              : 
-    2289              :     // Send Session Proposal request
-    2290            0 :     _connectResponseHandler(
-    2291              :       pTopic,
-    2292              :       proposeRequest,
-    2293            0 :       proposalData.id,
-    2294              :     );
-    2295              : 
-    2296            0 :     return SessionAuthRequestResponse(
-    2297              :       id: id,
-    2298              :       pairingTopic: pTopic,
-    2299              :       completer: completer,
-    2300              :       uri: connectionUri,
-    2301              :     );
-    2302              :   }
-    2303              : 
-    2304            0 :   Future<void> _sessionAuthResponseHandler({
-    2305              :     required int id,
-    2306              :     required String publicKey,
-    2307              :     required String pairingTopic,
-    2308              :     required String responseTopic,
-    2309              :     required int expiry,
-    2310              :     required WcSessionAuthRequestParams request,
-    2311              :     required Completer<SessionAuthResponse> completer,
-    2312              :   }) async {
-    2313              :     //
-    2314              :     late WcSessionAuthRequestResult result;
-    2315              :     try {
-    2316            0 :       final Map<String, dynamic> response = await core.pairing.sendRequest(
-    2317              :         pairingTopic,
-    2318              :         MethodConstants.WC_SESSION_AUTHENTICATE,
-    2319            0 :         request.toJson(),
-    2320              :         id: id,
-    2321              :         ttl: expiry,
-    2322              :       );
-    2323            0 :       result = WcSessionAuthRequestResult.fromJson(response);
-    2324              :     } catch (error) {
-    2325            0 :       final response = SessionAuthResponse(
-    2326              :         id: id,
-    2327              :         topic: responseTopic,
-    2328            0 :         jsonRpcError: (error is JsonRpcError) ? error : null,
-    2329            0 :         error: (error is! JsonRpcError)
-    2330            0 :             ? WalletConnectError(
-    2331            0 :                 code: -1,
-    2332            0 :                 message: error.toString(),
-    2333              :               )
-    2334              :             : null,
-    2335              :       );
-    2336            0 :       onSessionAuthResponse.broadcast(response);
-    2337            0 :       completer.complete(response);
-    2338              :       return;
-    2339              :     }
-    2340              : 
-    2341            0 :     await core.pairing.activate(topic: pairingTopic);
-    2342              : 
-    2343            0 :     final List<Cacao> cacaos = result.cacaos;
-    2344            0 :     final ConnectionMetadata responder = result.responder;
-    2345              : 
-    2346              :     final approvedMethods = <String>{};
-    2347              :     final approvedAccounts = <String>{};
-    2348              : 
-    2349              :     try {
-    2350            0 :       for (final Cacao cacao in cacaos) {
-    2351            0 :         final isValid = await validateSignedCacao(
-    2352              :           cacao: cacao,
-    2353            0 :           projectId: core.projectId,
-    2354              :         );
-    2355              :         if (!isValid) {
-    2356            0 :           throw Errors.getSdkError(
-    2357              :             Errors.SIGNATURE_VERIFICATION_FAILED,
-    2358              :             context: 'Invalid signature',
-    2359              :           );
-    2360              :         }
-    2361              : 
-    2362              :         // This is used on Auth request, would it be needed on 1-CA?
-    2363              :         // await completeRequests.set(
-    2364              :         //   id.toString(),
-    2365              :         //   StoredCacao.fromCacao(
-    2366              :         //     id: id,
-    2367              :         //     pairingTopic: pairingTopic,
-    2368              :         //     cacao: cacao,
-    2369              :         //   ),
-    2370              :         // );
-    2371              : 
-    2372            0 :         final CacaoPayload payload = cacao.p;
-    2373            0 :         final chainId = AddressUtils.getDidChainId(payload.iss);
-    2374            0 :         final approvedChains = ['eip155:$chainId'];
-    2375              : 
-    2376            0 :         final recap = ReCapsUtils.getRecapFromResources(
-    2377            0 :           resources: payload.resources,
-    2378              :         );
-    2379              :         if (recap != null) {
-    2380            0 :           final methodsfromRecap = ReCapsUtils.getMethodsFromRecap(recap);
-    2381            0 :           final chainsFromRecap = ReCapsUtils.getChainsFromRecap(recap);
-    2382            0 :           approvedMethods.addAll(methodsfromRecap);
-    2383            0 :           approvedChains.addAll(chainsFromRecap);
-    2384              :         }
-    2385              : 
-    2386            0 :         final parsedAddress = AddressUtils.getDidAddress(payload.iss);
-    2387            0 :         for (var chain in approvedChains.toSet()) {
-    2388            0 :           approvedAccounts.add('$chain:$parsedAddress');
-    2389              :         }
-    2390              :       }
-    2391            0 :     } on WalletConnectError catch (e) {
-    2392            0 :       final resp = SessionAuthResponse(
-    2393              :         id: id,
-    2394              :         topic: responseTopic,
-    2395            0 :         error: WalletConnectError(
-    2396            0 :           code: e.code,
-    2397            0 :           message: e.message,
-    2398              :         ),
-    2399              :       );
-    2400            0 :       onSessionAuthResponse.broadcast(resp);
-    2401            0 :       completer.complete(resp);
-    2402              :       return;
-    2403              :     }
-    2404              : 
-    2405            0 :     final sessionTopic = await core.crypto.generateSharedKey(
-    2406              :       publicKey,
-    2407            0 :       responder.publicKey,
-    2408              :     );
-    2409              : 
-    2410              :     SessionData? session;
-    2411            0 :     if (approvedMethods.isNotEmpty) {
-    2412            0 :       session = SessionData(
-    2413              :         topic: sessionTopic,
-    2414              :         acknowledged: true,
-    2415            0 :         self: ConnectionMetadata(
-    2416              :           publicKey: publicKey,
-    2417            0 :           metadata: metadata,
-    2418              :         ),
-    2419              :         peer: responder,
-    2420              :         controller: publicKey,
-    2421            0 :         expiry: WalletConnectUtils.calculateExpiry(
-    2422              :           WalletConnectConstants.SEVEN_DAYS,
-    2423              :         ),
-    2424            0 :         relay: Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL),
-    2425              :         pairingTopic: pairingTopic,
-    2426            0 :         namespaces: NamespaceUtils.buildNamespacesFromAuth(
-    2427              :           accounts: approvedAccounts,
-    2428              :           methods: approvedMethods,
-    2429              :         ),
-    2430              :       );
-    2431              : 
-    2432            0 :       await core.relayClient.subscribe(topic: sessionTopic);
-    2433            0 :       await sessions.set(sessionTopic, session);
-    2434              : 
-    2435            0 :       await core.pairing.updateMetadata(
-    2436              :         topic: pairingTopic,
-    2437            0 :         metadata: responder.metadata,
-    2438              :       );
-    2439              : 
-    2440            0 :       session = sessions.get(sessionTopic);
-    2441              :     }
-    2442              : 
-    2443            0 :     final resp = SessionAuthResponse(
-    2444              :       id: id,
-    2445              :       topic: responseTopic,
-    2446              :       auths: cacaos,
-    2447              :       session: session,
-    2448              :     );
-    2449            0 :     onSessionAuthResponse.broadcast(resp);
-    2450            0 :     completer.complete(resp);
-    2451              :   }
-    2452              : 
-    2453              :   // FORMER AUTH ENGINE PROPERTY
-    2454            0 :   @override
-    2455              :   Future<void> respondAuthRequest({
-    2456              :     required int id,
-    2457              :     required String iss,
-    2458              :     CacaoSignature? signature,
-    2459              :     WalletConnectError? error,
-    2460              :   }) async {
-    2461            0 :     _checkInitialized();
-    2462              : 
-    2463            0 :     Map<int, PendingAuthRequest> pendingRequests = getPendingAuthRequests();
-    2464            0 :     AuthApiValidators.isValidRespond(
-    2465              :       id: id,
-    2466              :       pendingRequests: pendingRequests,
-    2467              :       signature: signature,
-    2468              :       error: error,
-    2469              :     );
-    2470              : 
-    2471            0 :     final PendingAuthRequest pendingRequest = pendingRequests[id]!;
-    2472            0 :     final String receiverPublicKey = pendingRequest.metadata.publicKey;
-    2473            0 :     final String senderPublicKey = await core.crypto.generateKeyPair();
-    2474            0 :     final String responseTopic = core.crypto.getUtils().hashKey(
-    2475              :           receiverPublicKey,
-    2476              :         );
-    2477            0 :     final EncodeOptions encodeOpts = EncodeOptions(
-    2478              :       type: EncodeOptions.TYPE_1,
-    2479              :       receiverPublicKey: receiverPublicKey,
-    2480              :       senderPublicKey: senderPublicKey,
-    2481              :     );
-    2482              : 
-    2483              :     if (error != null) {
-    2484            0 :       await core.pairing.sendError(
-    2485              :         id,
-    2486              :         responseTopic,
-    2487              :         MethodConstants.WC_AUTH_REQUEST,
-    2488            0 :         JsonRpcError.serverError(error.message),
-    2489              :         encodeOptions: encodeOpts,
-    2490              :       );
-    2491              :     } else {
-    2492            0 :       final Cacao cacao = Cacao(
-    2493              :         h: const CacaoHeader(),
-    2494            0 :         p: CacaoPayload.fromRequestPayload(
-    2495              :           issuer: iss,
-    2496            0 :           payload: pendingRequest.cacaoPayload,
-    2497              :         ),
-    2498              :         s: signature!,
-    2499              :       );
-    2500              : 
-    2501              :       // print('auth res id: $id');
-    2502            0 :       await core.pairing.sendResult(
-    2503              :         id,
-    2504              :         responseTopic,
-    2505              :         MethodConstants.WC_AUTH_REQUEST,
-    2506            0 :         cacao.toJson(),
-    2507              :         encodeOptions: encodeOpts,
-    2508              :       );
-    2509              : 
-    2510            0 :       await authRequests.delete(id.toString());
-    2511              : 
-    2512            0 :       await completeRequests.set(
-    2513            0 :         id.toString(),
-    2514            0 :         StoredCacao.fromCacao(
-    2515              :           id: id,
-    2516            0 :           pairingTopic: pendingRequest.pairingTopic,
-    2517              :           cacao: cacao,
-    2518              :         ),
-    2519              :       );
-    2520              :     }
-    2521              :   }
-    2522              : 
-    2523            0 :   @override
-    2524              :   Future<ApproveResponse> approveSessionAuthenticate({
-    2525              :     required int id,
-    2526              :     List<Cacao>? auths,
-    2527              :   }) async {
-    2528            0 :     _checkInitialized();
-    2529              : 
-    2530            0 :     final pendingRequests = getPendingSessionAuthRequests();
-    2531              : 
-    2532            0 :     AuthApiValidators.isValidRespondAuthenticate(
-    2533              :       id: id,
-    2534              :       pendingRequests: pendingRequests,
-    2535              :       auths: auths,
-    2536              :     );
-    2537              : 
-    2538            0 :     final PendingSessionAuthRequest pendingRequest = pendingRequests[id]!;
-    2539            0 :     final receiverPublicKey = pendingRequest.requester.publicKey;
-    2540            0 :     final senderPublicKey = await core.crypto.generateKeyPair();
-    2541            0 :     final responseTopic = core.crypto.getUtils().hashKey(receiverPublicKey);
-    2542              : 
-    2543            0 :     final encodeOpts = EncodeOptions(
-    2544              :       type: EncodeOptions.TYPE_1,
-    2545              :       receiverPublicKey: receiverPublicKey,
-    2546              :       senderPublicKey: senderPublicKey,
-    2547              :     );
-    2548              : 
-    2549              :     final approvedMethods = <String>{};
-    2550              :     final approvedAccounts = <String>{};
-    2551            0 :     for (final Cacao cacao in auths!) {
-    2552            0 :       final isValid = await validateSignedCacao(
-    2553              :         cacao: cacao,
-    2554            0 :         projectId: core.projectId,
-    2555              :       );
-    2556              :       if (!isValid) {
-    2557            0 :         final error = Errors.getSdkError(
-    2558              :           Errors.SIGNATURE_VERIFICATION_FAILED,
-    2559              :           context: 'Signature verification failed',
-    2560              :         );
-    2561            0 :         await core.pairing.sendError(
-    2562              :           id,
-    2563              :           responseTopic,
-    2564              :           MethodConstants.WC_SESSION_AUTHENTICATE,
-    2565            0 :           JsonRpcError(code: error.code, message: error.message),
-    2566              :           encodeOptions: encodeOpts,
-    2567              :         );
-    2568              :         throw error;
-    2569              :       }
-    2570              : 
-    2571            0 :       final CacaoPayload payload = cacao.p;
-    2572            0 :       final chainId = AddressUtils.getDidChainId(payload.iss);
-    2573            0 :       final approvedChains = ['eip155:$chainId'];
-    2574              : 
-    2575            0 :       final recap = ReCapsUtils.getRecapFromResources(
-    2576            0 :         resources: payload.resources,
-    2577              :       );
-    2578              :       if (recap != null) {
-    2579            0 :         final methodsfromRecap = ReCapsUtils.getMethodsFromRecap(recap);
-    2580            0 :         final chainsFromRecap = ReCapsUtils.getChainsFromRecap(recap);
-    2581            0 :         approvedMethods.addAll(methodsfromRecap);
-    2582            0 :         approvedChains.addAll(chainsFromRecap);
-    2583              :       }
-    2584              : 
-    2585            0 :       final parsedAddress = AddressUtils.getDidAddress(payload.iss);
-    2586            0 :       for (var chain in approvedChains.toSet()) {
-    2587            0 :         approvedAccounts.add('$chain:$parsedAddress');
-    2588              :       }
-    2589              :     }
-    2590              : 
-    2591            0 :     final sessionTopic = await core.crypto.generateSharedKey(
-    2592              :       senderPublicKey,
-    2593              :       receiverPublicKey,
-    2594              :     );
-    2595              : 
-    2596              :     SessionData? session;
-    2597            0 :     if (approvedMethods.isNotEmpty) {
-    2598            0 :       session = SessionData(
-    2599              :         topic: sessionTopic,
-    2600              :         acknowledged: true,
-    2601            0 :         self: ConnectionMetadata(
-    2602              :           publicKey: senderPublicKey,
-    2603            0 :           metadata: metadata,
-    2604              :         ),
-    2605            0 :         peer: pendingRequest.requester,
-    2606              :         controller: receiverPublicKey,
-    2607            0 :         expiry: WalletConnectUtils.calculateExpiry(
-    2608              :           WalletConnectConstants.SEVEN_DAYS,
-    2609              :         ),
-    2610            0 :         relay: Relay(WalletConnectConstants.RELAYER_DEFAULT_PROTOCOL),
-    2611            0 :         pairingTopic: pendingRequest.pairingTopic,
-    2612            0 :         namespaces: NamespaceUtils.buildNamespacesFromAuth(
-    2613              :           accounts: approvedAccounts,
-    2614              :           methods: approvedMethods,
-    2615              :         ),
-    2616              :       );
-    2617              : 
-    2618            0 :       await core.relayClient.subscribe(topic: sessionTopic);
-    2619            0 :       await sessions.set(sessionTopic, session);
-    2620              : 
-    2621            0 :       session = sessions.get(sessionTopic);
-    2622              :     }
-    2623              : 
-    2624            0 :     final result = WcSessionAuthRequestResult(
-    2625              :       cacaos: auths,
-    2626            0 :       responder: ConnectionMetadata(
-    2627              :         publicKey: senderPublicKey,
-    2628            0 :         metadata: metadata,
-    2629              :       ),
-    2630              :     );
-    2631            0 :     await core.pairing.sendResult(
-    2632              :       id,
-    2633              :       responseTopic,
-    2634              :       MethodConstants.WC_SESSION_AUTHENTICATE,
-    2635            0 :       result.toJson(),
-    2636              :       encodeOptions: encodeOpts,
-    2637              :     );
-    2638              : 
-    2639            0 :     await sessionAuthRequests.delete(id.toString());
-    2640            0 :     await core.pairing.activate(topic: pendingRequest.pairingTopic);
-    2641            0 :     await core.pairing.updateMetadata(
-    2642            0 :       topic: pendingRequest.pairingTopic,
-    2643            0 :       metadata: pendingRequest.requester.metadata,
-    2644              :     );
-    2645              : 
-    2646            0 :     return ApproveResponse(
-    2647              :       topic: sessionTopic,
-    2648              :       session: session,
-    2649              :     );
-    2650              :   }
-    2651              : 
-    2652            0 :   @override
-    2653              :   Future<void> rejectSessionAuthenticate({
-    2654              :     required int id,
-    2655              :     required WalletConnectError reason,
-    2656              :   }) async {
-    2657            0 :     _checkInitialized();
-    2658              : 
-    2659            0 :     final pendingRequests = getPendingSessionAuthRequests();
-    2660              : 
-    2661            0 :     if (!pendingRequests.containsKey(id)) {
-    2662            0 :       throw Errors.getInternalError(
-    2663              :         Errors.MISSING_OR_INVALID,
-    2664              :         context:
-    2665            0 :             'rejectSessionAuthenticate() Could not find pending auth request with id $id',
-    2666              :       );
-    2667              :     }
-    2668              : 
-    2669            0 :     final PendingSessionAuthRequest pendingRequest = pendingRequests[id]!;
-    2670            0 :     final receiverPublicKey = pendingRequest.requester.publicKey;
-    2671            0 :     final senderPublicKey = await core.crypto.generateKeyPair();
-    2672            0 :     final responseTopic = core.crypto.getUtils().hashKey(receiverPublicKey);
-    2673              : 
-    2674            0 :     final encodeOpts = EncodeOptions(
-    2675              :       type: EncodeOptions.TYPE_1,
-    2676              :       receiverPublicKey: receiverPublicKey,
-    2677              :       senderPublicKey: senderPublicKey,
-    2678              :     );
-    2679              : 
-    2680              :     final method = MethodConstants.WC_SESSION_AUTHENTICATE;
-    2681            0 :     final rpcOpts = MethodConstants.RPC_OPTS[method];
-    2682            0 :     await core.pairing.sendError(
-    2683              :       id,
-    2684              :       responseTopic,
-    2685              :       method,
-    2686            0 :       JsonRpcError(code: reason.code, message: reason.message),
-    2687              :       encodeOptions: encodeOpts,
-    2688            0 :       rpcOptions: rpcOpts?['reject'],
-    2689              :     );
-    2690              : 
-    2691            0 :     await sessionAuthRequests.delete(id.toString());
-    2692            0 :     await _deleteProposal(id);
-    2693              :   }
-    2694              : 
-    2695              :   // FORMER AUTH ENGINE PROPERTY
-    2696            0 :   void _onAuthRequest(String topic, JsonRpcRequest payload) async {
-    2697              :     try {
-    2698            0 :       final request = WcAuthRequestRequest.fromJson(payload.params);
-    2699              : 
-    2700              :       final CacaoRequestPayload cacaoPayload =
-    2701            0 :           CacaoRequestPayload.fromPayloadParams(
-    2702            0 :         request.payloadParams,
-    2703              :       );
-    2704              : 
-    2705            0 :       authRequests.set(
-    2706            0 :         payload.id.toString(),
-    2707            0 :         PendingAuthRequest(
-    2708            0 :           id: payload.id,
-    2709              :           pairingTopic: topic,
-    2710            0 :           metadata: request.requester,
-    2711              :           cacaoPayload: cacaoPayload,
-    2712              :         ),
-    2713              :       );
-    2714              : 
-    2715            0 :       onAuthRequest.broadcast(
-    2716            0 :         AuthRequest(
-    2717            0 :           id: payload.id,
-    2718              :           topic: topic,
-    2719            0 :           requester: request.requester,
-    2720            0 :           payloadParams: request.payloadParams,
-    2721              :         ),
-    2722              :       );
-    2723            0 :     } on WalletConnectError catch (err) {
-    2724            0 :       await core.pairing.sendError(
-    2725            0 :         payload.id,
-    2726              :         topic,
-    2727            0 :         payload.method,
-    2728            0 :         JsonRpcError.invalidParams(
-    2729            0 :           err.message,
-    2730              :         ),
-    2731              :       );
-    2732              :     }
-    2733              :   }
-    2734              : 
-    2735            0 :   void _onSessionAuthRequest(String topic, JsonRpcRequest payload) async {
-    2736            0 :     core.logger.t('_onSessionAuthRequest, topic: $topic, payload: $payload');
-    2737              : 
-    2738            0 :     final sessionAuthRequest = WcSessionAuthRequestParams.fromJson(
-    2739            0 :       payload.params,
-    2740              :     );
-    2741              :     try {
-    2742            0 :       final cacaoPayload = CacaoRequestPayload.fromSessionAuthPayload(
-    2743            0 :         sessionAuthRequest.authPayload,
-    2744              :       );
-    2745              : 
-    2746            0 :       final verifyContext = await _getVerifyContext(payload, metadata);
-    2747              : 
-    2748            0 :       sessionAuthRequests.set(
-    2749            0 :         payload.id.toString(),
-    2750            0 :         PendingSessionAuthRequest(
-    2751            0 :           id: payload.id,
-    2752              :           pairingTopic: topic,
-    2753            0 :           requester: sessionAuthRequest.requester,
-    2754              :           authPayload: cacaoPayload,
-    2755            0 :           expiryTimestamp: sessionAuthRequest.expiryTimestamp,
-    2756              :           verifyContext: verifyContext,
-    2757              :         ),
-    2758              :       );
-    2759              : 
-    2760            0 :       onSessionAuthRequest.broadcast(
-    2761            0 :         SessionAuthRequest(
-    2762            0 :           id: payload.id,
-    2763              :           topic: topic,
-    2764            0 :           requester: sessionAuthRequest.requester,
-    2765            0 :           authPayload: sessionAuthRequest.authPayload,
-    2766              :           verifyContext: verifyContext,
-    2767              :         ),
-    2768              :       );
-    2769            0 :     } on WalletConnectError catch (err) {
-    2770            0 :       final receiverPublicKey = sessionAuthRequest.requester.publicKey;
-    2771            0 :       final senderPublicKey = await core.crypto.generateKeyPair();
-    2772              : 
-    2773            0 :       final encodeOpts = EncodeOptions(
-    2774              :         type: EncodeOptions.TYPE_1,
-    2775              :         receiverPublicKey: receiverPublicKey,
-    2776              :         senderPublicKey: senderPublicKey,
-    2777              :       );
-    2778            0 :       final rpcOpts = MethodConstants.RPC_OPTS[payload.method];
-    2779            0 :       await core.pairing.sendError(
-    2780            0 :         payload.id,
-    2781              :         topic,
-    2782            0 :         payload.method,
-    2783            0 :         JsonRpcError.invalidParams(err.message),
-    2784              :         encodeOptions: encodeOpts,
-    2785            0 :         rpcOptions: rpcOpts?['autoReject'],
-    2786              :       );
-    2787              :     }
-    2788              :   }
-    2789              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html deleted file mode 100644 index ab48e819..00000000 --- a/coverage/html/sign_api/utils/auth/address_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/address_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - address_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.func.html b/coverage/html/sign_api/utils/auth/address_utils.dart.func.html deleted file mode 100644 index 1e89e6e2..00000000 --- a/coverage/html/sign_api/utils/auth/address_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/address_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - address_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html deleted file mode 100644 index c5e4f729..00000000 --- a/coverage/html/sign_api/utils/auth/address_utils.dart.gcov.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/address_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - address_utils.dartCoverageTotalHit
Test:lcov.infoLines:66.7 %64
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : class AddressUtils {
-       2            3 :   static String getDidAddress(String iss) {
-       3            6 :     return iss.split(':').last;
-       4              :   }
-       5              : 
-       6            3 :   static String getDidChainId(String iss) {
-       7            6 :     return iss.split(':')[3];
-       8              :   }
-       9              : 
-      10            0 :   static String getNamespaceDidChainId(String iss) {
-      11            0 :     return iss.substring(iss.indexOf(RegExp(r':')) + 1);
-      12              :   }
-      13              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html deleted file mode 100644 index 63277826..00000000 --- a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_api_validators.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html deleted file mode 100644 index b3c2eaff..00000000 --- a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_api_validators.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html deleted file mode 100644 index 486eb5bb..00000000 --- a/coverage/html/sign_api/utils/auth/auth_api_validators.dart.gcov.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_api_validators.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_api_validators.dartCoverageTotalHit
Test:lcov.infoLines:45.5 %4420
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
-       2              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       3              : 
-       4              : class AuthApiValidators {
-       5            1 :   static bool isValidRequestExpiry(int expiry) {
-       6            1 :     return AuthConstants.AUTH_REQUEST_EXPIRY_MIN <= expiry &&
-       7            1 :         expiry <= AuthConstants.AUTH_REQUEST_EXPIRY_MAX;
-       8              :   }
-       9              : 
-      10            3 :   static bool isValidRequest(AuthRequestParams params) {
-      11            6 :     if (!NamespaceUtils.isValidUrl(params.aud)) {
-      12            2 :       throw Errors.getInternalError(
-      13              :         Errors.MISSING_OR_INVALID,
-      14              :         context:
-      15            4 :             'requestAuth() invalid aud: ${params.aud}. Must be a valid url.',
-      16              :       );
-      17              :     }
-      18              : 
-      19            6 :     if (params.nonce.isEmpty) {
-      20            1 :       throw Errors.getInternalError(
-      21              :         Errors.MISSING_OR_INVALID,
-      22              :         context: 'requestAuth() nonce must be nonempty.',
-      23              :       );
-      24              :     }
-      25              : 
-      26              :     // params.type == null || params.type == CacaoHeader.EIP4361
-      27            9 :     if (params.type != null && params.type != CacaoHeader.EIP4361) {
-      28            1 :       throw Errors.getInternalError(
-      29              :         Errors.MISSING_OR_INVALID,
-      30              :         context: 'requestAuth() type must null or ${CacaoHeader.EIP4361}.',
-      31              :       );
-      32              :     }
-      33              : 
-      34            3 :     final expiry = params.expiry;
-      35            1 :     if (expiry != null && !isValidRequestExpiry(expiry)) {
-      36            1 :       throw Errors.getInternalError(
-      37              :         Errors.MISSING_OR_INVALID,
-      38              :         context:
-      39            1 :             'requestAuth() expiry: $expiry. Expiry must be a number (in seconds) between ${AuthConstants.AUTH_REQUEST_EXPIRY_MIN} and ${AuthConstants.AUTH_REQUEST_EXPIRY_MAX}',
-      40              :       );
-      41              :     }
-      42              : 
-      43              :     return true;
-      44              :   }
-      45              : 
-      46            3 :   static bool isValidRespond({
-      47              :     required int id,
-      48              :     required Map<int, PendingAuthRequest> pendingRequests,
-      49              :     CacaoSignature? signature,
-      50              :     WalletConnectError? error,
-      51              :   }) {
-      52            3 :     if (!pendingRequests.containsKey(id)) {
-      53            2 :       throw Errors.getInternalError(
-      54              :         Errors.MISSING_OR_INVALID,
-      55            2 :         context: 'respondAuth() invalid id: $id. No pending request found.',
-      56              :       );
-      57              :     }
-      58              : 
-      59              :     if (signature == null && error == null) {
-      60            1 :       throw Errors.getInternalError(
-      61              :         Errors.MISSING_OR_INVALID,
-      62              :         context:
-      63              :             'respondAuth() invalid response. Must contain either signature or error.',
-      64              :       );
-      65              :     }
-      66              : 
-      67              :     return true;
-      68              :   }
-      69              : 
-      70            0 :   static bool isValidAuthenticate(SessionAuthRequestParams params) {
-      71            0 :     if (params.chains.isEmpty) {
-      72            0 :       throw Errors.getInternalError(
-      73              :         Errors.MISSING_OR_INVALID,
-      74              :         context: 'authenticate() invalid chains: Must not be emtpy.',
-      75              :       );
-      76              :     }
-      77              : 
-      78            0 :     if (!NamespaceUtils.isValidUrl(params.uri)) {
-      79            0 :       throw Errors.getInternalError(
-      80              :         Errors.MISSING_OR_INVALID,
-      81              :         context:
-      82            0 :             'authenticate() invalid uri: ${params.uri}. Must be a valid url.',
-      83              :       );
-      84              :     }
-      85              : 
-      86            0 :     if (params.nonce.isEmpty) {
-      87            0 :       throw Errors.getInternalError(
-      88              :         Errors.MISSING_OR_INVALID,
-      89              :         context: 'authenticate() nonce must be nonempty.',
-      90              :       );
-      91              :     }
-      92              : 
-      93            0 :     if (params.type != null && params.type!.t != CacaoHeader.EIP4361) {
-      94            0 :       throw Errors.getInternalError(
-      95              :         Errors.MISSING_OR_INVALID,
-      96              :         context: 'authenticate() type must null or ${CacaoHeader.EIP4361}.',
-      97              :       );
-      98              :     }
-      99              : 
-     100            0 :     final uniqueNamespaces = params.chains.map((chain) {
-     101            0 :       return NamespaceUtils.getNamespaceFromChain(chain);
-     102            0 :     }).toSet();
-     103            0 :     if (uniqueNamespaces.length > 1) {
-     104            0 :       throw Errors.getInternalError(
-     105              :         Errors.NON_CONFORMING_NAMESPACES,
-     106              :         context:
-     107              :             'authenticate() Multi-namespace requests are not supported. Please request single namespace only.',
-     108              :       );
-     109              :     }
-     110              : 
-     111            0 :     final namespace = NamespaceUtils.getNamespaceFromChain(params.chains.first);
-     112            0 :     if (namespace != 'eip155') {
-     113            0 :       throw Errors.getInternalError(
-     114              :         Errors.NON_CONFORMING_NAMESPACES,
-     115              :         context:
-     116              :             'authenticate() Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.',
-     117              :       );
-     118              :     }
-     119              : 
-     120              :     return true;
-     121              :   }
-     122              : 
-     123            0 :   static bool isValidRespondAuthenticate({
-     124              :     required int id,
-     125              :     required Map<int, PendingSessionAuthRequest> pendingRequests,
-     126              :     List<Cacao>? auths,
-     127              :   }) {
-     128            0 :     if (!pendingRequests.containsKey(id)) {
-     129            0 :       throw Errors.getInternalError(
-     130              :         Errors.MISSING_OR_INVALID,
-     131              :         context:
-     132            0 :             'approveSessionAuthenticate() Could not find pending auth request with id $id',
-     133              :       );
-     134              :     }
-     135              : 
-     136            0 :     if (auths == null || auths.isEmpty) {
-     137            0 :       throw Errors.getInternalError(
-     138              :         Errors.MISSING_OR_INVALID,
-     139              :         context:
-     140              :             'approveSessionAuthenticate() invalid response. Must contain Cacao signatures.',
-     141              :       );
-     142              :     }
-     143              : 
-     144              :     return true;
-     145              :   }
-     146              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html deleted file mode 100644 index cafb4812..00000000 --- a/coverage/html/sign_api/utils/auth/auth_signature.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_signature.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html deleted file mode 100644 index 01e3c1fe..00000000 --- a/coverage/html/sign_api/utils/auth/auth_signature.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_signature.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html deleted file mode 100644 index eef1f8b8..00000000 --- a/coverage/html/sign_api/utils/auth/auth_signature.dart.gcov.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_signature.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_signature.dartCoverageTotalHit
Test:lcov.infoLines:44.4 %9944
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:typed_data';
-       3              : import 'package:convert/convert.dart';
-       4              : import 'package:http/http.dart' as http;
-       5              : 
-       6              : import 'package:pointycastle/digests/keccak.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart';
-       8              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       9              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart';
-      10              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart';
-      11              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart';
-      12              : import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart';
-      13              : import 'package:web3dart/crypto.dart' as crypto;
-      14              : 
-      15              : class AuthSignature {
-      16            9 :   static final KeccakDigest keccakDigest = KeccakDigest(256);
-      17            3 :   static Uint8List keccak256(Uint8List input) {
-      18            6 :     keccakDigest.reset();
-      19            6 :     return keccakDigest.process(input);
-      20              :   }
-      21              : 
-      22            3 :   static Uint8List hashMessage(String message) {
-      23            3 :     return keccak256(
-      24            3 :       Uint8List.fromList(
-      25            3 :         utf8.encode(
-      26            3 :           [
-      27              :             '\x19Ethereum Signed Message:\n',
-      28            6 :             message.length.toString(),
-      29              :             message,
-      30            3 :           ].join(),
-      31              :         ),
-      32              :       ),
-      33              :     );
-      34              :   }
-      35              : 
-      36            3 :   static int getNormalizedV(int v) {
-      37            6 :     if (v == 0 || v == 27) {
-      38              :       return 27;
-      39              :     }
-      40            6 :     if (v == 1 || v == 28) {
-      41              :       return 28;
-      42              :     }
-      43            0 :     return v & 1 == 1 ? 27 : 28;
-      44              :   }
-      45              : 
-      46            3 :   static bool isValidEip191Signature(
-      47              :     String address,
-      48              :     String message,
-      49              :     String sig,
-      50              :   ) {
-      51              :     // Get the sig bytes
-      52              :     // print(sig);
-      53            3 :     final sigBytes = Uint8List.fromList(
-      54            6 :       hex.decode(sig.substring(2)),
-      55              :     );
-      56              : 
-      57              :     // If the sig bytes aren't 65 bytes long, throw an error
-      58            6 :     if (sigBytes.length != 65) {
-      59            0 :       throw Exception('Invalid signature length');
-      60              :     }
-      61              : 
-      62              :     // Get the r and s values from the sig bytes
-      63            3 :     final r = BigInt.parse(
-      64            6 :       hex.encode(sigBytes.sublist(0, 32)),
-      65              :       radix: 16,
-      66              :     );
-      67            3 :     final s = BigInt.parse(
-      68            6 :       hex.encode(sigBytes.sublist(32, 64)),
-      69              :       radix: 16,
-      70              :     );
-      71              :     // print(sigBytes[64]);
-      72            6 :     final v = getNormalizedV(sigBytes[64]);
-      73              :     // print(r);
-      74              :     // print(s);
-      75              :     // print(v);
-      76              : 
-      77              :     // // Recover the public key from the signature
-      78              :     // Uint8List? publicKeyBytes = AuthSecp256k1.recoverPublicKeyFromSignature(
-      79              :     //   v - 27,
-      80              :     //   r,
-      81              :     //   s,
-      82              :     //   hashMessage(message),
-      83              :     // );
-      84              : 
-      85              :     // // If the public key is null, return false
-      86              :     // if (publicKeyBytes == null) {
-      87              :     //   print('Could not derive publicKey');
-      88              :     //   return false;
-      89              :     // }
-      90              : 
-      91              :     // Convert the public key to an address
-      92            3 :     final publicKeyBytes = crypto.ecRecover(
-      93            3 :       hashMessage(message),
-      94            3 :       crypto.MsgSignature(r, s, v),
-      95              :     );
-      96              :     // print(hex.encode(publicKeyBytes));
-      97            3 :     final hashedPubKeyBytes = keccak256(publicKeyBytes);
-      98            3 :     final addressBytes = hashedPubKeyBytes.sublist(12, 32);
-      99            6 :     final recoveredAddress = '0x${hex.encode(addressBytes)}';
-     100              : 
-     101              :     // final String recoveredAddress = EthSigUtil.recoverSignature(
-     102              :     //   signature: sig,
-     103              :     //   message: hashMessage(message),
-     104              :     //   //  Uint8List.fromList(
-     105              :     //   //   ascii.encode(message),
-     106              :     //   // ),
-     107              :     // );
-     108              : 
-     109              :     // print(recoveredAddress.toLowerCase());
-     110              :     // print(address.toLowerCase());
-     111              : 
-     112            9 :     return recoveredAddress.toLowerCase() == address.toLowerCase();
-     113              :   }
-     114              : 
-     115            0 :   static Future<bool> isValidEip1271Signature(
-     116              :     String address,
-     117              :     String reconstructedMessage,
-     118              :     String cacaoSignature,
-     119              :     String chainId,
-     120              :     String projectId,
-     121              :   ) async {
-     122              :     try {
-     123              :       const String eip1271MagicValue = '0x1626ba7e';
-     124              :       const String dynamicTypeOffset =
-     125              :           '0000000000000000000000000000000000000000000000000000000000000040';
-     126              :       const String dynamicTypeLength =
-     127              :           '0000000000000000000000000000000000000000000000000000000000000041';
-     128            0 :       final String nonPrefixedSignature = cacaoSignature.substring(2);
-     129              :       final String nonPrefixedHashedMessage =
-     130            0 :           hex.encode(hashMessage(reconstructedMessage)).substring(2);
-     131              : 
-     132            0 :       final String data = eip1271MagicValue +
-     133            0 :           nonPrefixedHashedMessage +
-     134            0 :           dynamicTypeOffset +
-     135            0 :           dynamicTypeLength +
-     136              :           nonPrefixedSignature;
-     137              : 
-     138            0 :       final Uri url = Uri.parse(
-     139            0 :         '${AuthConstants.AUTH_DEFAULT_URL}/?chainId=$chainId&projectId=$projectId',
-     140              :       );
-     141            0 :       final Map<String, dynamic> body = JsonRpcUtils.formatJsonRpcRequest(
-     142              :         'eth_call',
-     143            0 :         {
-     144              :           'to': address,
-     145              :           'data': data,
-     146              :         },
-     147              :       );
-     148              : 
-     149            0 :       final http.Response response = await http.post(
-     150              :         url,
-     151              :         body: body,
-     152              :       );
-     153              : 
-     154              :       // print(response.body);
-     155              :       // final jsonBody = jsonDecode(response.body);
-     156              :       final String recoveredValue =
-     157            0 :           response.body.substring(0, eip1271MagicValue.length);
-     158            0 :       return recoveredValue.toLowerCase() == eip1271MagicValue.toLowerCase();
-     159              :     } catch (e) {
-     160              :       return false;
-     161              :     }
-     162              :   }
-     163              : 
-     164              :   // verifies CACAO signature
-     165              :   // Used by the wallet after formatting the message
-     166            3 :   static Future<bool> verifySignature(
-     167              :     String address,
-     168              :     String reconstructedMessage,
-     169              :     CacaoSignature cacaoSignature,
-     170              :     String chainId,
-     171              :     String projectId,
-     172              :   ) async {
-     173            6 :     if (cacaoSignature.t == 'eip191') {
-     174            3 :       return isValidEip191Signature(
-     175              :         address,
-     176              :         reconstructedMessage,
-     177            3 :         cacaoSignature.s,
-     178              :       );
-     179            0 :     } else if (cacaoSignature.t == 'eip1271') {
-     180            0 :       return await isValidEip1271Signature(
-     181              :         address,
-     182              :         reconstructedMessage,
-     183            0 :         cacaoSignature.s,
-     184              :         chainId,
-     185              :         projectId,
-     186              :       );
-     187              :     } else {
-     188            0 :       throw Exception(
-     189            0 :         'verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${cacaoSignature.t}',
-     190              :       );
-     191              :     }
-     192              :   }
-     193              : 
-     194            0 :   static Cacao buildAuthObject({
-     195              :     required CacaoRequestPayload requestPayload,
-     196              :     required CacaoSignature signature,
-     197              :     required String iss,
-     198              :   }) {
-     199            0 :     if (!iss.contains('did:pkh:')) {
-     200            0 :       iss = 'did:pkh:$iss';
-     201              :     }
-     202            0 :     return Cacao(
-     203              :       h: const CacaoHeader(t: CacaoHeader.CAIP122),
-     204            0 :       p: CacaoPayload.fromRequestPayload(
-     205              :         issuer: iss,
-     206              :         payload: requestPayload,
-     207              :       ),
-     208              :       s: signature,
-     209              :     );
-     210              :   }
-     211              : 
-     212            0 :   static SessionAuthPayload populateAuthPayload({
-     213              :     required SessionAuthPayload authPayload,
-     214              :     required List<String> chains,
-     215              :     required List<String> methods,
-     216              :   }) {
-     217            0 :     final statement = authPayload.statement ?? '';
-     218              : 
-     219            0 :     if (chains.isEmpty) return authPayload;
-     220              : 
-     221            0 :     final requested = authPayload.chains;
-     222              :     final supported = chains;
-     223              : 
-     224              :     final approvedChains =
-     225            0 :         supported.where((value) => requested.contains(value)).toList();
-     226            0 :     if (approvedChains.isEmpty) {
-     227            0 :       throw WalletConnectError(code: -1, message: 'No supported chains');
-     228              :     }
-     229              : 
-     230            0 :     final requestedRecaps = ReCapsUtils.getDecodedRecapFromResources(
-     231            0 :       resources: authPayload.resources,
-     232              :     );
-     233              :     if (requestedRecaps == null) return authPayload;
-     234              : 
-     235            0 :     ReCapsUtils.isValidRecap(requestedRecaps);
-     236              : 
-     237            0 :     final resource = ReCapsUtils.getRecapResource(
-     238              :       recap: requestedRecaps,
-     239              :       resource: 'eip155',
-     240              :     );
-     241            0 :     List<String> updatedResources = authPayload.resources ?? [];
-     242              : 
-     243            0 :     if (resource.isNotEmpty) {
-     244            0 :       final actions = ReCapsUtils.getReCapActions(abilities: resource);
-     245              :       final approvedActions =
-     246            0 :           actions.where((value) => methods.contains(value)).toList();
-     247            0 :       if (approvedActions.isEmpty) {
-     248            0 :         throw WalletConnectError(
-     249            0 :           code: -1,
-     250            0 :           message: 'Supported methods don\'t satisfy the requested: $actions, '
-     251              :               'supported: $methods',
-     252              :         );
-     253              :       }
-     254            0 :       final formattedActions = ReCapsUtils.assignAbilityToActions(
-     255              :         'request',
-     256              :         approvedActions,
-     257            0 :         limits: {'chains': approvedChains},
-     258              :       );
-     259            0 :       final updatedRecap = ReCapsUtils.addResourceToRecap(
-     260              :         recap: requestedRecaps,
-     261              :         resource: 'eip155',
-     262              :         actions: formattedActions,
-     263              :       );
-     264              :       // remove recap from resources as we will add the updated one
-     265            0 :       updatedResources = List<String>.from((authPayload.resources ?? []))
-     266            0 :         ..removeLast();
-     267            0 :       updatedResources.add(ReCapsUtils.encodeRecap(updatedRecap));
-     268              :     }
-     269              :     //
-     270            0 :     return SessionAuthPayload.fromJson(authPayload.toJson()).copyWith(
-     271            0 :       statement: ReCapsUtils.buildRecapStatement(
-     272              :         statement,
-     273            0 :         ReCapsUtils.getRecapFromResources(resources: updatedResources),
-     274              :       ),
-     275              :       chains: approvedChains,
-     276            0 :       resources: updatedResources.isNotEmpty ? updatedResources : null,
-     277              :     );
-     278              :   }
-     279              : 
-     280            1 :   static String getAddressFromMessage(String message) {
-     281              :     try {
-     282            1 :       final regexp = RegExp('0x[a-fA-F0-9]{40}');
-     283            1 :       final matches = regexp.allMatches(message);
-     284            2 :       for (final Match m in matches) {
-     285            1 :         return m[0]!;
-     286              :       }
-     287              :       return '';
-     288              :     } catch (_) {}
-     289              :     return '';
-     290              :   }
-     291              : 
-     292            1 :   static String getChainIdFromMessage(String message) {
-     293              :     try {
-     294              :       final pattern = 'Chain ID: ';
-     295            2 :       final regexp = RegExp('$pattern(?<temp1>\\d+)');
-     296            1 :       final matches = regexp.allMatches(message);
-     297            2 :       for (final Match m in matches) {
-     298            3 :         return m[0]!.toString().replaceAll(pattern, '');
-     299              :       }
-     300              :     } catch (_) {}
-     301              :     return '';
-     302              :   }
-     303              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html deleted file mode 100644 index 18d315ed..00000000 --- a/coverage/html/sign_api/utils/auth/auth_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html deleted file mode 100644 index 08898c58..00000000 --- a/coverage/html/sign_api/utils/auth/auth_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html deleted file mode 100644 index e42ee3a1..00000000 --- a/coverage/html/sign_api/utils/auth/auth_utils.dart.gcov.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/auth_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - auth_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %22
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : class AuthUtils {
-       2            3 :   static String generateNonce() {
-       3            9 :     return DateTime.now().millisecondsSinceEpoch.toString();
-       4              :   }
-       5              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/index-sort-f.html b/coverage/html/sign_api/utils/auth/index-sort-f.html deleted file mode 100644 index c98322d5..00000000 --- a/coverage/html/sign_api/utils/auth/index-sort-f.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
address_utils.dart -
66.7%66.7%
-
66.7 %64-
auth_api_validators.dart -
45.5%45.5%
-
45.5 %4420-
auth_signature.dart -
44.4%44.4%
-
44.4 %9944-
auth_utils.dart -
100.0%
-
100.0 %22-
recaps_utils.dart -
0.0%
-
0.0 %169-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/index-sort-l.html b/coverage/html/sign_api/utils/auth/index-sort-l.html deleted file mode 100644 index 87f2a26b..00000000 --- a/coverage/html/sign_api/utils/auth/index-sort-l.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
recaps_utils.dart -
0.0%
-
0.0 %169
auth_signature.dart -
44.4%44.4%
-
44.4 %9944
auth_api_validators.dart -
45.5%45.5%
-
45.5 %4420
address_utils.dart -
66.7%66.7%
-
66.7 %64
auth_utils.dart -
100.0%
-
100.0 %22
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/index.html b/coverage/html/sign_api/utils/auth/index.html deleted file mode 100644 index 40a1bb06..00000000 --- a/coverage/html/sign_api/utils/auth/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/authCoverageTotalHit
Test:lcov.infoLines:21.9 %32070
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
address_utils.dart -
66.7%66.7%
-
66.7 %64
auth_api_validators.dart -
45.5%45.5%
-
45.5 %4420
auth_signature.dart -
44.4%44.4%
-
44.4 %9944
auth_utils.dart -
100.0%
-
100.0 %22
recaps_utils.dart -
0.0%
-
0.0 %169
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html deleted file mode 100644 index 12c1e693..00000000 --- a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - recaps_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html deleted file mode 100644 index 07179f7f..00000000 --- a/coverage/html/sign_api/utils/auth/recaps_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - recaps_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html b/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html deleted file mode 100644 index 801ed432..00000000 --- a/coverage/html/sign_api/utils/auth/recaps_utils.dart.gcov.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/auth/recaps_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils/auth - recaps_utils.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %1690
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : 
-       3              : import 'package:flutter/foundation.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-       5              : 
-       6              : class ReCapsUtils {
-       7              :   //
-       8            0 :   static String? getRecapFromResources({List<String>? resources}) {
-       9            0 :     final resourcesList = resources ?? [];
-      10            0 :     if (resourcesList.isEmpty) return null;
-      11              :     // per spec, recap is always the last resource
-      12            0 :     final recap = resourcesList.last;
-      13            0 :     return isRecap(recap) ? recap : null;
-      14              :   }
-      15              : 
-      16            0 :   static bool isRecap(String resource) {
-      17            0 :     return resource.contains('urn:recap:');
-      18              :   }
-      19              : 
-      20            0 :   static List<String> getMethodsFromRecap(String recap) {
-      21            0 :     final decodedRecap = decodeRecap(recap);
-      22            0 :     if (!isValidRecap(decodedRecap)) return [];
-      23              : 
-      24              :     try {
-      25              :       // methods are only available for eip155 as per the current implementation
-      26            0 :       final resource = decodedRecap['att']?['eip155'] as Map<String, dynamic>?;
-      27            0 :       if (resource == null) return [];
-      28              : 
-      29            0 :       return resource.keys.map((k) => k.split('/').last).toList();
-      30              :     } catch (e) {
-      31            0 :       return [];
-      32              :     }
-      33              :   }
-      34              : 
-      35            0 :   static List<String> getChainsFromRecap(String recap) {
-      36            0 :     final decodedRecap = decodeRecap(recap);
-      37            0 :     if (!isValidRecap(decodedRecap)) return [];
-      38              : 
-      39            0 :     final List<dynamic> recapChains = [];
-      40              :     try {
-      41              :       final att =
-      42            0 :           decodedRecap['att'] as Map<String, dynamic>? ?? <String, dynamic>{};
-      43              : 
-      44            0 :       for (var resources in att.values) {
-      45              :         final resourcesMap = resources as Map<String, dynamic>;
-      46            0 :         final resourcesValues = resourcesMap.values.first as List;
-      47            0 :         for (var value in resourcesValues) {
-      48              :           final chainValues = value as Map<String, dynamic>;
-      49            0 :           final chains = chainValues['chains'] as List;
-      50            0 :           recapChains.addAll(chains);
-      51              :         }
-      52              :       }
-      53            0 :       return recapChains.map((e) => e.toString()).toSet().toList();
-      54              :     } catch (e) {
-      55            0 :       return [];
-      56              :     }
-      57              :   }
-      58              : 
-      59            0 :   static Map<String, dynamic> decodeRecap(String recap) {
-      60              :     // Add the padding that was removed during encoding
-      61            0 :     String paddedRecap = recap.replaceAll('urn:recap:', '');
-      62            0 :     final padding = paddedRecap.length % 4;
-      63            0 :     if (padding > 0) {
-      64            0 :       paddedRecap += '=' * (4 - padding);
-      65              :     }
-      66              : 
-      67            0 :     final decoded = utf8.decode(base64.decode(paddedRecap));
-      68            0 :     final decodedRecap = jsonDecode(decoded) as Map<String, dynamic>;
-      69            0 :     isValidRecap(decodedRecap);
-      70              :     return decodedRecap;
-      71              :   }
-      72              : 
-      73            0 :   static bool isValidRecap(Map<String, dynamic> recap) {
-      74            0 :     final att = recap['att'] as Map<String, dynamic>?;
-      75              :     if (att == null) {
-      76            0 :       throw Errors.getInternalError(
-      77              :         Errors.MISSING_OR_INVALID,
-      78              :         context: 'Invalid ReCap. No `att` property found',
-      79              :       );
-      80              :     }
-      81              :     //
-      82            0 :     final resources = att.keys;
-      83            0 :     if (resources.isEmpty) {
-      84            0 :       throw Errors.getInternalError(
-      85              :         Errors.MISSING_OR_INVALID,
-      86              :         context: 'Invalid ReCap. No resources found in `att` property',
-      87              :       );
-      88              :     }
-      89              :     //
-      90            0 :     for (var resource in resources) {
-      91            0 :       final abilities = att[resource];
-      92            0 :       if (abilities is! Map) {
-      93            0 :         throw Errors.getInternalError(
-      94              :           Errors.MISSING_OR_INVALID,
-      95            0 :           context: 'Invalid ReCap. Resource must be an object: $resource',
-      96              :         );
-      97              :       }
-      98            0 :       final resourceAbilities = (abilities as Map<String, dynamic>).keys;
-      99            0 :       if (resourceAbilities.isEmpty) {
-     100            0 :         throw Errors.getInternalError(
-     101              :           Errors.MISSING_OR_INVALID,
-     102            0 :           context: 'Invalid ReCap. Resource object is empty: $resource',
-     103              :         );
-     104              :       }
-     105              :       //
-     106            0 :       for (var ability in resourceAbilities) {
-     107            0 :         final limits = abilities[ability];
-     108            0 :         if (limits is! List) {
-     109            0 :           throw Errors.getInternalError(
-     110              :             Errors.MISSING_OR_INVALID,
-     111            0 :             context: 'Invalid ReCap. Ability limits $ability must be an array '
-     112              :                 'of objects, found: $limits',
-     113              :           );
-     114              :         }
-     115            0 :         if ((limits).isEmpty) {
-     116            0 :           throw Errors.getInternalError(
-     117              :             Errors.MISSING_OR_INVALID,
-     118            0 :             context: 'Invalid ReCap. Value of $ability is empty array, must be '
-     119              :                 'an array with objects',
-     120              :           );
-     121              :         }
-     122              :         //
-     123            0 :         for (var limit in limits) {
-     124            0 :           if (limit is! Map) {
-     125            0 :             throw Errors.getInternalError(
-     126              :               Errors.MISSING_OR_INVALID,
-     127            0 :               context:
-     128              :                   'Invalid ReCap. Ability limits ($ability) must be an array '
-     129              :                   'of objects, found: $limit',
-     130              :             );
-     131              :           }
-     132              :         }
-     133              :       }
-     134              :     }
-     135              : 
-     136              :     return true;
-     137              :   }
-     138              : 
-     139            0 :   static String createEncodedRecap(
-     140              :     String namespace,
-     141              :     String ability,
-     142              :     List<String> methods,
-     143              :   ) {
-     144            0 :     final recap = createRecap(namespace, ability, methods);
-     145            0 :     return encodeRecap(recap);
-     146              :   }
-     147              : 
-     148            0 :   static String encodeRecap(Map<String, dynamic> recap) {
-     149            0 :     isValidRecap(recap);
-     150            0 :     final jsonRecap = jsonEncode(recap);
-     151            0 :     final bytes = utf8.encode(jsonRecap).toList();
-     152              :     // remove the padding from the base64 string as per recap spec
-     153            0 :     return 'urn:recap:${base64.encode(bytes).replaceAll('=', '')}';
-     154              :   }
-     155              : 
-     156            0 :   static Map<String, dynamic> createRecap(
-     157              :     String namespace,
-     158              :     String ability,
-     159              :     List<String> methods, {
-     160              :     Map limits = const {},
-     161              :   }) {
-     162              :     try {
-     163            0 :       final sortedMethods = List<String>.from(methods)
-     164            0 :         ..sort((a, b) => a.compareTo(b));
-     165              : 
-     166            0 :       Map<String, dynamic> abilities = {};
-     167            0 :       for (var method in sortedMethods) {
-     168            0 :         abilities['$ability/$method'] = [
-     169            0 :           ...(abilities['$ability/$method'] ?? []),
-     170            0 :           limits,
-     171              :         ];
-     172              :       }
-     173              : 
-     174            0 :       return {
-     175            0 :         'att': {
-     176            0 :           namespace: Map<String, dynamic>.fromEntries(abilities.entries),
-     177              :         }
-     178              :       };
-     179              :     } catch (e) {
-     180              :       rethrow;
-     181              :     }
-     182              :   }
-     183              : 
-     184            0 :   static String mergeEncodedRecaps(String recap1, String recap2) {
-     185            0 :     final decoded1 = decodeRecap(recap1);
-     186            0 :     final decoded2 = decodeRecap(recap2);
-     187            0 :     final merged = mergeRecaps(decoded1, decoded2);
-     188            0 :     return encodeRecap(merged);
-     189              :   }
-     190              : 
-     191            0 :   static Map<String, dynamic> mergeRecaps(
-     192              :     Map<String, dynamic> recap1,
-     193              :     Map<String, dynamic> recap2,
-     194              :   ) {
-     195            0 :     isValidRecap(recap1);
-     196            0 :     isValidRecap(recap2);
-     197            0 :     final att1 = recap1['att'] as Map<String, dynamic>;
-     198            0 :     final att2 = recap2['att'] as Map<String, dynamic>;
-     199            0 :     final keys = [...att1.keys, ...att2.keys]..sort(
-     200            0 :         (a, b) => a.compareTo(b),
-     201              :       );
-     202            0 :     final mergedRecap = {'att': {}};
-     203              : 
-     204            0 :     for (var key in keys) {
-     205            0 :       final actions1 = att1[key] as Map<String, dynamic>? ?? {};
-     206            0 :       final actions1Keys = actions1.keys;
-     207            0 :       final actions2 = att2[key] as Map<String, dynamic>? ?? {};
-     208            0 :       final actions2Keys = actions2.keys;
-     209            0 :       final actions = [...actions1Keys, ...actions2Keys]..sort(
-     210            0 :           (a, b) => a.compareTo(b),
-     211              :         );
-     212              : 
-     213            0 :       for (var action in actions) {
-     214            0 :         mergedRecap['att']![key] = {
-     215            0 :           ...mergedRecap['att']?[key],
-     216            0 :           [action]: recap1['att'][key]?[action] || recap2['att'][key]?[action],
-     217              :         };
-     218              :       }
-     219              :     }
-     220              : 
-     221              :     return mergedRecap;
-     222              :   }
-     223              : 
-     224            0 :   static Map<String, dynamic>? getDecodedRecapFromResources({
-     225              :     List<String>? resources,
-     226              :   }) {
-     227            0 :     final resource = getRecapFromResources(resources: resources);
-     228              :     if (resource == null) return null;
-     229            0 :     if (!isRecap(resource)) return null;
-     230            0 :     return decodeRecap(resource);
-     231              :   }
-     232              : 
-     233            0 :   static String formatStatementFromRecap({
-     234              :     String statement = '',
-     235              :     Map<String, dynamic> recap = const {},
-     236              :   }) {
-     237            0 :     isValidRecap(recap);
-     238              :     //
-     239              :     final baseStatement =
-     240              :         'I further authorize the stated URI to perform the following actions on my behalf: ';
-     241            0 :     if (statement.contains(baseStatement)) return statement;
-     242              :     //
-     243            0 :     final List<String> statementForRecap = <String>[];
-     244              :     int currentCounter = 0;
-     245            0 :     final att = recap['att'] as Map<String, dynamic>;
-     246            0 :     final resources = att.keys;
-     247            0 :     for (var resource in resources) {
-     248            0 :       final abilities = att[resource];
-     249            0 :       final resourceAbilities = (abilities as Map<String, dynamic>).keys;
-     250            0 :       final actions = resourceAbilities.map((ability) {
-     251            0 :         return {
-     252            0 :           'ability': ability.split('/')[0],
-     253            0 :           'action': ability.split('/')[1],
-     254              :         };
-     255            0 :       }).toList();
-     256            0 :       actions.sort((a, b) => a['action']!.compareTo(b['action']!));
-     257              :       //
-     258            0 :       final uniqueAbilities = <String, dynamic>{};
-     259            0 :       for (var actionMap in actions) {
-     260            0 :         final ability = actionMap['ability']!;
-     261            0 :         final action = actionMap['action']!;
-     262            0 :         if (uniqueAbilities[ability] == null) {
-     263            0 :           uniqueAbilities[ability] = [];
-     264              :         }
-     265            0 :         uniqueAbilities[ability].add(action);
-     266              :       }
-     267              :       //
-     268            0 :       final abilitiesStatements = uniqueAbilities.keys.map((ability) {
-     269            0 :         currentCounter++;
-     270            0 :         final abilities = (uniqueAbilities[ability] as List).join('\', \'');
-     271            0 :         return '($currentCounter) \'$ability\': \'$abilities\' for \'$resource\'.';
-     272            0 :       }).toList();
-     273              : 
-     274            0 :       statementForRecap.add(
-     275            0 :         abilitiesStatements.join(', ').replaceAll('.,', '.'),
-     276              :       );
-     277              :     }
-     278              :     //
-     279            0 :     final recapStatemet = statementForRecap.join(' ');
-     280            0 :     final recapStatement = '$baseStatement$recapStatemet';
-     281              :     // add a space if there is a statement
-     282            0 :     return '${statement.isNotEmpty ? "$statement " : ""}$recapStatement';
-     283              :   }
-     284              : 
-     285            0 :   static List<String> getRecapResource({
-     286              :     required Map<String, dynamic> recap,
-     287              :     required String resource,
-     288              :   }) {
-     289              :     try {
-     290            0 :       final att = recap['att'] as Map<String, dynamic>?;
-     291            0 :       final abilities = att?[resource] as Map<String, dynamic>?;
-     292              :       if (abilities != null) {
-     293            0 :         return abilities.keys.toList();
-     294              :       }
-     295              :     } catch (e) {
-     296            0 :       debugPrint(e.toString());
-     297              :     }
-     298            0 :     return [];
-     299              :   }
-     300              : 
-     301            0 :   static List<String> getReCapActions({required List<String> abilities}) {
-     302              :     try {
-     303            0 :       return abilities.map((ability) => ability.split('/')[1]).toList();
-     304              :     } catch (e) {
-     305            0 :       debugPrint(e.toString());
-     306              :     }
-     307            0 :     return [];
-     308              :   }
-     309              : 
-     310            0 :   static Map<String, dynamic> assignAbilityToActions(
-     311              :     String ability,
-     312              :     List<String> actions, {
-     313              :     Map limits = const {},
-     314              :   }) {
-     315            0 :     final sortedActions = List<String>.from(actions)
-     316            0 :       ..sort((a, b) => a.compareTo(b));
-     317              : 
-     318            0 :     Map<String, dynamic> abilities = {};
-     319            0 :     for (var method in sortedActions) {
-     320            0 :       abilities['$ability/$method'] = [
-     321            0 :         ...(abilities['$ability/$method'] ?? []),
-     322            0 :         limits,
-     323              :       ];
-     324              :     }
-     325              : 
-     326            0 :     return Map<String, dynamic>.fromEntries(abilities.entries);
-     327              :   }
-     328              : 
-     329            0 :   static Map<String, dynamic> addResourceToRecap({
-     330              :     required Map<String, dynamic> recap,
-     331              :     required String resource,
-     332              :     required Map<String, dynamic> actions,
-     333              :   }) {
-     334              :     //
-     335            0 :     final sortedRecap = Map<String, dynamic>.from(recap);
-     336            0 :     sortedRecap['att']![resource] = actions;
-     337            0 :     sortedRecap.keys.toList().sort((a, b) => a.compareTo(b));
-     338            0 :     isValidRecap(sortedRecap);
-     339              :     return sortedRecap;
-     340              :   }
-     341              : 
-     342            0 :   static String buildRecapStatement(String statement, String? recap) {
-     343            0 :     if ((recap ?? '').isEmpty) return statement;
-     344            0 :     final decoded = decodeRecap(recap!);
-     345            0 :     isValidRecap(decoded);
-     346            0 :     return formatStatementFromRecap(statement: statement, recap: decoded);
-     347              :   }
-     348              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html b/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html deleted file mode 100644 index fff10874..00000000 --- a/coverage/html/sign_api/utils/custom_credentials.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/custom_credentials.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - custom_credentials.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.func.html b/coverage/html/sign_api/utils/custom_credentials.dart.func.html deleted file mode 100644 index f0561ad3..00000000 --- a/coverage/html/sign_api/utils/custom_credentials.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/custom_credentials.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - custom_credentials.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html b/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html deleted file mode 100644 index 2dd62329..00000000 --- a/coverage/html/sign_api/utils/custom_credentials.dart.gcov.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/custom_credentials.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - custom_credentials.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %230
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:typed_data';
-       3              : 
-       4              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       5              : import 'package:web3dart/crypto.dart' as crypto;
-       6              : 
-       7              : class CustomCredentials extends CustomTransactionSender {
-       8            0 :   CustomCredentials({
-       9              :     required ISignEngine signEngine,
-      10              :     required String topic,
-      11              :     required String chainId,
-      12              :     required EthereumAddress address,
-      13              :     String? method,
-      14              :   })  : _signEngine = signEngine,
-      15              :         _topic = topic,
-      16              :         _chainId = chainId,
-      17              :         _address = address,
-      18              :         _method = method;
-      19              : 
-      20              :   final ISignEngine _signEngine;
-      21              :   final String _topic;
-      22              :   final String _chainId;
-      23              :   final EthereumAddress _address;
-      24              :   final String? _method;
-      25              : 
-      26            0 :   @override
-      27            0 :   EthereumAddress get address => _address;
-      28              : 
-      29            0 :   @override
-      30              :   Future<String> sendTransaction(Transaction transaction) async {
-      31            0 :     final result = await _sendTransaction(transaction);
-      32            0 :     if (result is Map) {
-      33            0 :       return jsonEncode(result);
-      34              :     }
-      35            0 :     return result.toString();
-      36              :   }
-      37              : 
-      38            0 :   Future<dynamic> _sendTransaction(Transaction transaction) async {
-      39            0 :     final sessionRequestParams = SessionRequestParams(
-      40            0 :       method: _method ?? MethodsConstants.ethSendTransaction,
-      41            0 :       params: [
-      42            0 :         transaction.toJson(),
-      43              :       ],
-      44              :     );
-      45              : 
-      46            0 :     final result = await _signEngine.request(
-      47            0 :       topic: _topic,
-      48            0 :       chainId: _chainId,
-      49              :       request: sessionRequestParams,
-      50              :     );
-      51              :     return result;
-      52              :   }
-      53              : 
-      54            0 :   @override
-      55            0 :   Future<EthereumAddress> extractAddress() => Future.value(_address);
-      56              : 
-      57            0 :   @override
-      58              :   Future<crypto.MsgSignature> signToSignature(
-      59              :     Uint8List payload, {
-      60              :     int? chainId,
-      61              :     bool isEIP1559 = false,
-      62              :   }) {
-      63            0 :     final signature = signToEcSignature(
-      64              :       payload,
-      65              :       chainId: chainId,
-      66              :       isEIP1559: isEIP1559,
-      67              :     );
-      68            0 :     return Future.value(signature);
-      69              :   }
-      70              : 
-      71            0 :   @override
-      72              :   crypto.MsgSignature signToEcSignature(
-      73              :     Uint8List payload, {
-      74              :     int? chainId,
-      75              :     bool isEIP1559 = false,
-      76              :   }) {
-      77              :     // TODO: implement signToEcSignature
-      78            0 :     throw UnimplementedError();
-      79              :   }
-      80              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/index-sort-f.html b/coverage/html/sign_api/utils/index-sort-f.html deleted file mode 100644 index a9e826ab..00000000 --- a/coverage/html/sign_api/utils/index-sort-f.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
custom_credentials.dart -
0.0%
-
0.0 %23-
sign_api_validator_utils.dart -
100.0%
-
100.0 %9696-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/index-sort-l.html b/coverage/html/sign_api/utils/index-sort-l.html deleted file mode 100644 index 6943d71d..00000000 --- a/coverage/html/sign_api/utils/index-sort-l.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
custom_credentials.dart -
0.0%
-
0.0 %23
sign_api_validator_utils.dart -
100.0%
-
100.0 %9696
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/index.html b/coverage/html/sign_api/utils/index.html deleted file mode 100644 index b11ed9f3..00000000 --- a/coverage/html/sign_api/utils/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utilsCoverageTotalHit
Test:lcov.infoLines:80.7 %11996
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
custom_credentials.dart -
0.0%
-
0.0 %23
sign_api_validator_utils.dart -
100.0%
-
100.0 %9696
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html deleted file mode 100644 index 9b4a7023..00000000 --- a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - sign_api_validator_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html deleted file mode 100644 index 82c1a14c..00000000 --- a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - sign_api_validator_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html b/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html deleted file mode 100644 index a53abd39..00000000 --- a/coverage/html/sign_api/utils/sign_api_validator_utils.dart.gcov.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - LCOV - lcov.info - sign_api/utils/sign_api_validator_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - sign_api/utils - sign_api_validator_utils.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %9696
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/utils/namespace_utils.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/utils/errors.dart';
-       5              : 
-       6              : class SignApiValidatorUtils {
-       7            6 :   static bool isContainedIn({
-       8              :     required List<dynamic> container,
-       9              :     required List<dynamic> contained,
-      10              :   }) {
-      11              :     List<dynamic> matches = contained
-      12            6 :         .where(
-      13           12 :           (x) => container.contains(x),
-      14              :         )
-      15            6 :         .toList();
-      16           18 :     return matches.length == contained.length;
-      17              :   }
-      18              : 
-      19              :   /// This function will throw an error if
-      20              :   /// 1. the nsOrChainId parameter is a chainId, and the chains param exists
-      21              :   /// 2. The list of chains contains an invalid chainId
-      22            5 :   static bool isValidChains({
-      23              :     required String nsOrChainId,
-      24              :     List<String>? chains,
-      25              :     required String context,
-      26              :   }) {
-      27              :     // If the key is a valid chain Id, then the chains should be empty
-      28            5 :     final bool isChainId = NamespaceUtils.isValidChainId(nsOrChainId);
-      29              :     if (isChainId) {
-      30            4 :       if (chains != null && chains.isNotEmpty) {
-      31            4 :         throw Errors.getSdkError(
-      32              :           Errors.UNSUPPORTED_CHAINS,
-      33            4 :           context: '$context, namespace is a chainId, but chains is not empty',
-      34              :         );
-      35              :       }
-      36              :     } else {
-      37           10 :       for (String c in chains!) {
-      38            5 :         if (!NamespaceUtils.isValidChainId(c)) {
-      39            1 :           throw Errors.getSdkError(
-      40              :             Errors.UNSUPPORTED_CHAINS,
-      41              :             context:
-      42            1 :                 '$context, chain $c should conform to "namespace:chainId" format',
-      43              :           );
-      44              :         }
-      45              :       }
-      46              :     }
-      47              : 
-      48              :     return true;
-      49              :   }
-      50              : 
-      51              :   /// Validates the data of the Required Namespaces, ensuring it conforms to CAIP-25
-      52            5 :   static bool isValidRequiredNamespaces({
-      53              :     required Map<String, RequiredNamespace> requiredNamespaces,
-      54              :     required String context,
-      55              :   }) {
-      56           10 :     requiredNamespaces.forEach((key, namespace) {
-      57            5 :       isValidChains(
-      58              :         nsOrChainId: key,
-      59            5 :         chains: namespace.chains,
-      60            5 :         context: '$context requiredNamespace',
-      61              :       );
-      62              :     });
-      63              : 
-      64              :     return true;
-      65              :   }
-      66              : 
-      67              :   /// Loops through each account, and validates it
-      68              :   /// Context is used to provide more information in the error message
-      69            5 :   static bool isValidAccounts({
-      70              :     required List<String> accounts,
-      71              :     required String context,
-      72              :   }) {
-      73           10 :     for (String account in accounts) {
-      74            5 :       if (!NamespaceUtils.isValidAccount(account)) {
-      75            4 :         throw Errors.getSdkError(
-      76              :           Errors.UNSUPPORTED_ACCOUNTS,
-      77              :           context:
-      78            4 :               '$context, account $account should conform to "namespace:chainId:address" format',
-      79              :         );
-      80              :       }
-      81              :     }
-      82              : 
-      83              :     return true;
-      84              :   }
-      85              : 
-      86              :   /// Validates the data of the Namespaces, ensuring it conforms to CAIP-25
-      87            5 :   static bool isValidNamespaces({
-      88              :     required Map<String, Namespace> namespaces,
-      89              :     required String context,
-      90              :   }) {
-      91           10 :     namespaces.forEach((key, namespace) {
-      92            5 :       isValidAccounts(
-      93            5 :         accounts: namespace.accounts,
-      94            5 :         context: '$context namespace',
-      95              :       );
-      96              :     });
-      97              : 
-      98              :     return true;
-      99              :   }
-     100              : 
-     101              :   /// Validates the provided chainId, then ensures that the chainId is contained
-     102              :   /// in the namespaces
-     103            4 :   static bool isValidNamespacesChainId({
-     104              :     required Map<String, Namespace> namespaces,
-     105              :     required String chainId,
-     106              :   }) {
-     107              :     // Validate the chainId
-     108            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
-     109            1 :       throw Errors.getSdkError(
-     110              :         Errors.UNSUPPORTED_CHAINS,
-     111            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
-     112              :       );
-     113              :     }
-     114              : 
-     115              :     // Validate the namespaces
-     116            4 :     isValidNamespaces(
-     117              :       namespaces: namespaces,
-     118              :       context: 'isValidNamespacesChainId',
-     119              :     );
-     120              : 
-     121              :     // Get the chains from the namespaces and
-     122            4 :     List<String> chains = NamespaceUtils.getChainIdsFromNamespaces(
-     123              :       namespaces: namespaces,
-     124              :     );
-     125              : 
-     126            4 :     if (!chains.contains(chainId)) {
-     127            4 :       throw Errors.getSdkError(
-     128              :         Errors.UNSUPPORTED_CHAINS,
-     129            4 :         context: 'The chain $chainId is not supported',
-     130              :       );
-     131              :     }
-     132              : 
-     133              :     return true;
-     134              :   }
-     135              : 
-     136              :   /// Validates the provided chainId, then gets the methods for that chainId
-     137              :   /// and ensures that the method request is contained in the methods
-     138            4 :   static bool isValidNamespacesRequest({
-     139              :     required Map<String, Namespace> namespaces,
-     140              :     required String chainId,
-     141              :     required String method,
-     142              :   }) {
-     143              :     // Validate the chainId
-     144            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
-     145            1 :       throw Errors.getSdkError(
-     146              :         Errors.UNSUPPORTED_CHAINS,
-     147            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
-     148              :       );
-     149              :     }
-     150              : 
-     151              :     // Validate the namespaces
-     152            4 :     isValidNamespaces(
-     153              :       namespaces: namespaces,
-     154              :       context: 'isValidNamespacesRequest',
-     155              :     );
-     156              : 
-     157            4 :     List<dynamic> methods = NamespaceUtils.getNamespacesMethodsForChainId(
-     158              :       namespaces: namespaces,
-     159              :       chainId: chainId,
-     160              :     );
-     161              : 
-     162            4 :     if (!methods.contains(method)) {
-     163            4 :       throw Errors.getSdkError(
-     164              :         Errors.UNSUPPORTED_METHODS,
-     165            4 :         context: 'The method $method is not supported',
-     166              :       );
-     167              :     }
-     168              : 
-     169              :     return true;
-     170              :   }
-     171              : 
-     172              :   /// Validates the provided chainId, then gets the events for that chainId
-     173              :   /// and ensures that the event request is contained in the events
-     174            4 :   static bool isValidNamespacesEvent({
-     175              :     required Map<String, Namespace> namespaces,
-     176              :     required String chainId,
-     177              :     required String eventName,
-     178              :   }) {
-     179              :     // Validate the chainId
-     180            4 :     if (!NamespaceUtils.isValidChainId(chainId)) {
-     181            1 :       throw Errors.getSdkError(
-     182              :         Errors.UNSUPPORTED_CHAINS,
-     183            1 :         context: 'chain $chainId should conform to "namespace:chainId" format',
-     184              :       );
-     185              :     }
-     186              : 
-     187              :     // Validate the namespaces
-     188            4 :     isValidNamespaces(
-     189              :       namespaces: namespaces,
-     190              :       context: 'isValidNamespacesEvent',
-     191              :     );
-     192              : 
-     193            4 :     List<dynamic> events = NamespaceUtils.getNamespacesEventsForChain(
-     194              :       namespaces: namespaces,
-     195              :       chainId: chainId,
-     196              :     );
-     197              : 
-     198            4 :     if (!events.contains(eventName)) {
-     199            4 :       throw Errors.getSdkError(
-     200              :         Errors.UNSUPPORTED_EVENTS,
-     201            4 :         context: 'The event $eventName is not supported',
-     202              :       );
-     203              :     }
-     204              : 
-     205              :     return true;
-     206              :   }
-     207              : 
-     208              :   /// Makes sure that the chains, methods and events of the required namespaces
-     209              :   /// are contained in the namespaces
-     210            6 :   static bool isConformingNamespaces({
-     211              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     212              :     required Map<String, Namespace> namespaces,
-     213              :     required String context,
-     214              :   }) {
-     215           12 :     List<String> requiredNamespaceKeys = requiredNamespaces.keys.toList();
-     216           12 :     List<String> namespaceKeys = namespaces.keys.toList();
-     217              : 
-     218              :     // If the namespaces doesn't have the correct keys, we can fail automatically
-     219            6 :     if (!isContainedIn(
-     220              :         container: namespaceKeys, contained: requiredNamespaceKeys)) {
-     221            4 :       throw Errors.getSdkError(
-     222              :         Errors.UNSUPPORTED_NAMESPACE_KEY,
-     223            4 :         context: "$context namespaces keys don't satisfy requiredNamespaces",
-     224              :       );
-     225              :     } else {
-     226           12 :       for (var key in requiredNamespaceKeys) {
-     227              :         List<String> requiredNamespaceChains =
-     228            6 :             NamespaceUtils.getChainsFromRequiredNamespace(
-     229              :           nsOrChainId: key,
-     230            6 :           requiredNamespace: requiredNamespaces[key]!,
-     231              :         );
-     232            6 :         List<String> namespaceChains = NamespaceUtils.getChainIdsFromNamespace(
-     233              :           nsOrChainId: key,
-     234            6 :           namespace: namespaces[key]!,
-     235              :         );
-     236              : 
-     237              :         // Check the chains, methods and events for overlaps.
-     238              :         // If any of them don't have it, we fail.
-     239            6 :         final bool chainsOverlap = isContainedIn(
-     240              :           container: namespaceChains,
-     241              :           contained: requiredNamespaceChains,
-     242              :         );
-     243            6 :         final bool methodsOverlap = isContainedIn(
-     244           12 :           container: namespaces[key]!.methods,
-     245           12 :           contained: requiredNamespaces[key]!.methods,
-     246              :         );
-     247            6 :         final bool eventsOverlap = isContainedIn(
-     248           12 :           container: namespaces[key]!.events,
-     249           12 :           contained: requiredNamespaces[key]!.events,
-     250              :         );
-     251              : 
-     252              :         if (!chainsOverlap) {
-     253            5 :           throw Errors.getSdkError(
-     254              :             Errors.UNSUPPORTED_CHAINS,
-     255              :             context:
-     256            5 :                 "$context namespaces chains don't satisfy requiredNamespaces chains for $key. Requested: $requiredNamespaceChains, Supported: $namespaceChains",
-     257              :           );
-     258              :         } else if (!methodsOverlap) {
-     259            2 :           throw Errors.getSdkError(
-     260              :             Errors.UNSUPPORTED_METHODS,
-     261              :             context:
-     262           10 :                 "$context namespaces methods don't satisfy requiredNamespaces methods for $key. Requested: ${requiredNamespaces[key]!.methods}, Supported: ${namespaces[key]!.methods}",
-     263              :           );
-     264              :         } else if (!eventsOverlap) {
-     265            2 :           throw Errors.getSdkError(
-     266              :             Errors.UNSUPPORTED_EVENTS,
-     267              :             context:
-     268           10 :                 "$context namespaces events don't satisfy requiredNamespaces events for $key. Requested: ${requiredNamespaces[key]!.events}, Supported: ${namespaces[key]!.events}",
-     269              :           );
-     270              :         }
-     271              :       }
-     272              :     }
-     273              : 
-     274              :     return true;
-     275              :   }
-     276              : 
-     277            4 :   static bool isSessionCompatible({
-     278              :     required SessionData session,
-     279              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     280              :   }) {
-     281           12 :     List<String> sessionKeys = session.namespaces.keys.toList();
-     282            8 :     List<String> paramsKeys = requiredNamespaces.keys.toList();
-     283              :     bool compatible = true;
-     284              : 
-     285            4 :     if (!isContainedIn(container: sessionKeys, contained: paramsKeys)) {
-     286              :       return false;
-     287              :     }
-     288              : 
-     289            8 :     for (var key in sessionKeys) {
-     290            8 :       Namespace namespace = session.namespaces[key]!;
-     291            4 :       RequiredNamespace requiredNamespace = requiredNamespaces[key]!;
-     292              :       List<String> requiredNamespaceChains =
-     293            4 :           NamespaceUtils.getChainsFromRequiredNamespace(
-     294              :         nsOrChainId: key,
-     295              :         requiredNamespace: requiredNamespace,
-     296              :       );
-     297            4 :       List<String> namespaceChains = NamespaceUtils.getChainIdsFromNamespace(
-     298              :         nsOrChainId: key,
-     299              :         namespace: namespace,
-     300              :       );
-     301              : 
-     302              :       // Check the chains, methods and events for overlaps.
-     303              :       // If any of them don't have it, we fail.
-     304            4 :       final bool chainsOverlap = isContainedIn(
-     305              :         container: namespaceChains,
-     306              :         contained: requiredNamespaceChains,
-     307              :       );
-     308            4 :       final bool methodsOverlap = isContainedIn(
-     309            4 :         container: namespace.methods,
-     310            8 :         contained: requiredNamespaces[key]!.methods,
-     311              :       );
-     312            4 :       final bool eventsOverlap = isContainedIn(
-     313            4 :         container: namespace.events,
-     314            8 :         contained: requiredNamespaces[key]!.events,
-     315              :       );
-     316              : 
-     317              :       if (!chainsOverlap || !methodsOverlap || !eventsOverlap) {
-     318              :         compatible = false;
-     319              :       }
-     320              :     }
-     321              : 
-     322              :     return compatible;
-     323              :   }
-     324              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/snow.png b/coverage/html/snow.png deleted file mode 100644 index 2cdae107fceec6e7f02ac7acb4a34a82a540caa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< diff --git a/coverage/html/updown.png b/coverage/html/updown.png deleted file mode 100644 index aa56a238b3e6c435265250f9266cd1b8caba0f20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ diff --git a/coverage/html/utils/errors.dart.func-c.html b/coverage/html/utils/errors.dart.func-c.html deleted file mode 100644 index d443337b..00000000 --- a/coverage/html/utils/errors.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/errors.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - errors.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/errors.dart.func.html b/coverage/html/utils/errors.dart.func.html deleted file mode 100644 index a063dfc4..00000000 --- a/coverage/html/utils/errors.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/errors.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - errors.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/errors.dart.gcov.html b/coverage/html/utils/errors.dart.gcov.html deleted file mode 100644 index 147acfa7..00000000 --- a/coverage/html/utils/errors.dart.gcov.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/errors.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - errors.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %1414
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart';
-       2              : 
-       3              : class Errors {
-       4              :   static const INVALID_METHOD = 'INVALID_METHOD';
-       5              :   static const INVALID_EVENT = 'INVALID_EVENT';
-       6              :   static const INVALID_UPDATE_REQUEST = 'INVALID_UPDATE_REQUEST';
-       7              :   static const INVALID_EXTEND_REQUEST = 'INVALID_EXTEND_REQUEST';
-       8              :   static const INVALID_SESSION_SETTLE_REQUEST =
-       9              :       'INVALID_SESSION_SETTLE_REQUEST';
-      10              :   static const UNAUTHORIZED_METHOD = 'UNAUTHORIZED_METHOD';
-      11              :   static const UNAUTHORIZED_EVENT = 'UNAUTHORIZED_EVENT';
-      12              :   static const UNAUTHORIZED_UPDATE_REQUEST = 'UNAUTHORIZED_UPDATE_REQUEST';
-      13              :   static const UNAUTHORIZED_EXTEND_REQUEST = 'UNAUTHORIZED_EXTEND_REQUEST';
-      14              :   static const USER_REJECTED_SIGN = 'USER_REJECTED_SIGN';
-      15              :   static const USER_REJECTED = 'USER_REJECTED';
-      16              :   static const USER_REJECTED_CHAINS = 'USER_REJECTED_CHAINS';
-      17              :   static const USER_REJECTED_METHODS = 'USER_REJECTED_METHODS';
-      18              :   static const USER_REJECTED_EVENTS = 'USER_REJECTED_EVENTS';
-      19              :   static const UNSUPPORTED_CHAINS = 'UNSUPPORTED_CHAINS';
-      20              :   static const UNSUPPORTED_METHODS = 'UNSUPPORTED_METHODS';
-      21              :   static const UNSUPPORTED_EVENTS = 'UNSUPPORTED_EVENTS';
-      22              :   static const UNSUPPORTED_ACCOUNTS = 'UNSUPPORTED_ACCOUNTS';
-      23              :   static const UNSUPPORTED_NAMESPACE_KEY = 'UNSUPPORTED_NAMESPACE_KEY';
-      24              :   static const USER_DISCONNECTED = 'USER_DISCONNECTED';
-      25              :   static const SESSION_SETTLEMENT_FAILED = 'SESSION_SETTLEMENT_FAILED';
-      26              :   static const NO_SESSION_FOR_TOPIC = 'NO_SESSION_FOR_TOPIC';
-      27              :   static const REQUEST_EXPIRED_SESSION = 'SESSION_REQUEST_EXPIRED';
-      28              :   static const WC_METHOD_UNSUPPORTED = 'WC_METHOD_UNSUPPORTED';
-      29              : 
-      30              :   // AUTH
-      31              :   static const MALFORMED_RESPONSE_PARAMS = 'MALFORMED_RESPONSE_PARAMS';
-      32              :   static const MALFORMED_REQUEST_PARAMS = 'MALFORMED_REQUEST_PARAMS';
-      33              :   static const MESSAGE_COMPROMISED = 'MESSAGE_COMPROMISED';
-      34              :   static const SIGNATURE_VERIFICATION_FAILED = 'SIGNATURE_VERIFICATION_FAILED';
-      35              :   static const REQUEST_EXPIRED_AUTH = 'AUTH_REQUEST_EXPIRED';
-      36              :   static const MISSING_ISSUER_AUTH = 'AUTH_MISSING_ISSUER';
-      37              :   static const USER_REJECTED_AUTH = 'AUTH_USER_REJECTED';
-      38              :   static const USER_DISCONNECTED_AUTH = 'AUTH_USER_DISCONNECTED';
-      39              : 
-      40              :   static const SDK_ERRORS = {
-      41              :     /* ----- INVALID (1xxx) ----- */
-      42              :     INVALID_METHOD: {
-      43              :       'message': 'Invalid method.',
-      44              :       'code': 1001,
-      45              :     },
-      46              :     INVALID_EVENT: {
-      47              :       'message': 'Invalid event.',
-      48              :       'code': 1002,
-      49              :     },
-      50              :     INVALID_UPDATE_REQUEST: {
-      51              :       'message': 'Invalid update request.',
-      52              :       'code': 1003,
-      53              :     },
-      54              :     INVALID_EXTEND_REQUEST: {
-      55              :       'message': 'Invalid extend request.',
-      56              :       'code': 1004,
-      57              :     },
-      58              :     INVALID_SESSION_SETTLE_REQUEST: {
-      59              :       'message': 'Invalid session settle request.',
-      60              :       'code': 1005,
-      61              :     },
-      62              :     /* ----- UNAUTHORIZED (3xxx) ----- */
-      63              :     UNAUTHORIZED_METHOD: {
-      64              :       'message': 'Unauthorized method.',
-      65              :       'code': 3001,
-      66              :     },
-      67              :     UNAUTHORIZED_EVENT: {
-      68              :       'message': 'Unauthorized event.',
-      69              :       'code': 3002,
-      70              :     },
-      71              :     UNAUTHORIZED_UPDATE_REQUEST: {
-      72              :       'message': 'Unauthorized update request.',
-      73              :       'code': 3003,
-      74              :     },
-      75              :     UNAUTHORIZED_EXTEND_REQUEST: {
-      76              :       'message': 'Unauthorized extend request.',
-      77              :       'code': 3004,
-      78              :     },
-      79              :     /* ----- REJECTED (5xxx) ----- */
-      80              :     USER_REJECTED_SIGN: {
-      81              :       'message': 'User rejected.',
-      82              :       'code': 4001,
-      83              :     },
-      84              :     /* ----- REJECTED (5xxx) ----- */
-      85              :     USER_REJECTED: {
-      86              :       'message': 'User rejected.',
-      87              :       'code': 5000,
-      88              :     },
-      89              :     USER_REJECTED_CHAINS: {
-      90              :       'message': 'User rejected chains.',
-      91              :       'code': 5001,
-      92              :     },
-      93              :     USER_REJECTED_METHODS: {
-      94              :       'message': 'User rejected methods.',
-      95              :       'code': 5002,
-      96              :     },
-      97              :     USER_REJECTED_EVENTS: {
-      98              :       'message': 'User rejected events.',
-      99              :       'code': 5003,
-     100              :     },
-     101              :     UNSUPPORTED_CHAINS: {
-     102              :       'message': 'Unsupported chains.',
-     103              :       'code': 5100,
-     104              :     },
-     105              :     UNSUPPORTED_METHODS: {
-     106              :       'message': 'Unsupported methods.',
-     107              :       'code': 5101,
-     108              :     },
-     109              :     UNSUPPORTED_EVENTS: {
-     110              :       'message': 'Unsupported events.',
-     111              :       'code': 5102,
-     112              :     },
-     113              :     UNSUPPORTED_ACCOUNTS: {
-     114              :       'message': 'Unsupported accounts.',
-     115              :       'code': 5103,
-     116              :     },
-     117              :     UNSUPPORTED_NAMESPACE_KEY: {
-     118              :       'message': 'Unsupported namespace key.',
-     119              :       'code': 5104,
-     120              :     },
-     121              :     /* ----- REASON (6xxx) ----- */
-     122              :     USER_DISCONNECTED: {
-     123              :       'message': 'User disconnected.',
-     124              :       'code': 6000,
-     125              :     },
-     126              :     /* ----- FAILURE (7xxx) ----- */
-     127              :     SESSION_SETTLEMENT_FAILED: {
-     128              :       'message': 'Session settlement failed.',
-     129              :       'code': 7000,
-     130              :     },
-     131              :     NO_SESSION_FOR_TOPIC: {
-     132              :       'message': 'No session for topic.',
-     133              :       'code': 7001,
-     134              :     },
-     135              :     /* ----- FAILURE (8xxx) ----- */
-     136              :     REQUEST_EXPIRED_SESSION: {
-     137              :       'message': 'Session request expired.',
-     138              :       'code': 8000,
-     139              :     },
-     140              :     /* ----- PAIRING (10xxx) ----- */
-     141              :     WC_METHOD_UNSUPPORTED: {
-     142              :       'message': 'Unsupported wc_ method.',
-     143              :       'code': 10001,
-     144              :     },
-     145              :     /* ----- AUTH VALIDATION (11xxx) ----- */
-     146              :     MALFORMED_RESPONSE_PARAMS: {
-     147              :       'message': 'Malformed response parameters.',
-     148              :       'code': 11001,
-     149              :     },
-     150              :     MALFORMED_REQUEST_PARAMS: {
-     151              :       'message': 'Malformed request parameters.',
-     152              :       'code': 11002,
-     153              :     },
-     154              :     MESSAGE_COMPROMISED: {
-     155              :       'message': 'Message compromised.',
-     156              :       'code': 11003,
-     157              :     },
-     158              :     SIGNATURE_VERIFICATION_FAILED: {
-     159              :       'message': 'Signature verification failed.',
-     160              :       'code': 11004,
-     161              :     },
-     162              :     REQUEST_EXPIRED_AUTH: {
-     163              :       'message': 'Auth request expired.',
-     164              :       'code': 11005,
-     165              :     },
-     166              :     MISSING_ISSUER_AUTH: {
-     167              :       'message': 'Missing Issuer.',
-     168              :       'code': 11006,
-     169              :     },
-     170              :     /* ----- AUTH REJECTED (12xxx) ----- */
-     171              :     USER_REJECTED_AUTH: {
-     172              :       'message': 'User rejected auth request.',
-     173              :       'code': 12001,
-     174              :     },
-     175              :     USER_DISCONNECTED_AUTH: {
-     176              :       'message': 'User disconnect auth.',
-     177              :       'code': 12002,
-     178              :     },
-     179              :   };
-     180              : 
-     181              :   static const NOT_INITIALIZED = 'NOT_INITIALIZED';
-     182              :   static const NO_MATCHING_KEY = 'NO_MATCHING_KEY';
-     183              :   static const RESTORE_WILL_OVERRIDE = 'RESTORE_WILL_OVERRIDE';
-     184              :   static const RESUBSCRIBED = 'RESUBSCRIBED';
-     185              :   static const MISSING_OR_INVALID = 'MISSING_OR_INVALID';
-     186              :   static const EXPIRED = 'EXPIRED';
-     187              :   static const UNKNOWN_TYPE = 'UNKNOWN_TYPE';
-     188              :   static const MISMATCHED_TOPIC = 'MISMATCHED_TOPIC';
-     189              :   static const NON_CONFORMING_NAMESPACES = 'NON_CONFORMING_NAMESPACES';
-     190              : 
-     191              :   static const INTERNAL_ERRORS = {
-     192              :     NOT_INITIALIZED: {
-     193              :       'message': 'Not initialized.',
-     194              :       'code': 1,
-     195              :     },
-     196              :     NO_MATCHING_KEY: {
-     197              :       'message': 'No matching key.',
-     198              :       'code': 2,
-     199              :     },
-     200              :     RESTORE_WILL_OVERRIDE: {
-     201              :       'message': 'Restore will override.',
-     202              :       'code': 3,
-     203              :     },
-     204              :     RESUBSCRIBED: {
-     205              :       'message': 'Resubscribed.',
-     206              :       'code': 4,
-     207              :     },
-     208              :     MISSING_OR_INVALID: {
-     209              :       'message': 'Missing or invalid.',
-     210              :       'code': 5,
-     211              :     },
-     212              :     EXPIRED: {
-     213              :       'message': 'Expired.',
-     214              :       'code': 6,
-     215              :     },
-     216              :     UNKNOWN_TYPE: {
-     217              :       'message': 'Unknown type.',
-     218              :       'code': 7,
-     219              :     },
-     220              :     MISMATCHED_TOPIC: {
-     221              :       'message': 'Mismatched topic.',
-     222              :       'code': 8,
-     223              :     },
-     224              :     NON_CONFORMING_NAMESPACES: {
-     225              :       'message': 'Non conforming namespaces.',
-     226              :       'code': 9,
-     227              :     },
-     228              :   };
-     229              : 
-     230            7 :   static WalletConnectError getInternalError(
-     231              :     String key, {
-     232              :     String context = '',
-     233              :   }) {
-     234            7 :     if (INTERNAL_ERRORS.containsKey(key)) {
-     235            7 :       return WalletConnectError(
-     236           14 :         code: INTERNAL_ERRORS[key]!['code']! as int,
-     237            7 :         message: context != ''
-     238           12 :             ? "${INTERNAL_ERRORS[key]!['message']! as String} $context"
-     239            8 :             : INTERNAL_ERRORS[key]!['message']! as String,
-     240              :       );
-     241              :     }
-     242              :     return const WalletConnectError(
-     243              :         code: -1, message: 'UNKNOWN INTERNAL ERROR');
-     244              :   }
-     245              : 
-     246            6 :   static WalletConnectError getSdkError(
-     247              :     String key, {
-     248              :     String context = '',
-     249              :   }) {
-     250            6 :     if (SDK_ERRORS.containsKey(key)) {
-     251            6 :       return WalletConnectError(
-     252           12 :         code: SDK_ERRORS[key]!['code']! as int,
-     253            6 :         message: context != ''
-     254           12 :             ? "${SDK_ERRORS[key]!['message']! as String} $context"
-     255           14 :             : SDK_ERRORS[key]!['message']! as String,
-     256              :       );
-     257              :     }
-     258              :     return const WalletConnectError(code: -1, message: 'UNKNOWN SDK ERROR');
-     259              :   }
-     260              : }
-     261              : 
-     262              : class WebSocketErrors {
-     263              :   static const int PROJECT_ID_NOT_FOUND = 401;
-     264              :   static const int INVALID_PROJECT_ID = 403;
-     265              :   static const int TOO_MANY_REQUESTS = 1013;
-     266              :   static const String INVALID_PROJECT_ID_OR_JWT =
-     267              :       'Invalid project ID or JWT Token';
-     268              :   static const String INVALID_PROJECT_ID_MESSAGE =
-     269              :       'Invalid project id. Please check your project id.';
-     270              :   static const String PROJECT_ID_NOT_FOUND_MESSAGE = 'Project id not found.';
-     271              :   static const String TOO_MANY_REQUESTS_MESSAGE =
-     272              :       'Too many requests. Please try again later.';
-     273              : 
-     274              :   static const int SERVER_TERMINATING = 1001;
-     275              :   static const int CLIENT_STALE = 4008;
-     276              :   static const int LOAD_REBALANCING = 4010;
-     277              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/extensions.dart.func-c.html b/coverage/html/utils/extensions.dart.func-c.html deleted file mode 100644 index be64b2eb..00000000 --- a/coverage/html/utils/extensions.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/extensions.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - extensions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/extensions.dart.func.html b/coverage/html/utils/extensions.dart.func.html deleted file mode 100644 index 9d6d0e10..00000000 --- a/coverage/html/utils/extensions.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/extensions.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - extensions.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/extensions.dart.gcov.html b/coverage/html/utils/extensions.dart.gcov.html deleted file mode 100644 index 2eb02495..00000000 --- a/coverage/html/utils/extensions.dart.gcov.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/extensions.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - extensions.dartCoverageTotalHit
Test:lcov.infoLines:0.0 %400
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:typed_data';
-       2              : 
-       3              : import 'package:convert/convert.dart';
-       4              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       5              : import 'package:web3dart/crypto.dart' as crypto;
-       6              : 
-       7              : extension TransactionExtension on Transaction {
-       8            0 :   Map<String, dynamic> toJson() {
-       9            0 :     return {
-      10            0 :       if (from != null) 'from': from!.hex,
-      11            0 :       if (to != null) 'to': to!.hex,
-      12            0 :       if (maxGas != null) 'gas': '0x${maxGas!.toRadixString(16)}',
-      13            0 :       if (gasPrice != null)
-      14            0 :         'gasPrice': '0x${gasPrice!.getInWei.toRadixString(16)}',
-      15            0 :       if (value != null) 'value': '0x${value!.getInWei.toRadixString(16)}',
-      16            0 :       if (data != null) 'data': crypto.bytesToHex(data!),
-      17            0 :       if (nonce != null) 'nonce': nonce,
-      18            0 :       if (maxFeePerGas != null)
-      19            0 :         'maxFeePerGas': '0x${maxFeePerGas!.getInWei.toRadixString(16)}',
-      20            0 :       if (maxPriorityFeePerGas != null)
-      21            0 :         'maxPriorityFeePerGas':
-      22            0 :             '0x${maxPriorityFeePerGas!.getInWei.toRadixString(16)}',
-      23              :     };
-      24              :   }
-      25              : }
-      26              : 
-      27              : extension TransactionExtension2 on Map<String, dynamic> {
-      28            0 :   Transaction toTransaction() {
-      29            0 :     return Transaction(
-      30            0 :       from: EthereumAddress.fromHex(this['from']),
-      31            0 :       to: EthereumAddress.fromHex(this['to']),
-      32            0 :       value: (this['value'] as String?).toEthereAmount(),
-      33            0 :       gasPrice: (this['gasPrice'] as String?).toEthereAmount(),
-      34            0 :       maxFeePerGas: (this['maxFeePerGas'] as String?).toEthereAmount(),
-      35              :       maxPriorityFeePerGas:
-      36            0 :           (this['maxPriorityFeePerGas'] as String?).toEthereAmount(),
-      37            0 :       maxGas: (this['maxGas'] as String?).toIntFromHex(),
-      38            0 :       nonce: this['nonce']?.toInt(),
-      39            0 :       data: _parseTransactionData(this['data']),
-      40              :     );
-      41              :   }
-      42              : }
-      43              : 
-      44            0 : Uint8List? _parseTransactionData(dynamic data) {
-      45            0 :   if (data != null && data != '0x') {
-      46            0 :     if (data.startsWith('0x')) {
-      47            0 :       return Uint8List.fromList(hex.decode(data.substring(2)));
-      48              :     }
-      49            0 :     return Uint8List.fromList(hex.decode(data));
-      50              :   }
-      51              :   return null;
-      52              : }
-      53              : 
-      54              : extension EtheraAmountExtension on String? {
-      55            0 :   EtherAmount? toEthereAmount() {
-      56              :     if (this != null) {
-      57            0 :       final hexValue = this!.replaceFirst('0x', '');
-      58            0 :       return EtherAmount.fromBigInt(
-      59              :         EtherUnit.wei,
-      60            0 :         BigInt.from(int.parse(hexValue, radix: 16)),
-      61              :       );
-      62              :     }
-      63              :     return null;
-      64              :   }
-      65              : 
-      66            0 :   int? toIntFromHex() {
-      67              :     if (this != null) {
-      68            0 :       final hexValue = this!.replaceFirst('0x', '');
-      69            0 :       return int.parse(hexValue, radix: 16);
-      70              :     }
-      71              :     return null;
-      72              :   }
-      73              : 
-      74            0 :   int? toInt() {
-      75              :     if (this != null) {
-      76            0 :       return int.tryParse(this!);
-      77              :     }
-      78              :     return null;
-      79              :   }
-      80              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/index-sort-f.html b/coverage/html/utils/index-sort-f.html deleted file mode 100644 index 1185ae09..00000000 --- a/coverage/html/utils/index-sort-f.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
errors.dart -
100.0%
-
100.0 %1414-
extensions.dart -
0.0%
-
0.0 %40-
log_level.dart -
100.0%
-
100.0 %77-
namespace_utils.dart -
76.2%76.2%
-
76.2 %168128-
walletconnect_utils.dart -
86.7%86.7%
-
86.7 %9078-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/index-sort-l.html b/coverage/html/utils/index-sort-l.html deleted file mode 100644 index 1bd04649..00000000 --- a/coverage/html/utils/index-sort-l.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
extensions.dart -
0.0%
-
0.0 %40
namespace_utils.dart -
76.2%76.2%
-
76.2 %168128
walletconnect_utils.dart -
86.7%86.7%
-
86.7 %9078
log_level.dart -
100.0%
-
100.0 %77
errors.dart -
100.0%
-
100.0 %1414
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/index.html b/coverage/html/utils/index.html deleted file mode 100644 index a7edd2ee..00000000 --- a/coverage/html/utils/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsCoverageTotalHit
Test:lcov.infoLines:71.2 %319227
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
errors.dart -
100.0%
-
100.0 %1414
extensions.dart -
0.0%
-
0.0 %40
log_level.dart -
100.0%
-
100.0 %77
namespace_utils.dart -
76.2%76.2%
-
76.2 %168128
walletconnect_utils.dart -
86.7%86.7%
-
86.7 %9078
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/log_level.dart.func-c.html b/coverage/html/utils/log_level.dart.func-c.html deleted file mode 100644 index 36dea479..00000000 --- a/coverage/html/utils/log_level.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/log_level.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - log_level.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/log_level.dart.func.html b/coverage/html/utils/log_level.dart.func.html deleted file mode 100644 index 6305a1d9..00000000 --- a/coverage/html/utils/log_level.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/log_level.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - log_level.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/log_level.dart.gcov.html b/coverage/html/utils/log_level.dart.gcov.html deleted file mode 100644 index de0219dc..00000000 --- a/coverage/html/utils/log_level.dart.gcov.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/log_level.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - log_level.dartCoverageTotalHit
Test:lcov.infoLines:100.0 %77
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:logger/logger.dart';
-       2              : 
-       3              : enum LogLevel {
-       4              :   verbose,
-       5              :   debug,
-       6              :   info,
-       7              :   warning,
-       8              :   error,
-       9              :   wtf,
-      10              :   nothing;
-      11              : 
-      12           10 :   Level toLevel() {
-      13              :     switch (this) {
-      14           10 :       case LogLevel.verbose:
-      15              :         return Level.trace;
-      16           10 :       case LogLevel.debug:
-      17              :         return Level.debug;
-      18           10 :       case LogLevel.info:
-      19              :         return Level.info;
-      20            6 :       case LogLevel.warning:
-      21              :         return Level.warning;
-      22            6 :       case LogLevel.error:
-      23              :         return Level.error;
-      24            6 :       case LogLevel.wtf:
-      25              :         return Level.fatal;
-      26              :       default:
-      27              :         return Level.off;
-      28              :     }
-      29              :   }
-      30              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/namespace_utils.dart.func-c.html b/coverage/html/utils/namespace_utils.dart.func-c.html deleted file mode 100644 index 11a15ec7..00000000 --- a/coverage/html/utils/namespace_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/namespace_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - namespace_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/namespace_utils.dart.func.html b/coverage/html/utils/namespace_utils.dart.func.html deleted file mode 100644 index 0d1b2b48..00000000 --- a/coverage/html/utils/namespace_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/namespace_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - namespace_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/namespace_utils.dart.gcov.html b/coverage/html/utils/namespace_utils.dart.gcov.html deleted file mode 100644 index 39745484..00000000 --- a/coverage/html/utils/namespace_utils.dart.gcov.html +++ /dev/null @@ -1,515 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/namespace_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - namespace_utils.dartCoverageTotalHit
Test:lcov.infoLines:76.2 %168128
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/proposal_models.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/sign_api/models/session_models.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/utils/constants.dart';
-       4              : 
-       5              : class NamespaceUtils {
-       6              :   /// Checks if the string is a chain
-       7            6 :   static bool isValidChainId(String value) {
-       8            6 :     if (value.contains(':')) {
-       9            6 :       List<String> split = value.split(':');
-      10           12 :       return split.length == 2;
-      11              :     }
-      12              :     return false;
-      13              :   }
-      14              : 
-      15              :   /// Checks if the string is an account
-      16            6 :   static bool isValidAccount(String value) {
-      17            6 :     if (value.contains(':')) {
-      18            6 :       List<String> split = value.split(':');
-      19           12 :       if (split.length == 3) {
-      20           18 :         String chainId = '${split[0]}:${split[1]}';
-      21           18 :         return split.length >= 2 && isValidChainId(chainId);
-      22              :       }
-      23              :     }
-      24              :     return false;
-      25              :   }
-      26              : 
-      27            4 :   static bool isValidUrl(String value) {
-      28              :     try {
-      29            4 :       Uri.parse(value);
-      30              :       return true;
-      31              :     } catch (e) {
-      32              :       return false;
-      33              :     }
-      34              :   }
-      35              : 
-      36            1 :   static String getAccount(String namespaceAccount) {
-      37            1 :     if (isValidAccount(namespaceAccount)) {
-      38            2 :       return namespaceAccount.split(':')[2];
-      39              :     }
-      40              :     return namespaceAccount;
-      41              :   }
-      42              : 
-      43            6 :   static String getChainFromAccount(String account) {
-      44            6 :     if (isValidAccount(account)) {
-      45            6 :       List<String> parts = account.split(':');
-      46            6 :       String namespace = parts[0];
-      47            6 :       String reference = parts[1];
-      48            6 :       return '$namespace:$reference';
-      49              :     }
-      50              :     return account;
-      51              :   }
-      52              : 
-      53              :   /// Gets all unique chains from the provided list of accounts
-      54              :   /// This function assumes that all accounts are valid
-      55            6 :   static List<String> getChainsFromAccounts(List<String> accounts) {
-      56              :     Set<String> chains = {};
-      57           12 :     for (var account in accounts) {
-      58            6 :       chains.add(
-      59            6 :         getChainFromAccount(
-      60              :           account,
-      61              :         ),
-      62              :       );
-      63              :     }
-      64              : 
-      65            6 :     return chains.toList();
-      66              :   }
-      67              : 
-      68              :   /// Gets the namespace string id from the chainId
-      69              :   /// If the chain id is not valid, then it returns the chain id
-      70            1 :   static String getNamespaceFromChain(String chainId) {
-      71            1 :     if (isValidChainId(chainId)) {
-      72            2 :       return chainId.split(':')[0];
-      73              :     }
-      74              :     return chainId;
-      75              :   }
-      76              : 
-      77              :   /// Gets all unique namespaces from the provided list of accounts
-      78              :   /// This function assumes that all accounts are valid
-      79            0 :   static Map<String, Namespace> getNamespacesFromAccounts(
-      80              :     List<String> accounts,
-      81              :   ) {
-      82            0 :     Map<String, Namespace> namespaces = {};
-      83            0 :     for (var account in accounts) {
-      84            0 :       final ns = account.split(':')[0];
-      85            0 :       final cid = account.split(':')[1];
-      86            0 :       if (namespaces[ns] == null) {
-      87            0 :         namespaces[ns] = Namespace(
-      88            0 :           accounts: [],
-      89            0 :           methods: [],
-      90            0 :           events: [],
-      91              :         );
-      92              :       }
-      93            0 :       namespaces[ns] = namespaces[ns]!.copyWith(
-      94            0 :         accounts: [
-      95            0 :           ...namespaces[ns]!.accounts,
-      96            0 :           account,
-      97              :         ],
-      98            0 :         chains: [
-      99            0 :           ...(namespaces[ns]?.chains ?? []),
-     100            0 :           '$ns:$cid',
-     101              :         ],
-     102              :       );
-     103              :     }
-     104              : 
-     105              :     return namespaces;
-     106              :   }
-     107              : 
-     108              :   /// Gets the chains from the namespace.
-     109              :   /// If the namespace is a chain, then it returns the chain.
-     110              :   /// Otherwise it gets the chains from the accounts in the namespace.
-     111            6 :   static List<String> getChainIdsFromNamespace({
-     112              :     required String nsOrChainId,
-     113              :     required Namespace namespace,
-     114              :   }) {
-     115            6 :     if (isValidChainId(nsOrChainId)) {
-     116            6 :       return [nsOrChainId];
-     117              :     }
-     118              : 
-     119           12 :     return getChainsFromAccounts(namespace.accounts);
-     120              :   }
-     121              : 
-     122              :   /// Gets the chainIds from the namespace.
-     123            5 :   static List<String> getChainIdsFromNamespaces({
-     124              :     required Map<String, Namespace> namespaces,
-     125              :   }) {
-     126              :     Set<String> chainIds = {};
-     127              : 
-     128           10 :     namespaces.forEach((String ns, Namespace namespace) {
-     129            5 :       chainIds.addAll(
-     130            5 :         getChainIdsFromNamespace(
-     131              :           nsOrChainId: ns,
-     132              :           namespace: namespace,
-     133              :         ),
-     134              :       );
-     135              :     });
-     136              : 
-     137            5 :     return chainIds.toList();
-     138              :   }
-     139              : 
-     140              :   /// Gets the methods from a namespace map for the given chain
-     141            5 :   static List<String> getNamespacesMethodsForChainId({
-     142              :     required String chainId,
-     143              :     required Map<String, Namespace> namespaces,
-     144              :   }) {
-     145            5 :     List<String> methods = [];
-     146           10 :     namespaces.forEach((String nsOrChain, Namespace namespace) {
-     147            5 :       if (nsOrChain == chainId) {
-     148            2 :         methods.addAll(namespace.methods);
-     149              :       } else {
-     150           10 :         List<String> chains = getChainsFromAccounts(namespace.accounts);
-     151            5 :         if (chains.contains(chainId)) {
-     152           10 :           methods.addAll(namespace.methods);
-     153              :         }
-     154              :       }
-     155              :     });
-     156              : 
-     157              :     return methods;
-     158              :   }
-     159              : 
-     160              :   /// Gets the optional methods from a namespace map for the given chain
-     161            0 :   static List<String> getOptionalMethodsForChainId({
-     162              :     required String chainId,
-     163              :     required Map<String, RequiredNamespace> optionalNamespaces,
-     164              :   }) {
-     165            0 :     List<String> methods = [];
-     166            0 :     optionalNamespaces.forEach((String nsOrChain, RequiredNamespace rns) {
-     167            0 :       if (nsOrChain == chainId) {
-     168            0 :         methods.addAll(rns.methods);
-     169              :       } else {
-     170            0 :         if ((rns.chains ?? []).contains('$nsOrChain:$chainId')) {
-     171            0 :           methods.addAll(rns.methods);
-     172              :         }
-     173              :       }
-     174              :     });
-     175              : 
-     176              :     return methods;
-     177              :   }
-     178              : 
-     179              :   /// Gets the methods from a namespace map for the given chain id
-     180            5 :   static List<String> getNamespacesEventsForChain({
-     181              :     required String chainId,
-     182              :     required Map<String, Namespace> namespaces,
-     183              :   }) {
-     184            5 :     List<String> events = [];
-     185           10 :     namespaces.forEach((String nsOrChain, Namespace namespace) {
-     186            5 :       if (nsOrChain == chainId) {
-     187            2 :         events.addAll(namespace.events);
-     188              :       } else {
-     189           10 :         List<String> chains = getChainsFromAccounts(namespace.accounts);
-     190            5 :         if (chains.contains(chainId)) {
-     191           10 :           events.addAll(namespace.events);
-     192              :         }
-     193              :       }
-     194              :     });
-     195              : 
-     196              :     return events;
-     197              :   }
-     198              : 
-     199              :   /// If the namespace is a chain, add it to the list and return it
-     200              :   /// Otherwise, get the chains from the required namespaces
-     201            6 :   static List<String> getChainsFromRequiredNamespace({
-     202              :     required String nsOrChainId,
-     203              :     required RequiredNamespace requiredNamespace,
-     204              :   }) {
-     205            6 :     List<String> chains = [];
-     206            6 :     if (isValidChainId(nsOrChainId)) {
-     207            6 :       chains.add(nsOrChainId);
-     208            6 :     } else if (requiredNamespace.chains != null) {
-     209              :       // We are assuming that the namespace is a chain
-     210              :       // Validate the requiredNamespace before it is sent here
-     211           12 :       chains.addAll(requiredNamespace.chains!);
-     212              :     }
-     213              : 
-     214              :     return chains;
-     215              :   }
-     216              : 
-     217              :   /// Gets the chains from the required namespaces
-     218              :   /// If keys value is provided, it will only get the chains for the provided keys
-     219            1 :   static List<String> getChainIdsFromRequiredNamespaces({
-     220              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     221              :   }) {
-     222              :     Set<String> chainIds = {};
-     223              : 
-     224              :     // Loop through the required namespaces
-     225            2 :     requiredNamespaces.forEach((String ns, RequiredNamespace value) {
-     226            1 :       chainIds.addAll(
-     227            1 :         getChainsFromRequiredNamespace(
-     228              :           nsOrChainId: ns,
-     229              :           requiredNamespace: value,
-     230              :         ),
-     231              :       );
-     232              :     });
-     233              : 
-     234            1 :     return chainIds.toList();
-     235              :   }
-     236              : 
-     237              :   /// Using the availabe accounts, methods, and events, construct the namespaces
-     238              :   /// If optional namespaces are provided, then they will be added to the namespaces as well
-     239            4 :   static Map<String, Namespace> constructNamespaces({
-     240              :     required Set<String> availableAccounts,
-     241              :     required Set<String> availableMethods,
-     242              :     required Set<String> availableEvents,
-     243              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     244              :     Map<String, RequiredNamespace>? optionalNamespaces,
-     245              :   }) {
-     246            4 :     final Map<String, Namespace> namespaces = _constructNamespaces(
-     247              :       availableAccounts: availableAccounts,
-     248              :       availableMethods: availableMethods,
-     249              :       availableEvents: availableEvents,
-     250              :       namespacesMap: requiredNamespaces,
-     251              :     );
-     252            4 :     final Map<String, Namespace> optionals = _constructNamespaces(
-     253              :       availableAccounts: availableAccounts,
-     254              :       availableMethods: availableMethods,
-     255              :       availableEvents: availableEvents,
-     256            1 :       namespacesMap: optionalNamespaces ?? {},
-     257              :     );
-     258              : 
-     259              :     // Loop through the optional keys and if they exist in the namespaces, then merge them and delete them from optional
-     260            8 :     List<String> keys = optionals.keys.toList();
-     261            9 :     for (int i = 0; i < keys.length; i++) {
-     262            1 :       String key = keys[i];
-     263            1 :       if (namespaces.containsKey(key)) {
-     264            2 :         namespaces[key] = Namespace(
-     265            1 :           accounts: namespaces[key]!
-     266            1 :               .accounts
-     267            1 :               .toSet()
-     268            4 :               .union(optionals[key]!.accounts.toSet())
-     269            1 :               .toList(),
-     270            1 :           methods: namespaces[key]!
-     271            1 :               .methods
-     272            1 :               .toSet()
-     273            4 :               .union(optionals[key]!.methods.toSet())
-     274            1 :               .toList(),
-     275            1 :           events: namespaces[key]!
-     276            1 :               .events
-     277            1 :               .toSet()
-     278            4 :               .union(optionals[key]!.events.toSet())
-     279            1 :               .toList(),
-     280              :         );
-     281            1 :         optionals.remove(key);
-     282              :       }
-     283              :     }
-     284              : 
-     285            4 :     return {
-     286              :       ...namespaces,
-     287            4 :       ...optionals,
-     288              :     };
-     289              :   }
-     290              : 
-     291            0 :   static Map<String, Namespace> buildNamespacesFromAuth({
-     292              :     required Set<String> methods,
-     293              :     required Set<String> accounts,
-     294              :   }) {
-     295            0 :     final parsedAccounts = accounts.map(
-     296            0 :       (account) => account.replaceAll('did:pkh:', ''),
-     297              :     );
-     298              : 
-     299            0 :     final namespaces = getNamespacesFromAccounts(parsedAccounts.toList());
-     300              : 
-     301            0 :     final entries = namespaces.entries.map((e) {
-     302            0 :       return MapEntry(
-     303            0 :         e.key,
-     304            0 :         Namespace.fromJson(e.value.toJson()).copyWith(
-     305            0 :           methods: methods.toList(),
-     306              :           events: EventsConstants.allEvents,
-     307              :         ),
-     308              :       );
-     309              :     });
-     310              : 
-     311            0 :     return Map<String, Namespace>.fromEntries(entries);
-     312              :   }
-     313              : 
-     314              :   /// Gets the matching items from the available items using the chainId
-     315              :   /// This function assumes that each element in the available items is in the format of chainId:itemId
-     316            4 :   static Set<String> _getMatching({
-     317              :     required String namespaceOrChainId,
-     318              :     required Set<String> available,
-     319              :     Set<String>? requested,
-     320              :     bool takeLast = true,
-     321              :   }) {
-     322              :     Set<String> matching = {};
-     323              :     // Loop through the available items, and if it starts with the chainId,
-     324              :     // and is in the requested items, add it to the matching items
-     325            8 :     for (var item in available) {
-     326            8 :       if (item.startsWith('$namespaceOrChainId:')) {
-     327           12 :         matching.add(takeLast ? item.split(':').last : item);
-     328              :       }
-     329              :     }
-     330              : 
-     331              :     if (requested != null) {
-     332            4 :       matching = matching.intersection(requested);
-     333              :     }
-     334              : 
-     335              :     return matching;
-     336              :   }
-     337              : 
-     338            4 :   static Map<String, Namespace> _constructNamespaces({
-     339              :     required Set<String> availableAccounts,
-     340              :     required Set<String> availableMethods,
-     341              :     required Set<String> availableEvents,
-     342              :     required Map<String, RequiredNamespace> namespacesMap,
-     343              :   }) {
-     344            4 :     Map<String, Namespace> namespaces = {};
-     345              : 
-     346              :     // Loop through the required namespaces
-     347            8 :     for (final String namespaceOrChainId in namespacesMap.keys) {
-     348              :       // If the key is a chain, add all of the chain specific events, keys, and methods first
-     349            4 :       final List<String> accounts = [];
-     350            4 :       final List<String> events = [];
-     351            4 :       final List<String> methods = [];
-     352            4 :       final namespace = namespacesMap[namespaceOrChainId]!;
-     353            8 :       final chains = namespace.chains ?? [];
-     354            8 :       if (NamespaceUtils.isValidChainId(namespaceOrChainId) || chains.isEmpty) {
-     355              :         // Add the chain specific availableAccounts
-     356            4 :         accounts.addAll(
-     357            4 :           _getMatching(
-     358              :             namespaceOrChainId: namespaceOrChainId,
-     359              :             available: availableAccounts,
-     360              :             takeLast: false,
-     361              :           ),
-     362              :         );
-     363              :         // Add the chain specific events
-     364            4 :         events.addAll(
-     365            4 :           _getMatching(
-     366              :             namespaceOrChainId: namespaceOrChainId,
-     367              :             available: availableEvents,
-     368            8 :             requested: namespace.events.toSet(),
-     369              :           ),
-     370              :         );
-     371              :         // Add the chain specific methods
-     372            4 :         methods.addAll(
-     373            4 :           _getMatching(
-     374              :             namespaceOrChainId: namespaceOrChainId,
-     375              :             available: availableMethods,
-     376            8 :             requested: namespace.methods.toSet(),
-     377              :           ),
-     378              :         );
-     379              :       } else {
-     380              :         // Loop through all of the chains
-     381            8 :         for (final String chainId in chains) {
-     382              :           // Add the chain specific availableAccounts
-     383            4 :           accounts.addAll(
-     384            4 :             _getMatching(
-     385              :               namespaceOrChainId: chainId,
-     386              :               available: availableAccounts,
-     387           12 :             ).map((e) => '$chainId:$e'),
-     388              :           );
-     389              :           // Add the chain specific events
-     390            4 :           events.addAll(
-     391            4 :             _getMatching(
-     392              :               namespaceOrChainId: chainId,
-     393              :               available: availableEvents,
-     394            8 :               requested: namespace.events.toSet(),
-     395              :             ),
-     396              :           );
-     397              :           // Add the chain specific methods
-     398            4 :           methods.addAll(
-     399            4 :             _getMatching(
-     400              :               namespaceOrChainId: chainId,
-     401              :               available: availableMethods,
-     402            8 :               requested: namespace.methods.toSet(),
-     403              :             ),
-     404              :           );
-     405              :         }
-     406              :       }
-     407              : 
-     408              :       // Add the namespace to the list
-     409            8 :       namespaces[namespaceOrChainId] = Namespace(
-     410            8 :         accounts: accounts.toSet().toList(),
-     411            8 :         events: events.toSet().toList(),
-     412            8 :         methods: methods.toSet().toList(),
-     413              :       );
-     414              :     }
-     415              : 
-     416              :     return namespaces;
-     417              :   }
-     418              : 
-     419              :   /// To be used by Wallet to regenerate already generatedNamespaces but adding `chains` parameter
-     420              :   ///
-     421              :   /// Example usage on onSessionProposal(SessionProposalEvent? event)
-     422              :   ///
-     423              :   /// await _web3Wallet!.approveSession(
-     424              :   ///   id: event.id,
-     425              :   ///   namespaces: NamespaceUtils.regenerateNamespacesWithChains(
-     426              :   ///     event.params.generatedNamespaces!,
-     427              :   ///   ),
-     428              :   ///   sessionProperties: event.params.sessionProperties,
-     429              :   /// );
-     430              : 
-     431            0 :   static Map<String, Namespace> regenerateNamespacesWithChains(
-     432              :     Map<String, Namespace> generatedNamespaces,
-     433              :   ) {
-     434            0 :     Map<String, Namespace> regeneratedNamespaces = {};
-     435            0 :     for (var key in generatedNamespaces.keys) {
-     436            0 :       final namespace = generatedNamespaces[key]!.copyWith(
-     437            0 :         chains: getChainsFromAccounts(generatedNamespaces[key]!.accounts),
-     438              :       );
-     439            0 :       regeneratedNamespaces[key] = namespace;
-     440              :     }
-     441              :     return regeneratedNamespaces;
-     442              :   }
-     443              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/walletconnect_utils.dart.func-c.html b/coverage/html/utils/walletconnect_utils.dart.func-c.html deleted file mode 100644 index 16648e77..00000000 --- a/coverage/html/utils/walletconnect_utils.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/walletconnect_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - walletconnect_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/walletconnect_utils.dart.func.html b/coverage/html/utils/walletconnect_utils.dart.func.html deleted file mode 100644 index 5c9e25dd..00000000 --- a/coverage/html/utils/walletconnect_utils.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/walletconnect_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - walletconnect_utils.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/utils/walletconnect_utils.dart.gcov.html b/coverage/html/utils/walletconnect_utils.dart.gcov.html deleted file mode 100644 index 11a6ee07..00000000 --- a/coverage/html/utils/walletconnect_utils.dart.gcov.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/walletconnect_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - walletconnect_utils.dartCoverageTotalHit
Test:lcov.infoLines:86.7 %9078
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'dart:convert';
-       2              : import 'dart:io';
-       3              : 
-       4              : import 'package:package_info_plus/package_info_plus.dart';
-       5              : import 'package:flutter/foundation.dart' show kIsWeb;
-       6              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       7              : 
-       8              : class WalletConnectUtils {
-       9            7 :   static bool isExpired(int expiry) {
-      10           21 :     return DateTime.now().toUtc().compareTo(
-      11            7 :               DateTime.fromMillisecondsSinceEpoch(
-      12            7 :                 toMilliseconds(expiry),
-      13              :               ),
-      14            7 :             ) >=
-      15              :         0;
-      16              :   }
-      17              : 
-      18            0 :   static DateTime expiryToDateTime(int expiry) {
-      19            0 :     final milliseconds = expiry * 1000;
-      20            0 :     return DateTime.fromMillisecondsSinceEpoch(milliseconds);
-      21              :   }
-      22              : 
-      23            7 :   static int toMilliseconds(int seconds) {
-      24            7 :     return seconds * 1000;
-      25              :   }
-      26              : 
-      27            7 :   static int calculateExpiry(int offset) {
-      28           35 :     return DateTime.now().toUtc().millisecondsSinceEpoch ~/ 1000 + offset;
-      29              :   }
-      30              : 
-      31            9 :   static String getOS() {
-      32              :     if (kIsWeb) {
-      33              :       // TODO change this into an actual value
-      34              :       return 'web-browser';
-      35              :     } else {
-      36           27 :       return <String>[Platform.operatingSystem, Platform.operatingSystemVersion]
-      37            9 :           .join('-');
-      38              :     }
-      39              :   }
-      40              : 
-      41            9 :   static Future<String> getPackageName() async {
-      42            9 :     final packageInfo = await PackageInfo.fromPlatform();
-      43            9 :     return packageInfo.packageName;
-      44              :   }
-      45              : 
-      46            9 :   static String getId() {
-      47              :     if (kIsWeb) {
-      48              :       return 'web';
-      49              :     } else {
-      50            9 :       if (Platform.isAndroid) {
-      51              :         return 'android';
-      52            9 :       } else if (Platform.isIOS) {
-      53              :         return 'ios';
-      54            9 :       } else if (Platform.isLinux) {
-      55              :         return 'linux';
-      56            9 :       } else if (Platform.isMacOS) {
-      57              :         return 'macos';
-      58            0 :       } else if (Platform.isWindows) {
-      59              :         return 'windows';
-      60              :       } else {
-      61              :         return 'unknown';
-      62              :       }
-      63              :     }
-      64              :   }
-      65              : 
-      66            9 :   static String formatUA(
-      67              :     String protocol,
-      68              :     int version,
-      69              :     String sdkVersion,
-      70              :   ) {
-      71            9 :     String os = getOS();
-      72            9 :     String id = getId();
-      73            9 :     return <String>[
-      74           18 :       [protocol, version].join('-'),
-      75           18 :       <String>['Flutter', sdkVersion].join('-'),
-      76              :       os,
-      77              :       id,
-      78            9 :     ].join('/');
-      79              :   }
-      80              : 
-      81            9 :   static String formatRelayRpcUrl({
-      82              :     required String protocol,
-      83              :     required int version,
-      84              :     required String relayUrl,
-      85              :     required String sdkVersion,
-      86              :     required String auth,
-      87              :     String? projectId,
-      88              :     String? packageName,
-      89              :   }) {
-      90            9 :     final Uri uri = Uri.parse(relayUrl);
-      91           18 :     final Map<String, String> queryParams = Uri.splitQueryString(uri.query);
-      92            9 :     final userAgent = formatUA(protocol, version, sdkVersion);
-      93              : 
-      94              :     // Add basic query params
-      95            9 :     final Map<String, String> relayParams = {
-      96              :       'auth': auth,
-      97              :       'ua': userAgent,
-      98              :     };
-      99              : 
-     100              :     // Add projectId query param
-     101            9 :     if ((projectId ?? '').isNotEmpty) {
-     102            9 :       relayParams['projectId'] = projectId!;
-     103              :     }
-     104              : 
-     105              :     // Add bundleId, packageName or origin query param based on platform
-     106            9 :     if ((packageName ?? '').isNotEmpty) {
-     107            9 :       final platform = getId();
-     108            9 :       if (platform == 'ios') {
-     109            0 :         relayParams['bundleId'] = packageName!;
-     110            9 :       } else if (platform == 'android') {
-     111            0 :         relayParams['packageName'] = packageName!;
-     112              :       } else {
-     113            9 :         relayParams['origin'] = packageName!;
-     114              :       }
-     115              :     }
-     116              : 
-     117            9 :     queryParams.addAll(relayParams);
-     118           18 :     return uri.replace(queryParameters: queryParams).toString();
-     119              :   }
-     120              : 
-     121              :   /// ---- URI HANDLING --- ///
-     122              : 
-     123            8 :   static URIParseResult parseUri(Uri uri) {
-     124            8 :     String protocol = uri.scheme;
-     125            8 :     String path = uri.path;
-     126            8 :     final List<String> splitParams = path.split('@');
-     127           16 :     if (splitParams.length == 1) {
-     128              :       throw const WalletConnectError(
-     129              :         code: 0,
-     130              :         message: 'Invalid URI: Missing @',
-     131              :       );
-     132              :     }
-     133           16 :     List<String> methods = (uri.queryParameters['methods'] ?? '')
-     134              :         // Replace all the square brackets with empty string, split by comma
-     135           16 :         .replaceAll(RegExp(r'[\[\]"]+'), '')
-     136            8 :         .split(',');
-     137           30 :     if (methods.length == 1 && methods[0].isEmpty) {
-     138            7 :       methods = [];
-     139              :     }
-     140              :     final URIVersion? version;
-     141            8 :     switch (splitParams[1]) {
-     142            8 :       case '1':
-     143              :         version = URIVersion.v1;
-     144              :         break;
-     145            8 :       case '2':
-     146              :         version = URIVersion.v2;
-     147              :         break;
-     148              :       default:
-     149              :         version = null;
-     150              :     }
-     151              :     final URIV1ParsedData? v1Data;
-     152              :     final URIV2ParsedData? v2Data;
-     153            8 :     if (version == URIVersion.v1) {
-     154            5 :       v1Data = URIV1ParsedData(
-     155           10 :         key: uri.queryParameters['key']!,
-     156           10 :         bridge: uri.queryParameters['bridge']!,
-     157              :       );
-     158              :       v2Data = null;
-     159              :     } else {
-     160              :       v1Data = null;
-     161            8 :       v2Data = URIV2ParsedData(
-     162           16 :         symKey: uri.queryParameters['symKey']!,
-     163            8 :         relay: Relay(
-     164           16 :           uri.queryParameters['relay-protocol']!,
-     165           16 :           data: uri.queryParameters.containsKey('relay-data')
-     166            0 :               ? uri.queryParameters['relay-data']
-     167              :               : null,
-     168              :         ),
-     169              :         methods: methods,
-     170              :       );
-     171              :     }
-     172              : 
-     173            8 :     URIParseResult ret = URIParseResult(
-     174              :       protocol: protocol,
-     175              :       version: version,
-     176            8 :       topic: splitParams[0],
-     177              :       v1Data: v1Data,
-     178              :       v2Data: v2Data,
-     179              :     );
-     180              :     return ret;
-     181              :   }
-     182              : 
-     183            7 :   static Map<String, String> formatRelayParams(
-     184              :     Relay relay, {
-     185              :     String delimiter = '-',
-     186              :   }) {
-     187            7 :     Map<String, String> params = {};
-     188           28 :     params[['relay', 'protocol'].join(delimiter)] = relay.protocol;
-     189            7 :     if (relay.data != null) {
-     190            0 :       params[['relay', 'data'].join(delimiter)] = relay.data!;
-     191              :     }
-     192              :     return params;
-     193              :   }
-     194              : 
-     195            7 :   static Uri formatUri({
-     196              :     required String protocol,
-     197              :     required String version,
-     198              :     required String topic,
-     199              :     required String symKey,
-     200              :     required Relay relay,
-     201              :     required List<List<String>>? methods,
-     202              :     int? expiry,
-     203              :   }) {
-     204            7 :     Map<String, String> params = formatRelayParams(relay);
-     205            7 :     params['symKey'] = symKey;
-     206              :     if (methods != null) {
-     207           18 :       final uriMethods = methods.expand((e) => e).toList();
-     208            6 :       params['methods'] =
-     209           30 :           uriMethods.map((e) => jsonEncode(e)).join(',').replaceAll('"', '');
-     210              :     }
-     211              : 
-     212              :     if (expiry != null) {
-     213           14 :       params['expiryTimestamp'] = expiry.toString();
-     214              :     }
-     215              : 
-     216            7 :     return Uri(
-     217              :       scheme: protocol,
-     218            7 :       path: '$topic@$version',
-     219              :       queryParameters: params,
-     220              :     );
-     221              :   }
-     222              : 
-     223            0 :   static Map<String, T> convertMapTo<T>(Map<String, dynamic> inMap) {
-     224            0 :     Map<String, T> m = {};
-     225            0 :     for (var entry in inMap.entries) {
-     226            0 :       m[entry.key] = entry.value as T;
-     227              :     }
-     228              :     return m;
-     229              :   }
-     230              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/index-sort-f.html b/coverage/html/web3app/index-sort-f.html deleted file mode 100644 index e47e2032..00000000 --- a/coverage/html/web3app/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
web3app.dart -
64.7%64.7%
-
64.7 %11675-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/index-sort-l.html b/coverage/html/web3app/index-sort-l.html deleted file mode 100644 index 461ff737..00000000 --- a/coverage/html/web3app/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3app.dart -
64.7%64.7%
-
64.7 %11675
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/index.html b/coverage/html/web3app/index.html deleted file mode 100644 index e2fb5e12..00000000 --- a/coverage/html/web3app/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3appCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3app.dart -
64.7%64.7%
-
64.7 %11675
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/web3app.dart.func-c.html b/coverage/html/web3app/web3app.dart.func-c.html deleted file mode 100644 index 94575476..00000000 --- a/coverage/html/web3app/web3app.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app/web3app.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3app - web3app.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/web3app.dart.func.html b/coverage/html/web3app/web3app.dart.func.html deleted file mode 100644 index 3ca32b9f..00000000 --- a/coverage/html/web3app/web3app.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app/web3app.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3app - web3app.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3app/web3app.dart.gcov.html b/coverage/html/web3app/web3app.dart.gcov.html deleted file mode 100644 index b2fbb284..00000000 --- a/coverage/html/web3app/web3app.dart.gcov.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - - LCOV - lcov.info - web3app/web3app.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3app - web3app.dartCoverageTotalHit
Test:lcov.infoLines:64.7 %11675
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
-       7              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       8              : 
-       9              : class Web3App implements IWeb3App {
-      10              :   static const List<List<String>> DEFAULT_METHODS = [
-      11              :     [
-      12              :       MethodConstants.WC_SESSION_PROPOSE,
-      13              :       MethodConstants.WC_SESSION_REQUEST,
-      14              :     ],
-      15              :     [
-      16              :       MethodConstants.WC_AUTH_REQUEST,
-      17              :     ]
-      18              :   ];
-      19              : 
-      20              :   bool _initialized = false;
-      21              : 
-      22            2 :   static Future<Web3App> createInstance({
-      23              :     required String projectId,
-      24              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
-      25              :     required PairingMetadata metadata,
-      26              :     bool memoryStore = false,
-      27              :     LogLevel logLevel = LogLevel.nothing,
-      28              :     HttpWrapper httpClient = const HttpWrapper(),
-      29              :   }) async {
-      30            2 :     final client = Web3App(
-      31            2 :       core: Core(
-      32              :         projectId: projectId,
-      33              :         relayUrl: relayUrl,
-      34              :         memoryStore: memoryStore,
-      35              :         logLevel: logLevel,
-      36              :         httpClient: httpClient,
-      37              :       ),
-      38              :       metadata: metadata,
-      39              :     );
-      40            2 :     await client.init();
-      41              : 
-      42              :     return client;
-      43              :   }
-      44              : 
-      45              :   ///---------- GENERIC ----------///
-      46              : 
-      47              :   @override
-      48              :   final String protocol = 'wc';
-      49              :   @override
-      50              :   final int version = 2;
-      51              : 
-      52              :   @override
-      53              :   final ICore core;
-      54              :   @override
-      55              :   final PairingMetadata metadata;
-      56              : 
-      57            2 :   Web3App({
-      58              :     required this.core,
-      59              :     required this.metadata,
-      60              :   }) {
-      61            4 :     signEngine = SignEngine(
-      62            2 :       core: core,
-      63            2 :       metadata: metadata,
-      64            2 :       proposals: GenericStore(
-      65            4 :         storage: core.storage,
-      66              :         context: StoreVersions.CONTEXT_PROPOSALS,
-      67              :         version: StoreVersions.VERSION_PROPOSALS,
-      68            0 :         fromJson: (dynamic value) {
-      69            0 :           return ProposalData.fromJson(value);
-      70              :         },
-      71              :       ),
-      72            2 :       sessions: Sessions(
-      73            4 :         storage: core.storage,
-      74              :         context: StoreVersions.CONTEXT_SESSIONS,
-      75              :         version: StoreVersions.VERSION_SESSIONS,
-      76            0 :         fromJson: (dynamic value) {
-      77            0 :           return SessionData.fromJson(value);
-      78              :         },
-      79              :       ),
-      80            2 :       pendingRequests: GenericStore(
-      81            4 :         storage: core.storage,
-      82              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
-      83              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
-      84            0 :         fromJson: (dynamic value) {
-      85            0 :           return SessionRequest.fromJson(value);
-      86              :         },
-      87              :       ),
-      88            2 :       authKeys: GenericStore(
-      89            4 :         storage: core.storage,
-      90              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
-      91              :         version: StoreVersions.VERSION_AUTH_KEYS,
-      92            0 :         fromJson: (dynamic value) {
-      93            0 :           return AuthPublicKey.fromJson(value);
-      94              :         },
-      95              :       ),
-      96            2 :       pairingTopics: GenericStore(
-      97            4 :         storage: core.storage,
-      98              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
-      99              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
-     100            0 :         fromJson: (dynamic value) {
-     101              :           return value;
-     102              :         },
-     103              :       ),
-     104            2 :       authRequests: GenericStore(
-     105            4 :         storage: core.storage,
-     106              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     107              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     108            0 :         fromJson: (dynamic value) {
-     109            0 :           return PendingAuthRequest.fromJson(value);
-     110              :         },
-     111              :       ),
-     112            2 :       completeRequests: GenericStore(
-     113            4 :         storage: core.storage,
-     114              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
-     115              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
-     116            0 :         fromJson: (dynamic value) {
-     117            0 :           return StoredCacao.fromJson(value);
-     118              :         },
-     119              :       ),
-     120            2 :       sessionAuthRequests: GenericStore(
-     121            4 :         storage: core.storage,
-     122              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     123              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     124            0 :         fromJson: (dynamic value) {
-     125            0 :           return PendingSessionAuthRequest.fromJson(value);
-     126              :         },
-     127              :       ),
-     128              :     );
-     129              : 
-     130            4 :     authEngine = AuthEngine(
-     131            2 :       core: core,
-     132            2 :       metadata: metadata,
-     133            4 :       authKeys: signEngine.authKeys,
-     134            4 :       pairingTopics: signEngine.pairingTopics,
-     135            4 :       authRequests: signEngine.authRequests,
-     136            4 :       completeRequests: signEngine.completeRequests,
-     137              :     );
-     138              :   }
-     139              : 
-     140            2 :   @override
-     141              :   Future<void> init() async {
-     142            2 :     if (_initialized) {
-     143              :       return;
-     144              :     }
-     145              : 
-     146            4 :     await core.start();
-     147            4 :     await signEngine.init();
-     148            4 :     await authEngine.init();
-     149              : 
-     150            2 :     _initialized = true;
-     151              :   }
-     152              : 
-     153              :   ///---------- SIGN ENGINE ----------///
-     154              : 
-     155            2 :   @override
-     156            4 :   Event<SessionConnect> get onSessionConnect => signEngine.onSessionConnect;
-     157            1 :   @override
-     158            2 :   Event<SessionEvent> get onSessionEvent => signEngine.onSessionEvent;
-     159            1 :   @override
-     160            2 :   Event<SessionExpire> get onSessionExpire => signEngine.onSessionExpire;
-     161            0 :   @override
-     162              :   Event<SessionProposalEvent> get onProposalExpire =>
-     163            0 :       signEngine.onProposalExpire;
-     164            1 :   @override
-     165            2 :   Event<SessionExtend> get onSessionExtend => signEngine.onSessionExtend;
-     166            1 :   @override
-     167            2 :   Event<SessionPing> get onSessionPing => signEngine.onSessionPing;
-     168            1 :   @override
-     169            2 :   Event<SessionUpdate> get onSessionUpdate => signEngine.onSessionUpdate;
-     170            1 :   @override
-     171            2 :   Event<SessionDelete> get onSessionDelete => signEngine.onSessionDelete;
-     172              : 
-     173            1 :   @override
-     174            2 :   IGenericStore<ProposalData> get proposals => signEngine.proposals;
-     175            1 :   @override
-     176            2 :   ISessions get sessions => signEngine.sessions;
-     177            0 :   @override
-     178              :   IGenericStore<SessionRequest> get pendingRequests =>
-     179            0 :       signEngine.pendingRequests;
-     180              : 
-     181              :   @override
-     182              :   late ISignEngine signEngine;
-     183              : 
-     184            2 :   @override
-     185              :   Future<ConnectResponse> connect({
-     186              :     Map<String, RequiredNamespace>? requiredNamespaces,
-     187              :     Map<String, RequiredNamespace>? optionalNamespaces,
-     188              :     Map<String, String>? sessionProperties,
-     189              :     String? pairingTopic,
-     190              :     List<Relay>? relays,
-     191              :     List<List<String>>? methods = DEFAULT_METHODS,
-     192              :   }) async {
-     193              :     try {
-     194            4 :       return await signEngine.connect(
-     195              :         requiredNamespaces: requiredNamespaces,
-     196              :         optionalNamespaces: optionalNamespaces,
-     197              :         sessionProperties: sessionProperties,
-     198              :         pairingTopic: pairingTopic,
-     199              :         relays: relays,
-     200              :         methods: methods,
-     201              :       );
-     202              :     } catch (e) {
-     203              :       // print(e);
-     204              :       rethrow;
-     205              :     }
-     206              :   }
-     207              : 
-     208            1 :   @override
-     209              :   Future<dynamic> request({
-     210              :     required String topic,
-     211              :     required String chainId,
-     212              :     required SessionRequestParams request,
-     213              :   }) async {
-     214              :     try {
-     215            2 :       return await signEngine.request(
-     216              :         topic: topic,
-     217              :         chainId: chainId,
-     218              :         request: request,
-     219              :       );
-     220              :     } catch (e) {
-     221              :       rethrow;
-     222              :     }
-     223              :   }
-     224              : 
-     225            0 :   @override
-     226              :   Future<List<dynamic>> requestReadContract({
-     227              :     required DeployedContract deployedContract,
-     228              :     required String functionName,
-     229              :     required String rpcUrl,
-     230              :     EthereumAddress? sender,
-     231              :     List parameters = const [],
-     232              :   }) async {
-     233              :     try {
-     234            0 :       return await signEngine.requestReadContract(
-     235              :         sender: sender,
-     236              :         deployedContract: deployedContract,
-     237              :         functionName: functionName,
-     238              :         rpcUrl: rpcUrl,
-     239              :         parameters: parameters,
-     240              :       );
-     241              :     } catch (e) {
-     242              :       rethrow;
-     243              :     }
-     244              :   }
-     245              : 
-     246            0 :   @override
-     247              :   Future<dynamic> requestWriteContract({
-     248              :     required String topic,
-     249              :     required String chainId,
-     250              :     required String rpcUrl,
-     251              :     required DeployedContract deployedContract,
-     252              :     required String functionName,
-     253              :     required Transaction transaction,
-     254              :     String? method,
-     255              :     List parameters = const [],
-     256              :   }) async {
-     257              :     try {
-     258            0 :       return await signEngine.requestWriteContract(
-     259              :         topic: topic,
-     260              :         chainId: chainId,
-     261              :         rpcUrl: rpcUrl,
-     262              :         deployedContract: deployedContract,
-     263              :         functionName: functionName,
-     264              :         transaction: transaction,
-     265              :         method: method,
-     266              :         parameters: parameters,
-     267              :       );
-     268              :     } catch (e) {
-     269              :       rethrow;
-     270              :     }
-     271              :   }
-     272              : 
-     273            1 :   @override
-     274              :   void registerEventHandler({
-     275              :     required String chainId,
-     276              :     required String event,
-     277              :     void Function(String, dynamic)? handler,
-     278              :   }) {
-     279              :     try {
-     280            2 :       return signEngine.registerEventHandler(
-     281              :         chainId: chainId,
-     282              :         event: event,
-     283              :         handler: handler,
-     284              :       );
-     285              :     } catch (e) {
-     286              :       rethrow;
-     287              :     }
-     288              :   }
-     289              : 
-     290            1 :   @override
-     291              :   Future<void> ping({
-     292              :     required String topic,
-     293              :   }) async {
-     294              :     try {
-     295            2 :       return await signEngine.ping(topic: topic);
-     296              :     } catch (e) {
-     297              :       rethrow;
-     298              :     }
-     299              :   }
-     300              : 
-     301            1 :   @override
-     302              :   Future<void> disconnectSession({
-     303              :     required String topic,
-     304              :     required WalletConnectError reason,
-     305              :   }) async {
-     306              :     try {
-     307            2 :       return await signEngine.disconnectSession(
-     308              :         topic: topic,
-     309              :         reason: reason,
-     310              :       );
-     311              :     } catch (e) {
-     312              :       rethrow;
-     313              :     }
-     314              :   }
-     315              : 
-     316            2 :   @override
-     317              :   Map<String, SessionData> getActiveSessions() {
-     318              :     try {
-     319            4 :       return signEngine.getActiveSessions();
-     320              :     } catch (e) {
-     321              :       rethrow;
-     322              :     }
-     323              :   }
-     324              : 
-     325            1 :   @override
-     326              :   Map<String, SessionData> getSessionsForPairing({
-     327              :     required String pairingTopic,
-     328              :   }) {
-     329              :     try {
-     330            2 :       return signEngine.getSessionsForPairing(
-     331              :         pairingTopic: pairingTopic,
-     332              :       );
-     333              :     } catch (e) {
-     334              :       rethrow;
-     335              :     }
-     336              :   }
-     337              : 
-     338            1 :   @override
-     339              :   Map<String, ProposalData> getPendingSessionProposals() {
-     340              :     try {
-     341            2 :       return signEngine.getPendingSessionProposals();
-     342              :     } catch (e) {
-     343              :       rethrow;
-     344              :     }
-     345              :   }
-     346              : 
-     347            2 :   @override
-     348            6 :   IPairingStore get pairings => core.pairing.getStore();
-     349              : 
-     350              :   ///---------- (DEPRECATED) AUTH ENGINE ----------///
-     351              : 
-     352            0 :   @override
-     353            0 :   Event<AuthResponse> get onAuthResponse => authEngine.onAuthResponse;
-     354              : 
-     355            0 :   @override
-     356            0 :   IGenericStore<AuthPublicKey> get authKeys => authEngine.authKeys;
-     357            0 :   @override
-     358            0 :   IGenericStore<String> get pairingTopics => authEngine.pairingTopics;
-     359            0 :   @override
-     360              :   IGenericStore<StoredCacao> get completeRequests =>
-     361            0 :       authEngine.completeRequests;
-     362              : 
-     363              :   @Deprecated(
-     364              :     'AuthEngine/AuthClient is deprecated and will be removed soon.\n'
-     365              :     'Please use authentication methods from SignEngine/SignClient instead',
-     366              :   )
-     367              :   @override
-     368              :   late IAuthEngine authEngine;
-     369              : 
-     370            1 :   @override
-     371              :   Future<AuthRequestResponse> requestAuth({
-     372              :     required AuthRequestParams params,
-     373              :     String? pairingTopic,
-     374              :     List<List<String>>? methods = DEFAULT_METHODS,
-     375              :   }) async {
-     376              :     try {
-     377            2 :       return authEngine.requestAuth(
-     378              :         params: params,
-     379              :         pairingTopic: pairingTopic,
-     380              :         methods: methods,
-     381              :       );
-     382              :     } catch (e) {
-     383              :       rethrow;
-     384              :     }
-     385              :   }
-     386              : 
-     387            0 :   @override
-     388              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-     389              :     required String pairingTopic,
-     390              :   }) {
-     391              :     try {
-     392            0 :       return authEngine.getCompletedRequestsForPairing(
-     393              :         pairingTopic: pairingTopic,
-     394              :       );
-     395              :     } catch (e) {
-     396              :       rethrow;
-     397              :     }
-     398              :   }
-     399              : 
-     400              :   ///---------- ONE-CLICK AUTH SIGN ENGINE ----------///
-     401              : 
-     402            0 :   @override
-     403              :   Event<SessionAuthResponse> get onSessionAuthResponse =>
-     404            0 :       signEngine.onSessionAuthResponse;
-     405              : 
-     406            0 :   @override
-     407              :   Future<SessionAuthRequestResponse> authenticate({
-     408              :     required SessionAuthRequestParams params,
-     409              :     String? pairingTopic,
-     410              :     List<List<String>>? methods = const [
-     411              :       [MethodConstants.WC_SESSION_AUTHENTICATE]
-     412              :     ],
-     413              :   }) async {
-     414              :     try {
-     415            0 :       return signEngine.authenticate(
-     416              :         params: params,
-     417              :         pairingTopic: pairingTopic,
-     418              :         methods: methods,
-     419              :       );
-     420              :     } catch (e) {
-     421              :       rethrow;
-     422              :     }
-     423              :   }
-     424              : 
-     425            0 :   @override
-     426              :   Future<bool> validateSignedCacao({
-     427              :     required Cacao cacao,
-     428              :     required String projectId,
-     429              :   }) {
-     430              :     try {
-     431            0 :       return signEngine.validateSignedCacao(
-     432              :         cacao: cacao,
-     433              :         projectId: projectId,
-     434              :       );
-     435              :     } catch (e) {
-     436              :       rethrow;
-     437              :     }
-     438              :   }
-     439              : 
-     440            0 :   @override
-     441              :   String formatAuthMessage({
-     442              :     required String iss,
-     443              :     required CacaoRequestPayload cacaoPayload,
-     444              :   }) {
-     445              :     try {
-     446            0 :       return signEngine.formatAuthMessage(
-     447              :         iss: iss,
-     448              :         cacaoPayload: cacaoPayload,
-     449              :       );
-     450              :     } catch (e) {
-     451              :       rethrow;
-     452              :     }
-     453              :   }
-     454              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/index-sort-f.html b/coverage/html/web3wallet/index-sort-f.html deleted file mode 100644 index 79586ac9..00000000 --- a/coverage/html/web3wallet/index-sort-f.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
web3wallet.dart -
71.7%71.7%
-
71.7 %13899-
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/index-sort-l.html b/coverage/html/web3wallet/index-sort-l.html deleted file mode 100644 index 6ae5355a..00000000 --- a/coverage/html/web3wallet/index-sort-l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3wallet.dart -
71.7%71.7%
-
71.7 %13899
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/index.html b/coverage/html/web3wallet/index.html deleted file mode 100644 index e84954e3..00000000 --- a/coverage/html/web3wallet/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3walletCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

File Sort by file nameLine Coverage Sort by line coverage
Rate Total Hit
web3wallet.dart -
71.7%71.7%
-
71.7 %13899
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/web3wallet.dart.func-c.html b/coverage/html/web3wallet/web3wallet.dart.func-c.html deleted file mode 100644 index 35b071fe..00000000 --- a/coverage/html/web3wallet/web3wallet.dart.func-c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet/web3wallet.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3wallet - web3wallet.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/web3wallet.dart.func.html b/coverage/html/web3wallet/web3wallet.dart.func.html deleted file mode 100644 index edd605f9..00000000 --- a/coverage/html/web3wallet/web3wallet.dart.func.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet/web3wallet.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3wallet - web3wallet.dart (source / functions)CoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:51:04Functions:-00
-
- -
- - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
-
-
- - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/html/web3wallet/web3wallet.dart.gcov.html b/coverage/html/web3wallet/web3wallet.dart.gcov.html deleted file mode 100644 index 6cea2e08..00000000 --- a/coverage/html/web3wallet/web3wallet.dart.gcov.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - - LCOV - lcov.info - web3wallet/web3wallet.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - web3wallet - web3wallet.dartCoverageTotalHit
Test:lcov.infoLines:71.7 %13899
Test Date:2024-07-25 14:52:52
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart';
-       2              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart';
-       3              : import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/i_http_client.dart';
-       4              : import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart';
-       5              : import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart';
-       6              : import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart';
-       7              : import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart';
-       8              : import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
-       9              : 
-      10              : class Web3Wallet implements IWeb3Wallet {
-      11              :   bool _initialized = false;
-      12              : 
-      13            3 :   static Future<Web3Wallet> createInstance({
-      14              :     required String projectId,
-      15              :     String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
-      16              :     String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
-      17              :     required PairingMetadata metadata,
-      18              :     bool memoryStore = false,
-      19              :     LogLevel logLevel = LogLevel.nothing,
-      20              :     IHttpClient httpClient = const HttpWrapper(),
-      21              :   }) async {
-      22            3 :     final client = Web3Wallet(
-      23            3 :       core: Core(
-      24              :         projectId: projectId,
-      25              :         relayUrl: relayUrl,
-      26              :         pushUrl: pushUrl,
-      27              :         memoryStore: memoryStore,
-      28              :         logLevel: logLevel,
-      29              :         httpClient: httpClient,
-      30              :       ),
-      31              :       metadata: metadata,
-      32              :     );
-      33            3 :     await client.init();
-      34              : 
-      35              :     return client;
-      36              :   }
-      37              : 
-      38              :   ///---------- GENERIC ----------///
-      39              : 
-      40              :   @override
-      41              :   final String protocol = 'wc';
-      42              :   @override
-      43              :   final int version = 2;
-      44              : 
-      45              :   @override
-      46              :   final ICore core;
-      47              :   @override
-      48              :   final PairingMetadata metadata;
-      49              : 
-      50            3 :   Web3Wallet({
-      51              :     required this.core,
-      52              :     required this.metadata,
-      53              :   }) {
-      54            6 :     signEngine = SignEngine(
-      55            3 :       core: core,
-      56            3 :       metadata: metadata,
-      57            3 :       proposals: GenericStore(
-      58            6 :         storage: core.storage,
-      59              :         context: StoreVersions.CONTEXT_PROPOSALS,
-      60              :         version: StoreVersions.VERSION_PROPOSALS,
-      61            0 :         fromJson: (dynamic value) {
-      62            0 :           return ProposalData.fromJson(value);
-      63              :         },
-      64              :       ),
-      65            3 :       sessions: Sessions(
-      66            6 :         storage: core.storage,
-      67              :         context: StoreVersions.CONTEXT_SESSIONS,
-      68              :         version: StoreVersions.VERSION_SESSIONS,
-      69            0 :         fromJson: (dynamic value) {
-      70            0 :           return SessionData.fromJson(value);
-      71              :         },
-      72              :       ),
-      73            3 :       pendingRequests: GenericStore(
-      74            6 :         storage: core.storage,
-      75              :         context: StoreVersions.CONTEXT_PENDING_REQUESTS,
-      76              :         version: StoreVersions.VERSION_PENDING_REQUESTS,
-      77            0 :         fromJson: (dynamic value) {
-      78            0 :           return SessionRequest.fromJson(value);
-      79              :         },
-      80              :       ),
-      81            3 :       authKeys: GenericStore(
-      82            6 :         storage: core.storage,
-      83              :         context: StoreVersions.CONTEXT_AUTH_KEYS,
-      84              :         version: StoreVersions.VERSION_AUTH_KEYS,
-      85            0 :         fromJson: (dynamic value) {
-      86            0 :           return AuthPublicKey.fromJson(value);
-      87              :         },
-      88              :       ),
-      89            3 :       pairingTopics: GenericStore(
-      90            6 :         storage: core.storage,
-      91              :         context: StoreVersions.CONTEXT_PAIRING_TOPICS,
-      92              :         version: StoreVersions.VERSION_PAIRING_TOPICS,
-      93            0 :         fromJson: (dynamic value) {
-      94              :           return value;
-      95              :         },
-      96              :       ),
-      97            3 :       authRequests: GenericStore(
-      98            6 :         storage: core.storage,
-      99              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     100              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     101            0 :         fromJson: (dynamic value) {
-     102            0 :           return PendingAuthRequest.fromJson(value);
-     103              :         },
-     104              :       ),
-     105            3 :       completeRequests: GenericStore(
-     106            6 :         storage: core.storage,
-     107              :         context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
-     108              :         version: StoreVersions.VERSION_COMPLETE_REQUESTS,
-     109            0 :         fromJson: (dynamic value) {
-     110            0 :           return StoredCacao.fromJson(value);
-     111              :         },
-     112              :       ),
-     113            3 :       sessionAuthRequests: GenericStore(
-     114            6 :         storage: core.storage,
-     115              :         context: StoreVersions.CONTEXT_AUTH_REQUESTS,
-     116              :         version: StoreVersions.VERSION_AUTH_REQUESTS,
-     117            0 :         fromJson: (dynamic value) {
-     118            0 :           return PendingSessionAuthRequest.fromJson(value);
-     119              :         },
-     120              :       ),
-     121              :     );
-     122              : 
-     123            6 :     authEngine = AuthEngine(
-     124            3 :       core: core,
-     125            3 :       metadata: metadata,
-     126            6 :       authKeys: signEngine.authKeys,
-     127            6 :       pairingTopics: signEngine.pairingTopics,
-     128            6 :       authRequests: signEngine.authRequests,
-     129            6 :       completeRequests: signEngine.completeRequests,
-     130              :     );
-     131              :   }
-     132              : 
-     133            3 :   @override
-     134              :   Future<void> init() async {
-     135            3 :     if (_initialized) {
-     136              :       return;
-     137              :     }
-     138              : 
-     139            6 :     await core.start();
-     140            6 :     await signEngine.init();
-     141            6 :     await authEngine.init();
-     142              : 
-     143            3 :     _initialized = true;
-     144              :   }
-     145              : 
-     146            2 :   @override
-     147              :   Future<PairingInfo> pair({
-     148              :     required Uri uri,
-     149              :   }) async {
-     150              :     try {
-     151            4 :       return await signEngine.pair(uri: uri);
-     152              :     } catch (e) {
-     153              :       rethrow;
-     154              :     }
-     155              :   }
-     156              : 
-     157              :   ///---------- SIGN ENGINE ----------///
-     158              : 
-     159            1 :   @override
-     160            2 :   Event<SessionConnect> get onSessionConnect => signEngine.onSessionConnect;
-     161            1 :   @override
-     162            2 :   Event<SessionDelete> get onSessionDelete => signEngine.onSessionDelete;
-     163            1 :   @override
-     164            2 :   Event<SessionExpire> get onSessionExpire => signEngine.onSessionExpire;
-     165            2 :   @override
-     166              :   Event<SessionProposalEvent> get onSessionProposal =>
-     167            4 :       signEngine.onSessionProposal;
-     168            0 :   @override
-     169              :   Event<SessionProposalErrorEvent> get onSessionProposalError =>
-     170            0 :       signEngine.onSessionProposalError;
-     171            1 :   @override
-     172              :   Event<SessionProposalEvent> get onProposalExpire =>
-     173            2 :       signEngine.onProposalExpire;
-     174            1 :   @override
-     175              :   Event<SessionRequestEvent> get onSessionRequest =>
-     176            2 :       signEngine.onSessionRequest;
-     177            1 :   @override
-     178            2 :   Event<SessionPing> get onSessionPing => signEngine.onSessionPing;
-     179              : 
-     180            1 :   @override
-     181            2 :   IGenericStore<ProposalData> get proposals => signEngine.proposals;
-     182            1 :   @override
-     183            2 :   ISessions get sessions => signEngine.sessions;
-     184            1 :   @override
-     185              :   IGenericStore<SessionRequest> get pendingRequests =>
-     186            2 :       signEngine.pendingRequests;
-     187              : 
-     188              :   @override
-     189              :   late ISignEngine signEngine;
-     190              : 
-     191            2 :   @override
-     192              :   Future<ApproveResponse> approveSession({
-     193              :     required int id,
-     194              :     required Map<String, Namespace> namespaces,
-     195              :     Map<String, String>? sessionProperties,
-     196              :     String? relayProtocol,
-     197              :   }) async {
-     198              :     try {
-     199            4 :       return await signEngine.approveSession(
-     200              :         id: id,
-     201              :         namespaces: namespaces,
-     202              :         sessionProperties: sessionProperties,
-     203              :         relayProtocol: relayProtocol,
-     204              :       );
-     205              :     } catch (e) {
-     206              :       rethrow;
-     207              :     }
-     208              :   }
-     209              : 
-     210            1 :   @override
-     211              :   Future<void> rejectSession({
-     212              :     required int id,
-     213              :     required WalletConnectError reason,
-     214              :   }) async {
-     215              :     try {
-     216            2 :       return await signEngine.rejectSession(
-     217              :         id: id,
-     218              :         reason: reason,
-     219              :       );
-     220              :     } catch (e) {
-     221              :       rethrow;
-     222              :     }
-     223              :   }
-     224              : 
-     225            1 :   @override
-     226              :   Future<void> updateSession({
-     227              :     required String topic,
-     228              :     required Map<String, Namespace> namespaces,
-     229              :   }) async {
-     230              :     try {
-     231            2 :       return await signEngine.updateSession(
-     232              :         topic: topic,
-     233              :         namespaces: namespaces,
-     234              :       );
-     235              :     } catch (e) {
-     236              :       // final error = e as WCError;
-     237              :       rethrow;
-     238              :     }
-     239              :   }
-     240              : 
-     241            1 :   @override
-     242              :   Future<void> extendSession({
-     243              :     required String topic,
-     244              :   }) async {
-     245              :     try {
-     246            2 :       return await signEngine.extendSession(topic: topic);
-     247              :     } catch (e) {
-     248              :       rethrow;
-     249              :     }
-     250              :   }
-     251              : 
-     252            1 :   @override
-     253              :   void registerRequestHandler({
-     254              :     required String chainId,
-     255              :     required String method,
-     256              :     dynamic Function(String, dynamic)? handler,
-     257              :   }) {
-     258              :     try {
-     259            2 :       return signEngine.registerRequestHandler(
-     260              :         chainId: chainId,
-     261              :         method: method,
-     262              :         handler: handler,
-     263              :       );
-     264              :     } catch (e) {
-     265              :       rethrow;
-     266              :     }
-     267              :   }
-     268              : 
-     269            1 :   @override
-     270              :   Future<void> respondSessionRequest({
-     271              :     required String topic,
-     272              :     required JsonRpcResponse response,
-     273              :   }) {
-     274              :     try {
-     275            2 :       return signEngine.respondSessionRequest(
-     276              :         topic: topic,
-     277              :         response: response,
-     278              :       );
-     279              :     } catch (e) {
-     280              :       rethrow;
-     281              :     }
-     282              :   }
-     283              : 
-     284            1 :   @override
-     285              :   void registerEventEmitter({
-     286              :     required String chainId,
-     287              :     required String event,
-     288              :   }) {
-     289              :     try {
-     290            2 :       return signEngine.registerEventEmitter(
-     291              :         chainId: chainId,
-     292              :         event: event,
-     293              :       );
-     294              :     } catch (e) {
-     295              :       rethrow;
-     296              :     }
-     297              :   }
-     298              : 
-     299            1 :   @override
-     300              :   void registerAccount({
-     301              :     required String chainId,
-     302              :     required String accountAddress,
-     303              :   }) {
-     304              :     try {
-     305            2 :       return signEngine.registerAccount(
-     306              :         chainId: chainId,
-     307              :         accountAddress: accountAddress,
-     308              :       );
-     309              :     } catch (e) {
-     310              :       rethrow;
-     311              :     }
-     312              :   }
-     313              : 
-     314            1 :   @override
-     315              :   Future<void> emitSessionEvent({
-     316              :     required String topic,
-     317              :     required String chainId,
-     318              :     required SessionEventParams event,
-     319              :   }) async {
-     320              :     try {
-     321            2 :       return await signEngine.emitSessionEvent(
-     322              :         topic: topic,
-     323              :         chainId: chainId,
-     324              :         event: event,
-     325              :       );
-     326              :     } catch (e) {
-     327              :       rethrow;
-     328              :     }
-     329              :   }
-     330              : 
-     331            1 :   @override
-     332              :   Future<void> disconnectSession({
-     333              :     required String topic,
-     334              :     required WalletConnectError reason,
-     335              :   }) async {
-     336              :     try {
-     337            2 :       return await signEngine.disconnectSession(
-     338              :         topic: topic,
-     339              :         reason: reason,
-     340              :       );
-     341              :     } catch (e) {
-     342              :       rethrow;
-     343              :     }
-     344              :   }
-     345              : 
-     346            1 :   @override
-     347              :   SessionData? find({
-     348              :     required Map<String, RequiredNamespace> requiredNamespaces,
-     349              :   }) {
-     350              :     try {
-     351            2 :       return signEngine.find(requiredNamespaces: requiredNamespaces);
-     352              :     } catch (e) {
-     353              :       rethrow;
-     354              :     }
-     355              :   }
-     356              : 
-     357            2 :   @override
-     358              :   Map<String, SessionData> getActiveSessions() {
-     359              :     try {
-     360            4 :       return signEngine.getActiveSessions();
-     361              :     } catch (e) {
-     362              :       rethrow;
-     363              :     }
-     364              :   }
-     365              : 
-     366            1 :   @override
-     367              :   Map<String, SessionData> getSessionsForPairing({
-     368              :     required String pairingTopic,
-     369              :   }) {
-     370              :     try {
-     371            2 :       return signEngine.getSessionsForPairing(
-     372              :         pairingTopic: pairingTopic,
-     373              :       );
-     374              :     } catch (e) {
-     375              :       rethrow;
-     376              :     }
-     377              :   }
-     378              : 
-     379            2 :   @override
-     380              :   Map<String, ProposalData> getPendingSessionProposals() {
-     381              :     try {
-     382            4 :       return signEngine.getPendingSessionProposals();
-     383              :     } catch (e) {
-     384              :       rethrow;
-     385              :     }
-     386              :   }
-     387              : 
-     388            1 :   @override
-     389              :   Map<String, SessionRequest> getPendingSessionRequests() {
-     390              :     try {
-     391            2 :       return signEngine.getPendingSessionRequests();
-     392              :     } catch (e) {
-     393              :       rethrow;
-     394              :     }
-     395              :   }
-     396              : 
-     397            2 :   @override
-     398            6 :   IPairingStore get pairings => core.pairing.getStore();
-     399              : 
-     400              :   ///---------- (DEPRECATED) AUTH ENGINE ----------///
-     401              : 
-     402            2 :   @override
-     403            4 :   Event<AuthRequest> get onAuthRequest => authEngine.onAuthRequest;
-     404              : 
-     405            0 :   @override
-     406            0 :   IGenericStore<AuthPublicKey> get authKeys => authEngine.authKeys;
-     407            0 :   @override
-     408            0 :   IGenericStore<String> get pairingTopics => authEngine.pairingTopics;
-     409            0 :   @override
-     410            0 :   IGenericStore<PendingAuthRequest> get authRequests => authEngine.authRequests;
-     411            0 :   @override
-     412              :   IGenericStore<StoredCacao> get completeRequests =>
-     413            0 :       authEngine.completeRequests;
-     414              : 
-     415              :   @Deprecated(
-     416              :     'AuthEngine/AuthClient is deprecated and will be removed soon.\n'
-     417              :     'Please use authentication methods from SignEngine/SignClient instead',
-     418              :   )
-     419              :   @override
-     420              :   late IAuthEngine authEngine;
-     421              : 
-     422            2 :   @override
-     423              :   Future<void> respondAuthRequest({
-     424              :     required int id,
-     425              :     required String iss,
-     426              :     CacaoSignature? signature,
-     427              :     WalletConnectError? error,
-     428              :   }) {
-     429              :     try {
-     430            4 :       return authEngine.respondAuthRequest(
-     431              :         id: id,
-     432              :         iss: iss,
-     433              :         signature: signature,
-     434              :         error: error,
-     435              :       );
-     436              :     } catch (e) {
-     437              :       rethrow;
-     438              :     }
-     439              :   }
-     440              : 
-     441            2 :   @override
-     442              :   Map<int, PendingAuthRequest> getPendingAuthRequests() {
-     443              :     try {
-     444            4 :       return authEngine.getPendingAuthRequests();
-     445              :     } catch (e) {
-     446              :       rethrow;
-     447              :     }
-     448              :   }
-     449              : 
-     450            1 :   @override
-     451              :   Map<int, StoredCacao> getCompletedRequestsForPairing({
-     452              :     required String pairingTopic,
-     453              :   }) {
-     454              :     try {
-     455            2 :       return authEngine.getCompletedRequestsForPairing(
-     456              :         pairingTopic: pairingTopic,
-     457              :       );
-     458              :     } catch (e) {
-     459              :       rethrow;
-     460              :     }
-     461              :   }
-     462              : 
-     463              :   ///---------- ONE-CLICK AUTH SIGN ENGINE ----------///
-     464              : 
-     465            0 :   @override
-     466              :   IGenericStore<PendingSessionAuthRequest> get sessionAuthRequests =>
-     467            0 :       signEngine.sessionAuthRequests;
-     468            0 :   @override
-     469              :   Event<SessionAuthRequest> get onSessionAuthRequest =>
-     470            0 :       signEngine.onSessionAuthRequest;
-     471              : 
-     472            0 :   @override
-     473              :   Future<ApproveResponse> approveSessionAuthenticate({
-     474              :     required int id,
-     475              :     List<Cacao>? auths,
-     476              :   }) {
-     477              :     try {
-     478            0 :       return signEngine.approveSessionAuthenticate(
-     479              :         id: id,
-     480              :         auths: auths,
-     481              :       );
-     482              :     } catch (e) {
-     483              :       rethrow;
-     484              :     }
-     485              :   }
-     486              : 
-     487            0 :   @override
-     488              :   Future<void> rejectSessionAuthenticate({
-     489              :     required int id,
-     490              :     required WalletConnectError reason,
-     491              :   }) {
-     492              :     try {
-     493            0 :       return signEngine.rejectSessionAuthenticate(
-     494              :         id: id,
-     495              :         reason: reason,
-     496              :       );
-     497              :     } catch (e) {
-     498              :       rethrow;
-     499              :     }
-     500              :   }
-     501              : 
-     502            0 :   @override
-     503              :   Map<int, PendingSessionAuthRequest> getPendingSessionAuthRequests() {
-     504              :     try {
-     505            0 :       return signEngine.getPendingSessionAuthRequests();
-     506              :     } catch (e) {
-     507              :       rethrow;
-     508              :     }
-     509              :   }
-     510              : 
-     511            0 :   @override
-     512              :   String formatAuthMessage({
-     513              :     required String iss,
-     514              :     required CacaoRequestPayload cacaoPayload,
-     515              :   }) {
-     516              :     try {
-     517            0 :       return signEngine.formatAuthMessage(
-     518              :         iss: iss,
-     519              :         cacaoPayload: cacaoPayload,
-     520              :       );
-     521              :     } catch (e) {
-     522              :       rethrow;
-     523              :     }
-     524              :   }
-     525              : 
-     526            0 :   @override
-     527              :   Future<bool> validateSignedCacao({
-     528              :     required Cacao cacao,
-     529              :     required String projectId,
-     530              :   }) {
-     531              :     try {
-     532            0 :       return signEngine.validateSignedCacao(
-     533              :         cacao: cacao,
-     534              :         projectId: projectId,
-     535              :       );
-     536              :     } catch (e) {
-     537              :       rethrow;
-     538              :     }
-     539              :   }
-     540              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.1-1
-
- - - diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index e0eef0de..00000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,4705 +0,0 @@ -TN: -SF:lib/apis/auth_api/auth_client.dart -FNF:0 -FNH:0 -DA:22,0 -DA:25,0 -DA:28,0 -DA:29,0 -DA:30,1 -DA:31,2 -DA:33,1 -DA:34,2 -DA:35,0 -DA:36,0 -DA:37,0 -DA:38,0 -DA:39,0 -DA:40,0 -DA:41,0 -DA:42,0 -DA:43,0 -DA:44,0 -DA:49,0 -DA:57,0 -DA:58,0 -DA:67,0 -DA:72,1 -DA:76,2 -DA:79,1 -DA:80,1 -DA:83,0 -DA:84,0 -DA:87,1 -DA:88,1 -DA:91,0 -DA:95,1 -DA:96,1 -DA:99,0 -DA:100,0 -DA:103,1 -DA:104,1 -DA:107,0 -DA:108,0 -DA:114,1 -DA:116,1 -DA:120,2 -DA:121,2 -DA:123,1 -DA:126,1 -DA:133,2 -DA:143,0 -DA:151,0 -DA:162,0 -DA:165,0 -DA:171,1 -DA:176,2 -DA:184,1 -DA:190,2 -LF:54 -LH:25 -end_of_record -TN: -SF:lib/apis/auth_api/auth_engine.dart -FNF:0 -FNH:0 -DA:54,3 -DA:63,3 -DA:65,3 -DA:69,9 -DA:70,6 -DA:71,6 -DA:72,6 -DA:73,6 -DA:75,3 -DA:77,3 -DA:80,2 -DA:86,2 -DA:88,2 -DA:93,3 -DA:96,1 -DA:97,1 -DA:99,6 -DA:102,6 -DA:104,8 -DA:105,2 -DA:107,2 -DA:108,2 -DA:111,2 -DA:113,2 -DA:117,2 -DA:119,4 -DA:121,2 -DA:124,4 -DA:130,6 -DA:136,2 -DA:138,2 -DA:147,2 -DA:155,2 -DA:167,6 -DA:170,6 -DA:173,2 -DA:177,0 -DA:178,0 -DA:183,0 -DA:184,0 -DA:188,6 -DA:190,2 -DA:191,2 -DA:192,2 -DA:193,4 -DA:194,2 -DA:195,2 -DA:202,2 -DA:203,2 -DA:204,2 -DA:207,4 -DA:208,4 -DA:210,2 -DA:211,0 -DA:216,2 -DA:217,0 -DA:223,2 -DA:228,4 -DA:232,0 -DA:240,0 -DA:241,0 -DA:243,2 -DA:248,4 -DA:249,2 -DA:253,2 -DA:260,2 -DA:262,2 -DA:263,2 -DA:270,2 -DA:271,4 -DA:272,6 -DA:273,8 -DA:276,2 -DA:283,0 -DA:287,0 -DA:291,2 -DA:293,2 -DA:295,2 -DA:301,6 -DA:305,2 -DA:309,6 -DA:311,4 -DA:312,2 -DA:313,2 -DA:315,2 -DA:322,2 -DA:324,2 -DA:325,8 -DA:326,4 -DA:331,1 -DA:335,1 -DA:336,1 -DA:337,1 -DA:338,1 -DA:339,3 -DA:341,2 -DA:342,2 -DA:347,2 -DA:353,4 -DA:354,2 -DA:355,4 -DA:356,4 -DA:357,4 -DA:358,4 -DA:359,4 -DA:360,2 -DA:361,2 -DA:362,5 -DA:363,1 -DA:365,2 -DA:369,2 -DA:377,6 -DA:384,2 -DA:385,2 -DA:386,0 -DA:392,3 -DA:393,9 -DA:395,3 -DA:400,2 -DA:405,4 -DA:408,2 -DA:409,2 -DA:412,4 -DA:413,4 -DA:414,2 -DA:415,2 -DA:417,2 -DA:422,4 -DA:423,2 -DA:424,2 -DA:426,2 -DA:427,2 -DA:430,0 -DA:431,0 -DA:432,0 -DA:434,0 -DA:435,0 -DA:436,0 -LF:138 -LH:120 -end_of_record -TN: -SF:lib/apis/core/core.dart -FNF:0 -FNH:0 -DA:33,7 -DA:35,7 -DA:72,9 -DA:73,9 -DA:75,0 -DA:77,0 -DA:80,0 -DA:82,0 -DA:88,10 -DA:97,20 -DA:98,10 -DA:99,10 -DA:101,20 -DA:102,20 -DA:105,20 -DA:107,10 -DA:108,10 -DA:111,0 -DA:114,20 -DA:116,10 -DA:117,10 -DA:120,0 -DA:121,0 -DA:124,10 -DA:125,10 -DA:128,0 -DA:132,20 -DA:133,10 -DA:136,0 -DA:138,20 -DA:140,10 -DA:141,10 -DA:144,0 -DA:145,0 -DA:148,10 -DA:149,10 -DA:152,0 -DA:154,10 -DA:155,10 -DA:158,0 -DA:161,20 -DA:163,10 -DA:164,10 -DA:168,20 -DA:174,9 -DA:176,18 -DA:177,18 -DA:178,18 -DA:179,18 -DA:180,18 -DA:181,18 -LF:51 -LH:38 -end_of_record -TN: -SF:lib/apis/core/crypto/crypto.dart -FNF:0 -FNH:0 -DA:24,0 -DA:35,10 -DA:40,10 -DA:41,10 -DA:43,10 -DA:45,10 -DA:49,20 -DA:51,10 -DA:54,0 -DA:56,0 -DA:57,0 -DA:60,0 -DA:62,0 -DA:65,0 -DA:66,0 -DA:67,0 -DA:70,6 -DA:72,6 -DA:74,12 -DA:75,6 -DA:78,6 -DA:84,6 -DA:86,6 -DA:87,12 -DA:88,6 -DA:91,8 -DA:96,8 -DA:98,16 -DA:100,16 -DA:104,4 -DA:106,4 -DA:107,8 -DA:110,6 -DA:112,6 -DA:113,12 -DA:116,7 -DA:122,7 -DA:126,14 -DA:128,4 -DA:129,2 -DA:130,2 -DA:131,2 -DA:135,7 -DA:137,14 -DA:138,2 -DA:139,2 -DA:140,2 -DA:143,7 -DA:148,14 -DA:151,7 -DA:152,7 -DA:158,7 -DA:164,7 -DA:166,14 -DA:168,6 -DA:171,14 -DA:172,2 -DA:173,2 -DA:174,2 -DA:176,7 -DA:181,14 -DA:186,9 -DA:188,9 -DA:190,9 -DA:191,18 -DA:192,18 -DA:193,18 -DA:202,0 -DA:204,0 -DA:206,0 -DA:211,6 -DA:212,24 -DA:213,6 -DA:216,6 -DA:217,12 -DA:220,7 -DA:222,14 -DA:238,9 -DA:239,18 -DA:241,18 -DA:242,18 -DA:245,18 -DA:248,10 -DA:249,10 -DA:250,1 -DA:254,7 -DA:256,7 -LF:87 -LH:75 -end_of_record -TN: -SF:lib/apis/core/crypto/crypto_models.dart -FNF:0 -FNH:0 -DA:9,22 -DA:11,0 -DA:12,0 -DA:15,0 -DA:16,0 -DA:27,0 -DA:43,7 -DA:57,7 -DA:72,2 -DA:82,6 -LF:10 -LH:5 -end_of_record -TN: -SF:lib/apis/core/crypto/crypto_utils.dart -FNF:0 -FNH:0 -DA:16,30 -DA:23,6 -DA:25,6 -DA:27,6 -DA:28,12 -DA:29,12 -DA:33,10 -DA:35,10 -DA:36,20 -DA:37,30 -DA:42,10 -DA:44,20 -DA:47,6 -DA:49,6 -DA:50,6 -DA:51,6 -DA:54,6 -DA:56,12 -DA:57,6 -DA:61,6 -DA:63,6 -DA:64,6 -DA:67,8 -DA:69,8 -DA:70,16 -DA:71,8 -DA:72,8 -DA:79,5 -DA:81,5 -DA:82,10 -DA:83,5 -DA:84,5 -DA:90,7 -DA:103,7 -DA:112,8 -DA:114,7 -DA:115,7 -DA:116,7 -DA:117,7 -DA:118,7 -DA:123,7 -DA:125,7 -DA:128,3 -DA:133,7 -DA:135,7 -DA:136,7 -DA:137,7 -DA:139,7 -DA:140,7 -DA:141,7 -DA:145,7 -DA:146,7 -DA:149,7 -DA:156,7 -DA:158,7 -DA:166,3 -DA:170,7 -DA:172,7 -DA:175,7 -DA:177,7 -DA:178,7 -DA:182,7 -DA:183,3 -DA:185,3 -DA:187,3 -DA:189,14 -DA:190,7 -DA:191,7 -DA:192,7 -DA:194,7 -DA:203,7 -DA:208,7 -DA:209,7 -DA:210,6 -DA:212,7 -DA:213,7 -DA:219,7 -DA:226,7 -DA:236,7 -DA:243,7 -DA:247,14 -DA:248,3 -DA:249,3 -LF:83 -LH:83 -end_of_record -TN: -SF:lib/apis/core/echo/echo.dart -FNF:0 -FNH:0 -DA:10,11 -DA:12,1 -DA:14,2 -DA:15,3 -DA:16,2 -DA:22,2 -DA:23,3 -DA:24,4 -DA:27,0 -DA:31,1 -DA:33,2 -DA:34,3 -DA:35,2 -DA:40,2 -DA:41,3 -DA:42,4 -DA:45,0 -LF:17 -LH:15 -end_of_record -TN: -SF:lib/apis/core/echo/echo_client.dart -FNF:0 -FNH:0 -DA:14,11 -DA:16,1 -DA:22,1 -DA:24,3 -DA:25,2 -DA:28,2 -DA:31,2 -DA:32,1 -DA:35,1 -DA:40,3 -DA:42,2 -DA:44,2 -DA:45,1 -LF:13 -LH:13 -end_of_record -TN: -SF:lib/apis/core/echo/models/echo_body.dart -FNF:0 -FNH:0 -DA:11,1 -DA:17,0 -DA:18,0 -DA:20,2 -LF:4 -LH:2 -end_of_record -TN: -SF:lib/apis/core/echo/models/echo_response.dart -FNF:0 -FNH:0 -DA:11,1 -DA:17,1 -DA:18,1 -DA:20,0 -DA:28,1 -DA:30,1 -DA:31,1 -DA:33,0 -DA:42,1 -DA:48,2 -DA:50,0 -LF:11 -LH:8 -end_of_record -TN: -SF:lib/apis/core/heartbit/heartbeat.dart -FNF:0 -FNH:0 -DA:12,10 -DA:14,9 -DA:16,9 -DA:17,18 -DA:18,18 -DA:19,18 -DA:23,0 -DA:25,0 -DA:26,0 -LF:9 -LH:6 -end_of_record -TN: -SF:lib/apis/core/pairing/expirer.dart -FNF:0 -FNH:0 -DA:11,10 -DA:18,0 -DA:20,0 -DA:22,0 -DA:23,0 -DA:32,6 -DA:34,6 -DA:36,12 -DA:37,12 -DA:38,6 -DA:39,4 -DA:47,4 -DA:49,4 -DA:51,8 -DA:56,8 -DA:57,4 -DA:62,4 -LF:17 -LH:13 -end_of_record -TN: -SF:lib/apis/core/pairing/json_rpc_history.dart -FNF:0 -FNH:0 -DA:7,11 -DA:14,1 -DA:16,1 -DA:19,2 -DA:20,2 -DA:24,1 -DA:27,1 -DA:31,2 -DA:32,1 -DA:33,1 -DA:34,0 -DA:36,1 -LF:12 -LH:11 -end_of_record -TN: -SF:lib/apis/core/pairing/pairing.dart -FNF:0 -FNH:0 -DA:29,6 -DA:66,10 -DA:73,9 -DA:75,9 -DA:79,9 -DA:80,9 -DA:81,9 -DA:83,27 -DA:84,18 -DA:85,18 -DA:86,18 -DA:88,9 -DA:90,9 -DA:92,9 -DA:95,6 -DA:97,12 -DA:98,24 -DA:102,7 -DA:104,7 -DA:105,28 -DA:106,21 -DA:107,7 -DA:110,7 -DA:111,7 -DA:116,20 -DA:118,7 -DA:119,14 -DA:120,14 -DA:128,14 -DA:129,7 -DA:134,14 -DA:135,21 -DA:136,21 -DA:138,7 -DA:145,7 -DA:150,7 -DA:153,7 -DA:156,7 -DA:157,14 -DA:158,3 -DA:164,7 -DA:165,14 -DA:166,14 -DA:167,7 -DA:172,14 -DA:176,7 -DA:177,14 -DA:178,21 -DA:180,4 -DA:182,8 -DA:183,4 -DA:184,4 -DA:198,14 -DA:199,21 -DA:200,28 -DA:203,21 -DA:205,14 -DA:206,7 -DA:212,2 -DA:221,7 -DA:223,7 -DA:224,7 -DA:229,14 -DA:230,7 -DA:236,14 -DA:241,21 -DA:244,9 -DA:250,18 -DA:251,6 -DA:252,6 -DA:260,27 -DA:267,2 -DA:273,2 -DA:274,4 -DA:276,2 -DA:279,2 -DA:286,1 -DA:291,1 -DA:294,1 -DA:295,1 -DA:304,2 -DA:308,3 -DA:314,5 -DA:319,5 -DA:320,10 -DA:326,9 -DA:328,18 -DA:331,4 -DA:333,8 -DA:336,5 -DA:338,5 -DA:340,5 -DA:342,10 -DA:344,5 -DA:347,5 -DA:352,4 -DA:354,4 -DA:356,4 -DA:357,8 -DA:360,4 -DA:363,8 -DA:368,8 -DA:370,8 -DA:371,4 -DA:378,5 -DA:380,5 -DA:383,6 -DA:385,12 -DA:386,4 -DA:388,4 -DA:392,18 -DA:393,0 -DA:395,0 -DA:402,6 -DA:411,18 -DA:412,6 -DA:415,6 -DA:422,18 -DA:432,12 -DA:434,4 -DA:438,12 -DA:439,21 -DA:442,18 -DA:444,18 -DA:447,6 -DA:448,6 -DA:453,6 -DA:454,0 -DA:458,12 -DA:459,0 -DA:462,12 -DA:468,6 -DA:476,18 -DA:477,6 -DA:480,6 -DA:484,18 -DA:494,12 -DA:495,18 -DA:498,6 -DA:499,6 -DA:503,3 -DA:512,9 -DA:513,3 -DA:516,3 -DA:520,9 -DA:531,3 -DA:532,0 -DA:533,6 -DA:537,9 -DA:540,3 -DA:541,3 -DA:547,9 -DA:549,27 -DA:554,16 -DA:555,8 -DA:556,0 -DA:558,0 -DA:563,2 -DA:564,6 -DA:565,4 -DA:566,6 -DA:568,6 -DA:572,9 -DA:573,9 -DA:574,9 -DA:575,3 -DA:577,9 -DA:578,10 -DA:580,2 -DA:584,9 -DA:585,9 -DA:586,9 -DA:587,4 -DA:589,9 -DA:591,10 -DA:593,4 -DA:598,9 -DA:599,9 -DA:600,12 -DA:601,9 -DA:603,10 -DA:605,3 -DA:609,7 -DA:610,7 -DA:611,0 -DA:619,9 -DA:620,45 -DA:621,45 -DA:623,9 -DA:625,9 -DA:628,9 -DA:630,9 -DA:635,0 -DA:637,0 -DA:640,6 -DA:647,18 -DA:650,6 -DA:654,18 -DA:655,6 -DA:656,6 -DA:657,6 -DA:658,2 -DA:667,6 -DA:668,24 -DA:672,6 -DA:673,6 -DA:674,18 -DA:675,36 -DA:677,0 -DA:682,6 -DA:694,18 -DA:695,6 -DA:696,15 -DA:697,9 -DA:698,3 -DA:699,6 -DA:704,30 -DA:705,36 -DA:711,5 -DA:715,5 -DA:718,5 -DA:719,5 -DA:722,5 -DA:725,10 -DA:726,5 -DA:731,0 -DA:733,0 -DA:736,0 -DA:742,4 -DA:747,4 -DA:749,4 -DA:750,4 -DA:753,4 -DA:756,8 -DA:757,8 -DA:758,4 -DA:763,0 -DA:764,0 -DA:767,0 -DA:773,0 -DA:777,0 -DA:778,0 -DA:780,0 -DA:783,0 -DA:786,0 -DA:787,0 -DA:790,0 -DA:791,0 -DA:793,0 -DA:794,0 -DA:800,9 -DA:801,45 -DA:804,9 -DA:805,45 -DA:808,4 -DA:813,12 -DA:815,2 -DA:816,2 -DA:817,1 -DA:818,1 -DA:824,6 -DA:825,6 -DA:830,5 -DA:831,5 -DA:834,4 -DA:835,4 -LF:266 -LH:238 -end_of_record -TN: -SF:lib/apis/core/pairing/pairing_store.dart -FNF:0 -FNH:0 -DA:6,11 -DA:13,8 -DA:20,8 -DA:22,8 -DA:28,16 -DA:31,14 -DA:34,10 -DA:37,8 -LF:8 -LH:8 -end_of_record -TN: -SF:lib/apis/core/pairing/utils/json_rpc_utils.dart -FNF:0 -FNH:0 -DA:8,8 -DA:9,8 -DA:10,24 -DA:11,32 -DA:12,8 -DA:15,6 -DA:20,6 -DA:21,6 -DA:28,6 -DA:32,6 -DA:39,3 -DA:40,3 -DA:43,3 -DA:47,7 -DA:51,7 -DA:54,13 -DA:55,24 -DA:57,4 -DA:62,7 -DA:65,4 -DA:68,8 -LF:21 -LH:21 -end_of_record -TN: -SF:lib/apis/core/pairing/utils/pairing_models.dart -FNF:0 -FNH:0 -DA:28,0 -DA:29,0 -DA:44,0 -DA:51,5 -DA:52,5 -DA:63,0 -DA:64,0 -DA:72,7 -DA:78,0 -DA:80,0 -DA:88,4 -DA:93,0 -DA:95,0 -DA:102,0 -DA:104,0 -DA:106,0 -DA:113,4 -DA:117,0 -DA:119,0 -DA:128,7 -DA:134,0 -DA:136,0 -DA:144,7 -DA:149,0 -DA:151,0 -DA:168,0 -DA:169,0 -DA:181,0 -DA:182,0 -DA:190,9 -DA:196,0 -DA:198,0 -LF:32 -LH:8 -end_of_record -TN: -SF:lib/apis/core/relay_auth/relay_auth.dart -FNF:0 -FNH:0 -DA:20,9 -DA:25,0 -DA:26,0 -DA:27,0 -DA:29,9 -DA:30,9 -DA:33,9 -DA:34,18 -DA:35,18 -DA:39,10 -DA:47,36 -DA:48,10 -DA:49,20 -DA:50,10 -DA:51,10 -DA:58,10 -DA:59,10 -DA:64,10 -DA:65,20 -DA:69,20 -DA:72,1 -DA:74,1 -DA:77,3 -DA:78,3 -DA:79,0 -DA:85,3 -DA:86,1 -DA:87,1 -DA:88,2 -DA:89,2 -DA:103,10 -DA:104,10 -DA:107,10 -DA:109,10 -DA:110,10 -DA:111,10 -DA:113,10 -DA:118,1 -DA:120,1 -DA:121,1 -DA:122,1 -DA:123,1 -DA:132,10 -DA:134,20 -DA:136,50 -DA:137,10 -DA:141,10 -DA:145,1 -DA:147,1 -DA:148,4 -DA:149,0 -DA:151,1 -DA:154,1 -DA:155,1 -DA:156,0 -DA:163,3 -DA:166,3 -DA:167,1 -DA:168,0 -DA:175,1 -DA:176,2 -DA:177,0 -DA:186,10 -DA:188,10 -DA:189,30 -DA:190,30 -DA:191,10 -DA:193,20 -DA:196,0 -DA:198,0 -DA:200,0 -DA:201,0 -DA:203,0 -DA:206,10 -DA:208,20 -DA:211,1 -DA:213,3 -DA:216,10 -DA:218,10 -DA:219,30 -DA:220,30 -DA:221,30 -DA:222,10 -DA:225,1 -DA:227,1 -DA:229,3 -DA:230,3 -DA:231,2 -DA:232,3 -DA:234,1 -LF:90 -LH:77 -end_of_record -TN: -SF:lib/apis/core/relay_auth/relay_auth_models.dart -FNF:0 -FNH:0 -DA:14,9 -DA:17,9 -DA:18,9 -DA:20,1 -DA:23,2 -DA:24,2 -DA:35,10 -DA:40,1 -DA:41,1 -DA:43,20 -DA:54,10 -DA:62,1 -DA:63,1 -DA:65,20 -DA:72,10 -DA:78,10 -DA:82,20 -DA:88,1 -DA:93,1 -DA:100,0 -DA:110,0 -LF:21 -LH:19 -end_of_record -TN: -SF:lib/apis/core/relay_client/i_relay_client.dart -FNF:0 -FNH:0 -DA:10,0 -LF:1 -LH:0 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/error_code.dart -FNF:0 -FNH:0 -DA:42,0 -DA:44,0 -DA:46,0 -DA:48,0 -DA:50,0 -DA:52,0 -LF:6 -LH:0 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/client.dart -FNF:0 -FNH:0 -DA:40,24 -DA:46,24 -DA:52,0 -DA:53,0 -DA:54,0 -DA:64,8 -DA:65,24 -DA:66,21 -DA:67,15 -DA:68,10 -DA:70,16 -DA:71,8 -DA:82,8 -DA:83,32 -DA:84,0 -DA:85,0 -DA:86,0 -DA:87,0 -DA:88,0 -DA:90,8 -DA:97,8 -DA:98,24 -DA:99,32 -DA:100,8 -DA:116,8 -DA:117,0 -DA:118,8 -DA:120,8 -DA:121,32 -DA:122,8 -DA:137,0 -DA:138,0 -DA:144,8 -DA:145,8 -DA:146,8 -DA:147,0 -DA:150,8 -DA:152,8 -DA:153,8 -DA:154,8 -DA:156,8 -DA:157,0 -DA:159,24 -DA:175,0 -DA:176,0 -DA:177,0 -DA:181,0 -DA:182,0 -DA:183,0 -DA:184,0 -DA:189,8 -DA:190,8 -DA:191,0 -DA:193,8 -DA:199,8 -DA:200,8 -DA:201,8 -DA:202,8 -DA:203,16 -DA:204,8 -DA:205,21 -DA:207,8 -DA:208,20 -DA:209,8 -DA:210,4 -DA:215,8 -DA:216,8 -DA:217,16 -DA:218,8 -DA:219,8 -DA:220,16 -DA:221,8 -DA:223,4 -DA:224,4 -DA:225,4 -DA:226,8 -DA:227,8 -DA:243,8 -LF:78 -LH:57 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/exception.dart -FNF:0 -FNH:0 -DA:29,4 -DA:34,0 -DA:35,0 -DA:41,0 -DA:42,0 -DA:46,0 -DA:48,0 -DA:49,0 -DA:50,0 -DA:51,0 -DA:52,0 -DA:54,0 -DA:57,0 -DA:58,0 -DA:59,0 -DA:61,0 -DA:66,0 -DA:68,0 -DA:69,0 -DA:70,0 -DA:71,0 -LF:21 -LH:1 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/parameters.dart -FNF:0 -FNH:0 -DA:31,7 -DA:46,7 -DA:47,7 -DA:48,0 -DA:49,0 -DA:50,0 -DA:52,0 -DA:54,7 -DA:55,7 -DA:56,14 -DA:57,28 -DA:59,0 -DA:62,0 -DA:68,0 -DA:69,0 -DA:70,0 -DA:74,0 -DA:75,0 -DA:76,0 -DA:80,0 -DA:81,0 -DA:82,0 -DA:87,7 -DA:88,14 -DA:89,0 -DA:128,0 -DA:129,0 -DA:130,0 -DA:133,0 -DA:134,0 -DA:138,0 -DA:139,0 -DA:140,0 -DA:143,0 -DA:144,0 -DA:145,0 -DA:146,0 -DA:149,0 -DA:153,0 -DA:155,7 -DA:156,7 -DA:159,0 -DA:165,0 -DA:170,0 -DA:180,0 -DA:189,0 -DA:195,0 -DA:200,0 -DA:206,0 -DA:211,0 -DA:217,0 -DA:218,0 -DA:223,0 -DA:229,7 -DA:230,21 -DA:235,0 -DA:242,0 -DA:248,0 -DA:255,0 -DA:261,0 -DA:268,7 -DA:269,21 -DA:270,0 -DA:271,0 -DA:274,0 -DA:275,0 -DA:277,0 -DA:278,0 -DA:282,0 -DA:283,0 -DA:286,0 -DA:289,0 -DA:290,0 -DA:291,0 -DA:295,0 -DA:298,0 -DA:301,7 -DA:304,7 -DA:310,0 -DA:312,0 -DA:313,0 -DA:316,0 -DA:319,0 -DA:320,0 -DA:322,0 -DA:325,0 -DA:328,0 -DA:331,0 -DA:334,0 -DA:337,0 -DA:340,0 -DA:343,0 -DA:346,0 -LF:93 -LH:17 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/peer.dart -FNF:0 -FNH:0 -DA:39,56 -DA:41,8 -DA:42,32 -DA:44,0 -DA:45,0 -DA:47,0 -DA:48,0 -DA:62,8 -DA:64,8 -DA:65,32 -DA:84,8 -DA:86,16 -DA:87,40 -DA:90,16 -DA:91,40 -DA:96,8 -DA:98,16 -DA:100,0 -DA:102,0 -DA:104,0 -DA:105,0 -DA:109,8 -DA:111,16 -DA:113,0 -DA:115,0 -DA:119,8 -DA:121,16 -DA:122,16 -DA:123,32 -DA:124,8 -DA:125,16 -DA:126,16 -DA:128,14 -DA:130,0 -DA:131,0 -DA:132,0 -DA:133,0 -DA:134,0 -DA:135,0 -DA:137,0 -DA:142,0 -DA:144,0 -DA:145,0 -DA:146,8 -DA:147,8 -DA:150,8 -DA:152,16 -DA:153,16 -DA:154,8 -LF:49 -LH:29 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/server.dart -FNF:0 -FNH:0 -DA:50,24 -DA:56,24 -DA:84,0 -DA:86,0 -DA:87,0 -DA:106,8 -DA:115,8 -DA:116,32 -DA:117,0 -DA:118,0 -DA:119,0 -DA:120,0 -DA:122,8 -DA:129,8 -DA:130,24 -DA:131,32 -DA:132,8 -DA:144,8 -DA:145,16 -DA:146,0 -DA:149,16 -DA:163,0 -DA:164,0 -DA:174,7 -DA:176,7 -DA:177,0 -DA:178,0 -DA:180,0 -DA:182,0 -DA:183,0 -DA:184,0 -DA:185,0 -DA:188,7 -DA:192,28 -DA:196,7 -DA:198,7 -DA:200,7 -DA:201,14 -DA:202,0 -DA:205,7 -DA:206,0 -DA:207,0 -DA:210,0 -DA:212,21 -DA:217,7 -DA:219,14 -DA:221,0 -DA:222,0 -DA:223,0 -DA:224,0 -DA:226,0 -DA:229,0 -DA:230,0 -DA:233,0 -DA:234,0 -DA:235,0 -DA:236,0 -DA:237,0 -DA:238,0 -DA:243,7 -DA:244,7 -DA:245,0 -DA:251,14 -DA:252,0 -DA:258,7 -DA:259,14 -DA:260,0 -DA:261,0 -DA:263,0 -DA:266,7 -DA:267,0 -DA:273,7 -DA:274,14 -DA:275,0 -DA:276,0 -DA:278,0 -DA:281,7 -DA:282,7 -DA:283,14 -DA:284,0 -DA:285,0 -DA:287,0 -DA:291,7 -DA:292,14 -DA:293,0 -DA:294,0 -DA:296,0 -DA:301,0 -DA:302,0 -DA:304,0 -DA:305,0 -DA:306,0 -DA:310,0 -DA:311,0 -DA:312,0 -DA:313,0 -DA:317,0 -LF:97 -LH:38 -end_of_record -TN: -SF:lib/apis/core/relay_client/json_rpc_2/src/utils.dart -FNF:0 -FNH:0 -DA:16,0 -DA:22,0 -DA:23,0 -DA:30,0 -DA:33,0 -DA:35,0 -DA:39,0 -DA:40,0 -DA:42,0 -DA:47,0 -DA:48,0 -DA:49,0 -DA:50,0 -DA:54,16 -DA:55,8 -DA:59,8 -DA:61,16 -DA:62,8 -DA:64,0 -DA:65,0 -DA:66,0 -DA:67,0 -LF:22 -LH:5 -end_of_record -TN: -SF:lib/apis/core/relay_client/message_tracker.dart -FNF:0 -FNH:0 -DA:12,11 -DA:19,8 -DA:20,8 -DA:21,16 -DA:22,8 -DA:23,8 -DA:29,8 -DA:31,8 -DA:33,16 -DA:34,8 -DA:36,8 -DA:40,16 -DA:41,24 -DA:43,24 -DA:44,8 -DA:47,8 -DA:49,8 -DA:50,40 -LF:18 -LH:18 -end_of_record -TN: -SF:lib/apis/core/relay_client/relay_client.dart -FNF:0 -FNH:0 -DA:55,9 -DA:56,25 -DA:58,20 -DA:81,10 -DA:86,10 -DA:88,9 -DA:90,9 -DA:94,18 -DA:95,18 -DA:98,9 -DA:99,9 -DA:101,9 -DA:104,7 -DA:111,7 -DA:113,7 -DA:121,14 -DA:122,7 -DA:123,7 -DA:125,7 -DA:129,15 -DA:133,7 -DA:135,7 -DA:137,21 -DA:139,14 -DA:142,5 -DA:144,5 -DA:146,10 -DA:149,5 -DA:150,5 -DA:151,5 -DA:155,5 -DA:158,12 -DA:162,10 -DA:163,10 -DA:166,10 -DA:169,0 -DA:171,0 -DA:173,0 -DA:175,0 -DA:178,8 -DA:180,8 -DA:182,24 -DA:184,8 -DA:189,9 -DA:190,9 -DA:194,36 -DA:195,63 -DA:198,9 -DA:199,9 -DA:204,18 -DA:205,9 -DA:206,8 -DA:207,8 -DA:209,2 -DA:210,0 -DA:211,0 -DA:212,0 -DA:213,0 -DA:215,10 -DA:216,6 -DA:217,2 -DA:221,9 -DA:222,27 -DA:223,9 -DA:225,9 -DA:227,17 -DA:228,9 -DA:229,18 -DA:230,9 -DA:233,16 -DA:237,9 -DA:238,9 -DA:239,9 -DA:240,45 -DA:241,36 -DA:242,9 -DA:245,18 -DA:248,18 -DA:249,9 -DA:252,9 -DA:253,0 -DA:254,0 -DA:257,36 -DA:258,18 -DA:259,34 -DA:261,32 -DA:263,16 -DA:264,8 -DA:265,8 -DA:267,16 -DA:268,8 -DA:269,8 -DA:271,16 -DA:272,8 -DA:273,8 -DA:276,16 -DA:283,16 -DA:286,8 -DA:287,24 -DA:288,8 -DA:289,8 -DA:290,16 -DA:291,16 -DA:296,16 -DA:297,56 -DA:300,8 -DA:301,8 -DA:302,0 -DA:305,8 -DA:307,32 -DA:309,8 -DA:314,1 -DA:316,1 -DA:317,0 -DA:319,1 -DA:320,1 -DA:323,2 -DA:324,2 -DA:333,9 -DA:334,9 -DA:335,45 -DA:336,9 -DA:340,9 -DA:341,45 -DA:342,9 -DA:345,5 -DA:346,5 -DA:347,0 -DA:351,8 -DA:352,8 -DA:357,7 -DA:358,28 -DA:360,7 -DA:361,24 -DA:366,14 -DA:369,14 -DA:370,7 -DA:378,7 -DA:379,21 -DA:380,21 -DA:381,7 -DA:384,0 -DA:385,0 -DA:388,0 -DA:389,0 -DA:394,7 -DA:395,7 -DA:396,14 -DA:401,8 -DA:407,8 -DA:411,5 -DA:412,0 -DA:415,10 -DA:416,0 -DA:422,16 -DA:429,7 -DA:432,7 -DA:433,7 -DA:434,7 -DA:435,7 -DA:438,4 -DA:439,3 -DA:446,21 -DA:447,14 -DA:452,7 -DA:453,14 -DA:457,0 -DA:458,0 -DA:459,0 -DA:465,8 -DA:466,8 -DA:467,0 -LF:172 -LH:149 -end_of_record -TN: -SF:lib/apis/core/relay_client/relay_client_models.dart -FNF:0 -FNH:0 -DA:11,12 -DA:16,8 -DA:18,8 -DA:25,7 -DA:30,0 -DA:31,0 -DA:37,8 -DA:45,0 -DA:53,0 -DA:56,0 -LF:10 -LH:5 -end_of_record -TN: -SF:lib/apis/core/relay_client/websocket/http_client.dart -FNF:0 -FNH:0 -DA:5,82 -DA:7,0 -DA:12,0 -DA:15,0 -DA:17,0 -DA:20,0 -DA:26,0 -LF:7 -LH:1 -end_of_record -TN: -SF:lib/apis/core/relay_client/websocket/i_http_client.dart -FNF:0 -FNH:0 -DA:4,82 -LF:1 -LH:1 -end_of_record -TN: -SF:lib/apis/core/relay_client/websocket/websocket_handler.dart -FNF:0 -FNH:0 -DA:10,8 -DA:11,8 -DA:15,8 -DA:16,16 -DA:17,8 -DA:18,16 -DA:21,8 -DA:22,8 -DA:24,0 -DA:25,0 -DA:29,8 -DA:33,8 -DA:35,8 -DA:38,8 -DA:42,16 -DA:43,8 -DA:44,16 -DA:48,0 -DA:49,0 -DA:50,0 -DA:54,24 -DA:56,8 -DA:58,0 -DA:59,0 -DA:61,0 -DA:65,16 -DA:76,8 -DA:79,8 -DA:80,24 -DA:83,8 -DA:86,0 -DA:88,0 -LF:32 -LH:22 -end_of_record -TN: -SF:lib/apis/core/store/generic_store.dart -FNF:0 -FNH:0 -DA:14,12 -DA:15,36 -DA:36,12 -DA:43,12 -DA:45,12 -DA:49,24 -DA:50,12 -DA:52,12 -DA:55,8 -DA:57,8 -DA:58,16 -DA:61,12 -DA:63,12 -DA:64,24 -DA:65,20 -DA:70,10 -DA:72,30 -DA:75,12 -DA:77,12 -DA:79,24 -DA:80,18 -DA:81,9 -DA:87,24 -DA:88,12 -DA:95,24 -DA:97,12 -DA:100,9 -DA:102,9 -DA:104,18 -DA:108,18 -DA:109,9 -DA:111,18 -DA:115,9 -DA:118,12 -DA:120,12 -DA:122,24 -DA:123,12 -DA:126,48 -DA:129,12 -DA:132,36 -DA:134,60 -DA:135,48 -DA:141,32 -DA:142,16 -DA:144,4 -DA:145,5 -DA:146,4 -DA:150,24 -DA:154,34 -DA:156,12 -DA:160,2 -DA:165,12 -DA:167,12 -DA:168,0 -LF:54 -LH:53 -end_of_record -TN: -SF:lib/apis/core/store/shared_prefs_store.dart -FNF:0 -FNH:0 -DA:14,0 -DA:15,0 -DA:17,0 -DA:18,0 -DA:20,0 -DA:21,0 -DA:23,12 -DA:28,12 -DA:31,12 -DA:34,12 -DA:36,12 -DA:40,12 -DA:41,0 -DA:44,12 -DA:49,8 -DA:51,8 -DA:53,8 -DA:54,16 -DA:55,16 -DA:58,1 -DA:60,0 -DA:65,12 -DA:67,12 -DA:68,12 -DA:69,24 -DA:71,0 -DA:75,0 -DA:77,0 -DA:78,0 -DA:82,12 -DA:84,12 -DA:86,12 -DA:87,24 -DA:88,12 -DA:92,0 -DA:94,0 -DA:96,0 -DA:97,0 -DA:98,0 -DA:100,0 -DA:101,0 -DA:106,1 -DA:108,1 -DA:110,1 -DA:111,2 -DA:112,1 -DA:115,1 -DA:116,1 -DA:120,0 -DA:121,0 -DA:122,0 -DA:124,0 -DA:128,12 -DA:129,12 -DA:134,0 -DA:135,0 -DA:136,0 -DA:137,0 -DA:139,0 -DA:144,1 -DA:145,1 -DA:148,0 -DA:151,12 -DA:152,24 -DA:155,12 -DA:156,12 -DA:157,0 -LF:67 -LH:37 -end_of_record -TN: -SF:lib/apis/core/store/store_models.dart -FNF:0 -FNH:0 -DA:7,12 -DA:17,9 -DA:27,9 -DA:34,12 -LF:4 -LH:4 -end_of_record -TN: -SF:lib/apis/core/verify/models/verify_context.dart -FNF:0 -FNH:0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:15,0 -DA:28,0 -DA:29,0 -DA:41,0 -DA:42,0 -DA:49,8 -LF:9 -LH:1 -end_of_record -TN: -SF:lib/apis/core/verify/verify.dart -FNF:0 -FNH:0 -DA:14,10 -DA:20,5 -DA:24,10 -DA:27,4 -DA:30,12 -DA:31,16 -DA:32,16 -DA:33,4 -DA:38,0 -DA:39,0 -DA:41,0 -DA:43,20 -DA:48,5 -DA:51,5 -DA:52,0 -DA:53,0 -LF:16 -LH:11 -end_of_record -TN: -SF:lib/apis/models/basic_models.dart -FNF:0 -FNH:0 -DA:20,0 -DA:21,0 -DA:42,5 -DA:43,5 -LF:4 -LH:2 -end_of_record -TN: -SF:lib/apis/models/json_rpc_error.dart -FNF:0 -FNH:0 -DA:14,0 -DA:15,0 -DA:16,3 -DA:17,6 -DA:18,0 -DA:19,0 -DA:20,0 -DA:21,0 -DA:22,3 -DA:23,6 -DA:25,3 -DA:26,3 -LF:12 -LH:6 -end_of_record -TN: -SF:lib/apis/models/json_rpc_request.dart -FNF:0 -FNH:0 -DA:16,6 -DA:17,6 -LF:2 -LH:2 -end_of_record -TN: -SF:lib/apis/models/json_rpc_response.dart -FNF:0 -FNH:0 -DA:17,6 -DA:18,12 -LF:2 -LH:2 -end_of_record -TN: -SF:lib/apis/models/uri_parse_result.dart -FNF:0 -FNH:0 -DA:15,8 -DA:28,5 -DA:39,8 -LF:3 -LH:3 -end_of_record -TN: -SF:lib/apis/sign_api/models/auth/auth_client_events.dart -FNF:0 -FNH:0 -DA:15,2 -DA:22,0 -DA:24,0 -DA:35,2 -DA:43,0 -DA:44,0 -DA:45,0 -DA:46,0 -DA:47,0 -DA:48,0 -DA:51,0 -DA:53,0 -LF:12 -LH:2 -end_of_record -TN: -SF:lib/apis/sign_api/models/auth/auth_client_models.dart -FNF:0 -FNH:0 -DA:18,2 -DA:47,3 -DA:59,3 -DA:61,0 -DA:62,0 -DA:63,0 -DA:64,0 -DA:65,0 -DA:66,0 -DA:67,0 -DA:68,0 -DA:69,0 -DA:70,0 -DA:71,0 -DA:72,0 -DA:96,2 -DA:97,2 -DA:98,2 -DA:99,2 -DA:100,2 -DA:101,2 -DA:102,2 -DA:104,2 -DA:105,2 -DA:106,2 -DA:107,2 -DA:108,2 -DA:109,2 -DA:110,2 -DA:111,2 -DA:112,2 -DA:113,2 -DA:114,2 -DA:115,2 -DA:116,2 -DA:117,2 -DA:118,2 -DA:122,2 -DA:123,2 -DA:136,0 -DA:137,0 -DA:147,0 -DA:161,0 -LF:43 -LH:27 -end_of_record -TN: -SF:lib/apis/sign_api/models/auth/common_auth_models.dart -FNF:0 -FNH:0 -DA:16,0 -DA:17,0 -DA:36,2 -DA:37,2 -DA:38,2 -DA:39,2 -DA:40,2 -DA:41,2 -DA:42,2 -DA:43,2 -DA:44,2 -DA:45,2 -DA:46,2 -DA:47,2 -DA:51,0 -DA:54,0 -DA:55,0 -DA:56,0 -DA:57,0 -DA:58,0 -DA:59,0 -DA:60,0 -DA:61,0 -DA:62,0 -DA:63,0 -DA:64,0 -DA:68,2 -DA:69,2 -DA:70,2 -DA:71,2 -DA:72,2 -DA:73,2 -DA:74,2 -DA:75,2 -DA:76,2 -DA:77,2 -DA:78,2 -DA:79,2 -DA:83,0 -DA:84,0 -DA:104,2 -DA:108,2 -DA:110,2 -DA:111,2 -DA:112,2 -DA:113,2 -DA:114,2 -DA:115,2 -DA:116,2 -DA:117,2 -DA:118,2 -DA:119,2 -DA:123,2 -DA:124,2 -DA:137,2 -DA:138,2 -DA:153,2 -DA:154,2 -DA:166,4 -DA:180,2 -DA:185,2 -DA:188,2 -DA:189,2 -DA:190,2 -DA:194,0 -DA:195,0 -LF:66 -LH:48 -end_of_record -TN: -SF:lib/apis/sign_api/models/auth/session_auth_events.dart -FNF:0 -FNH:0 -DA:19,0 -DA:27,0 -DA:28,0 -DA:29,0 -DA:30,0 -DA:31,0 -DA:32,0 -DA:35,0 -DA:37,0 -DA:49,0 -DA:58,0 -DA:59,0 -DA:60,0 -DA:61,0 -DA:62,0 -DA:63,0 -DA:64,0 -DA:67,0 -DA:69,0 -LF:19 -LH:0 -end_of_record -TN: -SF:lib/apis/sign_api/models/auth/session_auth_models.dart -FNF:0 -FNH:0 -DA:20,0 -DA:47,0 -DA:48,0 -DA:71,0 -DA:74,0 -DA:75,0 -DA:76,0 -DA:77,0 -DA:78,0 -DA:79,0 -DA:80,0 -DA:82,0 -DA:83,0 -DA:84,0 -DA:85,0 -DA:86,0 -DA:87,0 -DA:88,0 -DA:89,0 -DA:90,0 -DA:91,0 -DA:92,0 -DA:93,0 -DA:94,0 -DA:95,0 -DA:99,0 -DA:100,0 -DA:115,0 -DA:116,0 -LF:29 -LH:0 -end_of_record -TN: -SF:lib/apis/sign_api/models/json_rpc_models.dart -FNF:0 -FNH:0 -DA:21,0 -DA:22,0 -DA:32,0 -DA:33,0 -DA:47,4 -DA:48,4 -DA:59,0 -DA:60,0 -DA:76,4 -DA:77,4 -DA:87,3 -DA:88,3 -DA:98,3 -DA:99,3 -DA:111,3 -DA:112,3 -DA:122,3 -DA:123,3 -DA:134,3 -DA:135,3 -DA:146,3 -DA:147,3 -DA:158,3 -DA:159,3 -DA:170,3 -DA:171,3 -DA:184,2 -DA:185,2 -DA:195,0 -DA:196,0 -DA:208,0 -DA:209,0 -DA:220,0 -DA:221,0 -LF:34 -LH:22 -end_of_record -TN: -SF:lib/apis/sign_api/models/proposal_models.dart -FNF:0 -FNH:0 -DA:18,4 -DA:19,4 -DA:30,0 -DA:31,0 -DA:49,0 -DA:50,0 -LF:6 -LH:2 -end_of_record -TN: -SF:lib/apis/sign_api/models/session_models.dart -FNF:0 -FNH:0 -DA:21,4 -DA:31,0 -DA:33,0 -DA:47,4 -DA:48,4 -DA:69,0 -DA:70,0 -DA:85,0 -DA:86,0 -LF:9 -LH:3 -end_of_record -TN: -SF:lib/apis/sign_api/models/sign_client_events.dart -FNF:0 -FNH:0 -DA:14,4 -DA:20,0 -DA:21,0 -DA:22,0 -DA:23,0 -DA:26,0 -DA:28,0 -DA:38,0 -DA:45,0 -DA:47,0 -DA:54,4 -DA:58,0 -DA:60,0 -DA:69,3 -DA:75,0 -DA:77,0 -DA:85,3 -DA:87,0 -DA:89,0 -DA:97,3 -DA:99,0 -DA:101,0 -DA:109,3 -DA:114,0 -DA:116,0 -DA:123,3 -DA:125,0 -DA:127,0 -DA:138,3 -DA:146,3 -DA:149,3 -DA:150,3 -DA:151,3 -DA:152,3 -DA:153,3 -DA:154,3 -DA:158,0 -DA:160,0 -DA:171,3 -DA:179,0 -DA:181,0 -DA:188,0 -DA:190,0 -DA:192,0 -LF:44 -LH:16 -end_of_record -TN: -SF:lib/apis/sign_api/models/sign_client_models.dart -FNF:0 -FNH:0 -DA:10,4 -DA:16,0 -DA:18,0 -DA:26,4 -DA:31,0 -DA:33,0 -LF:6 -LH:2 -end_of_record -TN: -SF:lib/apis/sign_api/sessions.dart -FNF:0 -FNH:0 -DA:7,6 -DA:14,5 -DA:20,5 -DA:22,5 -DA:28,10 -DA:31,6 -DA:34,5 -LF:7 -LH:7 -end_of_record -TN: -SF:lib/apis/sign_api/sign_client.dart -FNF:0 -FNH:0 -DA:15,1 -DA:16,2 -DA:17,1 -DA:18,2 -DA:19,1 -DA:20,2 -DA:21,1 -DA:22,2 -DA:23,1 -DA:24,2 -DA:25,1 -DA:26,2 -DA:27,1 -DA:28,2 -DA:29,0 -DA:31,0 -DA:32,1 -DA:33,2 -DA:34,1 -DA:35,2 -DA:36,1 -DA:37,2 -DA:39,1 -DA:40,2 -DA:41,0 -DA:42,0 -DA:43,1 -DA:44,2 -DA:45,1 -DA:46,2 -DA:47,1 -DA:48,2 -DA:53,0 -DA:60,0 -DA:61,0 -DA:69,0 -DA:74,1 -DA:78,2 -DA:81,1 -DA:82,1 -DA:85,0 -DA:86,0 -DA:89,1 -DA:90,1 -DA:93,0 -DA:94,0 -DA:97,1 -DA:98,1 -DA:101,0 -DA:102,0 -DA:105,1 -DA:106,1 -DA:109,0 -DA:110,0 -DA:113,1 -DA:114,1 -DA:117,0 -DA:121,1 -DA:122,1 -DA:125,0 -DA:126,0 -DA:129,1 -DA:130,1 -DA:133,0 -DA:134,0 -DA:137,1 -DA:138,1 -DA:141,0 -DA:142,0 -DA:148,1 -DA:150,1 -DA:154,2 -DA:155,2 -DA:157,1 -DA:160,1 -DA:170,2 -DA:184,1 -DA:189,2 -DA:195,1 -DA:203,2 -DA:214,1 -DA:220,2 -DA:229,1 -DA:235,2 -DA:245,1 -DA:250,2 -DA:256,1 -DA:263,2 -DA:273,1 -DA:280,2 -DA:290,0 -DA:299,0 -DA:311,0 -DA:323,0 -DA:338,1 -DA:344,2 -DA:353,1 -DA:360,2 -DA:370,1 -DA:376,2 -DA:385,1 -DA:391,2 -DA:400,1 -DA:407,2 -DA:417,1 -DA:422,2 -DA:428,1 -DA:434,2 -DA:443,1 -DA:448,2 -DA:454,1 -DA:457,2 -DA:463,1 -DA:468,2 -DA:476,1 -DA:479,2 -DA:485,1 -DA:488,2 -DA:494,0 -DA:495,0 -DA:499,0 -DA:500,0 -DA:502,0 -DA:505,0 -DA:511,0 -DA:514,0 -DA:520,0 -DA:522,0 -DA:524,0 -DA:525,0 -DA:527,0 -DA:528,0 -DA:531,0 -DA:533,0 -DA:535,0 -DA:537,0 -DA:539,0 -DA:546,0 -DA:557,0 -DA:566,0 -DA:576,0 -DA:584,0 -DA:595,0 -DA:601,0 -DA:610,0 -DA:616,0 -DA:625,0 -DA:626,0 -DA:628,0 -DA:629,0 -DA:631,0 -DA:637,0 -DA:646,0 -DA:652,0 -DA:661,0 -DA:666,0 -DA:674,0 -DA:675,0 -LF:158 -LH:91 -end_of_record -TN: -SF:lib/apis/sign_api/sign_engine.dart -FNF:0 -FNH:0 -DA:99,5 -DA:114,5 -DA:116,5 -DA:120,15 -DA:121,25 -DA:122,10 -DA:123,10 -DA:124,10 -DA:127,10 -DA:128,10 -DA:129,10 -DA:130,10 -DA:132,10 -DA:134,5 -DA:135,5 -DA:136,5 -DA:138,5 -DA:140,5 -DA:143,5 -DA:145,14 -DA:146,16 -DA:150,4 -DA:159,4 -DA:161,4 -DA:162,0 -DA:163,4 -DA:172,12 -DA:175,4 -DA:176,4 -DA:179,12 -DA:182,12 -DA:183,4 -DA:185,4 -DA:187,8 -DA:188,0 -DA:189,4 -DA:190,4 -DA:192,4 -DA:197,4 -DA:200,4 -DA:203,4 -DA:204,4 -DA:205,4 -DA:206,4 -DA:207,4 -DA:210,4 -DA:215,4 -DA:217,8 -DA:218,4 -DA:222,4 -DA:223,4 -DA:224,4 -DA:228,4 -DA:234,4 -DA:243,4 -DA:251,12 -DA:254,4 -DA:257,4 -DA:259,8 -DA:260,4 -DA:262,12 -DA:263,8 -DA:269,4 -DA:271,12 -DA:272,12 -DA:275,12 -DA:279,4 -DA:283,4 -DA:285,12 -DA:292,4 -DA:300,4 -DA:302,4 -DA:309,8 -DA:310,4 -DA:313,12 -DA:314,8 -DA:315,12 -DA:322,4 -DA:325,12 -DA:327,4 -DA:329,4 -DA:334,4 -DA:335,16 -DA:337,12 -DA:338,4 -DA:339,8 -DA:342,12 -DA:344,4 -DA:348,4 -DA:350,4 -DA:356,4 -DA:358,4 -DA:360,4 -DA:361,4 -DA:364,12 -DA:366,8 -DA:367,4 -DA:370,8 -DA:371,4 -DA:374,4 -DA:379,4 -DA:381,4 -DA:387,4 -DA:388,4 -DA:389,0 -DA:394,8 -DA:398,8 -DA:400,8 -DA:406,4 -DA:412,3 -DA:417,3 -DA:419,3 -DA:421,9 -DA:427,3 -DA:428,9 -DA:430,3 -DA:432,9 -DA:433,3 -DA:439,3 -DA:442,3 -DA:447,3 -DA:448,3 -DA:453,6 -DA:458,9 -DA:461,3 -DA:465,3 -DA:469,3 -DA:470,3 -DA:472,9 -DA:475,3 -DA:478,3 -DA:480,3 -DA:489,3 -DA:495,9 -DA:498,3 -DA:504,3 -DA:505,3 -DA:510,9 -DA:513,3 -DA:520,0 -DA:529,0 -DA:532,0 -DA:542,0 -DA:553,0 -DA:554,0 -DA:556,0 -DA:560,0 -DA:563,0 -DA:565,0 -DA:566,0 -DA:567,0 -DA:568,0 -DA:569,0 -DA:570,0 -DA:571,0 -DA:572,0 -DA:576,0 -DA:577,0 -DA:579,0 -DA:582,0 -DA:586,3 -DA:591,3 -DA:592,3 -DA:596,3 -DA:597,9 -DA:598,3 -DA:601,3 -DA:604,9 -DA:605,3 -DA:608,3 -DA:612,6 -DA:618,3 -DA:624,3 -DA:625,9 -DA:628,3 -DA:634,3 -DA:635,3 -DA:640,9 -DA:643,3 -DA:650,3 -DA:654,3 -DA:655,3 -DA:657,6 -DA:658,9 -DA:661,3 -DA:663,12 -DA:664,9 -DA:668,3 -DA:673,3 -DA:675,3 -DA:677,6 -DA:680,9 -DA:683,3 -DA:684,3 -DA:685,3 -DA:686,3 -DA:691,3 -DA:693,9 -DA:695,0 -DA:696,0 -DA:697,0 -DA:704,3 -DA:708,3 -DA:709,12 -DA:710,3 -DA:716,6 -DA:719,4 -DA:721,4 -DA:723,4 -DA:724,16 -DA:725,8 -DA:731,3 -DA:735,3 -DA:737,3 -DA:738,3 -DA:739,3 -DA:740,12 -DA:741,6 -DA:742,6 -DA:748,4 -DA:750,4 -DA:752,4 -DA:753,16 -DA:754,12 -DA:760,3 -DA:762,3 -DA:764,3 -DA:765,12 -DA:766,9 -DA:772,1 -DA:773,3 -DA:778,3 -DA:783,3 -DA:785,3 -DA:788,3 -DA:791,3 -DA:792,3 -DA:793,3 -DA:796,6 -DA:799,3 -DA:804,3 -DA:806,3 -DA:809,3 -DA:812,3 -DA:813,3 -DA:814,3 -DA:817,6 -DA:822,5 -DA:824,15 -DA:829,10 -DA:831,0 -DA:835,4 -DA:836,4 -DA:837,0 -DA:841,3 -DA:842,3 -DA:845,3 -DA:850,6 -DA:854,9 -DA:856,6 -DA:857,15 -DA:858,9 -DA:860,9 -DA:863,6 -DA:864,3 -DA:870,4 -DA:874,12 -DA:876,12 -DA:880,3 -DA:884,9 -DA:886,0 -DA:890,4 -DA:891,8 -DA:892,8 -DA:897,12 -DA:900,4 -DA:901,12 -DA:902,20 -DA:905,3 -DA:906,6 -DA:907,3 -DA:910,9 -DA:911,3 -DA:912,3 -DA:918,5 -DA:919,5 -DA:920,5 -DA:922,10 -DA:923,0 -DA:924,0 -DA:927,10 -DA:928,0 -DA:929,0 -DA:933,5 -DA:935,0 -DA:937,5 -DA:942,5 -DA:943,15 -DA:945,5 -DA:948,15 -DA:950,5 -DA:953,15 -DA:955,5 -DA:958,15 -DA:960,5 -DA:963,15 -DA:965,5 -DA:968,15 -DA:970,5 -DA:973,15 -DA:975,5 -DA:978,15 -DA:980,5 -DA:984,15 -DA:986,5 -DA:989,15 -DA:991,5 -DA:996,4 -DA:997,12 -DA:998,12 -DA:1000,8 -DA:1005,4 -DA:1009,4 -DA:1010,0 -DA:1016,12 -DA:1017,4 -DA:1019,8 -DA:1020,4 -DA:1021,4 -DA:1022,4 -DA:1023,4 -DA:1025,4 -DA:1030,16 -DA:1031,3 -DA:1032,3 -DA:1033,9 -DA:1034,3 -DA:1035,3 -DA:1036,3 -DA:1041,3 -DA:1042,3 -DA:1046,0 -DA:1048,0 -DA:1049,0 -DA:1051,0 -DA:1052,0 -DA:1053,0 -DA:1055,0 -DA:1056,0 -DA:1057,0 -DA:1061,0 -DA:1062,0 -DA:1063,0 -DA:1064,0 -DA:1073,4 -DA:1076,4 -DA:1077,4 -DA:1079,4 -DA:1080,4 -DA:1081,4 -DA:1082,4 -DA:1083,4 -DA:1088,8 -DA:1090,4 -DA:1092,8 -DA:1095,8 -DA:1096,4 -DA:1097,4 -DA:1102,0 -DA:1103,0 -DA:1104,0 -DA:1105,0 -DA:1106,0 -DA:1108,0 -DA:1109,0 -DA:1110,0 -DA:1115,4 -DA:1120,8 -DA:1122,12 -DA:1125,8 -DA:1129,4 -DA:1131,4 -DA:1132,4 -DA:1133,4 -DA:1135,8 -DA:1136,4 -DA:1137,4 -DA:1138,4 -DA:1139,4 -DA:1140,4 -DA:1142,4 -DA:1146,8 -DA:1147,8 -DA:1148,12 -DA:1149,4 -DA:1150,8 -DA:1152,12 -DA:1153,0 -DA:1154,0 -DA:1158,8 -DA:1162,12 -DA:1163,4 -DA:1168,8 -DA:1169,4 -DA:1171,0 -DA:1172,0 -DA:1173,0 -DA:1174,0 -DA:1176,0 -DA:1177,0 -DA:1178,0 -DA:1184,3 -DA:1190,6 -DA:1191,6 -DA:1192,6 -DA:1194,3 -DA:1196,9 -DA:1197,3 -DA:1202,6 -DA:1203,3 -DA:1204,3 -DA:1206,3 -DA:1209,0 -DA:1210,0 -DA:1211,0 -DA:1212,0 -DA:1214,0 -DA:1215,0 -DA:1216,0 -DA:1222,3 -DA:1227,6 -DA:1228,3 -DA:1229,3 -DA:1231,3 -DA:1235,9 -DA:1236,3 -DA:1241,6 -DA:1242,3 -DA:1243,3 -DA:1247,0 -DA:1248,0 -DA:1249,0 -DA:1251,0 -DA:1252,0 -DA:1253,0 -DA:1259,3 -DA:1264,6 -DA:1265,3 -DA:1266,9 -DA:1267,3 -DA:1272,6 -DA:1273,3 -DA:1274,3 -DA:1278,0 -DA:1279,0 -DA:1280,0 -DA:1282,0 -DA:1283,0 -DA:1284,0 -DA:1290,3 -DA:1295,6 -DA:1296,3 -DA:1297,9 -DA:1298,3 -DA:1303,3 -DA:1304,0 -DA:1305,0 -DA:1306,0 -DA:1308,0 -DA:1309,0 -DA:1310,0 -DA:1319,3 -DA:1321,6 -DA:1322,3 -DA:1324,3 -DA:1325,3 -DA:1328,6 -DA:1329,3 -DA:1331,6 -DA:1334,3 -DA:1335,3 -DA:1337,6 -DA:1338,3 -DA:1339,6 -DA:1344,3 -DA:1345,3 -DA:1349,3 -DA:1350,3 -DA:1351,6 -DA:1353,6 -DA:1357,9 -DA:1358,0 -DA:1359,0 -DA:1360,0 -DA:1362,0 -DA:1363,0 -DA:1364,0 -DA:1367,0 -DA:1368,0 -DA:1370,0 -DA:1372,0 -DA:1373,0 -DA:1375,0 -DA:1376,0 -DA:1377,0 -DA:1380,0 -DA:1384,6 -DA:1385,3 -DA:1390,0 -DA:1391,0 -DA:1392,0 -DA:1394,0 -DA:1395,0 -DA:1396,0 -DA:1402,3 -DA:1407,6 -DA:1408,3 -DA:1409,3 -DA:1412,3 -DA:1415,3 -DA:1416,3 -DA:1417,6 -DA:1419,6 -DA:1420,6 -DA:1422,0 -DA:1424,0 -DA:1426,0 -DA:1429,0 -DA:1430,0 -DA:1432,0 -DA:1433,0 -DA:1434,0 -DA:1440,9 -DA:1441,3 -DA:1447,6 -DA:1448,3 -DA:1449,3 -DA:1451,3 -DA:1452,3 -DA:1453,3 -DA:1457,9 -DA:1458,3 -DA:1460,3 -DA:1461,3 -DA:1462,3 -DA:1466,0 -DA:1467,0 -DA:1468,0 -DA:1470,0 -DA:1471,0 -DA:1472,0 -DA:1480,5 -DA:1481,25 -DA:1482,25 -DA:1483,25 -DA:1484,25 -DA:1485,25 -DA:1488,0 -DA:1490,0 -DA:1493,3 -DA:1500,3 -DA:1501,3 -DA:1502,15 -DA:1503,3 -DA:1505,6 -DA:1506,3 -DA:1507,3 -DA:1512,3 -DA:1513,3 -DA:1514,15 -DA:1515,3 -DA:1517,6 -DA:1518,3 -DA:1519,3 -DA:1524,3 -DA:1529,9 -DA:1530,3 -DA:1531,3 -DA:1534,6 -DA:1535,3 -DA:1536,3 -DA:1539,9 -DA:1540,9 -DA:1541,3 -DA:1542,6 -DA:1545,6 -DA:1546,3 -DA:1547,6 -DA:1551,0 -DA:1552,0 -DA:1553,0 -DA:1560,5 -DA:1561,5 -DA:1566,3 -DA:1567,6 -DA:1568,3 -DA:1570,3 -DA:1574,9 -DA:1575,3 -DA:1577,3 -DA:1584,3 -DA:1585,6 -DA:1586,3 -DA:1587,12 -DA:1588,9 -DA:1590,3 -DA:1592,3 -DA:1599,4 -DA:1600,12 -DA:1601,3 -DA:1603,3 -DA:1607,16 -DA:1608,3 -DA:1610,3 -DA:1617,3 -DA:1618,9 -DA:1619,0 -DA:1621,0 -DA:1625,12 -DA:1626,0 -DA:1628,0 -DA:1637,4 -DA:1647,12 -DA:1653,4 -DA:1660,4 -DA:1669,4 -DA:1676,4 -DA:1677,12 -DA:1680,4 -DA:1686,4 -DA:1687,4 -DA:1690,4 -DA:1691,4 -DA:1696,4 -DA:1697,4 -DA:1705,3 -DA:1707,3 -DA:1711,4 -DA:1715,4 -DA:1720,4 -DA:1721,0 -DA:1730,3 -DA:1734,3 -DA:1735,3 -DA:1739,6 -DA:1741,3 -DA:1742,6 -DA:1750,3 -DA:1755,3 -DA:1756,6 -DA:1757,3 -DA:1758,3 -DA:1761,3 -DA:1762,3 -DA:1764,3 -DA:1770,3 -DA:1774,3 -DA:1776,6 -DA:1777,0 -DA:1783,6 -DA:1788,3 -DA:1791,3 -DA:1796,3 -DA:1801,3 -DA:1802,6 -DA:1803,3 -DA:1804,3 -DA:1807,3 -DA:1808,3 -DA:1810,3 -DA:1816,3 -DA:1817,3 -DA:1822,4 -DA:1827,8 -DA:1828,16 -DA:1830,12 -DA:1831,0 -DA:1835,0 -DA:1836,0 -DA:1837,0 -DA:1838,0 -DA:1839,0 -DA:1842,4 -DA:1843,0 -DA:1845,4 -DA:1846,4 -DA:1847,4 -DA:1855,0 -DA:1860,0 -DA:1861,0 -DA:1863,0 -DA:1864,0 -DA:1865,0 -DA:1868,0 -DA:1869,0 -DA:1871,0 -DA:1883,0 -DA:1889,0 -DA:1890,0 -DA:1892,0 -DA:1893,0 -DA:1896,0 -DA:1897,0 -DA:1898,0 -DA:1899,0 -DA:1900,0 -DA:1901,0 -DA:1902,0 -DA:1903,0 -DA:1904,0 -DA:1906,0 -DA:1907,0 -DA:1908,0 -DA:1909,0 -DA:1910,0 -DA:1911,0 -DA:1912,0 -DA:1913,0 -DA:1914,0 -DA:1915,0 -DA:1918,0 -DA:1919,0 -DA:1925,0 -DA:1940,0 -DA:1946,0 -DA:1950,0 -DA:1951,0 -DA:1952,0 -DA:1953,0 -DA:1954,0 -DA:1956,0 -DA:1957,0 -DA:1963,0 -DA:1965,0 -DA:1966,0 -DA:1967,0 -DA:1973,0 -DA:1979,0 -DA:1981,0 -DA:1986,0 -DA:1989,0 -DA:1990,0 -DA:1994,0 -DA:1997,0 -DA:1999,0 -DA:2000,0 -DA:2002,0 -DA:2003,0 -DA:2006,0 -DA:2008,0 -DA:2012,0 -DA:2014,0 -DA:2016,0 -DA:2019,0 -DA:2025,0 -DA:2031,0 -DA:2033,0 -DA:2042,0 -DA:2051,0 -DA:2060,0 -DA:2064,0 -DA:2067,0 -DA:2071,0 -DA:2073,0 -DA:2076,0 -DA:2077,0 -DA:2078,0 -DA:2079,0 -DA:2080,0 -DA:2084,0 -DA:2085,0 -DA:2089,0 -DA:2091,0 -DA:2092,0 -DA:2093,0 -DA:2094,0 -DA:2101,0 -DA:2103,0 -DA:2107,0 -DA:2115,0 -DA:2116,0 -DA:2118,0 -DA:2123,0 -DA:2124,0 -DA:2129,0 -DA:2131,0 -DA:2132,0 -DA:2133,0 -DA:2138,0 -DA:2146,0 -DA:2148,0 -DA:2150,0 -DA:2151,0 -DA:2152,0 -DA:2158,0 -DA:2161,0 -DA:2162,0 -DA:2164,0 -DA:2167,0 -DA:2168,0 -DA:2170,0 -DA:2171,0 -DA:2173,0 -DA:2175,0 -DA:2178,0 -DA:2179,0 -DA:2180,0 -DA:2185,0 -DA:2191,0 -DA:2193,0 -DA:2197,0 -DA:2199,0 -DA:2200,0 -DA:2204,0 -DA:2205,0 -DA:2206,0 -DA:2207,0 -DA:2210,0 -DA:2211,0 -DA:2214,0 -DA:2216,0 -DA:2218,0 -DA:2222,0 -DA:2228,0 -DA:2233,0 -DA:2234,0 -DA:2235,0 -DA:2237,0 -DA:2239,0 -DA:2240,0 -DA:2241,0 -DA:2243,0 -DA:2247,0 -DA:2248,0 -DA:2249,0 -DA:2251,0 -DA:2255,0 -DA:2256,0 -DA:2257,0 -DA:2258,0 -DA:2259,0 -DA:2261,0 -DA:2263,0 -DA:2265,0 -DA:2266,0 -DA:2267,0 -DA:2268,0 -DA:2269,0 -DA:2270,0 -DA:2271,0 -DA:2279,0 -DA:2290,0 -DA:2293,0 -DA:2296,0 -DA:2304,0 -DA:2316,0 -DA:2319,0 -DA:2323,0 -DA:2325,0 -DA:2328,0 -DA:2329,0 -DA:2330,0 -DA:2331,0 -DA:2332,0 -DA:2336,0 -DA:2337,0 -DA:2341,0 -DA:2343,0 -DA:2344,0 -DA:2350,0 -DA:2351,0 -DA:2353,0 -DA:2356,0 -DA:2372,0 -DA:2373,0 -DA:2374,0 -DA:2376,0 -DA:2377,0 -DA:2380,0 -DA:2381,0 -DA:2382,0 -DA:2383,0 -DA:2386,0 -DA:2387,0 -DA:2388,0 -DA:2391,0 -DA:2392,0 -DA:2395,0 -DA:2396,0 -DA:2397,0 -DA:2400,0 -DA:2401,0 -DA:2405,0 -DA:2407,0 -DA:2411,0 -DA:2412,0 -DA:2415,0 -DA:2417,0 -DA:2421,0 -DA:2424,0 -DA:2426,0 -DA:2432,0 -DA:2433,0 -DA:2435,0 -DA:2437,0 -DA:2440,0 -DA:2443,0 -DA:2449,0 -DA:2450,0 -DA:2454,0 -DA:2461,0 -DA:2463,0 -DA:2464,0 -DA:2471,0 -DA:2472,0 -DA:2473,0 -DA:2474,0 -DA:2477,0 -DA:2484,0 -DA:2488,0 -DA:2492,0 -DA:2494,0 -DA:2496,0 -DA:2502,0 -DA:2506,0 -DA:2510,0 -DA:2512,0 -DA:2513,0 -DA:2514,0 -DA:2516,0 -DA:2523,0 -DA:2528,0 -DA:2530,0 -DA:2532,0 -DA:2538,0 -DA:2539,0 -DA:2540,0 -DA:2541,0 -DA:2543,0 -DA:2551,0 -DA:2552,0 -DA:2554,0 -DA:2557,0 -DA:2561,0 -DA:2565,0 -DA:2571,0 -DA:2572,0 -DA:2573,0 -DA:2575,0 -DA:2576,0 -DA:2579,0 -DA:2580,0 -DA:2581,0 -DA:2582,0 -DA:2585,0 -DA:2586,0 -DA:2587,0 -DA:2591,0 -DA:2597,0 -DA:2598,0 -DA:2601,0 -DA:2603,0 -DA:2605,0 -DA:2607,0 -DA:2610,0 -DA:2611,0 -DA:2612,0 -DA:2618,0 -DA:2619,0 -DA:2621,0 -DA:2624,0 -DA:2626,0 -DA:2628,0 -DA:2631,0 -DA:2635,0 -DA:2639,0 -DA:2640,0 -DA:2641,0 -DA:2642,0 -DA:2643,0 -DA:2646,0 -DA:2652,0 -DA:2657,0 -DA:2659,0 -DA:2661,0 -DA:2662,0 -DA:2665,0 -DA:2669,0 -DA:2670,0 -DA:2671,0 -DA:2672,0 -DA:2674,0 -DA:2681,0 -DA:2682,0 -DA:2686,0 -DA:2688,0 -DA:2691,0 -DA:2692,0 -DA:2696,0 -DA:2698,0 -DA:2701,0 -DA:2702,0 -DA:2705,0 -DA:2706,0 -DA:2707,0 -DA:2708,0 -DA:2710,0 -DA:2715,0 -DA:2716,0 -DA:2717,0 -DA:2719,0 -DA:2720,0 -DA:2723,0 -DA:2724,0 -DA:2725,0 -DA:2727,0 -DA:2728,0 -DA:2729,0 -DA:2735,0 -DA:2736,0 -DA:2738,0 -DA:2739,0 -DA:2742,0 -DA:2743,0 -DA:2746,0 -DA:2748,0 -DA:2749,0 -DA:2750,0 -DA:2751,0 -DA:2753,0 -DA:2755,0 -DA:2760,0 -DA:2761,0 -DA:2762,0 -DA:2764,0 -DA:2765,0 -DA:2769,0 -DA:2770,0 -DA:2771,0 -DA:2773,0 -DA:2778,0 -DA:2779,0 -DA:2780,0 -DA:2782,0 -DA:2783,0 -DA:2785,0 -LF:1046 -LH:543 -end_of_record -TN: -SF:lib/apis/sign_api/utils/auth/address_utils.dart -FNF:0 -FNH:0 -DA:2,3 -DA:3,6 -DA:6,3 -DA:7,6 -DA:10,0 -DA:11,0 -LF:6 -LH:4 -end_of_record -TN: -SF:lib/apis/sign_api/utils/auth/auth_api_validators.dart -FNF:0 -FNH:0 -DA:5,1 -DA:6,1 -DA:7,1 -DA:10,3 -DA:11,6 -DA:12,2 -DA:15,4 -DA:19,6 -DA:20,1 -DA:27,9 -DA:28,1 -DA:34,3 -DA:35,1 -DA:36,1 -DA:39,1 -DA:46,3 -DA:52,3 -DA:53,2 -DA:55,2 -DA:60,1 -DA:70,0 -DA:71,0 -DA:72,0 -DA:78,0 -DA:79,0 -DA:82,0 -DA:86,0 -DA:87,0 -DA:93,0 -DA:94,0 -DA:100,0 -DA:101,0 -DA:102,0 -DA:103,0 -DA:104,0 -DA:111,0 -DA:112,0 -DA:113,0 -DA:123,0 -DA:128,0 -DA:129,0 -DA:132,0 -DA:136,0 -DA:137,0 -LF:44 -LH:20 -end_of_record -TN: -SF:lib/apis/sign_api/utils/auth/auth_signature.dart -FNF:0 -FNH:0 -DA:16,9 -DA:17,3 -DA:18,6 -DA:19,6 -DA:22,3 -DA:23,3 -DA:24,3 -DA:25,3 -DA:26,3 -DA:28,6 -DA:30,3 -DA:36,3 -DA:37,6 -DA:40,6 -DA:43,0 -DA:46,3 -DA:53,3 -DA:54,6 -DA:58,6 -DA:59,0 -DA:63,3 -DA:64,6 -DA:67,3 -DA:68,6 -DA:72,6 -DA:92,3 -DA:93,3 -DA:94,3 -DA:97,3 -DA:98,3 -DA:99,6 -DA:112,9 -DA:115,0 -DA:128,0 -DA:130,0 -DA:132,0 -DA:133,0 -DA:134,0 -DA:135,0 -DA:138,0 -DA:139,0 -DA:141,0 -DA:143,0 -DA:149,0 -DA:157,0 -DA:158,0 -DA:166,3 -DA:173,6 -DA:174,3 -DA:177,3 -DA:179,0 -DA:180,0 -DA:183,0 -DA:188,0 -DA:189,0 -DA:194,0 -DA:199,0 -DA:200,0 -DA:202,0 -DA:204,0 -DA:212,0 -DA:217,0 -DA:219,0 -DA:221,0 -DA:225,0 -DA:226,0 -DA:227,0 -DA:230,0 -DA:231,0 -DA:235,0 -DA:237,0 -DA:241,0 -DA:243,0 -DA:244,0 -DA:246,0 -DA:247,0 -DA:248,0 -DA:249,0 -DA:250,0 -DA:254,0 -DA:257,0 -DA:259,0 -DA:265,0 -DA:266,0 -DA:267,0 -DA:270,0 -DA:271,0 -DA:273,0 -DA:276,0 -DA:280,1 -DA:282,1 -DA:283,1 -DA:284,2 -DA:285,1 -DA:292,1 -DA:295,2 -DA:296,1 -DA:297,2 -DA:298,3 -LF:99 -LH:44 -end_of_record -TN: -SF:lib/apis/sign_api/utils/auth/auth_utils.dart -FNF:0 -FNH:0 -DA:2,3 -DA:3,9 -LF:2 -LH:2 -end_of_record -TN: -SF:lib/apis/sign_api/utils/auth/recaps_utils.dart -FNF:0 -FNH:0 -DA:8,0 -DA:9,0 -DA:10,0 -DA:12,0 -DA:13,0 -DA:16,0 -DA:17,0 -DA:20,0 -DA:21,0 -DA:22,0 -DA:26,0 -DA:27,0 -DA:29,0 -DA:31,0 -DA:35,0 -DA:36,0 -DA:37,0 -DA:39,0 -DA:42,0 -DA:44,0 -DA:46,0 -DA:47,0 -DA:49,0 -DA:50,0 -DA:53,0 -DA:55,0 -DA:59,0 -DA:61,0 -DA:62,0 -DA:63,0 -DA:64,0 -DA:67,0 -DA:68,0 -DA:69,0 -DA:73,0 -DA:74,0 -DA:76,0 -DA:82,0 -DA:83,0 -DA:84,0 -DA:90,0 -DA:91,0 -DA:92,0 -DA:93,0 -DA:95,0 -DA:98,0 -DA:99,0 -DA:100,0 -DA:102,0 -DA:106,0 -DA:107,0 -DA:108,0 -DA:109,0 -DA:111,0 -DA:115,0 -DA:116,0 -DA:118,0 -DA:123,0 -DA:124,0 -DA:125,0 -DA:127,0 -DA:139,0 -DA:144,0 -DA:145,0 -DA:148,0 -DA:149,0 -DA:150,0 -DA:151,0 -DA:153,0 -DA:156,0 -DA:163,0 -DA:164,0 -DA:166,0 -DA:167,0 -DA:168,0 -DA:169,0 -DA:170,0 -DA:174,0 -DA:175,0 -DA:176,0 -DA:184,0 -DA:185,0 -DA:186,0 -DA:187,0 -DA:188,0 -DA:191,0 -DA:195,0 -DA:196,0 -DA:197,0 -DA:198,0 -DA:199,0 -DA:200,0 -DA:202,0 -DA:204,0 -DA:205,0 -DA:206,0 -DA:207,0 -DA:208,0 -DA:209,0 -DA:210,0 -DA:213,0 -DA:214,0 -DA:215,0 -DA:216,0 -DA:224,0 -DA:227,0 -DA:229,0 -DA:230,0 -DA:233,0 -DA:237,0 -DA:241,0 -DA:243,0 -DA:245,0 -DA:246,0 -DA:247,0 -DA:248,0 -DA:249,0 -DA:250,0 -DA:251,0 -DA:252,0 -DA:253,0 -DA:255,0 -DA:256,0 -DA:258,0 -DA:259,0 -DA:260,0 -DA:261,0 -DA:262,0 -DA:263,0 -DA:265,0 -DA:268,0 -DA:269,0 -DA:270,0 -DA:271,0 -DA:272,0 -DA:274,0 -DA:275,0 -DA:279,0 -DA:280,0 -DA:282,0 -DA:285,0 -DA:290,0 -DA:291,0 -DA:293,0 -DA:296,0 -DA:298,0 -DA:301,0 -DA:303,0 -DA:305,0 -DA:307,0 -DA:310,0 -DA:315,0 -DA:316,0 -DA:318,0 -DA:319,0 -DA:320,0 -DA:321,0 -DA:322,0 -DA:326,0 -DA:329,0 -DA:335,0 -DA:336,0 -DA:337,0 -DA:338,0 -DA:342,0 -DA:343,0 -DA:344,0 -DA:345,0 -DA:346,0 -LF:169 -LH:0 -end_of_record -TN: -SF:lib/apis/sign_api/utils/custom_credentials.dart -FNF:0 -FNH:0 -DA:8,0 -DA:26,0 -DA:27,0 -DA:29,0 -DA:31,0 -DA:32,0 -DA:33,0 -DA:35,0 -DA:38,0 -DA:39,0 -DA:40,0 -DA:41,0 -DA:42,0 -DA:46,0 -DA:47,0 -DA:48,0 -DA:54,0 -DA:55,0 -DA:57,0 -DA:63,0 -DA:68,0 -DA:71,0 -DA:78,0 -LF:23 -LH:0 -end_of_record -TN: -SF:lib/apis/sign_api/utils/sign_api_validator_utils.dart -FNF:0 -FNH:0 -DA:7,6 -DA:12,6 -DA:13,12 -DA:15,6 -DA:16,18 -DA:22,5 -DA:28,5 -DA:30,4 -DA:31,4 -DA:33,4 -DA:37,10 -DA:38,5 -DA:39,1 -DA:42,1 -DA:52,5 -DA:56,10 -DA:57,5 -DA:59,5 -DA:60,5 -DA:69,5 -DA:73,10 -DA:74,5 -DA:75,4 -DA:78,4 -DA:87,5 -DA:91,10 -DA:92,5 -DA:93,5 -DA:94,5 -DA:103,4 -DA:108,4 -DA:109,1 -DA:111,1 -DA:116,4 -DA:122,4 -DA:126,4 -DA:127,4 -DA:129,4 -DA:138,4 -DA:144,4 -DA:145,1 -DA:147,1 -DA:152,4 -DA:157,4 -DA:162,4 -DA:163,4 -DA:165,4 -DA:174,4 -DA:180,4 -DA:181,1 -DA:183,1 -DA:188,4 -DA:193,4 -DA:198,4 -DA:199,4 -DA:201,4 -DA:210,6 -DA:215,12 -DA:216,12 -DA:219,6 -DA:221,4 -DA:223,4 -DA:226,12 -DA:228,6 -DA:230,6 -DA:232,6 -DA:234,6 -DA:239,6 -DA:243,6 -DA:244,12 -DA:245,12 -DA:247,6 -DA:248,12 -DA:249,12 -DA:253,5 -DA:256,5 -DA:259,2 -DA:262,10 -DA:265,2 -DA:268,10 -DA:277,4 -DA:281,12 -DA:282,8 -DA:285,4 -DA:289,8 -DA:290,8 -DA:291,4 -DA:293,4 -DA:297,4 -DA:304,4 -DA:308,4 -DA:309,4 -DA:310,8 -DA:312,4 -DA:313,4 -DA:314,8 -LF:96 -LH:96 -end_of_record -TN: -SF:lib/apis/utils/errors.dart -FNF:0 -FNH:0 -DA:230,7 -DA:234,7 -DA:235,7 -DA:236,14 -DA:237,7 -DA:238,12 -DA:239,8 -DA:246,6 -DA:250,6 -DA:251,6 -DA:252,12 -DA:253,6 -DA:254,12 -DA:255,14 -LF:14 -LH:14 -end_of_record -TN: -SF:lib/apis/utils/extensions.dart -FNF:0 -FNH:0 -DA:8,0 -DA:9,0 -DA:10,0 -DA:11,0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:15,0 -DA:16,0 -DA:17,0 -DA:18,0 -DA:19,0 -DA:20,0 -DA:21,0 -DA:22,0 -DA:28,0 -DA:29,0 -DA:30,0 -DA:31,0 -DA:32,0 -DA:33,0 -DA:34,0 -DA:36,0 -DA:37,0 -DA:38,0 -DA:39,0 -DA:44,0 -DA:45,0 -DA:46,0 -DA:47,0 -DA:49,0 -DA:55,0 -DA:57,0 -DA:58,0 -DA:60,0 -DA:66,0 -DA:68,0 -DA:69,0 -DA:74,0 -DA:76,0 -LF:40 -LH:0 -end_of_record -TN: -SF:lib/apis/utils/log_level.dart -FNF:0 -FNH:0 -DA:12,10 -DA:14,10 -DA:16,10 -DA:18,10 -DA:20,6 -DA:22,6 -DA:24,6 -LF:7 -LH:7 -end_of_record -TN: -SF:lib/apis/utils/namespace_utils.dart -FNF:0 -FNH:0 -DA:7,6 -DA:8,6 -DA:9,6 -DA:10,12 -DA:16,6 -DA:17,6 -DA:18,6 -DA:19,12 -DA:20,18 -DA:21,18 -DA:27,4 -DA:29,4 -DA:36,1 -DA:37,1 -DA:38,2 -DA:43,6 -DA:44,6 -DA:45,6 -DA:46,6 -DA:47,6 -DA:48,6 -DA:55,6 -DA:57,12 -DA:58,6 -DA:59,6 -DA:65,6 -DA:70,1 -DA:71,1 -DA:72,2 -DA:79,0 -DA:82,0 -DA:83,0 -DA:84,0 -DA:85,0 -DA:86,0 -DA:87,0 -DA:88,0 -DA:89,0 -DA:90,0 -DA:93,0 -DA:94,0 -DA:95,0 -DA:96,0 -DA:98,0 -DA:99,0 -DA:100,0 -DA:111,6 -DA:115,6 -DA:116,6 -DA:119,12 -DA:123,5 -DA:128,10 -DA:129,5 -DA:130,5 -DA:137,5 -DA:141,5 -DA:145,5 -DA:146,10 -DA:147,5 -DA:148,2 -DA:150,10 -DA:151,5 -DA:152,10 -DA:161,0 -DA:165,0 -DA:166,0 -DA:167,0 -DA:168,0 -DA:170,0 -DA:171,0 -DA:180,5 -DA:184,5 -DA:185,10 -DA:186,5 -DA:187,2 -DA:189,10 -DA:190,5 -DA:191,10 -DA:201,6 -DA:205,6 -DA:206,6 -DA:207,6 -DA:208,6 -DA:211,12 -DA:219,1 -DA:225,2 -DA:226,1 -DA:227,1 -DA:234,1 -DA:239,4 -DA:246,4 -DA:252,4 -DA:256,1 -DA:260,8 -DA:261,9 -DA:262,1 -DA:263,1 -DA:264,2 -DA:265,1 -DA:266,1 -DA:267,1 -DA:268,4 -DA:269,1 -DA:270,1 -DA:271,1 -DA:272,1 -DA:273,4 -DA:274,1 -DA:275,1 -DA:276,1 -DA:277,1 -DA:278,4 -DA:279,1 -DA:281,1 -DA:285,4 -DA:287,4 -DA:291,0 -DA:295,0 -DA:296,0 -DA:299,0 -DA:301,0 -DA:302,0 -DA:303,0 -DA:304,0 -DA:305,0 -DA:311,0 -DA:316,4 -DA:325,8 -DA:326,8 -DA:327,12 -DA:332,4 -DA:338,4 -DA:344,4 -DA:347,8 -DA:349,4 -DA:350,4 -DA:351,4 -DA:352,4 -DA:353,8 -DA:354,8 -DA:356,4 -DA:357,4 -DA:364,4 -DA:365,4 -DA:368,8 -DA:372,4 -DA:373,4 -DA:376,8 -DA:381,8 -DA:383,4 -DA:384,4 -DA:387,12 -DA:390,4 -DA:391,4 -DA:394,8 -DA:398,4 -DA:399,4 -DA:402,8 -DA:409,8 -DA:410,8 -DA:411,8 -DA:412,8 -DA:431,0 -DA:434,0 -DA:435,0 -DA:436,0 -DA:437,0 -DA:439,0 -LF:168 -LH:128 -end_of_record -TN: -SF:lib/apis/utils/walletconnect_utils.dart -FNF:0 -FNH:0 -DA:9,7 -DA:10,21 -DA:11,7 -DA:12,7 -DA:14,7 -DA:18,0 -DA:19,0 -DA:20,0 -DA:23,7 -DA:24,7 -DA:27,7 -DA:28,35 -DA:31,9 -DA:36,27 -DA:37,9 -DA:41,9 -DA:42,9 -DA:43,9 -DA:46,9 -DA:50,9 -DA:52,9 -DA:54,9 -DA:56,9 -DA:58,0 -DA:66,9 -DA:71,9 -DA:72,9 -DA:73,9 -DA:74,18 -DA:75,18 -DA:78,9 -DA:81,9 -DA:90,9 -DA:91,18 -DA:92,9 -DA:95,9 -DA:101,9 -DA:102,9 -DA:106,9 -DA:107,9 -DA:108,9 -DA:109,0 -DA:110,9 -DA:111,0 -DA:113,9 -DA:117,9 -DA:118,18 -DA:123,8 -DA:124,8 -DA:125,8 -DA:126,8 -DA:127,16 -DA:133,16 -DA:135,16 -DA:136,8 -DA:137,30 -DA:138,7 -DA:141,8 -DA:142,8 -DA:145,8 -DA:153,8 -DA:154,5 -DA:155,10 -DA:156,10 -DA:161,8 -DA:162,16 -DA:163,8 -DA:164,16 -DA:165,16 -DA:166,0 -DA:173,8 -DA:176,8 -DA:183,7 -DA:187,7 -DA:188,28 -DA:189,7 -DA:190,0 -DA:195,7 -DA:204,7 -DA:205,7 -DA:207,18 -DA:208,6 -DA:209,30 -DA:213,14 -DA:216,7 -DA:218,7 -DA:223,0 -DA:224,0 -DA:225,0 -DA:226,0 -LF:90 -LH:78 -end_of_record -TN: -SF:lib/apis/web3app/web3app.dart -FNF:0 -FNH:0 -DA:22,2 -DA:30,2 -DA:31,2 -DA:40,2 -DA:57,2 -DA:61,4 -DA:62,2 -DA:63,2 -DA:64,2 -DA:65,4 -DA:68,0 -DA:69,0 -DA:72,2 -DA:73,4 -DA:76,0 -DA:77,0 -DA:80,2 -DA:81,4 -DA:84,0 -DA:85,0 -DA:88,2 -DA:89,4 -DA:92,0 -DA:93,0 -DA:96,2 -DA:97,4 -DA:100,0 -DA:104,2 -DA:105,4 -DA:108,0 -DA:109,0 -DA:112,2 -DA:113,4 -DA:116,0 -DA:117,0 -DA:120,2 -DA:121,4 -DA:124,0 -DA:125,0 -DA:130,4 -DA:131,2 -DA:132,2 -DA:133,4 -DA:134,4 -DA:135,4 -DA:136,4 -DA:140,2 -DA:142,2 -DA:146,4 -DA:147,4 -DA:148,4 -DA:150,2 -DA:155,2 -DA:156,4 -DA:157,1 -DA:158,2 -DA:159,1 -DA:160,2 -DA:161,0 -DA:163,0 -DA:164,1 -DA:165,2 -DA:166,1 -DA:167,2 -DA:168,1 -DA:169,2 -DA:170,1 -DA:171,2 -DA:173,1 -DA:174,2 -DA:175,1 -DA:176,2 -DA:177,0 -DA:179,0 -DA:184,2 -DA:194,4 -DA:208,1 -DA:215,2 -DA:225,0 -DA:234,0 -DA:246,0 -DA:258,0 -DA:273,1 -DA:280,2 -DA:290,1 -DA:295,2 -DA:301,1 -DA:307,2 -DA:316,2 -DA:319,4 -DA:325,1 -DA:330,2 -DA:338,1 -DA:341,2 -DA:347,2 -DA:348,6 -DA:352,0 -DA:353,0 -DA:355,0 -DA:356,0 -DA:357,0 -DA:358,0 -DA:359,0 -DA:361,0 -DA:370,1 -DA:377,2 -DA:387,0 -DA:392,0 -DA:402,0 -DA:404,0 -DA:406,0 -DA:415,0 -DA:425,0 -DA:431,0 -DA:440,0 -DA:446,0 -LF:116 -LH:75 -end_of_record -TN: -SF:lib/apis/web3wallet/web3wallet.dart -FNF:0 -FNH:0 -DA:13,3 -DA:22,3 -DA:23,3 -DA:33,3 -DA:50,3 -DA:54,6 -DA:55,3 -DA:56,3 -DA:57,3 -DA:58,6 -DA:61,0 -DA:62,0 -DA:65,3 -DA:66,6 -DA:69,0 -DA:70,0 -DA:73,3 -DA:74,6 -DA:77,0 -DA:78,0 -DA:81,3 -DA:82,6 -DA:85,0 -DA:86,0 -DA:89,3 -DA:90,6 -DA:93,0 -DA:97,3 -DA:98,6 -DA:101,0 -DA:102,0 -DA:105,3 -DA:106,6 -DA:109,0 -DA:110,0 -DA:113,3 -DA:114,6 -DA:117,0 -DA:118,0 -DA:123,6 -DA:124,3 -DA:125,3 -DA:126,6 -DA:127,6 -DA:128,6 -DA:129,6 -DA:133,3 -DA:135,3 -DA:139,6 -DA:140,6 -DA:141,6 -DA:143,3 -DA:146,2 -DA:151,4 -DA:159,1 -DA:160,2 -DA:161,1 -DA:162,2 -DA:163,1 -DA:164,2 -DA:165,2 -DA:167,4 -DA:168,0 -DA:170,0 -DA:171,1 -DA:173,2 -DA:174,1 -DA:176,2 -DA:177,1 -DA:178,2 -DA:180,1 -DA:181,2 -DA:182,1 -DA:183,2 -DA:184,1 -DA:186,2 -DA:191,2 -DA:199,4 -DA:210,1 -DA:216,2 -DA:225,1 -DA:231,2 -DA:241,1 -DA:246,2 -DA:252,1 -DA:259,2 -DA:269,1 -DA:275,2 -DA:284,1 -DA:290,2 -DA:299,1 -DA:305,2 -DA:314,1 -DA:321,2 -DA:331,1 -DA:337,2 -DA:346,1 -DA:351,2 -DA:357,2 -DA:360,4 -DA:366,1 -DA:371,2 -DA:379,2 -DA:382,4 -DA:388,1 -DA:391,2 -DA:397,2 -DA:398,6 -DA:402,2 -DA:403,4 -DA:405,0 -DA:406,0 -DA:407,0 -DA:408,0 -DA:409,0 -DA:410,0 -DA:411,0 -DA:413,0 -DA:422,2 -DA:430,4 -DA:441,2 -DA:444,4 -DA:450,1 -DA:455,2 -DA:465,0 -DA:467,0 -DA:468,0 -DA:470,0 -DA:472,0 -DA:478,0 -DA:487,0 -DA:493,0 -DA:502,0 -DA:505,0 -DA:511,0 -DA:517,0 -DA:526,0 -DA:532,0 -LF:138 -LH:99 -end_of_record From bd78944febb0cd923e4e582e37fc9835447ccd89 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 5 Aug 2024 20:27:56 +0200 Subject: [PATCH 08/27] minor changes --- .../lib/dependencies/chains/common.dart | 2 +- .../dependencies/chains/cosmos_service.dart | 4 +- .../lib/dependencies/chains/evm_service.dart | 46 +++++++++---------- .../dependencies/chains/kadena_service.dart | 16 ++++--- .../dependencies/chains/polkadot_service.dart | 13 +++--- .../dependencies/chains/solana_service.dart | 9 ++-- .../dependencies/key_service/key_service.dart | 9 ++-- example/wallet/lib/pages/app_detail_page.dart | 4 +- 8 files changed, 53 insertions(+), 50 deletions(-) diff --git a/example/wallet/lib/dependencies/chains/common.dart b/example/wallet/lib/dependencies/chains/common.dart index aad3eb46..4e5f4758 100644 --- a/example/wallet/lib/dependencies/chains/common.dart +++ b/example/wallet/lib/dependencies/chains/common.dart @@ -24,7 +24,7 @@ class CommonMethods { ); } } catch (e) { - debugPrint('[WALLET] ${e.toString()}'); + debugPrint('[SampleWallet] ${e.toString()}'); } } diff --git a/example/wallet/lib/dependencies/chains/cosmos_service.dart b/example/wallet/lib/dependencies/chains/cosmos_service.dart index a8e68aef..3e443810 100644 --- a/example/wallet/lib/dependencies/chains/cosmos_service.dart +++ b/example/wallet/lib/dependencies/chains/cosmos_service.dart @@ -26,7 +26,7 @@ class CosmosService { } Future cosmosSignDirect(String topic, dynamic parameters) async { - debugPrint('[WALLET] cosmosSignDirect request: $parameters'); + debugPrint('[SampleWallet] cosmosSignDirect request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; final response = JsonRpcResponse( id: pRequest.id, @@ -45,7 +45,7 @@ class CosmosService { } Future cosmosSignAmino(String topic, dynamic parameters) async { - debugPrint('[WALLET] cosmosSignAmino request: $parameters'); + debugPrint('[SampleWallet] cosmosSignAmino request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; final response = JsonRpcResponse( id: pRequest.id, diff --git a/example/wallet/lib/dependencies/chains/evm_service.dart b/example/wallet/lib/dependencies/chains/evm_service.dart index f53934e5..acd9f230 100644 --- a/example/wallet/lib/dependencies/chains/evm_service.dart +++ b/example/wallet/lib/dependencies/chains/evm_service.dart @@ -96,7 +96,7 @@ class EVMService { // personal_sign is handled using onSessionRequest event for demo purposes Future personalSign(String topic, dynamic parameters) async { - debugPrint('[WALLET] personalSign request: $parameters'); + debugPrint('[SampleWallet] personalSign request: $parameters'); final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; final address = EthUtils.getAddressFromSessionRequest(pRequest); final data = EthUtils.getDataFromSessionRequest(pRequest); @@ -129,7 +129,7 @@ class EVMService { response = response.copyWith(result: signedTx); } catch (e) { - debugPrint('[WALLET] personalSign error $e'); + debugPrint('[SampleWallet] personalSign error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -149,7 +149,7 @@ class EVMService { } Future ethSign(String topic, dynamic parameters) async { - debugPrint('[WALLET] ethSign request: $parameters'); + debugPrint('[SampleWallet] ethSign request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; final data = EthUtils.getDataFromSessionRequest(pRequest); final message = EthUtils.getUtf8Message(data.toString()); @@ -176,7 +176,7 @@ class EVMService { response = response.copyWith(result: signedTx); } catch (e) { - debugPrint('[WALLET] ethSign error $e'); + debugPrint('[SampleWallet] ethSign error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -196,7 +196,7 @@ class EVMService { } Future ethSignTypedData(String topic, dynamic parameters) async { - debugPrint('[WALLET] ethSignTypedData request: $parameters'); + debugPrint('[SampleWallet] ethSignTypedData request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; final data = EthUtils.getDataFromSessionRequest(pRequest); var response = JsonRpcResponse( @@ -218,7 +218,7 @@ class EVMService { response = response.copyWith(result: signature); } catch (e) { - debugPrint('[WALLET] ethSignTypedData error $e'); + debugPrint('[SampleWallet] ethSignTypedData error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -238,7 +238,7 @@ class EVMService { } Future ethSignTypedDataV4(String topic, dynamic parameters) async { - debugPrint('[WALLET] ethSignTypedDataV4 request: $parameters'); + debugPrint('[SampleWallet] ethSignTypedDataV4 request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; final data = EthUtils.getDataFromSessionRequest(pRequest); var response = JsonRpcResponse( @@ -260,7 +260,7 @@ class EVMService { response = response.copyWith(result: signature); } catch (e) { - debugPrint('[WALLET] ethSignTypedDataV4 error $e'); + debugPrint('[SampleWallet] ethSignTypedDataV4 error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -280,7 +280,7 @@ class EVMService { } Future ethSignTransaction(String topic, dynamic parameters) async { - debugPrint('[WALLET] ethSignTransaction request: $parameters'); + debugPrint('[SampleWallet] ethSignTransaction request: $parameters'); final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; final data = EthUtils.getTransactionFromSessionRequest(pRequest); @@ -317,12 +317,12 @@ class EVMService { response = response.copyWith(result: signedTx); } on RPCError catch (e) { - debugPrint('[WALLET] ethSignTransaction error $e'); + debugPrint('[SampleWallet] ethSignTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: e.errorCode, message: e.message), ); } catch (e) { - debugPrint('[WALLET] ethSignTransaction error $e'); + debugPrint('[SampleWallet] ethSignTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -340,7 +340,7 @@ class EVMService { } Future ethSendTransaction(String topic, dynamic parameters) async { - debugPrint('[WALLET] ethSendTransaction request: $parameters'); + debugPrint('[SampleWallet] ethSendTransaction request: $parameters'); final SessionRequest pRequest = _web3Wallet.pendingRequests.getAll().last; final data = EthUtils.getTransactionFromSessionRequest(pRequest); @@ -375,12 +375,12 @@ class EVMService { response = response.copyWith(result: signedTx); } on RPCError catch (e) { - debugPrint('[WALLET] ethSendTransaction error $e'); + debugPrint('[SampleWallet] ethSendTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: e.errorCode, message: e.message), ); } catch (e) { - debugPrint('[WALLET] ethSendTransaction error $e'); + debugPrint('[SampleWallet] ethSendTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -398,7 +398,7 @@ class EVMService { } Future switchChain(String topic, dynamic parameters) async { - debugPrint('[WALLET] switchChain request: $topic $parameters'); + debugPrint('[SampleWallet] switchChain request: $topic $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse(id: pRequest.id, jsonrpc: '2.0'); try { @@ -415,12 +415,12 @@ class EVMService { ); response = response.copyWith(result: true); } on WalletConnectError catch (e) { - debugPrint('[WALLET] switchChain error $e'); + debugPrint('[SampleWallet] switchChain error $e'); response = response.copyWith( error: JsonRpcError(code: e.code, message: e.message), ); } catch (e) { - debugPrint('[WALLET] switchChain error $e'); + debugPrint('[SampleWallet] switchChain error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -435,7 +435,6 @@ class EVMService { } // Future addChain(String topic, dynamic parameters) async { - // debugPrint('[WALLET] addChain request: $topic $parameters'); // final pRequest = _web3Wallet.pendingRequests.getAll().last; // await _web3Wallet.respondSessionRequest( // topic: topic, @@ -537,7 +536,7 @@ class EVMService { void _onSessionRequest(SessionRequestEvent? args) async { if (args != null && args.chainId == chainSupported.chainId) { - debugPrint('[WALLET] _onSessionRequest ${args.toString()}'); + debugPrint('[SampleWallet] _onSessionRequest ${args.toString()}'); final handler = sessionRequestHandlers[args.method]; if (handler != null) { await handler(args.topic, args.params); @@ -551,24 +550,23 @@ class EVMService { String hexAddress, ) { try { - debugPrint('isValidSignature(): $hexSignature, $message, $hexAddress'); + debugPrint( + '[SampleWallet] isValidSignature: $hexSignature, $message, $hexAddress'); final recoveredAddress = EthSigUtil.recoverPersonalSignature( signature: hexSignature, message: utf8.encode(message), ); - debugPrint('recoveredAddress: $recoveredAddress'); + debugPrint('[SampleWallet] recoveredAddress: $recoveredAddress'); final recoveredAddress2 = EthSigUtil.recoverSignature( signature: hexSignature, message: utf8.encode(message), ); - debugPrint('recoveredAddress2: $recoveredAddress2'); + debugPrint('[SampleWallet] recoveredAddress2: $recoveredAddress2'); final isValid = recoveredAddress == hexAddress; - debugPrint('isValidSignature: $isValid'); return isValid; } catch (e) { - debugPrint('isValidSignature() error, $e'); return false; } } diff --git a/example/wallet/lib/dependencies/chains/kadena_service.dart b/example/wallet/lib/dependencies/chains/kadena_service.dart index f7fd84fb..f0ee3790 100644 --- a/example/wallet/lib/dependencies/chains/kadena_service.dart +++ b/example/wallet/lib/dependencies/chains/kadena_service.dart @@ -47,7 +47,7 @@ class KadenaService { } Future kadenaGetAccountsV1(String topic, dynamic parameters) async { - debugPrint('[WALLET] kadenaGetAccountsV1 request: $parameters'); + debugPrint('[SampleWallet] kadenaGetAccountsV1 request: $parameters'); final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse( id: pRequest.id, @@ -89,7 +89,7 @@ class KadenaService { ).toJson(), ); } catch (e) { - debugPrint('[WALLET] kadenaGetAccountsV1 error: $e'); + debugPrint('[SampleWallet] kadenaGetAccountsV1 error: $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -104,7 +104,8 @@ class KadenaService { } Future kadenaSignV1(String topic, dynamic parameters) async { - debugPrint('[WALLET] kadenaSignV1 request: ${jsonEncode(parameters)}'); + debugPrint( + '[SampleWallet] kadenaSignV1 request: ${jsonEncode(parameters)}'); final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse( id: pRequest.id, @@ -156,7 +157,7 @@ class KadenaService { ); } } catch (e) { - debugPrint('[WALLET] kadenaSignV1 error: $e'); + debugPrint('[SampleWallet] kadenaSignV1 error: $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -171,7 +172,8 @@ class KadenaService { } Future kadenaQuicksignV1(String topic, dynamic parameters) async { - debugPrint('[WALLET] kadenaQuicksignV1 request: ${jsonEncode(parameters)}'); + debugPrint( + '[SampleWallet] kadenaQuicksignV1 request: ${jsonEncode(parameters)}'); final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse( id: pRequest.id, @@ -242,7 +244,7 @@ class KadenaService { ); } } catch (e) { - debugPrint('[WALLET] kadenaSignV1 error: $e'); + debugPrint('[SampleWallet] kadenaSignV1 error: $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -258,7 +260,7 @@ class KadenaService { void _onSessionRequest(SessionRequestEvent? args) async { if (args != null && args.chainId == chainSupported.chainId) { - debugPrint('[WALLET] _onSessionRequest ${args.toString()}'); + debugPrint('[SampleWallet] _onSessionRequest ${args.toString()}'); final handler = kadenaRequestHandlers[args.method]; if (handler != null) { await handler(args.topic, args.params); diff --git a/example/wallet/lib/dependencies/chains/polkadot_service.dart b/example/wallet/lib/dependencies/chains/polkadot_service.dart index 15947daf..a364d49b 100644 --- a/example/wallet/lib/dependencies/chains/polkadot_service.dart +++ b/example/wallet/lib/dependencies/chains/polkadot_service.dart @@ -44,7 +44,7 @@ class PolkadotService { } Future polkadotSignMessage(String topic, dynamic parameters) async { - debugPrint('[WALLET] polkadotSignMessage: $parameters'); + debugPrint('[SampleWallet] polkadotSignMessage: $parameters'); const method = 'polkadot_signMessage'; final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse( @@ -55,7 +55,7 @@ class PolkadotService { try { final params = parameters as Map; final message = params['message'].toString(); - debugPrint('[WALLET] polkadotSignMessage message: $message'); + debugPrint('[SampleWallet] polkadotSignMessage message: $message'); // code final keys = GetIt.I().getKeysForChain( @@ -86,7 +86,7 @@ class PolkadotService { ); } } catch (e) { - debugPrint('[WALLET] polkadotSignMessage error $e'); + debugPrint('[SampleWallet] polkadotSignMessage error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -101,7 +101,8 @@ class PolkadotService { } Future polkadotSignTransaction(String topic, dynamic parameters) async { - debugPrint('[WALLET] polkadotSignTransaction: ${jsonEncode(parameters)}'); + debugPrint( + '[SampleWallet] polkadotSignTransaction: ${jsonEncode(parameters)}'); const method = 'polkadot_signTransaction'; final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse( @@ -144,7 +145,7 @@ class PolkadotService { }, ); } catch (e) { - debugPrint('[WALLET] polkadotSignTransaction error $e'); + debugPrint('[SampleWallet] polkadotSignTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -165,7 +166,7 @@ class PolkadotService { void _onSessionRequest(SessionRequestEvent? args) async { if (args != null && args.chainId == chainSupported.chainId) { - debugPrint('[WALLET] _onSessionRequest ${args.toString()}'); + debugPrint('[SampleWallet] _onSessionRequest ${args.toString()}'); final handler = polkadotRequestHandlers[args.method]; if (handler != null) { await handler(args.topic, args.params); diff --git a/example/wallet/lib/dependencies/chains/solana_service.dart b/example/wallet/lib/dependencies/chains/solana_service.dart index 26fc1954..3c330f5b 100644 --- a/example/wallet/lib/dependencies/chains/solana_service.dart +++ b/example/wallet/lib/dependencies/chains/solana_service.dart @@ -35,7 +35,7 @@ class SolanaService { } Future solanaSignMessage(String topic, dynamic parameters) async { - debugPrint('[WALLET] solanaSignMessage request: $parameters'); + debugPrint('[SampleWallet] solanaSignMessage request: $parameters'); const method = 'solana_signMessage'; final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse(id: pRequest.id, jsonrpc: '2.0'); @@ -71,7 +71,7 @@ class SolanaService { } // } catch (e) { - debugPrint('[WALLET] polkadotSignMessage error $e'); + debugPrint('[SampleWallet] polkadotSignMessage error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); @@ -86,7 +86,8 @@ class SolanaService { } Future solanaSignTransaction(String topic, dynamic parameters) async { - debugPrint('[WALLET] solanaSignTransaction: ${jsonEncode(parameters)}'); + debugPrint( + '[SampleWallet] solanaSignTransaction: ${jsonEncode(parameters)}'); const method = 'solana_signTransaction'; final pRequest = _web3Wallet.pendingRequests.getAll().last; var response = JsonRpcResponse(id: pRequest.id, jsonrpc: '2.0'); @@ -137,7 +138,7 @@ class SolanaService { ); } } catch (e) { - debugPrint('[WALLET] solanaSignTransaction error $e'); + debugPrint('[SampleWallet] solanaSignTransaction error $e'); response = response.copyWith( error: JsonRpcError(code: 0, message: e.toString()), ); diff --git a/example/wallet/lib/dependencies/key_service/key_service.dart b/example/wallet/lib/dependencies/key_service/key_service.dart index 5e0093b9..1a4e0ab0 100644 --- a/example/wallet/lib/dependencies/key_service/key_service.dart +++ b/example/wallet/lib/dependencies/key_service/key_service.dart @@ -120,7 +120,7 @@ class KeyService extends IKeyService { publicKey: keyPair.publicKey, address: address, ); - debugPrint('[WALLET] evmChainKey ${evmChainKey.toString()}'); + debugPrint('[SampleWallet] evmChainKey ${evmChainKey.toString()}'); return evmChainKey; } @@ -129,11 +129,12 @@ class KeyService extends IKeyService { Future> _extraKeyPairs() async { // HARDCODED VALUES final kadenaChainKey = _kadenaKeyPair(); - debugPrint('[WALLET] kadenaChainKey ${kadenaChainKey.toString()}'); + debugPrint('[SampleWallet] kadenaChainKey ${kadenaChainKey.toString()}'); final polkadotChainKey = _polkadotKeyPair(); - debugPrint('[WALLET] polkadotChainKey ${polkadotChainKey.toString()}'); + debugPrint( + '[SampleWallet] polkadotChainKey ${polkadotChainKey.toString()}'); final solanaChainKeys = _solanaKeyPair(); - debugPrint('[WALLET] solanaChainKey $solanaChainKeys'); + debugPrint('[SampleWallet] solanaChainKey $solanaChainKeys'); // return [ kadenaChainKey, diff --git a/example/wallet/lib/pages/app_detail_page.dart b/example/wallet/lib/pages/app_detail_page.dart index eaf348b7..1605964b 100644 --- a/example/wallet/lib/pages/app_detail_page.dart +++ b/example/wallet/lib/pages/app_detail_page.dart @@ -88,7 +88,7 @@ class AppDetailPageState extends State { ); setState(() {}); } catch (e) { - debugPrint('[WALLET] ${e.toString()}'); + debugPrint('[SampleWallet] ${e.toString()}'); } }, child: const Center( @@ -187,7 +187,7 @@ class AppDetailPageState extends State { } _back(); } catch (e) { - debugPrint('[WALLET] ${e.toString()}'); + debugPrint('[SampleWallet] ${e.toString()}'); } }, child: const Center( From 938d1cb9aa76b3961ad23b3a7726c50c61f32a89 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 7 Aug 2024 14:30:17 +0200 Subject: [PATCH 09/27] Support EIP55 addresses and fixes on the sample wallet for wc certification --- example/wallet/ios/Podfile.lock | 7 + .../bottom_sheet/bottom_sheet_listener.dart | 7 +- .../lib/dependencies/deep_link_handler.dart | 28 +- .../dependencies/key_service/chain_key.dart | 29 +- .../key_service/i_key_service.dart | 10 +- .../dependencies/key_service/key_service.dart | 131 +-- .../lib/dependencies/web3wallet_service.dart | 71 +- example/wallet/lib/pages/settings_page.dart | 781 +++++++++++++++--- example/wallet/lib/utils/dart_defines.dart | 17 +- example/wallet/lib/widgets/custom_button.dart | 2 +- .../wc_request_widget.dart | 71 +- .../wc_session_auth_request_widget.dart | 82 +- .../Flutter/GeneratedPluginRegistrant.swift | 2 + example/wallet/pubspec.yaml | 2 +- .../flutter/generated_plugin_registrant.cc | 3 + .../windows/flutter/generated_plugins.cmake | 1 + lib/apis/core/connectivity/connectivity.dart | 8 + .../connectivity/connectivity_models.dart | 9 + .../core/connectivity/i_connectivity.dart | 6 + lib/apis/sign_api/sign_engine.dart | 6 +- pubspec.yaml | 1 + test/shared/shared_test_utils.mocks.dart | 2 +- 22 files changed, 939 insertions(+), 337 deletions(-) create mode 100644 lib/apis/core/connectivity/connectivity.dart create mode 100644 lib/apis/core/connectivity/connectivity_models.dart create mode 100644 lib/apis/core/connectivity/i_connectivity.dart diff --git a/example/wallet/ios/Podfile.lock b/example/wallet/ios/Podfile.lock index 43430323..8cc5efd9 100644 --- a/example/wallet/ios/Podfile.lock +++ b/example/wallet/ios/Podfile.lock @@ -1,4 +1,7 @@ PODS: + - connectivity_plus (0.0.1): + - Flutter + - FlutterMacOS - Flutter (1.0.0) - MTBBarcodeScanner (5.0.11) - package_info_plus (0.4.5): @@ -15,6 +18,7 @@ PODS: - Flutter DEPENDENCIES: + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`) - Flutter (from `Flutter`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - qr_bar_code_scanner_dialog (from `.symlinks/plugins/qr_bar_code_scanner_dialog/ios`) @@ -27,6 +31,8 @@ SPEC REPOS: - MTBBarcodeScanner EXTERNAL SOURCES: + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/darwin" Flutter: :path: Flutter package_info_plus: @@ -41,6 +47,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: + connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c diff --git a/example/wallet/lib/dependencies/bottom_sheet/bottom_sheet_listener.dart b/example/wallet/lib/dependencies/bottom_sheet/bottom_sheet_listener.dart index cac0c2e0..75386db0 100644 --- a/example/wallet/lib/dependencies/bottom_sheet/bottom_sheet_listener.dart +++ b/example/wallet/lib/dependencies/bottom_sheet/bottom_sheet_listener.dart @@ -45,7 +45,12 @@ class BottomSheetListenerState extends State { builder: (context) { if (item.closeAfter > 0) { Future.delayed(Duration(seconds: item.closeAfter), () { - Navigator.pop(context); + try { + if (!mounted) return; + Navigator.pop(context); + } catch (e) { + debugPrint('[$runtimeType] close $e'); + } }); } return Container( diff --git a/example/wallet/lib/dependencies/deep_link_handler.dart b/example/wallet/lib/dependencies/deep_link_handler.dart index beb9d9af..b415b6bd 100644 --- a/example/wallet/lib/dependencies/deep_link_handler.dart +++ b/example/wallet/lib/dependencies/deep_link_handler.dart @@ -10,12 +10,18 @@ import 'package:walletconnect_flutter_v2_wallet/utils/constants.dart'; class DeepLinkHandler { // - static final waiting = ValueNotifier(false); + static const _methodChannel = MethodChannel( + 'com.walletconnect.flutterwallet/methods', + ); + static const _eventChannel = EventChannel( + 'com.walletconnect.flutterwallet/events', + ); + // static final _linksController = StreamController.broadcast(); - static const _methodChannel = - MethodChannel('com.walletconnect.flutterwallet/methods'); - static const _eventChannel = - EventChannel('com.walletconnect.flutterwallet/events'); + static Stream get onLink => _linksController.stream; + // + static final waiting = ValueNotifier(false); + // static void initListener() { if (kIsWeb) return; @@ -33,12 +39,10 @@ class DeepLinkHandler { onError: _onError, ); } catch (e) { - debugPrint('[WALLET] [DeepLinkHandler] checkInitialLink $e'); + debugPrint('[SampleWallet] [DeepLinkHandler] checkInitialLink $e'); } } - static Stream get onLink => _linksController.stream; - static void goTo( String scheme, { int delay = 100, @@ -47,15 +51,13 @@ class DeepLinkHandler { bool success = true, }) async { waiting.value = false; - if (kIsWeb) return; - if (scheme.isEmpty) return; await Future.delayed(Duration(milliseconds: delay)); - debugPrint('[WALLET] [DeepLinkHandler] redirecting to $scheme'); + debugPrint('[SampleWallet] [DeepLinkHandler] redirecting to $scheme'); try { await launchUrlString(scheme, mode: LaunchMode.externalApplication); } catch (e) { debugPrint( - '[WALLET] [DeepLinkHandler] error re-opening dapp ($scheme). $e'); + '[SampleWallet] [DeepLinkHandler] error re-opening dapp ($scheme). $e'); _goBackModal( title: modalTitle, message: modalMessage, @@ -79,7 +81,7 @@ class DeepLinkHandler { static void _onError(Object error) { waiting.value = false; - debugPrint('[WALLET] [DeepLinkHandler] _onError $error'); + debugPrint('[SampleWallet] [DeepLinkHandler] _onError $error'); } static void _goBackModal({ diff --git a/example/wallet/lib/dependencies/key_service/chain_key.dart b/example/wallet/lib/dependencies/key_service/chain_key.dart index 8db7da01..1c64d9d5 100644 --- a/example/wallet/lib/dependencies/key_service/chain_key.dart +++ b/example/wallet/lib/dependencies/key_service/chain_key.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + class ChainKey { final List chains; final String privateKey; @@ -11,8 +13,29 @@ class ChainKey { required this.address, }); - @override - String toString() { - return 'ChainKey(chains: $chains, privateKey: $privateKey, publicKey: $publicKey, address: $address)'; + String get namespace { + if (chains.isNotEmpty) { + return chains.first.split(':').first; + } + return ''; } + + Map toJson() => { + 'chains': chains, + 'privateKey': privateKey, + 'publicKey': privateKey, + 'address': address, + }; + + factory ChainKey.fromJson(Map json) { + return ChainKey( + chains: (json['chains'] as List).map((e) => '$e').toList(), + privateKey: json['privateKey'], + publicKey: json['publicKey'], + address: json['address'], + ); + } + + @override + String toString() => jsonEncode(toJson()); } diff --git a/example/wallet/lib/dependencies/key_service/i_key_service.dart b/example/wallet/lib/dependencies/key_service/i_key_service.dart index aa3a122b..21d813d2 100644 --- a/example/wallet/lib/dependencies/key_service/i_key_service.dart +++ b/example/wallet/lib/dependencies/key_service/i_key_service.dart @@ -2,7 +2,7 @@ import 'package:walletconnect_flutter_v2_wallet/dependencies/key_service/chain_k abstract class IKeyService { /// Returns a list of all the keys. - Future> setKeys(); + Future> loadKeys(); /// Returns a list of all the chain ids. List getChains(); @@ -10,16 +10,14 @@ abstract class IKeyService { /// Returns a list of all the keys for a given chain id. /// If the chain is not found, returns an empty list. /// - [chain]: The chain to get the keys for. - List getKeysForChain(String chain); + List getKeysForChain(String value); /// Returns a list of all the accounts in namespace:chainId:address format. List getAllAccounts(); - Future createNewWallet(); + Future createAddressFromSeed(); Future loadDefaultWallet(); - Future restoreWallet({required String mnemonic}); - - Future deleteWallet(); + Future restoreWalletFromSeed({required String mnemonic}); } diff --git a/example/wallet/lib/dependencies/key_service/key_service.dart b/example/wallet/lib/dependencies/key_service/key_service.dart index 1a4e0ab0..91427eb5 100644 --- a/example/wallet/lib/dependencies/key_service/key_service.dart +++ b/example/wallet/lib/dependencies/key_service/key_service.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:developer'; + import 'package:convert/convert.dart'; import 'package:flutter/foundation.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart'; @@ -12,48 +15,49 @@ import 'package:walletconnect_flutter_v2_wallet/dependencies/bip32/bip32_base.da import 'package:walletconnect_flutter_v2_wallet/utils/dart_defines.dart'; class KeyService extends IKeyService { - final List keys = []; + List _keys = []; @override - Future> setKeys() async { - // WARNING: SharedPreferences is not the best way to store your keys! + Future> loadKeys() async { + // ⚠️ WARNING: SharedPreferences is not the best way to store your keys! This is just for example purposes! final prefs = await SharedPreferences.getInstance(); - final privateKey = prefs.getString('privateKey') ?? ''; - if (privateKey.isEmpty) { - return []; + try { + final savedKeys = prefs.getStringList('w3w_chain_keys')!; + final chainKeys = savedKeys.map((e) => ChainKey.fromJson(jsonDecode(e))); + _keys = List.from(chainKeys.toList()); + // + final extraKeys = await _extraChainKeys(); + _keys.addAll(extraKeys); + } catch (e, s) { + debugPrint('[$runtimeType] loadKeys() error: $e'); + debugPrint(s.toString()); } - final publicKey = prefs.getString('publicKey') ?? ''; - - final keyPair = CryptoKeyPair(privateKey, publicKey); - final eip155KeyPair = _eip155KeyPair(keyPair); - keys - ..clear() - ..add(eip155KeyPair); - - final extraKeys = await _extraKeyPairs(); - keys.addAll(extraKeys); - return keys; + log('[$runtimeType] _keys $_keys'); + return _keys; } @override List getChains() { final List chainIds = []; - for (final ChainKey key in keys) { + for (final ChainKey key in _keys) { chainIds.addAll(key.chains); } return chainIds; } @override - List getKeysForChain(String chain) { - return keys.where((e) => e.chains.contains(chain)).toList(); + List getKeysForChain(String value) { + if (value.contains(':')) { + return _keys.where((e) => e.chains.contains(value)).toList(); + } + return _keys.where((e) => e.namespace == value).toList(); } @override List getAllAccounts() { final List accounts = []; - for (final ChainKey key in keys) { + for (final ChainKey key in _keys) { for (final String chain in key.chains) { accounts.add('$chain:${key.address}'); } @@ -64,39 +68,58 @@ class KeyService extends IKeyService { // ** bip39/bip32 - EIP155 ** @override - Future createNewWallet() async { - final mnemonic = bip39.generateMnemonic(); - await restoreWallet(mnemonic: mnemonic); + Future loadDefaultWallet() async { + const mnemonic = + 'spoil video deputy round immense setup wasp secret maze slight bag what'; + await restoreWalletFromSeed(mnemonic: mnemonic); } @override - Future restoreWallet({required String mnemonic}) async { - final keyPair = _keyPairFromMnemonic(mnemonic); - - // WARNING: SharedPreferences is not the best way to store your keys! + Future createAddressFromSeed() async { final prefs = await SharedPreferences.getInstance(); - await prefs.setString('privateKey', keyPair.privateKey); - await prefs.setString('publicKey', keyPair.publicKey); - await prefs.setString('mnemonic', mnemonic); + final mnemonic = prefs.getString('w3w_mnemonic')!; + + final chainKeys = getKeysForChain('eip155'); + final index = chainKeys.length; + + final keyPair = _keyPairFromMnemonic(mnemonic, index: index); + final chainKey = _eip155ChainKey(keyPair); - await setKeys(); + _keys.add(chainKey); + + await _saveKeys(); + + // final mnemonic = bip39.generateMnemonic(); + // await restoreWallet(mnemonic: mnemonic); } @override - Future loadDefaultWallet() async { - const mnemonic = - 'spoil video deputy round immense setup wasp secret maze slight bag what'; - await restoreWallet(mnemonic: mnemonic); + Future restoreWalletFromSeed({required String mnemonic}) async { + // ⚠️ WARNING: SharedPreferences is not the best way to store your keys! This is just for example purposes! + final prefs = await SharedPreferences.getInstance(); + await prefs.remove('w3w_chain_keys'); + // await prefs.remove('w3w_mnemonic'); + await prefs.setString('w3w_mnemonic', mnemonic); + + final keyPair = _keyPairFromMnemonic(mnemonic); + final chainKey = _eip155ChainKey(keyPair); + + _keys = List.from([chainKey]); + + await _saveKeys(); } - @override - Future deleteWallet() async { + Future _saveKeys() async { final prefs = await SharedPreferences.getInstance(); - await prefs.clear(); - keys.clear(); + // Store only eip155 keys + final chainKeys = _keys + .where((k) => k.namespace == 'eip155') + .map((e) => jsonEncode(e.toJson())) + .toList(); + await prefs.setStringList('w3w_chain_keys', chainKeys); } - CryptoKeyPair _keyPairFromMnemonic(String mnemonic) { + CryptoKeyPair _keyPairFromMnemonic(String mnemonic, {int index = 0}) { final isValidMnemonic = bip39.validateMnemonic(mnemonic); if (!isValidMnemonic) { throw 'Invalid mnemonic'; @@ -105,13 +128,13 @@ class KeyService extends IKeyService { final seed = bip39.mnemonicToSeed(mnemonic); final root = bip32.BIP32.fromSeed(seed); - final firstChild = root.derivePath("m/44'/60'/0'/0/0"); - final private = hex.encode(firstChild.privateKey as List); - final public = hex.encode(firstChild.publicKey); + final child = root.derivePath("m/44'/60'/0'/0/$index"); + final private = hex.encode(child.privateKey as List); + final public = hex.encode(child.publicKey); return CryptoKeyPair(private, public); } - ChainKey _eip155KeyPair(CryptoKeyPair keyPair) { + ChainKey _eip155ChainKey(CryptoKeyPair keyPair) { final private = EthPrivateKey.fromHex(keyPair.privateKey); final address = private.address.hex; final evmChainKey = ChainKey( @@ -126,15 +149,11 @@ class KeyService extends IKeyService { // ** extra derivations ** - Future> _extraKeyPairs() async { + Future> _extraChainKeys() async { // HARDCODED VALUES - final kadenaChainKey = _kadenaKeyPair(); - debugPrint('[SampleWallet] kadenaChainKey ${kadenaChainKey.toString()}'); - final polkadotChainKey = _polkadotKeyPair(); - debugPrint( - '[SampleWallet] polkadotChainKey ${polkadotChainKey.toString()}'); - final solanaChainKeys = _solanaKeyPair(); - debugPrint('[SampleWallet] solanaChainKey $solanaChainKeys'); + final kadenaChainKey = _kadenaChainKey(); + final polkadotChainKey = _polkadotChainKey(); + final solanaChainKeys = _solanaChainKey(); // return [ kadenaChainKey, @@ -143,7 +162,7 @@ class KeyService extends IKeyService { ]; } - ChainKey _kadenaKeyPair() { + ChainKey _kadenaChainKey() { return ChainKey( chains: ChainData.kadenaChains.map((e) => e.chainId).toList(), privateKey: DartDefines.kadenaSecretKey, @@ -152,7 +171,7 @@ class KeyService extends IKeyService { ); } - ChainKey _polkadotKeyPair() { + ChainKey _polkadotChainKey() { return ChainKey( chains: ChainData.polkadotChains.map((e) => e.chainId).toList(), privateKey: DartDefines.polkadotMnemonic, @@ -161,7 +180,7 @@ class KeyService extends IKeyService { ); } - ChainKey _solanaKeyPair() { + ChainKey _solanaChainKey() { return ChainKey( chains: ChainData.solanaChains.map((e) => e.chainId).toList(), privateKey: DartDefines.solanaSecretKey, diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index f5f459af..2c4ded78 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -66,13 +66,11 @@ class Web3WalletService extends IWeb3WalletService { _web3Wallet!.onAuthRequest.subscribe(_onAuthRequest); - await _web3Wallet!.init(); - // Setup our accounts - List chainKeys = await GetIt.I().setKeys(); + List chainKeys = await GetIt.I().loadKeys(); if (chainKeys.isEmpty) { await GetIt.I().loadDefaultWallet(); - chainKeys = await GetIt.I().setKeys(); + chainKeys = await GetIt.I().loadKeys(); } for (final chainKey in chainKeys) { for (final chainId in chainKey.chains) { @@ -99,6 +97,21 @@ class Web3WalletService extends IWeb3WalletService { Future init() async { // Await the initialization of the web3wallet await _web3Wallet!.init(); + + final sessions = _web3Wallet!.sessions.getAll(); + final chainKeys = GetIt.I().getKeysForChain('eip155'); + for (var session in sessions) { + try { + _web3Wallet!.emitSessionEvent( + topic: session.topic, + chainId: 'eip155:1', + event: SessionEventParams( + name: 'accountsChanged', + data: [chainKeys.first.address], + ), + ); + } catch (e) {} + } } void _logListener(LogEvent event) { @@ -131,26 +144,19 @@ class Web3WalletService extends IWeb3WalletService { @override Web3Wallet get web3wallet => _web3Wallet!; + List get _loaderMethods => [ + 'wc_sessionPropose', + 'wc_sessionRequest', + 'wc_sessionAuthenticate', + ]; + void _onRelayClientMessage(MessageEvent? event) async { if (event != null) { final jsonObject = await EthUtils.decodeMessageEvent(event); - debugPrint('[SampleWallet] _onRelayClientMessage $jsonObject'); + log('[SampleWallet] _onRelayClientMessage $jsonObject'); if (jsonObject is JsonRpcRequest) { - if (jsonObject.method == 'wc_sessionPropose' || - jsonObject.method == 'wc_sessionRequest') { - DeepLinkHandler.waiting.value = true; - } - } else { - final session = _web3Wallet!.sessions.get(event.topic); - final scheme = session?.peer.metadata.redirect?.native ?? ''; - final isSuccess = jsonObject.result != null; - final title = isSuccess ? null : 'Error'; - final message = isSuccess ? null : jsonObject.error?.message ?? ''; - DeepLinkHandler.goTo( - scheme, - modalTitle: title, - modalMessage: message, - success: isSuccess, + DeepLinkHandler.waiting.value = _loaderMethods.contains( + jsonObject.method, ); } } @@ -159,19 +165,18 @@ class Web3WalletService extends IWeb3WalletService { void _onSessionProposal(SessionProposalEvent? args) async { if (args != null) { log('[SampleWallet] _onSessionProposal ${jsonEncode(args.params)}'); - final WCBottomSheetResult rs = - (await _bottomSheetHandler.queueBottomSheet( - widget: WCRequestWidget( - child: WCConnectionRequestWidget( - proposalData: args.params, - verifyContext: args.verifyContext, - metadata: args.params.proposer, - ), - ), - )) ?? - WCBottomSheetResult.reject; + final result = (await _bottomSheetHandler.queueBottomSheet( + widget: WCRequestWidget( + child: WCConnectionRequestWidget( + proposalData: args.params, + verifyContext: args.verifyContext, + metadata: args.params.proposer, + ), + ), + )) ?? + WCBottomSheetResult.reject; - if (rs != WCBottomSheetResult.reject) { + if (result != WCBottomSheetResult.reject) { // generatedNamespaces is constructed based on registered methods handlers // so if you want to handle requests using onSessionRequest event then you would need to manually add that method in the approved namespaces await _web3Wallet!.approveSession( @@ -240,7 +245,7 @@ class Web3WalletService extends IWeb3WalletService { void _onSessionConnect(SessionConnect? args) { if (args != null) { - log('[SampleWallet] _onSessionConnect ${jsonEncode(args.session)}'); + log('[SampleWallet] _onSessionConnect ${jsonEncode(args.session.toJson())}'); final scheme = args.session.peer.metadata.redirect?.native ?? ''; DeepLinkHandler.goTo(scheme); } diff --git a/example/wallet/lib/pages/settings_page.dart b/example/wallet/lib/pages/settings_page.dart index f6968ede..3414d80b 100644 --- a/example/wallet/lib/pages/settings_page.dart +++ b/example/wallet/lib/pages/settings_page.dart @@ -1,3 +1,4 @@ +import 'dart:math'; import 'dart:ui'; import 'package:fl_toast/fl_toast.dart'; @@ -13,8 +14,6 @@ import 'package:walletconnect_flutter_v2_wallet/utils/constants.dart'; import 'package:walletconnect_flutter_v2_wallet/widgets/custom_button.dart'; import 'package:walletconnect_flutter_v2_wallet/widgets/recover_from_seed.dart'; -// import 'package:package_info_plus/package_info_plus.dart'; - class SettingsPage extends StatefulWidget { const SettingsPage({super.key}); @@ -26,147 +25,523 @@ class _SettingsPageState extends State { @override Widget build(BuildContext context) { final keysService = GetIt.I(); - final chainKeys = keysService.getKeysForChain('eip155:1'); - final web3Wallet = GetIt.I().web3wallet; - return Padding( - padding: const EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Padding( - padding: EdgeInsets.only(left: 8.0, bottom: 8.0), - child: Text( - 'Account', - style: TextStyle( - color: Colors.black, - fontSize: 16.0, - fontWeight: FontWeight.w500, - ), - ), - ), - _DataContainer( - title: 'CAIP-10', - data: 'eip155:1:${chainKeys.first.address}', - ), - const SizedBox(height: 12.0), - _DataContainer( - title: 'Public key', - data: chainKeys.first.publicKey, - ), - const SizedBox(height: 12.0), - _DataContainer( - title: 'Private key', - data: chainKeys.first.privateKey, - blurred: true, - ), - const SizedBox(height: 12.0), - FutureBuilder( - future: SharedPreferences.getInstance(), - builder: (context, snapshot) { - return _DataContainer( - title: 'Seed phrase', - data: snapshot.data?.getString('mnemonic') ?? '', - blurred: true, + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _EVMAccounts( + onCreateAddress: () async { + await keysService.createAddressFromSeed(); + await keysService.loadKeys(); + // ignore: use_build_context_synchronously + Navigator.of(context).pop(); + setState(() {}); + }, + onAccountChanged: (address) async { + final web3wallet = GetIt.I().web3wallet; + final sessions = web3wallet.sessions.getAll(); + for (var session in sessions) { + await web3wallet.emitSessionEvent( + topic: session.topic, + chainId: 'eip155:1', + event: SessionEventParams( + name: 'accountsChanged', + data: [address], + ), ); - }, - ), - const SizedBox(height: 20.0), - const Divider(height: 1.0), - const Padding( - padding: EdgeInsets.only(left: 8.0, bottom: 8.0, top: 20.0), - child: Text( - 'Device', - style: TextStyle( - color: Colors.black, - fontSize: 16.0, - fontWeight: FontWeight.w500, - ), - ), - ), - FutureBuilder( - future: web3Wallet.core.crypto.getClientId(), - builder: (context, snapshot) { - return _DataContainer( - title: 'Client ID', - data: snapshot.data ?? '', + } + setState(() {}); + }, + ), + // + const SizedBox(height: 20.0), + const Divider(height: 1.0), + _SolanaAccounts(), + const SizedBox(height: 20.0), + const Divider(height: 1.0), + _PolkadotAccounts(), + const SizedBox(height: 20.0), + const Divider(height: 1.0), + _KadenaAccounts(), + const SizedBox(height: 20.0), + const Divider(height: 1.0), + _DeviceData(), + const SizedBox(height: 20.0), + const Divider(height: 1.0), + _Buttons( + onRestoreFromSeed: () async { + final mnemonic = + await GetIt.I().queueBottomSheet( + widget: RecoverFromSeed(), + ); + if (mnemonic is String) { + await keysService.restoreWalletFromSeed( + mnemonic: mnemonic, ); - }, + await keysService.loadKeys(); + await showDialog( + // ignore: use_build_context_synchronously + context: context, + builder: (BuildContext context) { + return const AlertDialog( + content: Text('Wallet from seed restored'), + ); + }, + ); + setState(() {}); + } + }, + onRestoreDefault: () async { + await keysService.loadDefaultWallet(); + await keysService.loadKeys(); + await showDialog( + // ignore: use_build_context_synchronously + context: context, + builder: (BuildContext context) { + return const AlertDialog( + content: Text('Default wallet restored'), + ); + }, + ); + setState(() {}); + }, + ), + // + ], + ), + ), + ), + ], + ); + } +} + +class _EVMAccounts extends StatefulWidget { + final VoidCallback onCreateAddress; + final Function(String) onAccountChanged; + const _EVMAccounts({ + required this.onCreateAddress, + required this.onAccountChanged, + }); + + @override + State<_EVMAccounts> createState() => _EVMAccountsState(); +} + +class _EVMAccountsState extends State<_EVMAccounts> { + int _currentPage = 0; + late final PageController _pageController; + + @override + void initState() { + super.initState(); + _pageController = PageController(); + } + + @override + Widget build(BuildContext context) { + final keysService = GetIt.I(); + final chainKeys = keysService.getKeysForChain('eip155'); + debugPrint('[$runtimeType] chainKeys ${chainKeys.length}'); + return Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Row( + children: [ + const SizedBox.square(dimension: 8.0), + Expanded( + child: Text( + 'EVM Accounts (${_currentPage + 1}/${chainKeys.length})', + style: const TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w500, ), - const SizedBox(height: 12.0), - FutureBuilder( - future: PackageInfo.fromPlatform(), - builder: (context, snapshot) { - if (!snapshot.hasData) { - return const SizedBox.shrink(); - } - final v = snapshot.data!.version; - final b = snapshot.data!.buildNumber; - const f = String.fromEnvironment('FLUTTER_APP_FLAVOR'); - return _DataContainer( - title: 'App version', - data: '$v-$f ($b) - SDK v$packageVersion', + ), + ), + IconButton( + onPressed: () async { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Create new account'), + content: const Text( + 'This will create a new address out from the same seed phrase', + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Cancel'), + ), + TextButton( + onPressed: widget.onCreateAddress, + child: const Text('Proceed'), + ), + ], ); }, + ); + }, + icon: const Icon(Icons.add_box_rounded), + padding: const EdgeInsets.all(0.0), + visualDensity: VisualDensity.compact, + ), + IconButton( + onPressed: (_currentPage == 0) + ? null + : () { + _pageController.jumpToPage(_currentPage - 1); + }, + icon: const Icon(Icons.arrow_back), + padding: const EdgeInsets.all(0.0), + visualDensity: VisualDensity.compact, + ), + IconButton( + onPressed: (_currentPage == chainKeys.length - 1) + ? null + : () { + _pageController.jumpToPage(_currentPage + 1); + }, + icon: const Icon(Icons.arrow_forward), + padding: const EdgeInsets.all(0.0), + visualDensity: VisualDensity.compact, + ), + ], + ), + ), + SizedBox( + height: 300.0, + child: PageView.builder( + controller: _pageController, + physics: const NeverScrollableScrollPhysics(), + onPageChanged: (value) async { + setState(() => _currentPage = value); + final chainKey = chainKeys[_currentPage]; + widget.onAccountChanged(chainKey.address); + }, + itemBuilder: (BuildContext context, int index) { + final chainKey = chainKeys[index]; + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Column( + children: [ + const SizedBox(height: 12.0), + _DataContainer( + title: 'CAIP-10', + data: 'eip155:1:${chainKey.address}', + height: 84.0, + ), + const SizedBox(height: 12.0), + _DataContainer( + title: 'Public key', + data: chainKey.publicKey, + height: 84.0, + ), + const SizedBox(height: 12.0), + _DataContainer( + title: 'Private key', + data: chainKey.privateKey, + blurred: true, + height: 84.0, + ), + const SizedBox(height: 12.0), + ], + ), + ); + }, + itemCount: chainKeys.length, + ), + ), + SizedBox( + height: 16.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + // ignore: sdk_version_since + children: chainKeys.indexed + .map( + (e) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 2.0), + child: CircleAvatar( + radius: e.$1 == _currentPage ? 4.0 : 3.0, + backgroundColor: + e.$1 == _currentPage ? Colors.black : Colors.black38, + ), ), - const SizedBox(height: 20.0), - const Divider(height: 1.0), - const SizedBox(height: 20.0), - Row( - children: [ - CustomButton( - onTap: () async { - final mnemonic = await GetIt.I() - .queueBottomSheet( - widget: RecoverFromSeed(), - ); - if (mnemonic is String) { - await keysService.restoreWallet(mnemonic: mnemonic); - setState(() {}); - } - }, - child: const Center( - child: Text( - 'Import account', - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ], + ) + .toList(), + ), + ), + const SizedBox(height: 20.0), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: FutureBuilder( + future: SharedPreferences.getInstance(), + builder: (context, snapshot) { + return _DataContainer( + title: 'Seed phrase', + data: snapshot.data?.getString('w3w_mnemonic') ?? '', + blurred: true, + ); + }, + ), + ), + ], + ); + } +} + +class _SolanaAccounts extends StatelessWidget { + @override + Widget build(BuildContext context) { + final keysService = GetIt.I(); + final chainKeys = keysService.getKeysForChain('solana'); + if (chainKeys.isEmpty) return const SizedBox.shrink(); + return Column( + children: [ + const Padding( + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + SizedBox.square(dimension: 8.0), + Expanded( + child: Text( + 'Solana Account', + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w500, ), - const SizedBox(height: 12.0), - Row( - children: [ - CustomButton( - type: CustomButtonType.invalid, - onTap: () async { - await keysService.loadDefaultWallet(); - setState(() {}); - }, - child: const Center( - child: Text( - 'Restore default', - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ], + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Column( + children: [ + _DataContainer( + title: 'Address', + data: chainKeys.first.address, + ), + const SizedBox(height: 12.0), + _DataContainer( + title: 'Secret key', + data: chainKeys.first.privateKey, + blurred: true, + ), + ], + ), + ), + ], + ); + } +} + +class _PolkadotAccounts extends StatelessWidget { + @override + Widget build(BuildContext context) { + final keysService = GetIt.I(); + final chainKeys = keysService.getKeysForChain('polkadot'); + if (chainKeys.isEmpty) return const SizedBox.shrink(); + return Column( + children: [ + const Padding( + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + SizedBox.square(dimension: 8.0), + Expanded( + child: Text( + 'Polkadot Account', + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w500, ), - const SizedBox(height: 12.0), - ], + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Column( + children: [ + _DataContainer( + title: 'Address', + data: chainKeys.first.address, + ), + const SizedBox(height: 12.0), + _DataContainer( + title: 'Mnemonic', + data: chainKeys.first.privateKey, + blurred: true, + ), + ], + ), + ), + ], + ); + } +} + +class _KadenaAccounts extends StatelessWidget { + @override + Widget build(BuildContext context) { + final keysService = GetIt.I(); + final chainKeys = keysService.getKeysForChain('kadena'); + if (chainKeys.isEmpty) return const SizedBox.shrink(); + return Column( + children: [ + const Padding( + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + SizedBox.square(dimension: 8.0), + Expanded( + child: Text( + 'Kadena Account', + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Column( + children: [ + _DataContainer( + title: 'Address', + data: chainKeys.first.address, + ), + const SizedBox(height: 12.0), + _DataContainer( + title: 'Secret key', + data: chainKeys.first.privateKey, + blurred: true, + ), + ], + ), + ) + ], + ); + } +} + +class _DeviceData extends StatelessWidget { + @override + Widget build(BuildContext context) { + final web3Wallet = GetIt.I().web3wallet; + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding( + padding: EdgeInsets.only(left: 8.0, bottom: 8.0, top: 12.0), + child: Text( + 'Device', + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w500, ), ), ), + FutureBuilder( + future: web3Wallet.core.crypto.getClientId(), + builder: (context, snapshot) { + return _DataContainer( + title: 'Client ID', + data: snapshot.data ?? '', + ); + }, + ), + const SizedBox(height: 12.0), + FutureBuilder( + future: PackageInfo.fromPlatform(), + builder: (context, snapshot) { + if (!snapshot.hasData) { + return const SizedBox.shrink(); + } + final v = snapshot.data!.version; + final b = snapshot.data!.buildNumber; + const f = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + return _DataContainer( + title: 'App version', + data: '$v-$f ($b) - SDK v$packageVersion', + ); + }, + ), + ], + ), + ); + } +} + +class _Buttons extends StatelessWidget { + final VoidCallback onRestoreFromSeed; + final VoidCallback onRestoreDefault; + const _Buttons({ + required this.onRestoreFromSeed, + required this.onRestoreDefault, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + const SizedBox(height: 8.0), + Row( + children: [ + CustomButton( + type: CustomButtonType.normal, + onTap: onRestoreFromSeed, + child: const Center( + child: Text( + 'Restore wallet from seed', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ], + ), + const SizedBox(height: 12.0), + Row( + children: [ + CustomButton( + type: CustomButtonType.invalid, + onTap: onRestoreDefault, + child: const Center( + child: Text( + 'Restore default wallet', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ], + ), ], ), ); @@ -178,10 +553,12 @@ class _DataContainer extends StatefulWidget { required this.title, required this.data, this.blurred = false, + this.height, }); final String title; final String data; final bool blurred; + final double? height; @override State<_DataContainer> createState() => __DataContainerState(); @@ -213,6 +590,7 @@ class __DataContainerState extends State<_DataContainer> { blurred = widget.blurred; }), child: Container( + height: widget.height, decoration: BoxDecoration( color: StyleConstants.lightGray, borderRadius: BorderRadius.circular( @@ -255,3 +633,142 @@ class __DataContainerState extends State<_DataContainer> { ); } } + +class SizeReportingWidget extends StatefulWidget { + final Widget child; + final ValueChanged onSizeChange; + + const SizeReportingWidget({ + Key? key, + required this.child, + required this.onSizeChange, + }) : super(key: key); + + @override + State createState() => _SizeReportingWidgetState(); +} + +class _SizeReportingWidgetState extends State { + Size? _oldSize; + + @override + Widget build(BuildContext context) { + WidgetsBinding.instance.addPostFrameCallback((_) => _notifySize()); + return widget.child; + } + + void _notifySize() { + if (!mounted) { + return; + } + final size = context.size; + if (_oldSize != size && size != null) { + _oldSize = size; + widget.onSizeChange(size); + } + } +} + +class ExpandablePageView extends StatefulWidget { + final List children; + final PageController? controller; + final Function(int)? onPageChanged; + + const ExpandablePageView({ + Key? key, + required this.children, + this.controller, + this.onPageChanged, + }) : super(key: key); + + @override + State createState() => _ExpandablePageViewState(); +} + +class _ExpandablePageViewState extends State + with TickerProviderStateMixin { + late PageController _pageController; + late List _heights; + int _currentPage = 0; + + double get _currentHeight => _heights[_currentPage]; + + @override + void initState() { + super.initState(); + _heights = widget.children.map((e) => 0.0).toList(); + _pageController = widget.controller ?? PageController() + ..addListener(() { + final newPage = _pageController.page?.round() ?? 0; + if (_currentPage != newPage) { + setState(() => _currentPage = newPage); + } + }); + } + + @override + void didUpdateWidget(covariant ExpandablePageView oldWidget) { + super.didUpdateWidget(oldWidget); + final diff = widget.children.length - oldWidget.children.length; + if (diff > 0) { + for (var i = 0; i < diff; i++) { + final lastHeight = _heights.last; + _heights.add(lastHeight); + } + } + } + + @override + void dispose() { + _pageController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + debugPrint('${_heights[0]} $_currentHeight'); + return TweenAnimationBuilder( + curve: Curves.easeInOutCubic, + duration: const Duration(milliseconds: 50), + tween: Tween( + begin: max(_heights[0], 200.0), + end: max(_currentHeight, 200.0), + ), + builder: (context, value, child) => SizedBox( + height: value, + child: child, + ), + child: PageView( + physics: const NeverScrollableScrollPhysics(), + controller: _pageController, + onPageChanged: widget.onPageChanged, + children: _sizeReportingChildren + .asMap() // + .map((index, child) => MapEntry(index, child)) + .values + .toList(), + ), + ); + } + + List get _sizeReportingChildren => widget.children + .asMap() // + .map( + (index, child) => MapEntry( + index, + OverflowBox( + //needed, so that parent won't impose its constraints on the children, thus skewing the measurement results. + minHeight: 0, + maxHeight: double.infinity, + alignment: Alignment.topCenter, + child: SizeReportingWidget( + onSizeChange: (size) => + setState(() => _heights[index] = size.height), + child: Align(child: child), + ), + ), + ), + ) + .values + .toList(); +} diff --git a/example/wallet/lib/utils/dart_defines.dart b/example/wallet/lib/utils/dart_defines.dart index 6d157237..6c5964e8 100644 --- a/example/wallet/lib/utils/dart_defines.dart +++ b/example/wallet/lib/utils/dart_defines.dart @@ -2,17 +2,8 @@ class DartDefines { static const String projectId = String.fromEnvironment( 'PROJECT_ID', ); - // - static const eip155PrivateKey = String.fromEnvironment( - 'EIP155_PRIVATE_KEY', - defaultValue: - '5754463bdfbd6e081ca1d6df965927feb1066a0df86d010ac4125eb4bc4c0082', - ); - static const eip155Address = String.fromEnvironment( - 'EIP155_ADDRESS', - defaultValue: '0xf3c95b1a8cabf3d5151912377aeadd84aa41c27c', - ); - // + // HARDCODED TEST KEYS + // KADENA static const kadenaSecretKey = String.fromEnvironment( 'KADENA_SECRET_KEY', defaultValue: @@ -23,7 +14,7 @@ class DartDefines { defaultValue: '3a527a1af7713cde04a4ce8b6c95b3806b7582f2423d740fc16eaa5b7a235d42', ); - // + // SOLANA static const solanaSecretKey = String.fromEnvironment( 'SOLANA_SECRET_KEY', defaultValue: @@ -33,7 +24,7 @@ class DartDefines { 'SOLANA_ADDRESS', defaultValue: 'EbdEmCpKGvEwfwV4ACmVYHFRkwvXdogJhMZeEekDFVVJ', ); - // + // POLKADOT static const polkadotMnemonic = String.fromEnvironment( 'POLKADOT_MNEMONIC', defaultValue: diff --git a/example/wallet/lib/widgets/custom_button.dart b/example/wallet/lib/widgets/custom_button.dart index f8c79f8f..a49d7111 100644 --- a/example/wallet/lib/widgets/custom_button.dart +++ b/example/wallet/lib/widgets/custom_button.dart @@ -24,7 +24,7 @@ class CustomButton extends StatelessWidget { case CustomButtonType.invalid: return StyleConstants.errorColor; default: - return Colors.blue[200]!; + return Colors.black54; } } diff --git a/example/wallet/lib/widgets/wc_request_widget.dart/wc_request_widget.dart b/example/wallet/lib/widgets/wc_request_widget.dart/wc_request_widget.dart index adbdc543..09b5aee3 100644 --- a/example/wallet/lib/widgets/wc_request_widget.dart/wc_request_widget.dart +++ b/example/wallet/lib/widgets/wc_request_widget.dart/wc_request_widget.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/bottom_sheet/i_bottom_sheet_service.dart'; import 'package:walletconnect_flutter_v2_wallet/utils/constants.dart'; @@ -18,44 +19,44 @@ class WCRequestWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - child, - const SizedBox( - height: StyleConstants.linear16, + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Flexible( + child: SingleChildScrollView( + child: child, ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - CustomButton( - onTap: onReject ?? - () => Navigator.of(context).pop(WCBottomSheetResult.reject), - type: CustomButtonType.invalid, - child: const Text( - StringConstants.reject, - style: StyleConstants.buttonText, - textAlign: TextAlign.center, - ), + ), + const SizedBox(height: StyleConstants.linear16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + CustomButton( + onTap: onReject ?? + () => Navigator.of(context).pop(WCBottomSheetResult.reject), + type: CustomButtonType.invalid, + child: const Text( + StringConstants.reject, + style: StyleConstants.buttonText, + textAlign: TextAlign.center, ), - const SizedBox( - width: StyleConstants.linear16, + ), + const SizedBox( + width: StyleConstants.linear16, + ), + CustomButton( + onTap: onAccept ?? + () => Navigator.of(context).pop(WCBottomSheetResult.one), + type: CustomButtonType.valid, + child: const Text( + StringConstants.approve, + style: StyleConstants.buttonText, + textAlign: TextAlign.center, ), - CustomButton( - onTap: onAccept ?? - () => Navigator.of(context).pop(WCBottomSheetResult.one), - type: CustomButtonType.valid, - child: const Text( - StringConstants.approve, - style: StyleConstants.buttonText, - textAlign: TextAlign.center, - ), - ), - ], - ), - ], - ), + ), + ], + ), + ], ); } } diff --git a/example/wallet/lib/widgets/wc_request_widget.dart/wc_session_auth_request_widget.dart b/example/wallet/lib/widgets/wc_request_widget.dart/wc_session_auth_request_widget.dart index 6cd4cbf8..c857e03f 100644 --- a/example/wallet/lib/widgets/wc_request_widget.dart/wc_session_auth_request_widget.dart +++ b/example/wallet/lib/widgets/wc_request_widget.dart/wc_session_auth_request_widget.dart @@ -13,49 +13,51 @@ class WCSessionAuthRequestWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - child, - const SizedBox(height: StyleConstants.linear16), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - CustomButton( - onTap: () => - Navigator.of(context).pop(WCBottomSheetResult.reject), - type: CustomButtonType.invalid, - child: const Text( - 'Cancel', - style: StyleConstants.buttonText, - textAlign: TextAlign.center, - ), + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: SingleChildScrollView( + child: child, + ), + ), + const SizedBox(height: StyleConstants.linear16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + CustomButton( + onTap: () => + Navigator.of(context).pop(WCBottomSheetResult.reject), + type: CustomButtonType.invalid, + child: const Text( + 'Cancel', + style: StyleConstants.buttonText, + textAlign: TextAlign.center, ), - const SizedBox(width: StyleConstants.linear8), - CustomButton( - onTap: () => Navigator.of(context).pop(WCBottomSheetResult.one), - type: CustomButtonType.normal, - child: const Text( - 'Sign One', - style: StyleConstants.buttonText, - textAlign: TextAlign.center, - ), + ), + const SizedBox(width: StyleConstants.linear8), + CustomButton( + onTap: () => Navigator.of(context).pop(WCBottomSheetResult.one), + type: CustomButtonType.normal, + child: const Text( + 'Sign One', + style: StyleConstants.buttonText, + textAlign: TextAlign.center, ), - const SizedBox(width: StyleConstants.linear8), - CustomButton( - onTap: () => Navigator.of(context).pop(WCBottomSheetResult.all), - type: CustomButtonType.valid, - child: const Text( - 'Sign All', - style: StyleConstants.buttonText, - textAlign: TextAlign.center, - ), + ), + const SizedBox(width: StyleConstants.linear8), + CustomButton( + onTap: () => Navigator.of(context).pop(WCBottomSheetResult.all), + type: CustomButtonType.valid, + child: const Text( + 'Sign All', + style: StyleConstants.buttonText, + textAlign: TextAlign.center, ), - ], - ), - ], - ), + ), + ], + ), + ], ); } } diff --git a/example/wallet/macos/Flutter/GeneratedPluginRegistrant.swift b/example/wallet/macos/Flutter/GeneratedPluginRegistrant.swift index cc667fc0..a4e08b1e 100644 --- a/example/wallet/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/wallet/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,11 +5,13 @@ import FlutterMacOS import Foundation +import connectivity_plus import package_info_plus import shared_preferences_foundation import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/example/wallet/pubspec.yaml b/example/wallet/pubspec.yaml index b8fa856a..a0ba66ca 100644 --- a/example/wallet/pubspec.yaml +++ b/example/wallet/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.6 <3.0.0" + sdk: ">=2.19.0 <4.0.0" dependencies: flutter: diff --git a/example/wallet/windows/flutter/generated_plugin_registrant.cc b/example/wallet/windows/flutter/generated_plugin_registrant.cc index 4f788487..5777988d 100644 --- a/example/wallet/windows/flutter/generated_plugin_registrant.cc +++ b/example/wallet/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,12 @@ #include "generated_plugin_registrant.h" +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { + ConnectivityPlusWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/example/wallet/windows/flutter/generated_plugins.cmake b/example/wallet/windows/flutter/generated_plugins.cmake index 88b22e5c..31032063 100644 --- a/example/wallet/windows/flutter/generated_plugins.cmake +++ b/example/wallet/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + connectivity_plus url_launcher_windows ) diff --git a/lib/apis/core/connectivity/connectivity.dart b/lib/apis/core/connectivity/connectivity.dart new file mode 100644 index 00000000..157e3772 --- /dev/null +++ b/lib/apis/core/connectivity/connectivity.dart @@ -0,0 +1,8 @@ +import 'package:walletconnect_flutter_v2/apis/core/connectivity/connectivity_models.dart'; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/i_connectivity.dart'; +import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + +class Connectivity implements IConnectivity { + @override + Event onConnectivityChange = Event(); +} diff --git a/lib/apis/core/connectivity/connectivity_models.dart b/lib/apis/core/connectivity/connectivity_models.dart new file mode 100644 index 00000000..a8285097 --- /dev/null +++ b/lib/apis/core/connectivity/connectivity_models.dart @@ -0,0 +1,9 @@ +import 'package:event/event.dart'; + +class ConnectivityEvent extends EventArgs { + final bool connected; + + ConnectivityEvent( + this.connected, + ); +} diff --git a/lib/apis/core/connectivity/i_connectivity.dart b/lib/apis/core/connectivity/i_connectivity.dart new file mode 100644 index 00000000..3907493b --- /dev/null +++ b/lib/apis/core/connectivity/i_connectivity.dart @@ -0,0 +1,6 @@ +import 'package:event/event.dart'; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/connectivity_models.dart'; + +abstract class IConnectivity { + abstract final Event onConnectivityChange; +} diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index ac6e2910..49582fc5 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -1866,10 +1866,11 @@ class SignEngine implements ISignEngine { ); final walletAddress = AddressUtils.getDidAddress(payload.iss); + final ethAddress = EthereumAddress.fromHex(walletAddress); final chainId = AddressUtils.getDidChainId(payload.iss); final isValid = await AuthSignature.verifySignature( - walletAddress, + ethAddress.hexEip55, reconstructed, signature, chainId, @@ -1888,6 +1889,7 @@ class SignEngine implements ISignEngine { final header = '${cacaoPayload.domain} wants you to sign in with your Ethereum account:'; final walletAddress = AddressUtils.getDidAddress(iss); + final ethAddress = EthereumAddress.fromHex(walletAddress); if (cacaoPayload.aud.isEmpty) { throw WalletConnectError(code: -1, message: 'aud is required'); @@ -1924,7 +1926,7 @@ class SignEngine implements ISignEngine { final message = [ header, - walletAddress, + ethAddress.hexEip55, '', statement, '', diff --git a/pubspec.yaml b/pubspec.yaml index 0ab97857..c425da2d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,6 +8,7 @@ environment: dependencies: bs58: ^1.0.2 + connectivity_plus: ^6.0.4 convert: ^3.0.1 cryptography: ^2.0.5 ed25519_edwards: ^0.3.1 diff --git a/test/shared/shared_test_utils.mocks.dart b/test/shared/shared_test_utils.mocks.dart index f0475a40..ea3b4959 100644 --- a/test/shared/shared_test_utils.mocks.dart +++ b/test/shared/shared_test_utils.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.3 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in walletconnect_flutter_v2/test/shared/shared_test_utils.dart. // Do not manually edit this file. From 8b2394c0c7f9103345ef1ac293b4fa5ca77bc1d0 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 7 Aug 2024 14:33:34 +0200 Subject: [PATCH 10/27] minor update --- test/shared/shared_test_utils.mocks.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/shared/shared_test_utils.mocks.dart b/test/shared/shared_test_utils.mocks.dart index f0475a40..ea3b4959 100644 --- a/test/shared/shared_test_utils.mocks.dart +++ b/test/shared/shared_test_utils.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.3 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in walletconnect_flutter_v2/test/shared/shared_test_utils.dart. // Do not manually edit this file. From 901d285f671b2ca20def562e92e7dcf61e2aac3c Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 12:29:40 +0200 Subject: [PATCH 11/27] added connectivity enhancement --- example/dapp/lib/main.dart | 15 +- example/dapp/lib/widgets/chain_button.dart | 7 +- example/dapp/macos/Podfile | 2 +- example/dapp/macos/Podfile.lock | 24 +- example/dapp/pubspec.yaml | 2 +- .../lib/dependencies/chains/evm_service.dart | 134 ++++--- .../lib/dependencies/deep_link_handler.dart | 40 +-- .../lib/dependencies/web3wallet_service.dart | 50 ++- example/wallet/lib/main.dart | 24 +- example/wallet/macos/Podfile.lock | 12 +- .../macos/Runner/DebugProfile.entitlements | 2 + .../wallet/macos/Runner/Release.entitlements | 2 + example/wallet/pubspec.yaml | 5 +- lib/apis/core/connectivity/connectivity.dart | 43 ++- .../core/connectivity/i_connectivity.dart | 6 +- lib/apis/core/core.dart | 9 + lib/apis/core/i_core.dart | 2 + lib/apis/sign_api/sign_engine.dart | 15 +- pubspec.yaml | 2 +- test/shared/shared_test_utils.mocks.dart | 331 ++++++++++-------- 20 files changed, 459 insertions(+), 268 deletions(-) diff --git a/example/dapp/lib/main.dart b/example/dapp/lib/main.dart index 6e34f698..e0cf3315 100644 --- a/example/dapp/lib/main.dart +++ b/example/dapp/lib/main.dart @@ -210,6 +210,7 @@ class _MyHomePageState extends State { title: Text(_pageDatas[_selectedIndex].title), centerTitle: true, actions: [ + const Text('Relay '), CircleAvatar( radius: 6.0, backgroundColor: _web3App!.core.relayClient.isConnected @@ -219,14 +220,20 @@ class _MyHomePageState extends State { const SizedBox(width: 16.0), ], ), + body: Center( + child: Container( + constraints: BoxConstraints( + maxWidth: Constants.smallScreen.toDouble(), + ), + child: Row( + children: navRail, + ), + ), + ), bottomNavigationBar: MediaQuery.of(context).size.width < Constants.smallScreen ? _buildBottomNavBar() : null, - body: Row( - mainAxisSize: MainAxisSize.max, - children: navRail, - ), ); } diff --git a/example/dapp/lib/widgets/chain_button.dart b/example/dapp/lib/widgets/chain_button.dart index c98b277e..e6bc9717 100644 --- a/example/dapp/lib/widgets/chain_button.dart +++ b/example/dapp/lib/widgets/chain_button.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:walletconnect_flutter_v2_dapp/models/chain_metadata.dart'; import 'package:walletconnect_flutter_v2_dapp/utils/constants.dart'; @@ -17,7 +19,10 @@ class ChainButton extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - width: (MediaQuery.of(context).size.width / 2) - 14.0, + width: (min(Constants.smallScreen - 78.0, + MediaQuery.of(context).size.width) / + 2) - + 14.0, height: StyleConstants.linear48, margin: const EdgeInsets.symmetric( vertical: StyleConstants.linear8, diff --git a/example/dapp/macos/Podfile b/example/dapp/macos/Podfile index dade8dfa..049abe29 100644 --- a/example/dapp/macos/Podfile +++ b/example/dapp/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/example/dapp/macos/Podfile.lock b/example/dapp/macos/Podfile.lock index 1bd72862..1f667557 100644 --- a/example/dapp/macos/Podfile.lock +++ b/example/dapp/macos/Podfile.lock @@ -1,23 +1,35 @@ PODS: - FlutterMacOS (1.0.0) + - package_info_plus (0.0.1): + - FlutterMacOS - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS + - url_launcher_macos (0.0.1): + - FlutterMacOS DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) - - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`) + - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) + - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) + - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) EXTERNAL SOURCES: FlutterMacOS: :path: Flutter/ephemeral + package_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos shared_preferences_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos + :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin + url_launcher_macos: + :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos SPEC CHECKSUMS: - FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 - shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 -PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c +PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/example/dapp/pubspec.yaml b/example/dapp/pubspec.yaml index 22b8077c..2567c40c 100644 --- a/example/dapp/pubspec.yaml +++ b/example/dapp/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: url_launcher: ^6.2.2 # intl: ^0.19.0 package_info_plus: ^7.0.0 - walletconnect_modal_flutter: ^2.1.19 + walletconnect_modal_flutter: ^2.1.20 # walletconnect_flutter_v2: # path: ../.. diff --git a/example/wallet/lib/dependencies/chains/evm_service.dart b/example/wallet/lib/dependencies/chains/evm_service.dart index acd9f230..49887e53 100644 --- a/example/wallet/lib/dependencies/chains/evm_service.dart +++ b/example/wallet/lib/dependencies/chains/evm_service.dart @@ -7,6 +7,7 @@ import 'package:get_it/get_it.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/bottom_sheet/i_bottom_sheet_service.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/chains/common.dart'; +import 'package:walletconnect_flutter_v2_wallet/dependencies/deep_link_handler.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/i_web3wallet_service.dart'; import 'package:walletconnect_flutter_v2_wallet/dependencies/key_service/i_key_service.dart'; import 'package:walletconnect_flutter_v2_wallet/models/chain_metadata.dart'; @@ -140,12 +141,19 @@ class EVMService { ); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future ethSign(String topic, dynamic parameters) async { @@ -187,12 +195,19 @@ class EVMService { ); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future ethSignTypedData(String topic, dynamic parameters) async { @@ -229,12 +244,19 @@ class EVMService { ); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future ethSignTypedDataV4(String topic, dynamic parameters) async { @@ -271,12 +293,19 @@ class EVMService { ); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future ethSignTransaction(String topic, dynamic parameters) async { @@ -331,12 +360,19 @@ class EVMService { response = response.copyWith(error: transaction as JsonRpcError); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future ethSendTransaction(String topic, dynamic parameters) async { @@ -389,12 +425,19 @@ class EVMService { response = response.copyWith(error: transaction as JsonRpcError); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, response.result ?? response.error); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, response.result ?? response.error); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } Future switchChain(String topic, dynamic parameters) async { @@ -426,12 +469,19 @@ class EVMService { ); } - await _web3Wallet.respondSessionRequest( - topic: topic, - response: response, - ); - - CommonMethods.goBackToDapp(topic, true); + try { + await _web3Wallet.respondSessionRequest( + topic: topic, + response: response, + ); + CommonMethods.goBackToDapp(topic, true); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } // Future addChain(String topic, dynamic parameters) async { diff --git a/example/wallet/lib/dependencies/deep_link_handler.dart b/example/wallet/lib/dependencies/deep_link_handler.dart index b415b6bd..104fea61 100644 --- a/example/wallet/lib/dependencies/deep_link_handler.dart +++ b/example/wallet/lib/dependencies/deep_link_handler.dart @@ -58,7 +58,7 @@ class DeepLinkHandler { } catch (e) { debugPrint( '[SampleWallet] [DeepLinkHandler] error re-opening dapp ($scheme). $e'); - _goBackModal( + goBackModal( title: modalTitle, message: modalMessage, success: success, @@ -66,25 +66,7 @@ class DeepLinkHandler { } } - static void _onLink(Object? event) { - final decodedUri = Uri.parse(Uri.decodeFull(event.toString())); - if (decodedUri.toString().startsWith('wc:')) { - return; - } - final pairingUri = decodedUri.query.replaceFirst('uri=', ''); - if (!pairingUri.toString().startsWith('wc:')) { - return; - } - waiting.value = true; - _linksController.sink.add(pairingUri); - } - - static void _onError(Object error) { - waiting.value = false; - debugPrint('[SampleWallet] [DeepLinkHandler] _onError $error'); - } - - static void _goBackModal({ + static void goBackModal({ String? title, String? message, bool success = true, @@ -117,4 +99,22 @@ class DeepLinkHandler { ), ); } + + static void _onLink(Object? event) { + final decodedUri = Uri.parse(Uri.decodeFull(event.toString())); + if (decodedUri.toString().startsWith('wc:')) { + return; + } + final pairingUri = decodedUri.query.replaceFirst('uri=', ''); + if (!pairingUri.toString().startsWith('wc:')) { + return; + } + waiting.value = true; + _linksController.sink.add(pairingUri); + } + + static void _onError(Object error) { + waiting.value = false; + debugPrint('[SampleWallet] [DeepLinkHandler] _onError $error'); + } } diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index 2c4ded78..61e35295 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -110,7 +110,7 @@ class Web3WalletService extends IWeb3WalletService { data: [chainKeys.first.address], ), ); - } catch (e) {} + } catch (_) {} } } @@ -179,13 +179,21 @@ class Web3WalletService extends IWeb3WalletService { if (result != WCBottomSheetResult.reject) { // generatedNamespaces is constructed based on registered methods handlers // so if you want to handle requests using onSessionRequest event then you would need to manually add that method in the approved namespaces - await _web3Wallet!.approveSession( - id: args.id, - namespaces: NamespaceUtils.regenerateNamespacesWithChains( - args.params.generatedNamespaces!, - ), - sessionProperties: args.params.sessionProperties, - ); + try { + await _web3Wallet!.approveSession( + id: args.id, + namespaces: NamespaceUtils.regenerateNamespacesWithChains( + args.params.generatedNamespaces!, + ), + sessionProperties: args.params.sessionProperties, + ); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } else { final error = Errors.getSdkError(Errors.USER_REJECTED); await _web3Wallet!.rejectSession(id: args.id, reason: error); @@ -193,12 +201,11 @@ class Web3WalletService extends IWeb3WalletService { topic: args.params.pairingTopic, ); - // TODO this should be triggered on _onRelayClientMessage final scheme = args.params.proposer.metadata.redirect?.native ?? ''; DeepLinkHandler.goTo( scheme, modalTitle: 'Error', - modalMessage: 'User rejected', + modalMessage: error.message, success: false, ); } @@ -301,8 +308,7 @@ class Web3WalletService extends IWeb3WalletService { WCBottomSheetResult.reject; if (rs != WCBottomSheetResult.reject) { - const chain = 'eip155:1'; - final chainKeys = GetIt.I().getKeysForChain(chain); + final chainKeys = GetIt.I().getKeysForChain('eip155:1'); final privateKey = '0x${chainKeys[0].privateKey}'; final credentials = EthPrivateKey.fromHex(privateKey); // @@ -329,12 +335,20 @@ class Web3WalletService extends IWeb3WalletService { ); } // - final _ = await _web3Wallet!.approveSessionAuthenticate( - id: args.id, - auths: cacaos, - ); - final scheme = args.requester.metadata.redirect?.native ?? ''; - DeepLinkHandler.goTo(scheme); + try { + await _web3Wallet!.approveSessionAuthenticate( + id: args.id, + auths: cacaos, + ); + final scheme = args.requester.metadata.redirect?.native ?? ''; + DeepLinkHandler.goTo(scheme); + } on WalletConnectError catch (error) { + DeepLinkHandler.goBackModal( + title: 'Error', + message: error.message, + success: false, + ); + } } else { await _web3Wallet!.rejectSessionAuthenticate( id: args.id, diff --git a/example/wallet/lib/main.dart b/example/wallet/lib/main.dart index 39cff46d..bd4accaa 100644 --- a/example/wallet/lib/main.dart +++ b/example/wallet/lib/main.dart @@ -63,7 +63,7 @@ class _MyHomePageState extends State with GetItStateMixin { GetIt.I.registerSingleton(BottomSheetService()); GetIt.I.registerSingleton(KeyService()); - final IWeb3WalletService web3WalletService = Web3WalletService(); + final web3WalletService = Web3WalletService(); await web3WalletService.create(); GetIt.I.registerSingleton(web3WalletService); @@ -109,6 +109,15 @@ class _MyHomePageState extends State with GetItStateMixin { await web3WalletService.init(); + web3WalletService.web3wallet.core.relayClient.onRelayClientConnect + .subscribe( + _setState, + ); + web3WalletService.web3wallet.core.relayClient.onRelayClientDisconnect + .subscribe( + _setState, + ); + setState(() { _pageDatas = [ PageData( @@ -137,6 +146,8 @@ class _MyHomePageState extends State with GetItStateMixin { }); } + void _setState(dynamic args) => setState(() {}); + @override Widget build(BuildContext context) { if (_initializing) { @@ -159,12 +170,23 @@ class _MyHomePageState extends State with GetItStateMixin { ), ); + final web3Wallet = GetIt.I().web3wallet; return Scaffold( appBar: AppBar( title: Text( _pageDatas[_selectedIndex].title, style: const TextStyle(color: Colors.black), ), + actions: [ + const Text('Relay '), + CircleAvatar( + radius: 6.0, + backgroundColor: web3Wallet.core.relayClient.isConnected + ? Colors.green + : Colors.red, + ), + const SizedBox(width: 16.0), + ], ), body: BottomSheetListener( child: Row( diff --git a/example/wallet/macos/Podfile.lock b/example/wallet/macos/Podfile.lock index 3755bcbc..1f667557 100644 --- a/example/wallet/macos/Podfile.lock +++ b/example/wallet/macos/Podfile.lock @@ -1,7 +1,5 @@ PODS: - FlutterMacOS (1.0.0) - - mobile_scanner (3.5.2): - - FlutterMacOS - package_info_plus (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): @@ -12,7 +10,6 @@ PODS: DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) - - mobile_scanner (from `Flutter/ephemeral/.symlinks/plugins/mobile_scanner/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) @@ -20,8 +17,6 @@ DEPENDENCIES: EXTERNAL SOURCES: FlutterMacOS: :path: Flutter/ephemeral - mobile_scanner: - :path: Flutter/ephemeral/.symlinks/plugins/mobile_scanner/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos shared_preferences_foundation: @@ -31,11 +26,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - mobile_scanner: 621cf2c34e1c74ae7ce5c6793638ab600723bdea package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/example/wallet/macos/Runner/DebugProfile.entitlements b/example/wallet/macos/Runner/DebugProfile.entitlements index 0830a9c5..91e6008a 100644 --- a/example/wallet/macos/Runner/DebugProfile.entitlements +++ b/example/wallet/macos/Runner/DebugProfile.entitlements @@ -10,5 +10,7 @@ com.apple.security.network.server + com.apple.security.network.client + diff --git a/example/wallet/macos/Runner/Release.entitlements b/example/wallet/macos/Runner/Release.entitlements index 852fa1a4..ee95ab7e 100644 --- a/example/wallet/macos/Runner/Release.entitlements +++ b/example/wallet/macos/Runner/Release.entitlements @@ -4,5 +4,7 @@ com.apple.security.app-sandbox + com.apple.security.network.client + diff --git a/example/wallet/pubspec.yaml b/example/wallet/pubspec.yaml index a0ba66ca..b40d5079 100644 --- a/example/wallet/pubspec.yaml +++ b/example/wallet/pubspec.yaml @@ -23,10 +23,13 @@ dependencies: package_info_plus: ^7.0.0 convert: ^3.0.1 url_launcher: ^6.2.2 + + # CHECK WEB SUPPORT kadena_dart_sdk: ^2.3.2 solana: ^0.30.4 polkadart_keyring: ^0.4.3 - polkadart: ^0.4.3 + polkadart: ^0.4.6 + # walletconnect_flutter_v2: path: ../.. diff --git a/lib/apis/core/connectivity/connectivity.dart b/lib/apis/core/connectivity/connectivity.dart index 157e3772..4f8828f3 100644 --- a/lib/apis/core/connectivity/connectivity.dart +++ b/lib/apis/core/connectivity/connectivity.dart @@ -1,8 +1,45 @@ -import 'package:walletconnect_flutter_v2/apis/core/connectivity/connectivity_models.dart'; +import 'dart:async'; + +import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/connectivity/i_connectivity.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; -class Connectivity implements IConnectivity { +class ConnectivityState implements IConnectivity { + final ICore _core; + ConnectivityState({required ICore core}) : _core = core; + + bool _initialized = false; + + bool _isOnline = false; + @override + bool get isOnline => _isOnline; + @override - Event onConnectivityChange = Event(); + Future init() async { + if (_initialized) return; + final result = await Connectivity().checkConnectivity(); + _updateConnectionStatus(result); + Connectivity().onConnectivityChanged.listen( + _updateConnectionStatus, + ); + _initialized = true; + } + + Future _updateConnectionStatus(List result) async { + _core.logger.i('[$runtimeType] Connectivity changed $result'); + final isMobileData = result.contains(ConnectivityResult.mobile); + final isWifi = result.contains(ConnectivityResult.wifi); + + _isOnline = isMobileData || isWifi; + + if (!_isOnline) { + if (_core.relayClient.isConnected) { + await _core.relayClient.disconnect(); + } + } else { + if (!_core.relayClient.isConnected) { + await _core.relayClient.connect(); + } + } + } } diff --git a/lib/apis/core/connectivity/i_connectivity.dart b/lib/apis/core/connectivity/i_connectivity.dart index 3907493b..8320cff6 100644 --- a/lib/apis/core/connectivity/i_connectivity.dart +++ b/lib/apis/core/connectivity/i_connectivity.dart @@ -1,6 +1,4 @@ -import 'package:event/event.dart'; -import 'package:walletconnect_flutter_v2/apis/core/connectivity/connectivity_models.dart'; - abstract class IConnectivity { - abstract final Event onConnectivityChange; + bool get isOnline; + Future init(); } diff --git a/lib/apis/core/core.dart b/lib/apis/core/core.dart index 9344cea9..4fede26c 100644 --- a/lib/apis/core/core.dart +++ b/lib/apis/core/core.dart @@ -1,4 +1,6 @@ import 'package:logger/logger.dart'; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/connectivity.dart'; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/i_connectivity.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart'; import 'package:walletconnect_flutter_v2/apis/core/echo/echo.dart'; @@ -65,6 +67,9 @@ class Core implements ICore { @override late IVerify verify; + @override + late IConnectivity connectivity; + Logger _logger = Logger( level: Level.off, printer: PrettyPrinter(), @@ -169,6 +174,9 @@ class Core implements ICore { core: this, httpClient: httpClient, ); + connectivity = ConnectivityState( + core: this, + ); } @override @@ -178,6 +186,7 @@ class Core implements ICore { await relayClient.init(); await expirer.init(); await pairing.init(); + await connectivity.init(); heartbeat.init(); } } diff --git a/lib/apis/core/i_core.dart b/lib/apis/core/i_core.dart index 85f067ad..bb88fbb5 100644 --- a/lib/apis/core/i_core.dart +++ b/lib/apis/core/i_core.dart @@ -1,4 +1,5 @@ import 'package:logger/logger.dart'; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/i_connectivity.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart'; import 'package:walletconnect_flutter_v2/apis/core/echo/i_echo.dart'; import 'package:walletconnect_flutter_v2/apis/core/heartbit/i_heartbeat.dart'; @@ -21,6 +22,7 @@ abstract class ICore { abstract IRelayClient relayClient; abstract IStore> storage; + abstract IConnectivity connectivity; abstract IExpirer expirer; abstract IPairing pairing; abstract IEcho echo; diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index 49582fc5..5bbe1078 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -836,6 +836,9 @@ class SignEngine implements ISignEngine { if (!_initialized) { throw Errors.getInternalError(Errors.NOT_INITIALIZED); } + if (!core.connectivity.isOnline) { + throw WalletConnectError(code: -1, message: 'No internet connection'); + } } String _getRegisterKey(String chainId, String value) { @@ -1964,11 +1967,11 @@ class SignEngine implements ISignEngine { // FORMER AUTH ENGINE PROPERTY @override Map getPendingAuthRequests() { - Map pendingRequests = {}; + Map pendingAuthRequests = {}; authRequests.getAll().forEach((key) { - pendingRequests[key.id] = key; + pendingAuthRequests[key.id] = key; }); - return pendingRequests; + return pendingAuthRequests; } // FORMER AUTH ENGINE PROPERTY @@ -2130,11 +2133,11 @@ class SignEngine implements ISignEngine { // NEW ONE-CLICK AUTH METHOD FOR DAPPS @override Map getPendingSessionAuthRequests() { - Map pendingRequests = {}; + Map pendingSessionAuthRequests = {}; sessionAuthRequests.getAll().forEach((key) { - pendingRequests[key.id] = key; + pendingSessionAuthRequests[key.id] = key; }); - return pendingRequests; + return pendingSessionAuthRequests; } @override diff --git a/pubspec.yaml b/pubspec.yaml index c425da2d..4cd8e856 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: json_annotation: ^4.8.1 logger: ^2.2.0 package_info_plus: ^7.0.0 - pointycastle: ^3.7.4 + pointycastle: ^3.9.1 shared_preferences: ^2.2.2 stack_trace: ^1.10.0 stream_channel: ^2.1.0 diff --git a/test/shared/shared_test_utils.mocks.dart b/test/shared/shared_test_utils.mocks.dart index ea3b4959..6ea9a3b6 100644 --- a/test/shared/shared_test_utils.mocks.dart +++ b/test/shared/shared_test_utils.mocks.dart @@ -3,20 +3,22 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i21; -import 'dart:typed_data' as _i19; +import 'dart:async' as _i22; +import 'dart:typed_data' as _i20; import 'package:event/event.dart' as _i8; import 'package:http/http.dart' as _i9; -import 'package:logger/logger.dart' as _i17; +import 'package:logger/logger.dart' as _i18; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i20; -import 'package:walletconnect_flutter_v2/apis/core/core.dart' as _i26; -import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart' as _i22; +import 'package:mockito/src/dummies.dart' as _i21; +import 'package:walletconnect_flutter_v2/apis/core/connectivity/i_connectivity.dart' + as _i17; +import 'package:walletconnect_flutter_v2/apis/core/core.dart' as _i27; +import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart' as _i23; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_models.dart' as _i2; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_utils.dart' - as _i18; + as _i19; import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto.dart' as _i10; import 'package:walletconnect_flutter_v2/apis/core/crypto/i_crypto_utils.dart' @@ -34,16 +36,16 @@ import 'package:walletconnect_flutter_v2/apis/core/relay_auth/i_relay_auth.dart' import 'package:walletconnect_flutter_v2/apis/core/relay_client/i_relay_client.dart' as _i11; import 'package:walletconnect_flutter_v2/apis/core/relay_client/message_tracker.dart' - as _i23; + as _i24; import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/http_client.dart' - as _i25; + as _i26; import 'package:walletconnect_flutter_v2/apis/core/relay_client/websocket/websocket_handler.dart' - as _i27; + as _i28; import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart' as _i4; import 'package:walletconnect_flutter_v2/apis/core/store/i_store.dart' as _i7; import 'package:walletconnect_flutter_v2/apis/core/store/store_models.dart' - as _i24; + as _i25; import 'package:walletconnect_flutter_v2/apis/core/verify/i_verify.dart' as _i16; @@ -234,8 +236,19 @@ class _FakeIVerify_16 extends _i1.SmartFake implements _i16.IVerify { ); } -class _FakeLogger_17 extends _i1.SmartFake implements _i17.Logger { - _FakeLogger_17( +class _FakeIConnectivity_17 extends _i1.SmartFake + implements _i17.IConnectivity { + _FakeIConnectivity_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeLogger_18 extends _i1.SmartFake implements _i18.Logger { + _FakeLogger_18( Object parent, Invocation parentInvocation, ) : super( @@ -247,7 +260,7 @@ class _FakeLogger_17 extends _i1.SmartFake implements _i17.Logger { /// A class which mocks [CryptoUtils]. /// /// See the documentation for Mockito's code generation for more information. -class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { +class MockCryptoUtils extends _i1.Mock implements _i19.CryptoUtils { MockCryptoUtils() { _i1.throwOnMissingStub(this); } @@ -268,13 +281,13 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ) as _i2.CryptoKeyPair); @override - _i19.Uint8List randomBytes(int? length) => (super.noSuchMethod( + _i20.Uint8List randomBytes(int? length) => (super.noSuchMethod( Invocation.method( #randomBytes, [length], ), - returnValue: _i19.Uint8List(0), - ) as _i19.Uint8List); + returnValue: _i20.Uint8List(0), + ) as _i20.Uint8List); @override String generateRandomBytes32() => (super.noSuchMethod( @@ -282,7 +295,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { #generateRandomBytes32, [], ), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.method( #generateRandomBytes32, @@ -292,7 +305,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ) as String); @override - _i21.Future deriveSymKey( + _i22.Future deriveSymKey( String? privKeyA, String? pubKeyB, ) => @@ -304,7 +317,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { pubKeyB, ], ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #deriveSymKey, @@ -314,7 +327,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ], ), )), - ) as _i21.Future); + ) as _i22.Future); @override String hashKey(String? key) => (super.noSuchMethod( @@ -322,7 +335,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { #hashKey, [key], ), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.method( #hashKey, @@ -337,7 +350,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { #hashMessage, [message], ), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.method( #hashMessage, @@ -347,7 +360,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ) as String); @override - _i21.Future encrypt( + _i22.Future encrypt( String? message, String? symKey, { int? type, @@ -367,7 +380,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { #senderPublicKey: senderPublicKey, }, ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #encrypt, @@ -382,10 +395,10 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { }, ), )), - ) as _i21.Future); + ) as _i22.Future); @override - _i21.Future decrypt( + _i22.Future decrypt( String? symKey, String? encoded, ) => @@ -397,7 +410,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { encoded, ], ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #decrypt, @@ -407,14 +420,14 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ], ), )), - ) as _i21.Future); + ) as _i22.Future); @override String serialize( int? type, - _i19.Uint8List? sealed, - _i19.Uint8List? iv, { - _i19.Uint8List? senderPublicKey, + _i20.Uint8List? sealed, + _i20.Uint8List? iv, { + _i20.Uint8List? senderPublicKey, }) => (super.noSuchMethod( Invocation.method( @@ -426,7 +439,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { ], {#senderPublicKey: senderPublicKey}, ), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.method( #serialize, @@ -519,7 +532,7 @@ class MockCryptoUtils extends _i1.Mock implements _i18.CryptoUtils { /// A class which mocks [Crypto]. /// /// See the documentation for Mockito's code generation for more information. -class MockCrypto extends _i1.Mock implements _i22.Crypto { +class MockCrypto extends _i1.Mock implements _i23.Crypto { MockCrypto() { _i1.throwOnMissingStub(this); } @@ -590,21 +603,21 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { @override String get name => (super.noSuchMethod( Invocation.getter(#name), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#name), ), ) as String); @override - _i21.Future init() => (super.noSuchMethod( + _i22.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool hasKeys(String? tag) => (super.noSuchMethod( @@ -616,37 +629,37 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { ) as bool); @override - _i21.Future getClientId() => (super.noSuchMethod( + _i22.Future getClientId() => (super.noSuchMethod( Invocation.method( #getClientId, [], ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #getClientId, [], ), )), - ) as _i21.Future); + ) as _i22.Future); @override - _i21.Future generateKeyPair() => (super.noSuchMethod( + _i22.Future generateKeyPair() => (super.noSuchMethod( Invocation.method( #generateKeyPair, [], ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #generateKeyPair, [], ), )), - ) as _i21.Future); + ) as _i22.Future); @override - _i21.Future generateSharedKey( + _i22.Future generateSharedKey( String? selfPublicKey, String? peerPublicKey, { String? overrideTopic, @@ -660,7 +673,7 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { ], {#overrideTopic: overrideTopic}, ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #generateSharedKey, @@ -671,10 +684,10 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { {#overrideTopic: overrideTopic}, ), )), - ) as _i21.Future); + ) as _i22.Future); @override - _i21.Future setSymKey( + _i22.Future setSymKey( String? symKey, { String? overrideTopic, }) => @@ -684,7 +697,7 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { [symKey], {#overrideTopic: overrideTopic}, ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #setSymKey, @@ -692,30 +705,30 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { {#overrideTopic: overrideTopic}, ), )), - ) as _i21.Future); + ) as _i22.Future); @override - _i21.Future deleteKeyPair(String? publicKey) => (super.noSuchMethod( + _i22.Future deleteKeyPair(String? publicKey) => (super.noSuchMethod( Invocation.method( #deleteKeyPair, [publicKey], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future deleteSymKey(String? topic) => (super.noSuchMethod( + _i22.Future deleteSymKey(String? topic) => (super.noSuchMethod( Invocation.method( #deleteSymKey, [topic], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future encode( + _i22.Future encode( String? topic, Map? payload, { _i2.EncodeOptions? options, @@ -729,11 +742,11 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { ], {#options: options}, ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future decode( + _i22.Future decode( String? topic, String? encoded, { _i2.DecodeOptions? options, @@ -747,23 +760,23 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { ], {#options: options}, ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future signJWT(String? aud) => (super.noSuchMethod( + _i22.Future signJWT(String? aud) => (super.noSuchMethod( Invocation.method( #signJWT, [aud], ), - returnValue: _i21.Future.value(_i20.dummyValue( + returnValue: _i22.Future.value(_i21.dummyValue( this, Invocation.method( #signJWT, [aud], ), )), - ) as _i21.Future); + ) as _i22.Future); @override int getPayloadType(String? encoded) => (super.noSuchMethod( @@ -793,7 +806,7 @@ class MockCrypto extends _i1.Mock implements _i22.Crypto { /// A class which mocks [MessageTracker]. /// /// See the documentation for Mockito's code generation for more information. -class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { +class MockMessageTracker extends _i1.Mock implements _i24.MessageTracker { MockMessageTracker() { _i1.throwOnMissingStub(this); } @@ -801,7 +814,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { @override String get context => (super.noSuchMethod( Invocation.getter(#context), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#context), ), @@ -810,7 +823,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { @override String get version => (super.noSuchMethod( Invocation.getter(#version), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#version), ), @@ -826,43 +839,43 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { ) as _i7.IStore); @override - _i8.Event<_i24.StoreCreateEvent>> get onCreate => + _i8.Event<_i25.StoreCreateEvent>> get onCreate => (super.noSuchMethod( Invocation.getter(#onCreate), - returnValue: _FakeEvent_8<_i24.StoreCreateEvent>>( + returnValue: _FakeEvent_8<_i25.StoreCreateEvent>>( this, Invocation.getter(#onCreate), ), - ) as _i8.Event<_i24.StoreCreateEvent>>); + ) as _i8.Event<_i25.StoreCreateEvent>>); @override - _i8.Event<_i24.StoreUpdateEvent>> get onUpdate => + _i8.Event<_i25.StoreUpdateEvent>> get onUpdate => (super.noSuchMethod( Invocation.getter(#onUpdate), - returnValue: _FakeEvent_8<_i24.StoreUpdateEvent>>( + returnValue: _FakeEvent_8<_i25.StoreUpdateEvent>>( this, Invocation.getter(#onUpdate), ), - ) as _i8.Event<_i24.StoreUpdateEvent>>); + ) as _i8.Event<_i25.StoreUpdateEvent>>); @override - _i8.Event<_i24.StoreDeleteEvent>> get onDelete => + _i8.Event<_i25.StoreDeleteEvent>> get onDelete => (super.noSuchMethod( Invocation.getter(#onDelete), - returnValue: _FakeEvent_8<_i24.StoreDeleteEvent>>( + returnValue: _FakeEvent_8<_i25.StoreDeleteEvent>>( this, Invocation.getter(#onDelete), ), - ) as _i8.Event<_i24.StoreDeleteEvent>>); + ) as _i8.Event<_i25.StoreDeleteEvent>>); @override - _i8.Event<_i24.StoreSyncEvent> get onSync => (super.noSuchMethod( + _i8.Event<_i25.StoreSyncEvent> get onSync => (super.noSuchMethod( Invocation.getter(#onSync), - returnValue: _FakeEvent_8<_i24.StoreSyncEvent>( + returnValue: _FakeEvent_8<_i25.StoreSyncEvent>( this, Invocation.getter(#onSync), ), - ) as _i8.Event<_i24.StoreSyncEvent>); + ) as _i8.Event<_i25.StoreSyncEvent>); @override Map> get data => (super.noSuchMethod( @@ -888,7 +901,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { @override String get storageKey => (super.noSuchMethod( Invocation.getter(#storageKey), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#storageKey), ), @@ -900,7 +913,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { #hashMessage, [message], ), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.method( #hashMessage, @@ -910,7 +923,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { ) as String); @override - _i21.Future recordMessageEvent( + _i22.Future recordMessageEvent( String? topic, String? message, ) => @@ -922,9 +935,9 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { message, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool messageIsRecorded( @@ -943,14 +956,14 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { ) as bool); @override - _i21.Future init() => (super.noSuchMethod( + _i22.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool has(String? key) => (super.noSuchMethod( @@ -978,7 +991,7 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { ) as List>); @override - _i21.Future set( + _i22.Future set( String? key, Map? value, ) => @@ -990,39 +1003,39 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { value, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future delete(String? key) => (super.noSuchMethod( + _i22.Future delete(String? key) => (super.noSuchMethod( Invocation.method( #delete, [key], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future persist() => (super.noSuchMethod( + _i22.Future persist() => (super.noSuchMethod( Invocation.method( #persist, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future restore() => (super.noSuchMethod( + _i22.Future restore() => (super.noSuchMethod( Invocation.method( #restore, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override void checkInitialized() => super.noSuchMethod( @@ -1037,13 +1050,13 @@ class MockMessageTracker extends _i1.Mock implements _i23.MessageTracker { /// A class which mocks [HttpWrapper]. /// /// See the documentation for Mockito's code generation for more information. -class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { +class MockHttpWrapper extends _i1.Mock implements _i26.HttpWrapper { MockHttpWrapper() { _i1.throwOnMissingStub(this); } @override - _i21.Future<_i9.Response> get( + _i22.Future<_i9.Response> get( Uri? url, { Map? headers, }) => @@ -1053,7 +1066,7 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { [url], {#headers: headers}, ), - returnValue: _i21.Future<_i9.Response>.value(_FakeResponse_9( + returnValue: _i22.Future<_i9.Response>.value(_FakeResponse_9( this, Invocation.method( #get, @@ -1061,10 +1074,10 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { {#headers: headers}, ), )), - ) as _i21.Future<_i9.Response>); + ) as _i22.Future<_i9.Response>); @override - _i21.Future<_i9.Response> delete( + _i22.Future<_i9.Response> delete( Uri? url, { Map? headers, }) => @@ -1074,7 +1087,7 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { [url], {#headers: headers}, ), - returnValue: _i21.Future<_i9.Response>.value(_FakeResponse_9( + returnValue: _i22.Future<_i9.Response>.value(_FakeResponse_9( this, Invocation.method( #delete, @@ -1082,10 +1095,10 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { {#headers: headers}, ), )), - ) as _i21.Future<_i9.Response>); + ) as _i22.Future<_i9.Response>); @override - _i21.Future<_i9.Response> post( + _i22.Future<_i9.Response> post( Uri? url, { Map? headers, Object? body, @@ -1099,7 +1112,7 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { #body: body, }, ), - returnValue: _i21.Future<_i9.Response>.value(_FakeResponse_9( + returnValue: _i22.Future<_i9.Response>.value(_FakeResponse_9( this, Invocation.method( #post, @@ -1110,13 +1123,13 @@ class MockHttpWrapper extends _i1.Mock implements _i25.HttpWrapper { }, ), )), - ) as _i21.Future<_i9.Response>); + ) as _i22.Future<_i9.Response>); } /// A class which mocks [Core]. /// /// See the documentation for Mockito's code generation for more information. -class MockCore extends _i1.Mock implements _i26.Core { +class MockCore extends _i1.Mock implements _i27.Core { MockCore() { _i1.throwOnMissingStub(this); } @@ -1124,7 +1137,7 @@ class MockCore extends _i1.Mock implements _i26.Core { @override String get projectId => (super.noSuchMethod( Invocation.getter(#projectId), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#projectId), ), @@ -1133,7 +1146,7 @@ class MockCore extends _i1.Mock implements _i26.Core { @override String get relayUrl => (super.noSuchMethod( Invocation.getter(#relayUrl), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#relayUrl), ), @@ -1151,7 +1164,7 @@ class MockCore extends _i1.Mock implements _i26.Core { @override String get pushUrl => (super.noSuchMethod( Invocation.getter(#pushUrl), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#pushUrl), ), @@ -1292,6 +1305,24 @@ class MockCore extends _i1.Mock implements _i26.Core { returnValueForMissingStub: null, ); + @override + _i17.IConnectivity get connectivity => (super.noSuchMethod( + Invocation.getter(#connectivity), + returnValue: _FakeIConnectivity_17( + this, + Invocation.getter(#connectivity), + ), + ) as _i17.IConnectivity); + + @override + set connectivity(_i17.IConnectivity? _connectivity) => super.noSuchMethod( + Invocation.setter( + #connectivity, + _connectivity, + ), + returnValueForMissingStub: null, + ); + @override _i7.IStore> get storage => (super.noSuchMethod( Invocation.getter(#storage), @@ -1313,7 +1344,7 @@ class MockCore extends _i1.Mock implements _i26.Core { @override String get protocol => (super.noSuchMethod( Invocation.getter(#protocol), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#protocol), ), @@ -1322,23 +1353,23 @@ class MockCore extends _i1.Mock implements _i26.Core { @override String get version => (super.noSuchMethod( Invocation.getter(#version), - returnValue: _i20.dummyValue( + returnValue: _i21.dummyValue( this, Invocation.getter(#version), ), ) as String); @override - _i17.Logger get logger => (super.noSuchMethod( + _i18.Logger get logger => (super.noSuchMethod( Invocation.getter(#logger), - returnValue: _FakeLogger_17( + returnValue: _FakeLogger_18( this, Invocation.getter(#logger), ), - ) as _i17.Logger); + ) as _i18.Logger); @override - void addLogListener(_i17.LogCallback? callback) => super.noSuchMethod( + void addLogListener(_i18.LogCallback? callback) => super.noSuchMethod( Invocation.method( #addLogListener, [callback], @@ -1347,7 +1378,7 @@ class MockCore extends _i1.Mock implements _i26.Core { ); @override - bool removeLogListener(_i17.LogCallback? callback) => (super.noSuchMethod( + bool removeLogListener(_i18.LogCallback? callback) => (super.noSuchMethod( Invocation.method( #removeLogListener, [callback], @@ -1356,58 +1387,58 @@ class MockCore extends _i1.Mock implements _i26.Core { ) as bool); @override - _i21.Future start() => (super.noSuchMethod( + _i22.Future start() => (super.noSuchMethod( Invocation.method( #start, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); } /// A class which mocks [WebSocketHandler]. /// /// See the documentation for Mockito's code generation for more information. -class MockWebSocketHandler extends _i1.Mock implements _i27.WebSocketHandler { +class MockWebSocketHandler extends _i1.Mock implements _i28.WebSocketHandler { MockWebSocketHandler() { _i1.throwOnMissingStub(this); } @override - _i21.Future get ready => (super.noSuchMethod( + _i22.Future get ready => (super.noSuchMethod( Invocation.getter(#ready), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future setup({required String? url}) => (super.noSuchMethod( + _i22.Future setup({required String? url}) => (super.noSuchMethod( Invocation.method( #setup, [], {#url: url}, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future connect() => (super.noSuchMethod( + _i22.Future connect() => (super.noSuchMethod( Invocation.method( #connect, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future close() => (super.noSuchMethod( + _i22.Future close() => (super.noSuchMethod( Invocation.method( #close, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); } From f9347755c755deccc40121ec8418a0d5e5cfc379 Mon Sep 17 00:00:00 2001 From: CyberWake Date: Thu, 8 Aug 2024 16:15:40 +0530 Subject: [PATCH 12/27] fix: Parsing in toEthereAmount --- lib/apis/utils/extensions.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apis/utils/extensions.dart b/lib/apis/utils/extensions.dart index 596e3539..b9e04156 100644 --- a/lib/apis/utils/extensions.dart +++ b/lib/apis/utils/extensions.dart @@ -57,7 +57,7 @@ extension EtheraAmountExtension on String? { final hexValue = this!.replaceFirst('0x', ''); return EtherAmount.fromBigInt( EtherUnit.wei, - BigInt.from(int.parse(hexValue, radix: 16)), + BigInt.parse(hexValue, radix: 16), ); } return null; From 81987e3bed5e025716396a975df6dd442e47ead6 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 14:11:52 +0200 Subject: [PATCH 13/27] tests --- test/auth_api/auth_client_test.dart | 16 ++++------ test/core_api/core_test.dart | 10 ++----- test/core_api/pairing_store_test.dart | 10 ++----- test/core_api/pairing_test.dart | 10 ++----- test/core_api/relay_auth_test.dart | 13 ++++----- test/core_api/relay_client_test.dart | 10 ++----- test/shared/shared_test_utils.dart | 39 +++++++++++++++++++++++++ test/sign_api/sign_client_test.dart | 12 ++------ test/sign_api/sign_engine_test.dart | 10 ++----- test/sign_api/web3wallet_sign_test.dart | 10 ++----- test/web3wallet/web3wallet_test.dart | 11 ++----- 11 files changed, 67 insertions(+), 84 deletions(-) diff --git a/test/auth_api/auth_client_test.dart b/test/auth_api/auth_client_test.dart index 9a795561..e233f328 100644 --- a/test/auth_api/auth_client_test.dart +++ b/test/auth_api/auth_client_test.dart @@ -1,9 +1,10 @@ import 'dart:async'; -import 'dart:typed_data'; -import 'package:eth_sig_util/eth_sig_util.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; + +import 'package:eth_sig_util/eth_sig_util.dart'; + import 'package:walletconnect_flutter_v2/apis/auth_api/auth_engine.dart'; import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine_app.dart'; import 'package:walletconnect_flutter_v2/apis/auth_api/i_auth_engine_wallet.dart'; @@ -18,13 +19,8 @@ import 'utils/signature_constants.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); final List Function(PairingMetadata)> authAppCreators = [ diff --git a/test/core_api/core_test.dart b/test/core_api/core_test.dart index 77f352ac..4587adbe 100644 --- a/test/core_api/core_test.dart +++ b/test/core_api/core_test.dart @@ -1,6 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; @@ -9,13 +8,8 @@ import '../shared/shared_test_utils.mocks.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(['none']); group('Core throws errors', () { test('on start if there is no internet connection', () async { diff --git a/test/core_api/pairing_store_test.dart b/test/core_api/pairing_store_test.dart index 62f6d670..c5315d43 100644 --- a/test/core_api/pairing_store_test.dart +++ b/test/core_api/pairing_store_test.dart @@ -1,5 +1,4 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/core.dart'; import 'package:walletconnect_flutter_v2/apis/core/i_core.dart'; import 'package:walletconnect_flutter_v2/apis/core/pairing/i_json_rpc_history.dart'; @@ -18,13 +17,8 @@ import '../shared/shared_test_values.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); group('Pairing store', () { late ICore coreA; diff --git a/test/core_api/pairing_test.dart b/test/core_api/pairing_test.dart index a38c0c80..219f37a4 100644 --- a/test/core_api/pairing_test.dart +++ b/test/core_api/pairing_test.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/core.dart'; import 'package:walletconnect_flutter_v2/apis/core/i_core.dart'; import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/pairing_models.dart'; @@ -18,13 +17,8 @@ import '../shared/shared_test_values.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); test('Format and parses URI correctly', () { Uri response = WalletConnectUtils.formatUri( diff --git a/test/core_api/relay_auth_test.dart b/test/core_api/relay_auth_test.dart index ed0fe89b..683f529e 100644 --- a/test/core_api/relay_auth_test.dart +++ b/test/core_api/relay_auth_test.dart @@ -1,21 +1,18 @@ import 'dart:convert'; import 'dart:typed_data'; +import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth.dart'; import 'package:walletconnect_flutter_v2/apis/core/relay_auth/relay_auth_models.dart'; import 'package:walletconnect_flutter_v2/apis/utils/constants.dart'; +import '../shared/shared_test_utils.dart'; + void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); group('Relay Auth/API', () { // Client will sign a unique identifier as the subject diff --git a/test/core_api/relay_client_test.dart b/test/core_api/relay_client_test.dart index bbefcaf3..1cdaaf6c 100644 --- a/test/core_api/relay_client_test.dart +++ b/test/core_api/relay_client_test.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:flutter_test/flutter_test.dart'; import 'package:http/http.dart'; import 'package:mockito/mockito.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; @@ -13,13 +12,8 @@ import '../shared/shared_test_utils.mocks.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); const TEST_TOPIC = 'abc123'; const TEST_MESSAGE = 'swagmasterss'; diff --git a/test/shared/shared_test_utils.dart b/test/shared/shared_test_utils.dart index c9b56aa9..30c29b8e 100644 --- a/test/shared/shared_test_utils.dart +++ b/test/shared/shared_test_utils.dart @@ -1,8 +1,11 @@ // ignore_for_file: no_leading_underscores_for_local_identifiers +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; import 'package:http/http.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/core.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto.dart'; import 'package:walletconnect_flutter_v2/apis/core/crypto/crypto_utils.dart'; @@ -82,3 +85,39 @@ MockHttpWrapper getHttpWrapper() { return httpWrapper; } + +mockPackageInfo() { + PackageInfo.setMockInitialValues( + appName: _mockInitialValues['appName'], + packageName: _mockInitialValues['packageName'], + version: _mockInitialValues['version'], + buildNumber: _mockInitialValues['buildNumber'], + buildSignature: _mockInitialValues['buildSignature'], + ); +} + +mockConnectivity([List values = const ['wifi']]) { + const channel = MethodChannel('dev.fluttercommunity.plus/connectivity'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMessageHandler( + channel.name, + (data) async { + final call = channel.codec.decodeMethodCall(data); + if (call.method == 'getAll') { + return channel.codec.encodeSuccessEnvelope(_mockInitialValues); + } + if (call.method == 'check') { + return channel.codec.encodeSuccessEnvelope(values); + } + return null; + }, + ); +} + +Map get _mockInitialValues => { + 'appName': 'walletconnect_flutter_v2', + 'packageName': 'com.walletconnect.flutterdapp', + 'version': '1.0', + 'buildNumber': '2', + 'buildSignature': 'buildSignature', + }; diff --git a/test/sign_api/sign_client_test.dart b/test/sign_api/sign_client_test.dart index ced4babc..aebe1fb5 100644 --- a/test/sign_api/sign_client_test.dart +++ b/test/sign_api/sign_client_test.dart @@ -1,7 +1,4 @@ -@Timeout(Duration(seconds: 45)) - import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import '../shared/shared_test_utils.dart'; @@ -11,13 +8,8 @@ import 'utils/sign_client_test_wrapper.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); signEngineTests( context: 'SignClient', diff --git a/test/sign_api/sign_engine_test.dart b/test/sign_api/sign_engine_test.dart index d6b4b433..b30f6d5e 100644 --- a/test/sign_api/sign_engine_test.dart +++ b/test/sign_api/sign_engine_test.dart @@ -1,5 +1,4 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/apis/core/store/generic_store.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; @@ -10,13 +9,8 @@ import 'tests/sign_common.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); signEngineTests( context: 'SignEngine', diff --git a/test/sign_api/web3wallet_sign_test.dart b/test/sign_api/web3wallet_sign_test.dart index 04f689b3..770bc7df 100644 --- a/test/sign_api/web3wallet_sign_test.dart +++ b/test/sign_api/web3wallet_sign_test.dart @@ -1,5 +1,4 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import '../shared/shared_test_utils.dart'; @@ -8,13 +7,8 @@ import 'tests/sign_common.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); signEngineTests( context: 'Web3App/Wallet', diff --git a/test/web3wallet/web3wallet_test.dart b/test/web3wallet/web3wallet_test.dart index 7893abfc..8c3e849d 100644 --- a/test/web3wallet/web3wallet_test.dart +++ b/test/web3wallet/web3wallet_test.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:flutter_test/flutter_test.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import '../shared/shared_test_utils.dart'; @@ -10,13 +9,9 @@ import 'web3wallet_helpers.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - PackageInfo.setMockInitialValues( - appName: 'walletconnect_flutter_v2', - packageName: 'com.walletconnect.flutterdapp', - version: '1.0', - buildNumber: '2', - buildSignature: 'buildSignature', - ); + mockPackageInfo(); + mockConnectivity(); + final List Function(PairingMetadata)> appCreators = [ (PairingMetadata metadata) async => await Web3App.createInstance( projectId: TEST_PROJECT_ID, From 561ad1fda19ca00d20d52f397b73cf83c91af753 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 15:29:27 +0200 Subject: [PATCH 14/27] fix review --- example/wallet/lib/dependencies/deep_link_handler.dart | 4 ---- example/wallet/lib/dependencies/key_service/key_service.dart | 4 ---- example/wallet/lib/dependencies/web3wallet_service.dart | 5 ++++- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/example/wallet/lib/dependencies/deep_link_handler.dart b/example/wallet/lib/dependencies/deep_link_handler.dart index 104fea61..edb2509a 100644 --- a/example/wallet/lib/dependencies/deep_link_handler.dart +++ b/example/wallet/lib/dependencies/deep_link_handler.dart @@ -9,19 +9,15 @@ import 'package:walletconnect_flutter_v2_wallet/dependencies/bottom_sheet/i_bott import 'package:walletconnect_flutter_v2_wallet/utils/constants.dart'; class DeepLinkHandler { - // static const _methodChannel = MethodChannel( 'com.walletconnect.flutterwallet/methods', ); static const _eventChannel = EventChannel( 'com.walletconnect.flutterwallet/events', ); - // static final _linksController = StreamController.broadcast(); static Stream get onLink => _linksController.stream; - // static final waiting = ValueNotifier(false); - // static void initListener() { if (kIsWeb) return; diff --git a/example/wallet/lib/dependencies/key_service/key_service.dart b/example/wallet/lib/dependencies/key_service/key_service.dart index 91427eb5..abfc0be1 100644 --- a/example/wallet/lib/dependencies/key_service/key_service.dart +++ b/example/wallet/lib/dependencies/key_service/key_service.dart @@ -88,9 +88,6 @@ class KeyService extends IKeyService { _keys.add(chainKey); await _saveKeys(); - - // final mnemonic = bip39.generateMnemonic(); - // await restoreWallet(mnemonic: mnemonic); } @override @@ -98,7 +95,6 @@ class KeyService extends IKeyService { // ⚠️ WARNING: SharedPreferences is not the best way to store your keys! This is just for example purposes! final prefs = await SharedPreferences.getInstance(); await prefs.remove('w3w_chain_keys'); - // await prefs.remove('w3w_mnemonic'); await prefs.setString('w3w_mnemonic', mnemonic); final keyPair = _keyPairFromMnemonic(mnemonic); diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index 61e35295..1f2e3898 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -102,9 +102,12 @@ class Web3WalletService extends IWeb3WalletService { final chainKeys = GetIt.I().getKeysForChain('eip155'); for (var session in sessions) { try { + final chainIds = NamespaceUtils.getChainIdsFromNamespaces( + namespaces: session.namespaces, + ); _web3Wallet!.emitSessionEvent( topic: session.topic, - chainId: 'eip155:1', + chainId: chainIds.first, event: SessionEventParams( name: 'accountsChanged', data: [chainKeys.first.address], From 72d78169bcb582f5609524c4d3118ccd94ca3bb9 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 17:23:35 +0200 Subject: [PATCH 15/27] fix link handler --- .../android/app/src/main/AndroidManifest.xml | 7 +++++++ .../lib/dependencies/deep_link_handler.dart | 17 +++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/example/wallet/android/app/src/main/AndroidManifest.xml b/example/wallet/android/app/src/main/AndroidManifest.xml index c6f892b6..6d620813 100644 --- a/example/wallet/android/app/src/main/AndroidManifest.xml +++ b/example/wallet/android/app/src/main/AndroidManifest.xml @@ -24,6 +24,13 @@ + + + + + + + diff --git a/example/wallet/lib/dependencies/deep_link_handler.dart b/example/wallet/lib/dependencies/deep_link_handler.dart index edb2509a..57adba7e 100644 --- a/example/wallet/lib/dependencies/deep_link_handler.dart +++ b/example/wallet/lib/dependencies/deep_link_handler.dart @@ -98,15 +98,16 @@ class DeepLinkHandler { static void _onLink(Object? event) { final decodedUri = Uri.parse(Uri.decodeFull(event.toString())); - if (decodedUri.toString().startsWith('wc:')) { - return; + if (decodedUri.isScheme('wc')) { + waiting.value = true; + _linksController.sink.add(decodedUri.toString()); + } else { + if (decodedUri.query.startsWith('uri=')) { + final pairingUri = decodedUri.query.replaceFirst('uri=', ''); + waiting.value = true; + _linksController.sink.add(pairingUri); + } } - final pairingUri = decodedUri.query.replaceFirst('uri=', ''); - if (!pairingUri.toString().startsWith('wc:')) { - return; - } - waiting.value = true; - _linksController.sink.add(pairingUri); } static void _onError(Object error) { From d915fad47dc1633b55edf2433f8915732461a068 Mon Sep 17 00:00:00 2001 From: Alfreedom Date: Thu, 8 Aug 2024 17:43:10 +0200 Subject: [PATCH 16/27] Update lib/apis/core/connectivity/connectivity.dart Co-authored-by: Ignacio Santise <25931366+ignaciosantise@users.noreply.github.com> --- lib/apis/core/connectivity/connectivity.dart | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/apis/core/connectivity/connectivity.dart b/lib/apis/core/connectivity/connectivity.dart index 4f8828f3..db476795 100644 --- a/lib/apis/core/connectivity/connectivity.dart +++ b/lib/apis/core/connectivity/connectivity.dart @@ -32,14 +32,10 @@ class ConnectivityState implements IConnectivity { _isOnline = isMobileData || isWifi; - if (!_isOnline) { - if (_core.relayClient.isConnected) { - await _core.relayClient.disconnect(); - } - } else { - if (!_core.relayClient.isConnected) { - await _core.relayClient.connect(); - } + if (_isOnline && !_core.relayClient.isConnected) { + await _core.relayClient.connect(); + } else if (!_isOnline && _core.relayClient.isConnected) { + await _core.relayClient.disconnect(); } } } From 6d03b1a8a831984910a0e3704b3bc3c33b3bd392 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 17:51:20 +0200 Subject: [PATCH 17/27] version up --- CHANGELOG.md | 6 ++++-- lib/apis/core/connectivity/connectivity.dart | 4 ++-- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69578656..920c1d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -## 2.3.1-beta01 +## 2.3.1-beta02 -- Minor changes +- Added Connectivity check to core and throw exceptions when internet connection is gone +- Fix for https://github.com/WalletConnect/WalletConnectFlutterV2/issues/303 (EIP-55 validation for SIWE) +- Minor improvements ## 2.3.0 diff --git a/lib/apis/core/connectivity/connectivity.dart b/lib/apis/core/connectivity/connectivity.dart index db476795..a1639538 100644 --- a/lib/apis/core/connectivity/connectivity.dart +++ b/lib/apis/core/connectivity/connectivity.dart @@ -33,9 +33,9 @@ class ConnectivityState implements IConnectivity { _isOnline = isMobileData || isWifi; if (_isOnline && !_core.relayClient.isConnected) { - await _core.relayClient.connect(); + await _core.relayClient.connect(); } else if (!_isOnline && _core.relayClient.isConnected) { - await _core.relayClient.disconnect(); + await _core.relayClient.disconnect(); } } } diff --git a/lib/src/version.dart b/lib/src/version.dart index bc803013..d9d891dc 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '2.3.1-beta01'; +const packageVersion = '2.3.1-beta02'; diff --git a/pubspec.yaml b/pubspec.yaml index 4cd8e856..c5e7b410 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: walletconnect_flutter_v2 description: WalletConnect's official Dart library v2 for WalletKit and AppKit. The communications protocol for web3. -version: 2.3.1-beta01 +version: 2.3.1-beta02 repository: https://github.com/WalletConnect/WalletConnectFlutterV2 environment: From 24b627d1ca47f7ff9e93d4088a152a3bf34675ce Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Thu, 8 Aug 2024 18:27:50 +0200 Subject: [PATCH 18/27] change flutter version on ci --- .github/actions/dependencies/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index 6d4587e8..8b4bf4af 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -8,8 +8,7 @@ runs: - name: Install Flutter uses: subosito/flutter-action@v2 with: - channel: "stable" - architecture: x64 + flutter-version: '3.19.5' # Get package dependencies and generate files - name: Get package dependencies and generate files From 87fe8022726db7734d08a4e0ac0d8fcb7335e141 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Fri, 9 Aug 2024 10:34:11 +0200 Subject: [PATCH 19/27] fix on android samples --- .../android/app/src/main/AndroidManifest.xml | 1 + .../android/app/src/main/AndroidManifest.xml | 1 + .../pairing/utils/pairing_models.freezed.dart | 12 +++---- .../core/pairing/utils/pairing_models.g.dart | 8 ++--- .../core/relay_auth/relay_auth_models.g.dart | 4 +-- .../verify/models/verify_context.freezed.dart | 6 ++-- lib/apis/models/basic_models.freezed.dart | 8 ++--- lib/apis/models/basic_models.g.dart | 2 +- lib/apis/models/json_rpc_error.freezed.dart | 4 +-- lib/apis/models/json_rpc_error.g.dart | 2 +- lib/apis/models/json_rpc_request.freezed.dart | 4 +-- lib/apis/models/json_rpc_request.g.dart | 2 +- .../models/json_rpc_response.freezed.dart | 4 +-- lib/apis/models/json_rpc_response.g.dart | 2 +- .../auth/auth_client_models.freezed.dart | 6 ++-- .../models/auth/auth_client_models.g.dart | 2 +- .../auth/common_auth_models.freezed.dart | 16 ++++----- .../models/auth/common_auth_models.g.dart | 2 +- .../auth/session_auth_models.freezed.dart | 8 ++--- .../models/auth/session_auth_models.g.dart | 6 ++-- .../models/json_rpc_models.freezed.dart | 36 +++++++++---------- .../sign_api/models/json_rpc_models.g.dart | 8 ++--- .../models/proposal_models.freezed.dart | 8 ++--- .../sign_api/models/proposal_models.g.dart | 6 ++-- .../models/session_models.freezed.dart | 8 ++--- .../sign_api/models/session_models.g.dart | 4 +-- 26 files changed, 86 insertions(+), 84 deletions(-) diff --git a/example/dapp/android/app/src/main/AndroidManifest.xml b/example/dapp/android/app/src/main/AndroidManifest.xml index 2fab4011..e812db8e 100644 --- a/example/dapp/android/app/src/main/AndroidManifest.xml +++ b/example/dapp/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + diff --git a/example/wallet/android/app/src/main/AndroidManifest.xml b/example/wallet/android/app/src/main/AndroidManifest.xml index 6d620813..723f4222 100644 --- a/example/wallet/android/app/src/main/AndroidManifest.xml +++ b/example/wallet/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + (T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); PairingInfo _$PairingInfoFromJson(Map json) { return _PairingInfo.fromJson(json); @@ -221,7 +221,7 @@ class _$PairingInfoImpl implements _PairingInfo { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PairingInfoImpl && @@ -488,7 +488,7 @@ class _$PairingMetadataImpl implements _PairingMetadata { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PairingMetadataImpl && @@ -663,7 +663,7 @@ class _$RedirectImpl implements _Redirect { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RedirectImpl && @@ -904,7 +904,7 @@ class _$JsonRpcRecordImpl implements _JsonRpcRecord { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$JsonRpcRecordImpl && @@ -1101,7 +1101,7 @@ class _$ReceiverPublicKeyImpl implements _ReceiverPublicKey { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ReceiverPublicKeyImpl && diff --git a/lib/apis/core/pairing/utils/pairing_models.g.dart b/lib/apis/core/pairing/utils/pairing_models.g.dart index 78975b35..4e1e81f9 100644 --- a/lib/apis/core/pairing/utils/pairing_models.g.dart +++ b/lib/apis/core/pairing/utils/pairing_models.g.dart @@ -9,7 +9,7 @@ part of 'pairing_models.dart'; _$PairingInfoImpl _$$PairingInfoImplFromJson(Map json) => _$PairingInfoImpl( topic: json['topic'] as String, - expiry: json['expiry'] as int, + expiry: (json['expiry'] as num).toInt(), relay: Relay.fromJson(json['relay'] as Map), active: json['active'] as bool, methods: @@ -77,12 +77,12 @@ Map _$$RedirectImplToJson(_$RedirectImpl instance) => _$JsonRpcRecordImpl _$$JsonRpcRecordImplFromJson(Map json) => _$JsonRpcRecordImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), topic: json['topic'] as String, method: json['method'] as String, params: json['params'], chainId: json['chainId'] as String?, - expiry: json['expiry'] as int?, + expiry: (json['expiry'] as num?)?.toInt(), response: json['response'], ); @@ -111,7 +111,7 @@ _$ReceiverPublicKeyImpl _$$ReceiverPublicKeyImplFromJson( _$ReceiverPublicKeyImpl( topic: json['topic'] as String, publicKey: json['publicKey'] as String, - expiry: json['expiry'] as int, + expiry: (json['expiry'] as num).toInt(), ); Map _$$ReceiverPublicKeyImplToJson( diff --git a/lib/apis/core/relay_auth/relay_auth_models.g.dart b/lib/apis/core/relay_auth/relay_auth_models.g.dart index a116a6ac..3f2975f0 100644 --- a/lib/apis/core/relay_auth/relay_auth_models.g.dart +++ b/lib/apis/core/relay_auth/relay_auth_models.g.dart @@ -20,8 +20,8 @@ JWTPayload _$JWTPayloadFromJson(Map json) => JWTPayload( json['iss'] as String, json['sub'] as String, json['aud'] as String, - json['iat'] as int, - json['exp'] as int, + (json['iat'] as num).toInt(), + (json['exp'] as num).toInt(), ); Map _$JWTPayloadToJson(JWTPayload instance) => diff --git a/lib/apis/core/verify/models/verify_context.freezed.dart b/lib/apis/core/verify/models/verify_context.freezed.dart index a10cb641..8880e088 100644 --- a/lib/apis/core/verify/models/verify_context.freezed.dart +++ b/lib/apis/core/verify/models/verify_context.freezed.dart @@ -12,7 +12,7 @@ part of 'verify_context.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); VerifyContext _$VerifyContextFromJson(Map json) { return _VerifyContext.fromJson(json); @@ -157,7 +157,7 @@ class _$VerifyContextImpl implements _VerifyContext { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$VerifyContextImpl && @@ -337,7 +337,7 @@ class _$AttestationResponseImpl implements _AttestationResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AttestationResponseImpl && diff --git a/lib/apis/models/basic_models.freezed.dart b/lib/apis/models/basic_models.freezed.dart index 30bead8d..d766af7f 100644 --- a/lib/apis/models/basic_models.freezed.dart +++ b/lib/apis/models/basic_models.freezed.dart @@ -12,7 +12,7 @@ part of 'basic_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); WalletConnectError _$WalletConnectErrorFromJson(Map json) { return _WalletConnectError.fromJson(json); @@ -138,7 +138,7 @@ class _$WalletConnectErrorImpl implements _WalletConnectError { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WalletConnectErrorImpl && @@ -303,7 +303,7 @@ class _$RpcOptionsImpl implements _RpcOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RpcOptionsImpl && @@ -464,7 +464,7 @@ class _$ConnectionMetadataImpl implements _ConnectionMetadata { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConnectionMetadataImpl && diff --git a/lib/apis/models/basic_models.g.dart b/lib/apis/models/basic_models.g.dart index 24ae3314..978fa4b5 100644 --- a/lib/apis/models/basic_models.g.dart +++ b/lib/apis/models/basic_models.g.dart @@ -9,7 +9,7 @@ part of 'basic_models.dart'; _$WalletConnectErrorImpl _$$WalletConnectErrorImplFromJson( Map json) => _$WalletConnectErrorImpl( - code: json['code'] as int, + code: (json['code'] as num).toInt(), message: json['message'] as String, data: json['data'] as String?, ); diff --git a/lib/apis/models/json_rpc_error.freezed.dart b/lib/apis/models/json_rpc_error.freezed.dart index 13304bda..3e5da530 100644 --- a/lib/apis/models/json_rpc_error.freezed.dart +++ b/lib/apis/models/json_rpc_error.freezed.dart @@ -12,7 +12,7 @@ part of 'json_rpc_error.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); JsonRpcError _$JsonRpcErrorFromJson(Map json) { return _JsonRpcError.fromJson(json); @@ -125,7 +125,7 @@ class _$JsonRpcErrorImpl implements _JsonRpcError { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$JsonRpcErrorImpl && diff --git a/lib/apis/models/json_rpc_error.g.dart b/lib/apis/models/json_rpc_error.g.dart index ce1b1cd9..cf700f9f 100644 --- a/lib/apis/models/json_rpc_error.g.dart +++ b/lib/apis/models/json_rpc_error.g.dart @@ -8,7 +8,7 @@ part of 'json_rpc_error.dart'; _$JsonRpcErrorImpl _$$JsonRpcErrorImplFromJson(Map json) => _$JsonRpcErrorImpl( - code: json['code'] as int?, + code: (json['code'] as num?)?.toInt(), message: json['message'] as String?, ); diff --git a/lib/apis/models/json_rpc_request.freezed.dart b/lib/apis/models/json_rpc_request.freezed.dart index ea961a82..aeb19c7c 100644 --- a/lib/apis/models/json_rpc_request.freezed.dart +++ b/lib/apis/models/json_rpc_request.freezed.dart @@ -12,7 +12,7 @@ part of 'json_rpc_request.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); JsonRpcRequest _$JsonRpcRequestFromJson(Map json) { return _JsonRpcRequest.fromJson(json); @@ -156,7 +156,7 @@ class _$JsonRpcRequestImpl implements _JsonRpcRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$JsonRpcRequestImpl && diff --git a/lib/apis/models/json_rpc_request.g.dart b/lib/apis/models/json_rpc_request.g.dart index 392f4011..d50e1fd0 100644 --- a/lib/apis/models/json_rpc_request.g.dart +++ b/lib/apis/models/json_rpc_request.g.dart @@ -8,7 +8,7 @@ part of 'json_rpc_request.dart'; _$JsonRpcRequestImpl _$$JsonRpcRequestImplFromJson(Map json) => _$JsonRpcRequestImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), jsonrpc: json['jsonrpc'] as String? ?? '2.0', method: json['method'] as String, params: json['params'], diff --git a/lib/apis/models/json_rpc_response.freezed.dart b/lib/apis/models/json_rpc_response.freezed.dart index 58e87c5b..f913b10a 100644 --- a/lib/apis/models/json_rpc_response.freezed.dart +++ b/lib/apis/models/json_rpc_response.freezed.dart @@ -12,7 +12,7 @@ part of 'json_rpc_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); JsonRpcResponse _$JsonRpcResponseFromJson( Map json, T Function(Object?) fromJsonT) { @@ -172,7 +172,7 @@ class _$JsonRpcResponseImpl implements _JsonRpcResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$JsonRpcResponseImpl && diff --git a/lib/apis/models/json_rpc_response.g.dart b/lib/apis/models/json_rpc_response.g.dart index 3e1795f4..fa84c4f7 100644 --- a/lib/apis/models/json_rpc_response.g.dart +++ b/lib/apis/models/json_rpc_response.g.dart @@ -11,7 +11,7 @@ _$JsonRpcResponseImpl _$$JsonRpcResponseImplFromJson( T Function(Object? json) fromJsonT, ) => _$JsonRpcResponseImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), jsonrpc: json['jsonrpc'] as String? ?? '2.0', error: json['error'] == null ? null diff --git a/lib/apis/sign_api/models/auth/auth_client_models.freezed.dart b/lib/apis/sign_api/models/auth/auth_client_models.freezed.dart index 05fbc985..f06f8ba4 100644 --- a/lib/apis/sign_api/models/auth/auth_client_models.freezed.dart +++ b/lib/apis/sign_api/models/auth/auth_client_models.freezed.dart @@ -12,7 +12,7 @@ part of 'auth_client_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); AuthPayloadParams _$AuthPayloadParamsFromJson(Map json) { return _AuthPayloadParams.fromJson(json); @@ -301,7 +301,7 @@ class _$AuthPayloadParamsImpl implements _AuthPayloadParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AuthPayloadParamsImpl && @@ -575,7 +575,7 @@ class _$PendingAuthRequestImpl implements _PendingAuthRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PendingAuthRequestImpl && diff --git a/lib/apis/sign_api/models/auth/auth_client_models.g.dart b/lib/apis/sign_api/models/auth/auth_client_models.g.dart index d75b386a..826e5c4e 100644 --- a/lib/apis/sign_api/models/auth/auth_client_models.g.dart +++ b/lib/apis/sign_api/models/auth/auth_client_models.g.dart @@ -54,7 +54,7 @@ Map _$$AuthPayloadParamsImplToJson( _$PendingAuthRequestImpl _$$PendingAuthRequestImplFromJson( Map json) => _$PendingAuthRequestImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), pairingTopic: json['pairingTopic'] as String, metadata: ConnectionMetadata.fromJson(json['metadata'] as Map), diff --git a/lib/apis/sign_api/models/auth/common_auth_models.freezed.dart b/lib/apis/sign_api/models/auth/common_auth_models.freezed.dart index 55109512..d362c912 100644 --- a/lib/apis/sign_api/models/auth/common_auth_models.freezed.dart +++ b/lib/apis/sign_api/models/auth/common_auth_models.freezed.dart @@ -12,7 +12,7 @@ part of 'common_auth_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); AuthPublicKey _$AuthPublicKeyFromJson(Map json) { return _AuthPublicKey.fromJson(json); @@ -112,7 +112,7 @@ class _$AuthPublicKeyImpl implements _AuthPublicKey { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AuthPublicKeyImpl && @@ -406,7 +406,7 @@ class _$CacaoRequestPayloadImpl implements _CacaoRequestPayload { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CacaoRequestPayloadImpl && @@ -766,7 +766,7 @@ class _$CacaoPayloadImpl implements _CacaoPayload { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CacaoPayloadImpl && @@ -960,7 +960,7 @@ class _$CacaoHeaderImpl implements _CacaoHeader { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CacaoHeaderImpl && @@ -1123,7 +1123,7 @@ class _$CacaoSignatureImpl implements _CacaoSignature { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CacaoSignatureImpl && @@ -1328,7 +1328,7 @@ class _$CacaoImpl implements _Cacao { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CacaoImpl && @@ -1575,7 +1575,7 @@ class _$StoredCacaoImpl implements _StoredCacao { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$StoredCacaoImpl && diff --git a/lib/apis/sign_api/models/auth/common_auth_models.g.dart b/lib/apis/sign_api/models/auth/common_auth_models.g.dart index 23fd94e6..02d49a50 100644 --- a/lib/apis/sign_api/models/auth/common_auth_models.g.dart +++ b/lib/apis/sign_api/models/auth/common_auth_models.g.dart @@ -147,7 +147,7 @@ Map _$$CacaoImplToJson(_$CacaoImpl instance) => _$StoredCacaoImpl _$$StoredCacaoImplFromJson(Map json) => _$StoredCacaoImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), pairingTopic: json['pairingTopic'] as String, h: CacaoHeader.fromJson(json['h'] as Map), p: CacaoPayload.fromJson(json['p'] as Map), diff --git a/lib/apis/sign_api/models/auth/session_auth_models.freezed.dart b/lib/apis/sign_api/models/auth/session_auth_models.freezed.dart index c8ab6514..c15f889a 100644 --- a/lib/apis/sign_api/models/auth/session_auth_models.freezed.dart +++ b/lib/apis/sign_api/models/auth/session_auth_models.freezed.dart @@ -12,7 +12,7 @@ part of 'session_auth_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); SessionAuthRequestParams _$SessionAuthRequestParamsFromJson( Map json) { @@ -339,7 +339,7 @@ class _$SessionAuthRequestParamsImpl implements _SessionAuthRequestParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionAuthRequestParamsImpl && @@ -734,7 +734,7 @@ class _$SessionAuthPayloadImpl implements _SessionAuthPayload { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionAuthPayloadImpl && @@ -1056,7 +1056,7 @@ class _$PendingSessionAuthRequestImpl implements _PendingSessionAuthRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PendingSessionAuthRequestImpl && diff --git a/lib/apis/sign_api/models/auth/session_auth_models.g.dart b/lib/apis/sign_api/models/auth/session_auth_models.g.dart index b0193a8b..d1ea250e 100644 --- a/lib/apis/sign_api/models/auth/session_auth_models.g.dart +++ b/lib/apis/sign_api/models/auth/session_auth_models.g.dart @@ -24,7 +24,7 @@ _$SessionAuthRequestParamsImpl _$$SessionAuthRequestParamsImplFromJson( resources: (json['resources'] as List?) ?.map((e) => e as String) .toList(), - expiry: json['expiry'] as int?, + expiry: (json['expiry'] as num?)?.toInt(), methods: (json['methods'] as List?) ?.map((e) => e as String) .toList() ?? @@ -106,11 +106,11 @@ Map _$$SessionAuthPayloadImplToJson( _$PendingSessionAuthRequestImpl _$$PendingSessionAuthRequestImplFromJson( Map json) => _$PendingSessionAuthRequestImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), pairingTopic: json['pairingTopic'] as String, requester: ConnectionMetadata.fromJson( json['requester'] as Map), - expiryTimestamp: json['expiryTimestamp'] as int, + expiryTimestamp: (json['expiryTimestamp'] as num).toInt(), authPayload: CacaoRequestPayload.fromJson( json['authPayload'] as Map), verifyContext: diff --git a/lib/apis/sign_api/models/json_rpc_models.freezed.dart b/lib/apis/sign_api/models/json_rpc_models.freezed.dart index f72335a4..984d2422 100644 --- a/lib/apis/sign_api/models/json_rpc_models.freezed.dart +++ b/lib/apis/sign_api/models/json_rpc_models.freezed.dart @@ -12,7 +12,7 @@ part of 'json_rpc_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); WcPairingDeleteRequest _$WcPairingDeleteRequestFromJson( Map json) { @@ -131,7 +131,7 @@ class _$WcPairingDeleteRequestImpl implements _WcPairingDeleteRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcPairingDeleteRequestImpl && @@ -281,7 +281,7 @@ class _$WcPairingPingRequestImpl implements _WcPairingPingRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcPairingPingRequestImpl && @@ -545,7 +545,7 @@ class _$WcSessionProposeRequestImpl implements _WcSessionProposeRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionProposeRequestImpl && @@ -730,7 +730,7 @@ class _$WcSessionProposeResponseImpl implements _WcSessionProposeResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionProposeResponseImpl && @@ -1032,7 +1032,7 @@ class _$WcSessionSettleRequestImpl implements _WcSessionSettleRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionSettleRequestImpl && @@ -1221,7 +1221,7 @@ class _$WcSessionUpdateRequestImpl implements _WcSessionUpdateRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionUpdateRequestImpl && @@ -1376,7 +1376,7 @@ class _$WcSessionExtendRequestImpl implements _WcSessionExtendRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionExtendRequestImpl && @@ -1548,7 +1548,7 @@ class _$WcSessionDeleteRequestImpl implements _WcSessionDeleteRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionDeleteRequestImpl && @@ -1704,7 +1704,7 @@ class _$WcSessionPingRequestImpl implements _WcSessionPingRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionPingRequestImpl && @@ -1877,7 +1877,7 @@ class _$WcSessionRequestRequestImpl implements _WcSessionRequestRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionRequestRequestImpl && @@ -2036,7 +2036,7 @@ class _$SessionRequestParamsImpl implements _SessionRequestParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionRequestParamsImpl && @@ -2212,7 +2212,7 @@ class _$WcSessionEventRequestImpl implements _WcSessionEventRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionEventRequestImpl && @@ -2368,7 +2368,7 @@ class _$SessionEventParamsImpl implements _SessionEventParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionEventParamsImpl && @@ -2551,7 +2551,7 @@ class _$WcAuthRequestRequestImpl implements _WcAuthRequestRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcAuthRequestRequestImpl && @@ -2711,7 +2711,7 @@ class _$WcAuthRequestResultImpl implements _WcAuthRequestResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcAuthRequestResultImpl && @@ -2916,7 +2916,7 @@ class _$WcSessionAuthRequestParamsImpl implements _WcSessionAuthRequestParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionAuthRequestParamsImpl && @@ -3109,7 +3109,7 @@ class _$WcSessionAuthRequestResultImpl implements _WcSessionAuthRequestResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$WcSessionAuthRequestResultImpl && diff --git a/lib/apis/sign_api/models/json_rpc_models.g.dart b/lib/apis/sign_api/models/json_rpc_models.g.dart index 8008131a..fe4ad4f6 100644 --- a/lib/apis/sign_api/models/json_rpc_models.g.dart +++ b/lib/apis/sign_api/models/json_rpc_models.g.dart @@ -9,7 +9,7 @@ part of 'json_rpc_models.dart'; _$WcPairingDeleteRequestImpl _$$WcPairingDeleteRequestImplFromJson( Map json) => _$WcPairingDeleteRequestImpl( - code: json['code'] as int, + code: (json['code'] as num).toInt(), message: json['message'] as String, ); @@ -112,7 +112,7 @@ _$WcSessionSettleRequestImpl _$$WcSessionSettleRequestImplFromJson( (json['sessionProperties'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ), - expiry: json['expiry'] as int, + expiry: (json['expiry'] as num).toInt(), controller: ConnectionMetadata.fromJson( json['controller'] as Map), ); @@ -177,7 +177,7 @@ Map _$$WcSessionExtendRequestImplToJson( _$WcSessionDeleteRequestImpl _$$WcSessionDeleteRequestImplFromJson( Map json) => _$WcSessionDeleteRequestImpl( - code: json['code'] as int, + code: (json['code'] as num).toInt(), message: json['message'] as String, data: json['data'] as String?, ); @@ -311,7 +311,7 @@ _$WcSessionAuthRequestParamsImpl _$$WcSessionAuthRequestParamsImplFromJson( json['authPayload'] as Map), requester: ConnectionMetadata.fromJson( json['requester'] as Map), - expiryTimestamp: json['expiryTimestamp'] as int, + expiryTimestamp: (json['expiryTimestamp'] as num).toInt(), ); Map _$$WcSessionAuthRequestParamsImplToJson( diff --git a/lib/apis/sign_api/models/proposal_models.freezed.dart b/lib/apis/sign_api/models/proposal_models.freezed.dart index a516bba7..02ba5bdd 100644 --- a/lib/apis/sign_api/models/proposal_models.freezed.dart +++ b/lib/apis/sign_api/models/proposal_models.freezed.dart @@ -12,7 +12,7 @@ part of 'proposal_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); RequiredNamespace _$RequiredNamespaceFromJson(Map json) { return _RequiredNamespace.fromJson(json); @@ -163,7 +163,7 @@ class _$RequiredNamespaceImpl implements _RequiredNamespace { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RequiredNamespaceImpl && @@ -340,7 +340,7 @@ class _$SessionProposalImpl implements _SessionProposal { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionProposalImpl && @@ -673,7 +673,7 @@ class _$ProposalDataImpl implements _ProposalData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProposalDataImpl && diff --git a/lib/apis/sign_api/models/proposal_models.g.dart b/lib/apis/sign_api/models/proposal_models.g.dart index e63f97a3..4cdacce3 100644 --- a/lib/apis/sign_api/models/proposal_models.g.dart +++ b/lib/apis/sign_api/models/proposal_models.g.dart @@ -36,7 +36,7 @@ Map _$$RequiredNamespaceImplToJson( _$SessionProposalImpl _$$SessionProposalImplFromJson( Map json) => _$SessionProposalImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), params: ProposalData.fromJson(json['params'] as Map), ); @@ -49,8 +49,8 @@ Map _$$SessionProposalImplToJson( _$ProposalDataImpl _$$ProposalDataImplFromJson(Map json) => _$ProposalDataImpl( - id: json['id'] as int, - expiry: json['expiry'] as int, + id: (json['id'] as num).toInt(), + expiry: (json['expiry'] as num).toInt(), relays: (json['relays'] as List) .map((e) => Relay.fromJson(e as Map)) .toList(), diff --git a/lib/apis/sign_api/models/session_models.freezed.dart b/lib/apis/sign_api/models/session_models.freezed.dart index e0f91698..7da892aa 100644 --- a/lib/apis/sign_api/models/session_models.freezed.dart +++ b/lib/apis/sign_api/models/session_models.freezed.dart @@ -12,7 +12,7 @@ part of 'session_models.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); Namespace _$NamespaceFromJson(Map json) { return _Namespace.fromJson(json); @@ -191,7 +191,7 @@ class _$NamespaceImpl implements _Namespace { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NamespaceImpl && @@ -589,7 +589,7 @@ class _$SessionDataImpl implements _SessionData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionDataImpl && @@ -887,7 +887,7 @@ class _$SessionRequestImpl implements _SessionRequest { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionRequestImpl && diff --git a/lib/apis/sign_api/models/session_models.g.dart b/lib/apis/sign_api/models/session_models.g.dart index 40c5558a..fb0c2596 100644 --- a/lib/apis/sign_api/models/session_models.g.dart +++ b/lib/apis/sign_api/models/session_models.g.dart @@ -39,7 +39,7 @@ _$SessionDataImpl _$$SessionDataImplFromJson(Map json) => topic: json['topic'] as String, pairingTopic: json['pairingTopic'] as String, relay: Relay.fromJson(json['relay'] as Map), - expiry: json['expiry'] as int, + expiry: (json['expiry'] as num).toInt(), acknowledged: json['acknowledged'] as bool, controller: json['controller'] as String, namespaces: (json['namespaces'] as Map).map( @@ -92,7 +92,7 @@ Map _$$SessionDataImplToJson(_$SessionDataImpl instance) { _$SessionRequestImpl _$$SessionRequestImplFromJson(Map json) => _$SessionRequestImpl( - id: json['id'] as int, + id: (json['id'] as num).toInt(), topic: json['topic'] as String, method: json['method'] as String, chainId: json['chainId'] as String, From adb3171b98f1f8d7c9413ddd93924ef1156733df Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Fri, 9 Aug 2024 12:06:03 +0200 Subject: [PATCH 20/27] change icons for flavors --- example/dapp/android/app/build.gradle | 8 ++ .../android/app/src/main/AndroidManifest.xml | 12 +-- .../app/src/main/ic_launcher-playstore.png | Bin 0 -> 20214 bytes .../main/ic_launcher_internal-playstore.png | Bin 0 -> 15138 bytes .../res/drawable/ic_launcher_background.xml | 74 ++++++++++++++++++ .../ic_launcher_internal_background.xml | 74 ++++++++++++++++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 ++ .../ic_launcher_internal.xml | 5 ++ .../ic_launcher_internal_round.xml | 5 ++ .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 ++ .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1232 bytes .../mipmap-hdpi/ic_launcher_foreground.webp | Bin 0 -> 1062 bytes .../res/mipmap-hdpi/ic_launcher_internal.webp | Bin 0 -> 1038 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 772 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 2300 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2874 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 1046 bytes .../mipmap-mdpi/ic_launcher_foreground.webp | Bin 0 -> 624 bytes .../res/mipmap-mdpi/ic_launcher_internal.webp | Bin 0 -> 916 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 468 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 1586 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1958 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1964 bytes .../mipmap-xhdpi/ic_launcher_foreground.webp | Bin 0 -> 1524 bytes .../mipmap-xhdpi/ic_launcher_internal.webp | Bin 0 -> 1496 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 1066 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 3334 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3956 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2838 bytes .../mipmap-xxhdpi/ic_launcher_foreground.webp | Bin 0 -> 2934 bytes .../mipmap-xxhdpi/ic_launcher_internal.webp | Bin 0 -> 2014 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 1842 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 5176 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 6064 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3764 bytes .../ic_launcher_foreground.webp | Bin 0 -> 4340 bytes .../mipmap-xxxhdpi/ic_launcher_internal.webp | Bin 0 -> 2830 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 3020 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 7238 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 8548 bytes example/dapp/ios/Runner/Info-internal.plist | 10 --- example/dapp/ios/Runner/Info.plist | 4 +- example/dapp/lib/main.dart | 7 +- example/dapp/lib/pages/connect_page.dart | 17 ++-- example/wallet/android/app/build.gradle | 8 ++ .../android/app/src/main/AndroidManifest.xml | 10 +-- .../main/ic_launcher_internal-playstore.png | Bin 0 -> 46323 bytes .../ic_launcher_internal.xml | 5 ++ .../ic_launcher_internal_round.xml | 5 ++ .../res/mipmap-hdpi/ic_launcher_internal.webp | Bin 0 -> 998 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 1298 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 2358 bytes .../res/mipmap-mdpi/ic_launcher_internal.webp | Bin 0 -> 744 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 672 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 1586 bytes .../mipmap-xhdpi/ic_launcher_internal.webp | Bin 0 -> 1442 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 2102 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 3456 bytes .../mipmap-xxhdpi/ic_launcher_internal.webp | Bin 0 -> 2260 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 4186 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 5752 bytes .../mipmap-xxxhdpi/ic_launcher_internal.webp | Bin 0 -> 3326 bytes .../ic_launcher_internal_foreground.webp | Bin 0 -> 7292 bytes .../ic_launcher_internal_round.webp | Bin 0 -> 8070 bytes .../ic_launcher_internal_background.xml | 4 + example/wallet/ios/Runner/Info-internal.plist | 10 --- example/wallet/ios/Runner/Info.plist | 16 ++-- .../lib/dependencies/web3wallet_service.dart | 7 +- 73 files changed, 231 insertions(+), 60 deletions(-) create mode 100644 example/dapp/android/app/src/main/ic_launcher-playstore.png create mode 100644 example/dapp/android/app/src/main/ic_launcher_internal-playstore.png create mode 100644 example/dapp/android/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 example/dapp/android/app/src/main/res/drawable/ic_launcher_internal_background.xml create mode 100644 example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal.xml create mode 100644 example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml create mode 100644 example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml delete mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp delete mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp delete mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_round.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp delete mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp delete mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_round.webp create mode 100644 example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 example/wallet/android/app/src/main/ic_launcher_internal-playstore.png create mode 100644 example/wallet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal.xml create mode 100644 example/wallet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml create mode 100644 example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_foreground.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_round.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp create mode 100644 example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_round.webp create mode 100644 example/wallet/android/app/src/main/res/values/ic_launcher_internal_background.xml diff --git a/example/dapp/android/app/build.gradle b/example/dapp/android/app/build.gradle index f49bfe40..525e2132 100644 --- a/example/dapp/android/app/build.gradle +++ b/example/dapp/android/app/build.gradle @@ -60,9 +60,17 @@ android { internal { dimension "version" applicationIdSuffix ".internal" + manifestPlaceholders = [ + appIcon: "@mipmap/ic_launcher_internal", + applicationLabel: "FL Dapp (internal)", + ] } production { dimension "version" + manifestPlaceholders = [ + appIcon: "@mipmap/ic_launcher", + applicationLabel: "FL Dapp", + ] } } diff --git a/example/dapp/android/app/src/main/AndroidManifest.xml b/example/dapp/android/app/src/main/AndroidManifest.xml index e812db8e..1834973a 100644 --- a/example/dapp/android/app/src/main/AndroidManifest.xml +++ b/example/dapp/android/app/src/main/AndroidManifest.xml @@ -10,9 +10,9 @@ + android:label="${applicationLabel}" + android:name="${applicationName}" + android:icon="${appIcon}"> - - - - - - diff --git a/example/dapp/android/app/src/main/ic_launcher-playstore.png b/example/dapp/android/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000000000000000000000000000000000000..bbea762f03cffb231867268f1906c52afebfdca0 GIT binary patch literal 20214 zcmeEt^Fvj1U+g2qGv$kPvi)fUu!RmmnZH6s1d2B{r3?2&JS;q$K>%AdC=; zl$0D(>6+w#ZRa_De|Y|h=lNyudY$v``+eWnb=~)QW^Ss-#V*Vafk3zn^mQyC5E%F` z48q0&{@J-datMK#wi@VY-?;Czo*kR{)+)VWA2=LSesSi_tE@r-+nJ^3|Fx`C%088Q z!^YJ0XE14-GaaF*wwM(duQ_t0MLNi~EG}+te)#U{d?0Cj*I`x0xFm9wJ|m^Mh~or@ zc>Npq9pC`}amVw3zXZ58_zOY8q2RAR4;=gz*Z%(x{{NQzzhMk{abFz;F4puvo`@dk z>krAuZn_h4STJE=BXvGXJ#uz!smc6He>4Ex|BKg{XEY6`brM4>(KPk6nX0s9K~_RN z6bf+<2oU_3+hR`iSA%a~5FBG2c(bl{xBhq3#F&d~W_(5k#=HK|*|%qJzTQ97SIl?7 zXLfAb)$g0n!n^5re!V^`G1F%&27Edvr$1MG^LbzXcLQT~Gi~b6E*YOoW;EGmb`ke0 zkM=Q>ucit#o8(D;^$U3uF%snc;mwv|IwNc*_xIq0IFDPFqQl{3{ilp+$lynD2*iZY zxfO6+cUm}F?6L?fa_a9iv#+o0u|M_BHok$5(q;j-G;d$?t&;CwpO0>$Z+=OqZ_s;l zGSeo|HR!MaSJwoyo;4{;blCj>SMKJA&K4y{XI(?8%3GxFgxKhPn8vrcU7>F75?6D> z21l=Mkiza8x+XN^7K?|`Vc+S^1O4CDR5xAsj=0fB!&2$3|0&j}rv6b0Na1_RrG4qR z+QH3v#>dR*+_0l((}3o&Tn;qPYoTwPzL3HDJP?9*EzY19W|#0#~~<1M634GH$WC)b%<9(cQks=sO^8FUp6 zKPJ$=(;ooC2H#$6qmLGU_3Bpj`z*LhT`)a1cIvg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UN@eUG4C5Ig~f5tsghw|xhH!|9urLP!(q#RZg^6DZ(~W2$$T!JThNk{ ztG&2sbF&vnGz0)~!c%cJh#b(=J()MC-0ijC5h@;2ffVtHg;^^v(BH5Vxd^^|kp zhr!OJ{^m|b1Pa7XV@H8Pc9W*&OCJ4HD=QQ-UU8{9H6JK8ja z%kvjs6PHeeD_sP(XLz(zS|qQhjwe?7;%*1$ol#baA`Psn<&DUJ_H zuy3GOw7>ZUd8(`9mCYggmo%TQU-?Z`yUGKOXXRPNdCe!$xaGh%eM1PrE|u{W=cGG| zv$Z#mU-Y$W!VYX}hW2KeP?SBG9=6XB3B1}@l0S;u%WgId(~=3$PH^M`3gw=Rhbv0! rKl~Q%ui-yG_}nFG7W@A+7!-`BpOUNxocsgfuTj4H5AM6aH#GSlwI*dC literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/ic_launcher_internal-playstore.png b/example/dapp/android/app/src/main/ic_launcher_internal-playstore.png new file mode 100644 index 0000000000000000000000000000000000000000..cbb9ef7fdb13652a9d2d8ac7e37184b99c7695dc GIT binary patch literal 15138 zcmeHu`6HBX)c!ML!q_#E5QCahVhkeN3|Wgv5|s>DD(RQ`(M28FKwRZe(rPbbDwja>pCSn9ol9vb#ZFvLz8R&_AnXjd5%d#;>7P&Qyymu-?6eKi<=LV3OK-9 zWsp+Xsx1_p`Nkpxf5PFRaY;0X^?qi3o>r=4a@E-+av{Hl#ETA_>V7cOc0*xs`S<7N z&rg)PWNUf6(sZwJcCU*puetcmJdDd(o%#AMba1%R&tnr0PwFP|)_#|Ej8FY$uLU=( z7S&u?^j&SZPKuVmXXJG-rdB3azO9Hf)8{+p_o>cV3ZVPoQisFmgm>3oL@cwuzaNyu za~w^sv&(9(tpqL4Rgb%zcy(IcJnHX{4>RpqYJ-h&LeCj^UftSkCF7ZUZTNAc@Y&)w zL8B)F$Lij#{d%17%>Lf~9{YR7^L?k@ z+@9}PnVOm%u6)Wl9nI~1Z2kP$(<67rMVra1ZzJZ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qm8BkSUjZlvG z#p)3nehD;xtKY|ebbGkO3KH7jN4<{_y!l9H^bD2kzbwj%X!4*ulm0P& z3Cyasdbq@chcR~GQ7o)0q2zF5rt+WcU7*0PWCJz_zD9)0klgn1rAp8Ns&M~sLLK#C zRUKi22sHO}Y$3bj9Izl|x&}$$*eOK1Ua5dUC*5Z#>O7N~F~ekB{Bsd!wEl z;hV*u^?zI=b^VSgL z(`|y5Ma8R%U51MDd;5U~hY|`2>=*?;;1jY;hJ^u$*v8lI0AGGgy+Ra)EuC^L z5}1bt;p7WK+P5r!tTv*QKXrg1TL#}0J$H;#GV{~!g!j&PWaQGXqaP4G<{!)ZcI3G= zYz<6Gp>=}E(oPxK0Wg*!gIWM1^>H;bNg=j5E zgztQWl|q$)>XS@`T1Z{FdV}fPjZ)bCA1BTC-15pqy3U0_9*6I#tVk&yxKwzRz3|A0 zlyd-_t0Uk?6qQLUjaAv9Z1KX zW-=E0^rCLypI#$hfdd0I2Kl${E}udKxtgkL3)@q4c__4l^f-vzk+_>(OX4*!wL+~0 z&@Tar?ukxSD;bO!kE))%D|JoQ0m!wgDYipE^$eTtd*U=V-|gXRPlfiZd?4_J2=6j% zX_w#KDY@p4#62@YcI$^vfvL*#6!$HkmoM!g99GT-GuV@_!qXc0Be}1v>cM}Pc{lVP zgoCIZ^z)YIvGMDR_S4_TU!Onm?jU*U&eYwh?6Z3`Tlv$EA6(SAeX?LidylJQ9-ee2 zjSfoSN6ozLvihs;fEX0p?A5sQ>_j|1K)^T&ASw;!5!v5hU~JMq1p2gbar<^gcI z?)&687ze*&@nwtX-oyzo=eVz6KHX#FkT)Xo$dxl!g04ib>Xhc+1%uvF($cmRL4t+F z4i$MwS~@G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/dapp/android/app/src/main/res/drawable/ic_launcher_internal_background.xml b/example/dapp/android/app/src/main/res/drawable/ic_launcher_internal_background.xml new file mode 100644 index 00000000..ca3826a4 --- /dev/null +++ b/example/dapp/android/app/src/main/res/drawable/ic_launcher_internal_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..c4a603d4 --- /dev/null +++ b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal.xml b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal.xml new file mode 100644 index 00000000..c87a157b --- /dev/null +++ b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml new file mode 100644 index 00000000..c87a157b --- /dev/null +++ b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..c4a603d4 --- /dev/null +++ b/example/dapp/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..4cb5c1e33cdccafaeb113704b9467a5d8bea34aa GIT binary patch literal 1232 zcmV;>1TXtiNk&G<1ONb6MM6+kP&iDy1ONapN5Byff9EE)ZCBa%eR7p8&|(22h@!>} za_Fez*<=l{BS~@<)$BuS4d&o0e%$8wrv|`bgJ|Q00IOE5TFfeAV7cs1!#aO2vF7C=B>z86W4ur1< z0#cy-xPQ-`=C{fb<;(9Yrl)1un{|J?)pUOTT8s7mlH0fc{b@N`-S_Xa^ST)>$7)qX zRRCEP#b`CXCjayPyx+B!*`N2o6G*K9(ORmClWuBT&>5|!#dtlRRz(9uYY8OC{=CoD zatyYhoBW@(440#BYN|q2s0!e>wY&gX6~Gfnkl^F;`?|UJ?{@RL9(UFLC)4no<>RM6 zwdDK!bNJl99kK-gEF;Ob2HVlvJlob9XWO=I+nl-X_Pl4?w(Yxr*a>Em1EmpqPrK7I2WKq=?0z=Y2oCegBTAye#;ZEHHL;{N4oG6y&wN zeu%jl!1J#HUsBO_-+>Q6QOtj|y_BgK^yCU(jKuyEErOq270@``Q&6Jx`85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jW@d(O3o^& z?OL4Ooj}3zCKoD|1p9}gbvW%txPW0hDg;s>>(||eXqtw4(Dq6K{T|M6aJE;F?)SLI z?siO%V`y-BLZ;ut4K8$GyF1>vSivbg$AvVmi8vJb*Le^8|KtQcZsRyg?|bboj#Ko$ zAFtrJswD|DkQ38(0>7h(4+wpzPxMg`qc1hmlO4uhI2EUIX5s^{ErSaeoekxXb@87*8F5khPDoTuk I)PE?c04~S?r2qf` literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..effa105f23a464e3c881983c99ec113a700e814e GIT binary patch literal 772 zcmV+f1N;0^Nk&He0ssJ4MM6+kP&iER0ssInp+G1QHORJYJ8i4~f0s;`nVF%?%*@P8 zNh;eHY@Ks7jy(DnIimj%+_sS11lS}Ix%hP>7pZFLy#CBl-Zf^4R@S*-IemeQlN7%$BoPe)7_`QpH)yM6( zzz_G(CY%PqJ-!^I$U1BE^tgRt)s1mahr4r>Z_UON?IWyMcG;MQZ%$HDRlds{qGgVK z*bskI$s<>n%!%b%W`+$0CZ?qSKf`67tE~|>sRT0LU>f8^ C=Y|*n literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp b/example/dapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..b7d20b04fc0007617f20435c326a41db8d092799 GIT binary patch literal 2300 zcmVBuP@Oy!u?`F}WXK zGFWC-q`#JE+qM~2y>ZeJ*LI(6+qP}nHh#gjZR;0m+ir7jwgb0qBgsm7q}#bCo&ADr z+qMl!`u}I!w(V-8Y}>Y;GVeJjej&!VH?o}>w_KHO+lHk91&v0>1Vc%{BI<2F{vTY~gx#zwKl>mfkK8wt|br4h0)oH&IhkqCtn z3xFVY`DpM>B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8aYia8nZDQ7>Jm$C|( zLmtR8d+y+JkW63%;+OXGKW<+b1NziQ*l{unt$AYQu3!hBgDAI5FWd#+|2X_7u*otO zCeVD+%kdsnC_Ky55+x|Hbp}Z)iPE)Yjl?g9-Z;8bEXZI!4$sIv3j?nEjYWy5a6Ia^ zxvA?wql1%{nI%s0_yZmKij%xi^jCBr4bCu6tyCx+SRbr_zNy=9d0=4zu`irO&WGJD zKLPC0@OcLGpW=2AFH$ak^FbYy{e)4=)It%bU?hxEK%jm6esKllNR=aQ#Tm13ShdQK z1QDtsZ_DItaFzz~#4-LU69u%i_QXZ$$VHL?xDwcXFwGQ3lYM>+(Wk^y$Zf_X0v38o zV~TM&mIxdJLIi;23G^XJ0R;hipkSBbAOV0( zAXS25Fs^t8hO@L_U-CIX4nO*=hhrx#x|v?Byl_(z8V`qrBRxSTaE(hhUk^GL2DQnX z_7^20La*kwz(5SIH^50&kDMKuQh-$M%Vdip>4)i&0+aT5S$EJ`j5cc zHon$?coE|%PA)tZw~x5ZF!mpM&36~^Du(oafaVB|-XSDtQ!P}2(CADWdFOAHD#v$F zbx6)|4rbjQKHZv9QG)%UbQ_4d#is>_dV&zWGE6QIEzB7(OCEVD8_Vd;LIfAhLVclk zDuMwTFlUf4Q~;oJ>R+f28aPG36#*+jY7`dTHWA)6e7g;z$gN~hF%;Nd`rf}W)V-Sf}^4FuJ+8^j0nu>zoH zgCIe!IPCjn#us1*NCurZV>U>}_4{VFSR7{fWsdmJ69TbdxCvqe<@$&mjLkdNl_FQ@!0*A(%@0)Mti+AWIdB5L$*Zn_HBsd%KBNe+K Y7O*0fHk~NNE_do>D?Je+lD@YT0JrQ|LI3~& literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001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d<*Kbtnc-Ol}A0jbYd-hT- QwVD=L5ARj2gZ>c-0N!%}H2?qr literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..93e464cf2cb9d8ea0346fb5dda3fdd2c7214e24d GIT binary patch literal 624 zcmV-$0+0PtNk&F!0ssJ4MM6+kP&iCn0ssInYrq;1x8tCVBu6U#h%fw%KVx9rwrwEq zKkof{h)n@Ok^iI3zmOn_HoQ^bK?r{ef&p8CGKaD^3zQjqge?IAyfL5pCImq-f}m^( z^8?1?Vdx+zbA-oZO9*oWBM3ogZ292!_&|*y%#X3R#CCibAMyL{Zv{ZRZQFE{8#}4( z#;$GKw(Xw(Kbm*XJ;^=&m@y*y&%kXXMQth_^DRBWR6=dR$0fM3`-6Um`5(yJKDu#n z{rdKLd$}_a4se#GdHxD;->!sgOl1xq{Q|*fSu00XZT$k#hjskaeFJnq4_SH1KJ^0y zdBMv`u0_E8`}Ohp3%GX!eB@dML_g=#x%!G=c};Ti^cxWG2iRyBWPL0)S+F0XcIFvm zkFZhVQ_@j`P`P?r(n|-Q#RCSu#vMX!>)@;5AW3bzk$LYEG)M3A;q_k+e7$!IszdiL zNp59GS4z;`(kWQTF+J-i-qm(oknEV63+R(`4PcK%+bz6iNLc|m2ozb0q9YF}@CPk< z^vJmiV1yD9j%B&z(xQF<8FffFmO%2D7BxO%sDePtM@-M+Fp1W`ppep2HygT-(mf(hhrbpYo&H_egA7* Kr9@OEoi+iOt|>PF literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp b/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..b9fb3e81f3482c7943c4d7c1c8aa5a93964570bb GIT binary patch literal 916 zcmV;F18e+JNk&GD0{{S5M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z#-cI0YvGrnRr<>_ZY-637i*H#;JsWB}aM_q#qMQDxzeBOk9|Xk!$d(T|Nd zlr=A{6to(~VVFwFkHDd*q0}+vTCfTVBg39 literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp b/example/dapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..484b1cb56b18cf813a3f83a074791100c44eabd8 GIT binary patch literal 1586 zcmV-22F>|WNk&F01^@t8MM6+kP&iB-1^@srFTe{B)zGrGe{J0SH&I#xGwh+a3=8N6 zdU}~&F*7rUnVFfHnUi6%CH+tJ2TMEnxg*6owg>bJ`ixtp(bN04f)}AcKa<1lYtyLQ)zD0EI(dCO{Je8LZ(*4HdpDt7~UxQ@M z5?r-(eSrzsfFr0!x)y&g#lNnl({mnqG~)DnmVuLmYL3Zr9()eV`UE4?=1=BCV+=EW$iQ zQO=o3*bixK9ii;CqJPv7rUitBX4zuFc+V|(xW5IZ3F#W#>e3df8Ob_ zIL8$ryFUVz&|R0^TMHX8gS*KgRD>CE2yPtU6u(fmjW=6< z0GsImB01=Yq*I7>A((FKq<#IBN|qab?m~!M8W)_2)GW zl0c|@m}%+52x1@DP04*UXMF%D0ipbKHiV%O z`zV}F#IHDk5)`b)cW{NxFGokP^=gXmV}u6#DUfvn+eSH;WPNNCuLzA{FloN6#@}O1 zEq^_Q2u%_u>N?KfSD6@JN(jIQq561sw^3q~jWtuQ!!Y)jD1oHUKS`RzJj$QnIgpFE0bIM2O!5_`ZlIv#m7R>V<@*_@?3LD2 z@G{erX_+foY%m!@4MKE0_6U!Gnmi95k$p51N0Ppo1pbs#U?~FGT?#>-s+9nlsup=`iJ43q^Vk+s2=W(d-2+n$8OYoa);zv5 zorVE`Amd3I)n9OFG_J5rC%Zc&_e4{t)wV6m^5g7c4Q;7ZQIIhet_*4+t$^4Ib+*A(}CMaij;Kk9%I8F{0P`mXoX$59;u75E<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vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c3c823954012f8d50958261770f654c5894e024b GIT binary patch literal 1964 zcmV;d2UGY`Nk&Gb2LJ$9MM6+kP&iDN2LJ#sU%(d--cZoC4U_PPy*~sIF#*g)tF|@x zmkvfgO1Z6V*_8WVjJw781wLel$|75&)9CIbcal5JX|qV~KCbWc-T3o--*cns#vRi5 zB$B(kySu*?*Ku15&bDpGn|loYL1tUKGdo$)cC*{b#%7GRv1;#;Ek`HY_WOJflx^FV zHTNIDootbVKj37C%0Y67>!i8+mX|cHy1Q@5-CbXK;Mmr7yjuBV+qP|#S($(_nyi%R zQ>RKsW2>@_>-#!z8%dFz=O}1^@wrvK3f&>AO|CbHuzXP{z97%Szmt09^_Y1t1 zHAEG`DgNx0Mm&%gTq#6fwW7 zj96b*K3ulJw?Hz*50`B$kj%}cE=*JN4~zXERr1O2ohh0;6H-I zFM-OgX7PWbtS@khrc1sk|mNhe;AXyzD# z|K<_tW8Uu$}$B84}|=fiu4m4d`E&k+2NiVJ^d-QJzrP7ay)v=jiSzD<1=LE=Hl zoco7oi?KnkDF*=3v#!-j%Iv%QN7Lax-(@)f&>bu5?WD}UyMH$5>kMSAf^@9!w3FAd zvc*n+^I9-H|F>OVy;{*|xjp4{mDgX%RCPObJ+Fb*K{VhE2c^~L7oxQQVzpN$il#bOe$POM14&pn)O=A<&E5|L@^)jELkc%!-ee%jxw=;B22O>i7D}Kl%mR`LH0A27Zc-2)-h% zE(w@*->cuv)uMm69S;j)jeswo&(&;NebWDo>Uw|E$vwXdM9&oOV>)c((LMje-Vf~U zetFMWnzY~U<@HruN$Q^kk=pO}aCteQQuXhGNG%t8x-}(paV$MfyF1iF!q3GN*7G+} zxZCCYK|+N@9(c$3=7jRj)8e(8MOit;6m*`TOTFV<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p b/example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..462b01b5a57c152e2a11197b469138740a9f2e1a GIT binary patch literal 3334 zcmV+h4f*m?Nk&Hg3;+OEMM6+kP&iET3;+NxU%(d-^@f7BZ5Wq7>|F>EF#*VtBq(cb zV`2H0y4#x6A(1t0+Zjp!|Ja^c+qOBjZQEzv$@{%o9UI?QT{WKG$*enTYi!%b8b@1M zd#fV)??95&xZx7M&V@DN`L&gvnVH4cT-CO%RI~c6L4{L-8{j6u;kmo~NuzD+jHIfl%toqRXxp|u zwr$(CZQC|~wQbwBlGKABNpjm}7AHV=NDfF}IC|tzQecxv2q_Xm%0Pou*tRI#C_FVX z#xhVx8H^Q%3j{Vvfs$PCZm7~ddBacZ_xiQ_gPE^4Sfw>OyB@`G!hH#0{Ex3eMVoWQBNqv=I zynBCw2Jy9+(SsloWQ4F7akS7F(9bx>t9{(f0W~i5dBNC<)Dh0PA%n(Iv#*>5@ zh^>ut5|9)UNWyc$zw(%2^1foic@tB;jT#M+5Zgj9n;9y_`J9EAGO7=WJ&HHM3|8VR z&YQ9qVB>3sSW4od;C?7(g3=jp!lP5c3`ni9rOXfEdCU}f9&f_Wn~`9);FutlNfCB} znWTix8`k9HWw-DYGdamHO@PYmr_NeqQ=$d;nCbF(1K<`CDLa1+>p{xY@pKjj z@*tvW3uDY~3RLDbfW%@nd1IytmIx0LqCRjvb1AYE)sIc({A|21lndNtnveIX7|AP3h)!P|I|2KTIgd38$^r z%$sgvsGphHXgXuTM*FZNCP0#+Cf%oFga7Ho-6ot5DQ6YC=Id#Z)M%+iEE7;lb8h0g z`O*7TYVJDf#)UW?coWj;D29RWJtvV=wHe;F z1!l-@BYRZ%SULq7;MB;NdmUC1-4Z~>7G1vRvvAA@Tozal05eme64mHA7-#pQy291m z!vrA#RI9psh{qNk_E>u8-u;a$=H3!!AnF1qGsh*7Fx3;(sl^UXdE9qjt5(X~3Ov81 zyXA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*XwCt zl90smZ~>Mk?rewv<1;wZ2=Ew{p4GomINHRK)hM@`y>KX3+m*Petx^!rj)DE1l(2Nl z$qVdzu^sQll#hk$v&y2=$(BR}812Q%G(dPPER+=Y0Nb*u&mxFj)DwV>jvUZjz?&Qy zIxMhc=!_%zRP<;u>f$Z|A5ct<$8A(u5>z;tZCygm6!>(S8=;H(a%M*cm~PGd>QFox z4!&EU)@Iow=>Uo}>M$kxfO&aN)&_)UzEuJC;rtgCPhu)X#N83FMb|XxDYFu91>6iPRH=_0b!evEL&6t%J2qoe(;GBg$uOt z(R(p#KThAqSW1TWETg?Lv~?3>yKz42#a6*4C^;HBL!kof)?@J{RQ+bK)3U{H=Tp5J z%YOc#eIR-OY#1bCqXcXw#Q!MX-wiYYnsqj;V0CV0-3gTA;{*ggZ4Zq!Us&Zl$}Hkai69L;pmAUObc9LN#T0Jg*8eE^rQqU8ln z&`QurE7ZStq`#;GTuIA5Tz%-?ce?j<&^Wmrz8V+PJiuWNq7LKURWx_%B0lLHr*>HJ z&YuXYCeZ&-?$1U{R^Bs!NUPcbn$>e;^u|I3Se48~ivat-0 z&mr@A+N;34@O5Lr;zA{Er5XUARfD;awsXns_2Q#H19o|K_h<)IpXL-^X+IjqL!mAJ z><7SU06Z2XVLjIE#hFUHIF)}Fl6@5w*U@-0t+&(hYW#W{|9R;&{vE;dy*aZ!YZoNp z@t@lOR=IZjS13vb4+n4nVg55?p!ou@Zc{P<&I91~!x#ikPsF?=EWx<<+82#Mzz-eU zlmPbmU-WurWb`^emg%C&a-HJGqC@@2#(umN<9)6sV}EbTq5gk0paCoj0PFmxpME;O zAg}26o{6y^Z$&ctSg{jS3WLyF-$#e}kc@tO$VWXtb;r5C$vj2rUp|-<{r)Y@SeS%d Q$H~krR+O3PIIeLq1Vm^^IRF3v literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/example/dapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new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pooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..9cf8da312d88c1629e1412bfe82e663af8db985f GIT binary patch literal 2838 zcmV+x3+ePyNk&Ev3jhFDMM6+kP&iBh3jhEwkH8}k;!x1Gk(2O;ee(x^h?oGjRWMfX zdOfJn+GgQJekoVmf75dQv2F7XrkXCk0IPDJ%1&jQ{q(VI+pcV$eb#tp?dPl*D|X7H zoC}C;>ke$&wrbyi)6Gnh&Q@!4HRst+%u~y`ZQIzh71y?nDkD|8_cz3-oXR#!+bE67 zwrxAL^YOXQg>&1ssb_y*Y}+hdIr$A%<=(b!v;X>}vTfV7oqO(qV{O|p=X@I5o{4SS zS%RG^m9+w=O7@bIa{92eoqqh|VdOTFqNHn%bZ)F$>@{lfJ8fPaJ8R=KIoUHg&Mh|k9NV^S{)3u${emL^00HG;XWO=I zJKJ_mwr$(CZF5kNAOQ0JvH|^f;I?ff$qvxDXZA?b?!JIFr6z(2qMV{26_a?|PUdq= zGEF&0lv7HCZIfxr`DC6z^D~@MTC96USH5RGT&aI8uVT+iOtlrqcVZPsc48-0OMf2~ zM^<7Q?gw-mZ&BaJ3)AMP93n3u$&4b&97&!-l24K3XCyg+Bi+-lr7w7hND-5aiB&0af+S9m!U<9daJ@{%I6jIB2-rT*TggMY?sPVhh6>h!p@xiY){eBB3T*R5W;} zvhQU`$@{&gONh~(&WT8?*Ih_N`Rp=S(bF=kyVi6cDZ;5E1}h*aNcISVw07vI@NpT{ zT~BNo6L1^~*WvGMd$wE_3hr-Qq7x1jM|KF3lgvK5@_#u{@pu2#g7qpWn!E*W7|T9e zv~SCq2#Tq3P0B2Jn{~|fb37cy)$6fg=HJaW%i^Ov5m9W1n9MnwWxhY(f;4D{JK^!< z;49HzuAf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(LxT&Tvjs%xC(y!l)naC7IrdQP?l7p_GY z-#c-{^FNKvp>oM6&;PDZH})b{a!tKhl@fsjF0JgsAt2#g2p3;cBUWXSJc{03r+j4P zwF}F*`^0+PTt% zn=k-C?BlKlV7G2#UsUS(;q5OcNFphJYXAL3ip9BaE0#88hiyAJ>uz8GK*+gyx&Va3 z*LN+Jc)Y_8*$;BUvhHoee_`qB3OQeY*CiYPZ~!K2)^;HP#W6cacJg1GqQiv?oFJti z0j|Grq1K-tWZB(9=<2qku2!vV!|(rLKz9o5ESgys0H_F3R<)XXW%0Y{-8HIxe?ZDe zuywKf8zi2Y{PB}lv~_E1J3)C0&ft3hK6A!qr2widnpw7mtLr?DJ2r8Xc5V4T_sL

H$E% o5P(tZy+o^}weWn8OG9p`gqNP3JBJY9&YjAAJbHrwX%k9P0EJ735&!@I literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..8d1771a1d530e4f07af180891a9f3c64e76a3f4c GIT binary patch literal 2934 zcmV-+3yJhnNk&F)3jhFDMM6+kP&iCt3jhEwL%~oGDyz=_Ka<_u|0SGW+~mw*`0ZR|9ABM-6zBatu(oUu*G`^p}jIA(;)YTgN)NQy|bW0Q``*?OWi#v?XN6O zeWh{gq9|zbYQRcnxr5+nz{qrI+Q`h(o5Ee*^kmZmEwjkohVcy;rcBy(7^O@aHgnKw z(cz&+OO1R7M+~YaM23fD5wP54d};VCl-`1&77R7ctW4V58_< zLCPx~9lR(qnuF4Q(q6!kTyQEpFlADBatrlHleTo31u*~s0?lFBwryLpZQHhO+qP|+ z3IPN_{GFTrPr%jf{{V+oDm(Y8u{XVanC!>p zKmiUJ=g5VP-_cZa&Aj)#4=?ifq9hA_-*Lw6ChTdr^!j$%oxsLK>O!dnq!s|{YlCTs zr5iS19X#5x8=Gdaxo%$IW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j;25cbDB0bvF?MFNX;grIK*?BKh}1AMc3;W zG|FdXInAMUNX_EPXg1+xZ)LJMT){`!y*Q$R--@GGmYa?95L*I4FRNzh%rhM1i zL2fC4_OpzS$#=5iGCumicq6#eM7et#)hrcj>jRPh@=3_qc3%3@&tJgsur{z7ER|Np zP2dV~3K$nWe){CAW`b1T2l$p_N-4h$l4bxn-|^J9UjYi^h`Omy zsBGbJ4PI0+0~H?fcbxT^upe+oj#5PRfkZOT<8fbVD%@E>z)BU{dPAY2ozLUYmX9c> zm4dW|27!^D@OoU_(&)l-iwdTV2$S5Lw`7ozgXkEX39V4b^L*amC0Rja4V-}elst~E zE74YnU>QeY>9^Grs{!xV-L8nc#C(U>CVdgi$9W#|AfXyCQ0bxK6L9N{ju8pD;3+O( zgqTKS+8Vub$-EK+Dptwl5~zK`PS^eX+^6v;RJ{4sbKkXg*^7qdA##o%hZK>gpf3|F zYc`kQIUeHS0M9})GQSR_?<8kP#@$|;lk9WCJtw${vkse#47l$AsOuIMNLv}_9wf0~ zq}!G=0W#eM`;I{T;>ZQkm2~gZlTfgYbWA-xbMp1VBLG1784bk#*pEN&)1yePPcQxX z;Qky8(@y}9i2Gdz^gqszva4)y9B$Hm0rU~b{!joI@chtqY7N}&af^}E>j#AcUn}Ko z^zFXF7d_x<1jIXO?p$^1f3sNedv!xD=>am$AQWX7w~(MuAx7d zfQq829 zOjF^e(M+HgM8$&Wd*J)@4oo?;E&qhnT%3-_fF-&ckeoCMzo&;#T7~l0K>)hfB*mh literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..7d6ceae1853402e2e455e36bd0fec832df3788c9 GIT binary patch literal 1842 zcmV-22hI3WNk&F02LJ$9MM6+kP&iB-2LJ#sL%~oGHBj5OO--Er|L;j~+6C6xI#PEp zQg?+w1=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&+bg`Oj2sJyRns{K# zcvh-iK&#njKvj=`X&8NMlVRv%5w3B8Tw3fZ z_j>?b6{&})lSj+v(A&aUtZ0y>iilcyqyXQcA}_LNs+yoEZd`L+Lj#IPs-lP@6Yep; zRblJE+Z!^3qlmi@WStCxsxl~W9Rn7AjgJ&ql_{ca@{Lt{1I^#0frBWjBWmZMg(Y6f z?(rH~$`^4OAG$Lz(-fdKS0T~o9Al3EF@Kw8uFa(h|CCMT@@H)sn{29tnmOn~i0d$^ zGDQH9RplTus468g^BC<7q)N$Gl`BGsI4VZXp7xopl`?{C@?+jxdM+>K*<@2MQ9F-U zo8$B`6E(6_F|<{H_bIU&A6eH>o|1{8-o@P$PZlElNU!dmenXb3CZbb8{(vQ!+CPW? g*Ob720{;p8C-9%Y>G>(Nz<&b&3H&GUA0-e106PPofdBvi literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp b/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..53f36b0faeaae541f9a3eb71e5989ceb54b82a45 GIT binary patch literal 5176 zcmV-86vyjQNk&F66aWBMMM6+kP&iB@6aWA(kH8}k^@f7BZKRk#?A<3FfryxZmae0U zwjOpoGArkuDs-W1zvKpYWgbwCeOk4pB@E=c3N82l6vvUzkTdKJR(aZert9og!pzLf z%*@QpjDwci?W+I3+)Hoaq$=PIv!kdh8l@*ZB!A}BzM z<>uD?f-OJ3fhI9%3Q8858%Bw&EHA(PPy}Txioj7MKGrMuiy6CQV1z3f?)DbPo={XZND}Hqdodvh_^7Lm&>gE`$CnqX3re;@eMX=R*J4dqEwgi5hD34_ogK4U~!&&iMw#zXiL zfFi(#> zcR^ny&l*e2Gt*R)T%2NtxfWY(Bf&nE(}aWOR0eDMPzw>kHg>fu%{D?;Ej3VEbyZbS zncHoIYN@Z8PKL-`=AOlNNLM1I$y9ua-yFtiR;#ttNH^aE!uf_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FMMo0PPZhL#MoG@MRlYXtx&6@{Dt literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/example/dapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..af8dfaac91a2578268ace317028e9876f68925dd GIT binary patch literal 6064 zcmV;h7fZKRq%>}~fFh=>WukLt!U zD>h4VA(J-96sc-j2q6?=94bPVwGGN$_Rd;j08o|V<`t&Q%*@Qp%*@Qp%ndU$Gdj$i zWoG6LGc2R+dCH&p@c#TM+`d*m`QY5j+#PGm6u6bSF1M4SL)%lONn~jQTV`%Y`Ytnr zSDRCrTc0WiPt06~kus$@gqdS$e2c_zvdYXbHS2%l*?_*IqOrbZ z6y8Bt**NQbZ0*4_k@XH1VdFpk=wHFaj3)c{P}xNG%noc@JFu;2vfe;NbxhfNUkjs%=lUZN|3x@4#&&NvWEV8hVc11-goP0)OH+VL}p2 zM5H-kGA5Ha=bVM*yB`b@sWTWN3JeLQGumHy;m#(xWM|XJVLM0?gan~L$mAaZ!iC5o zdWZw!ha^AhlFL1;&y%?G(wxG_>Ml>p6w*0}6p{`Z3Rwv`0XYr14|xx%frKD2NE`y( z&9~;d+%KH2`^$wMcb`S1Q&YIhkz!pAG8}RMat%_BB@_cXVuH_xT!rkPe>tms2v#4W z?j(>7knND$b4jfg6L%!$n}lC`Ea>h^2>P`WHICs##l^3OiW=AkZDkOO-H0W zMtB&{yHCN@2$BQ&9MXib-q#|qMvIqTk0(D_4lV|gK9IJM|1rkC3V~%Ry!03cLfY~C z6r2j&eRv*{1^G)783Y;7APHO{**x##&KVF9#BefWJ-k|Kj9MY+z_YW`CFcfzK^WhK<*HWWZx1(<$1_zjK5_OI6#Xp#=R525LxfM zJj4jOK&S#oNQfcx@iN_&tvv5Qe@GqvmO*B-*nHkR-Df zK0Jgb=4ZT=v%oPbrqgHTmlV)>9~t#ehv+esWt^(Y&h=zS_>0OU&Vm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NY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..683e8715e47f36a9e842673e21f965d4076a1501 GIT binary patch literal 3764 zcmV;l4omS;Nk&Gj4gdgGMM6+kP&iDV4gdfzzrZgLHHYH1Z5(O;z0-U%&;V8mS(#DRa4cDIMM;kY%jg% z3n(*#7&AwLeP$-{1x%y&`k9$#&tPgZGl-+fMrL-I4}g=I8Ttf{#G&3s%9KxLXY9TH-Vg8Kr(FmMTBW~OD88kgurA86fI5WN*Os`aNs z`h=5(wn4?9M^DWKtZp|hnvHq1v}uwSXaib6 zqVV666)4n~I9gzG9>X+}WL2GiDnE(;19+p%q(CHyM<1V}~T z)Ke#M&iAJaubC-b&iMq1pb8*HDuNOoKD81C+T z^MeSGh&SH|Uv)ARo4UsfbchiEeh4uV-syz00lvy)nev92fCWJ4OB}hBC&z%rglWBq zCzrD1PRrD6L=4yjfYhA?aw$!o^D?#|h-D;Gl6>cs(?P;OEOYKcBEbOUl+!^HIN*D5 zU#7Sb$!7lbe}x~y|M9{oqOJ$3<3OqzgbEVJ4a!P=e2PDUirzws+`@`ILQ1~<%KsH! zBCm>0sqMh@f{HpGq^dzG_fx1DUB*RG!q!04?1oeP%r<-%F7Oi8{}$Hw7RLXf^zR?e z|6&`ubBtX?PVdC4jisGcdx@HT+4pIs-(J;CTwM$#Y^dcRTID<>#jQ;^L@)Y>^8GM4mDVweOBq)M zrQaSkEKEHQAXJd58@M93uw>mfr}&A&klEcXaudHkqGAkJ>V-%*&{xqZYE~DgIu$=61DmirbBj*R#+?f_R&)g{iZRBOES|fofAhctj0(+ z>bQ`?*N8~z9nNFu>JT|kNmhzscI8#yF#>pA)@@cz3q>u=uB^&2cE%7OD>lIghv-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uJ6*i4TXFg#UZ53th*;fd1b< z2_M;|SZ9K7C*mbsWTGN4eO=te$n{MgS0WB+<{l4_N@6~c4^Acr0xR*8fhgbKFkrDZ zSZ9EX5$5FioQ3+TrkAaahm!!Zm1biCuC>bGHZ`g|hU8feXe{=!9ABtCyMeFw_+ z2lzn*N%X%ts{tjb*2lm6bR5JYYe)bakZ;P#{VKd_;_P#F06K6BsEn477YPgilp!u$ zKvJFZ2Lru{^L79*1Sm?4E;c;FNGt$+6d2Kw0GiH>YziDe&|6KG_5R90EoL>>eQv^m zG6kSoAOw_vxg(3~1N#DV-d7XiL9Kp&&J*M7vGl?jF%W4LhQ(*jMr)LS4zM<1Y87A` zAn@2@kDc!=`{vI-_Sos$0Rw^R%mcQ6%tq(W7^PUQ01e<{nY4Nxpbm}6@*j4~e>g&6AG?eIjeWt# zXN0FtuQe?a6c=VYMnE`Q1L#BlSfW0|9_1Aw7S{;1xJH=6EM5`z__>aRH5py!eY}6v zXV|8`t(kqR(RMLGG0x?_00ZC#0Wv`0sR6XIPviO6!XWn#d@r}RFwRKD;Prvg9T40a zB>QfC#@+aVmqFQD%W*y`CTCymX#jn}f)8Zef&~js)A~A_6#K83O|X%RK2t8g+$8fZ ezg+oj(MTrjmM#LuMiL;#>`qRXAVBmGE}{TgYBQPu literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..04d83358db864b1ad062b4654543a225eef75375 GIT binary patch literal 4340 zcmV(e zRFR=t7E?!_tiy$CihCn-Ya=r)?{;LiD>6f^>BHq>6*jk7Q_Gm2sDRf+qP}Zwr$(CZQHhODg+P!@po?eKLI!C@V~?V4*xs+ z@9@9F{|^5jN!OMBXQU4QIsE7FpTmC+|2h2U@SmeUEB?Ox*UNvr-22PDz3l7jEcl7`vqet!GBkai`L>$0qM=hw;-)k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y4*9+7l@miE3X~UeQuAoJ*C4i}4ITb-_|M@# ihyNV@bNJ8UKL=bK{&)D_;eUt!9sYOt-{Jow#Rvdt9%-Eb literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp b/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..5509505a8965c12affd36d2686d7e2b53fdc3ab5 GIT binary patch literal 2830 zcmV+p3-R<)Nk&En3jhFDMM6+kP&iEb3IG5vzrZgL^@ifMZ5(O;v6Eac--wt1HqyjpR$}o!BMsmz{IW4EX0;Rvrv~6Sl+=^ow zhCFN|NpkXNEuz4~;&Xz82v#>NNOs#c?>!`NB~(n1pvyny`TvZ`-8Z)N59Fq6u1-!l z=4jn`bf$8$ZQHhO+qRA8>8ja@daL@F>P$}d+Pkss&crrnyHdSzethh4^zYOe0BF)%mCLllU)yFTY}D@@L@Owr%Pe-}j8zwr$&1 zoi1%s+0GwOZ&yiY+g4@Q?|t5E+_sTK=a`vtt9`>aUvEPcQJ^>@+NO!TFIE`vzFhHp zR8Q1ktdD!Y<)5Yop+G}UqL2}k5cyZJFqIR6r0O7S5dj~tGEYl0s?It52ZYj#Qbamp z0I`dBK}a8Pf562!wFvpazrV~)z5_B41f_^%#5w{Rc^|Bko8+o3{U(cT5}llLgib~$ zp(8*f^qV*D=bSI63s+v0{^Hz4#vlP=M8Y7W=KK3|){uOIccX=uxWf?!-F~7(>{|vV z(J#C#a5*QIlFGTd2~&JF=tG`3hig+nDYL;{_7f*E>cwCr`v4^{Ek!IMi}TOqabE_L zKs(ArueqS`XgeknAXYG}ej`wH-aQzzvBmSR#q=vV;4(TQSpxcU0q{(fP~y-wO{7g{ zTqNH3W)hLntpo%4%!R*A@w}jLP=%7#42E&-f^`#mT;;DtcCsL#T?L1=udc%V>0jG6HR3ay`<9nZp9$+LA~v`N@Bcg$uy9 zB8gn`Qg9|kx$zh<7e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|fl%Ifyy@<^=*;&EiD zRFbiEhY@5CP=$%0NauNE{zT^1P3DgC2&~ct9Q0fXl1Q7946geOM%g1WWT{G#!gVVP zr7C%Xr9!AwAxY!9n}sSg61`fl1T@<-vTleql{I@doOUWjhSxnaEgpF2fjMqY6`5YQ zo!jC8(j~UeLz4E-9Uv#r`VIhFsU-8CI~ZZ)ssz$bn0qCZq0i*!4!|{8W!4Z`JD!2h zh4<|bMuQh>pma%)K=tX8exT(aUA9M6sL>2$jf?mb>kL&55x?$MZXoWyj`NLl4N8ukiL`EAPnIU087AiEGPC78p)miGMX8n0k?q1moSJ1 zfdN1OTx6^Pr{Yvi2JZiH=eiZ33&={%`H0xOw!s2mgJBjDC%~&QBV&Qa|DWWG-R})b zF?-lT?|}nlmjL6?*aPlBU_%y%gH1p0Zz06PmM!;xUa>33(v9t*a5#2}VF6Hp@Fg7X zfDaH{g{eN^n!8r3mC*mkJb(VwYIV~DV8f>0@#Me8}Ro-h>F^V z+}n)>53lV1pLy!uE&vliPf(MGbkw_T42}24%^G(+3$OqjgWwy8AU8imWu&PhOAUE$ z!+&qo5Ai<8!#E%0?Tw~A{|$I9&vJTN{1EMS$MO9pjg4mk3}AHgyg$6d65{HIFh7L* zCN2&YDX2P>opm0eqy&di=W*UvLYycYIp5FiB z0N7dWWS&-69lqRu`ufsno#A}EFp;@CwJ^%m! literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp b/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..fd9d02a7810fb0706c8e25a1c553b733cb302a40 GIT binary patch literal 3020 zcmV;-3p4amNk&G*3jhFDMM6+kP&iDu3jhEwufb~&HI9O|ZJ3ll?EM2EA|`;_Y9usN zvXu|1ZQGkRmj3^D$Fh6)oc+pku1+CNVVRkkxnxK)P%U;^CA;#XlZgILfcNeH+$8@0 z@BhC(j{piJp$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9IyI@#7WFJDP72{|~49{pW`j zp7@Rap%BhZE9f`$GydG&Dm~v zafKU@ACj8}s5O4I#;?)6R%f2k^>@}9U8`4FuU>C{v*3zN%RMB)U6EO3>FIOE1u~K_ zL=m42fUM(9Ng3L7fR^gB)>x9OJf|1DzjyE6(aJETio{G$RkEeV>PtN!U7L|)IzCG= z!VUnTwT;(Q3HWIP`Edt0cM#gkm)EafU(*xg`FwS$&I97|1KPq$lXn|JPXWRn0HH;o z9`E&R-eCkwfwK6gaD=U*sUhnY)F5Xjwun?87G*~9f7cN{_TCJ?Ctg^DQAih=^ Um%UoJT=h0qX2YDQN6Q`u0MdJ}GXMYp literal 0 HcmV?d00001 diff --git a/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/example/dapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..30cee2ff4594d7720b671c3573ee1008d6137243 GIT binary patch literal 8548 zcmV-qA)DS(Nk&FoApihZMM6+kP&iCaApig`zrZgLH3#FijT}k+mpyU!!aE`+fd6W@ z<*?zn!H$cGQz|AgQ3(VZ_HhH7Atqf)7gTmtZ!+K0(NSE?_OEgz=YL}_3^VhDnVFe! znVFfnC(F#tyMtcMG!M@-bN4VdGjq4Q?RL5T%BfT5oH}(*T?I~$xD$=! zS>aT;uN+PsE{$3aC#6wcRLJ2$PoSi7XqmAzS3!r93cCZ2(pRNuaiGFUjZ_zwFC18I zEm~8)3cDuRD{HCmDx6f%4q0Zu}6$AkQ$VB)5 zZ_KtDvh6P0&C75Y005cF%ASpEW6mD4js8oNWH)S^_oyMJkU&Y11@KY*0p{^25N1d) zo5?U=D9e;7H!3EVS>~69h)6(45Hf@Up~8rkUceAyLAoI}y+AJ7yjb-hG>9`q3<-e9 zA<>XzNE)Q$^M35IXZyA%danQLgH=v6Sqsu*85AKLh#w>qG77R1asu)IQVjV3`3Gr+ zm>^b&142N+ZlYT9mv8(N7qUv;`IEos>(>5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=9U{j&MW&2^W)&q4S2;z>RiA0_`fK%!%0_Zww{#@(lyJmv#8l{N z=LrCgHYX_25fOL&m|V-rvo9Y72=m@Wc<QM)d*kpRiE@pHReU5 zE}wmJOK!~d<02f1K{;9(qG0(&fuPUV$+VJafLo-)aLc%`>sw<&b1fFjIS?Y1azkUR z*AI)krNI%I6)n-qboqL0MKlPgRJcu-2jEF^l7q4mBMTi4gTW9Hf%qJb!pOv|pyV7$ zYM#y(j>=&uqC-HXP}Y2#O()CCOVw&6C~CE-d3iFO&6bby@^V;;2(qGF eQLoqA?RGbBEuL3&rFiAgR3J1WMAxHajsXCJbs1X# literal 0 HcmV?d00001 diff --git a/example/dapp/ios/Runner/Info-internal.plist b/example/dapp/ios/Runner/Info-internal.plist index 77e41eeb..07f6370b 100644 --- a/example/dapp/ios/Runner/Info-internal.plist +++ b/example/dapp/ios/Runner/Info-internal.plist @@ -34,16 +34,6 @@ wcflutterdapp-internal - - CFBundleTypeRole - Editor - CFBundleURLName - com.walletconnect.flutterdapp.internal - CFBundleURLSchemes - - wcflutterdapp - - CFBundleVersion 2 diff --git a/example/dapp/ios/Runner/Info.plist b/example/dapp/ios/Runner/Info.plist index 4052bbf5..cc81ca1e 100644 --- a/example/dapp/ios/Runner/Info.plist +++ b/example/dapp/ios/Runner/Info.plist @@ -31,7 +31,7 @@ com.walletconnect.flutterdapp CFBundleURLSchemes - wcflutterdapp-production + wcflutterdapp @@ -43,7 +43,7 @@ LSApplicationQueriesSchemes - wcflutterwallet-production + wcflutterwallet walletapp LSRequiresIPhoneOS diff --git a/example/dapp/lib/main.dart b/example/dapp/lib/main.dart index e0cf3315..cf5565c8 100644 --- a/example/dapp/lib/main.dart +++ b/example/dapp/lib/main.dart @@ -60,12 +60,13 @@ class _MyHomePageState extends State { } Future initialize() async { - const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + String flavor = '-${const String.fromEnvironment('FLUTTER_APP_FLAVOR')}'; + flavor = flavor.replaceAll('-production', ''); _web3App = Web3App( core: Core( projectId: DartDefines.projectId, ), - metadata: const PairingMetadata( + metadata: PairingMetadata( name: 'Sample dApp Flutter', description: 'WalletConnect\'s sample dapp with Flutter', url: 'https://walletconnect.com/', @@ -73,7 +74,7 @@ class _MyHomePageState extends State { 'https://images.prismic.io/wallet-connect/65785a56531ac2845a260732_WalletConnect-App-Logo-1024X1024.png' ], redirect: Redirect( - native: 'wcflutterdapp-$flavor://', + native: 'wcflutterdapp$flavor://', // universal: 'https://walletconnect.com', ), ), diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 1bdbd178..68f7a555 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -345,8 +345,9 @@ class ConnectPageState extends State { ); final encodedUri = Uri.encodeComponent(connectResponse.uri.toString()); - const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); - final uri = 'wcflutterwallet-$flavor://wc?uri=$encodedUri'; + String flavor = '-${const String.fromEnvironment('FLUTTER_APP_FLAVOR')}'; + flavor = flavor.replaceAll('-production', ''); + final uri = 'wcflutterwallet$flavor://wc?uri=$encodedUri'; if (await canLaunchUrlString(uri)) { final openApp = await showDialog( // ignore: use_build_context_synchronously @@ -473,9 +474,10 @@ class ConnectPageState extends State { ); final scheme = event?.session.peer.metadata.redirect?.native; - const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + String flavor = '-${const String.fromEnvironment('FLUTTER_APP_FLAVOR')}'; + flavor = flavor.replaceAll('-production', ''); launchUrlString( - scheme ?? 'wcflutterwallet-$flavor://', + scheme ?? 'wcflutterwallet$flavor://', mode: LaunchMode.externalApplication, ); @@ -499,11 +501,12 @@ class ConnectPageState extends State { }) async { final methods1 = requiredNamespaces['eip155']?.methods ?? []; final methods2 = optionalNamespaces['eip155']?.methods ?? []; - const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + String flavor = '-${const String.fromEnvironment('FLUTTER_APP_FLAVOR')}'; + flavor = flavor.replaceAll('-production', ''); final authResponse = await widget.web3App.authenticate( params: SessionAuthRequestParams( chains: _selectedChains.map((e) => e.chainId).toList(), - domain: 'wcflutterdapp-$flavor://', + domain: 'wcflutterdapp$flavor://', nonce: AuthUtils.generateNonce(), uri: Constants.aud, statement: 'Welcome to example flutter app', @@ -512,7 +515,7 @@ class ConnectPageState extends State { ); final encodedUri = Uri.encodeComponent(authResponse.uri.toString()); - final uri = 'wcflutterwallet-$flavor://wc?uri=$encodedUri'; + final uri = 'wcflutterwallet$flavor://wc?uri=$encodedUri'; if (await canLaunchUrlString(uri)) { final openApp = await showDialog( diff --git a/example/wallet/android/app/build.gradle b/example/wallet/android/app/build.gradle index 75e2ca1e..91bef98c 100644 --- a/example/wallet/android/app/build.gradle +++ b/example/wallet/android/app/build.gradle @@ -61,9 +61,17 @@ android { internal { dimension "version" applicationIdSuffix ".internal" + manifestPlaceholders = [ + appIcon: "@mipmap/ic_launcher_internal", + applicationLabel: "FL Wallet (internal)", + ] } production { dimension "version" + manifestPlaceholders = [ + appIcon: "@mipmap/ic_launcher", + applicationLabel: "FL Wallet", + ] } } diff --git a/example/wallet/android/app/src/main/AndroidManifest.xml b/example/wallet/android/app/src/main/AndroidManifest.xml index 723f4222..8171d35a 100644 --- a/example/wallet/android/app/src/main/AndroidManifest.xml +++ b/example/wallet/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,9 @@ + android:icon="${appIcon}"> - - - - - - diff --git a/example/wallet/android/app/src/main/ic_launcher_internal-playstore.png b/example/wallet/android/app/src/main/ic_launcher_internal-playstore.png new file mode 100644 index 0000000000000000000000000000000000000000..3ddcfd761b782c42f2411a4ab4053d62e2d4c5e0 GIT binary patch literal 46323 zcmeEt`8(9@`~DzQQb~4EX?v{6GS(R_cuL4)jX{~pmSGzEG9#sAo2REoSq7nyH6b&$ zkzz{25VDPJh8as?jAdpp^L=^0KcDYk@i~r;IQ;Uu@9Vyn^E$8ddUnIkT5`YQeh>&G zdG*gLe}O>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9^D1K`KjHCxP2VMQz-+;izS1ar28e!UySVGNl{N&wH~_czxN1MD)so z4K}^iUSc9weCF0mIf+9YR2olG4j-nq%;iZwRZ2eb1zkLiGlB=Qld0ei-1yp`EaJbV zS?vt4$A&o~HPpNV>`@_jKvVCqMU}NZg~1^J6Gf2-e@$dwDQLF7&O`6kH= zHxgFo)K*q^leE7zZBVC2xp)P@z%uHKr z&QYIi%MF+`#<%fSr7f$#nN z!_I{9v10wz3BJ=iYx+t@_FNZZ-3=ktu~AgC!M)q;lEcEzL7*QaGi&L%+CVzuSo1^Bx*;8W1}Xo__~dWT8HByMe*!z^nCrD`E~RG zHO-T`7)ycglJ15?4tHwOUe~nH9Ew!I#fCw(+wwwO0U?4mG46W(&%XwqkYAW2;8(R(kyB74Js#994DbFq0)Bnc(+jzEj7onx6NH=n5`dniG;bU!Zi;6LM@1;)Cp$5A@tdm%dj`qyN}ZHT2#D>59NiW8_~@E+KcPc8X~0O}P)OK3=GiBwUzF(E0wyw7!xSzs}@ zM6U;dQMOZ9lwq+}sFc}*#qK&MnK<4UA(PK(7N-4$S|~Myz`H!~pOIGclJsbuJ44r( zi4;M>L*}H+O86u5&93iheI^dFl} + + + + \ No newline at end of file diff --git a/example/wallet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml b/example/wallet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml new file mode 100644 index 00000000..d7da3434 --- /dev/null +++ b/example/wallet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_internal_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal.webp b/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..d4b5dc1c335a38073b2bb6e60c86e5b4d12fbc87 GIT binary patch literal 998 zcmVRBqyL%?j zV{i~jk|NcDe@!Rl9Weh)mxD->6seB<`+60xfO)7O$F{91+8cK#40o5f$bfVR0me=i zj9t3LCJF7~9RPrUfPg>>hynrv0s$ZnL;!)1dIA1`|I?jfExN*hL7X7qm~X=jfWmAT z3qu0ns{({nfUg=-QRx{}RDg2NTvb$5S~op|$`|5w`qVR#*8T1oR8-Vc>!xQM#!?yQ zO8kN^&i{ar`u#e^FUWsVRjA}YsVY=d+BlZ+daQcp)4F-fKJ;JN=5(I7?qK|42Rt9& zzwrx!50K4&27uf8I4!bkQvb?irHBLAnSVs}zS`N`o}Z~(xlz)sD%jy4{YM=JE^A%y z@9)Gkm+|fMEg*`2DuD6*zYf>SRv}veATx|o+vhU1?Vhi;ZQDNEw*R%+%;siKk2Beb z{xgsyNk-LP80%(z!TA3+B203_ri5sf(kV!q)*w)@bot7lTS+)}qmztQE70s>f z9i80ec5CfwE6$RI&`eA+Yg^hnI*jLbG(-4(7?2!z6 zB*ZETPM1T~Ceel>pe6RSu~LD8u$0Jg#zf4dNo+wXL0b@ky>3Ir1}b1%vP8&w84Vx^ zZUK=;lq21@@QfYFJB!-kBj0dXM>@Nsur*N^Di!nZ#+_t}H zoIL_Uh#pSH73tR=!pr|fQe3NoRlPV zle4c}^_e$duLp$A{rK|jGc$i@CSoRF2b}HYnS03(d!Jpcdz literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp b/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..35ff97f620c19c91bf67e82936ff19fb1f368762 GIT binary patch literal 1298 zcmV+t1?~D$Nk&Er1pok7MM6+kP&iEf1ONapp+G1Q&5%jk(7yHWc=Hg^{|V@_)S^KH zG?;DMR&84m?(XjH4msx&DCGDs{(-E!ySux)yUw}RK0MaOrET0A8%e!e8X6HdaJ@Gb zQX&KdMgEUA0q2Qt`u{6+-~Imh`{&O$_Wntq@G0kz3pk%Wb^MU``G5~QHndACIsq+yv^Uv6fv6$ff>UnfN<{9 z+``rEnZpm>N9S9Bvca}gW&%MbcN#xxfKB-ZAzvk)(KxTJf#4L7Y$uK>x|F$chU;u!;?JPw#78VIBByLV*s&u>JN|iI-BN< zAm+Iu0W**U6L462>XRO)E!#0k!lk*fv{H2<;2ZsRZ=6>OnL7Xiqy!DiGWbqgR^cq5 z0dR!`CV;Vf101(Zgd8MH*4j*l1PlRbwhsdk8W7pp0Fz`ufO4UUTZRD%g30P!Fl14t zvM8Wzxd0JU*O5Q%E2O!wejz1~Lyoh>Z_ONFa$FC1gig9}wV%0Rad|AmmH})=9D~ z$S4~h4r5FMXCWlm48xfKDF|+xB#?j&>kU~eL6aZ|2y)XvrYS%Mm>@|z1Udm^Dtl5O z0U-$)C0sH?n#uk(F;+?@yUSvODBzv|(pDgl1Q@PxMyz)GGC-Dvgak5~3M2@kD~!D; zKso~q7}g6x5Tj9m`(bJzAQ_X)AtxCiI3#23fgm9{cc9pg+h>*l3W7)s~ zka?3(Fg9NT2*Pl(qXF6)8#EyHV9cd3PXJ`mSp*XMSx(RZ0keq;0W`QTOk2oxfB?o~ z00J?#ZLNp|0g@dh6U-*_1c!|mXaWQX5UvB01O&q&l8`oTG-((oCn#$()(UQ47;Bx` z8krjjv7C^#c@pcLLA!zMp5W%~EGK9+J-rwGa^@fB%E-V`kGL_~2d|4ajPao<+ zJ_^Dd42j8lW0WxjWchHst+N}(pZ@Q8-r|5DfY}Kc%d;KxaPIZ|oGtfG9_1z8=>Sat ziP06yvST=K<|qGs9~ZD`{Os-?>)GD#G(0HZ{ogw$j1Ndo?hj< zFZa(+I+}5g6atwZy_UPWwLh@==XE{z^FMF$%QJ9JS${s4a5eua`|)r8$2Zo0p1uJ3 IrvJZ~2Xb0GxBvhE literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp b/example/wallet/android/app/src/main/res/mipmap-hdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..641a0450aebddb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hnVF?OPTIOmN!m2p zl|}-`R)Y@&7{lI(v$IC!PqVtXjK90B8hMG(fmcK*TqXm?kFvVD{H=G3OYKrTLH4Yd z>oAt!5_EZRsxfF20Ua6%xa) zsv3TKa2+Md4jGB#2s?y8)Y+b2UiLpy%}X?#N=yM{|L>adAMl4E*%*N5NY8Cg=TTgx zt{fmEI1JX#cyu!-vM~YYw(LWy`$HEwjvfjRBcKUK)?v0fbKSi^0Oqv2C$a>ME)&et z5VmhsFv!ls@0bIa&iyI`^f&dZ>A<-%757gm>MHTxFjRJk>=)Cf6B1D$2pm1@B?pGY zkyb1?F;O-6FZ<#hIEaWs!0|?}_H}YK zM=AELh}RoUnu-VDOCZ8f*&*^@KsUe6dyd*JrxdG9x{7zRM=z6qO2yeB}@eNiTqJ)EqRr=(y341C15^IBJ z67CRrvlkNqn!lAP+eo|wCW@i_An7$=6N#^9I?(*8<6iCMgn_2x=)HswXCZ4d>{e-W ztnB)HK8>Rf&@}Y!M8!)801bgof8q2#iiez_#b{_R#ed)&(77Bgs1+4Y#(RJ218ttm z*txtq0R~vWk)F#WWyTC8n583CzfGjhSB||0#DsglzDN3DX23&w% z^Z^!E!2_x5^!g&ecsl<3Q$GMYKAhpdw>9IfQyZBcLVF4(N1ey5E`J4`lGu z%`wk6$0s+cJJai02Wa>Iyr;W>PX4R&Xq?Z+_e{c%qt0Ea2h`7jCP34k&XeGA)VWqY c8fS;Dm;kNw0?a4lcqOhE;2uums8djDB5)6JQUCw| literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp b/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..f3f8e656a5339b9a2a9872564c656a8b36cb00af GIT binary patch literal 744 zcmV6sZpVTR8#eiJpI^%S~Zzi-fTc<^ zjzc>PrWr@N_iR8^00aD07qC@SR8*3nk_6xa{F3AHZ__or0( zrRuAqQoBh)5--V5B?-XT&#Sg0a(8V@x9Q5;^E(eJ{~oL*Z(lFG}Ps-6Y}n=x}`M`}4#4O#AJqRO|e`kGVhga^2_4ITp3ge*J$(wX2&f zn;2xvwr$$gij#xbwrxAd;f-w@|6jGwTx+knbMroCME@DMZKNn!#^d{g`YYySvxONS zl%>|k=2OTG2ABq+;4?&jSzbO{l=_uVr=+~n3qMmRIqIXJvbw5|AEi1BEHol80 zYlJN-TGv%JWvS33HVt@{{QDoMYj9Dx)b@@~%Zxx%WW0q*$80DPl^8V|12EgjqHc60 z5{pX$fCwNWvB)5chRJX=fmI*@vJ#xGAr?)E?VVlX9)NuSkkACi+O6q1x=wndd7bnM zmlub_)*RoNy>%qZT^%&ra^i4rh?HxGvp(y@6mLnm(HO8!Tq=e-PVEzyelx6Q&`716 z@RECTBwR8Pky{6?2XHuMaPM~4JxJ~Wa|6jaoDkqryao@k0#~exC8wTnt3T%)+7ItU zM2{k(cO3WHeg~r0cZPz_HGu5~+wV-%+WEb!&d`hPcKh#MeS5Es9reHWUH!f9{GwOM z79~e*6jylhpL*~9QB(9knD$lwUh&Sf;=N%Z-KQw2uk-z#U7akuI{W9|QVl=m^sMKH aN2U)iS;<@vPZ^nP@#IrRr$*R{`Xd4iK6JDI literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_foreground.webp b/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..3e913aaae8207ff326cbde00ca0323d50604205e GIT binary patch literal 672 zcmV;R0$=@7Nk&GP0ssJ4MM6+kP&iDB0ssInYrq;1&5%jkkiGSC^2GjkT4Q*Z4!>f1f)wcUeT!-bjEGZ6xUBL7F5 zfW6{t3cmV8{JDvI+3`o-@`m?(qLrTP4YI!@Ov`(o_mX$agdmY>1Q3(?0Uw)?4?W>o z^Fkm%kbr&Sbprr#B@_LVy?}Wdsn+ex5WLJN}-t zEJ=U}v=Bg8*fCGV?#xS;gkZo%s29sVmZ^aMDu$|*fmncKVJh?Ae@OrW0x2N0=Xv|Q zEX$G!xX-=z0)%D^DSGd6r)`(J$hY5qd$B8Rn+MD0*A)aItZ2m@fB(H>^XAPv_B`rp zSJ*KYA;p@lNGb6DKUbN@Vtq!csZ=+fbdL#%J%AMft+4Ts!9q14#F{~xp((I^9;+IO z^cJxY!Abxb+d#n8pn^augVULU-fEc7HZPO*wK`KTf!2+Zjsybeb)FmKosVfjB zumFg3TftgqCIGNyYC!;77GdyE0gS9FU=f-QW@-{vlD4hUL#VovtRBc<#8jXX8(6Us zWGd6qTf-W}@eG8fh3S+23>H@Fw7{Oo_`%e$M^={cO$-K8aI2#CyI4SX#$Hd?>^0iHU`_*CmwZ+N4zELfk;#KcbxN`MW!%pit;7Vd-a9# G72yEwtT0&s literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp b/example/wallet/android/app/src/main/res/mipmap-mdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..fa530e84b17ac35b57986a3f6f4937dfa7bacaf3 GIT binary patch literal 1586 zcmV-22F>|WNk&F01^@t8MM6+kP&iB-1^@srFTe{B_XjzWBt=qW_4G3Hof@aVK>S?p z%3~QIwvFUSQg!c~ckkl({6qQ#{CAauNRnM;_I}PET;N|70y5k!6x-I8E%&~-ySuwP zBuJM2QT&xoWEu>>$(r1gJIVcX|K4=~01zM`00IKwKY)0E009C5i2WG=F#rJqbbJp; zKmrnwuaKfo(rS@-`}@QN965Fks>Dl3H%c5uUOsT=xXW<@z;q#97SJV00$o6sBmjSs z04TsWpa4;T03G9}2H1|1fEdRB0>E&b4x~BO90N#otUFF|Yyd9cI!+jbB<{ZN@+9ZH@;K*^9E;#OKliQAQ|Nkp(QcG6`FqJN(3y$$W zAQp&$sZe@H@Be?dP3q~&Z<9=y?U`~YU-`uWNdN%?lmtKm^8WuHI{vc$^nM%bwpOg3ujh4j#dUQ- zx2@HSmm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example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal.webp b/example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..7137082c391e92991856f1339e27abbac6427f2c GIT binary patch literal 1442 zcmV;T1zq}5Nk&GR1pok7MM6+kP&iDE1pojqU%(d--v&97Bt=rx^rHSctXzEfx_x0~ z9LwOikt9XR-aYc)h_efy%-EHVBS~_UT5-r1{{QidzyhtO3vO-Os+G0xcWc1?`_JWk`$sX9&h%=&d8?t1QBAXPL?}eH zud-c_>Btu?4ydZJu2p#&9xJste6Q*gtwL4JK*tz+&vtcMdfHz``c?OEe+E8P{slyn z{Hi?uf0FPu{wV-)^;_kdF_12GS0sst-{rrh?m`7fs9!27N%(pFnW#DSMFkjL&ey;1 z$BUAO=NqpRoZHGX-&t$rs_cLi0dk|@cS+6kz;t~bl$ ziHb^hap}>2`+g%at{UT)_dA|{$#UlQ{c_r!Qwmz!wwtz_8QZpP+qUhxP2HHAwcXgx zVr{#r{cAGU7~dFce&c8#eTeA41GkYBDH*0cT>L>)#cHdT0Vu`LlA{DgdG#%ro40M< z23h6i@f+}czfq6w9XqsZ-wxIG?UcAj)Y7xO^N}4r`-GrAG%+Ht^8F9@8Z@MT01lB} z5A2Cr`p|91;C_9BPzR2`)q_^Nw^PrdeFKsE-2GtSh@e;;SwWO zDv_#^0ofW|x^XNfhe}Gz3!f73K1|>OVY2F=(Oap&d$4>I^zom^jfh2I%9BTq#vZdh z9(w}xB#SVgI`aIp^c+2XaM9SrnR_JVFs-5mGfHYJqH4XWD^E;Int8`^wpsCz3uc(f zFdfS;Ou|FFVS}_0Q>y!eA#0H#CJ51!(}GFt5oWGxA{Q1V%lzXOc~N5}sLWtJ4RLWv z!ih;Lh+s(at1H@M(3P_+m|)_Hqi?uc|=BtZ(;CQm1DpeBJunCHuczh(3d% z#LVc~Q3*5SnXAxoK@%W%X+h%m4d%RbEthvH;4TWD!f#(*H6n3j=Hb(+x9Dwu2{L#2 zsktNiCXbAmwqVIpBBkP8ICDh!_x-Az*zUz2VI{Bm@Nd_Uxa)s6t@QH;19~o_TfeCB zSmg4>2DgmtJv?W9epahh_lIx4`yN>)ty`;5_AS(?Sqoj#YEhMv3^rrar2qf` literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_foreground.webp b/example/wallet/android/app/src/main/res/mipmap-xhdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..af4414ab9984cbb6b397b673f89998142525008c GIT binary patch literal 2102 zcmV-62+8+SNk&F42mk2mk;t*T6Lp%`j}+HWKK5cjx^lK6HnO{!f5w zQCj`wB!q^dt{P0wwk?}%WpCWw-QC?`#8gKx=8wT2(7D5iFmrczcYWlmE$@fZX9b5o z^EK8<7bn_DrEsf-(}@re6!|~e1UxSu`2T_bUsS*Mv*Mp$tUU1luipHVe%z1wDL-S@ zmBsS`*}~@Jh~?pYZtUk9hjz{_-;{ zfB-`hk^~53Oaw6Ka^D+y3oqqNdHD1PeV?cImmHfhK~z~^qh&ind} zbK~JZJq9o!f^c$$W^9Wt{dUdiWVdL1birfdLW%WZ;4cAlW0%%=?EA zQ!9c90!j#o5Fia8S=vlOf7tcid2xGtZxmFVnoNfzj8RCEsa!;O@?Yo0^>xq$Xb6E& zcBX+LnE?)9)N^rW=0FiK4}m~vBjd!-AuP_0X#@lzBqczIkOMI$37G(bWpQpwMFbXt z0)mWUr(r-68W-sdfi4vU-Xt-wiU5op0wiP8p_S20eND z@P2i3a}NB|=lWl!MiMq)Ll}@@ENziM0zseP1|j3-WxcL9_ZD8s!S(HUI%F89hY(3Z z6A2qIuF~q#D|k=u=dX_K2VFlSt~?pTkU$z_G{cGWG7c+fVXw-qMjJ#8ikR03ji; zJ!4!YCZu2p#^~L{PxJBq>cEJ3#HliklMEpN$p~b$B#iXt=DU5K59fjH8q0g26A++8^8NahIw zNC?=51V{)mB%>ifO6FiJ<*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b)25k=lSWg zE_IDn_j!8TLp`_NKJ&l7)cpL1Z#?tKJf<@{+6Yu=If^np?IubVPY1XFfA@)`kD&k* zfr=Y}>bp>L7wYUngJWoZzO;LZ>h_v@?@{)GV`#R$cVh*p+P!(acsPmCrb0xstO!s6 zy$SH`N91@?CsFozvMoTNwFFe`1}YVc-KEyymbU1{-ds~9(3Dn!5MTnH+yR7+CVC|C i6R?gaC2OqEv@N$CFm+=qNhk^eKr2*a6$(KRSr?;0Vuuj` literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal.webp b/example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..84421f4023af5c6dde3d4aea2c8e3d077f627949 GIT binary patch literal 2260 zcmV;_2rKteNk&G@2mkHh>E-R5;M*%3PMjgP>G za=4HSCA6WoZ5zh^|81w2IU*(isq7Dhe{)OAl5MNDt>EsiC6|97_--h>OU>QgUFTeD z@AG0p$r^5_#m3>BXgHjB{vPf`!~{%$oN50QN%{30?(Pn;`}ZLt^o-E;dt8LOySuxd zyWh&B(_7O-_NzMg#%&mCBAlk&s~ks?XiS2wKbIKEN%L~l2^$7F0=h!zJpRjEwgYK>gxJ|w^tqmIEdVsZ#of;s3 z4X8puJ}^2qY$VX+rB!sBEi>W@(uQ45fDxgy$LBNf$bNsaBo=JM7a-I6tQM327i0lP zyPN?5cmxNwnC&>;$4ctH$b0uCvtJ6MMMe-VX#-TC0EogtG*u6FIz1;L?cJ9Qsw^=^ z8|?uy3edpPLPmicT?a;hko4?JYQGe{h6bC^Mp2a@v`~dWBE___ZjFTF5fW+y zJbO9BLbwE^mOw!JnsFXKOZ{h@GybsslWplt&!`2k1x|mD%lT&h`x56iK_;4VUQn?i zLPeVqZ89L|XtFhF)qqzJWa#`E(9c6q!3B_?06IrT0#y_Rc{6R)WMtfGFuJDb=YvoA zs1NzDk0WePI}+N_?cB}1wYbiI|1sQ=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g?N{n9!oq8non2_ zE^Ek;p`kTDU+z6dy1~#dPPcGx=bwKcVK|;(|0&0xxBm`K6bwi}i2gfX)9c5k=fKmI kxA)uoIA_P&|7-uR{r}Vb8}$>Rwg1=tU;BUU|6iC50P{K>I{*Lx literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp b/example/wallet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..0a9b8ff2e03f05ebedf3f1c51c48b9c6d86d5e3a GIT binary patch literal 5752 zcmV-;7KiClNk&F+761TOMM6+kP&iCv761S*kH8}k)dqvMksLYvVegeM1R`Pr{J7;& z`&~ETU|Pqp3zg<3B`+PWswlM5k`#)?(vSWB|F5=f|9_7sc-Zllc1%xZW@ct)W@dhl znVFfHc}sCvX2vXaVoOKe^AGT)l6B6Jt$|X(C2TRm77?~k-D}yIy4I%p^1{-~lLE=R>)I3M-f{aaAHq0*oPG zA&3YQ7h$;waYQ(kIS%LXxMNusV-i_|E11553VnuQ1fT-&^{%%iN+ae?CaOL@FaPOYsOQhtDX^&X=L zVztCy#w-LQLLwnECvI7+!L8Jzqx6v|D{+`HX7fmhjmIs<+9b*uhNCMdCja$4Mj?rP ziYLNF!eF-I@W&`D|Ha321KC4(T*f3g1QQ9H#St81?ne0=&5uf?? z@7%a@$>QEcy~gh3LMIo{xId09->d^Qa5h}b_ge{tph3*YAWo5v?&|inO|zymf!Uk~1llzLD1aw0iX_s_ZL=?o8Cev?u-`0y zjcXA*YF+H;=qMOFe);jjmdM7oLNJNR8C!D)F9k@VeMgs0K07q5!{oCp4darKOvAQi zOzkltcpS+h_D1~`NNE;_N8@ian+Jap&b;VL1w%D0q6Yn1X959e2bW-%fV&x)8jsLjF*5+==PEglSA6mM ztIe+%HXnQWk7K4aIdVw4M;LEa()3t z83H045tXy|8s2lH(X?*fJ#=IU^RCm@etPJ%oOj+)_rRN#eM0BC;5sU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M%= zPhF4z1&I3r9bj#*SlOn@L!Qsk=ol7V!>uu7%>b(-N=lZJ|BgB5aRH*_5GVxe$B}gn zw~k`bXKCy<k`xzD%#;g2bhq-S`z+c*vK`7^~7*zyj#{2UVWVoWcGL zfC+E_zG1}jNNq-{Dd{2eWt9IV-H-LN_#%%JH&;9zRq<;=1!h#k{0c0qfcI+fRY0f! zs({MG3RHV5(6+Dwv#y3o6&O?PSJy>XoT&K)JzhoyH`$cPBb6@gEZ=}p=+FT~fDBM| z16IHV_|t4C9DUpSkbSzAoI@>)tKdFYe0q_P*rjQIp@s zO#T=<`D66txBTSid**t3YxeV-dfmIc*M+ll?W;ZD?i1}zFQiZ|=^>plSQ_w08UX{K z24wXrPoEAT0EB>~e@%BI-~_yz6W)OY+kq62QlvQ#d15c5(C(Ca>4}PO)T+EqR9jtF z-!bSRe?v~u0;x3HfkZ_O;FOtuKmrI8!Jcj%MJ^M7eh9EdYBnc0jOc2%JLx>=t)V^8 zvNg$;k*o8bH?!SO9w+;I09Dn|dmS5$zd9EZx&n zu{ps_r8U_)-ql>y+ggif9uGt!=SBf(S^v7;s*>*J@}Vx-hRU0}OR9R;^_O)--CP34 qJbqHLH0Rbw2Rk}ygRG-tFk0{CWGz1Tc$3QQ6idjKQY@1Rx7Gkwleek> literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp b/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal.webp new file mode 100644 index 0000000000000000000000000000000000000000..76dae9b18223b99e0f97811efc2ea2f122df23d4 GIT binary patch literal 3326 zcmVtH*msKw%NP%v2yE z7D=*Oir^-JZWFY*cSC?a!RHZo`?UTM`;_CL-SXO952qJu+DLMyI{r|PL;n1wg0^kg zm^B0iuowNG04%9$!cgdLA?BacZQx1QeaQaY1<}Ak|AS${zuzh*L^?lZ+d<{jQiAY4YFSgy9_xp=Mgahl&=Blyl?>F(~(?pl?L7U<}VnAN~9k+G_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bB?l*sQL|J_|h9xu)=xDFe~zXDJHzk7Z?2G>UJ zp`(ADbSJoEe6KyJj=lrz*(SIS3y^2vMUGwTcjk{bNj!8E!V!f=iaYT{oYOUjuw)-- zCJl%RP+$cNMNnj8_-CPxs`bA%P%=k25e*1+grBRYsFGaAy2Dt#8|(u07{F{i1#n2( zp!^&s2v=z!o~t+^&``t?Q7uR08u6De^V}1bTC)c|I|e&Ii(;u{JkCaho}#VIn{xkA z4z3vQbA($aqM9Q_3rON>wGlLrA4TUb+2%Qin5K6~x?5A#+b+r*CKnJ4CqZNV@uRQ( zwX2@JAXiuX9~X%KP1uH7jc|kt^pGS;q?zLFDgFQ&Q3;68Sf`c)s+tT3!x!?Y>`ndk zf$@2x_)ml}Y&YoPuOvw#ngAjKqG){+@%DJ>CWyfN-tT~*hh&uh#D9ngbQJ+W6z1kC zt_i;tt^sXC#BhF$Fit**jgk^MkrK(T07P_|=qr^RErN2{ zdk?^T6GbG^3_#hJ%kX}J7|c%)L6V5~x}ofS86FUr-3tVXh(LP}cz6#R6oFt?dU&h^ Idh1&SHtJN1b^rhX literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp b/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..6fc57ea871682a966ed32c8b43083cb3cdbcb004 GIT binary patch literal 7292 zcmYjWdpHw}+pc~RIpmOIZI0=*VUA4>ISn;M2W>NAGmSZvp?64L=Q5)(j6|}M_)PMBL3xu`oC7aKxzKCrFBK@7rM$YSC4T@4)osk!lcS=tf75A3 z=38y#Y)j;9YwslL_%8$@GLjs*76~Kx@A+%zwWG$-X!pMve~A8Fxe%-Q=gW7h`Fn<* z8De%RYZ14He>!b!zuNv^VwUIl;n%yXW=%u?*VxuQe#J9s`rjKLhn>FLj}sNg6)v`o zy=kew8H^&Y(*r~lO26r?ZM`3Jx4!P%e)E9%(aN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2~W$MtYGB?aW%zR}7 z8GcNw9L*%X&@A3Qz7W_N^yJ7^r;SF=u>y|yM!Ml6YZpoocmsr2T0OPb0FMiJnB~Id z>x)a0otoY*=e}@m*TC@G zUv_O4Fm>`>fx|bhye2LTZxkt8$XA z7Id1q;MfZ&qcY;*t;Ov=&drgIJ>6Dv+NeVe#(Gt#Rq1;AU1E!th$6K^xn3JFWhAw< zl!wXv4lkd?;V6U)8&9{tOT)2eu4nFi>1UM-&kBl(Y=#3b%l?clgvIUs4~XI5Q*vu|mbv3}2vfxiM-)KTtgOmv`4y$L<8r!aIgoIgzyF|)0_ z|5GKJN1Vk?_Mdpa9B2RcnG2B+?erjW)y?1@T_wzG;M^I34lz2P*VPpqAXj`yJM>KL zN}44!|7>8}bXa-oG`3fEr?Ivud>q0UDtJ@Xut(P_`nO5dni*ZOS)AA1A%E&<(PYzE z!la-CSZAK}A!Q67J!BIkLV>8CQMP8--z&PY(l5fih9Pq3Ri&si*Vpc@epdx~=<2_PumIEiYEL^k6+_*iuo*&utuLW5&=WvB_(-tqF+1MSTFn*Ffy zU=bb1h<|m`E%Kqm zGzy|P&c1DS7ETOBo@;RCB#hKts;{BG`xvJc<5%|K+m-fbi8JqFAeU0~msR!c{8uH~ zOqd9RqHbBdZnbZvw}23urCLV2FA{2Nn49ya9}7hve((WKKZ<#{TFefkzLb<9X&lnR z+m+7#bb|pxNKee>+MB@$q@kF+-=|!7ykqg|N%OBM$sb;S{xx*!(y`Mja$_@EpTLS3 ztIw8oUAVR=Kp>lpXxFFWjpW22&}!`JY#u_pTlP1z;yV00000 literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_round.webp b/example/wallet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_internal_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..43e8f16c49d91c22acb7df036f2f70ffa631a506 GIT binary patch literal 8070 zcmV;1A9>(XNk&F~9{>PXMM6+kP&iC+9{>O^z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5NJ2j7gdeaD zhzLWOwFnVmVq!wD&v;E47y2P)o=0*MhsC9n<+)R>POq69lZDhs1}mGGsRXG)IzbYA zYZt5p7MSpa9T&I-C-Bu*)j~N?D~#ff;tZSm@KEZHeCO!jrw#uO_59aCkC4XHqK^F` zhY$L2<0ysgg#8gqu#8m>Pys9|mPG>Y)!=^fNX`GWOo_tO2M6212 z6F1P7;2ZAjb;?N(s*_d@4cRFzNr;U1^wcXi2=Ya|=p}fe7eW9wu3>rfc~}KIEjjPC zq~U2eD#)71+O>iqThM_sjPD=F64Dhkj*x`3Ij;-b3WkLmHrrq;|0x)ZP+$ZlgyS3{ zAK6|`ml+TELlA#_p$Wc=y?9wEhoRq(hk|MsB@|>EHvnd~Q}loTro5*I8OMTc8x}DB zfX52~A^?QM3%J(&cgP6AkO~?t45r}#7|aeL5DYK`W(Ig7EMrhbYRECz%q%fpE$*5y zc*qbN1AK4eL*?g5k>MDOmf=O%5GxqV8tq_7qJoTeGB9xb;W|td0zigqJtV(`CYT#) U#u&yVX1}n!cLF3nneTD~0CIDK9RL6T literal 0 HcmV?d00001 diff --git a/example/wallet/android/app/src/main/res/values/ic_launcher_internal_background.xml b/example/wallet/android/app/src/main/res/values/ic_launcher_internal_background.xml new file mode 100644 index 00000000..9ab84dff --- /dev/null +++ b/example/wallet/android/app/src/main/res/values/ic_launcher_internal_background.xml @@ -0,0 +1,4 @@ + + + #F5EDFF + \ No newline at end of file diff --git a/example/wallet/ios/Runner/Info-internal.plist b/example/wallet/ios/Runner/Info-internal.plist index 7588df89..8fc880c9 100644 --- a/example/wallet/ios/Runner/Info-internal.plist +++ b/example/wallet/ios/Runner/Info-internal.plist @@ -34,16 +34,6 @@ wcflutterwallet-internal - - CFBundleTypeRole - Editor - CFBundleURLName - com.walletconnect.flutterwallet.internal - CFBundleURLSchemes - - wcflutterwallet - - CFBundleVersion $(FLUTTER_BUILD_NUMBER) diff --git a/example/wallet/ios/Runner/Info.plist b/example/wallet/ios/Runner/Info.plist index 99e831c3..1be80823 100644 --- a/example/wallet/ios/Runner/Info.plist +++ b/example/wallet/ios/Runner/Info.plist @@ -25,14 +25,14 @@ CFBundleURLTypes - CFBundleTypeRole - Editor - CFBundleURLName - com.walletconnect.flutterwallet - CFBundleURLSchemes - - wcflutterwallet-production - + CFBundleTypeRole + Editor + CFBundleURLName + com.walletconnect.flutterwallet + CFBundleURLSchemes + + wcflutterwallet + CFBundleVersion diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index 1f2e3898..183a21e7 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -27,12 +27,13 @@ class Web3WalletService extends IWeb3WalletService { @override Future create() async { // Create the web3wallet - const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); + String flavor = '-${const String.fromEnvironment('FLUTTER_APP_FLAVOR')}'; + flavor = flavor.replaceAll('-production', ''); _web3Wallet = Web3Wallet( core: Core( projectId: DartDefines.projectId, ), - metadata: const PairingMetadata( + metadata: PairingMetadata( name: 'Sample Wallet Flutter', description: 'WalletConnect\'s sample wallet with Flutter', url: 'https://walletconnect.com/', @@ -40,7 +41,7 @@ class Web3WalletService extends IWeb3WalletService { 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png' ], redirect: Redirect( - native: 'wcflutterwallet-$flavor://', + native: 'wcflutterwallet$flavor://', // universal: 'https://walletconnect.com', ), ), From 24db1411d46c9ebe6a7867008e5d6b2a531b6f8e Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Fri, 9 Aug 2024 12:27:33 +0200 Subject: [PATCH 21/27] minor changes --- .github/workflows/release_dapp_android.yml | 2 +- .github/workflows/release_dapp_android_internal.yml | 2 +- .github/workflows/release_dapp_ios.yml | 2 +- .github/workflows/release_dapp_ios_internal.yml | 2 +- .github/workflows/release_wallet_android.yml | 2 +- .github/workflows/release_wallet_android_internal.yml | 2 +- .github/workflows/release_wallet_ios.yml | 2 +- .github/workflows/release_wallet_ios_internal.yml | 2 +- example/dapp/android/fastlane/Fastfile | 2 +- example/dapp/ios/fastlane/Fastfile | 2 +- example/dapp/lib/pages/connect_page.dart | 4 ++-- example/dapp/web/index.html | 2 +- example/dapp/web/manifest.json | 4 ++-- example/wallet/android/fastlane/Fastfile | 2 +- example/wallet/ios/fastlane/Fastfile | 2 +- example/wallet/macos/Runner/Configs/AppInfo.xcconfig | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release_dapp_android.yml b/.github/workflows/release_dapp_android.yml index ce5293c6..3188d495 100644 --- a/.github/workflows/release_dapp_android.yml +++ b/.github/workflows/release_dapp_android.yml @@ -1,4 +1,4 @@ -name: Android Web3Dapp (production) deploy +name: Android Dapp (production) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_dapp_android_internal.yml b/.github/workflows/release_dapp_android_internal.yml index 12a1d821..dd7c9c2e 100644 --- a/.github/workflows/release_dapp_android_internal.yml +++ b/.github/workflows/release_dapp_android_internal.yml @@ -1,4 +1,4 @@ -name: Android Web3Dapp (internal) deploy +name: Android Dapp (internal) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_dapp_ios.yml b/.github/workflows/release_dapp_ios.yml index a346fe4a..dc0ae861 100644 --- a/.github/workflows/release_dapp_ios.yml +++ b/.github/workflows/release_dapp_ios.yml @@ -1,4 +1,4 @@ -name: iOS Web3Dapp (production) deploy +name: iOS Dapp (production) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_dapp_ios_internal.yml b/.github/workflows/release_dapp_ios_internal.yml index 54911c49..08251e88 100644 --- a/.github/workflows/release_dapp_ios_internal.yml +++ b/.github/workflows/release_dapp_ios_internal.yml @@ -1,4 +1,4 @@ -name: iOS Web3Dapp (internal) deploy +name: iOS Dapp (internal) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_wallet_android.yml b/.github/workflows/release_wallet_android.yml index c660c060..224b336d 100644 --- a/.github/workflows/release_wallet_android.yml +++ b/.github/workflows/release_wallet_android.yml @@ -1,4 +1,4 @@ -name: Android Web3Wallet (production) deploy +name: Android Wallet (production) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_wallet_android_internal.yml b/.github/workflows/release_wallet_android_internal.yml index 59051f82..e5a4b063 100644 --- a/.github/workflows/release_wallet_android_internal.yml +++ b/.github/workflows/release_wallet_android_internal.yml @@ -1,4 +1,4 @@ -name: Android Web3Wallet (internal) deploy +name: Android Wallet (internal) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_wallet_ios.yml b/.github/workflows/release_wallet_ios.yml index a3b456e6..e68d75aa 100644 --- a/.github/workflows/release_wallet_ios.yml +++ b/.github/workflows/release_wallet_ios.yml @@ -1,4 +1,4 @@ -name: iOS Web3Wallet (production) deploy +name: iOS Wallet (production) deploy on: workflow_dispatch: diff --git a/.github/workflows/release_wallet_ios_internal.yml b/.github/workflows/release_wallet_ios_internal.yml index 8a3a6cfc..edb04b38 100644 --- a/.github/workflows/release_wallet_ios_internal.yml +++ b/.github/workflows/release_wallet_ios_internal.yml @@ -1,4 +1,4 @@ -name: iOS Web3Wallet (internal) deploy +name: iOS Wallet (internal) deploy on: workflow_dispatch: diff --git a/example/dapp/android/fastlane/Fastfile b/example/dapp/android/fastlane/Fastfile index 2f0aac57..228e7db5 100644 --- a/example/dapp/android/fastlane/Fastfile +++ b/example/dapp/android/fastlane/Fastfile @@ -78,7 +78,7 @@ platform :android do ) slack( - message: "📱 Web3Dapp Flutter #{_app_version}-#{_flavor} (#{_new_build_number}) for 🤖 Android successfully released!\n\n", + message: "📱 Flutter Dapp #{_app_version}-#{_flavor} (#{_new_build_number}) for 🤖 Android successfully released!\n\n", default_payloads: [], attachment_properties: { fields: [ diff --git a/example/dapp/ios/fastlane/Fastfile b/example/dapp/ios/fastlane/Fastfile index b09595e0..8088a5f2 100644 --- a/example/dapp/ios/fastlane/Fastfile +++ b/example/dapp/ios/fastlane/Fastfile @@ -121,7 +121,7 @@ platform :ios do ) slack( - message: "📱 Web3Dapp Flutter #{options[:app_version]}-#{_flavor} (#{new_build_number}) for 🍎 iOS successfully released!\n\n", + message: "📱 Flutter Dapp #{options[:app_version]}-#{_flavor} (#{new_build_number}) for 🍎 iOS successfully released!\n\n", default_payloads: [], attachment_properties: { fields: [ diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 68f7a555..64accaf1 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -354,7 +354,7 @@ class ConnectPageState extends State { context: context, builder: (BuildContext context) { return AlertDialog( - content: const Text('Do you want to open with Web3Wallet Flutter'), + content: const Text('Do you want to open with Flutter Wallet'), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), @@ -523,7 +523,7 @@ class ConnectPageState extends State { context: context, builder: (BuildContext context) { return AlertDialog( - content: const Text('Do you want to open with Web3Wallet Flutter'), + content: const Text('Do you want to open with Flutter Wallet'), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), diff --git a/example/dapp/web/index.html b/example/dapp/web/index.html index b4560133..3bcca361 100644 --- a/example/dapp/web/index.html +++ b/example/dapp/web/index.html @@ -23,7 +23,7 @@ - + diff --git a/example/dapp/web/manifest.json b/example/dapp/web/manifest.json index 760f6ae4..4cd3ac9e 100644 --- a/example/dapp/web/manifest.json +++ b/example/dapp/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "Web3Dapp Flutter", - "short_name": "Web3Dapp Flutter", + "name": "Flutter Dapp", + "short_name": "Flutter Dapp", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/example/wallet/android/fastlane/Fastfile b/example/wallet/android/fastlane/Fastfile index 1f69e867..cceb86d4 100644 --- a/example/wallet/android/fastlane/Fastfile +++ b/example/wallet/android/fastlane/Fastfile @@ -78,7 +78,7 @@ platform :android do ) slack( - message: "🔐 Web3Wallet Flutter #{_app_version}-#{_flavor} (#{_new_build_number}) for 🤖 Android successfully released!\n\n", + message: "🔐 Flutter Wallet #{_app_version}-#{_flavor} (#{_new_build_number}) for 🤖 Android successfully released!\n\n", default_payloads: [], attachment_properties: { fields: [ diff --git a/example/wallet/ios/fastlane/Fastfile b/example/wallet/ios/fastlane/Fastfile index c645abfe..1c626f22 100644 --- a/example/wallet/ios/fastlane/Fastfile +++ b/example/wallet/ios/fastlane/Fastfile @@ -120,7 +120,7 @@ platform :ios do ) slack( - message: "🔐 Web3Wallet Flutter #{options[:app_version]}-#{_flavor} (#{new_build_number}) for 🍎 iOS successfully released!\n\n", + message: "🔐 Flutter Wallet #{options[:app_version]}-#{_flavor} (#{new_build_number}) for 🍎 iOS successfully released!\n\n", default_payloads: [], attachment_properties: { fields: [ diff --git a/example/wallet/macos/Runner/Configs/AppInfo.xcconfig b/example/wallet/macos/Runner/Configs/AppInfo.xcconfig index da803111..f095b4a5 100644 --- a/example/wallet/macos/Runner/Configs/AppInfo.xcconfig +++ b/example/wallet/macos/Runner/Configs/AppInfo.xcconfig @@ -5,7 +5,7 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = Web3Wallet +PRODUCT_NAME = Flutter Wallet // The application's bundle identifier PRODUCT_BUNDLE_IDENTIFIER = com.example.wallet From be4e0b423ef68cf67cedb381beda613db21ca434 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Sat, 10 Aug 2024 19:16:19 +0200 Subject: [PATCH 22/27] fixes --- example/dapp/ios/Podfile.lock | 7 + example/dapp/lib/utils/crypto/eip155.dart | 1 - .../Flutter/GeneratedPluginRegistrant.swift | 2 + example/dapp/pubspec.yaml | 6 +- .../flutter/generated_plugin_registrant.cc | 3 + .../windows/flutter/generated_plugins.cmake | 1 + lib/apis/sign_api/i_sign_client.dart | 1 - lib/apis/sign_api/i_sign_engine_app.dart | 1 - lib/apis/sign_api/sign_client.dart | 6 +- lib/apis/sign_api/sign_engine.dart | 52 ++++--- .../sign_api/utils/custom_credentials.dart | 140 +++++++++--------- lib/apis/web3app/web3app.dart | 4 +- .../utils/sign_client_test_wrapper.dart | 6 +- 13 files changed, 126 insertions(+), 104 deletions(-) diff --git a/example/dapp/ios/Podfile.lock b/example/dapp/ios/Podfile.lock index 8279be30..d0b23efb 100644 --- a/example/dapp/ios/Podfile.lock +++ b/example/dapp/ios/Podfile.lock @@ -1,6 +1,9 @@ PODS: - appcheck (1.0.3): - Flutter + - connectivity_plus (0.0.1): + - Flutter + - FlutterMacOS - Flutter (1.0.0) - flutter_keyboard_visibility (0.0.1): - Flutter @@ -14,6 +17,7 @@ PODS: DEPENDENCIES: - appcheck (from `.symlinks/plugins/appcheck/ios`) + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`) - Flutter (from `Flutter`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) @@ -23,6 +27,8 @@ DEPENDENCIES: EXTERNAL SOURCES: appcheck: :path: ".symlinks/plugins/appcheck/ios" + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/darwin" Flutter: :path: Flutter flutter_keyboard_visibility: @@ -36,6 +42,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629 + connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c diff --git a/example/dapp/lib/utils/crypto/eip155.dart b/example/dapp/lib/utils/crypto/eip155.dart index 6114c974..29b358c1 100644 --- a/example/dapp/lib/utils/crypto/eip155.dart +++ b/example/dapp/lib/utils/crypto/eip155.dart @@ -129,7 +129,6 @@ class EIP155 { return web3App.requestWriteContract( topic: topic, chainId: sepolia.chainId, - rpcUrl: sepolia.rpc.first, deployedContract: deployedContract, functionName: 'transfer', transaction: Transaction( diff --git a/example/dapp/macos/Flutter/GeneratedPluginRegistrant.swift b/example/dapp/macos/Flutter/GeneratedPluginRegistrant.swift index cc667fc0..a4e08b1e 100644 --- a/example/dapp/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/dapp/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,11 +5,13 @@ import FlutterMacOS import Foundation +import connectivity_plus import package_info_plus import shared_preferences_foundation import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/example/dapp/pubspec.yaml b/example/dapp/pubspec.yaml index 2567c40c..5c60bea9 100644 --- a/example/dapp/pubspec.yaml +++ b/example/dapp/pubspec.yaml @@ -20,8 +20,10 @@ dependencies: # intl: ^0.19.0 package_info_plus: ^7.0.0 walletconnect_modal_flutter: ^2.1.20 - # walletconnect_flutter_v2: - # path: ../.. + +dependency_overrides: + walletconnect_flutter_v2: + path: ../.. dev_dependencies: flutter_test: diff --git a/example/dapp/windows/flutter/generated_plugin_registrant.cc b/example/dapp/windows/flutter/generated_plugin_registrant.cc index 4f788487..5777988d 100644 --- a/example/dapp/windows/flutter/generated_plugin_registrant.cc +++ b/example/dapp/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,12 @@ #include "generated_plugin_registrant.h" +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { + ConnectivityPlusWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/example/dapp/windows/flutter/generated_plugins.cmake b/example/dapp/windows/flutter/generated_plugins.cmake index 88b22e5c..31032063 100644 --- a/example/dapp/windows/flutter/generated_plugins.cmake +++ b/example/dapp/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + connectivity_plus url_launcher_windows ) diff --git a/lib/apis/sign_api/i_sign_client.dart b/lib/apis/sign_api/i_sign_client.dart index b0dc519a..3aa30669 100644 --- a/lib/apis/sign_api/i_sign_client.dart +++ b/lib/apis/sign_api/i_sign_client.dart @@ -104,7 +104,6 @@ abstract class ISignClient { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, diff --git a/lib/apis/sign_api/i_sign_engine_app.dart b/lib/apis/sign_api/i_sign_engine_app.dart index 05b1ffe8..ccfa481c 100644 --- a/lib/apis/sign_api/i_sign_engine_app.dart +++ b/lib/apis/sign_api/i_sign_engine_app.dart @@ -33,7 +33,6 @@ abstract class ISignEngineApp extends ISignEngineCommon { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, diff --git a/lib/apis/sign_api/sign_client.dart b/lib/apis/sign_api/sign_client.dart index fba5a520..4ddab595 100644 --- a/lib/apis/sign_api/sign_client.dart +++ b/lib/apis/sign_api/sign_client.dart @@ -293,7 +293,7 @@ class SignClient implements ISignClient { required String functionName, required String rpcUrl, EthereumAddress? sender, - List parameters = const [], + List parameters = const [], }) async { try { return await engine.requestReadContract( @@ -312,18 +312,16 @@ class SignClient implements ISignClient { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, - String? method, List parameters = const [], + String? method, }) async { try { return await engine.requestWriteContract( topic: topic, chainId: chainId, - rpcUrl: rpcUrl, deployedContract: deployedContract, functionName: functionName, transaction: transaction, diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index 5bbe1078..a20ae5c3 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -6,7 +6,6 @@ import 'package:http/http.dart' as http; import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils.dart'; import 'package:walletconnect_flutter_v2/apis/core/store/i_generic_store.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/i_sessions.dart'; -import 'package:walletconnect_flutter_v2/apis/sign_api/utils/custom_credentials.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/utils/sign_api_validator_utils.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart'; @@ -525,6 +524,30 @@ class SignEngine implements ISignEngine { EthereumAddress? sender, List parameters = const [], }) async { + // final contractAddress = deployedContract.address; + // final function = deployedContract.function(functionName); + + // final results = await request( + // topic: topic, + // chainId: chainId, + // request: SessionRequestParams( + // method: 'eth_call', + // params: [ + // { + // 'to': contractAddress.hex, + // 'data': bytesToHex( + // function.encodeCall(parameters), + // include0x: true, + // padToEvenLength: true, + // ), + // if (sender != null) 'from': sender.hex, + // } + // ], + // ), + // ); + + // return function.decodeReturnValues(results); + try { final results = await Web3Client(rpcUrl, http.Client()).call( sender: sender, @@ -543,27 +566,20 @@ class SignEngine implements ISignEngine { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, - String? method, List parameters = const [], + String? method, }) async { if (transaction.from == null) { throw Exception('Transaction must include `from` value'); } - final credentials = CustomCredentials( - signEngine: this, - topic: topic, - chainId: chainId, - address: transaction.from!, - method: method, - ); + final trx = Transaction.callContract( contract: deployedContract, function: deployedContract.function(functionName), - from: credentials.address, + from: transaction.from!, value: transaction.value, maxGas: transaction.maxGas, gasPrice: transaction.gasPrice, @@ -573,13 +589,13 @@ class SignEngine implements ISignEngine { parameters: parameters, ); - if (chainId.contains(':')) { - chainId = chainId.split(':').last; - } - return await Web3Client(rpcUrl, http.Client()).sendTransaction( - credentials, - trx, - chainId: int.parse(chainId), + return await request( + topic: topic, + chainId: chainId, + request: SessionRequestParams( + method: method ?? MethodsConstants.ethSendTransaction, + params: [trx.toJson()], + ), ); } diff --git a/lib/apis/sign_api/utils/custom_credentials.dart b/lib/apis/sign_api/utils/custom_credentials.dart index 1db2c80e..c78fb6e2 100644 --- a/lib/apis/sign_api/utils/custom_credentials.dart +++ b/lib/apis/sign_api/utils/custom_credentials.dart @@ -1,80 +1,80 @@ -import 'dart:convert'; -import 'dart:typed_data'; +// import 'dart:convert'; +// import 'dart:typed_data'; -import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; -import 'package:web3dart/crypto.dart' as crypto; +// import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; +// import 'package:web3dart/crypto.dart' as crypto; -class CustomCredentials extends CustomTransactionSender { - CustomCredentials({ - required ISignEngine signEngine, - required String topic, - required String chainId, - required EthereumAddress address, - String? method, - }) : _signEngine = signEngine, - _topic = topic, - _chainId = chainId, - _address = address, - _method = method; +// class CustomCredentials extends CustomTransactionSender { +// CustomCredentials({ +// required ISignEngine signEngine, +// required String topic, +// required String chainId, +// required EthereumAddress address, +// String? method, +// }) : _signEngine = signEngine, +// _topic = topic, +// _chainId = chainId, +// _address = address, +// _method = method; - final ISignEngine _signEngine; - final String _topic; - final String _chainId; - final EthereumAddress _address; - final String? _method; +// final ISignEngine _signEngine; +// final String _topic; +// final String _chainId; +// final EthereumAddress _address; +// final String? _method; - @override - EthereumAddress get address => _address; +// @override +// EthereumAddress get address => _address; - @override - Future sendTransaction(Transaction transaction) async { - final result = await _sendTransaction(transaction); - if (result is Map) { - return jsonEncode(result); - } - return result.toString(); - } +// @override +// Future sendTransaction(Transaction transaction) async { +// final result = await _sendTransaction(transaction); +// if (result is Map) { +// return jsonEncode(result); +// } +// return result.toString(); +// } - Future _sendTransaction(Transaction transaction) async { - final sessionRequestParams = SessionRequestParams( - method: _method ?? MethodsConstants.ethSendTransaction, - params: [ - transaction.toJson(), - ], - ); +// Future _sendTransaction(Transaction transaction) async { +// final sessionRequestParams = SessionRequestParams( +// method: _method ?? MethodsConstants.ethSendTransaction, +// params: [ +// transaction.toJson(), +// ], +// ); - final result = await _signEngine.request( - topic: _topic, - chainId: _chainId, - request: sessionRequestParams, - ); - return result; - } +// final result = await _signEngine.request( +// topic: _topic, +// chainId: _chainId, +// request: sessionRequestParams, +// ); +// return result; +// } - @override - Future extractAddress() => Future.value(_address); +// @override +// Future extractAddress() => Future.value(_address); - @override - Future signToSignature( - Uint8List payload, { - int? chainId, - bool isEIP1559 = false, - }) { - final signature = signToEcSignature( - payload, - chainId: chainId, - isEIP1559: isEIP1559, - ); - return Future.value(signature); - } +// @override +// Future signToSignature( +// Uint8List payload, { +// int? chainId, +// bool isEIP1559 = false, +// }) { +// final signature = signToEcSignature( +// payload, +// chainId: chainId, +// isEIP1559: isEIP1559, +// ); +// return Future.value(signature); +// } - @override - crypto.MsgSignature signToEcSignature( - Uint8List payload, { - int? chainId, - bool isEIP1559 = false, - }) { - // TODO: implement signToEcSignature - throw UnimplementedError(); - } -} +// @override +// crypto.MsgSignature signToEcSignature( +// Uint8List payload, { +// int? chainId, +// bool isEIP1559 = false, +// }) { +// // TODO: implement signToEcSignature +// throw UnimplementedError(); +// } +// } diff --git a/lib/apis/web3app/web3app.dart b/lib/apis/web3app/web3app.dart index a0523310..a9bdd506 100644 --- a/lib/apis/web3app/web3app.dart +++ b/lib/apis/web3app/web3app.dart @@ -228,7 +228,7 @@ class Web3App implements IWeb3App { required String functionName, required String rpcUrl, EthereumAddress? sender, - List parameters = const [], + List parameters = const [], }) async { try { return await signEngine.requestReadContract( @@ -247,7 +247,6 @@ class Web3App implements IWeb3App { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, @@ -258,7 +257,6 @@ class Web3App implements IWeb3App { return await signEngine.requestWriteContract( topic: topic, chainId: chainId, - rpcUrl: rpcUrl, deployedContract: deployedContract, functionName: functionName, transaction: transaction, diff --git a/test/sign_api/utils/sign_client_test_wrapper.dart b/test/sign_api/utils/sign_client_test_wrapper.dart index cc8074ef..a83d5812 100644 --- a/test/sign_api/utils/sign_client_test_wrapper.dart +++ b/test/sign_api/utils/sign_client_test_wrapper.dart @@ -224,7 +224,7 @@ class SignClientTestWrapper implements ISignEngine { required String functionName, required String rpcUrl, EthereumAddress? sender, - List parameters = const [], + List parameters = const [], }) async { try { return await client.requestReadContract( @@ -243,18 +243,16 @@ class SignClientTestWrapper implements ISignEngine { Future requestWriteContract({ required String topic, required String chainId, - required String rpcUrl, required DeployedContract deployedContract, required String functionName, required Transaction transaction, String? method, - List parameters = const [], + List parameters = const [], }) async { try { return await client.requestWriteContract( topic: topic, chainId: chainId, - rpcUrl: rpcUrl, deployedContract: deployedContract, functionName: functionName, transaction: transaction, From 0090cb4410280c438eea657ebace0901ebf00fca Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Sat, 10 Aug 2024 19:27:58 +0200 Subject: [PATCH 23/27] increased timeout on pairing test --- test/core_api/pairing_test.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/core_api/pairing_test.dart b/test/core_api/pairing_test.dart index 219f37a4..25394894 100644 --- a/test/core_api/pairing_test.dart +++ b/test/core_api/pairing_test.dart @@ -1,3 +1,5 @@ +@Timeout(Duration(seconds: 45)) + import 'dart:async'; import 'package:flutter_test/flutter_test.dart'; From 7491930a4692202886dd1d2894205cdec3702210 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 12 Aug 2024 11:30:33 +0200 Subject: [PATCH 24/27] fixed EIP55 verification --- example/wallet/lib/pages/settings_page.dart | 7 +++++-- lib/apis/sign_api/sign_engine.dart | 10 ++++------ lib/apis/sign_api/utils/auth/address_utils.dart | 8 ++++++++ lib/apis/sign_api/utils/auth/auth_signature.dart | 3 +++ lib/apis/utils/extensions.dart | 4 ++-- test/core_api/pairing_test.dart | 12 ++++++------ 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/example/wallet/lib/pages/settings_page.dart b/example/wallet/lib/pages/settings_page.dart index 3414d80b..b3e77ce6 100644 --- a/example/wallet/lib/pages/settings_page.dart +++ b/example/wallet/lib/pages/settings_page.dart @@ -616,8 +616,11 @@ class __DataContainerState extends State<_DataContainer> { ], ), ImageFiltered( - imageFilter: - ImageFilter.blur(sigmaX: blurValue, sigmaY: blurValue), + imageFilter: ImageFilter.blur( + sigmaX: blurValue, + sigmaY: blurValue, + tileMode: TileMode.decal, + ), child: Text( widget.data, style: const TextStyle( diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index a20ae5c3..b550e874 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -1885,11 +1885,10 @@ class SignEngine implements ISignEngine { ); final walletAddress = AddressUtils.getDidAddress(payload.iss); - final ethAddress = EthereumAddress.fromHex(walletAddress); final chainId = AddressUtils.getDidChainId(payload.iss); final isValid = await AuthSignature.verifySignature( - ethAddress.hexEip55, + walletAddress.toEIP55(), reconstructed, signature, chainId, @@ -1908,7 +1907,6 @@ class SignEngine implements ISignEngine { final header = '${cacaoPayload.domain} wants you to sign in with your Ethereum account:'; final walletAddress = AddressUtils.getDidAddress(iss); - final ethAddress = EthereumAddress.fromHex(walletAddress); if (cacaoPayload.aud.isEmpty) { throw WalletConnectError(code: -1, message: 'aud is required'); @@ -1945,7 +1943,7 @@ class SignEngine implements ISignEngine { final message = [ header, - ethAddress.hexEip55, + walletAddress.toEIP55(), '', statement, '', @@ -2406,7 +2404,7 @@ class SignEngine implements ISignEngine { final parsedAddress = AddressUtils.getDidAddress(payload.iss); for (var chain in approvedChains.toSet()) { - approvedAccounts.add('$chain:$parsedAddress'); + approvedAccounts.add('$chain:${parsedAddress.toEIP55()}'); } } } on WalletConnectError catch (e) { @@ -2605,7 +2603,7 @@ class SignEngine implements ISignEngine { final parsedAddress = AddressUtils.getDidAddress(payload.iss); for (var chain in approvedChains.toSet()) { - approvedAccounts.add('$chain:$parsedAddress'); + approvedAccounts.add('$chain:${parsedAddress.toEIP55()}'); } } diff --git a/lib/apis/sign_api/utils/auth/address_utils.dart b/lib/apis/sign_api/utils/auth/address_utils.dart index 77acd45e..ad6509e4 100644 --- a/lib/apis/sign_api/utils/auth/address_utils.dart +++ b/lib/apis/sign_api/utils/auth/address_utils.dart @@ -1,3 +1,5 @@ +import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; + class AddressUtils { static String getDidAddress(String iss) { return iss.split(':').last; @@ -11,3 +13,9 @@ class AddressUtils { return iss.substring(iss.indexOf(RegExp(r':')) + 1); } } + +extension AddressUtilsExtension on String { + String toEIP55() { + return EthereumAddress.fromHex(this).hexEip55; + } +} diff --git a/lib/apis/sign_api/utils/auth/auth_signature.dart b/lib/apis/sign_api/utils/auth/auth_signature.dart index bdd7ea50..826a105e 100644 --- a/lib/apis/sign_api/utils/auth/auth_signature.dart +++ b/lib/apis/sign_api/utils/auth/auth_signature.dart @@ -8,6 +8,7 @@ import 'package:walletconnect_flutter_v2/apis/core/pairing/utils/json_rpc_utils. import 'package:walletconnect_flutter_v2/apis/models/basic_models.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/session_auth_models.dart'; +import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/address_utils.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/auth_constants.dart'; import 'package:walletconnect_flutter_v2/apis/sign_api/utils/auth/recaps_utils.dart'; import 'package:web3dart/crypto.dart' as crypto; @@ -199,6 +200,8 @@ class AuthSignature { if (!iss.contains('did:pkh:')) { iss = 'did:pkh:$iss'; } + final address = AddressUtils.getDidAddress(iss); + iss = iss.replaceAll(address, address.toEIP55()); return Cacao( h: const CacaoHeader(t: CacaoHeader.CAIP122), p: CacaoPayload.fromRequestPayload( diff --git a/lib/apis/utils/extensions.dart b/lib/apis/utils/extensions.dart index b9e04156..0d4c466c 100644 --- a/lib/apis/utils/extensions.dart +++ b/lib/apis/utils/extensions.dart @@ -7,8 +7,8 @@ import 'package:web3dart/crypto.dart' as crypto; extension TransactionExtension on Transaction { Map toJson() { return { - if (from != null) 'from': from!.hex, - if (to != null) 'to': to!.hex, + if (from != null) 'from': from!.hexEip55, + if (to != null) 'to': to!.hexEip55, if (maxGas != null) 'gas': '0x${maxGas!.toRadixString(16)}', if (gasPrice != null) 'gasPrice': '0x${gasPrice!.getInWei.toRadixString(16)}', diff --git a/test/core_api/pairing_test.dart b/test/core_api/pairing_test.dart index 219f37a4..e366dc2c 100644 --- a/test/core_api/pairing_test.dart +++ b/test/core_api/pairing_test.dart @@ -265,18 +265,18 @@ void main() { }); test('clients can ping each other', () async { - final CreateResponse response = await coreA.pairing.create(); - // await coreB.pairing.pair(uri: response.uri); + // TODO more logs to check any fails in the future. + final pairingInfo = await coreA.pairing.create(); - Completer completer = Completer(); + final completer = Completer(); coreB.pairing.onPairingPing.subscribe((args) { expect(args != null, true); completer.complete(); }); + await coreB.pairing.pair(uri: pairingInfo.uri, activatePairing: true); - await coreB.pairing.pair(uri: response.uri, activatePairing: true); - await coreA.pairing.activate(topic: response.topic); - await coreA.pairing.ping(topic: response.topic); + await coreA.pairing.activate(topic: pairingInfo.topic); + await coreA.pairing.ping(topic: pairingInfo.topic); await completer.future; }); From dc25aa2b23d323feb27d1356d3f8d267c6f2521d Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 12 Aug 2024 12:18:32 +0200 Subject: [PATCH 25/27] minor change --- lib/apis/sign_api/sign_engine.dart | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index b550e874..05a61f6a 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -524,30 +524,6 @@ class SignEngine implements ISignEngine { EthereumAddress? sender, List parameters = const [], }) async { - // final contractAddress = deployedContract.address; - // final function = deployedContract.function(functionName); - - // final results = await request( - // topic: topic, - // chainId: chainId, - // request: SessionRequestParams( - // method: 'eth_call', - // params: [ - // { - // 'to': contractAddress.hex, - // 'data': bytesToHex( - // function.encodeCall(parameters), - // include0x: true, - // padToEvenLength: true, - // ), - // if (sender != null) 'from': sender.hex, - // } - // ], - // ), - // ); - - // return function.decodeReturnValues(results); - try { final results = await Web3Client(rpcUrl, http.Client()).call( sender: sender, From 2f205f6f25c0cafb0a582d325238a12bd7de451d Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 12 Aug 2024 12:24:28 +0200 Subject: [PATCH 26/27] removed custom_credentials --- .../sign_api/utils/custom_credentials.dart | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 lib/apis/sign_api/utils/custom_credentials.dart diff --git a/lib/apis/sign_api/utils/custom_credentials.dart b/lib/apis/sign_api/utils/custom_credentials.dart deleted file mode 100644 index c78fb6e2..00000000 --- a/lib/apis/sign_api/utils/custom_credentials.dart +++ /dev/null @@ -1,80 +0,0 @@ -// import 'dart:convert'; -// import 'dart:typed_data'; - -// import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; -// import 'package:web3dart/crypto.dart' as crypto; - -// class CustomCredentials extends CustomTransactionSender { -// CustomCredentials({ -// required ISignEngine signEngine, -// required String topic, -// required String chainId, -// required EthereumAddress address, -// String? method, -// }) : _signEngine = signEngine, -// _topic = topic, -// _chainId = chainId, -// _address = address, -// _method = method; - -// final ISignEngine _signEngine; -// final String _topic; -// final String _chainId; -// final EthereumAddress _address; -// final String? _method; - -// @override -// EthereumAddress get address => _address; - -// @override -// Future sendTransaction(Transaction transaction) async { -// final result = await _sendTransaction(transaction); -// if (result is Map) { -// return jsonEncode(result); -// } -// return result.toString(); -// } - -// Future _sendTransaction(Transaction transaction) async { -// final sessionRequestParams = SessionRequestParams( -// method: _method ?? MethodsConstants.ethSendTransaction, -// params: [ -// transaction.toJson(), -// ], -// ); - -// final result = await _signEngine.request( -// topic: _topic, -// chainId: _chainId, -// request: sessionRequestParams, -// ); -// return result; -// } - -// @override -// Future extractAddress() => Future.value(_address); - -// @override -// Future signToSignature( -// Uint8List payload, { -// int? chainId, -// bool isEIP1559 = false, -// }) { -// final signature = signToEcSignature( -// payload, -// chainId: chainId, -// isEIP1559: isEIP1559, -// ); -// return Future.value(signature); -// } - -// @override -// crypto.MsgSignature signToEcSignature( -// Uint8List payload, { -// int? chainId, -// bool isEIP1559 = false, -// }) { -// // TODO: implement signToEcSignature -// throw UnimplementedError(); -// } -// } From 7039c0f5a14ed8c811db85a7e120e6b383354709 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Mon, 12 Aug 2024 15:59:42 +0200 Subject: [PATCH 27/27] version up --- CHANGELOG.md | 2 +- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 920c1d54..936ea0d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.3.1-beta02 +## 2.3.1 - Added Connectivity check to core and throw exceptions when internet connection is gone - Fix for https://github.com/WalletConnect/WalletConnectFlutterV2/issues/303 (EIP-55 validation for SIWE) diff --git a/lib/src/version.dart b/lib/src/version.dart index d9d891dc..ea3a9755 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '2.3.1-beta02'; +const packageVersion = '2.3.1'; diff --git a/pubspec.yaml b/pubspec.yaml index c5e7b410..71ac1658 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: walletconnect_flutter_v2 description: WalletConnect's official Dart library v2 for WalletKit and AppKit. The communications protocol for web3. -version: 2.3.1-beta02 +version: 2.3.1 repository: https://github.com/WalletConnect/WalletConnectFlutterV2 environment: