Skip to content

mimimal API #18

@SCBuergel

Description

@SCBuergel

We need a minimal REST API to talk to the client. The underlying functions should be well separated so that we can use the target function from the API calls as well as command line interface.

  • send message, HOPR does the routing for you sendMessage?Recipient=MULTIHASH&messageText=TEXT
  • send message manually, we hope you know what you're doing... sendMessage?Recipient=MULTIHASH&messageText=TEXT&Relayer1=MULTIHASH&Relayer2=MULTIHASH&Relayer3=MULTIHASH
  • open payment channel with another party, the counterparty is identified by their HOPR address (IPFS multihash) and translated into an ETH address via DHT openPaymentChannel?counterparty=MULTIHASH
  • close all payment channels and receive resulting payout initiatePayout (we should have a more efficient way of closing multiple channels at the same time on SC level)
  • this is not pretty and should probably get replaced by dumping to command line or callback or websocket getMessageQueueLength
  • getMessage?id=NUMBER
  • [] getConfirmedAmount amount of ETH that I will make when closing all channels
  • [] getUnconfirmedAmount this should be asymptotically zero, unless the next downstream node which releases my payment did not get back to me yet. This being non-zero for extended periods means something is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions