<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Margarita Manzanera</title>
    <description>The latest articles on DEV Community by Margarita Manzanera (@margarita_manzanera).</description>
    <link>https://dev.to/margarita_manzanera</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F907181%2Ff3c32936-2e0f-4a35-aacd-a45b5de46367.jpg</url>
      <title>DEV Community: Margarita Manzanera</title>
      <link>https://dev.to/margarita_manzanera</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/margarita_manzanera"/>
    <language>en</language>
    <item>
      <title>Start building secure dApps with Archethic Wallet’s communication protocol</title>
      <dc:creator>Margarita Manzanera</dc:creator>
      <pubDate>Tue, 18 Apr 2023 12:22:29 +0000</pubDate>
      <link>https://dev.to/margarita_manzanera/start-building-secure-dapps-with-archethic-wallets-communication-protocol-4pge</link>
      <guid>https://dev.to/margarita_manzanera/start-building-secure-dapps-with-archethic-wallets-communication-protocol-4pge</guid>
      <description>&lt;p&gt;In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Point of view on usage
&lt;/h2&gt;

&lt;p&gt;When a dApp wants to perform a transaction that requires the use of private keys, it must call on the user’s wallet to protect this information and avoid unauthorized exposure. There are several ways to do this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The dApp can solicit the wallet in a “covert” manner without requiring the user’s intervention. For example, it can retrieve information about the current account or services available in the decentralized wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N2s7qgo4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jts321wcfij9ng9pqf7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N2s7qgo4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jts321wcfij9ng9pqf7v.png" alt="Image description" width="800" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The dApp can also listen to the wallet and adapt itself according to the actions performed in it. For example, a change in the current account in the wallet may result in a change in the current account in the dApp.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VGie5ErH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9plt3f57ceziesnpeprb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VGie5ErH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9plt3f57ceziesnpeprb.png" alt="Image description" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finally, the dApp can solicit the wallet and ask the user to confirm an action. For example, this could be the signing of a transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---2aYM_Zd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ca1p3fy1vgdmms4oa2fb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---2aYM_Zd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ca1p3fy1vgdmms4oa2fb.png" alt="Image description" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical point of view
&lt;/h2&gt;

&lt;p&gt;In order not to limit the platforms, Archethic has implemented two protocols to allow an easy integration of its wallet with dApps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For Desktop and Web Client platforms, Archethic uses the Local RPC server protocol. A WebSocket server is provided by Archethic Wallet, using the JSON-RPC 2.0 protocol. DApp developers can use the Dart or JS coded communication libraries provided by Archethic to easily integrate this functionality into their dApp.&lt;/li&gt;
&lt;li&gt;For Mobile platforms, Archethic uses DeepLinks via an HTTPS URL to enable communication between the dApp and the Archethic wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the Dart and Flutter part, these protocols have been implemented within the “Archethic Wallet Client” (AWC) communication library, which therefore allows Dapps to communicate with the Archethic wallet through a unified interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dlV4bNEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwnkvenpbpgyb82y5eii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dlV4bNEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwnkvenpbpgyb82y5eii.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AWC supports several API methods, including signing and sending transactions to the Archethic blockchain, retrieving the wallet’s endpoint URL, retrieving accounts available on the wallet, adding services to the keychain, and more.&lt;/p&gt;

&lt;p&gt;Using AWC allows Dapps developers to focus on developing their application rather than managing communication with the wallet and blockchain. The solution is also cross-platform (macOS, iOS, Android, Web, Windows, Linux), which facilitates the interaction between users and the blockchain and avoids forcing developers to develop their Dapps on a specific platform.&lt;/p&gt;

&lt;p&gt;It is worth noting that for the JS part, developers can find the interfaces directly in the “libjs” library of Archethic. This greatly facilitates the integration of the wallet with dApps written in JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qZVE1io2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e040nlm3trz34fs9xheq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qZVE1io2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e040nlm3trz34fs9xheq.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Available commands
&lt;/h2&gt;

&lt;p&gt;The wallet context related commands that &lt;strong&gt;do not require user confirmation&lt;/strong&gt; in the wallet are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint retrieval,&lt;/li&gt;
&lt;li&gt;Recovery of user accounts,&lt;/li&gt;
&lt;li&gt;Recovery of the current account,&lt;/li&gt;
&lt;li&gt;Recovery of the services contained in the decentralized wallet,&lt;/li&gt;
&lt;li&gt;Derivation of a key pair for a given service and index and recovery of the public key,&lt;/li&gt;
&lt;li&gt;Deriving an address for a given service and index.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The information that &lt;strong&gt;can be listened&lt;/strong&gt; to is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The change of balance or last address of the current account,&lt;/li&gt;
&lt;li&gt;The change of the current account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The commands related to the wallet context &lt;strong&gt;requiring the user’s confirmation&lt;/strong&gt; in the wallet are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Signing and sending a transaction to the blockchain,&lt;/li&gt;
&lt;li&gt;Signature of a list of transactions,&lt;/li&gt;
&lt;li&gt;Adding a service in the decentralized wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In conclusion
&lt;/h2&gt;

&lt;p&gt;The communication protocol developed by Archethic allows an easy and secure interaction between dApps and the blockchain by delegating the communication to the user’s wallet. The integration methods proposed are simple and efficient, especially thanks to the “Archethic Wallet Client” (AWC) communication library which facilitates the use of the API. Developers can focus on developing their application without having to manage communication with the wallet and the blockchain. This cross-platform solution is therefore a wise choice for developers who want to write dApps that are compatible with different platforms. Finally, the availability of interfaces in the “libjs” library also facilitates integration for developers of applications written in JavaScript.&lt;/p&gt;

&lt;p&gt;Find more information at the following links.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AEIP 4 / Specifications: &lt;a href="https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md"&gt;https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AWC Dart lib: &lt;a href="https://github.com/archethic-foundation/archethic-wallet-client-dart"&gt;https://github.com/archethic-foundation/archethic-wallet-client-dart&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AWC JS lib (into archethic JS lib): &lt;a href="https://github.com/archethic-foundation/libjs"&gt;https://github.com/archethic-foundation/libjs&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Author: Sylvain Séramy, Head of Front-End Department at Archethic Technologies&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>javascript</category>
      <category>github</category>
    </item>
    <item>
      <title>Archethic Wallet: User vs Developer Perspective</title>
      <dc:creator>Margarita Manzanera</dc:creator>
      <pubDate>Mon, 03 Oct 2022 20:48:17 +0000</pubDate>
      <link>https://dev.to/archethic/archethic-wallet-user-vs-developer-perspective-1pee</link>
      <guid>https://dev.to/archethic/archethic-wallet-user-vs-developer-perspective-1pee</guid>
      <description>&lt;h1&gt;
  
  
  What is the Archethic wallet?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No signup or KYC needed, users just control their services and access keychain, protected by different secure access methods like PIN Code, Password, YubiKey like devices and Biometrics.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are the features of the Archethic wallet?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The user's perspective 👩🏿
&lt;/h2&gt;

&lt;p&gt;Archethic Wallet has implemented the following features:&lt;/p&gt;

&lt;h4&gt;
  
  
  Main features
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Decentralized keychain management&lt;/li&gt;
&lt;li&gt;Multiple accounts' management&lt;/li&gt;
&lt;li&gt;Creation of Fungible Tokens&lt;/li&gt;
&lt;li&gt;Creation of NFTs&lt;/li&gt;
&lt;li&gt;Support for transactions (Sending and Receiving UCO Token, Fungible Tokens and NFTs)&lt;/li&gt;
&lt;li&gt;List of recent transactions&lt;/li&gt;
&lt;li&gt;List of acquired tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Security
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Security access with Password, PIN, Yubicloud OTP, Face ID, Touch ID, Uniris Biometrics (2023)&lt;/li&gt;
&lt;li&gt;Use of 24 Words Mnemonics&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Customization
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Support for English and French Language&lt;/li&gt;
&lt;li&gt;Support for multiple Currencies (view only, not meant as multiple cryptocurrencies wallet)&lt;/li&gt;
&lt;li&gt;Multi themes (9 themes available)&lt;/li&gt;
&lt;li&gt;UI customization&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Other features
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Local notifications&lt;/li&gt;
&lt;li&gt;Access to exchanges to buy ERC20 UCO&lt;/li&gt;
&lt;li&gt;Share address with QR Code or mobile share feature&lt;/li&gt;
&lt;li&gt;Address book&lt;/li&gt;
&lt;li&gt;UCO Price chart&lt;/li&gt;
&lt;li&gt;Access latest Archethic blog articles&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How is the Archethic wallet developed?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The developer's perspective 👨🏻‍💻
&lt;/h2&gt;

&lt;p&gt;We developed the wallet using &lt;strong&gt;Flutter&lt;/strong&gt; based on &lt;strong&gt;Dart&lt;/strong&gt; language.&lt;/p&gt;

&lt;p&gt;Flutter is an open-source mobile application development framework from Google. The main reason for its popularity is that it supports the creation of cross-platform applications. Flutter is also used to create interactive apps that run on web pages or on the desktop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxpqxrrhk1a6yy9x71en9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxpqxrrhk1a6yy9x71en9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Here are some of Flutter's features*
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Single code base for Android, iOS, Windows, Linux, macOS, Web, Extension:&lt;/strong&gt; This approach simplifies and reduces the development time, cost, and maintenance is also an easy task. The Flutter-based user interface can be installed virtually on any platform. It has its own rendering engine that allows developers to keep the UI as it is while moving to another platform. As a result, application users can enjoy an excellent native-like experience on various platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-source and made by Google:&lt;/strong&gt; Flutter is a popular choice among developers because of the huge community support. Google designed the Flutter framework with all the security issues of modern applications in mind. One can find reliable and well-tested plugins in Flutter to mitigate security risks such as user authentication flaws, malicious code injections and data leaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dart Programming:&lt;/strong&gt; Flutter uses an easy to learn and implement programming language called Dart, which is Google's general purpose programming language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt; As a cross-platform framework, Flutter offers unmatched performance compared to its competitors. Flutter compiles designs to native code. Unlike React Native, Flutter renders widgets directly from the native library rather than downloading libraries and components to the device before rendering.&lt;/p&gt;

&lt;p&gt;*Source: &lt;a href="https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/" rel="noopener noreferrer"&gt;https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  On which platforms is the application available?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejctxjfpeiccoyuylxu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejctxjfpeiccoyuylxu7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How to install the application and secure your funds?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The user's perspective 👩
&lt;/h2&gt;

&lt;p&gt;You can now download our wallet on the Google Play Store in beta for the Android mobile version and via the official website of Archethic for the macOs version (&lt;a href="https://www.archethic.net/aewallet.html" rel="noopener noreferrer"&gt;https://www.archethic.net/aewallet.html&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;During the onboarding process, a screen invites you to create a new wallet or to restore a wallet you already own, from a series of 24 words (seed phrase).&lt;/p&gt;

&lt;p&gt;In the case of a new wallet, a series of 24 words (seed phrase) is proposed in English or French. This allows you to generate your private and public keys for your wallet. These words are currently the only way to recover your funds in case of loss of your mobile or uninstallation of the wallet. It is therefore essential to keep this seed phrase hidden from view and on some medium other than your devices.&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Remember that Archethic will never ask you for your 24 words series.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the seed phrase is saved, you can fully enjoy your wallet.&lt;/p&gt;

&lt;p&gt;In the case of a wallet restoration, you just have to enter the 24 words of your seed phrase in the right order and the application will find your keychain and associated accounts, from the information stored on the blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The developer's perspective 👨‍💻
&lt;/h2&gt;

&lt;p&gt;When the wallet is created, a seed is randomly created from a cryptographically secure random number generator provided by Dart.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static String generateSeed() {
    String result = '';
    const String chars = 'abcdef0123456789';
    final Random rng = Random.secure();
    for (int i = 0; i &amp;lt; 64; i++) {
      result += chars[rng.nextInt(chars.length)];
    }
    return result.toUpperCase();
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to make the seed more accessible, BIP39 is used and aims to provide a method of simplifying the reading of the seed using a series of mnemonic words. BIP39 takes random words (usually from the English language, although they can be from another language) and creates a long phrase with them, usually 12 to 24 words. In the case of the Archethic wallet, we use 24 words because the higher the number of words, the greater the entropy and security attributable to the resulting sentence. These words are chosen from a dictionary of 2048 words. The flutter library &lt;a href="https://pub.dev/packages/bip39_mnemonic" rel="noopener noreferrer"&gt;bip39_mnemonic&lt;/a&gt; is thus used with English and French dictionaries.&lt;/p&gt;

&lt;p&gt;In the case of wallet restoration, the library &lt;a href="https://pub.dev/packages/bip39_mnemonic" rel="noopener noreferrer"&gt;bip39_mnemonic&lt;/a&gt; allows to find the seed from the seed phrase.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to secure the application?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The user's perspective 👨🏾‍🦱
&lt;/h2&gt;

&lt;p&gt;Access to the application and interactions with the blockchain are secured so that certain actions are not done beyond the user's control.&lt;/p&gt;

&lt;p&gt;Following are the ways to access:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;by &lt;strong&gt;PIN code&lt;/strong&gt;, comprising of 6 digits, with the possibility to mix the numbers of the keyboard to reduce the risks of access to your code by observation,&lt;/li&gt;
&lt;li&gt;by &lt;strong&gt;password&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;by using a &lt;strong&gt;YubiKey&lt;/strong&gt;, it is an electronic authentication device to secure your access. Whether you are using NFC with your mobile or USB on your desktop, you can identify yourself with this key,&lt;/li&gt;
&lt;li&gt;by the &lt;strong&gt;touch ID or face ID system&lt;/strong&gt;, depends on the capabilities of your device.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqwd837f2e0ex8qsi9qd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqwd837f2e0ex8qsi9qd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The developer's perspective 👩🏽‍💻
&lt;/h2&gt;

&lt;p&gt;In the case of &lt;strong&gt;PIN&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt;, authentication information is stored locally (see "What data is stored in my device?").&lt;br&gt;
In the case of &lt;strong&gt;touch ID&lt;/strong&gt; or &lt;strong&gt;Face ID&lt;/strong&gt;, the Flutter &lt;a href="https://pub.dev/packages/local_auth" rel="noopener noreferrer"&gt;Local Auth&lt;/a&gt; library provides the means to authenticate on devices supporting fingerprint or facial recognition authentication.&lt;/p&gt;

&lt;p&gt;Finally, for &lt;strong&gt;OTP&lt;/strong&gt; via &lt;a href="https://www.yubico.com/products/services-software/yubicloud" rel="noopener noreferrer"&gt;Yubicloud&lt;/a&gt;: Yubico OTP is a simple yet strong authentication mechanism that is supported by all YubiKeys out of the box. Yubico OTP can be used as the second factor in a 2-factor authentication scheme or on its own, providing 1-factor authentication. YubiCloud is the name of Yubico’s web service for verifying OTPs. Before using YubiCloud, you need to get an API key from &lt;a href="https://upgrade.yubico.com/getapikey/" rel="noopener noreferrer"&gt;here&lt;/a&gt; - it is quick, free and helps us in preventing misuse of YubiCloud. &lt;br&gt;
I developed a &lt;a href="https://pub.dev/packages/yubidart" rel="noopener noreferrer"&gt;Yubico dart library&lt;/a&gt; for Dart/Flutter to interact with Yubicloud in my personal GitHub repository.&lt;/p&gt;
&lt;h1&gt;
  
  
  What data is stored in my device?
&lt;/h1&gt;
&lt;h2&gt;
  
  
  The user's perspective 👨
&lt;/h2&gt;

&lt;p&gt;We store a set of information so that the application is functional in both online and offline mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwayc909xsq886wvor4x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwayc909xsq886wvor4x.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first group of information represents the globally available user preferences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First Launch&lt;/strong&gt;: Allows to know if this is the first launch of the application in order to clear the keystore for iOS. Indeed, iOS key store is persistent, so if this is first launch then we will clear the keystore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentification Method&lt;/strong&gt;: Allows to know which authentication mode is used (PIN, password, YubiKey, biometrics).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Currency&lt;/strong&gt;: Allows you to know what currency is used in the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Language&lt;/strong&gt;: Allows you to know which language is used in the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Primary Setting&lt;/strong&gt;: Allows to know if the currency displayed in priority is Fiat or Crypto.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Network&lt;/strong&gt;: Allows to know if the wallet is connected to mainnet, testnet or to a local node whose endpoint is recorded in the following information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Network Endpoint&lt;/strong&gt;: Allows to know the address of the local node.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Theme&lt;/strong&gt;: Allows to know which theme is used in the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock&lt;/strong&gt;: Allows to know if it is necessary to authenticate at the launching of the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock Timeout&lt;/strong&gt;: Allows to know after how long the application requires authentication at its launch if the user has left the application open to browse for another one for example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin Pad Shuffle&lt;/strong&gt;: Allows you to determine whether the PIN code keyboard should be shuffled when entering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show Balances&lt;/strong&gt;: Allows you to determine if the financial information should be displayed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show Blog&lt;/strong&gt;: Allows you to know which blog articles should be displayed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show Price Chart&lt;/strong&gt;: Allows you to determine whether the graph and indicators of the UCO price chart should be displayed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active Vibrations&lt;/strong&gt;: Allows to know if at each action, a small vibration is emitted on the mobiles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active Notifications&lt;/strong&gt;: Allows to know if the notifications of reception of UCO are active or not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language Seed&lt;/strong&gt;: Allows to know if the seed phrase is composed of French or English words.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second group of information represents the sensitive elements related to security:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Seed&lt;/strong&gt;: Allows to store the wallet seed needed to perform transactions on the Archethic blockchain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PIN&lt;/strong&gt;: Allows to store the PIN code in case this authentication method has been chosen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt;: Allows to keep the password in case this authentication method has been chosen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yubicloud ID and API Key&lt;/strong&gt;: Allows to keep the authentication information for the management of the OTP with the YubiKey in case this authentication method has been chosen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This information is stored securely.&lt;/p&gt;

&lt;p&gt;And finally, a &lt;strong&gt;secure 256-bit (32 bytes) encryption key&lt;/strong&gt; to secure data on the disk.&lt;br&gt;
⚠️ &lt;strong&gt;Remember that Archethic will never pass on your data to a third party or use your data in any other way than that offered by the application.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The privacy policy is available on &lt;a href="https://www.archethic.net/aewallet-privacy.html" rel="noopener noreferrer"&gt;our website&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The developer's perspective 👨🏻‍💻
&lt;/h2&gt;

&lt;p&gt;In the case of user preference data, we made the choice to store it in a local database &lt;a href="https://pub.dev/packages/hive" rel="noopener noreferrer"&gt;Hive&lt;/a&gt; rather than the Flutter object &lt;a href="https://pub.dev/packages/shared_preferences" rel="noopener noreferrer"&gt;SharedPreferences&lt;/a&gt; for performance reasons. All the information is available in this &lt;a href="https://medium.com/flutter-community/using-hive-instead-of-sharedpreferences-for-storing-preferences-2d98c9db930f" rel="noopener noreferrer"&gt;medium article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These data are stored in clear text because they are not sensitive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the other hand, the information related to security management must be protected.&lt;/strong&gt; Here again, Hive is used but the stored values are encrypted. Hive provides a helper function to generate a secure encryption key using the &lt;a href="https://en.wikipedia.org/wiki/Fortuna_%28PRNG%29" rel="noopener noreferrer"&gt;Fortuna&lt;/a&gt; random number generator.&lt;br&gt;
The key is stored base 64 encoded in a secure space via the &lt;a href="https://pub.dev/packages/flutter_secure_storage" rel="noopener noreferrer"&gt;FlutterSecureStorage&lt;/a&gt; library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static Future&amp;lt;Vault&amp;gt; getInstance() async {
    try {
      const FlutterSecureStorage secureStorage = FlutterSecureStorage();
      final Uint8List encryptionKey;
      String? secureKey =
          await secureStorage.read(key: 'archethic_wallet_secure_key');
      if (secureKey == null || secureKey.isEmpty) {
        final List&amp;lt;int&amp;gt; key = Hive.generateSecureKey();
        encryptionKey = Uint8List.fromList(key);
        secureKey = base64UrlEncode(key);
        await secureStorage.write(
            key: 'archethic_wallet_secure_key', value: secureKey);
      } else {
        encryptionKey = base64Url.decode(secureKey);
      }
      final Box&amp;lt;dynamic&amp;gt; encryptedBox = await Hive.openBox&amp;lt;dynamic&amp;gt;(_vaultBox,
          encryptionCipher: HiveAesCipher(encryptionKey));
      return Vault._(encryptedBox);
    } catch (e) {
      throw Exception();
    }
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  How does the wallet interact with the Archethic blockchain?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6oue4kbkb3sduymraxb1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6oue4kbkb3sduymraxb1.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The developer's perspective 👩‍💻
&lt;/h2&gt;

&lt;p&gt;Based on the Archethic JS SDK, a &lt;strong&gt;SDK has been developed in dart&lt;/strong&gt; and is maintained by the Archethic teams in order to offer internal or community-developed Flutter DApps to interact with the Archethic Blockchain.&lt;/p&gt;

&lt;p&gt;This open-source SDK "&lt;a href="https://pub.dev/packages/archethic_lib_dart" rel="noopener noreferrer"&gt;archethic_lib_dart&lt;/a&gt;", available on &lt;a href="https://github.com/archethic-foundation/libdart" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, can be added as dependencies in Dart or Flutter projects via the Flutter libraries and packages sharing site &lt;a href="https://pub.dev/" rel="noopener noreferrer"&gt;Pub.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The available functions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cryptographic functions,&lt;/li&gt;
&lt;li&gt;Transaction building,&lt;/li&gt;
&lt;li&gt;Remote endpoint calls,&lt;/li&gt;
&lt;li&gt;Keychain / Wallet management,&lt;/li&gt;
&lt;li&gt;CoinGecko functions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the documentation is available in the &lt;a href="https://pub.dev/packages/archethic_lib_dart" rel="noopener noreferrer"&gt;readme of the library.&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Wallet timeline
&lt;/h1&gt;

&lt;p&gt;Some elements of the SDK and wallet history are shown here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70305aekrk6vycb8r3dv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70305aekrk6vycb8r3dv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  The author's perspective 👷
&lt;/h1&gt;

&lt;p&gt;Until now, the Archethic community has always been involved in the development of the wallet to improve both the technical aspects and the user experience. The wallet has the vocation to be accessible to all to simplify and secure the uses.&lt;/p&gt;

&lt;p&gt;You can follow or contribute to the development of the application via &lt;a href="https://github.com/archethic-foundation/archethic-wallet" rel="noopener noreferrer"&gt;the dedicated repository on GitHub&lt;/a&gt; or via the &lt;a href="https://www.archethic.net/aewallet.html" rel="noopener noreferrer"&gt;official page of the application&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;strong&gt;Author&lt;/strong&gt;: Sylvain Séramy, Head of Front-End Department at Archethic Technologies&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>webdev</category>
      <category>programming</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Self Healing Blockchains</title>
      <dc:creator>Margarita Manzanera</dc:creator>
      <pubDate>Mon, 19 Sep 2022 19:39:50 +0000</pubDate>
      <link>https://dev.to/archethic/self-healing-blockchains-24ce</link>
      <guid>https://dev.to/archethic/self-healing-blockchains-24ce</guid>
      <description>&lt;p&gt;The world is eagerly waiting for a next-generation, high-performance, permission-less blockchain and this blockchain should be able to industrially scale all decentralized applications. So far, the world/crypto community has witnessed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;P2P blockchain networks that use all the peers to validate transactions, do computation and storage. For example, Bitcoin, Ethereum … (Traditional Blockchains)&lt;/li&gt;
&lt;li&gt;P2P blockchain networks that shard transactions, computation, and storage. For example, Ethereum 2.0, Zilliqa … (Sharding Blockchains)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sharding mechanism in blockchain gives hope for an unlimited and sustainable scalability of blockchains. But many people in the blockchain space strongly believe that the scalability of the blockchain networks or the sharding mechanism has reached a tipping point. Not true! How?&lt;br&gt;
In this article, we will discuss the problems that plague sharding mechanisms in permission-less blockchain. And, how the self-healing mechanism is the only solution to this.&lt;/p&gt;




&lt;h1&gt;
  
  
  In the blockchain world, why do we need sharding?
&lt;/h1&gt;

&lt;p&gt;Currently, the internet is used in Payments, IoT, smart city, robotics, web search, streaming videos, e-commerce, autonomous vehicles, etc. Hence, the internet generates&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;over billion transactions per second (Transaction)&lt;/li&gt;
&lt;li&gt;over sextillion calculations per second (Computation)&lt;/li&gt;
&lt;li&gt;over 2.5 quintillion bytes of data per second (Storage)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This work needs to be harmoniously split among all the peers in a P2P network. This splitting of work is called the Sharding Technology. Sharding can be applied to transaction, computation, and storage.&lt;/p&gt;




&lt;h1&gt;
  
  
  Problems that plague Sharding Mechanism
&lt;/h1&gt;

&lt;p&gt;A permission-less P2P network is unpredictable and to compensate for this unpredictability, various blockchain protocols fix the number of validations and the number of storage copies to a constant that is derived from a mathematical computation based on certain assumptions. This limits the scalability of blockchains since the system will either over-compensate and limit scale or under-compensate and risk security/integrity.&lt;/p&gt;

&lt;p&gt;What if the P2P network can be predicted? Can the number of validation and number of storage peers be flexible depending on the chaoticity of the P2P network? That is to say, if the P2P network behaves ideally then only 1 validation and storage copy is needed and if the peers in the P2P network behave maliciously or deviate from the ideal nature, then the number of validation and storage copies will increase proportionally.&lt;/p&gt;

&lt;p&gt;Problems faced by peers/shard in the P2P network:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internet connection problems, electricity cuts, data loss, many more …&lt;/li&gt;
&lt;li&gt;Joining and leaving the network all the time throughout the globe.&lt;/li&gt;
&lt;li&gt;Data availability and data consistency problems&lt;/li&gt;
&lt;li&gt;If a peer/shard goes offline, the data belonging to that shard is lost forever.&lt;/li&gt;
&lt;li&gt;Peers/shard can turn malicious anytime&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The culprit here is the unpredictability of the P2P network! This unpredictability of P2P network decreases the performance of validation, computation, and storage. &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Self-Healing Blockchain
&lt;/h1&gt;

&lt;p&gt;Due to the uncertainty in the P2P network, the self-healing mechanism is introduced!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; (Traditional Blockchains) where all the N nodes in the network validate/compute/store all the transactions in the network. (N)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; (Ideal P2P) Consider an ideal P2P blockchain network where all the peers in the network are available 24×7, with good internet, bandwidth, electricity supply, etc. and are good peers (not malicious). Then any transaction/computation/storage that arrives to the network can be validated/computed/stored by 1 peer. (1)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 3:&lt;/strong&gt;(Sharded Blockchains) But the real P2P blockchain network is not so and hence a mathematical formula is derived based on the maximum possible deviation from the ideal P2P blockchain network and certain assumptions to set a fixed number like 22–600 peers to validate/compute/store depending on the blockchain protocol. (N/x)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 4:&lt;/strong&gt; (Self-Healing Blockchains) Cases 1, 2 and 3 are extreme scenarios as shown in the graph! The number of transactions/computation/storage should depend on the amount of deviation from the ideal state (with adequate safety margin). (N/x(c)) where c stands for chaoticity of the network.&lt;/p&gt;

&lt;p&gt;Chaoticity © of the network is a function of (internet bandwidth, electricity, data availability, data consistency, no of nodes joining or leaving). Any change in the function compared to the ideal state (whether positive or negative), the counter measures are deployed accordingly by the P2P network.&lt;/p&gt;

&lt;p&gt;Hence the network automatically heals if there is any stress in the network.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ppNq8ynv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p34b5xgvytkba7haqpvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ppNq8ynv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p34b5xgvytkba7haqpvd.png" alt="Image description" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Analogy to self-healing blockchains
&lt;/h1&gt;

&lt;p&gt;Let us take the example of Paris metro, where depending on the traffic of people, the metro trains change the timings, frequency, the number of compartments, and speed!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traditional: There will be a maximum number of metro trains, with maximum frequency, with maximum number of compartments and with maximum speed of the metro train all the time. (Lot of energy is wasted)&lt;/li&gt;
&lt;li&gt;Ideal: There will be a minimum number of metro trains, with minimum frequency, with minimum number of compartments and with minimum speed of the metro train all the time. (Takes a lot of time for people to commute)&lt;/li&gt;
&lt;li&gt;Sharded: The number of metro train, the frequency, number of compartments, speed of the metro train will be less than the maximum, but the numbers are fixed no matter the number of people who want to use the metro.&lt;/li&gt;
&lt;li&gt;Self-Healing: Depending on the no of people, peak hours from 7AM - 9AM and 4PM - 7PM, number of metros available, etc. … The number of metro trains, the frequency, number of compartments, speed of the metro train change accordingly and are flexible for a harmonious output.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  To Conclude
&lt;/h1&gt;

&lt;p&gt;Self-healing blockchains are designed in such a way that they can survive for decades, if not centuries. The scalability achieved by these types of blockchains are close to centralized systems yet maintaining true decentralization. Since there is high scalability, any centralized application can be built on the self-healing blockchains.&lt;/p&gt;

&lt;p&gt;Applying artificial intelligence to the time series (internet bandwidth, electricity, data availability, data consistency, data loss, number of nodes joining/leaving, etc.) could further improve the self-healing blockchains making them faster and able to predict an event before it happens and hence deploying countermeasures to handle any event before even happening!&lt;/p&gt;

&lt;p&gt;There are multiple blockchain protocols leading the self-healing blockchain space, one of them is Archethic, a blockchain startup based in Paris, France with multiple patents registered on this.&lt;/p&gt;

&lt;h1&gt;
  
  
  "Self-healing blockchains are the only way that can lead to a true decentralized world within a decade"
&lt;/h1&gt;




&lt;p&gt;&lt;em&gt;&lt;strong&gt;Author&lt;/strong&gt;: Akshay Reddy, Chief Product Officer at Uniris&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
