Created
December 30, 2019 19:38
-
-
Save troggy/8a1cc2565f81f1a6e64a3fed5407f800 to your computer and use it in GitHub Desktop.
Postman config for SMT data provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "bbeab965-b977-451c-a0ae-e8c6095acfa1", | |
"name": "SMT data provider", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "addTreeManually", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"addTreeManually\",\n \"params\": {\"depth\": 9, \"leaves\": {\"0x0000000000000000000000000000000000000001\": \"0x0000000000000000000000000000000000000000000000000000000000000001\", \"0x0000000000000000000000000000000000000002\": \"0x0000000000000000000000000000000000000000000000000000000000000002\"} },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "getProofByKey", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"getProofByKey\",\n \"params\": {\"index\":2511071146, \"key\": \"0x0000000000000000000000000000000000000001\" },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "getProofByKeys", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"getProofByKeys\",\n \"params\": {\"index\":1375343175, \"keys\": [\"0x0000000000000000000000000000000000000001\"] },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "getProofByKeysWithCondition", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"getProofByKeysWithCondition\",\n \"params\": {\"index\":1375343175,\"keys\": [\"0x0000000000000000000000000000000000000001\"], \"condition\": { \"0x0000000000000000000000000000000000000002\": \"0x0000000000000000000000000000000000000000000000000000000000000003\" } },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "addTreeFromContract", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"addTreeFromContract\",\n \"params\": {\n \"config\": {\n \"smtDEPTH\": 160,\n \"net\": \"rinkeby\",\n \"contractABI\": [\n {\n \"constant\": true,\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"sender_balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"sender_proof\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"recipient_balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"recipient_proof\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [],\n \"name\": \"root\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_initialSupply\",\n \"type\": \"uint256\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"_address\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"_value\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"Write\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n }\n ],\n \"eventName\": \"Write\",\n \"contractAddress\": \"0x5ccfee6770c8c317bd17dc9c448405d04357b452\"\n }\n },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "getProofByKeyWithCondition", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"method\": \"getProofByKeysWithCondition\",\n \"params\": {\"index\":3612911617,\"keys\": [\"0x6Cb117a635dc7633B42089C607FDFc5c60b7d679\"], \"condition\": { \"0xaf0939af286A35DBfab7DEd7c777A5F6E8BE26A8\": \"0x0000000000000000000000000000000000000000000000000DE0B6B3A763FC18\" } },\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:3000", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "3000" | |
} | |
}, | |
"response": [] | |
} | |
], | |
"protocolProfileBehavior": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment