Skip to content

Instantly share code, notes, and snippets.

@3esmit
Created June 15, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3esmit/108ed926d4b32b7d219a2e47a5678a8c to your computer and use it in GitHub Desktop.
Save 3esmit/108ed926d4b32b7d219a2e47a5678a8c to your computer and use it in GitHub Desktop.

I propose the use of Status Network infrastructure to do this.

    graph TB
        ethereum["Ethereum Network"]
        server["Status.im Service"]
        subgraph Status Network
            public["Public Chat"]
            private["Private Messages"]
            nodes["User Nodes"] 
        end
        ethereum --> server;
        server --> public;
        public --> nodes;
        server --> private;
        private --> server;
        nodes --> private;
        private --> nodes;

For every transaction that happens, when it detects a transaction, it message to the recipient wallet the txid using Status Network.

When a user wants to read their pending transaction list, they simply sync a public chat:

	graph TB
        server["Status GmbH Service"]
        nodes["User Nodes"]  
        network["Public Chat"]

        server --> nodes;
        nodes --> network

When a user wants to read their pending transaction details, the requests are made in private chats.

	graph TB
        server["Status Service"]
        nodes["User Nodes"]  
        
        network["Private Messages"]

        server --> network;
        network --> server;
        nodes --> network;
        network --> nodes;

Status Service only answer to messages signed by the wallet (or by a representative chatid which can authenticate in Server using a signed message from wallet at install)

    sequenceDiagram
    participant Server
    participant Network
    participant Node
    loop Public Rooms 
        Server->>Network: Broadcast Pending Tx
            Note left of Network: ROOM 0x3D59(...)F415: <br/> ethereum:tx-0xb9ad(...)3586 <br/> ethereum:tx-0x9e6a(...)Fc762
        Network->>Node: Sends History of Pending Txs  
    end
    loop Private Message 
        Node->>Network: Pending Tx Details?
            Note left of Node: From: 0x3D59(...)F415 <br/> To: ServerID <br/><br/> ethereum:tx-0xb9ad(...)3586?
        Server->>Network: Answer Tx Details
            Note right of Server: From: ServerID:<br/> <br/> <br/> To: 0x3D59(...)F415 <br/>T2020-05-15 11:07<br/>splitTransfer(address,address,uint256,uint256,address)  
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment