diff --git a/packages/parsers/package.json b/packages/parsers/package.json index c71bc660ef..21ed5858e0 100644 --- a/packages/parsers/package.json +++ b/packages/parsers/package.json @@ -1,6 +1,6 @@ { "name": "@fern-api/docs-parsers", - "version": "0.0.43", + "version": "0.0.44", "repository": { "type": "git", "url": "https://github.com/fern-api/fern-platform.git", diff --git a/packages/parsers/src/openrpc/1.x/MethodConverter.node.ts b/packages/parsers/src/openrpc/1.x/MethodConverter.node.ts index a2339b1761..27b855f09a 100644 --- a/packages/parsers/src/openrpc/1.x/MethodConverter.node.ts +++ b/packages/parsers/src/openrpc/1.x/MethodConverter.node.ts @@ -155,14 +155,21 @@ export class MethodConverterNode extends BaseOpenrpcConverterNode< resolvedExample.params.length > 0 ? { type: "json", - value: resolvedExample.params.map((param) => { - const resolvedParam = resolveExample( - param, - this.context.openrpc - ); - if (!resolvedParam) return undefined; - return resolvedParam.value; - }), + value: Object.fromEntries( + resolvedExample.params + .map((param) => { + const resolvedParam = resolveExample( + param, + this.context.openrpc + ); + if (!resolvedParam) return undefined; + return [ + resolvedParam.name ?? "", + resolvedParam.value, + ]; + }) + .filter(isNonNullish) + ), } : undefined, responseStatusCode: 200, @@ -175,6 +182,18 @@ export class MethodConverterNode extends BaseOpenrpcConverterNode< .filter(isNonNullish) ?? []; if (examples.length <= 0) { + const requestBody = generateExampleForJsonSchema({ + type: "object", + properties: Object.fromEntries( + this.method.params?.map((param) => { + const resolvedParam = resolveContentDescriptorObject( + param, + this.context.openrpc + ); + return [resolvedParam?.name ?? "", resolvedParam?.schema ?? {}]; + }) ?? [] + ), + }); const example = { name: "Example", path: "", @@ -183,21 +202,12 @@ export class MethodConverterNode extends BaseOpenrpcConverterNode< headers: {}, requestBody: { type: "json" as const, - value: generateExampleForJsonSchema({ - type: "object", - properties: Object.fromEntries( - this.method.params?.map((param) => { - const resolvedParam = resolveContentDescriptorObject( - param, - this.context.openrpc - ); - return [ - resolvedParam?.name ?? "", - resolvedParam?.schema ?? {}, - ]; - }) ?? [] - ), - }), + value: { + id: 1, + jsonrpc: "2.0", + method: this.method.name, + params: requestBody, + }, }, responseStatusCode: 200, responseBody: { diff --git a/packages/parsers/src/openrpc/__test__/__snapshots__/ethereum.json b/packages/parsers/src/openrpc/__test__/__snapshots__/ethereum.json index b813f78c97..6edf3cd6e3 100644 --- a/packages/parsers/src/openrpc/__test__/__snapshots__/ethereum.json +++ b/packages/parsers/src/openrpc/__test__/__snapshots__/ethereum.json @@ -1336,7 +1336,12 @@ "id": 1, "jsonrpc": "2.0", "method": "web3_clientVersion", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "web3_clientVersion", + "params": {} + } } }, "responseStatusCode": 200, @@ -1435,9 +1440,9 @@ "id": 1, "jsonrpc": "2.0", "method": "web3_sha3", - "params": [ - "0x68656c6c6f20776f726c64" - ] + "params": { + "sha3ParamExample": "0x68656c6c6f20776f726c64" + } } }, "responseStatusCode": 200, @@ -1582,7 +1587,12 @@ "id": 1, "jsonrpc": "2.0", "method": "net_peerCount", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "net_peerCount", + "params": {} + } } }, "responseStatusCode": 200, @@ -1653,7 +1663,12 @@ "id": 1, "jsonrpc": "2.0", "method": "net_version", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "net_version", + "params": {} + } } }, "responseStatusCode": 200, @@ -1720,7 +1735,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": {} + } } }, "responseStatusCode": 200, @@ -1817,7 +1837,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_call", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_call", + "params": {} + } } }, "responseStatusCode": 200, @@ -1887,7 +1912,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_chainId", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_chainId", + "params": {} + } } }, "responseStatusCode": 200, @@ -1954,7 +1984,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_coinbase", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_coinbase", + "params": {} + } } }, "responseStatusCode": 200, @@ -2041,7 +2076,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_estimateGas", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_estimateGas", + "params": {} + } } }, "responseStatusCode": 200, @@ -2107,7 +2147,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_gasPrice", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_gasPrice", + "params": {} + } } }, "responseStatusCode": 200, @@ -2212,7 +2257,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getBalance", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBalance", + "params": {} + } } }, "responseStatusCode": 200, @@ -2313,7 +2363,12 @@ "jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": { - "includeTransactions": false + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockByHash", + "params": { + "includeTransactions": false + } } } }, @@ -2415,7 +2470,12 @@ "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": { - "includeTransactions": false + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockByNumber", + "params": { + "includeTransactions": false + } } } }, @@ -2503,7 +2563,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockTransactionCountByHash", + "params": {} + } } }, "responseStatusCode": 200, @@ -2590,7 +2655,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockTransactionCountByNumber", + "params": {} + } } }, "responseStatusCode": 200, @@ -2695,7 +2765,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getCode", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getCode", + "params": {} + } } }, "responseStatusCode": 200, @@ -2788,7 +2863,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getFilterChanges", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getFilterChanges", + "params": {} + } } }, "responseStatusCode": 200, @@ -2884,7 +2964,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getFilterLogs", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getFilterLogs", + "params": {} + } } }, "responseStatusCode": 200, @@ -2974,7 +3059,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getRawTransactionByHash", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getRawTransactionByHash", + "params": {} + } } }, "responseStatusCode": 200, @@ -3072,7 +3162,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getRawTransactionByBlockHashAndIndex", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getRawTransactionByBlockHashAndIndex", + "params": {} + } } }, "responseStatusCode": 200, @@ -3170,7 +3265,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getRawTransactionByBlockNumberAndIndex", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getRawTransactionByBlockNumberAndIndex", + "params": {} + } } }, "responseStatusCode": 200, @@ -3303,7 +3403,12 @@ "jsonrpc": "2.0", "method": "eth_getLogs", "params": { - "filter": {} + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getLogs", + "params": { + "filter": {} + } } } }, @@ -3414,7 +3519,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getStorageAt", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getStorageAt", + "params": {} + } } }, "responseStatusCode": 200, @@ -3518,10 +3628,10 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", - "params": [ - "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", - "0x0" - ] + "params": { + "blockHashExample": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", + "indexExample": "0x0" + } } }, "responseStatusCode": 200, @@ -3629,7 +3739,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getTransactionByBlockNumberAndIndex", + "params": {} + } } }, "responseStatusCode": 200, @@ -3722,7 +3837,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getTransactionByHash", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getTransactionByHash", + "params": {} + } } }, "responseStatusCode": 200, @@ -3825,7 +3945,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getTransactionCount", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getTransactionCount", + "params": {} + } } }, "responseStatusCode": 200, @@ -3918,7 +4043,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getTransactionReceipt", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getTransactionReceipt", + "params": {} + } } }, "responseStatusCode": 200, @@ -4016,7 +4146,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getUncleByBlockHashAndIndex", + "params": {} + } } }, "responseStatusCode": 200, @@ -4115,10 +4250,10 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", - "params": [ - "0x0", - "0x0" - ] + "params": { + "uncleBlockNumberExample": "0x0", + "uncleBlockNumberIndexExample": "0x0" + } } }, "responseStatusCode": 200, @@ -4209,7 +4344,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockHash", + "params": {} + } } }, "responseStatusCode": 200, @@ -4296,7 +4436,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockNumber", + "params": {} + } } }, "responseStatusCode": 200, @@ -4483,7 +4628,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getProof", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getProof", + "params": {} + } } }, "responseStatusCode": 200, @@ -4581,7 +4731,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_getWork", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getWork", + "params": {} + } } }, "responseStatusCode": 200, @@ -4652,7 +4807,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_hashrate", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_hashrate", + "params": {} + } } }, "responseStatusCode": 200, @@ -4720,7 +4880,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_mining", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_mining", + "params": {} + } } }, "responseStatusCode": 200, @@ -4787,7 +4952,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_newBlockFilter", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_newBlockFilter", + "params": {} + } } }, "responseStatusCode": 200, @@ -4914,7 +5084,12 @@ "jsonrpc": "2.0", "method": "eth_newFilter", "params": { - "filter": {} + "id": 1, + "jsonrpc": "2.0", + "method": "eth_newFilter", + "params": { + "filter": {} + } } } }, @@ -4981,7 +5156,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_newPendingTransactionFilter", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_newPendingTransactionFilter", + "params": {} + } } }, "responseStatusCode": 200, @@ -5047,7 +5227,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_pendingTransactions", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_pendingTransactions", + "params": {} + } } }, "responseStatusCode": 200, @@ -5113,7 +5298,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_protocolVersion", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_protocolVersion", + "params": {} + } } }, "responseStatusCode": 200, @@ -5201,7 +5391,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_sendRawTransaction", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_sendRawTransaction", + "params": {} + } } }, "responseStatusCode": 200, @@ -5301,7 +5496,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_submitHashrate", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_submitHashrate", + "params": {} + } } }, "responseStatusCode": 200, @@ -5412,11 +5612,11 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_submitWork", - "params": [ - "0x0000000000000001", - "0x6bf2cAE0dE3ec3ecA5E194a6C6e02cf42aADfe1C2c4Fff12E5D36C3Cf7297F22", - "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000" - ] + "params": { + "nonceExample": "0x0000000000000001", + "powHashExample": "0x6bf2cAE0dE3ec3ecA5E194a6C6e02cf42aADfe1C2c4Fff12E5D36C3Cf7297F22", + "mixHashExample": "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000" + } } }, "responseStatusCode": 200, @@ -5541,7 +5741,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_syncing", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_syncing", + "params": {} + } } }, "responseStatusCode": 200, @@ -5631,7 +5836,12 @@ "id": 1, "jsonrpc": "2.0", "method": "eth_uninstallFilter", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_uninstallFilter", + "params": {} + } } }, "responseStatusCode": 200, diff --git a/packages/parsers/src/openrpc/__test__/__snapshots__/petstore.json b/packages/parsers/src/openrpc/__test__/__snapshots__/petstore.json index 97f0d4fad6..3877f6dd54 100644 --- a/packages/parsers/src/openrpc/__test__/__snapshots__/petstore.json +++ b/packages/parsers/src/openrpc/__test__/__snapshots__/petstore.json @@ -163,9 +163,9 @@ "id": 1, "jsonrpc": "2.0", "method": "list_pets", - "params": [ - 1 - ] + "params": { + "limit": 1 + } } }, "responseStatusCode": 200, @@ -292,10 +292,10 @@ "id": 1, "jsonrpc": "2.0", "method": "create_pet", - "params": [ - "fluffy", - "poodle" - ] + "params": { + "newPetName": "fluffy", + "tag": "poodle" + } } }, "responseStatusCode": 200, @@ -395,9 +395,9 @@ "id": 1, "jsonrpc": "2.0", "method": "get_pet", - "params": [ - 7 - ] + "params": { + "petId": 7 + } } }, "responseStatusCode": 200, diff --git a/packages/parsers/src/openrpc/__test__/__snapshots__/solana.json b/packages/parsers/src/openrpc/__test__/__snapshots__/solana.json index 88da66c060..4ccf87da3b 100644 --- a/packages/parsers/src/openrpc/__test__/__snapshots__/solana.json +++ b/packages/parsers/src/openrpc/__test__/__snapshots__/solana.json @@ -264,15 +264,20 @@ "jsonrpc": "2.0", "method": "getAccountInfo", "params": { - "Pubkey": "string", - "Configuration": { - "commitment": "processed", - "encoding": "base58", - "dataSlice": { - "length": 0, - "offset": 0 - }, - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getAccountInfo", + "params": { + "Pubkey": "string", + "Configuration": { + "commitment": "processed", + "encoding": "base58", + "dataSlice": { + "length": 0, + "offset": 0 + }, + "minContextSlot": 0 + } } } } @@ -424,10 +429,15 @@ "jsonrpc": "2.0", "method": "getBalance", "params": { - "Pubkey": "string", - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getBalance", + "params": { + "Pubkey": "string", + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -1532,13 +1542,18 @@ "jsonrpc": "2.0", "method": "getBlock", "params": { - "slot": 0, - "Configuration": { - "commitment": "processed", - "encoding": "json", - "transactionDetails": "full", - "maxSupportedTransactionVersion": 0, - "rewards": true + "id": 1, + "jsonrpc": "2.0", + "method": "getBlock", + "params": { + "slot": 0, + "Configuration": { + "commitment": "processed", + "encoding": "json", + "transactionDetails": "full", + "maxSupportedTransactionVersion": 0, + "rewards": true + } } } } @@ -1768,7 +1783,12 @@ "jsonrpc": "2.0", "method": "getBlockCommitment", "params": { - "block": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getBlockCommitment", + "params": { + "block": 0 + } } } }, @@ -1902,9 +1922,14 @@ "jsonrpc": "2.0", "method": "getBlockHeight", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getBlockHeight", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -2135,12 +2160,17 @@ "jsonrpc": "2.0", "method": "getBlockProduction", "params": { - "Configuration": { - "commitment": "processed", - "identity": "string", - "range": { - "firstSlot": 0, - "lastSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getBlockProduction", + "params": { + "Configuration": { + "commitment": "processed", + "identity": "string", + "range": { + "firstSlot": 0, + "lastSlot": 0 + } } } } @@ -2303,10 +2333,15 @@ "jsonrpc": "2.0", "method": "getBlocks", "params": { - "start_slot": 0, - "end_slot": 0, - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "getBlocks", + "params": { + "start_slot": 0, + "end_slot": 0, + "Configuration": { + "commitment": "processed" + } } } } @@ -2458,10 +2493,15 @@ "jsonrpc": "2.0", "method": "getBlocksWithLimit", "params": { - "start_slot": 0, - "limit": 0, - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "getBlocksWithLimit", + "params": { + "start_slot": 0, + "limit": 0, + "Configuration": { + "commitment": "processed" + } } } } @@ -2569,8 +2609,13 @@ "jsonrpc": "2.0", "method": "getBlockTime", "params": { - "block": { - "block": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getBlockTime", + "params": { + "block": { + "block": 0 + } } } } @@ -2771,7 +2816,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getClusterNodes", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getClusterNodes", + "params": {} + } } }, "responseStatusCode": 200, @@ -2990,9 +3040,14 @@ "jsonrpc": "2.0", "method": "getEpochInfo", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getEpochInfo", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -3132,7 +3187,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getEpochSchedule", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getEpochSchedule", + "params": {} + } } }, "responseStatusCode": 200, @@ -3295,12 +3355,17 @@ "jsonrpc": "2.0", "method": "getFeeForMessage", "params": { - "Message": { - "Message": "string" - }, - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getFeeForMessage", + "params": { + "Message": { + "Message": "string" + }, + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -3371,7 +3436,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getFirstAvailableBlock", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getFirstAvailableBlock", + "params": {} + } } }, "responseStatusCode": 200, @@ -3440,7 +3510,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getGenesisHash", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getGenesisHash", + "params": {} + } } }, "responseStatusCode": 200, @@ -3509,7 +3584,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getHealth", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getHealth", + "params": {} + } } }, "responseStatusCode": 200, @@ -3607,7 +3687,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getHighestSnapshotSlot", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getHighestSnapshotSlot", + "params": {} + } } }, "responseStatusCode": 200, @@ -3689,7 +3774,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getIdentity", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getIdentity", + "params": {} + } } }, "responseStatusCode": 200, @@ -3881,9 +3971,14 @@ "jsonrpc": "2.0", "method": "getInflationGovernor", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getInflationGovernor", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -4009,7 +4104,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getInflationRate", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getInflationRate", + "params": {} + } } }, "responseStatusCode": 200, @@ -4248,13 +4348,18 @@ "jsonrpc": "2.0", "method": "getInflationReward", "params": { - "Addresses": { - "Addresses": [ - "string" - ], - "commitment": "processed", - "epoch": 0, - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getInflationReward", + "params": { + "Addresses": { + "Addresses": [ + "string" + ], + "commitment": "processed", + "epoch": 0, + "minContextSlot": 0 + } } } } @@ -4423,9 +4528,14 @@ "jsonrpc": "2.0", "method": "getLargestAccounts", "params": { - "Configuration": { - "commitment": "processed", - "filter": "circulating" + "id": 1, + "jsonrpc": "2.0", + "method": "getLargestAccounts", + "params": { + "Configuration": { + "commitment": "processed", + "filter": "circulating" + } } } } @@ -4583,9 +4693,14 @@ "jsonrpc": "2.0", "method": "getLatestBlockhash", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getLatestBlockhash", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -4659,7 +4774,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getMaxRetransmitSlot", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getMaxRetransmitSlot", + "params": {} + } } }, "responseStatusCode": 200, @@ -4728,7 +4848,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getMaxShredInsertSlot", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getMaxShredInsertSlot", + "params": {} + } } }, "responseStatusCode": 200, @@ -4866,11 +4991,16 @@ "jsonrpc": "2.0", "method": "getMinimumBalanceForRentExemption", "params": { - "Account data length": { - "dataLength": 0 - }, - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "getMinimumBalanceForRentExemption", + "params": { + "Account data length": { + "dataLength": 0 + }, + "Configuration": { + "commitment": "processed" + } } } } @@ -5163,17 +5293,22 @@ "jsonrpc": "2.0", "method": "getMultipleAccounts", "params": { - "Pubkeys": [ - "string" - ], - "Configuration": { - "commitment": "processed", - "minContextSlot": 0, - "dataSlice": { - "length": 0, - "offset": 0 - }, - "encoding": "base58" + "id": 1, + "jsonrpc": "2.0", + "method": "getMultipleAccounts", + "params": { + "Pubkeys": [ + "string" + ], + "Configuration": { + "commitment": "processed", + "minContextSlot": 0, + "dataSlice": { + "length": 0, + "offset": 0 + }, + "encoding": "base58" + } } } } @@ -5506,17 +5641,22 @@ "jsonrpc": "2.0", "method": "getProgramAccounts", "params": { - "Pubkey": "string", - "Configuration": { - "commitment": "processed", - "minContextSlot": 0, - "withContext": false, - "encoding": "base58", - "dataSlice": { - "length": 0, - "offset": 0 - }, - "filters": [] + "id": 1, + "jsonrpc": "2.0", + "method": "getProgramAccounts", + "params": { + "Pubkey": "string", + "Configuration": { + "commitment": "processed", + "minContextSlot": 0, + "withContext": false, + "encoding": "base58", + "dataSlice": { + "length": 0, + "offset": 0 + }, + "filters": [] + } } } } @@ -5700,7 +5840,12 @@ "jsonrpc": "2.0", "method": "getRecentPerformanceSamples", "params": { - "limit": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getRecentPerformanceSamples", + "params": { + "limit": 0 + } } } }, @@ -5844,9 +5989,14 @@ "jsonrpc": "2.0", "method": "getRecentPrioritizationFees", "params": { - "Account addresses": [ - "string" - ] + "id": 1, + "jsonrpc": "2.0", + "method": "getRecentPrioritizationFees", + "params": { + "Account addresses": [ + "string" + ] + } } } }, @@ -6134,13 +6284,18 @@ "jsonrpc": "2.0", "method": "getSignaturesForAddress", "params": { - "Account address": "string", - "Configuration": { - "commitment": "processed", - "minContextSlot": 0, - "limit": 1000, - "before": "string", - "until": "string" + "id": 1, + "jsonrpc": "2.0", + "method": "getSignaturesForAddress", + "params": { + "Account address": "string", + "Configuration": { + "commitment": "processed", + "minContextSlot": 0, + "limit": 1000, + "before": "string", + "until": "string" + } } } } @@ -6358,11 +6513,16 @@ "jsonrpc": "2.0", "method": "getSignatureStatuses", "params": { - "Signatures": [ - "string" - ], - "Configuration": { - "searchTransactionHistory": false + "id": 1, + "jsonrpc": "2.0", + "method": "getSignatureStatuses", + "params": { + "Signatures": [ + "string" + ], + "Configuration": { + "searchTransactionHistory": false + } } } } @@ -6500,9 +6660,14 @@ "jsonrpc": "2.0", "method": "getSlot", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getSlot", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -6632,9 +6797,14 @@ "jsonrpc": "2.0", "method": "getSlotLeader", "params": { - "Configuration": { - "commitment": "processed", - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getSlotLeader", + "params": { + "Configuration": { + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -6749,8 +6919,13 @@ "jsonrpc": "2.0", "method": "getSlotLeaders", "params": { - "Start slot": 0, - "Limit": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getSlotLeaders", + "params": { + "Start slot": 0, + "Limit": 0 + } } } }, @@ -6936,9 +7111,14 @@ "jsonrpc": "2.0", "method": "getSupply", "params": { - "Configuration": { - "commitment": "processed", - "excludeNonCirculatingAccountsList": false + "id": 1, + "jsonrpc": "2.0", + "method": "getSupply", + "params": { + "Configuration": { + "commitment": "processed", + "excludeNonCirculatingAccountsList": false + } } } } @@ -7130,9 +7310,14 @@ "jsonrpc": "2.0", "method": "getTokenAccountBalance", "params": { - "Token account Pubkey": "string", - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "getTokenAccountBalance", + "params": { + "Token account Pubkey": "string", + "Configuration": { + "commitment": "processed" + } } } } @@ -7487,19 +7672,24 @@ "jsonrpc": "2.0", "method": "getTokenAccountsByOwner", "params": { - "Token owner Pubkey": "string", - "Token filter": { - "mint": "string", - "programId": "string" - }, - "Configuration": { - "commitment": "processed", - "minContextSlot": 0, - "dataSlice": { - "length": 0, - "offset": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getTokenAccountsByOwner", + "params": { + "Token owner Pubkey": "string", + "Token filter": { + "mint": "string", + "programId": "string" }, - "encoding": "base58" + "Configuration": { + "commitment": "processed", + "minContextSlot": 0, + "dataSlice": { + "length": 0, + "offset": 0 + }, + "encoding": "base58" + } } } } @@ -7698,9 +7888,14 @@ "jsonrpc": "2.0", "method": "getTokenSupply", "params": { - "Token Mint Pubkey": "string", - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "getTokenSupply", + "params": { + "Token Mint Pubkey": "string", + "Configuration": { + "commitment": "processed" + } } } } @@ -7941,11 +8136,16 @@ "jsonrpc": "2.0", "method": "getTransaction", "params": { - "Transaction signature": "string", - "Configuration": { - "commitment": "processed", - "maxSupportedTransactionVersion": 0, - "encoding": "json" + "id": 1, + "jsonrpc": "2.0", + "method": "getTransaction", + "params": { + "Transaction signature": "string", + "Configuration": { + "commitment": "processed", + "maxSupportedTransactionVersion": 0, + "encoding": "json" + } } } } @@ -8045,7 +8245,12 @@ "id": 1, "jsonrpc": "2.0", "method": "getVersion", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "getVersion", + "params": {} + } } }, "responseStatusCode": 200, @@ -8463,11 +8668,16 @@ "jsonrpc": "2.0", "method": "getVoteAccounts", "params": { - "Configuration": { - "commitment": "processed", - "votePubkey": "string", - "keepUnstakedDelinquents": false, - "delinquentSlotDistance": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "getVoteAccounts", + "params": { + "Configuration": { + "commitment": "processed", + "votePubkey": "string", + "keepUnstakedDelinquents": false, + "delinquentSlotDistance": 0 + } } } } @@ -8656,11 +8866,16 @@ "jsonrpc": "2.0", "method": "isBlockhashValid", "params": { - "blockhash": "string", - "Configuration": { + "id": 1, + "jsonrpc": "2.0", + "method": "isBlockhashValid", + "params": { "blockhash": "string", - "commitment": "processed", - "minContextSlot": 0 + "Configuration": { + "blockhash": "string", + "commitment": "processed", + "minContextSlot": 0 + } } } } @@ -8731,7 +8946,12 @@ "id": 1, "jsonrpc": "2.0", "method": "minimumLedgerSlot", - "params": {} + "params": { + "id": 1, + "jsonrpc": "2.0", + "method": "minimumLedgerSlot", + "params": {} + } } }, "responseStatusCode": 200, @@ -8872,10 +9092,15 @@ "jsonrpc": "2.0", "method": "requestAirdrop", "params": { - "Pubkey": "string", - "Lamports": 0, - "Configuration": { - "commitment": "processed" + "id": 1, + "jsonrpc": "2.0", + "method": "requestAirdrop", + "params": { + "Pubkey": "string", + "Lamports": 0, + "Configuration": { + "commitment": "processed" + } } } } @@ -9062,13 +9287,18 @@ "jsonrpc": "2.0", "method": "sendTransaction", "params": { - "Transaction": "string", - "Configuration": { - "encoding": "base58", - "skipPreflight": false, - "preflightCommitment": "processed", - "maxRetries": 0, - "minContextSlot": 0 + "id": 1, + "jsonrpc": "2.0", + "method": "sendTransaction", + "params": { + "Transaction": "string", + "Configuration": { + "encoding": "base58", + "skipPreflight": false, + "preflightCommitment": "processed", + "maxRetries": 0, + "minContextSlot": 0 + } } } } @@ -9530,19 +9760,24 @@ "jsonrpc": "2.0", "method": "simulateTransaction", "params": { - "Transaction": "string", - "Configuration": { - "commitment": "processed", - "sigVerify": false, - "replaceRecentBlockhash": false, - "minContextSlot": 0, - "encoding": "base58", - "innerInstructions": false, - "accounts": { - "addresses": [ - "string" - ], - "encoding": "base58" + "id": 1, + "jsonrpc": "2.0", + "method": "simulateTransaction", + "params": { + "Transaction": "string", + "Configuration": { + "commitment": "processed", + "sigVerify": false, + "replaceRecentBlockhash": false, + "minContextSlot": 0, + "encoding": "base58", + "innerInstructions": false, + "accounts": { + "addresses": [ + "string" + ], + "encoding": "base58" + } } } }