# Diode Client v1.4.8 - Table of Contents

  DiodeClient allows direct P2P connection to any other DiodeClient user on the planet
  using Ethereum Addresses (e.g. 0xb794f5ea0ba39494ce839613fffba74279579268) and BNS names
  (e.g. yourname.diode) instead of IPv4 or IPv6

## Modules

- [DiodeClient](DiodeClient.md): [DiodeClient](https://github.com/diodechain/diode_client_ex) secure end-to-end encrypted connections between any two machines. Connections are established
either through direct peer-to-peer TCP connections or bridged via the Diode network. To learn more about the
decentralized Diode network visit https://diode.io/
- [DiodeClient.Acceptor.Listener](DiodeClient.Acceptor.Listener.md): A listener for incoming connections.

- [DiodeClient.Anvil.Helper](DiodeClient.Anvil.Helper.md): Helper to download and deploy diode_contract (https://github.com/diodechain/diode_contract)
on a local Anvil chain for testing.
- [DiodeClient.BitMessage](DiodeClient.BitMessage.md):   BitMessage implementation used for Diode P2P cold messages.
- [DiodeClient.Block](DiodeClient.Block.md): Block related helper functions

- [DiodeClient.Contracts.BNS](DiodeClient.Contracts.BNS.md): Wrapper for BNS smart contract to register and resolve names.

- [DiodeClient.Contracts.CallPermit](DiodeClient.Contracts.CallPermit.md):   Moonbeam CallPermit contract
  https://github.com/moonbeam-foundation/moonbeam/blob/master/precompiles/call-permit/CallPermit.sol

- [DiodeClient.Contracts.Drive](DiodeClient.Contracts.Drive.md): Zone (drive) contract methods

- [DiodeClient.Contracts.DriveMember](DiodeClient.Contracts.DriveMember.md): Imported contract to read group memberships. Useful to recursively resolve
BNS names to individual devices.

- [DiodeClient.Contracts.Factory](DiodeClient.Contracts.Factory.md): This module is used to create and manage the factory contract.
The factory is creating Proxy contracts for deployed implementations.
Only the original transaction submitter can upgrade the implementation.

- [DiodeClient.Contracts.NodeRegistry](DiodeClient.Contracts.NodeRegistry.md): This module is used to create and manage the node registry contract.
The node registry is used to register and manage nodes.

- [DiodeClient.EIP712](DiodeClient.EIP712.md):   EIP-712 implementation
- [DiodeClient.MetaTransaction](DiodeClient.MetaTransaction.md): Meta transaction to submit pre-signed transactions to the blockchain.

- [DiodeClient.NodeScorer](DiodeClient.NodeScorer.md): Tracks per-node connection outcomes and drives backoff for reconnect attempts.
- [DiodeClient.Oasis.OrderedMap](DiodeClient.Oasis.OrderedMap.md): Helper module for Saphhire CBOR encoding to enforce canonical order of elements
when CBOR encoding maps.

- [DiodeClient.Oasis.TransportCipher](DiodeClient.Oasis.TransportCipher.md): Transport Cipher for Oasis Sapphire

- [DiodeClient.OasisSapphire](DiodeClient.OasisSapphire.md):   Oasis Sapphire Query Call Signing
  https://github.com/oasisprotocol/oasis-sdk/blob/main/client-sdk/go/modules/evm/signed_calls.go

- [DiodeClient.Object](DiodeClient.Object.md):   All objects are made of tuples {:type, value1, value2, ..., valueN, signature}
  The number of values are different but the last signature is a signature is
  always is the signature of BertExt.encode!([value1, value2, ..., valueN]))
  Also the signatures public key is always equal to the key

- [DiodeClient.Port.Relay](DiodeClient.Port.Relay.md): A relay is a reserved ip:port combination on a node server that can be used relay traffic between two clients.

- [DiodeClient.Rlp](DiodeClient.Rlp.md):   Encoding and Decoding of Recursive Length Prefix (RLP) https://eth.wiki/fundamentals/rlp
- [DiodeClient.Shell](DiodeClient.Shell.md): DiodeClient.Shell is the interface to the blockchain state. It allows
fetching accounts and block header information. Data fetched is by
default checked against a merkle proof.
- [DiodeClient.Shell.Anvil](DiodeClient.Shell.Anvil.md): Shell for testing against a local Anvil chain (Foundry).
Uses HTTP JSON-RPC; RPC URL and chain ID are configurable via ANVIL_RPC_URL and ANVIL_CHAIN_ID.

- [DiodeClient.Shell.Common](DiodeClient.Shell.Common.md): Common functions for the shell implementations.

- [DiodeClient.Shell.MoonbaseAlpha](DiodeClient.Shell.MoonbaseAlpha.md): DiodeClient.Shell is the interface to the blockchain state. It allows
fetching accounts and block header information. Data fetched is by
default checked against a merkle proof.
- [DiodeClient.Shell.Moonbeam](DiodeClient.Shell.Moonbeam.md): DiodeClient.Shell is the interface to the blockchain state. It allows
fetching accounts and block header information. Data fetched is by
default checked against a merkle proof.
- [DiodeClient.Shell.OasisSapphire](DiodeClient.Shell.OasisSapphire.md):  Specialized shell for Oasis Sapphire.

- [DiodeClient.Transport](DiodeClient.Transport.md): DiodeClient Transport interface for use with Cowboy2 Adapter
and `:hackeny`. Potentially more depending on interface compatibility
- [DiodeClient.Wallet](DiodeClient.Wallet.md): 
Representation of an Ethereum Wallet. This struct can hold keys in three levels
of completeness

## Mix Tasks

- [mix diode.bns](Mix.Tasks.Diode.Bns.md): BNS CLI
- [mix diode.evm_call](Mix.Tasks.Diode.EvmCall.md): Runs `cast call --trace` from an eth_call JSON-RPC request file (Oasis Sapphire).

- [mix diode.evm_transaction](Mix.Tasks.Diode.EvmTransaction.md): Builds and submits a test Oasis Sapphire transaction via cast.

- [mix diode.get_object](Mix.Tasks.Diode.GetObject.md): Fetch and print a Diode network object (ticket) for an address.
- [mix diode.nodes](Mix.Tasks.Diode.Nodes.md): List or fetch Diode network nodes (`mix diode.nodes list`, `mix diode.nodes get <address>`).

- [mix diode.publish](Mix.Tasks.Diode.Publish.md): Diode Publish CLI

- [mix diode.resolve](Mix.Tasks.Diode.Resolve.md): Resolves an Ethereum address or BNS name (drive ownership, members, aliases).

- [mix diode.udp](Mix.Tasks.Diode.Udp.md): Diode UDP port publish and consume CLI

