Algorithms

Userfeeds Platform allows running custom algorithms on top of data gathered from all supported sources like Ethereum blockchain (mainnet, ropsten, rinkeby, kovan)

Algorithms can be referenced by their identifier that depends on how the author decided to share them.

Warning

Current support is limited to built-in algorithms created by Userfeeds. We will open custom algorithms for external developers in near future.

Built-in algorithms

Channel feed

Version: 0.1.0

Example:

curl -X POST \
    -d '{"flow":[{"algorithm":"experimental_channel_feed","params":{"id":"https://www.google.com"}}]}' \
    -H 'Content-Type: application/json' 'https://api.userfeeds.io/ranking/'

Json claim example:

{
    "type":["about"],
    "claim":{
        "target":"Cool website, bro!",
        "about":"https://www.google.com"
    }
}

ERC721 example:

ranking/experimental_channel_feed;id=ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:593163

Json claim example:

{
    "type": ["about"],
    "claim": {
        "target": "New cool kitten on the block",
        "about": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:593163"
    },
    "context": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:608827"
}

Channels

Version: 0.1.0

Example:

curl -X POST \
    -d '{"flow":[{"algorithm":"experimental_channels","params":{"starts_with":"https://"}}]}' \
    -H 'Content-Type: application/json' 'https://api.userfeeds.io/ranking/'

Json claim example:

{
    "type":["about"],
    "claim":{
        "target":"Cool website, bro!",
        "about":"https://www.google.com"
    }
}

ERC721 example:

ranking/experimental_channels;starts_with=ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d

Json claim example:

{
    "type": ["about"],
    "claim": {
        "target": "New cool kitten on the block",
        "about": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:593163"
    },
    "context": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:608827"
}

Claims

Version: 0.1.0

All of above filters support filtering by multiple arguments:

Filters can be put in any combination:

JSON claim example:

{
    "author": "0x7195ebc1bdbcff1d8557541a2b186c6dfd01aef8",
    "created_at": 1522921352000,
    "family": "kovan",
    "id": "claim:0x98a873f7f2843a12fa76d3026ba30072ee21a70f34324e9ec7875c21cb8526e6:0",
    "sequence": 6727044,
    "target": "claim:0x1470ee0b001370a4e84272a117c94182c092f8e0bfb22b60909c754ce9dfd0d1:0"
}

Context feed

Version: 0.1.0

ERC721 example:

ranking/experimental_context_feed;id=ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:587035

Json claim example:

{
    "claim":{
        "target": "I love catnip"
    },
    "context": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:587035"
}

Contexts

Version: 0.1.0

ERC721 example:

ranking/experimental_contexts;starts_with=ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d

Json claim example:

{
    "claim":{
        "target": "I love catnip"
    },
    "context": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:587035"
}

Feed

Algorithm used by https://userfeeds.github.io/cryptopurr/

Returns frontend specific structure of purrs.

Version: 0.1.1

Example:

ranking/cryptopurr_feed;context=ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d

Json claim example:

{
    "about": null,
    "abouted": [],
    "author": "0x460031ae4db5720d92a48fecf06a208c5099c186",
    "context": "ethereum:0x06012c8cf97bead5deae237070f9587f8e7a266d:593163",
    "created_at": 1523000940000,
    "family": "kovan",
    "id": "claim:0x464762e30e39458af1bfed2756adfdd3c673caefa4fb84544b21bbd90d03d262:0",
    "sequence": 6742075,
    "target": {
        "id": "Hurry up!"
    },
    "targeted": [],
    "type": "regular"
}

Filter claim hodl

Version: 0.1.0

For now it filters claims authored by identities which received at latest one transfer of given asset.

Possible root assets: ethereum, rinkeby, ropsten, kovan

Any ERC20: ethereum:0xe41d2489571d322189246dafa5ebde1f4699f498

Example:

ranking/experimental_claims;target=claim:0x49994…bf8e8:0/experimental_claim_hodl;asset=rinkeby

Filter by labels

It filters claims by those labeling target with given labels. Also adds info about those (filtered) labels to each claim.

Version: 0.1.0

Examples:

ranking/experimental_context_feed;id=ethereum:0x06012…a266d:341605/experimental_filter_labels;id=like ranking/experimental_context_feed;id=ethereum:0x06012…a266d:341605/experimental_filter_labels;id=follow;id=favourite

Valid erc721

It filters claims authored by an owner of context. It parses claim context to get collectible id and erc721 contract address. Then it verifies if claim author was an owner of this collectible at the time of creating claim.

Version: 0.1.0

Example:

ranking/experimental_context_feed;id=ethereum:0x06012…a266d:341605/experimental_valid_erc721

Tokens

Returns all erc721 tokens of given asset owned by given identity.

Version: 0.1.0

Example:

ranking/experimental_tokens;identity=0x157da…2bee3;asset=ethereum:0x06012…7a266d