Transports

HTTP

You can send signed claims through Userfeeds Platform HTTP Gateway

Properties:

In-transport secrecy
the claim cannot be sniffed on transport thanks to HTTPS connection and will only be available to outside world after it’s incorporated into Userfeeds Platform through rankings APIs and database dumps.
Independent distribution
the claim exists only inside Userfeeds Platform database and will be distributed with Userfeeds Platform database dumps.

Example of posting claim directly to Userfeeds Platform through HTTP transport

$ curl \
  -X POST https://api.userfeeds.io/storage/ \
  -H "Content-Type: application/json" \
  -H "Authorization: 59049c8fdfed920001508e2a03414df648e34ea665f544a17d5c113b" \
  -d '{"claim":{"target":"http://some.url/path/"},"context":"ethereum:0x4564567890abcdef....abc","signature":{"creator":"82fb68fc14719b94b36e99e588c9988458ca187d4791463164285bb064458232c4bb5bb638158096f4ed957e275e2e1576d1b24cca81ceb3a53cd7493ae88474","signatureValue":"c675d123fb1e99ffe59e7626c655806ebe47ec1ca4100b953029731159c2e14f4461e2ebf7f43a071b847b57cbcbd66bd8fa9451a5e27c4db4bbaec3cdd16b02","type":"ecdsa.prime256v1"}}'

Ethereum Transaction

You can send claim through Ethereum Blockchain transaction.

Note

Userfeeds Platform does not yet monitor every transaction for potential claims

To send a claim through transaction you need to call special contracts that are monitored by Userfeeds Platform.

Properties:

In-transport secrecy
The claim is available from the moment it’s distributed through Ethereum network and can be sniffed before it reaches desired ranking.
Independent distribution
The claim will be a part of Etherum Blockchain and will be available from all copies of the blockchain.

Contracts

With value transfer

Code

pragma solidity ^0.4.11;

contract Userfeeds {

    event Claim(address sender, address userfeed, string data);

    function post(address userfeed, string data) payable {
        userfeed.transfer(msg.value);
        Claim(msg.sender, userfeed, data);
    }
}

ABI

[
  {
    "constant":false,
    "inputs":[
      { "name":"userfeed", "type":"address" },
      { "name":"data", "type":"string" }
    ],
    "name":"post",
    "outputs":[],
    "payable":true,
    "type":"function"
  },
  {
    "anonymous":false,
    "inputs":[
      { "indexed":false, "name":"sender", "type":"address" },
      { "indexed":false, "name":"userfeed", "type":"address" },
      { "indexed":false, "name":"data", "type":"string" }
    ],
    "name":"Claim",
    "type":"event"
  }
]

Addresses

  • Mainnet: …
  • Rinkeby: 0x0a48ac8263d9d79768d10cf9d7e82a19c49f0002
  • Ropsten: 0xa845c686a696c3d33988917c387d8ab939c66226
  • Kovan: …

Without value transfer

Code

pragma solidity ^0.4.11;
contract Userfeeds {

    event Claim(address sender, string data);

    function post(string data) {
        Claim(msg.sender, data);
    }
}

ABI

[
  {
    "constant":false,
    "inputs":[
      { "name":"data", "type":"string" }
    ],
    "name":"post",
    "outputs":[],
    "payable":false,
    "type":"function"
  },
  {
    "anonymous":false,
    "inputs":[
      { "indexed":false, "name":"sender", "type":"address" },
      { "indexed":false, "name":"data", "type":"string" }
    ],
    "name":"Claim",
    "type":"event"
  }
]

Addresses

  • Mainnet: …
  • Rinkeby: 0x09dcdf34e0c28b106fdfe51009cb71ae92bf8bbc
  • Ropsten: 0x5c3fe6b94b57c1e294000403340f12f083e71b83
  • Kovan: …

Whisper Protocol

TODO: Direct message TODO: Broadcast

IPDB (BigchainDB)

TODO