Skip to content
Pau edited this page Oct 10, 2020 · 3 revisions

Add new contract

Requieres authentication. The signature must be performed from an authorized Address.

{
  "id": "req-2345679",
  "request": {
    "method": "addContract",
    "contract": "hexString",
    "timestamp": 1556110671
  },
  "signature": "hexString"
}

Response:

{
  "id": "req-2345679",
  "response": {
    "ok": true,
    "request": "req-2345679",
    "timestamp": 1556110672
  },
  "signature": "hexString"
}

Delete contract

Requieres authentication. The signature must be performed from an authorized Address.

{
  "id": "req-2345679",
  "request": {
    "method": "delContract",
    "contract": "hexString.",
    "timestamp": 1556110671 
  },
  "signature": "hexString"
}

Response:

{
  "id": "req-2345679",
  "response": {
    "ok": true,
    "request": "req-2345679",
    "timestamp": 1556110672
  },
  "signature": "hexString"
}

Get Merkle Root

Returns the Merkle Root for a specific token contract and block.

{
  "id": "req-2345679",
  "request": {
    "method": "getRoot",
    "contract": "hexString",
    "block": int,
    "timestamp": 1556110671
  },
}

Response:

{
  "id": "req-2345679",
  "response": {
    "ok": true,
    "request": "req-2345679",
    "root": "hexString",
    "timestamp": 1556110672
  },
  "signature": "hexString"
}

Get Merkle Proof

Get the Merkle Proof for a specific token contract and a block number (ethereum).

The address for the merkle proof is obtained from the signature.

{
  "id": "req-2345679",
  "request": {
    "method": "getProof",
    "contract": "hexString",
    "block": int,
    "timestamp": 1556110671
  },
  "signature": "hexString"
}

Response:

{
  "id": "req-2345679",
  "response": {
    "ok": true,
    "request": "req-2345679",
    "proof": "hexString",
    "address": "hexString",
    "amount": int,
    "timestamp": 1556110672
  },
  "signature": "hexString"
}

Check Merkle Proof

Checks a Merkle Proof for a specific token contract and a block number (ethereum).

{
  "id": "req-2345679",
  "request": {
    "method": "checkProof",
    "root": "hexString",
    "proof": "hexString",
    "address": "hexString",
    "amount": 74,
    "timestamp": 1556110671
  },
}

Response:

{
  "id": "req-2345679",
  "response": {
    "ok": true,
    "request": "req-2345679",
    "valid": true,
    "timestamp": 1556110672
  },
  "signature": "hexString"
}
Clone this wiki locally