GithubHelp home page GithubHelp logo

json-schema-tools / transpiler Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 7.0 2.41 MB

Transpile JSON Schema to Type aliases for many languages

Home Page: https://json-schema-tools.github.io/transpiler/

License: Apache License 2.0

Shell 0.62% JavaScript 0.56% TypeScript 67.54% Go 14.65% Python 6.00% Rust 10.63%
jsonschema json-schema-generator typings open-rpc open-api

transpiler's Introduction

JSON Schema Transpiler

CircleCI branch npm GitHub release GitHub commits since latest release

Turn your JSON Schemas into types to be used in various languages.

Try Me

  • Generate types for:
    • Golang
    • Typescript
    • Rust
    • Python
  • handles cycle detection
  • automatically determines references
  • includes documentation annotations for easy documentation generation with native language tools.
  • minimal dependencies (wip)
  • Creates 1 type alias per 1 schema
  • Autogenerated deterministic titles where missing
  • Autoreferencer (removes duplication)
  • Code is synchronous - no IO keeps it lean and fast
  • Convert schema to types in browser too!

Getting Started

npm install @json-schema-tools/transpiler

const JsonSchemaTranspiler = require("@json-schema-tools/transpiler").default;

const mySchema = {
  "title": "PlowAnimals",
  "description": "an array of animals that are good at pulling things",
  "type": "array",
  "items": {
    "oneOf": [
      { "title": "Horse" },
      { "title": "Donkey" },
      { "title": "Elephant" },
    ]
  }
};

const transpiler = new JsonSchemaTranspiler(mySchema);

console.log(transpiler.toTypescript());
console.log(transpiler.toRust());
console.log(transpiler.to("go")); // same thing, different form/interface
console.log(transpiler.to("python")); // works with shorthand of the language aswell (py or python)

Testing

Generate a test case

npm run generateTest

outputs:

> @json-schema-tools/[email protected] generateTest /Users/zb/Code/json-schema-tools/transpiler
> tsc && node ./build/integration-tests/generator.js

? What is the name of the test schema? type-as-array
? Enter a url to a JSON Schema, or press enter to get an empty one? false
Detecting languages...
Found 4 languages: go, py, rs, ts


Writing files...
All done

Edit schema if necessary, and run npm test. Update expected results as needed.

Contributing

How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.

transpiler's People

Contributors

belfordz avatar dependabot-preview[bot] avatar dependabot[bot] avatar semantic-release-bot avatar shanejonas avatar stayclassic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

transpiler's Issues

Rust: Enum should use internal tagging when types are the same

for example, we currently produce this:

pub type SimpleTypes = serde_json::Value;

which should infact be:

#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
pub enum SimpleTypes {
    #[serde(rename = "string")]
    String,
    #[serde(rename = "array")]
    Array,
    #[serde(rename = "object")]
    Object,
    #[serde(rename = "number")]
    Number,
    #[serde(rename = "boolean")]
    Boolean,
    #[serde(rename = "integer")]
    Integer
}

golang issues

json-schema-tools/meta-schema#56
json-schema-tools/meta-schema#55

for #55, we should implement proper 'imports' handling. Each schema should be able to provide a set of imports that its generated types may require. The transpile method should return an object instead of a string. The object should include a field for the imports, and a field for the rest. This will allow us to collect all the imports to be placed at the top of the file / returned result.

Error: Inline subschemas are not allowed

Describe the bug
could be if and then are not supported? but its erroring on the method allOf schema not the if/then so im not sure.

If i remove the root allOf that has the if/thens it doesnt error

Expected behavior
No Errors.

Screenshots
image
image

Offending JSON Schema
{
    "type": "object",
    "properties": {
        "id": {
            "title": "id",
            "description": "unique identifier for the JSON-RPC request",
            "oneOf": [
                {
                    "title": "stringId",
                    "type": "string"
                },
                {
                    "title": "numberId",
                    "type": "string"
                }
            ]
        },
        "jsonrpc": {
            "type": "string",
            "enum": [
                "2.0"
            ],
            "description": "JSON-RPC version string"
        },
        "method": {
            "type": "string",
            "oneOf": [
                {
                    "const": "web3_clientVersion",
                    "description": "Returns the version of the current client",
                    "markdownDescription": "Returns the version of the current client"
                },
                {
                    "const": "web3_sha3",
                    "description": "Hashes data using the Keccak-256 algorithm",
                    "markdownDescription": "Hashes data using the Keccak-256 algorithm"
                },
                {
                    "const": "net_listening",
                    "description": "Determines if this client is listening for new network connections.",
                    "markdownDescription": "Determines if this client is listening for new network connections."
                },
                {
                    "const": "net_peerCount",
                    "description": "Returns the number of peers currently connected to this client.",
                    "markdownDescription": "Returns the number of peers currently connected to this client."
                },
                {
                    "const": "net_version",
                    "description": "Returns the network ID associated with the current network.",
                    "markdownDescription": "Returns the network ID associated with the current network."
                },
                {
                    "const": "eth_blockNumber",
                    "description": "Returns the number of most recent block.",
                    "markdownDescription": "Returns the number of most recent block."
                },
                {
                    "const": "eth_call",
                    "description": "Executes a new message call (locally) immediately without creating a transaction on the block chain.",
                    "markdownDescription": "Executes a new message call (locally) immediately without creating a transaction on the block chain."
                },
                {
                    "const": "eth_chainId",
                    "description": "Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md).",
                    "markdownDescription": "Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)."
                },
                {
                    "const": "eth_coinbase",
                    "description": "Returns the client coinbase address.",
                    "markdownDescription": "Returns the client coinbase address."
                },
                {
                    "const": "eth_estimateGas",
                    "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.",
                    "markdownDescription": "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."
                },
                {
                    "const": "eth_gasPrice",
                    "description": "Returns the current price per gas in wei",
                    "markdownDescription": "Returns the current price per gas in wei"
                },
                {
                    "const": "eth_getBalance",
                    "description": "Returns Ether balance of a given or account or contract",
                    "markdownDescription": "Returns Ether balance of a given or account or contract"
                },
                {
                    "const": "eth_getBlockByHash",
                    "description": "Gets a block for a given hash",
                    "markdownDescription": "Gets a block for a given hash"
                },
                {
                    "const": "eth_getBlockByNumber",
                    "description": "Gets a block for a given number",
                    "markdownDescription": "Gets a block for a given number"
                },
                {
                    "const": "eth_getBlockTransactionCountByHash",
                    "description": "Returns the number of transactions in a block from a block matching the given block hash.",
                    "markdownDescription": "Returns the number of transactions in a block from a block matching the given block hash."
                },
                {
                    "const": "eth_getBlockTransactionCountByNumber",
                    "description": "Returns the number of transactions in a block from a block matching the given block number.",
                    "markdownDescription": "Returns the number of transactions in a block from a block matching the given block number."
                },
                {
                    "const": "eth_getCode",
                    "description": "Returns code at a given contract address",
                    "markdownDescription": "Returns code at a given contract address"
                },
                {
                    "const": "eth_getFilterChanges",
                    "description": "Polling method for a filter, which returns an array of logs which occurred since last poll.",
                    "markdownDescription": "Polling method for a filter, which returns an array of logs which occurred since last poll."
                },
                {
                    "const": "eth_getFilterLogs",
                    "description": "Returns an array of all logs matching filter with given id.",
                    "markdownDescription": "Returns an array of all logs matching filter with given id."
                },
                {
                    "const": "eth_getRawTransactionByHash",
                    "description": "Returns raw transaction data of a transaction with the given hash.",
                    "markdownDescription": "Returns raw transaction data of a transaction with the given hash."
                },
                {
                    "const": "eth_getRawTransactionByBlockHashAndIndex",
                    "description": "Returns raw transaction data of a transaction with the given hash.",
                    "markdownDescription": "Returns raw transaction data of a transaction with the given hash."
                },
                {
                    "const": "eth_getRawTransactionByBlockNumberAndIndex",
                    "description": "Returns raw transaction data of a transaction with the given hash.",
                    "markdownDescription": "Returns raw transaction data of a transaction with the given hash."
                },
                {
                    "const": "eth_getLogs",
                    "description": "Returns an array of all logs matching a given filter object.",
                    "markdownDescription": "Returns an array of all logs matching a given filter object."
                },
                {
                    "const": "eth_getStorageAt",
                    "description": "Gets a storage value from a contract address, a position, and an optional blockNumber",
                    "markdownDescription": "Gets a storage value from a contract address, a position, and an optional blockNumber"
                },
                {
                    "const": "eth_getTransactionByBlockHashAndIndex",
                    "description": "Returns the information about a transaction requested by the block hash and index of which it was mined.",
                    "markdownDescription": "Returns the information about a transaction requested by the block hash and index of which it was mined."
                },
                {
                    "const": "eth_getTransactionByBlockNumberAndIndex",
                    "description": "Returns the information about a transaction requested by the block hash and index of which it was mined.",
                    "markdownDescription": "Returns the information about a transaction requested by the block hash and index of which it was mined."
                },
                {
                    "const": "eth_getTransactionByHash",
                    "description": "Returns the information about a transaction requested by transaction hash.",
                    "markdownDescription": "Returns the information about a transaction requested by transaction hash."
                },
                {
                    "const": "eth_getTransactionCount",
                    "description": "Returns the number of transactions sent from an address",
                    "markdownDescription": "Returns the number of transactions sent from an address"
                },
                {
                    "const": "eth_getTransactionReceipt",
                    "description": "Returns the receipt information of a transaction by its hash.",
                    "markdownDescription": "Returns the receipt information of a transaction by its hash."
                },
                {
                    "const": "eth_getUncleByBlockHashAndIndex",
                    "description": "Returns information about a uncle of a block by hash and uncle index position.",
                    "markdownDescription": "Returns information about a uncle of a block by hash and uncle index position."
                },
                {
                    "const": "eth_getUncleByBlockNumberAndIndex",
                    "description": "Returns information about a uncle of a block by hash and uncle index position.",
                    "markdownDescription": "Returns information about a uncle of a block by hash and uncle index position."
                },
                {
                    "const": "eth_getUncleCountByBlockHash",
                    "description": "Returns the number of uncles in a block from a block matching the given block hash.",
                    "markdownDescription": "Returns the number of uncles in a block from a block matching the given block hash."
                },
                {
                    "const": "eth_getUncleCountByBlockNumber",
                    "description": "Returns the number of uncles in a block from a block matching the given block number.",
                    "markdownDescription": "Returns the number of uncles in a block from a block matching the given block number."
                },
                {
                    "const": "eth_getProof",
                    "description": "Returns the account- and storage-values of the specified account including the Merkle-proof.",
                    "markdownDescription": "Returns the account- and storage-values of the specified account including the Merkle-proof."
                },
                {
                    "const": "eth_getWork",
                    "description": "Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target').",
                    "markdownDescription": "Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target')."
                },
                {
                    "const": "eth_hashrate",
                    "description": "Returns the number of hashes per second that the node is mining with.",
                    "markdownDescription": "Returns the number of hashes per second that the node is mining with."
                },
                {
                    "const": "eth_mining",
                    "description": "Returns true if client is actively mining new blocks.",
                    "markdownDescription": "Returns true if client is actively mining new blocks."
                },
                {
                    "const": "eth_newBlockFilter",
                    "description": "Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges.",
                    "markdownDescription": "Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges."
                },
                {
                    "const": "eth_newFilter",
                    "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.",
                    "markdownDescription": "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."
                },
                {
                    "const": "eth_newPendingTransactionFilter",
                    "description": "Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges.",
                    "markdownDescription": "Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges."
                },
                {
                    "const": "eth_pendingTransactions",
                    "description": "Returns the transactions that are pending in the transaction pool and have a from address that is one of the accounts this node manages.",
                    "markdownDescription": "Returns the transactions that are pending in the transaction pool and have a from address that is one of the accounts this node manages."
                },
                {
                    "const": "eth_protocolVersion",
                    "description": "Returns the current ethereum protocol version.",
                    "markdownDescription": "Returns the current ethereum protocol version."
                },
                {
                    "const": "eth_sendRawTransaction",
                    "description": "Creates new message call transaction or a contract creation for signed transactions.",
                    "markdownDescription": "Creates new message call transaction or a contract creation for signed transactions."
                },
                {
                    "const": "eth_submitHashrate",
                    "description": "Used for submitting mining hashrate.",
                    "markdownDescription": "Used for submitting mining hashrate."
                },
                {
                    "const": "eth_submitWork",
                    "description": "Used for submitting a proof-of-work solution.",
                    "markdownDescription": "Used for submitting a proof-of-work solution."
                },
                {
                    "const": "eth_syncing",
                    "description": "Returns an object with data about the sync status or false.",
                    "markdownDescription": "Returns an object with data about the sync status or false."
                },
                {
                    "const": "eth_uninstallFilter",
                    "description": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time.",
                    "markdownDescription": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time."
                },
                {
                    "const": "getPermissions",
                    "description": "get users permissions",
                    "markdownDescription": "get users permissions"
                },
                {
                    "const": "requestPermissions",
                    "description": "request additional permissions from the user",
                    "markdownDescription": "request additional permissions from the user"
                },
                {
                    "const": "listAccounts",
                    "description": "Return the list of all not hidden (by default) accounts from the keystore",
                    "markdownDescription": "Return the list of all not hidden (by default) accounts from the keystore"
                },
                {
                    "const": "listWallets",
                    "description": "Return the list of all not hidden (by default) wallets from the keystore",
                    "markdownDescription": "Return the list of all not hidden (by default) wallets from the keystore"
                },
                {
                    "const": "hideAccount",
                    "description": "Hide an account from the list returned by default by `signer_listAccounts`",
                    "markdownDescription": "Hide an account from the list returned by default by `signer_listAccounts`"
                },
                {
                    "const": "unhideAccount",
                    "description": "Show an account that was hidden before by the command `signer_hideAccount`",
                    "markdownDescription": "Show an account that was hidden before by the command `signer_hideAccount`"
                },
                {
                    "const": "createAccount",
                    "description": "Creates a new account and stores it locally as a passphrase-encoded keystore file.",
                    "markdownDescription": "Creates a new account and stores it locally as a passphrase-encoded keystore file."
                },
                {
                    "const": "signTransaction",
                    "description": "Signs transaction offline with private key from keystore file with given from address and passphrase.",
                    "markdownDescription": "Signs transaction offline with private key from keystore file with given from address and passphrase."
                },
                {
                    "const": "signTypedData",
                    "description": "Signs v4 typed data with private key from keystore file with given from address and passphrase.",
                    "markdownDescription": "Signs v4 typed data with private key from keystore file with given from address and passphrase."
                },
                {
                    "const": "importKeyfile",
                    "description": "Import a new account from an external keyfile. should comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                    "markdownDescription": "Import a new account from an external keyfile. should comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)"
                },
                {
                    "const": "generateMnemonic",
                    "description": "Generates a new 24 words long mnemonic phrase",
                    "markdownDescription": "Generates a new 24 words long mnemonic phrase"
                },
                {
                    "const": "importMnemonic",
                    "description": "Creates a new account from a mnemonic and stores it locally as a passphrase-encoded keystore file.",
                    "markdownDescription": "Creates a new account from a mnemonic and stores it locally as a passphrase-encoded keystore file."
                },
                {
                    "const": "getAccountFromMnemonic",
                    "description": "Returns address of account computed from the HDWallet specified",
                    "markdownDescription": "Returns address of account computed from the HDWallet specified"
                },
                {
                    "const": "exportAccount",
                    "description": "Export a keyfile associated with account. Keyfile uses the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                    "markdownDescription": "Export a keyfile associated with account. Keyfile uses the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)"
                },
                {
                    "const": "sign",
                    "description": "Calculates an Ethereum-specific signature in the form of keccak256(\"\\x19Ethereum Signed Message:\n\" + len(message) + message))",
                    "markdownDescription": "Calculates an Ethereum-specific signature in the form of keccak256(\"\\x19Ethereum Signed Message:\n\" + len(message) + message))"
                }
            ]
        }
    },
    "allOf": [
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "web3_clientVersion"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "web3_sha3"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 1,
                                "defaultSnippets": [
                                    {
                                        "label": "sha3Example",
                                        "body": [
                                            "0x68656c6c6f20776f726c64"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "data",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]+$",
                                        "markdownDescription": "data to hash using the Keccak-256 algorithm",
                                        "description": "data to hash using the Keccak-256 algorithm",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "title": "data",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]+$",
                                        "markdownDescription": "data to hash using the Keccak-256 algorithm",
                                        "description": "data to hash using the Keccak-256 algorithm",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "net_listening"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [
                                    {
                                        "label": "netListeningTrueExample",
                                        "description": "example of true result for net_listening",
                                        "body": []
                                    }
                                ],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "net_peerCount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "net_version"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_blockNumber"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_call"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "blockHash": {
                                                "title": "blockHashOrNull",
                                                "description": "The block hash or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "keccak",
                                                        "type": "string",
                                                        "description": "Hex representation of a Keccak 256 hash",
                                                        "pattern": "^0x[a-fA-F\\d]{64}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "blockNumber": {
                                                "title": "blockNumberOrNull",
                                                "description": "The block number or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "blockNumber",
                                                        "type": "string",
                                                        "description": "The hex representation of the block's height",
                                                        "pattern": "^0x[a-fA-F0-9]+$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "from": {
                                                "title": "From",
                                                "description": "The sender of the transaction",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "transactionGas",
                                                "type": "string",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "transactionGasPrice",
                                                "type": "string",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "hash": {
                                                "title": "transactionHash",
                                                "type": "string",
                                                "description": "Keccak 256 Hash of the RLP encoding of a transaction",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "input": {
                                                "title": "transactionInput",
                                                "type": "string",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "transactionNonce",
                                                "description": "The total number of prior transactions made by the sender",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "to": {
                                                "title": "To",
                                                "description": "Destination address of the transaction. Null if it was a contract create.",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "transactionIndex": {
                                                "title": "transactionIndex",
                                                "description": "The index of the transaction. null when its pending",
                                                "oneOf": [
                                                    {
                                                        "title": "integer",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F0-9]+$",
                                                        "description": "Hex representation of the integer"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "value": {
                                                "title": "transactionValue",
                                                "description": "Value of Ether being transferred in Wei",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "v": {
                                                "title": "transactionSigV",
                                                "type": "string",
                                                "description": "ECDSA recovery id"
                                            },
                                            "r": {
                                                "title": "transactionSigR",
                                                "type": "string",
                                                "description": "ECDSA signature r"
                                            },
                                            "s": {
                                                "title": "transactionSigS",
                                                "type": "string",
                                                "description": "ECDSA signature s"
                                            }
                                        },
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transaction": {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "blockHash": {
                                                "title": "blockHashOrNull",
                                                "description": "The block hash or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "keccak",
                                                        "type": "string",
                                                        "description": "Hex representation of a Keccak 256 hash",
                                                        "pattern": "^0x[a-fA-F\\d]{64}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "blockNumber": {
                                                "title": "blockNumberOrNull",
                                                "description": "The block number or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "blockNumber",
                                                        "type": "string",
                                                        "description": "The hex representation of the block's height",
                                                        "pattern": "^0x[a-fA-F0-9]+$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "from": {
                                                "title": "From",
                                                "description": "The sender of the transaction",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "transactionGas",
                                                "type": "string",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "transactionGasPrice",
                                                "type": "string",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "hash": {
                                                "title": "transactionHash",
                                                "type": "string",
                                                "description": "Keccak 256 Hash of the RLP encoding of a transaction",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "input": {
                                                "title": "transactionInput",
                                                "type": "string",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "transactionNonce",
                                                "description": "The total number of prior transactions made by the sender",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "to": {
                                                "title": "To",
                                                "description": "Destination address of the transaction. Null if it was a contract create.",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "transactionIndex": {
                                                "title": "transactionIndex",
                                                "description": "The index of the transaction. null when its pending",
                                                "oneOf": [
                                                    {
                                                        "title": "integer",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F0-9]+$",
                                                        "description": "Hex representation of the integer"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "value": {
                                                "title": "transactionValue",
                                                "description": "Value of Ether being transferred in Wei",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "v": {
                                                "title": "transactionSigV",
                                                "type": "string",
                                                "description": "ECDSA recovery id"
                                            },
                                            "r": {
                                                "title": "transactionSigR",
                                                "type": "string",
                                                "description": "ECDSA signature r"
                                            },
                                            "s": {
                                                "title": "transactionSigS",
                                                "type": "string",
                                                "description": "ECDSA signature s"
                                            }
                                        },
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_chainId"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_coinbase"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_estimateGas"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "blockHash": {
                                                "title": "blockHashOrNull",
                                                "description": "The block hash or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "keccak",
                                                        "type": "string",
                                                        "description": "Hex representation of a Keccak 256 hash",
                                                        "pattern": "^0x[a-fA-F\\d]{64}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "blockNumber": {
                                                "title": "blockNumberOrNull",
                                                "description": "The block number or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "blockNumber",
                                                        "type": "string",
                                                        "description": "The hex representation of the block's height",
                                                        "pattern": "^0x[a-fA-F0-9]+$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "from": {
                                                "title": "From",
                                                "description": "The sender of the transaction",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "transactionGas",
                                                "type": "string",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "transactionGasPrice",
                                                "type": "string",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "hash": {
                                                "title": "transactionHash",
                                                "type": "string",
                                                "description": "Keccak 256 Hash of the RLP encoding of a transaction",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "input": {
                                                "title": "transactionInput",
                                                "type": "string",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "transactionNonce",
                                                "description": "The total number of prior transactions made by the sender",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "to": {
                                                "title": "To",
                                                "description": "Destination address of the transaction. Null if it was a contract create.",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "transactionIndex": {
                                                "title": "transactionIndex",
                                                "description": "The index of the transaction. null when its pending",
                                                "oneOf": [
                                                    {
                                                        "title": "integer",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F0-9]+$",
                                                        "description": "Hex representation of the integer"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "value": {
                                                "title": "transactionValue",
                                                "description": "Value of Ether being transferred in Wei",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "v": {
                                                "title": "transactionSigV",
                                                "type": "string",
                                                "description": "ECDSA recovery id"
                                            },
                                            "r": {
                                                "title": "transactionSigR",
                                                "type": "string",
                                                "description": "ECDSA signature r"
                                            },
                                            "s": {
                                                "title": "transactionSigS",
                                                "type": "string",
                                                "description": "ECDSA signature s"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transaction": {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "blockHash": {
                                                "title": "blockHashOrNull",
                                                "description": "The block hash or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "keccak",
                                                        "type": "string",
                                                        "description": "Hex representation of a Keccak 256 hash",
                                                        "pattern": "^0x[a-fA-F\\d]{64}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "blockNumber": {
                                                "title": "blockNumberOrNull",
                                                "description": "The block number or null when its the pending block",
                                                "oneOf": [
                                                    {
                                                        "title": "blockNumber",
                                                        "type": "string",
                                                        "description": "The hex representation of the block's height",
                                                        "pattern": "^0x[a-fA-F0-9]+$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "from": {
                                                "title": "From",
                                                "description": "The sender of the transaction",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "transactionGas",
                                                "type": "string",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "transactionGasPrice",
                                                "type": "string",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "hash": {
                                                "title": "transactionHash",
                                                "type": "string",
                                                "description": "Keccak 256 Hash of the RLP encoding of a transaction",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "input": {
                                                "title": "transactionInput",
                                                "type": "string",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "transactionNonce",
                                                "description": "The total number of prior transactions made by the sender",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "to": {
                                                "title": "To",
                                                "description": "Destination address of the transaction. Null if it was a contract create.",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "transactionIndex": {
                                                "title": "transactionIndex",
                                                "description": "The index of the transaction. null when its pending",
                                                "oneOf": [
                                                    {
                                                        "title": "integer",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F0-9]+$",
                                                        "description": "Hex representation of the integer"
                                                    },
                                                    {
                                                        "title": "null",
                                                        "type": "null",
                                                        "description": "Null"
                                                    }
                                                ]
                                            },
                                            "value": {
                                                "title": "transactionValue",
                                                "description": "Value of Ether being transferred in Wei",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{64}$"
                                            },
                                            "v": {
                                                "title": "transactionSigV",
                                                "type": "string",
                                                "description": "ECDSA recovery id"
                                            },
                                            "r": {
                                                "title": "transactionSigR",
                                                "type": "string",
                                                "description": "ECDSA signature r"
                                            },
                                            "s": {
                                                "title": "transactionSigS",
                                                "type": "string",
                                                "description": "ECDSA signature s"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_gasPrice"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getBalance"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the account or contract",
                                        "description": "The address of the account or contract",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "A BlockNumber at which to request the balance",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "A BlockNumber at which to request the balance",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the account or contract",
                                        "description": "The address of the account or contract",
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "A BlockNumber at which to request the balance",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "A BlockNumber at which to request the balance",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getBlockByHash"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "isTransactionsIncluded",
                                        "type": "boolean",
                                        "markdownDescription": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "description": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    "includeTransactions": {
                                        "title": "isTransactionsIncluded",
                                        "type": "boolean",
                                        "markdownDescription": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "description": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getBlockByNumber"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "isTransactionsIncluded",
                                        "type": "boolean",
                                        "markdownDescription": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "description": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    "includeTransactions": {
                                        "title": "isTransactionsIncluded",
                                        "type": "boolean",
                                        "markdownDescription": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "description": "If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getBlockTransactionCountByHash"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getBlockTransactionCountByNumber"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getCode"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the contract",
                                        "description": "The address of the contract",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "A BlockNumber of which the code existed",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "A BlockNumber of which the code existed",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the contract",
                                        "description": "The address of the contract",
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "A BlockNumber of which the code existed",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "A BlockNumber of which the code existed",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getFilterChanges"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "filterId": {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getFilterLogs"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "filterId": {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getRawTransactionByHash"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transactionHash": {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getRawTransactionByBlockHashAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getRawTransactionByBlockNumberAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getLogs"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "filter",
                                        "type": "object",
                                        "properties": {
                                            "fromBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "toBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "address": {
                                                "title": "oneOrArrayOfAddresses",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "addresses",
                                                        "type": "array",
                                                        "description": "List of contract addresses from which to monitor events",
                                                        "items": {
                                                            "title": "address",
                                                            "type": "string",
                                                            "pattern": "^0x[a-fA-F\\d]{40}$"
                                                        }
                                                    }
                                                ]
                                            },
                                            "topics": {
                                                "title": "LogTopics",
                                                "description": "Topics are order-dependent. Each topic can also be an array of DATA with 'or' options.",
                                                "type": "array",
                                                "items": {
                                                    "title": "topic",
                                                    "description": "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))",
                                                    "type": "string",
                                                    "pattern": "^0x([a-fA-F\\d]{64})?$"
                                                }
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "filter": {
                                        "title": "filter",
                                        "type": "object",
                                        "properties": {
                                            "fromBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "toBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "address": {
                                                "title": "oneOrArrayOfAddresses",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "addresses",
                                                        "type": "array",
                                                        "description": "List of contract addresses from which to monitor events",
                                                        "items": {
                                                            "title": "address",
                                                            "type": "string",
                                                            "pattern": "^0x[a-fA-F\\d]{40}$"
                                                        }
                                                    }
                                                ]
                                            },
                                            "topics": {
                                                "title": "LogTopics",
                                                "description": "Topics are order-dependent. Each topic can also be an array of DATA with 'or' options.",
                                                "type": "array",
                                                "items": {
                                                    "title": "topic",
                                                    "description": "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))",
                                                    "type": "string",
                                                    "pattern": "^0x([a-fA-F\\d]{64})?$"
                                                }
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getStorageAt"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 3,
                                "maxItems": 3,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "position",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F0-9]?)+$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    "key": {
                                        "title": "position",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F0-9]?)+$",
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getTransactionByBlockHashAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [
                                    {
                                        "label": "nullExample",
                                        "body": [
                                            "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                                            "0x0"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getTransactionByBlockNumberAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a transaction is mined within its block.",
                                        "markdownDescription": "The ordering in which a transaction is mined within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getTransactionByHash"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transactionHash": {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getTransactionCount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getTransactionReceipt"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transactionHash": {
                                        "title": "transactionHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getUncleByBlockHashAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a uncle is included within its block.",
                                        "markdownDescription": "The ordering in which a uncle is included within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a uncle is included within its block.",
                                        "markdownDescription": "The ordering in which a uncle is included within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getUncleByBlockNumberAndIndex"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [
                                    {
                                        "label": "nullResultExample",
                                        "body": [
                                            "0x0",
                                            "0x0"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "The block in which the uncle was included",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "The block in which the uncle was included",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a uncle is included within its block.",
                                        "markdownDescription": "The ordering in which a uncle is included within its block.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "uncleBlockNumber": {
                                        "title": "blockNumber",
                                        "type": "string",
                                        "description": "The block in which the uncle was included",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "The block in which the uncle was included",
                                        "additionalProperties": false
                                    },
                                    "index": {
                                        "title": "integer",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "description": "The ordering in which a uncle is included within its block.",
                                        "markdownDescription": "The ordering in which a uncle is included within its block.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getUncleCountByBlockHash"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockHash": {
                                        "title": "blockHash",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{64}$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getUncleCountByBlockNumber"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getProof"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 3,
                                "maxItems": 3,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the account or contract",
                                        "description": "The address of the account or contract",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "storageKeys",
                                        "items": {
                                            "title": "storageProofKey",
                                            "description": "The key used to get the storage slot in its account tree.",
                                            "type": "string",
                                            "pattern": "^0x[a-fA-F0-9]+$"
                                        },
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "The address of the account or contract",
                                        "description": "The address of the account or contract",
                                        "additionalProperties": false
                                    },
                                    "storageKeys": {
                                        "title": "storageKeys",
                                        "items": {
                                            "title": "storageProofKey",
                                            "description": "The key used to get the storage slot in its account tree.",
                                            "type": "string",
                                            "pattern": "^0x[a-fA-F0-9]+$"
                                        },
                                        "additionalProperties": false
                                    },
                                    "blockNumber": {
                                        "title": "blockNumberOrTag",
                                        "oneOf": [
                                            {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            {
                                                "title": "blockNumberTag",
                                                "type": "string",
                                                "description": "The optional block height description",
                                                "enum": [
                                                    "earliest",
                                                    "latest",
                                                    "pending"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_getWork"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_hashrate"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_mining"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_newBlockFilter"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_newFilter"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "filter",
                                        "type": "object",
                                        "properties": {
                                            "fromBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "toBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "address": {
                                                "title": "oneOrArrayOfAddresses",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "addresses",
                                                        "type": "array",
                                                        "description": "List of contract addresses from which to monitor events",
                                                        "items": {
                                                            "title": "address",
                                                            "type": "string",
                                                            "pattern": "^0x[a-fA-F\\d]{40}$"
                                                        }
                                                    }
                                                ]
                                            },
                                            "topics": {
                                                "title": "LogTopics",
                                                "description": "Topics are order-dependent. Each topic can also be an array of DATA with 'or' options.",
                                                "type": "array",
                                                "items": {
                                                    "title": "topic",
                                                    "description": "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))",
                                                    "type": "string",
                                                    "pattern": "^0x([a-fA-F\\d]{64})?$"
                                                }
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "filter": {
                                        "title": "filter",
                                        "type": "object",
                                        "properties": {
                                            "fromBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "toBlock": {
                                                "title": "blockNumber",
                                                "type": "string",
                                                "description": "The hex representation of the block's height",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            },
                                            "address": {
                                                "title": "oneOrArrayOfAddresses",
                                                "oneOf": [
                                                    {
                                                        "title": "address",
                                                        "type": "string",
                                                        "pattern": "^0x[a-fA-F\\d]{40}$"
                                                    },
                                                    {
                                                        "title": "addresses",
                                                        "type": "array",
                                                        "description": "List of contract addresses from which to monitor events",
                                                        "items": {
                                                            "title": "address",
                                                            "type": "string",
                                                            "pattern": "^0x[a-fA-F\\d]{40}$"
                                                        }
                                                    }
                                                ]
                                            },
                                            "topics": {
                                                "title": "LogTopics",
                                                "description": "Topics are order-dependent. Each topic can also be an array of DATA with 'or' options.",
                                                "type": "array",
                                                "items": {
                                                    "title": "topic",
                                                    "description": "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))",
                                                    "type": "string",
                                                    "pattern": "^0x([a-fA-F\\d]{64})?$"
                                                }
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_newPendingTransactionFilter"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_pendingTransactions"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_protocolVersion"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_sendRawTransaction"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "bytes",
                                        "type": "string",
                                        "description": "The signed transaction data",
                                        "pattern": "^0x([a-fA-F0-9]?)+$",
                                        "markdownDescription": "The signed transaction data",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "signedTransactionData": {
                                        "title": "bytes",
                                        "type": "string",
                                        "description": "The signed transaction data",
                                        "pattern": "^0x([a-fA-F0-9]?)+$",
                                        "markdownDescription": "The signed transaction data",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_submitHashrate"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "dataWord",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "dataWord",
                                        "type": "string",
                                        "description": "String identifying the client",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "markdownDescription": "String identifying the client",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "hashRate": {
                                        "title": "dataWord",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    },
                                    "id": {
                                        "title": "dataWord",
                                        "type": "string",
                                        "description": "String identifying the client",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "markdownDescription": "String identifying the client",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_submitWork"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 3,
                                "maxItems": 3,
                                "defaultSnippets": [
                                    {
                                        "label": "submitWorkExample",
                                        "body": [
                                            "0x0000000000000001",
                                            "0x6bf2cAE0dE3ec3ecA5E194a6C6e02cf42aADfe1C2c4Fff12E5D36C3Cf7297F22",
                                            "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "nonce",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "powHash",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "mixHash",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "nonce": {
                                        "title": "nonce",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "additionalProperties": false
                                    },
                                    "powHash": {
                                        "title": "powHash",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    },
                                    "mixHash": {
                                        "title": "mixHash",
                                        "type": "string",
                                        "pattern": "^0x([a-fA-F\\d]{64})?$",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_syncing"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "eth_uninstallFilter"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "filterId": {
                                        "title": "filterId",
                                        "type": "string",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "getPermissions"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "requestPermissions"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 1,
                                "defaultSnippets": [
                                    {
                                        "label": "requestPermissionObjectExample",
                                        "description": "example for a permission request for listAccounts",
                                        "body": [
                                            {
                                                "listAccounts": {}
                                            }
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "requestPermissionObject",
                                        "type": "object",
                                        "properties": {
                                            "listAccounts": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "requestPermissionsObject": {
                                        "title": "requestPermissionObject",
                                        "type": "object",
                                        "properties": {
                                            "listAccounts": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "listAccounts"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "hidden",
                                        "type": "boolean",
                                        "markdownDescription": "A parameter to hide or show an account or feature",
                                        "description": "A parameter to hide or show an account or feature",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "hidden": {
                                        "title": "hidden",
                                        "type": "boolean",
                                        "markdownDescription": "A parameter to hide or show an account or feature",
                                        "description": "A parameter to hide or show an account or feature",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "listWallets"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "hidden",
                                        "type": "boolean",
                                        "markdownDescription": "A parameter to hide or show an account or feature",
                                        "description": "A parameter to hide or show an account or feature",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "hidden": {
                                        "title": "hidden",
                                        "type": "boolean",
                                        "markdownDescription": "A parameter to hide or show an account or feature",
                                        "description": "A parameter to hide or show an account or feature",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "hideAccount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "unhideAccount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "createAccount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [
                                    {
                                        "label": "newAccountExample",
                                        "description": "Example of creating a new account",
                                        "body": [
                                            {
                                                "name": "my test wallet",
                                                "description": "my test wallet description"
                                            }
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "newAccount",
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "title": "accountName",
                                                "description": "account name",
                                                "type": "string"
                                            },
                                            "description": {
                                                "title": "accountDescription",
                                                "description": "account description",
                                                "type": "string"
                                            },
                                            "passphrase": {
                                                "title": "passphrase",
                                                "description": "passphrase used to encode keyfile (recommend to use 8+ words with good entropy)",
                                                "type": "string"
                                            },
                                            "privateKey": {
                                                "title": "privateKey",
                                                "description": "optional private key field for importing",
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "passphrase"
                                        ],
                                        "markdownDescription": "Creates a new account and stores it locally as a passphrase-encoded keystore file.",
                                        "description": "Creates a new account and stores it locally as a passphrase-encoded keystore file.",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "newAccount": {
                                        "title": "newAccount",
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "title": "accountName",
                                                "description": "account name",
                                                "type": "string"
                                            },
                                            "description": {
                                                "title": "accountDescription",
                                                "description": "account description",
                                                "type": "string"
                                            },
                                            "passphrase": {
                                                "title": "passphrase",
                                                "description": "passphrase used to encode keyfile (recommend to use 8+ words with good entropy)",
                                                "type": "string"
                                            },
                                            "privateKey": {
                                                "title": "privateKey",
                                                "description": "optional private key field for importing",
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "passphrase"
                                        ],
                                        "markdownDescription": "Creates a new account and stores it locally as a passphrase-encoded keystore file.",
                                        "description": "Creates a new account and stores it locally as a passphrase-encoded keystore file.",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "signTransaction"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "from",
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "from": {
                                                "title": "address",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "gas",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "gasPrice",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "data": {
                                                "title": "data",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "nonce",
                                                "description": "A number only to be used once",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "type": "string"
                                            },
                                            "to": {
                                                "title": "address",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "value": {
                                                "title": "wei",
                                                "type": "string",
                                                "description": "Hex representation of Wei",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            }
                                        },
                                        "markdownDescription": "transaction to sign",
                                        "description": "transaction to sign",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chain id for the transaction",
                                        "description": "chain id for the transaction",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "transaction": {
                                        "title": "transaction",
                                        "type": "object",
                                        "required": [
                                            "from",
                                            "gas",
                                            "gasPrice",
                                            "nonce"
                                        ],
                                        "properties": {
                                            "from": {
                                                "title": "address",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "gas": {
                                                "title": "gas",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The gas limit provided by the sender in Wei"
                                            },
                                            "gasPrice": {
                                                "title": "gasPrice",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The gas price willing to be paid by the sender in Wei"
                                            },
                                            "data": {
                                                "title": "data",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "description": "The data field sent with the transaction"
                                            },
                                            "nonce": {
                                                "title": "nonce",
                                                "description": "A number only to be used once",
                                                "pattern": "^0x[a-fA-F0-9]+$",
                                                "type": "string"
                                            },
                                            "to": {
                                                "title": "address",
                                                "type": "string",
                                                "pattern": "^0x[a-fA-F\\d]{40}$"
                                            },
                                            "value": {
                                                "title": "wei",
                                                "type": "string",
                                                "description": "Hex representation of Wei",
                                                "pattern": "^0x[a-fA-F0-9]+$"
                                            }
                                        },
                                        "markdownDescription": "transaction to sign",
                                        "description": "transaction to sign",
                                        "additionalProperties": false
                                    },
                                    "chainId": {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chain id for the transaction",
                                        "description": "chain id for the transaction",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "signTypedData"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 3,
                                "maxItems": 3,
                                "defaultSnippets": [
                                    {
                                        "label": "signedTypeDataExample",
                                        "description": "A signedTypedData Example",
                                        "body": [
                                            {
                                                "types": {
                                                    "EIP712Domain": [
                                                        {
                                                            "name": "name",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "version",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "chainId",
                                                            "type": "uint256"
                                                        },
                                                        {
                                                            "name": "verifyingContract",
                                                            "type": "address"
                                                        }
                                                    ],
                                                    "Person": [
                                                        {
                                                            "name": "name",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "wallet",
                                                            "type": "address"
                                                        }
                                                    ],
                                                    "Mail": [
                                                        {
                                                            "name": "from",
                                                            "type": "Person"
                                                        },
                                                        {
                                                            "name": "to",
                                                            "type": "Person"
                                                        },
                                                        {
                                                            "name": "contents",
                                                            "type": "string"
                                                        }
                                                    ]
                                                },
                                                "primaryType": "Mail",
                                                "domain": {
                                                    "name": "Ether Mail",
                                                    "version": "1",
                                                    "chainId": 1,
                                                    "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                                                },
                                                "message": {
                                                    "from": {
                                                        "name": "Cow",
                                                        "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
                                                    },
                                                    "to": {
                                                        "name": "Bob",
                                                        "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
                                                    },
                                                    "contents": "Hello, Bob!"
                                                }
                                            },
                                            "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826",
                                            "0x6"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "SignedTypedData",
                                        "type": "object",
                                        "properties": {
                                            "types": {
                                                "type": "object",
                                                "title": "types",
                                                "properties": {
                                                    "EIP712Domain": {
                                                        "title": "eip712Domain",
                                                        "type": "array",
                                                        "items": {
                                                            "title": "TypedData",
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string",
                                                                    "title": "string_doaGddGA"
                                                                },
                                                                "type": {
                                                                    "type": "string",
                                                                    "title": "string_doaGddGA"
                                                                }
                                                            }
                                                        }
                                                    }
                                                },
                                                "additionalProperties": {
                                                    "type": "array",
                                                    "items": {
                                                        "title": "TypedData",
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            }
                                                        }
                                                    },
                                                    "title": "unorderedSetOf_TypedData6eBia985"
                                                },
                                                "required": [
                                                    "EIP712Domain"
                                                ]
                                            },
                                            "primaryType": {
                                                "type": "string",
                                                "title": "string_doaGddGA"
                                            },
                                            "domain": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            },
                                            "message": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            }
                                        },
                                        "required": [
                                            "types",
                                            "primaryType",
                                            "domain",
                                            "message"
                                        ],
                                        "markdownDescription": "typedData to sign",
                                        "description": "typedData to sign",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "address to send transaction to",
                                        "description": "address to send transaction to",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chainId for tthe signed type data transaction",
                                        "description": "chainId for tthe signed type data transaction",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "typedData": {
                                        "title": "SignedTypedData",
                                        "type": "object",
                                        "properties": {
                                            "types": {
                                                "type": "object",
                                                "title": "types",
                                                "properties": {
                                                    "EIP712Domain": {
                                                        "title": "eip712Domain",
                                                        "type": "array",
                                                        "items": {
                                                            "title": "TypedData",
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string",
                                                                    "title": "string_doaGddGA"
                                                                },
                                                                "type": {
                                                                    "type": "string",
                                                                    "title": "string_doaGddGA"
                                                                }
                                                            }
                                                        }
                                                    }
                                                },
                                                "additionalProperties": {
                                                    "type": "array",
                                                    "items": {
                                                        "title": "TypedData",
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            }
                                                        }
                                                    },
                                                    "title": "unorderedSetOf_TypedData6eBia985"
                                                },
                                                "required": [
                                                    "EIP712Domain"
                                                ]
                                            },
                                            "primaryType": {
                                                "type": "string",
                                                "title": "string_doaGddGA"
                                            },
                                            "domain": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            },
                                            "message": {
                                                "type": "object",
                                                "title": "object_HAgrRKSz"
                                            }
                                        },
                                        "required": [
                                            "types",
                                            "primaryType",
                                            "domain",
                                            "message"
                                        ],
                                        "markdownDescription": "typedData to sign",
                                        "description": "typedData to sign",
                                        "additionalProperties": false
                                    },
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "address to send transaction to",
                                        "description": "address to send transaction to",
                                        "additionalProperties": false
                                    },
                                    "chainId": {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chainId for tthe signed type data transaction",
                                        "description": "chainId for tthe signed type data transaction",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "importKeyfile"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "keyfile",
                                        "type": "object",
                                        "properties": {
                                            "version": {
                                                "type": "integer",
                                                "title": "integer_2aHOqbcQ"
                                            },
                                            "id": {
                                                "type": "string",
                                                "title": "string_doaGddGA"
                                            },
                                            "crypto": {
                                                "title": "crypto",
                                                "type": "object",
                                                "properties": {
                                                    "ciphertext": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "cipherparams": {
                                                        "type": "object",
                                                        "properties": {
                                                            "iv": {
                                                                "title": "iv",
                                                                "type": "string"
                                                            }
                                                        },
                                                        "title": "objectOf_iv_0Y2c7QDo"
                                                    },
                                                    "cipher": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "kdf": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "kdfparams": {
                                                        "type": "object",
                                                        "properties": {
                                                            "dklen": {
                                                                "title": "dklen",
                                                                "type": "integer"
                                                            },
                                                            "salt": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            },
                                                            "n": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            },
                                                            "r": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            },
                                                            "p": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            }
                                                        },
                                                        "required": [
                                                            "dklen",
                                                            "salt",
                                                            "n",
                                                            "r",
                                                            "p"
                                                        ],
                                                        "title": "objectOf_string_doaGddGA_integer_2aHOqbcQ_integer_2aHOqbcQ_integer_2aHOqbcQ_dklen_m9EYoAXy"
                                                    },
                                                    "mac": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    }
                                                },
                                                "required": [
                                                    "kdfparams",
                                                    "kdf",
                                                    "cipher",
                                                    "cipherparams",
                                                    "ciphertext",
                                                    "mac"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "crypto",
                                            "id",
                                            "version"
                                        ],
                                        "markdownDescription": "keyfile in json format that MUST comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                                        "description": "keyfile in json format that MUST comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "keyfile": {
                                        "title": "keyfile",
                                        "type": "object",
                                        "properties": {
                                            "version": {
                                                "type": "integer",
                                                "title": "integer_2aHOqbcQ"
                                            },
                                            "id": {
                                                "type": "string",
                                                "title": "string_doaGddGA"
                                            },
                                            "crypto": {
                                                "title": "crypto",
                                                "type": "object",
                                                "properties": {
                                                    "ciphertext": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "cipherparams": {
                                                        "type": "object",
                                                        "properties": {
                                                            "iv": {
                                                                "title": "iv",
                                                                "type": "string"
                                                            }
                                                        },
                                                        "title": "objectOf_iv_0Y2c7QDo"
                                                    },
                                                    "cipher": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "kdf": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    },
                                                    "kdfparams": {
                                                        "type": "object",
                                                        "properties": {
                                                            "dklen": {
                                                                "title": "dklen",
                                                                "type": "integer"
                                                            },
                                                            "salt": {
                                                                "type": "string",
                                                                "title": "string_doaGddGA"
                                                            },
                                                            "n": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            },
                                                            "r": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            },
                                                            "p": {
                                                                "type": "integer",
                                                                "title": "integer_2aHOqbcQ"
                                                            }
                                                        },
                                                        "required": [
                                                            "dklen",
                                                            "salt",
                                                            "n",
                                                            "r",
                                                            "p"
                                                        ],
                                                        "title": "objectOf_string_doaGddGA_integer_2aHOqbcQ_integer_2aHOqbcQ_integer_2aHOqbcQ_dklen_m9EYoAXy"
                                                    },
                                                    "mac": {
                                                        "type": "string",
                                                        "title": "string_doaGddGA"
                                                    }
                                                },
                                                "required": [
                                                    "kdfparams",
                                                    "kdf",
                                                    "cipher",
                                                    "cipherparams",
                                                    "ciphertext",
                                                    "mac"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "crypto",
                                            "id",
                                            "version"
                                        ],
                                        "markdownDescription": "keyfile in json format that MUST comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                                        "description": "keyfile in json format that MUST comply with the [Web3 Secret Storage Definition](https://github.com/ethereumproject/wiki/wiki/Web3-Secret-Storage-Definition)",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "generateMnemonic"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 0,
                                "maxItems": 0,
                                "defaultSnippets": [],
                                "items": []
                            },
                            {
                                "type": "object",
                                "properties": {}
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "importMnemonic"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [
                                    {
                                        "label": "importMnemonicExample",
                                        "description": "example of importing a mnemonic phrase",
                                        "body": [
                                            {
                                                "name": "my imported wallet",
                                                "description": "my imported wallet description",
                                                "hdPath": "m/44/60/160720'/0",
                                                "mnemonic": "icon suggest road current ripple engage spell clay route large arena climb oxygen electric cupboard dream title immune fit beyond mouse slab bronze salad"
                                            }
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "importMnemonicOptions",
                                        "type": "object",
                                        "required": [
                                            "mnemonic",
                                            "hdPath",
                                            "passphrase"
                                        ],
                                        "properties": {
                                            "mnemonic": {
                                                "title": "mnemonic",
                                                "type": "string",
                                                "description": "a list of 24 words"
                                            },
                                            "name": {
                                                "title": "mnemonicName",
                                                "type": "string"
                                            },
                                            "description": {
                                                "title": "mnemonicDescription",
                                                "type": "string"
                                            },
                                            "passphrase": {
                                                "title": "passphrase",
                                                "description": "passphrase used to encode keyfile (recommend to use 8+ words with good entropy)",
                                                "type": "string"
                                            },
                                            "hdPath": {
                                                "title": "mnemonicHDPath",
                                                "type": "string"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "importMnemonicOptions": {
                                        "title": "importMnemonicOptions",
                                        "type": "object",
                                        "required": [
                                            "mnemonic",
                                            "hdPath",
                                            "passphrase"
                                        ],
                                        "properties": {
                                            "mnemonic": {
                                                "title": "mnemonic",
                                                "type": "string",
                                                "description": "a list of 24 words"
                                            },
                                            "name": {
                                                "title": "mnemonicName",
                                                "type": "string"
                                            },
                                            "description": {
                                                "title": "mnemonicDescription",
                                                "type": "string"
                                            },
                                            "passphrase": {
                                                "title": "passphrase",
                                                "description": "passphrase used to encode keyfile (recommend to use 8+ words with good entropy)",
                                                "type": "string"
                                            },
                                            "hdPath": {
                                                "title": "mnemonicHDPath",
                                                "type": "string"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "getAccountFromMnemonic"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [
                                    {
                                        "label": "getAccountFromMnemonicExample",
                                        "description": "example of importing a mnemonic phrase",
                                        "body": [
                                            {
                                                "uuid": "35ee9c7a-8ce5-48b7-80c3-7ad6602d43f4"
                                            }
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "AccountMnemonicOptions",
                                        "type": "object",
                                        "properties": {
                                            "uuid": {
                                                "title": "uuid",
                                                "schema": {
                                                    "type": "string"
                                                }
                                            },
                                            "index": {
                                                "title": "index",
                                                "schema": {
                                                    "type": "number"
                                                }
                                            }
                                        },
                                        "required": [
                                            "uuid"
                                        ],
                                        "markdownDescription": "mnemonic account generation options",
                                        "description": "mnemonic account generation options",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "accountFromMnemonicOptions": {
                                        "title": "AccountMnemonicOptions",
                                        "type": "object",
                                        "properties": {
                                            "uuid": {
                                                "title": "uuid",
                                                "schema": {
                                                    "type": "string"
                                                }
                                            },
                                            "index": {
                                                "title": "index",
                                                "schema": {
                                                    "type": "number"
                                                }
                                            }
                                        },
                                        "required": [
                                            "uuid"
                                        ],
                                        "markdownDescription": "mnemonic account generation options",
                                        "description": "mnemonic account generation options",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "exportAccount"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 1,
                                "defaultSnippets": [],
                                "items": [
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "markdownDescription": "hex-encoded 20 bytes public address",
                                        "description": "hex-encoded 20 bytes public address",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "method": {
                        "const": "sign"
                    }
                }
            },
            "then": {
                "properties": {
                    "params": {
                        "oneOf": [
                            {
                                "type": "array",
                                "minItems": 3,
                                "maxItems": 3,
                                "defaultSnippets": [
                                    {
                                        "label": "signMessageExample",
                                        "body": [
                                            "0x74657374",
                                            "0x90ee510fb88ea47a84b45a6d983a0bc6b193e385",
                                            "0x3d"
                                        ]
                                    }
                                ],
                                "items": [
                                    {
                                        "title": "hexString",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "data to sign",
                                        "description": "data to sign",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chain id for the transaction",
                                        "description": "chain id for the transaction",
                                        "additionalProperties": false
                                    }
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "dataToSign": {
                                        "title": "hexString",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "data to sign",
                                        "description": "data to sign",
                                        "additionalProperties": false
                                    },
                                    "address": {
                                        "title": "address",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F\\d]{40}$",
                                        "additionalProperties": false
                                    },
                                    "chainId": {
                                        "title": "chainId",
                                        "type": "string",
                                        "pattern": "^0x[a-fA-F0-9]+$",
                                        "markdownDescription": "chain id for the transaction",
                                        "description": "chain id for the transaction",
                                        "additionalProperties": false
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        }
    ]
}

I tried doing the minimum schema and it seems to work, so maybe it is the if/then?:

Working minimum JSON Schema
{
    "title": "jsonrpcSchema",
    "type": "object",
    "properties": {
        "jsonrpc": {
            "title": "jsonrpc",
            "type": "string",
            "enum": [
                "2.0"
            ],
            "description": "JSON-RPC version string"
        },
        "id": {
            "title": "id",
            "description": "unique identifier for the JSON-RPC request",
            "oneOf": [
                {
                    "title": "stringId",
                    "type": "string"
                },
                {
                    "title": "numberId",
                    "type": "string"
                }
            ]
        },
        "method": {
            "type": "string"
        }
    }
}

should support patternProperties

Describe the bug
should support patternProperties

To Reproduce
Create a schema with a patternProperty and try to use it

image

Expected behavior
should provide valid types

Additional Screenshots

snippet of schema:

image

support const

Describe the bug
using const I should get auto complete for my typescript type.

To Reproduce
use const in a json schema

Expected behavior
Should see auto completion for the string. I think it should behave just like enum.

Screenshots
If applicable, add screenshots to help explain your problem.
image

simplified offending schema to reproduce:

{
    "title": "jsonrpcSchema",
    "type": "object",
    "properties": {
        "jsonrpc": {
            "title": "jsonrpc",
            "type": "string",
            "enum": [
                "2.0"
            ],
            "description": "JSON-RPC version string"
        },
        "id": {
            "title": "id",
            "description": "unique identifier for the JSON-RPC request",
            "oneOf": [
                {
                    "title": "stringId",
                    "type": "string"
                },
                {
                    "title": "numberId",
                    "type": "string"
                }
            ]
        },
        "method": {
            "type": "string",
            "oneOf": [
                {
                    "title": "web3_clientVersion",
                    "const": "web3_clientVersion",
                    "description": "Returns the version of the current client",
                    "markdownDescription": "Returns the version of the current client"
                }
            ]
        }
    }
}

Give a warning message when a schema has fields but no type field

A common issue is that users of json schema expect to be able to leave off type when using keywords that apply to the type that they want inferred. Since this behaviour results in some really ugly code, type is essentially a required field if you want to get any good results.

Type as array support

In JSON Schema, a type field may be specified as either a string, or an array of strings.

In effect, it is the same thing as using oneOf. ATM the transpiler does not have good support for this, and returns things as untyped (becomes the 'any' type).

The proposed solution is to pre-process the input json schema, turning all schemas and subschemas which have the use of type: [] into a schema + subschemas that use oneOf instead. The end result is that types are generated for the schema, and the user never becomes aware that the type: [] is internally converted to oneOf.

TypeError: Cannot create property 'title' on string '

Describe the bug

Regardless of which schema I use I get the following error

node_modules/.pnpm/@[email protected]/node_modules/@json-schema-tools/titleizer/build/index.js:132
    schema.title = "".concat(prefix).concat(friendlyHash);
                 ^

TypeError: Cannot create property 'title' on string '{
...

To Reproduce
Steps to reproduce the behavior:

  1. Seems to happen regardless of which jsonschema I use
  2. Nothing is transpiled

Expected behavior

Expect it to not error and to transpile

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Additional Properties - typing is too loose for typescript

Additional properties and Patterned Properties append an any type to the end of the typing. The JSON schema spec doesn't quite line up with the typings generated. This would be a potentially breaking change for consuming clients. As they would all of a sudden generate types that didn't work with any. We want to move slowly here about introducing more specificity.

image

suggested change is probably

    if (s.additionalProperties ===  true || s.additionalProperties === undefined) {
      propertyTypings.push("  [k: string]: any;");
      }
    else if (s.additionalProperties !== false) {
      const subTypes: string[] = [];
      Object.values(s.additionalProperties!).forEach((prop: JSONSchema) => {
        const title = this.getSafeTitle(this.refToTitle(prop));
        if (subTypes.includes(title) === false) {
          subTypes.push(title);
        }
      });
      propertyTypings.push(`  [k: string]: ${subTypes.join(" | ")}`);
    } 

This issue will serve as tracking for open-rpc changes floating down the pipeline.

Basic types?

Is your feature request related to a problem? Please describe.

I have a large schema with many basic elements, where the element subschema is just eg {type:"string"} or similar.
If every element needs to have a type it causes headaches in Go, because an alias of a string is not a string, and it requires lots of explicit casting.

Describe the solution you'd like
Perhaps there could be a flag like 'primitive_types' that, if a subschema specifies only type, will not create a new alias but just use the builtin language type.

Describe alternatives you've considered
I tried defining "title":"string" but that creates an alias called String, same issue.

I considered using a postprocessor to remove those unnecessary aliases, but preferably it could be handled by the transpiler.

I considered monkey-patching the library, but I'm not sure where and what I'd have to tweak.

Additional context
Go example: https://play.golang.com/p/YOf3DeL3_Ut

Rust: Cycle detection and Boxing needs to check recursively

ATM the 'to box or not to box' is too simplistic. We need to know if there is a cycle at play, and if so, always box. The cycles can exist in subschema branches, and so the simplistic approach isnt working for json-schema meta schema.

There are multiple approaches with varying complexity to implement.

  1. Box everything
  2. Box all refs to struct or enums. Still requires checking the inside of things instead of just pulling the title from the ref, but only 1 level deep still.
  3. Hook into traverse method as its running, passing along the isCycle param. Codegen methods can then handle boxing themselves if they are part of a cycle.
  4. while doing initial processing, create a map that holds schema.title -> is a cycle. Use this map later to decide if you should box or not.

Rust fails to compile with enums containing periods

Describe the bug

When given a string schema:

{ 
  "title": "openrpc", 
  "type": "string", 
  "enum": ["1.2.6", "1.2.5", "1.0.0-rc1", "1.0.0-rc0"] 
}

in rust we get:

#[derive(Serialize, Deserialize)]
pub enum Openrpc {
    #[serde(rename = "1.2.6")]
    26,
    #[serde(rename = "1.2.5")]
    25,
    #[serde(rename = "1.0.0-rc1")]
    00Rc1,
    #[serde(rename = "1.0.0-rc0")]
    00Rc0,
}

which produces the compiler error:

error: expected identifier, found `26`
 --> src/lib.rs:8:5
  |
8 |     26,
  |     ^^ expected identifier

Rust: derive defaults

all structs should have

#[serde(default)]

any struct using builder derivation should use

#[derive(Builder, Default)]

Rust: Additional properties mixed & properties

There are a few different types of object schemas

  1. properties is used, additional props unused
  2. props unused, addtional props used
  3. both are used

at least for now, when additional props is used on its own, we should give the type HashMap<String, ..>.

If just props is used, it should be a simple struct.

If both are used, it should be a struct alongside a flattened AdditionalProps field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.