API

Activity

/activity/

curl -X GET http://explorer.matryx.ai/activity

Response:

{
    "activity": [
        {
            "news": "<publicAddress> created a new Tournament named 'Triton X-9000'"
        },
        {
            "news": "<publicAddress> opened their Tournament named 'Triton X-9000'"
        }
    ]
}

The activity is generated by looking at events fired from the Matryx Platform on the blockchain.

Platform

/platform/getInfo/:version?

curl -X GET http://explorer.matryx.ai/platform/getInfo

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

abi is a large ABI response in JSON parsed format for that version of the Matryx Platform.

/platform/getAddress/:version?

curl -X GET http://explorer.matryx.ai/platform/getAddress

Response:

{
    "address": "<EthereumAddressOfPlatform>"
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

/platform/getAbi/:version?

curl -X GET http://explorer.matryx.ai/platform/getAbi

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

Tournament

/tournaments/getAbi/:version?

curl -X GET http://explorer.matryx.ai/tournaments/getAbi

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

/tournaments/

curl -X GET http://explorer.matryx.ai/tournaments/

Response:

{
    "tournaments": [
        {
            "address": "0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F",
            "owner": "0xdaa0E2ef627bFb864Ed19eFd546542F47E5Ad6A7",
            "title": "Example Tournament title",
            "description": "Example Tournament description",
            "fileHash": "QmUtR6gEeBRzsGpVquqQZQK8sVUC3h4jHxvK8UbkutLjHL",
            "category": "math",
            "state": "isClosed",
            "bounty": 10,
            "ipType": "",
            "currentRound": 1,
            "numberOfParticipants": 1
        }
    ]
}

Returns the list of tournaments currently on the platform. Can optionally be filtered by owner address by adding ?owner=<address> to the end.

/tournaments/count

curl -X GET http://explorer.matryx.ai/tournaments/count

Response:

{
    "count": 1
}

Returns the count of all tournaments on the platform.

/tournaments/address/:tournamentAddress

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F

Response:

{
    "tournament": {
        "address": "0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F",
        "owner": "0xdaa0E2ef627bFb864Ed19eFd546542F47E5Ad6A7",
        "title": "Example Tournament title",
        "description": "Example Tournament description",
        "fileHash": "QmUtR6gEeBRzsGpVquqQZQK8sVUC3h4jHxvK8UbkutLjHL",
        "category": "math",
        "ipType": "",
        "state": "isClosed",
        "bounty": 10,
        "remainingMtx": 0,
        "currentRound": 1,
        "currentRoundAddress": "0x840Bad637faAA6B603757de95Eb5B11DA0E23f43",
        "currentRoundState": "isClosed",
        "roundEndTime": 1534460653000,
        "numberOfParticipants": 1,
        "entryFee": 2
    }
}

Returns more details for the specified tournament.

/tournaments/address/:tournamentAddress/owner

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/owner

Response:

{
    "owner": "0xdaa0E2ef627bFb864Ed19eFd546542F47E5Ad6A7"
}

Returns the owner address of the specified tournament.

/tournaments/address/:tournamentAddress/submissionCount

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/submissionCount

Response:

{
    "submissionCount": 1
}

Returns the number of submissions to the specified tournament.

/tournaments/address/:tournamentAddress/currentRound

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/currentRound

Response:

{
    "currentRound": 1
}

Returns the current round number of the specified tournament.

/tournaments/address/:tournamentAddress/round/:roundId

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/round/1

Response:

{
    "round": {
        "tournamentAddress": "0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F",
        "tournamentTitle": "Example Tournament title",
        "tournamentDescription": "Example Tournament description",
        "start": 1534460648000,
        "end": 1534460653000,
        "reviewPeriodDuration": 5000,
        "bounty": 3,
        "closed": true,
        "roundStatus": "isClosed",
        "submissions": [
            {
                "address": "0xF93F3B5fB680A7658479b5b1119ff599c6115F54",
                "title": "Example Submission title",
                "owner": "0xEcc4DE8F2846F3038C11a9e457634Ad1a3C703dF",
                "timeSubmitted": 1534460650000,
                "winner": true,
                "reward": 10
            }
        ]
    }
}

Returns round details for the specified round index of the tournament. If the tournament status is either isClosed or isAbandoned, all submissions to the round are returned under the submissions property.

/tournaments/address/:tournamentAddress/isEntrant/:address

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/isEntrant/0xEcc4DE8F2846F3038C11a9e457634Ad1a3C703dF

Response:

{
    "isEntrant": true
}

Returns if :address is an entrant of the specified tournament.

/tournaments/address/:tournamentAddress/rounds

curl -X GET http://explorer.matryx.ai/tournaments/address/0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F/rounds

Response:

{
    "rounds": [
        "0x840Bad637faAA6B603757de95Eb5B11DA0E23f43"
    ]
}

Returns all round addresses of the specified tournament.

/tournaments/category/:category

curl -X GET http://explorer.matryx.ai/tournaments/category/math

Response:

{
    "tournaments": [
        "0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F"
    ]
}

Returns all tournament addresses that belong to the category :category.

Round

/rounds/getAbi/:version?

curl -X GET http://explorer.matryx.ai/rounds/getAbi

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

/rounds/address/:roundAddress

curl -X GET http://explorer.matryx.ai/rounds/address/0x840Bad637faAA6B603757de95Eb5B11DA0E23f43

Response:

{
    "round": {
        "tournamentAddress": "0xC4C718469c03cc4e0bd4C7De60A7776C4Ce6532F",
        "tournamentTitle": "Example Tournament title",
        "tournamentDescription": "Example Tournament description",
        "start": 1534460648000,
        "end": 1534460653000,
        "reviewPeriodDuration": 5000,
        "bounty": 3,
        "closed": true,
        "roundStatus": "isClosed",
        "submissions": [
            {
                "address": "0xF93F3B5fB680A7658479b5b1119ff599c6115F54",
                "title": "Example Submission title",
                "owner": "0xEcc4DE8F2846F3038C11a9e457634Ad1a3C703dF",
                "timeSubmitted": 1534460650000,
                "winner": true,
                "reward": 10
            }
        ]
    }
}

Submission

/submissions/getAbi/:version?

curl -X GET http://explorer.matryx.ai/submissions/getAbi

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

/submissions/address/:submissionAddress

curl -X GET http://explorer.matryx.ai/submissions/address/0xF93F3B5fB680A7658479b5b1119ff599c6115F54

Response:

{
    "submission": {
        "address": "0xF93F3B5fB680A7658479b5b1119ff599c6115F54",
        "title": "Example Submission title",
        "owner": "0xEcc4DE8F2846F3038C11a9e457634Ad1a3C703dF",
        "reward": 10,
        "description": "Example Submission description",
        "contributors": [
            "0xFa50807D297F07C6900C7b2809a335189634c7a8",
            "0x90E0393786a53D0E1a63a3BB90A92FDc58fd835f",
            "0xCB70d29966D4F5dC039B5B50a681dbeACa1B6565"
        ],
        "references": [
            "0xf23616e010e1cB7c7B12dd7C2c63997a00063c2F",
            "0x6838E2ed5F59166423d33e38b8880e08DF34accd",
            "0x49819cD33c95f583F7B945C02b6895C19C75b981"
        ],
        "fileHash": "QmUtR6gEeBRzsGpVquqQZQK8sVUC3h4jHxvK8UbkutLjHL",
        "timeSubmitted": 1534460650000
    }
}

/submissions/address/:submissionAddress/owner

curl -X GET http://explorer.matryx.ai/submissions/address/0xF93F3B5fB680A7658479b5b1119ff599c6115F54/owner

Response:

{
    "owner": "0xEcc4DE8F2846F3038C11a9e457634Ad1a3C703dF"
}

Interplanetary File System (IPFS)

IPFS

/ipfs/upload

curl -X POST http://explorer.matryx.ai/ipfs/upload \
     -F 'description=This is a description'
     -F 'jsonContent={"json":"some json content"}'
     -F filesContent=@/path/to/file

Response:

{
    "descriptionHash": "QmSVphNHX8uV2mjvJaXLZEwguqpmw4rZ6BpRU8rrhaBy5H",
    "folderHash": "QmeV753pFr8U5k1afXLTXuYAF2wX4pev7Jcjnd8Yf7q4eu"
}

Uploads content to IPFS for use on a Tournament or Submission. description, jsonContent, and filesContent are all optional. Uploaded description will be returned as descriptionHash, and jsonContent and filesContent will be contained in a folder at folderHash.

Token

/token/getInfo/:version?

curl -X GET http://explorer.matryx.ai/token/getInfo

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

abi is a large ABI response in JSON parsed format for that version of the Matryx Platform.

/token/getAddress/:version?

curl -X GET http://explorer.matryx.ai/token/getAddress

Response:

{
    "address": "<EthereumAddressOfPlatform>"
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.

/token/getAbi/:version?

curl -X GET http://explorer.matryx.ai/token/getAbi

Response:

{
    "abi": []
}

Where the optional param :version is the branch of the Matryx Platform you want to use ie: master, QA, develop. It grabs it directly from the /build folder of http://github.com/matryx/MatryxPlatform. If no branch is specified, it will return the latest version.