From 2b6d25ad3ba9d0214a5b48ffc1a7f44112a98c6c Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Tue, 14 May 2024 11:26:19 +0100 Subject: [PATCH 1/3] swagger --- docs/bridge/docs/Services/Omnirpc.md | 2 + services/omnirpc/swagger/collection.json | 2277 ++++++++++++++++++++++ services/omnirpc/swagger/generate.go | 27 + 3 files changed, 2306 insertions(+) create mode 100644 services/omnirpc/swagger/collection.json create mode 100644 services/omnirpc/swagger/generate.go diff --git a/docs/bridge/docs/Services/Omnirpc.md b/docs/bridge/docs/Services/Omnirpc.md index df3a4ac88c..c5fbf284b4 100644 --- a/docs/bridge/docs/Services/Omnirpc.md +++ b/docs/bridge/docs/Services/Omnirpc.md @@ -74,4 +74,6 @@ curl --location --request POST 'http://localhost:5000/rpc/1' \ }' ``` +A full postman collection can be found [here](https://github.com/synapsecns/sanguine/blob/master/services/omnirpc/swagger/collection.json) or at the `/collection.json endpoint` + Not all requests are confirmable. Please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/services/omnirpc#section-readme) for details. diff --git a/services/omnirpc/swagger/collection.json b/services/omnirpc/swagger/collection.json new file mode 100644 index 0000000000..e374573cd5 --- /dev/null +++ b/services/omnirpc/swagger/collection.json @@ -0,0 +1,2277 @@ +{ + "info": { + "name": "Ethereum JSON-RPC", + "description": "A collection holding all the Ethereum JSIN RPC API calls", + "version": "", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "eth", + "item": [ + { + "name": "protocolVersion", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the current ethereum protocol version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current ethereum protocol version", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_protocolVersion\",\n\t\"params\":[],\n\t\"id\":67\n}" + } + } + }, + { + "name": "syncing", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an object with data about the sync status or false.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Object|Boolean`, An object with sync status data or `FALSE`, when not syncing:\r\n\r\n`startingBlock`: `QUANTITY` - The block at which the import started (will only be reset, after the sync reached his head)\r\n`currentBlock`: `QUANTITY` - The current block, same as eth_blockNumber\r\n`highestBlock`: `QUANTITY` - The estimated highest block", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_syncing\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "coinbase", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the client coinbase address.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`DATA`, 20 bytes - the current coinbase address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_coinbase\",\n\t\"params\":[],\n\t\"id\":64\n}" + } + } + }, + { + "name": "mining", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns `true` if client is actively mining new blocks.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns `true` of the client is mining, otherwise `false`.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_mining\",\n\t\"params\":[],\n\t\"id\":71\n}" + } + } + }, + { + "name": "hashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of hashes per second that the node is mining with.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - number of hashes per second.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_hashrate\",\n\t\"params\":[],\n\t\"id\":71\n}" + } + } + }, + { + "name": "gasPrice", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the current price per gas in wei.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current gas price in wei.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_gasPrice\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "accounts", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of addresses owned by client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array of DATA`, 20 Bytes - addresses owned by the client", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_accounts\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "blockNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of most recent block.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current block number the client is on.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_blockNumber\",\n\t\"params\":[],\n\t\"id\":83\n}" + } + } + }, + { + "name": "getBalance", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the balance of the account of given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address to check for balance.\r\n`QUANTITY|TAG` - integer block number, or the string \"latest\", \"earliest\" or \"pending\", see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current balance in wei.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBalance\",\n\t\"params\":[\n\t\t\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\", \n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getStorageAt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the value from a storage position at a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address of the storage.\r\n\r\n`QUANTITY` - integer of the position in the storage.\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - the value at this storage position.\r\n\r\n**Example**\r\n\r\nCalculating the correct position depends on the storage to retrieve. Consider the following contract deployed at 0x295a70b2de5e3953354a6a8344e616ed314d7251 by address 0x391694e7e0b0cce554cb130d723a9d27458f9298.\r\n\r\n```\r\ncontract Storage {\r\n uint pos0;\r\n mapping(address =\u003e uint) pos1;\r\n \r\n function Storage() {\r\n pos0 = 1234;\r\n pos1[msg.sender] = 5678;\r\n }\r\n}\r\n```\r\n\r\nRetrieving the value of pos0 is straight forward:\r\n\r\n```\r\ncurl -X POST --data '{\"jsonrpc\":\"2.0\", \"method\": \"eth_getStorageAt\", \"params\": [\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \"0x0\", \"latest\"], \"id\": 1}' {{ENVIRONMENT}}\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x00000000000000000000000000000000000000000000000000000000000004d2\"}\r\n```\r\n\r\nRetrieving an element of the map is harder. The position of an element in the map is calculated with:\r\n\r\n```\r\nkeccack(LeftPad32(key, 0), LeftPad32(map position, 0))\r\n```\r\n\r\nThis means to retrieve the storage on `pos1[\"0x391694e7e0b0cce554cb130d723a9d27458f9298\"]` we need to calculate the position with:\r\n\r\n```\r\nkeccak(decodeHex(\"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"))\r\n```\r\n\r\nThe geth console which comes with the web3 library can be used to make the calculation:\r\n\r\n```\r\n\u003e var key = \"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"\r\nundefined\r\n\u003e web3.sha3(key, {\"encoding\": \"hex\"})\r\n\"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9\"\r\n```", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\": \"eth_getStorageAt\", \n\t\"params\": [\n\t\t\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \n\t\t\"0x0\",\n\t\t\"latest\"\n\t], \n\t\"id\": 1\n}" + } + } + }, + { + "name": "getTransactionCount", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions sent from an address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address.\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n '0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest' // state at the latest block\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions send from this address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionCount\",\n\t\"params\":[\n\t\t\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block from a block matching the given block hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions in this block.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByHash\",\n\t\"params\":[\n\t\t\"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block matching the given block number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n```\r\nparams: [\r\n '0xe8', // 232\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions in this block.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByNumber\",\n\t\"params\":[\n\t\t\"0x52A8CA\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCode", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns code at a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',\r\n '0x2' // 2\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - the code from the given address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCode\",\n\t\"params\":[\n\t\t\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \n\t\t\"0x2\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sign", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "The sign method calculates an Ethereum specific signature with: `sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message)))`.\r\n\r\nBy adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.\r\n\r\n**Note:** the address to sign with must be unlocked.\r\n\r\n**Parameters**\r\n\r\naccount, message\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`DATA`, N Bytes - message to sign\r\n\r\n**Returns**\r\n\r\n`DATA`: Signature", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sign\",\n\t\"params\":[\n\t\t\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\", \n\t\t\"0xdeadbeaf\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation, if the data field contains code.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction object\r\n\r\n`from`: `DATA`, 20 Bytes - The address the transaction is send from.\r\n\r\n`to`: `DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.\r\n\r\n`gas`: `QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.\r\n\r\n`gasPrice`: `QUANTITY` - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`nonce`: `QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.\r\n\r\n```\r\nparams: [{\r\n \"from\": \" 0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\r\n \"to\": \" 0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\r\n \"gas\": \"0x76c0\", // 30400\r\n \"gasPrice\": \"0x9184e72a000\", // 10000000000000\r\n \"value\": \"0x9184e72a\", // 2441406250\r\n \"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendTransaction\",\n\t\"params\":[{\n\t\t\"from\": \"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\n\t\t\"to\": \"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\n\t\t\"gas\": \"0x76c0\",\n\t\t\"gasPrice\": \"0x9184e72a000\",\n\t\t\"value\": \"0x9184e72a\",\n\t\t\"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\n\t}],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendRawTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation for signed transactions.\r\n\r\n**Parameters**\r\n\r\n`DATA`, The signed transaction data.\r\n\r\n```\r\nparams: [\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendRawTransaction\",\n\t\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "call", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Executes a new message call immediately without creating a transaction on the block chain.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction call object\r\n\r\n`from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from.\r\n\r\n`to`: `DATA`, 20 Bytes - The address the transaction is directed to.\r\n\r\n`gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.\r\n\r\n`gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - the return value of executed contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_call\",\n\t\"params\":[{\n\t\t\"from\": \"\",\n\t\t\"to\": \"\",\n\t\t\"gas\": \"\",\n\t\t\"gasPrice\": \"\",\n\t\t\"value\": \"\",\n\t\t\"data\": \"\"\n\t}, \"latest\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "estimateGas", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.\r\n\r\n**Parameters**\r\n\r\nSee `eth_call` parameters, expect that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - the amount of gas used.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_estimateGas\",\n\t\"params\":[\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - Hash of a block.\r\n\r\n`Boolean` - If true it returns the full transaction objects, if false only the hashes of the transactions.\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found:\r\n\r\n`number`: `QUANTITY` - the block number. null when its pending block.\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block.\r\n\r\n`parentHash`: `DATA`, 32 Bytes - hash of the parent block.\r\n\r\n`nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block.\r\n\r\n`sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block.\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block.\r\n\r\n`transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block.\r\n\r\n`stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block.\r\n\r\n`receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block.\r\n\r\n`miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.\r\n\r\n`difficulty`: `QUANTITY` - integer of the difficulty for this block.\r\n\r\n`totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block.\r\n\r\n`extraData`: `DATA` - the \"extra data\" field of this block.\r\n\r\n`size`: `QUANTITY` - integer the size of this block in bytes.\r\n\r\n`gasLimit`: `QUANTITY` - the maximum gas allowed in this block.\r\n\r\n`gasUsed`: `QUANTITY` - the total used gas by all transactions in this block.\r\n\r\n`timestamp`: `QUANTITY` - the unix timestamp for when the block was collated.\r\n\r\n`transactions`: `Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.\r\n\r\n`uncles`: `Array` - Array of uncle hashes.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByHash\",\n\t\"params\":[\n\t\t\"0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by block number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.\r\n\r\n```\r\nparams: [\r\n '0x1b4', // 436\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByNumber\",\n\t\"params\":[\n\t\t\"0x1b4\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the information about a transaction requested by transaction hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n \"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction object, or null when no transaction was found:\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the transaction.\r\n\r\n`nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. `null` when its pending.\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in. `null` when its pending.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. `null` when its pending.\r\n\r\n`from`: `DATA`, 20 Bytes - address of the sender.\r\n\r\n`to`: `DATA`, 20 Bytes - address of the receiver. `null` when its a contract creation transaction.\r\n\r\n`value`: `QUANTITY` - value transferred in Wei.\r\n\r\n`gasPrice`: `QUANTITY` - gas price provided by the sender in Wei.\r\n\r\n`gas`: `QUANTITY` - gas provided by the sender.\r\n\r\n`input`: `DATA` - the data send along with the transaction.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByHash\",\n\t\"params\":[\n\t\t\"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block hash and transaction index position.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block.\r\n\r\n`QUANTITY` - integer of the transaction index position.\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getTransactionByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block number and transaction index position.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`QUANTITY` - the transaction index position.\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getTransactionByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x52A96E\", \n\t\t\"0x1\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionReceipt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the receipt of a transaction by transaction hash.\r\n\r\n**Note:** That the receipt is not available for pending transactions.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction receipt object, or `null` when no receipt was found:\r\n\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transaction.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position in the block.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in.\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in.\r\n\r\n`cumulativeGasUsed`: `QUANTITY` - The total amount of gas used when this transaction was executed in the block.\r\n\r\n`gasUsed`: `QUANTITY` - The amount of gas used by this specific transaction alone.\r\n\r\n`contractAddress`: `DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise `null`.\r\n\r\n`logs`: `Array` - Array of log objects, which this transaction generated.\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.\r\n\r\nIt also returns either :\r\n\r\n`root` : `DATA` 32 bytes of post-transaction stateroot (pre Byzantium)\r\n\r\n`status`: `QUANTITY` either `1` (success) or `0` (failure)", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionReceipt\",\n\t\"params\":[\n\t\t\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by hash and uncle index position.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash a block.\r\n\r\n`QUANTITY` - the uncle's index position.\r\n\r\n```\r\nparams: [\r\n '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by number and uncle index position.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`QUANTITY` - the uncle's index position.\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`\r\n\r\n**Note:** An uncle doesn't contain individual transactions.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x29c\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCompilers", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of available compilers in the client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array of available compilers.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCompilers\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileLLL", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled LLL code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"(returnlll (suicide (caller)))\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileLLL\",\n\t\"params\":[\n\t\t\"(returnlll (suicide (caller)))\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileSolidity", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled solidity code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSolidity\",\n\t\"params\":[\n\t\t\"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileSerpent", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled serpent code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"/* some serpent */\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSerpent\",\n\t\"params\":[\"/* some serpent */\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "newFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**A note on specifying topic filters:**\r\n\r\nTopics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:\r\n\r\n`[]` \"anything\"\r\n\r\n`[A]` \"A in first position (and anything after)\"\r\n\r\n`[null, B]` \"anything in first position AND B in second position (and anything after)\"\r\n\r\n`[A, B]` \"A in first position AND B in second position (and anything after)\"\r\n\r\n`[[A, B], [A, B]]` \"(A OR B) in first position AND (A OR B) in second position (and anything after)\"\r\n\r\n**Parameters**\r\n\r\n`Object` - The filter options:\r\n\r\n`fromBlock`: `QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.\r\n\r\n`toBlock`: `QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.\r\n\r\n`address`: `DATA|Array`, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.\r\n\r\n`topics`: `Array of DATA`, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with \"or\" options.\r\n\r\n```\r\nparams: [{\r\n \"fromBlock\": \"0x1\",\r\n \"toBlock\": \"0x2\",\r\n \"address\": \" 0x8888f1f195afa192cfee860698584c030f4c9db1\",\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", null, [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc\"]]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newFilter\",\n\t\"params\":[\n\t\t{\n\t\t\t\"topics\":[\"0x12341234\"]\n\t\t}\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "newBlockFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newBlockFilter\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "newPendingTransactionFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newPendingTransactionFilter\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "uninstallFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren't requested with `eth_getFilterChanges` for a period of time.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id.\r\n\r\n```\r\nparams: [\r\n \"0xb\" // 11\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the filter was successfully uninstalled, otherwise `false`.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_uninstallFilter\",\n\t\"params\":[\n\t\t\"0xb\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "getFilterChanges", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Polling method for a filter, which returns an array of logs which occurred since last poll.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - the filter id.\r\n\r\n```\r\nparams: [\r\n \"0x16\" // 22\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of log objects, or an empty array if nothing has changed since last poll.\r\n\r\nFor filters created with `eth_newBlockFilter` the return are block hashes (`DATA`, 32 Bytes), e.g. `[\"0x3454645634534...\"]`.\r\n\r\nFor filters created with `eth_newPendingTransactionFilter` the return are transaction hashes (`DATA`, 32 Bytes), e.g. `[\"0x6345343454645...\"]`.\r\n\r\nFor filters created with `eth_newFilter` logs are objects with following params:\r\n\r\n`removed`: `TAG` - true when the log was removed, due to a chain reorganization. false if its a valid log.\r\n\r\n`logIndex`: `QUANTITY` - integer of the log index position in the block. `null` when its pending log.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position log was created from. `null` when its pending log.\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. `null` when its pending log.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. `null` when its pending. `null` when its pending log.\r\n\r\n`blockNumber`: `QUANTITY` - the block number where this log was in. `null` when its pending. `null` when its pending log.\r\n\r\n`address`: `DATA`, 20 Bytes - address from which this log originated.\r\n\r\n`data`: `DATA` - contains one or more 32 Bytes non-indexed arguments of the log.\r\n\r\n`topics`: `Array of DATA` - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. `Deposit(address,bytes32,uint256)`), except you declared the event with the anonymous specifier.)", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getFilterChanges\",\n\t\"params\":[\n\t\t\"0x16\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "getLogs", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an array of all logs matching a given filter object.\r\n\r\n**Parameters**\r\n\r\n`Object` - the filter object, see eth_newFilter parameters.\r\n\r\n```\r\nparams: [{\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getFilterChanges`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getLogs\",\n\t\"params\":[{\n\t\t\"topics\":[\n\t\t\t\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"\n\t\t]\n\t}],\n\t\"id\":74\n}" + } + } + }, + { + "name": "getWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the hash of the current block, the seedHash, and the boundary condition to be met (\"target\").\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array with the following properties:\r\n\r\n`DATA`, 32 Bytes - current block header pow-hash\r\n\r\n`DATA`, 32 Bytes - the seed hash used for the DAG.\r\n\r\n`DATA`, 32 Bytes - the boundary condition (\"target\"), 2^256 / difficulty.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getWork\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting a proof-of-work solution.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 8 Bytes - The nonce found (64 bits)\r\n\r\n`DATA`, 32 Bytes - The header's pow-hash (256 bits)\r\n\r\n`DATA`, 32 Bytes - The mix digest (256 bits)\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000001\",\r\n \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\r\n \"0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns true if the provided solution is valid, otherwise false.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitWork\", \n\t\"params\":[\n\t\t\"0x0000000000000001\", \n\t\t\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \n\t\t\"0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitHashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting mining hashrate.\r\n\r\n**Parameters**\r\n\r\n`Hashrate`, a hexadecimal string representation (32 bytes) of the hash rate\r\n\r\n`ID`, String - A random hexadecimal(32 bytes) ID identifying the client\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000000000000000000000000000000000000000000000000500000\",\r\n \"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns `true` if submitting went through succesfully and `false` otherwise.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitHashrate\", \n\t\"params\":[\n\t\t\"0x0000000000000000000000000000000000000000000000000000000000500000\", \n\t\t\"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\n\t],\n\t\"id\":73\n}" + } + } + } + ] + }, + { + "name": "eth (confirmations)", + "item": [ + { + "name": "protocolVersion", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the current ethereum protocol version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current ethereum protocol version", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_protocolVersion\",\n\t\"params\":[],\n\t\"id\":67\n}" + } + } + }, + { + "name": "syncing", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an object with data about the sync status or false.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Object|Boolean`, An object with sync status data or `FALSE`, when not syncing:\r\n\r\n`startingBlock`: `QUANTITY` - The block at which the import started (will only be reset, after the sync reached his head)\r\n`currentBlock`: `QUANTITY` - The current block, same as eth_blockNumber\r\n`highestBlock`: `QUANTITY` - The estimated highest block", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_syncing\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "coinbase", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the client coinbase address.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`DATA`, 20 bytes - the current coinbase address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_coinbase\",\n\t\"params\":[],\n\t\"id\":64\n}" + } + } + }, + { + "name": "mining", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns `true` if client is actively mining new blocks.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns `true` of the client is mining, otherwise `false`.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_mining\",\n\t\"params\":[],\n\t\"id\":71\n}" + } + } + }, + { + "name": "hashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of hashes per second that the node is mining with.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - number of hashes per second.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_hashrate\",\n\t\"params\":[],\n\t\"id\":71\n}" + } + } + }, + { + "name": "gasPrice", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the current price per gas in wei.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current gas price in wei.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_gasPrice\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "accounts", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of addresses owned by client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array of DATA`, 20 Bytes - addresses owned by the client", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_accounts\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "blockNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of most recent block.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current block number the client is on.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_blockNumber\",\n\t\"params\":[],\n\t\"id\":83\n}" + } + } + }, + { + "name": "getBalance", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the balance of the account of given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address to check for balance.\r\n`QUANTITY|TAG` - integer block number, or the string \"latest\", \"earliest\" or \"pending\", see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the current balance in wei.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBalance\",\n\t\"params\":[\n\t\t\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\", \n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getStorageAt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the value from a storage position at a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address of the storage.\r\n\r\n`QUANTITY` - integer of the position in the storage.\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - the value at this storage position.\r\n\r\n**Example**\r\n\r\nCalculating the correct position depends on the storage to retrieve. Consider the following contract deployed at 0x295a70b2de5e3953354a6a8344e616ed314d7251 by address 0x391694e7e0b0cce554cb130d723a9d27458f9298.\r\n\r\n```\r\ncontract Storage {\r\n uint pos0;\r\n mapping(address =\u003e uint) pos1;\r\n \r\n function Storage() {\r\n pos0 = 1234;\r\n pos1[msg.sender] = 5678;\r\n }\r\n}\r\n```\r\n\r\nRetrieving the value of pos0 is straight forward:\r\n\r\n```\r\ncurl -X POST --data '{\"jsonrpc\":\"2.0\", \"method\": \"eth_getStorageAt\", \"params\": [\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \"0x0\", \"latest\"], \"id\": 1}' {{ENVIRONMENT}}\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x00000000000000000000000000000000000000000000000000000000000004d2\"}\r\n```\r\n\r\nRetrieving an element of the map is harder. The position of an element in the map is calculated with:\r\n\r\n```\r\nkeccack(LeftPad32(key, 0), LeftPad32(map position, 0))\r\n```\r\n\r\nThis means to retrieve the storage on `pos1[\"0x391694e7e0b0cce554cb130d723a9d27458f9298\"]` we need to calculate the position with:\r\n\r\n```\r\nkeccak(decodeHex(\"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"))\r\n```\r\n\r\nThe geth console which comes with the web3 library can be used to make the calculation:\r\n\r\n```\r\n\u003e var key = \"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"\r\nundefined\r\n\u003e web3.sha3(key, {\"encoding\": \"hex\"})\r\n\"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9\"\r\n```", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\": \"eth_getStorageAt\", \n\t\"params\": [\n\t\t\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \n\t\t\"0x0\",\n\t\t\"latest\"\n\t], \n\t\"id\": 1\n}" + } + } + }, + { + "name": "getTransactionCount", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions sent from an address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address.\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n '0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest' // state at the latest block\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions send from this address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionCount\",\n\t\"params\":[\n\t\t\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block from a block matching the given block hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions in this block.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByHash\",\n\t\"params\":[\n\t\t\"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block matching the given block number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n```\r\nparams: [\r\n '0xe8', // 232\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - integer of the number of transactions in this block.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByNumber\",\n\t\"params\":[\n\t\t\"0x52A8CA\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCode", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns code at a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',\r\n '0x2' // 2\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - the code from the given address.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCode\",\n\t\"params\":[\n\t\t\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \n\t\t\"0x2\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sign", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "The sign method calculates an Ethereum specific signature with: `sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message)))`.\r\n\r\nBy adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.\r\n\r\n**Note:** the address to sign with must be unlocked.\r\n\r\n**Parameters**\r\n\r\naccount, message\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`DATA`, N Bytes - message to sign\r\n\r\n**Returns**\r\n\r\n`DATA`: Signature", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sign\",\n\t\"params\":[\n\t\t\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\", \n\t\t\"0xdeadbeaf\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation, if the data field contains code.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction object\r\n\r\n`from`: `DATA`, 20 Bytes - The address the transaction is send from.\r\n\r\n`to`: `DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.\r\n\r\n`gas`: `QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.\r\n\r\n`gasPrice`: `QUANTITY` - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`nonce`: `QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.\r\n\r\n```\r\nparams: [{\r\n \"from\": \" 0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\r\n \"to\": \" 0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\r\n \"gas\": \"0x76c0\", // 30400\r\n \"gasPrice\": \"0x9184e72a000\", // 10000000000000\r\n \"value\": \"0x9184e72a\", // 2441406250\r\n \"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendTransaction\",\n\t\"params\":[{\n\t\t\"from\": \"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\n\t\t\"to\": \"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\n\t\t\"gas\": \"0x76c0\",\n\t\t\"gasPrice\": \"0x9184e72a000\",\n\t\t\"value\": \"0x9184e72a\",\n\t\t\"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\n\t}],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendRawTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation for signed transactions.\r\n\r\n**Parameters**\r\n\r\n`DATA`, The signed transaction data.\r\n\r\n```\r\nparams: [\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendRawTransaction\",\n\t\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "call", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Executes a new message call immediately without creating a transaction on the block chain.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction call object\r\n\r\n`from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from.\r\n\r\n`to`: `DATA`, 20 Bytes - The address the transaction is directed to.\r\n\r\n`gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.\r\n\r\n`gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - the return value of executed contract.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_call\",\n\t\"params\":[{\n\t\t\"from\": \"\",\n\t\t\"to\": \"\",\n\t\t\"gas\": \"\",\n\t\t\"gasPrice\": \"\",\n\t\t\"value\": \"\",\n\t\t\"data\": \"\"\n\t}, \"latest\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "estimateGas", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.\r\n\r\n**Parameters**\r\n\r\nSee `eth_call` parameters, expect that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - the amount of gas used.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_estimateGas\",\n\t\"params\":[\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - Hash of a block.\r\n\r\n`Boolean` - If true it returns the full transaction objects, if false only the hashes of the transactions.\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found:\r\n\r\n`number`: `QUANTITY` - the block number. null when its pending block.\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block.\r\n\r\n`parentHash`: `DATA`, 32 Bytes - hash of the parent block.\r\n\r\n`nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block.\r\n\r\n`sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block.\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block.\r\n\r\n`transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block.\r\n\r\n`stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block.\r\n\r\n`receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block.\r\n\r\n`miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.\r\n\r\n`difficulty`: `QUANTITY` - integer of the difficulty for this block.\r\n\r\n`totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block.\r\n\r\n`extraData`: `DATA` - the \"extra data\" field of this block.\r\n\r\n`size`: `QUANTITY` - integer the size of this block in bytes.\r\n\r\n`gasLimit`: `QUANTITY` - the maximum gas allowed in this block.\r\n\r\n`gasUsed`: `QUANTITY` - the total used gas by all transactions in this block.\r\n\r\n`timestamp`: `QUANTITY` - the unix timestamp for when the block was collated.\r\n\r\n`transactions`: `Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.\r\n\r\n`uncles`: `Array` - Array of uncle hashes.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByHash\",\n\t\"params\":[\n\t\t\"0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by block number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.\r\n\r\n```\r\nparams: [\r\n '0x1b4', // 436\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByNumber\",\n\t\"params\":[\n\t\t\"0x1b4\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the information about a transaction requested by transaction hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n \"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction object, or null when no transaction was found:\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the transaction.\r\n\r\n`nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. `null` when its pending.\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in. `null` when its pending.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. `null` when its pending.\r\n\r\n`from`: `DATA`, 20 Bytes - address of the sender.\r\n\r\n`to`: `DATA`, 20 Bytes - address of the receiver. `null` when its a contract creation transaction.\r\n\r\n`value`: `QUANTITY` - value transferred in Wei.\r\n\r\n`gasPrice`: `QUANTITY` - gas price provided by the sender in Wei.\r\n\r\n`gas`: `QUANTITY` - gas provided by the sender.\r\n\r\n`input`: `DATA` - the data send along with the transaction.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByHash\",\n\t\"params\":[\n\t\t\"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block hash and transaction index position.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block.\r\n\r\n`QUANTITY` - integer of the transaction index position.\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getTransactionByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block number and transaction index position.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`QUANTITY` - the transaction index position.\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getTransactionByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x52A96E\", \n\t\t\"0x1\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionReceipt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the receipt of a transaction by transaction hash.\r\n\r\n**Note:** That the receipt is not available for pending transactions.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction receipt object, or `null` when no receipt was found:\r\n\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transaction.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position in the block.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in.\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in.\r\n\r\n`cumulativeGasUsed`: `QUANTITY` - The total amount of gas used when this transaction was executed in the block.\r\n\r\n`gasUsed`: `QUANTITY` - The amount of gas used by this specific transaction alone.\r\n\r\n`contractAddress`: `DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise `null`.\r\n\r\n`logs`: `Array` - Array of log objects, which this transaction generated.\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.\r\n\r\nIt also returns either :\r\n\r\n`root` : `DATA` 32 bytes of post-transaction stateroot (pre Byzantium)\r\n\r\n`status`: `QUANTITY` either `1` (success) or `0` (failure)", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionReceipt\",\n\t\"params\":[\n\t\t\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by hash and uncle index position.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash a block.\r\n\r\n`QUANTITY` - the uncle's index position.\r\n\r\n```\r\nparams: [\r\n '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by number and uncle index position.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter.\r\n\r\n`QUANTITY` - the uncle's index position.\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getBlockByHash`\r\n\r\n**Note:** An uncle doesn't contain individual transactions.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x29c\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCompilers", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of available compilers in the client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array of available compilers.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCompilers\",\n\t\"params\":[],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileLLL", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled LLL code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"(returnlll (suicide (caller)))\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileLLL\",\n\t\"params\":[\n\t\t\"(returnlll (suicide (caller)))\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileSolidity", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled solidity code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSolidity\",\n\t\"params\":[\n\t\t\"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "compileSerpent", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled serpent code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"/* some serpent */\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSerpent\",\n\t\"params\":[\"/* some serpent */\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "newFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**A note on specifying topic filters:**\r\n\r\nTopics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:\r\n\r\n`[]` \"anything\"\r\n\r\n`[A]` \"A in first position (and anything after)\"\r\n\r\n`[null, B]` \"anything in first position AND B in second position (and anything after)\"\r\n\r\n`[A, B]` \"A in first position AND B in second position (and anything after)\"\r\n\r\n`[[A, B], [A, B]]` \"(A OR B) in first position AND (A OR B) in second position (and anything after)\"\r\n\r\n**Parameters**\r\n\r\n`Object` - The filter options:\r\n\r\n`fromBlock`: `QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.\r\n\r\n`toBlock`: `QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.\r\n\r\n`address`: `DATA|Array`, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.\r\n\r\n`topics`: `Array of DATA`, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with \"or\" options.\r\n\r\n```\r\nparams: [{\r\n \"fromBlock\": \"0x1\",\r\n \"toBlock\": \"0x2\",\r\n \"address\": \" 0x8888f1f195afa192cfee860698584c030f4c9db1\",\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", null, [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc\"]]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newFilter\",\n\t\"params\":[\n\t\t{\n\t\t\t\"topics\":[\"0x12341234\"]\n\t\t}\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "newBlockFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newBlockFilter\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "newPendingTransactionFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newPendingTransactionFilter\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "uninstallFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren't requested with `eth_getFilterChanges` for a period of time.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id.\r\n\r\n```\r\nparams: [\r\n \"0xb\" // 11\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the filter was successfully uninstalled, otherwise `false`.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_uninstallFilter\",\n\t\"params\":[\n\t\t\"0xb\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "getFilterChanges", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Polling method for a filter, which returns an array of logs which occurred since last poll.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - the filter id.\r\n\r\n```\r\nparams: [\r\n \"0x16\" // 22\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of log objects, or an empty array if nothing has changed since last poll.\r\n\r\nFor filters created with `eth_newBlockFilter` the return are block hashes (`DATA`, 32 Bytes), e.g. `[\"0x3454645634534...\"]`.\r\n\r\nFor filters created with `eth_newPendingTransactionFilter` the return are transaction hashes (`DATA`, 32 Bytes), e.g. `[\"0x6345343454645...\"]`.\r\n\r\nFor filters created with `eth_newFilter` logs are objects with following params:\r\n\r\n`removed`: `TAG` - true when the log was removed, due to a chain reorganization. false if its a valid log.\r\n\r\n`logIndex`: `QUANTITY` - integer of the log index position in the block. `null` when its pending log.\r\n\r\n`transactionIndex`: `QUANTITY` - integer of the transactions index position log was created from. `null` when its pending log.\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. `null` when its pending log.\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. `null` when its pending. `null` when its pending log.\r\n\r\n`blockNumber`: `QUANTITY` - the block number where this log was in. `null` when its pending. `null` when its pending log.\r\n\r\n`address`: `DATA`, 20 Bytes - address from which this log originated.\r\n\r\n`data`: `DATA` - contains one or more 32 Bytes non-indexed arguments of the log.\r\n\r\n`topics`: `Array of DATA` - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. `Deposit(address,bytes32,uint256)`), except you declared the event with the anonymous specifier.)", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getFilterChanges\",\n\t\"params\":[\n\t\t\"0x16\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "getLogs", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an array of all logs matching a given filter object.\r\n\r\n**Parameters**\r\n\r\n`Object` - the filter object, see eth_newFilter parameters.\r\n\r\n```\r\nparams: [{\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\nSee `eth_getFilterChanges`", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getLogs\",\n\t\"params\":[{\n\t\t\"topics\":[\n\t\t\t\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"\n\t\t]\n\t}],\n\t\"id\":74\n}" + } + } + }, + { + "name": "getWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the hash of the current block, the seedHash, and the boundary condition to be met (\"target\").\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array with the following properties:\r\n\r\n`DATA`, 32 Bytes - current block header pow-hash\r\n\r\n`DATA`, 32 Bytes - the seed hash used for the DAG.\r\n\r\n`DATA`, 32 Bytes - the boundary condition (\"target\"), 2^256 / difficulty.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getWork\",\n\t\"params\":[],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting a proof-of-work solution.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 8 Bytes - The nonce found (64 bits)\r\n\r\n`DATA`, 32 Bytes - The header's pow-hash (256 bits)\r\n\r\n`DATA`, 32 Bytes - The mix digest (256 bits)\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000001\",\r\n \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\r\n \"0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns true if the provided solution is valid, otherwise false.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitWork\", \n\t\"params\":[\n\t\t\"0x0000000000000001\", \n\t\t\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \n\t\t\"0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitHashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting mining hashrate.\r\n\r\n**Parameters**\r\n\r\n`Hashrate`, a hexadecimal string representation (32 bytes) of the hash rate\r\n\r\n`ID`, String - A random hexadecimal(32 bytes) ID identifying the client\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000000000000000000000000000000000000000000000000500000\",\r\n \"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - returns `true` if submitting went through succesfully and `false` otherwise.", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitHashrate\", \n\t\"params\":[\n\t\t\"0x0000000000000000000000000000000000000000000000000000000000500000\", \n\t\t\"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\n\t],\n\t\"id\":73\n}" + } + } + } + ] + } + ], + "variable": [ + { + "id": "ENVIRONMENT", + "name": "Base url", + "description": "Base url of the omnirpc server" + }, + { + "id": "CHAIN_ID", + "name": "Chain ID", + "description": "Chain ID to send requests to" + }, + { + "id": "CONFIRMATIONS", + "name": "Confirmations", + "description": "Confirmation count" + } + ] +} \ No newline at end of file diff --git a/services/omnirpc/swagger/generate.go b/services/omnirpc/swagger/generate.go new file mode 100644 index 0000000000..8492f81ab7 --- /dev/null +++ b/services/omnirpc/swagger/generate.go @@ -0,0 +1,27 @@ +// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. +// this is purely meant for static linking in the repo. +package main + +import ( + "github.com/synapsecns/sanguine/services/omnirpc/collection" + "os" +) + +//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger + +func main() { + res, err := collection.CreateCollection() + if err != nil { + panic(err) + } + + file, err := os.Create("collection.json") + if err != nil { + panic(err) + } + + _, err = file.Write(res) + if err != nil { + panic(err) + } +} From eb379ab168914744c08f36bdefb92ba42c25961b Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Tue, 14 May 2024 12:24:24 +0100 Subject: [PATCH 2/3] embed swagger ui --- agents/go.mod | 1 + agents/go.sum | 2 + committee/go.mod | 1 + committee/go.sum | 2 + contrib/promexporter/go.sum | 2 + docs/bridge/docs/Services/Omnirpc.md | 2 +- services/cctp-relayer/go.mod | 1 + services/cctp-relayer/go.sum | 2 + services/explorer/go.mod | 1 + services/explorer/go.sum | 2 + services/omnirpc/README.md | 5 +- services/omnirpc/go.mod | 1 + services/omnirpc/go.sum | 2 + .../confirmedtofinalized/finalizedproxy.go | 4 + .../modules/harmonyproxy/harmonyproxy.go | 4 + services/omnirpc/proxy/server.go | 4 + services/omnirpc/swagger/gen.sh | 5 + services/omnirpc/swagger/generate.go | 33 +- services/omnirpc/swagger/generator/main.go | 25 + services/omnirpc/swagger/openapi.yaml | 688 ++++++++++++++++++ services/rfq/go.mod | 5 +- services/rfq/go.sum | 2 + services/scribe/go.mod | 1 + services/scribe/go.sum | 2 + services/stiprelayer/go.mod | 1 + services/stiprelayer/go.sum | 2 + sin-executor/go.mod | 1 + sin-executor/go.sum | 2 + 28 files changed, 774 insertions(+), 29 deletions(-) create mode 100755 services/omnirpc/swagger/gen.sh create mode 100644 services/omnirpc/swagger/generator/main.go create mode 100644 services/omnirpc/swagger/openapi.yaml diff --git a/agents/go.mod b/agents/go.mod index bb9af88038..3c5483b5de 100644 --- a/agents/go.mod +++ b/agents/go.mod @@ -58,6 +58,7 @@ require ( github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect diff --git a/agents/go.sum b/agents/go.sum index c36806dc1b..3255d0e076 100644 --- a/agents/go.sum +++ b/agents/go.sum @@ -398,6 +398,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/friendsofgo/graphiql v0.2.2 h1:ccnuxpjgIkB+Lr9YB2ZouiZm7wvciSfqwpa9ugWzmn0= diff --git a/committee/go.mod b/committee/go.mod index 34b080536d..3a88799b91 100644 --- a/committee/go.mod +++ b/committee/go.mod @@ -123,6 +123,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect diff --git a/committee/go.sum b/committee/go.sum index 1e7e35e86d..8c621eb2b4 100644 --- a/committee/go.sum +++ b/committee/go.sum @@ -383,6 +383,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= diff --git a/contrib/promexporter/go.sum b/contrib/promexporter/go.sum index 14d0ce0d99..80d5f24d72 100644 --- a/contrib/promexporter/go.sum +++ b/contrib/promexporter/go.sum @@ -615,6 +615,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= diff --git a/docs/bridge/docs/Services/Omnirpc.md b/docs/bridge/docs/Services/Omnirpc.md index c5fbf284b4..e719fc0278 100644 --- a/docs/bridge/docs/Services/Omnirpc.md +++ b/docs/bridge/docs/Services/Omnirpc.md @@ -74,6 +74,6 @@ curl --location --request POST 'http://localhost:5000/rpc/1' \ }' ``` -A full postman collection can be found [here](https://github.com/synapsecns/sanguine/blob/master/services/omnirpc/swagger/collection.json) or at the `/collection.json endpoint` +A full postman collection can be found [here](https://github.com/synapsecns/sanguine/blob/master/services/omnirpc/swagger/collection.json) or at the `/collection.json endpoint`. Swagger docs are also available at `/swagger`. Not all requests are confirmable. Please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/services/omnirpc#section-readme) for details. diff --git a/services/cctp-relayer/go.mod b/services/cctp-relayer/go.mod index 2bc9bd7c1f..444486481b 100644 --- a/services/cctp-relayer/go.mod +++ b/services/cctp-relayer/go.mod @@ -102,6 +102,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/services/cctp-relayer/go.sum b/services/cctp-relayer/go.sum index 61fef589d5..8dd076ec63 100644 --- a/services/cctp-relayer/go.sum +++ b/services/cctp-relayer/go.sum @@ -351,6 +351,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= diff --git a/services/explorer/go.mod b/services/explorer/go.mod index 9da6657710..7a124a0ea8 100644 --- a/services/explorer/go.mod +++ b/services/explorer/go.mod @@ -114,6 +114,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/services/explorer/go.sum b/services/explorer/go.sum index 2a51b1bda2..45aed34636 100644 --- a/services/explorer/go.sum +++ b/services/explorer/go.sum @@ -617,6 +617,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= diff --git a/services/omnirpc/README.md b/services/omnirpc/README.md index db538302ef..e5b2cb67d5 100644 --- a/services/omnirpc/README.md +++ b/services/omnirpc/README.md @@ -1,6 +1,6 @@ # OmniRPC -[![Go Reference](https://pkg.go.dev/badge/github.com/synapsecns/sanguine/services/omnirpc.svg)](https://pkg.go.dev/github.com/synapsecns/sanguine/services/omnirpc) +[![Go Reference](httpsa://pkg.go.dev/badge/github.com/synapsecns/sanguine/services/omnirpc.svg)](https://pkg.go.dev/github.com/synapsecns/sanguine/services/omnirpc) [![Go Report Card](https://goreportcard.com/badge/github.com/synapsecns/sanguine/services/omnirpc)](https://goreportcard.com/report/github.com/synapsecns/sanguine/services/omnirpc) @@ -73,7 +73,7 @@ This is because chains might have different states for "latest", resulting in fa You can also query using a customizable number of confirmations using (for 2 confirmations on eth): `http://localhost:5000/confirmations/2/rpc/1`. -A postman collection is also available at `/collection.json` +A full postman collection can be found [here](https://github.com/synapsecns/sanguine/blob/master/services/omnirpc/swagger/collection.json) or at the `/collection.json endpoint` Confirmable only when latest or pending are not passed: @@ -122,3 +122,4 @@ You can also quickly start a server running against all public chainlist rpcs wi ## Additional functionality Please see [modules/README.md](modules/README.md) for additional functionality. + diff --git a/services/omnirpc/go.mod b/services/omnirpc/go.mod index 2a374e7527..7576d1402d 100644 --- a/services/omnirpc/go.mod +++ b/services/omnirpc/go.mod @@ -16,6 +16,7 @@ require ( github.com/buger/jsonparser v1.1.1 github.com/davecgh/go-spew v1.1.1 github.com/ethereum/go-ethereum v1.11.6 + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b github.com/gin-gonic/gin v1.9.1 github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a github.com/go-resty/resty/v2 v2.11.0 diff --git a/services/omnirpc/go.sum b/services/omnirpc/go.sum index 6de0a00c26..b5bcc2c8e6 100644 --- a/services/omnirpc/go.sum +++ b/services/omnirpc/go.sum @@ -339,6 +339,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= diff --git a/services/omnirpc/modules/confirmedtofinalized/finalizedproxy.go b/services/omnirpc/modules/confirmedtofinalized/finalizedproxy.go index 710052efc3..a50d61241a 100644 --- a/services/omnirpc/modules/confirmedtofinalized/finalizedproxy.go +++ b/services/omnirpc/modules/confirmedtofinalized/finalizedproxy.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" + "github.com/flowchartsman/swaggerui" "github.com/gin-gonic/gin" "github.com/synapsecns/sanguine/core/ginhelper" "github.com/synapsecns/sanguine/core/metrics" @@ -17,6 +18,7 @@ import ( "github.com/synapsecns/sanguine/ethergo/parser/rpc" "github.com/synapsecns/sanguine/services/omnirpc/collection" omniHTTP "github.com/synapsecns/sanguine/services/omnirpc/http" + "github.com/synapsecns/sanguine/services/omnirpc/swagger" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" "io" @@ -82,6 +84,8 @@ func (r *finalizedProxyImpl) Run(ctx context.Context) error { c.Data(http.StatusOK, gin.MIMEJSON, res) }) + router.Any("/swagger/*any", gin.WrapH(http.StripPrefix("/swagger", swaggerui.Handler(swagger.OpenAPI)))) + r.logger.Infof(ctx, "running on port %d", r.port) err := router.Run(fmt.Sprintf("0.0.0.0:%d", r.port)) if err != nil { diff --git a/services/omnirpc/modules/harmonyproxy/harmonyproxy.go b/services/omnirpc/modules/harmonyproxy/harmonyproxy.go index 12da8893d8..5a1701cf46 100644 --- a/services/omnirpc/modules/harmonyproxy/harmonyproxy.go +++ b/services/omnirpc/modules/harmonyproxy/harmonyproxy.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/filters" + "github.com/flowchartsman/swaggerui" "github.com/gin-gonic/gin" "github.com/ipfs/go-log" "github.com/synapsecns/sanguine/core/ginhelper" @@ -19,6 +20,7 @@ import ( "github.com/synapsecns/sanguine/services/omnirpc/collection" omniHTTP "github.com/synapsecns/sanguine/services/omnirpc/http" "github.com/synapsecns/sanguine/services/omnirpc/proxy" + "github.com/synapsecns/sanguine/services/omnirpc/swagger" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" "golang.org/x/sync/errgroup" @@ -71,6 +73,8 @@ func (r *HarmonyProxy) Run(_ context.Context) error { } }) + router.Any("/swagger/*any", gin.WrapH(http.StripPrefix("/swagger", swaggerui.Handler(swagger.OpenAPI)))) + router.GET("/collection.json", func(c *gin.Context) { res, err := collection.CreateCollection() if err != nil { diff --git a/services/omnirpc/proxy/server.go b/services/omnirpc/proxy/server.go index b7734f7214..21276ee463 100644 --- a/services/omnirpc/proxy/server.go +++ b/services/omnirpc/proxy/server.go @@ -3,6 +3,7 @@ package proxy import ( "context" "fmt" + "github.com/flowchartsman/swaggerui" "github.com/gin-gonic/gin" "github.com/synapsecns/sanguine/core/ginhelper" "github.com/synapsecns/sanguine/core/metrics" @@ -10,6 +11,7 @@ import ( "github.com/synapsecns/sanguine/services/omnirpc/collection" "github.com/synapsecns/sanguine/services/omnirpc/config" omniHTTP "github.com/synapsecns/sanguine/services/omnirpc/http" + "github.com/synapsecns/sanguine/services/omnirpc/swagger" "go.opentelemetry.io/otel/trace" "net/http" "strconv" @@ -96,6 +98,8 @@ func (r *RPCProxy) Run(ctx context.Context) { c.JSON(http.StatusOK, r.chainManager.GetChainIDs()) }) + router.Any("/swagger/*any", gin.WrapH(http.StripPrefix("/swagger", swaggerui.Handler(swagger.OpenAPI)))) + router.GET("/collection.json", func(c *gin.Context) { res, err := collection.CreateCollection() if err != nil { diff --git a/services/omnirpc/swagger/gen.sh b/services/omnirpc/swagger/gen.sh new file mode 100755 index 0000000000..a401d45615 --- /dev/null +++ b/services/omnirpc/swagger/gen.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cargo install postman2openapi-cli +# As go:generate does not support unix pipes, we need to do this here +postman2openapi collection.json > openapi.yaml diff --git a/services/omnirpc/swagger/generate.go b/services/omnirpc/swagger/generate.go index 8492f81ab7..ef1added6f 100644 --- a/services/omnirpc/swagger/generate.go +++ b/services/omnirpc/swagger/generate.go @@ -1,27 +1,12 @@ -// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. -// this is purely meant for static linking in the repo. -package main +// Package swagger registers the swagger generated spec. +package swagger -import ( - "github.com/synapsecns/sanguine/services/omnirpc/collection" - "os" -) +import _ "embed" // embed is required for go:embed -//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger +//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger/generator +//go:generate ./gen.sh -func main() { - res, err := collection.CreateCollection() - if err != nil { - panic(err) - } - - file, err := os.Create("collection.json") - if err != nil { - panic(err) - } - - _, err = file.Write(res) - if err != nil { - panic(err) - } -} +// OpenAPI is the openapi specification for the omnirpc service. +// +//go:embed openapi.yaml +var OpenAPI []byte diff --git a/services/omnirpc/swagger/generator/main.go b/services/omnirpc/swagger/generator/main.go new file mode 100644 index 0000000000..a80635a4cb --- /dev/null +++ b/services/omnirpc/swagger/generator/main.go @@ -0,0 +1,25 @@ +// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. +// this is purely meant for static linking in the repo. +package main + +import ( + "github.com/synapsecns/sanguine/services/omnirpc/collection" + "os" +) + +func main() { + res, err := collection.CreateCollection() + if err != nil { + panic(err) + } + + file, err := os.Create("collection.json") + if err != nil { + panic(err) + } + + _, err = file.Write(res) + if err != nil { + panic(err) + } +} diff --git a/services/omnirpc/swagger/openapi.yaml b/services/omnirpc/swagger/openapi.yaml new file mode 100644 index 0000000000..cfa5ce4c23 --- /dev/null +++ b/services/omnirpc/swagger/openapi.yaml @@ -0,0 +1,688 @@ +openapi: 3.0.3 +info: + title: Ethereum JSON-RPC + description: A collection holding all the Ethereum JSIN RPC API calls + version: 1.0.0 + contact: {} +servers: +- url: '{{ENVIRONMENT}}' +paths: + /rpc/{CHAIN_ID}: + post: + tags: + - eth + summary: protocolVersion + description: "Returns the current ethereum protocol version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current ethereum protocol version" + operationId: protocolversion + requestBody: + content: + application/json: + schema: + type: object + properties: + id: + type: number + example: 73 + jsonrpc: + type: string + example: '2.0' + method: + type: string + example: eth_submitHashrate + params: + type: array + items: + type: string + example: '0x0000000000000000000000000000000000000000000000000000000000500000' + example: + - '0x0000000000000000000000000000000000000000000000000000000000500000' + - 0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c + examples: + accounts: + value: + id: 1 + jsonrpc: '2.0' + method: eth_accounts + params: [] + blockNumber: + value: + id: 83 + jsonrpc: '2.0' + method: eth_blockNumber + params: [] + call: + value: + id: 1 + jsonrpc: '2.0' + method: eth_call + params: + - data: '' + from: '' + gas: '' + gasPrice: '' + to: '' + value: '' + - latest + coinbase: + value: + id: 64 + jsonrpc: '2.0' + method: eth_coinbase + params: [] + compileLLL: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileLLL + params: + - (returnlll (suicide (caller))) + compileSerpent: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileSerpent + params: + - /* some serpent */ + compileSolidity: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileSolidity + params: + - contract test { function multiply(uint a) returns(uint d) { return a * 7; } } + estimateGas: + value: + id: 1 + jsonrpc: '2.0' + method: eth_estimateGas + params: [] + gasPrice: + value: + id: 73 + jsonrpc: '2.0' + method: eth_gasPrice + params: [] + getBalance: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBalance + params: + - 0x407d73d8a49eeb85d32cf465507dd71d507100c1 + - latest + getBlockByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockByHash + params: + - 0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169 + - true + getBlockByNumber: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockByNumber + params: + - '0x1b4' + - true + getBlockTransactionCountByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockTransactionCountByHash + params: + - 0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238 + getBlockTransactionCountByNumber: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockTransactionCountByNumber + params: + - '0x52A8CA' + getCode: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getCode + params: + - 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b + - '0x2' + getCompilers: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getCompilers + params: [] + getFilterChanges: + value: + id: 73 + jsonrpc: '2.0' + method: eth_getFilterChanges + params: + - '0x16' + getLogs: + value: + id: 74 + jsonrpc: '2.0' + method: eth_getLogs + params: + - topics: + - 0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b + getStorageAt: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getStorageAt + params: + - 0x295a70b2de5e3953354a6a8344e616ed314d7251 + - '0x0' + - latest + getTransactionByBlockHashAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByBlockHashAndIndex + params: + - 0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7 + - '0x0' + getTransactionByBlockNumberAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByBlockNumberAndIndex + params: + - '0x52A96E' + - '0x1' + getTransactionByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByHash + params: + - 0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee + getTransactionCount: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionCount + params: + - 0x407d73d8a49eeb85d32cf465507dd71d507100c1 + - latest + getTransactionReceipt: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionReceipt + params: + - 0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f + getUncleByBlockHashAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getUncleByBlockHashAndIndex + params: + - 0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc + - '0x0' + getUncleByBlockNumberAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getUncleByBlockNumberAndIndex + params: + - '0x29c' + - '0x0' + getWork: + value: + id: 73 + jsonrpc: '2.0' + method: eth_getWork + params: [] + hashrate: + value: + id: 71 + jsonrpc: '2.0' + method: eth_hashrate + params: [] + mining: + value: + id: 71 + jsonrpc: '2.0' + method: eth_mining + params: [] + newBlockFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newBlockFilter + params: [] + newFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newFilter + params: + - topics: + - '0x12341234' + newPendingTransactionFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newPendingTransactionFilter + params: [] + protocolVersion: + value: + id: 67 + jsonrpc: '2.0' + method: eth_protocolVersion + params: [] + sendRawTransaction: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sendRawTransaction + params: + - 0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675 + sendTransaction: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sendTransaction + params: + - data: 0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675 + from: 0xb60e8dd61c5d32be8058bb8eb970870f07233155 + gas: '0x76c0' + gasPrice: '0x9184e72a000' + to: 0xd46e8dd67c5d32be8058bb8eb970870f07244567 + value: '0x9184e72a' + sign: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sign + params: + - 0x9b2055d370f73ec7d8a03e965129118dc8f5bf83 + - '0xdeadbeaf' + submitHashrate: + value: + id: 73 + jsonrpc: '2.0' + method: eth_submitHashrate + params: + - '0x0000000000000000000000000000000000000000000000000000000000500000' + - 0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c + submitWork: + value: + id: 73 + jsonrpc: '2.0' + method: eth_submitWork + params: + - '0x0000000000000001' + - 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + - 0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000 + syncing: + value: + id: 1 + jsonrpc: '2.0' + method: eth_syncing + params: [] + uninstallFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_uninstallFilter + params: + - '0xb' + responses: + '200': + description: '' + parameters: + - name: CHAIN_ID + in: path + required: true + schema: + type: string + /confirmations/{CONFIRMATIONS}/rpc/{CHAIN_ID}: + post: + tags: + - eth (confirmations) + summary: protocolVersion + description: "Returns the current ethereum protocol version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current ethereum protocol version" + operationId: protocolversion1 + requestBody: + content: + application/json: + schema: + type: object + properties: + id: + type: number + example: 73 + jsonrpc: + type: string + example: '2.0' + method: + type: string + example: eth_submitHashrate + params: + type: array + items: + type: string + example: '0x0000000000000000000000000000000000000000000000000000000000500000' + example: + - '0x0000000000000000000000000000000000000000000000000000000000500000' + - 0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c + examples: + accounts: + value: + id: 1 + jsonrpc: '2.0' + method: eth_accounts + params: [] + blockNumber: + value: + id: 83 + jsonrpc: '2.0' + method: eth_blockNumber + params: [] + call: + value: + id: 1 + jsonrpc: '2.0' + method: eth_call + params: + - data: '' + from: '' + gas: '' + gasPrice: '' + to: '' + value: '' + - latest + coinbase: + value: + id: 64 + jsonrpc: '2.0' + method: eth_coinbase + params: [] + compileLLL: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileLLL + params: + - (returnlll (suicide (caller))) + compileSerpent: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileSerpent + params: + - /* some serpent */ + compileSolidity: + value: + id: 1 + jsonrpc: '2.0' + method: eth_compileSolidity + params: + - contract test { function multiply(uint a) returns(uint d) { return a * 7; } } + estimateGas: + value: + id: 1 + jsonrpc: '2.0' + method: eth_estimateGas + params: [] + gasPrice: + value: + id: 73 + jsonrpc: '2.0' + method: eth_gasPrice + params: [] + getBalance: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBalance + params: + - 0x407d73d8a49eeb85d32cf465507dd71d507100c1 + - latest + getBlockByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockByHash + params: + - 0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169 + - true + getBlockByNumber: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockByNumber + params: + - '0x1b4' + - true + getBlockTransactionCountByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockTransactionCountByHash + params: + - 0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238 + getBlockTransactionCountByNumber: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getBlockTransactionCountByNumber + params: + - '0x52A8CA' + getCode: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getCode + params: + - 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b + - '0x2' + getCompilers: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getCompilers + params: [] + getFilterChanges: + value: + id: 73 + jsonrpc: '2.0' + method: eth_getFilterChanges + params: + - '0x16' + getLogs: + value: + id: 74 + jsonrpc: '2.0' + method: eth_getLogs + params: + - topics: + - 0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b + getStorageAt: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getStorageAt + params: + - 0x295a70b2de5e3953354a6a8344e616ed314d7251 + - '0x0' + - latest + getTransactionByBlockHashAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByBlockHashAndIndex + params: + - 0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7 + - '0x0' + getTransactionByBlockNumberAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByBlockNumberAndIndex + params: + - '0x52A96E' + - '0x1' + getTransactionByHash: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionByHash + params: + - 0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee + getTransactionCount: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionCount + params: + - 0x407d73d8a49eeb85d32cf465507dd71d507100c1 + - latest + getTransactionReceipt: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getTransactionReceipt + params: + - 0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f + getUncleByBlockHashAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getUncleByBlockHashAndIndex + params: + - 0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc + - '0x0' + getUncleByBlockNumberAndIndex: + value: + id: 1 + jsonrpc: '2.0' + method: eth_getUncleByBlockNumberAndIndex + params: + - '0x29c' + - '0x0' + getWork: + value: + id: 73 + jsonrpc: '2.0' + method: eth_getWork + params: [] + hashrate: + value: + id: 71 + jsonrpc: '2.0' + method: eth_hashrate + params: [] + mining: + value: + id: 71 + jsonrpc: '2.0' + method: eth_mining + params: [] + newBlockFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newBlockFilter + params: [] + newFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newFilter + params: + - topics: + - '0x12341234' + newPendingTransactionFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_newPendingTransactionFilter + params: [] + protocolVersion: + value: + id: 67 + jsonrpc: '2.0' + method: eth_protocolVersion + params: [] + sendRawTransaction: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sendRawTransaction + params: + - 0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675 + sendTransaction: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sendTransaction + params: + - data: 0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675 + from: 0xb60e8dd61c5d32be8058bb8eb970870f07233155 + gas: '0x76c0' + gasPrice: '0x9184e72a000' + to: 0xd46e8dd67c5d32be8058bb8eb970870f07244567 + value: '0x9184e72a' + sign: + value: + id: 1 + jsonrpc: '2.0' + method: eth_sign + params: + - 0x9b2055d370f73ec7d8a03e965129118dc8f5bf83 + - '0xdeadbeaf' + submitHashrate: + value: + id: 73 + jsonrpc: '2.0' + method: eth_submitHashrate + params: + - '0x0000000000000000000000000000000000000000000000000000000000500000' + - 0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c + submitWork: + value: + id: 73 + jsonrpc: '2.0' + method: eth_submitWork + params: + - '0x0000000000000001' + - 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + - 0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000 + syncing: + value: + id: 1 + jsonrpc: '2.0' + method: eth_syncing + params: [] + uninstallFilter: + value: + id: 73 + jsonrpc: '2.0' + method: eth_uninstallFilter + params: + - '0xb' + responses: + '200': + description: '' + parameters: + - name: CONFIRMATIONS + in: path + required: true + schema: + type: string + - name: CHAIN_ID + in: path + required: true + schema: + type: string +tags: +- name: eth +- name: eth (confirmations) + diff --git a/services/rfq/go.mod b/services/rfq/go.mod index 8f97054aeb..7db104229e 100644 --- a/services/rfq/go.mod +++ b/services/rfq/go.mod @@ -6,7 +6,6 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 - github.com/dubonzi/otelresty v1.2.0 github.com/ethereum/go-ethereum v1.11.6 github.com/gin-gonic/gin v1.9.1 github.com/go-resty/resty/v2 v2.11.0 @@ -28,6 +27,7 @@ require ( github.com/synapsecns/sanguine/services/cctp-relayer v0.0.0-00010101000000-000000000000 github.com/synapsecns/sanguine/services/omnirpc v0.0.0-00010101000000-000000000000 github.com/urfave/cli/v2 v2.27.1 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 go.opentelemetry.io/otel v1.23.1 go.opentelemetry.io/otel/metric v1.23.1 go.opentelemetry.io/otel/trace v1.23.1 @@ -108,11 +108,13 @@ require ( github.com/docker/docker v20.10.23+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/dubonzi/otelresty v1.2.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect @@ -257,7 +259,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.21.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect diff --git a/services/rfq/go.sum b/services/rfq/go.sum index 659f5fa431..866c20aa08 100644 --- a/services/rfq/go.sum +++ b/services/rfq/go.sum @@ -355,6 +355,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= diff --git a/services/scribe/go.mod b/services/scribe/go.mod index 04b3aa8a94..f4e8e6dbde 100644 --- a/services/scribe/go.mod +++ b/services/scribe/go.mod @@ -129,6 +129,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/services/scribe/go.sum b/services/scribe/go.sum index 8a6b885179..83e669e5da 100644 --- a/services/scribe/go.sum +++ b/services/scribe/go.sum @@ -381,6 +381,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/friendsofgo/graphiql v0.2.2 h1:ccnuxpjgIkB+Lr9YB2ZouiZm7wvciSfqwpa9ugWzmn0= diff --git a/services/stiprelayer/go.mod b/services/stiprelayer/go.mod index 4220562603..317e34883d 100644 --- a/services/stiprelayer/go.mod +++ b/services/stiprelayer/go.mod @@ -97,6 +97,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/services/stiprelayer/go.sum b/services/stiprelayer/go.sum index 2a7c841ed6..459f8247b9 100644 --- a/services/stiprelayer/go.sum +++ b/services/stiprelayer/go.sum @@ -347,6 +347,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= diff --git a/sin-executor/go.mod b/sin-executor/go.mod index 2d787e7c88..dc02536d87 100644 --- a/sin-executor/go.mod +++ b/sin-executor/go.mod @@ -102,6 +102,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fjl/memsize v0.0.2 // indirect + github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/sin-executor/go.sum b/sin-executor/go.sum index 9e339d4b3c..33f1c52e67 100644 --- a/sin-executor/go.sum +++ b/sin-executor/go.sum @@ -340,6 +340,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI= +github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= From db72d4e71d3802e250e3aaa6ab68354e2bd63d47 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Tue, 14 May 2024 12:27:15 +0100 Subject: [PATCH 3/3] generic lint fixer --- .yamllint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.yamllint.yml b/.yamllint.yml index d9d0b6c6ce..224200f36d 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -2,6 +2,7 @@ ignore: | **/node_modules/** **/charts/** **/swagger.yaml + **/openapi.yaml rules: document-start: