From 4e7699fd47653fb09743ec89fb59048fa46d5ec3 Mon Sep 17 00:00:00 2001
From: a <a@a.a>
Date: Wed, 21 Sep 2022 14:11:44 -0500
Subject: [PATCH] a

---
 go.mod                                        |    8 +
 go.sum                                        |   26 +
 openrpc/cmd/cli.go                            |   25 +-
 .../api-spec}/methods/debug/getters.yaml      |    0
 .../api-spec}/methods/engine/README.md        |    0
 .../methods/engine/authentication.md          |    0
 .../api-spec}/methods/engine/specification.md |    0
 .../api-spec}/methods/eth/block.yaml          |    0
 .../api-spec}/methods/eth/client.yaml         |    0
 .../api-spec}/methods/eth/execute.yaml        |    0
 .../api-spec}/methods/eth/fee_market.yaml     |    0
 .../api-spec}/methods/eth/filter.yaml         |    0
 .../api-spec}/methods/eth/mining.yaml         |    0
 .../api-spec}/methods/eth/sign.yaml           |    0
 .../api-spec}/methods/eth/state.yaml          |    0
 .../api-spec}/methods/eth/submit.yaml         |    0
 .../api-spec}/methods/eth/transaction.yaml    |    0
 .../api-spec}/schemas/base-types.yaml         |    0
 .../api-spec}/schemas/block.yaml              |    0
 .../api-spec}/schemas/client.yaml             |    0
 .../api-spec}/schemas/filter.yaml             |    0
 .../api-spec}/schemas/receipt.yaml            |    0
 .../api-spec}/schemas/state.yaml              |    0
 .../api-spec}/schemas/transaction.yaml        |    0
 openrpc/out/gogenerate.go                     |    1 +
 openrpc/out/spec.json                         | 1209 ++++++++++++-----
 openrpc/types/types.go                        |  119 +-
 27 files changed, 1012 insertions(+), 376 deletions(-)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/debug/getters.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/engine/README.md (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/engine/authentication.md (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/engine/specification.md (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/block.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/client.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/execute.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/fee_market.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/filter.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/mining.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/sign.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/state.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/submit.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/methods/eth/transaction.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/base-types.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/block.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/client.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/filter.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/receipt.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/state.yaml (100%)
 rename openrpc/{parse/testdata/execution-api => out/api-spec}/schemas/transaction.yaml (100%)

diff --git a/go.mod b/go.mod
index abc8a8b..b13e07a 100644
--- a/go.mod
+++ b/go.mod
@@ -9,23 +9,31 @@ require (
 	github.com/davecgh/go-spew v1.1.1
 	github.com/deckarep/golang-set v1.8.0
 	github.com/ethereum/go-ethereum v1.10.22
+	github.com/go-openapi/spec v0.20.7
 	github.com/gobuffalo/packr/v2 v2.8.3
 	github.com/iancoleman/strcase v0.2.0
 	github.com/json-iterator/go v1.1.12
 	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
 	gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
+	gopkg.in/yaml.v2 v2.4.0
 	nhooyr.io/websocket v1.8.7
+	sigs.k8s.io/yaml v1.3.0
 )
 
 require (
 	github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
 	github.com/go-ole/go-ole v1.2.1 // indirect
+	github.com/go-openapi/jsonpointer v0.19.5 // indirect
+	github.com/go-openapi/jsonreference v0.20.0 // indirect
+	github.com/go-openapi/swag v0.19.15 // indirect
 	github.com/go-stack/stack v1.8.0 // indirect
 	github.com/gobuffalo/logger v1.0.6 // indirect
 	github.com/gobuffalo/packd v1.0.1 // indirect
 	github.com/gorilla/websocket v1.4.2 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
 	github.com/karrick/godirwalk v1.16.1 // indirect
 	github.com/klauspost/compress v1.10.3 // indirect
+	github.com/mailru/easyjson v0.7.6 // indirect
 	github.com/markbates/errx v1.1.0 // indirect
 	github.com/markbates/oncer v1.0.0 // indirect
 	github.com/markbates/safe v1.0.1 // indirect
diff --git a/go.sum b/go.sum
index 1b02745..5d68e8c 100644
--- a/go.sum
+++ b/go.sum
@@ -67,6 +67,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -93,6 +94,16 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2
 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
 github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
 github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
+github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
+github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
+github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
+github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI=
+github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
+github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
+github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
 github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
 github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
 github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
@@ -209,6 +220,8 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47
 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
 github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -226,9 +239,15 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
 github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
 github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
+github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
 github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI=
 github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc=
 github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY=
@@ -257,6 +276,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
 github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@@ -657,6 +678,8 @@ google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/l
 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
 gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
@@ -667,6 +690,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -682,3 +706,5 @@ nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
+sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/openrpc/cmd/cli.go b/openrpc/cmd/cli.go
index a6d0bd0..27a27c4 100644
--- a/openrpc/cmd/cli.go
+++ b/openrpc/cmd/cli.go
@@ -33,7 +33,30 @@ type CompileCommand struct {
 }
 
 func (c *CompileCommand) Run() error {
-	// TODO
+	openrpc := types.NewOpenRPCSpec1()
+	var err error
+	for _, v := range c.Methods {
+		err = openrpc.AddMethods(v)
+		if err != nil {
+			return err
+		}
+	}
+	for _, v := range c.Schemas {
+		err = openrpc.AddSchemas(v)
+		if err != nil {
+			return err
+		}
+	}
+	jzn, err := json.MarshalIndent(openrpc, "", " ")
+	if err != nil {
+		return err
+	}
+	err = os.WriteFile(c.Output, jzn, 0644)
+	if err != nil {
+		return err
+	}
+	return nil
+
 	return nil
 }
 
diff --git a/openrpc/parse/testdata/execution-api/methods/debug/getters.yaml b/openrpc/out/api-spec/methods/debug/getters.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/debug/getters.yaml
rename to openrpc/out/api-spec/methods/debug/getters.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/engine/README.md b/openrpc/out/api-spec/methods/engine/README.md
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/engine/README.md
rename to openrpc/out/api-spec/methods/engine/README.md
diff --git a/openrpc/parse/testdata/execution-api/methods/engine/authentication.md b/openrpc/out/api-spec/methods/engine/authentication.md
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/engine/authentication.md
rename to openrpc/out/api-spec/methods/engine/authentication.md
diff --git a/openrpc/parse/testdata/execution-api/methods/engine/specification.md b/openrpc/out/api-spec/methods/engine/specification.md
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/engine/specification.md
rename to openrpc/out/api-spec/methods/engine/specification.md
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/block.yaml b/openrpc/out/api-spec/methods/eth/block.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/block.yaml
rename to openrpc/out/api-spec/methods/eth/block.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/client.yaml b/openrpc/out/api-spec/methods/eth/client.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/client.yaml
rename to openrpc/out/api-spec/methods/eth/client.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/execute.yaml b/openrpc/out/api-spec/methods/eth/execute.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/execute.yaml
rename to openrpc/out/api-spec/methods/eth/execute.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/fee_market.yaml b/openrpc/out/api-spec/methods/eth/fee_market.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/fee_market.yaml
rename to openrpc/out/api-spec/methods/eth/fee_market.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/filter.yaml b/openrpc/out/api-spec/methods/eth/filter.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/filter.yaml
rename to openrpc/out/api-spec/methods/eth/filter.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/mining.yaml b/openrpc/out/api-spec/methods/eth/mining.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/mining.yaml
rename to openrpc/out/api-spec/methods/eth/mining.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/sign.yaml b/openrpc/out/api-spec/methods/eth/sign.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/sign.yaml
rename to openrpc/out/api-spec/methods/eth/sign.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/state.yaml b/openrpc/out/api-spec/methods/eth/state.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/state.yaml
rename to openrpc/out/api-spec/methods/eth/state.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/submit.yaml b/openrpc/out/api-spec/methods/eth/submit.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/submit.yaml
rename to openrpc/out/api-spec/methods/eth/submit.yaml
diff --git a/openrpc/parse/testdata/execution-api/methods/eth/transaction.yaml b/openrpc/out/api-spec/methods/eth/transaction.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/methods/eth/transaction.yaml
rename to openrpc/out/api-spec/methods/eth/transaction.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/base-types.yaml b/openrpc/out/api-spec/schemas/base-types.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/base-types.yaml
rename to openrpc/out/api-spec/schemas/base-types.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/block.yaml b/openrpc/out/api-spec/schemas/block.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/block.yaml
rename to openrpc/out/api-spec/schemas/block.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/client.yaml b/openrpc/out/api-spec/schemas/client.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/client.yaml
rename to openrpc/out/api-spec/schemas/client.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/filter.yaml b/openrpc/out/api-spec/schemas/filter.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/filter.yaml
rename to openrpc/out/api-spec/schemas/filter.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/receipt.yaml b/openrpc/out/api-spec/schemas/receipt.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/receipt.yaml
rename to openrpc/out/api-spec/schemas/receipt.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/state.yaml b/openrpc/out/api-spec/schemas/state.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/state.yaml
rename to openrpc/out/api-spec/schemas/state.yaml
diff --git a/openrpc/parse/testdata/execution-api/schemas/transaction.yaml b/openrpc/out/api-spec/schemas/transaction.yaml
similarity index 100%
rename from openrpc/parse/testdata/execution-api/schemas/transaction.yaml
rename to openrpc/out/api-spec/schemas/transaction.yaml
diff --git a/openrpc/out/gogenerate.go b/openrpc/out/gogenerate.go
index cd74886..9c8e8f7 100644
--- a/openrpc/out/gogenerate.go
+++ b/openrpc/out/gogenerate.go
@@ -1,3 +1,4 @@
 package out
 
+//go:generate go run gfx.cafe/open/jrpc/openrpc/cmd compile -s api-spec/schemas -m api-spec/methods -o spec.json
 //go:generate go run gfx.cafe/open/jrpc/openrpc/cmd generate -p out -s spec.json -o generated_api.go -t ../templates/types.gotmpl
diff --git a/openrpc/out/spec.json b/openrpc/out/spec.json
index 06d85ef..4acc7a4 100644
--- a/openrpc/out/spec.json
+++ b/openrpc/out/spec.json
@@ -1,10 +1,10 @@
 {
+ "package": "main",
  "openrpc": "1.0.0",
  "info": {
   "title": "gfx.cafe/open/jrpc/openrpc",
   "version": "0.0.0"
  },
- "servers": [],
  "methods": [
   {
    "name": "debug_getRawHeader",
@@ -14,14 +14,18 @@
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Header RLP",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -33,14 +37,18 @@
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Block RLP",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -52,14 +60,18 @@
      "name": "Transaction hash",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "EIP-2718 binary-encoded transaction",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -71,7 +83,9 @@
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
@@ -80,9 +94,14 @@
     "schema": {
      "type": "array",
      "title": "Receipt array",
-     "items": {
-      "$ref": "#/components/schemas/bytes"
-     }
+     "items": [
+      {
+       "$ref": "#/components/schemas/bytes",
+       "title": "",
+       "pattern": ""
+      }
+     ],
+     "pattern": ""
     }
    }
   },
@@ -95,9 +114,14 @@
     "schema": {
      "type": "array",
      "title": "Bad block array",
-     "items": {
-      "$ref": "#/components/schemas/BadBlock"
-     }
+     "items": [
+      {
+       "$ref": "#/components/schemas/BadBlock",
+       "title": "",
+       "pattern": ""
+      }
+     ],
+     "pattern": ""
     }
    }
   },
@@ -109,7 +133,9 @@
      "name": "Block hash",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     },
     {
@@ -117,14 +143,17 @@
      "required": true,
      "schema": {
       "type": "boolean",
-      "title": "hydrated"
+      "title": "hydrated",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Block information",
     "schema": {
-     "$ref": "#/components/schemas/Block"
+     "$ref": "#/components/schemas/Block",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -136,7 +165,9 @@
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     },
     {
@@ -144,14 +175,17 @@
      "required": true,
      "schema": {
       "type": "boolean",
-      "title": "hydrated"
+      "title": "hydrated",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Block information",
     "schema": {
-     "$ref": "#/components/schemas/Block"
+     "$ref": "#/components/schemas/Block",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -161,15 +195,20 @@
    "params": [
     {
      "name": "Block hash",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction count",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -179,15 +218,20 @@
    "params": [
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction count",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -197,15 +241,20 @@
    "params": [
     {
      "name": "Block hash",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Uncle count",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -215,15 +264,20 @@
    "params": [
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Uncle count",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -234,7 +288,9 @@
    "result": {
     "name": "Chain ID",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -245,7 +301,9 @@
    "result": {
     "name": "Syncing status",
     "schema": {
-     "$ref": "#/components/schemas/SyncingStatus"
+     "$ref": "#/components/schemas/SyncingStatus",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -256,7 +314,9 @@
    "result": {
     "name": "Coinbase address",
     "schema": {
-     "$ref": "#/components/schemas/address"
+     "$ref": "#/components/schemas/address",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -269,9 +329,14 @@
     "schema": {
      "type": "array",
      "title": "Accounts",
-     "items": {
-      "$ref": "#/components/schemas/address"
-     }
+     "items": [
+      {
+       "$ref": "#/components/schemas/address",
+       "title": "",
+       "pattern": ""
+      }
+     ],
+     "pattern": ""
     }
    }
   },
@@ -282,7 +347,9 @@
    "result": {
     "name": "Block number",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -294,20 +361,27 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/GenericTransaction"
+      "$ref": "#/components/schemas/GenericTransaction",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Return data",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -319,20 +393,27 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/GenericTransaction"
+      "$ref": "#/components/schemas/GenericTransaction",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Gas used",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -344,13 +425,18 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/GenericTransaction"
+      "$ref": "#/components/schemas/GenericTransaction",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
@@ -361,18 +447,22 @@
      "title": "Access list result",
      "properties": {
       "accessList": {
+       "$ref": "#/components/schemas/AccessList",
        "title": "accessList",
-       "$ref": "#/components/schemas/AccessList"
+       "pattern": ""
       },
       "error": {
        "type": "string",
-       "title": "error"
+       "title": "error",
+       "pattern": ""
       },
       "gasUsed": {
+       "$ref": "#/components/schemas/uint",
        "title": "Gas used",
-       "$ref": "#/components/schemas/uint"
+       "pattern": ""
       }
-     }
+     },
+     "pattern": ""
     }
    }
   },
@@ -383,8 +473,9 @@
    "result": {
     "name": "Gas price",
     "schema": {
+     "$ref": "#/components/schemas/uint",
      "title": "Gas price",
-     "$ref": "#/components/schemas/uint"
+     "pattern": ""
     }
    }
   },
@@ -395,52 +486,54 @@
    "result": {
     "name": "Max priority fee per gas",
     "schema": {
+     "$ref": "#/components/schemas/uint",
      "title": "Max priority fee per gas",
-     "$ref": "#/components/schemas/uint"
+     "pattern": ""
     }
    }
   },
   {
    "name": "eth_feeHistory",
    "summary": "Transaction fee history",
-   "description": "Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range.",
    "params": [
     {
      "name": "blockCount",
-     "description": "Requested range of blocks. Clients will return less than the requested range if not all blocks are available.",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "newestBlock",
-     "description": "Highest block of the requested range.",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "rewardPercentiles",
-     "description": "A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed.",
      "required": true,
      "schema": {
       "type": "array",
       "title": "rewardPercentiles",
-      "items": {
-       "description": "Floating point value between 0 and 100.",
-       "type": "number",
-       "title": "rewardPercentile"
-      }
+      "items": [
+       {
+        "type": "number",
+        "title": "rewardPercentile",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "feeHistoryResult",
-    "description": "Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.",
     "schema": {
-     "description": "Fee history results.",
      "type": "object",
      "title": "feeHistoryResults",
      "required": [
@@ -450,34 +543,43 @@
      ],
      "properties": {
       "baseFeePerGas": {
-       "description": "An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.",
        "type": "array",
        "title": "baseFeePerGasArray",
-       "items": {
-        "$ref": "#/components/schemas/uint"
-       }
+       "items": [
+        {
+         "$ref": "#/components/schemas/uint",
+         "title": "",
+         "pattern": ""
+        }
+       ],
+       "pattern": ""
       },
       "oldestBlock": {
-       "description": "Lowest number block of returned range.",
+       "$ref": "#/components/schemas/uint",
        "title": "oldestBlock",
-       "$ref": "#/components/schemas/uint"
+       "pattern": ""
       },
       "reward": {
-       "description": "A two-dimensional array of effective priority fees per gas at the requested block percentiles.",
        "type": "array",
        "title": "rewardArray",
-       "items": {
-        "description": "An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.",
-        "type": "array",
-        "title": "rewardPercentile",
-        "items": {
-         "description": "A given percentile sample of effective priority fees per gas from a single block in ascending order, weighted by gas used. Zeroes are returned if the block is empty.",
+       "items": [
+        {
+         "type": "array",
          "title": "rewardPercentile",
-         "$ref": "#/components/schemas/uint"
+         "items": [
+          {
+           "$ref": "#/components/schemas/uint",
+           "title": "rewardPercentile",
+           "pattern": ""
+          }
+         ],
+         "pattern": ""
         }
-       }
+       ],
+       "pattern": ""
       }
-     }
+     },
+     "pattern": ""
     }
    }
   },
@@ -487,15 +589,20 @@
    "params": [
     {
      "name": "Filter",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/Filter"
+      "$ref": "#/components/schemas/Filter",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Filter Identifier",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -506,7 +613,9 @@
    "result": {
     "name": "Filter Identifier",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -517,7 +626,9 @@
    "result": {
     "name": "Filter Identifier",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -527,15 +638,20 @@
    "params": [
     {
      "name": "Filter Identifier",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Success",
     "schema": {
-     "type": "boolean"
+     "type": "boolean",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -545,15 +661,20 @@
    "params": [
     {
      "name": "Filter Identifier",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Log objects",
     "schema": {
-     "$ref": "#/components/schemas/FilterResults"
+     "$ref": "#/components/schemas/FilterResults",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -563,15 +684,20 @@
    "params": [
     {
      "name": "Filter Identifier",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Log objects",
     "schema": {
-     "$ref": "#/components/schemas/FilterResults"
+     "$ref": "#/components/schemas/FilterResults",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -581,15 +707,20 @@
    "params": [
     {
      "name": "Filter",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/Filter"
+      "$ref": "#/components/schemas/Filter",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Log objects",
     "schema": {
-     "$ref": "#/components/schemas/FilterResults"
+     "$ref": "#/components/schemas/FilterResults",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -601,7 +732,8 @@
     "name": "Mining status",
     "schema": {
      "type": "boolean",
-     "title": "miningStatus"
+     "title": "miningStatus",
+     "pattern": ""
     }
    }
   },
@@ -612,8 +744,9 @@
    "result": {
     "name": "Mining status",
     "schema": {
+     "$ref": "#/components/schemas/uint",
      "title": "Hashrate",
-     "$ref": "#/components/schemas/uint"
+     "pattern": ""
     }
    }
   },
@@ -625,20 +758,25 @@
     "name": "Current work",
     "schema": {
      "type": "array",
+     "title": "",
      "items": [
       {
+       "$ref": "#/components/schemas/bytes32",
        "title": "Proof-of-work hash",
-       "$ref": "#/components/schemas/bytes32"
+       "pattern": ""
       },
       {
+       "$ref": "#/components/schemas/bytes32",
        "title": "seed hash",
-       "$ref": "#/components/schemas/bytes32"
+       "pattern": ""
       },
       {
+       "$ref": "#/components/schemas/bytes32",
        "title": "difficulty",
-       "$ref": "#/components/schemas/bytes32"
+       "pattern": ""
       }
-     ]
+     ],
+     "pattern": ""
     }
    }
   },
@@ -650,28 +788,36 @@
      "name": "nonce",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes8"
+      "$ref": "#/components/schemas/bytes8",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "hash",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes32"
+      "$ref": "#/components/schemas/bytes32",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "digest",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes32"
+      "$ref": "#/components/schemas/bytes32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Success",
     "schema": {
-     "type": "boolean"
+     "type": "boolean",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -683,21 +829,27 @@
      "name": "Hashrate",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes32"
+      "$ref": "#/components/schemas/bytes32",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "ID",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes32"
+      "$ref": "#/components/schemas/bytes32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Success",
     "schema": {
-     "type": "boolean"
+     "type": "boolean",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -709,21 +861,27 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Message",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes"
+      "$ref": "#/components/schemas/bytes",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Signature",
     "schema": {
-     "$ref": "#/components/schemas/bytes65"
+     "$ref": "#/components/schemas/bytes65",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -735,14 +893,18 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/GenericTransaction"
+      "$ref": "#/components/schemas/GenericTransaction",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Encoded transaction",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -754,20 +916,27 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Balance",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -779,27 +948,36 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Storage slot",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/uint256"
+      "$ref": "#/components/schemas/uint256",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Value",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -811,20 +989,27 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction count",
     "schema": {
-     "$ref": "#/components/schemas/uint"
+     "$ref": "#/components/schemas/uint",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -836,20 +1021,27 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Block",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Bytecode",
     "schema": {
-     "$ref": "#/components/schemas/bytes"
+     "$ref": "#/components/schemas/bytes",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -861,7 +1053,9 @@
      "name": "Address",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      }
     },
     {
@@ -870,23 +1064,32 @@
      "schema": {
       "type": "array",
       "title": "Storage keys",
-      "items": {
-       "$ref": "#/components/schemas/hash32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/hash32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
     },
     {
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Account",
     "schema": {
-     "$ref": "#/components/schemas/AccountProof"
+     "$ref": "#/components/schemas/AccountProof",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -898,14 +1101,18 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/GenericTransaction"
+      "$ref": "#/components/schemas/GenericTransaction",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction hash",
     "schema": {
-     "$ref": "#/components/schemas/hash32"
+     "$ref": "#/components/schemas/hash32",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -917,14 +1124,18 @@
      "name": "Transaction",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/bytes"
+      "$ref": "#/components/schemas/bytes",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction hash",
     "schema": {
-     "$ref": "#/components/schemas/hash32"
+     "$ref": "#/components/schemas/hash32",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -936,14 +1147,18 @@
      "name": "Transaction hash",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction information",
     "schema": {
-     "$ref": "#/components/schemas/TransactionInfo"
+     "$ref": "#/components/schemas/TransactionInfo",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -955,21 +1170,27 @@
      "name": "Block hash",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Transaction index",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction information",
     "schema": {
-     "$ref": "#/components/schemas/TransactionInfo"
+     "$ref": "#/components/schemas/TransactionInfo",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -981,21 +1202,27 @@
      "name": "Block",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/BlockNumberOrTag"
+      "$ref": "#/components/schemas/BlockNumberOrTag",
+      "title": "",
+      "pattern": ""
      }
     },
     {
      "name": "Transaction index",
      "required": true,
      "schema": {
-      "$ref": "#/components/schemas/uint"
+      "$ref": "#/components/schemas/uint",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Transaction information",
     "schema": {
-     "$ref": "#/components/schemas/TransactionInfo"
+     "$ref": "#/components/schemas/TransactionInfo",
+     "title": "",
+     "pattern": ""
     }
    }
   },
@@ -1005,42 +1232,62 @@
    "params": [
     {
      "name": "Transaction hash",
+     "required": false,
      "schema": {
-      "$ref": "#/components/schemas/hash32"
+      "$ref": "#/components/schemas/hash32",
+      "title": "",
+      "pattern": ""
      }
     }
    ],
    "result": {
     "name": "Receipt Information",
     "schema": {
-     "$ref": "#/components/schemas/ReceiptInfo"
+     "$ref": "#/components/schemas/ReceiptInfo",
+     "title": "",
+     "pattern": ""
     }
    }
   }
  ],
+ "servers": [],
  "components": {
   "schemas": {
    "AccessList": {
     "type": "array",
     "title": "Access list",
-    "items": {
-     "$ref": "#/components/schemas/AccessListEntry"
-    }
+    "items": [
+     {
+      "$ref": "#/components/schemas/AccessListEntry",
+      "title": "",
+      "pattern": ""
+     }
+    ],
+    "pattern": ""
    },
    "AccessListEntry": {
     "type": "object",
     "title": "Access list entry",
     "properties": {
      "address": {
-      "$ref": "#/components/schemas/address"
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
      },
      "storageKeys": {
       "type": "array",
-      "items": {
-       "$ref": "#/components/schemas/hash32"
-      }
+      "title": "",
+      "items": [
+       {
+        "$ref": "#/components/schemas/hash32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "AccountProof": {
     "type": "object",
@@ -1058,38 +1305,54 @@
      "accountProof": {
       "type": "array",
       "title": "accountProof",
-      "items": {
-       "$ref": "#/components/schemas/bytes"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/bytes",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      "address": {
+      "$ref": "#/components/schemas/address",
       "title": "address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "balance": {
+      "$ref": "#/components/schemas/uint256",
       "title": "balance",
-      "$ref": "#/components/schemas/uint256"
+      "pattern": ""
      },
      "codeHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "codeHash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/uint64",
       "title": "nonce",
-      "$ref": "#/components/schemas/uint64"
+      "pattern": ""
      },
      "storageHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "storageHash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "storageProof": {
       "type": "array",
       "title": "storageProof",
-      "items": {
-       "$ref": "#/components/schemas/StorageProof"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/StorageProof",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "BadBlock": {
     "type": "object",
@@ -1101,21 +1364,24 @@
     ],
     "properties": {
      "block": {
+      "$ref": "#/components/schemas/bytes",
       "title": "Block",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "hash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "rlp": {
+      "$ref": "#/components/schemas/bytes",
       "title": "RLP",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "Block": {
-    "id": "Block",
     "type": "object",
     "title": "Block object",
     "required": [
@@ -1139,119 +1405,157 @@
     ],
     "properties": {
      "baseFeePerGas": {
+      "$ref": "#/components/schemas/uint",
       "title": "Base fee per gas",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "difficulty": {
+      "$ref": "#/components/schemas/bytes",
       "title": "Difficulty",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "extraData": {
+      "$ref": "#/components/schemas/bytes",
       "title": "Extra data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "gasLimit": {
+      "$ref": "#/components/schemas/uint",
       "title": "Gas limit",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gasUsed": {
+      "$ref": "#/components/schemas/uint",
       "title": "Gas used",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "logsBloom": {
+      "$ref": "#/components/schemas/bytes256",
       "title": "Bloom filter",
-      "$ref": "#/components/schemas/bytes256"
+      "pattern": ""
      },
      "miner": {
+      "$ref": "#/components/schemas/address",
       "title": "Coinbase",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "mixHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Mix hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/bytes8",
       "title": "Nonce",
-      "$ref": "#/components/schemas/bytes8"
+      "pattern": ""
      },
      "number": {
+      "$ref": "#/components/schemas/uint",
       "title": "Number",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "parentHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Parent block hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "receiptsRoot": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Receipts root",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "sha3Uncles": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Ommers hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "size": {
+      "$ref": "#/components/schemas/uint",
       "title": "Block size",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "stateRoot": {
+      "$ref": "#/components/schemas/hash32",
       "title": "State root",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "timestamp": {
+      "$ref": "#/components/schemas/uint",
       "title": "Timestamp",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "totalDifficulty": {
+      "$ref": "#/components/schemas/uint",
       "title": "Total difficult",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "transactions": {
+      "title": "",
       "anyOf": [
        {
         "type": "array",
         "title": "Transaction hashes",
-        "items": {
-         "$ref": "#/components/schemas/hash32"
-        }
+        "items": [
+         {
+          "$ref": "#/components/schemas/hash32",
+          "title": "",
+          "pattern": ""
+         }
+        ],
+        "pattern": ""
        },
        {
         "type": "array",
         "title": "Full transactions",
-        "items": {
-         "$ref": "#/components/schemas/TransactionSigned"
-        }
+        "items": [
+         {
+          "$ref": "#/components/schemas/TransactionSigned",
+          "title": "",
+          "pattern": ""
+         }
+        ],
+        "pattern": ""
        }
-      ]
+      ],
+      "pattern": ""
      },
      "transactionsRoot": {
+      "$ref": "#/components/schemas/hash32",
       "title": "Transactions root",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "uncles": {
       "type": "array",
       "title": "Uncles",
-      "items": {
-       "$ref": "#/components/schemas/hash32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/hash32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "BlockNumberOrTag": {
     "title": "Block number or tag",
     "oneOf": [
      {
+      "$ref": "#/components/schemas/uint",
       "title": "Block number",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      {
+      "$ref": "#/components/schemas/BlockTag",
       "title": "Block tag",
-      "$ref": "#/components/schemas/BlockTag"
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "BlockTag": {
-    "description": "`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error",
     "type": "string",
     "title": "Block tag",
     "enum": [
@@ -1260,7 +1564,8 @@
      "safe",
      "latest",
      "pending"
-    ]
+    ],
+    "pattern": ""
    },
    "Filter": {
     "type": "object",
@@ -1270,28 +1575,35 @@
       "title": "Address(es)",
       "oneOf": [
        {
+        "$ref": "#/components/schemas/address",
         "title": "Address",
-        "$ref": "#/components/schemas/address"
+        "pattern": ""
        },
        {
+        "$ref": "#/components/schemas/addresses",
         "title": "Addresses",
-        "$ref": "#/components/schemas/addresses"
+        "pattern": ""
        }
-      ]
+      ],
+      "pattern": ""
      },
      "fromBlock": {
+      "$ref": "#/components/schemas/uint",
       "title": "from block",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "toBlock": {
+      "$ref": "#/components/schemas/uint",
       "title": "to block",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "topics": {
+      "$ref": "#/components/schemas/FilterTopics",
       "title": "Topics",
-      "$ref": "#/components/schemas/FilterTopics"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "FilterResults": {
     "title": "Filter results",
@@ -1299,111 +1611,148 @@
      {
       "type": "array",
       "title": "new block hashes",
-      "items": {
-       "$ref": "#/components/schemas/hash32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/hash32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      {
       "type": "array",
       "title": "new transaction hashes",
-      "items": {
-       "$ref": "#/components/schemas/hash32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/hash32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      {
       "type": "array",
       "title": "new logs",
-      "items": {
-       "$ref": "#/components/schemas/Log"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/Log",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "FilterTopic": {
     "title": "Filter Topic List Entry",
     "oneOf": [
      {
       "type": "null",
-      "title": "Any Topic Match"
+      "title": "Any Topic Match",
+      "pattern": ""
      },
      {
+      "$ref": "#/components/schemas/bytes32",
       "title": "Single Topic Match",
-      "$ref": "#/components/schemas/bytes32"
+      "pattern": ""
      },
      {
       "type": "array",
       "title": "Multiple Topic Match",
-      "items": {
-       "$ref": "#/components/schemas/bytes32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/bytes32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "FilterTopics": {
     "type": "array",
     "title": "Filter Topics",
-    "items": {
-     "$ref": "#/components/schemas/FilterTopic"
-    }
+    "items": [
+     {
+      "$ref": "#/components/schemas/FilterTopic",
+      "title": "",
+      "pattern": ""
+     }
+    ],
+    "pattern": ""
    },
    "GenericTransaction": {
     "type": "object",
     "title": "Transaction object generic to all types",
     "properties": {
      "accessList": {
-      "description": "EIP-2930 access list",
+      "$ref": "#/components/schemas/AccessList",
       "title": "accessList",
-      "$ref": "#/components/schemas/AccessList"
+      "pattern": ""
      },
      "chainId": {
-      "description": "Chain ID that this transaction is valid on.",
+      "$ref": "#/components/schemas/uint",
       "title": "chainId",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "from": {
+      "$ref": "#/components/schemas/address",
       "title": "from address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "gas": {
+      "$ref": "#/components/schemas/uint",
       "title": "gas limit",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gasPrice": {
-      "description": "The gas price willing to be paid by the sender in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "gas price",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "input": {
+      "$ref": "#/components/schemas/bytes",
       "title": "input data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "maxFeePerGas": {
-      "description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "max fee per gas",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "maxPriorityFeePerGas": {
-      "description": "Maximum fee per gas the sender is willing to pay to miners in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "max priority fee per gas",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/uint",
       "title": "nonce",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "to": {
+      "$ref": "#/components/schemas/address",
       "title": "to address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "type": {
+      "$ref": "#/components/schemas/byte",
       "title": "type",
-      "$ref": "#/components/schemas/byte"
+      "pattern": ""
      },
      "value": {
+      "$ref": "#/components/schemas/uint",
       "title": "value",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "Log": {
     "type": "object",
@@ -1413,45 +1762,59 @@
     ],
     "properties": {
      "address": {
+      "$ref": "#/components/schemas/address",
       "title": "address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "blockHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "block hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "blockNumber": {
+      "$ref": "#/components/schemas/uint",
       "title": "block number",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "data": {
+      "$ref": "#/components/schemas/bytes",
       "title": "data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "logIndex": {
+      "$ref": "#/components/schemas/uint",
       "title": "log index",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "removed": {
       "type": "boolean",
-      "title": "removed"
+      "title": "removed",
+      "pattern": ""
      },
      "topics": {
       "type": "array",
       "title": "topics",
-      "items": {
-       "$ref": "#/components/schemas/bytes32"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/bytes32",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      "transactionHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "transaction hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "transactionIndex": {
+      "$ref": "#/components/schemas/uint",
       "title": "transaction index",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "ReceiptInfo": {
     "type": "object",
@@ -1470,80 +1833,95 @@
     ],
     "properties": {
      "blockHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "block hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "blockNumber": {
+      "$ref": "#/components/schemas/uint",
       "title": "block number",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "contractAddress": {
-      "description": "The contract address created, if the transaction was a contract creation, otherwise null.",
       "title": "contract address",
       "oneOf": [
        {
-        "$ref": "#/components/schemas/address"
+        "$ref": "#/components/schemas/address",
+        "title": "",
+        "pattern": ""
        },
        {
         "type": "null",
-        "name": null
+        "title": "",
+        "pattern": ""
        }
-      ]
+      ],
+      "pattern": ""
      },
      "cumulativeGasUsed": {
-      "description": "The sum of gas used by this transaction and all preceding transactions in the same block.",
+      "$ref": "#/components/schemas/uint",
       "title": "cumulative gas used",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "effectiveGasPrice": {
-      "description": "The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).",
+      "$ref": "#/components/schemas/uint",
       "title": "effective gas price",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "from": {
+      "$ref": "#/components/schemas/address",
       "title": "from",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "gasUsed": {
-      "description": "The amount of gas used for this specific transaction alone.",
+      "$ref": "#/components/schemas/uint",
       "title": "gas used",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "logs": {
       "type": "array",
       "title": "logs",
-      "items": {
-       "$ref": "#/components/schemas/Log"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/Log",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      "logsBloom": {
+      "$ref": "#/components/schemas/bytes256",
       "title": "logs bloom",
-      "$ref": "#/components/schemas/bytes256"
+      "pattern": ""
      },
      "root": {
-      "description": "The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.",
+      "$ref": "#/components/schemas/bytes32",
       "title": "state root",
-      "$ref": "#/components/schemas/bytes32"
+      "pattern": ""
      },
      "status": {
-      "description": "Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.",
+      "$ref": "#/components/schemas/uint",
       "title": "status",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "to": {
-      "description": "Address of the receiver or null in a contract creation transaction.",
+      "$ref": "#/components/schemas/address",
       "title": "to",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "transactionHash": {
+      "$ref": "#/components/schemas/hash32",
       "title": "transaction hash",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "transactionIndex": {
+      "$ref": "#/components/schemas/uint",
       "title": "transaction index",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "StorageProof": {
     "type": "object",
@@ -1555,21 +1933,29 @@
     ],
     "properties": {
      "key": {
+      "$ref": "#/components/schemas/hash32",
       "title": "key",
-      "$ref": "#/components/schemas/hash32"
+      "pattern": ""
      },
      "proof": {
       "type": "array",
       "title": "proof",
-      "items": {
-       "$ref": "#/components/schemas/bytes"
-      }
+      "items": [
+       {
+        "$ref": "#/components/schemas/bytes",
+        "title": "",
+        "pattern": ""
+       }
+      ],
+      "pattern": ""
      },
      "value": {
+      "$ref": "#/components/schemas/uint256",
       "title": "value",
-      "$ref": "#/components/schemas/uint256"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "SyncingStatus": {
     "title": "Syncing status",
@@ -1579,32 +1965,39 @@
       "title": "Syncing progress",
       "properties": {
        "currentBlock": {
+        "$ref": "#/components/schemas/uint",
         "title": "Current block",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "highestBlock": {
+        "$ref": "#/components/schemas/uint",
         "title": "Highest block",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "startingBlock": {
+        "$ref": "#/components/schemas/uint",
         "title": "Starting block",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        }
-      }
+      },
+      "pattern": ""
      },
      {
-      "description": "Should always return false if not syncing.",
       "type": "boolean",
-      "title": "Not syncing"
+      "title": "Not syncing",
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "Transaction1559Signed": {
     "type": "object",
     "title": "Signed 1559 Transaction",
     "allOf": [
      {
-      "$ref": "#/components/schemas/Transaction1559Unsigned"
+      "$ref": "#/components/schemas/Transaction1559Unsigned",
+      "title": "",
+      "pattern": ""
      },
      {
       "title": "EIP-1559 transaction signature properties.",
@@ -1615,21 +2008,25 @@
       ],
       "properties": {
        "r": {
+        "$ref": "#/components/schemas/uint",
         "title": "r",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "s": {
+        "$ref": "#/components/schemas/uint",
         "title": "s",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "yParity": {
-        "description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
+        "$ref": "#/components/schemas/uint",
         "title": "yParity",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        }
-      }
+      },
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "Transaction1559Unsigned": {
     "type": "object",
@@ -1647,57 +2044,66 @@
     ],
     "properties": {
      "accessList": {
-      "description": "EIP-2930 access list",
+      "$ref": "#/components/schemas/AccessList",
       "title": "accessList",
-      "$ref": "#/components/schemas/AccessList"
+      "pattern": ""
      },
      "chainId": {
-      "description": "Chain ID that this transaction is valid on.",
+      "$ref": "#/components/schemas/uint",
       "title": "chainId",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gas": {
+      "$ref": "#/components/schemas/uint",
       "title": "gas limit",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "input": {
+      "$ref": "#/components/schemas/bytes",
       "title": "input data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "maxFeePerGas": {
-      "description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "max fee per gas",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "maxPriorityFeePerGas": {
-      "description": "Maximum fee per gas the sender is willing to pay to miners in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "max priority fee per gas",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/uint",
       "title": "nonce",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "to": {
+      "$ref": "#/components/schemas/address",
       "title": "to address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "type": {
+      "$ref": "#/components/schemas/byte",
       "title": "type",
-      "$ref": "#/components/schemas/byte"
+      "pattern": ""
      },
      "value": {
+      "$ref": "#/components/schemas/uint",
       "title": "value",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "Transaction2930Signed": {
     "type": "object",
     "title": "Signed 2930 Transaction",
     "allOf": [
      {
-      "$ref": "#/components/schemas/Transaction2930Unsigned"
+      "$ref": "#/components/schemas/Transaction2930Unsigned",
+      "title": "",
+      "pattern": ""
      },
      {
       "title": "EIP-2930 transaction signature properties.",
@@ -1708,21 +2114,25 @@
       ],
       "properties": {
        "r": {
+        "$ref": "#/components/schemas/uint",
         "title": "r",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "s": {
+        "$ref": "#/components/schemas/uint",
         "title": "s",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "yParity": {
-        "description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
+        "$ref": "#/components/schemas/uint",
         "title": "yParity",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        }
-      }
+      },
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "Transaction2930Unsigned": {
     "type": "object",
@@ -1739,45 +2149,52 @@
     ],
     "properties": {
      "accessList": {
-      "description": "EIP-2930 access list",
+      "$ref": "#/components/schemas/AccessList",
       "title": "accessList",
-      "$ref": "#/components/schemas/AccessList"
+      "pattern": ""
      },
      "chainId": {
-      "description": "Chain ID that this transaction is valid on.",
+      "$ref": "#/components/schemas/uint",
       "title": "chainId",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gas": {
+      "$ref": "#/components/schemas/uint",
       "title": "gas limit",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gasPrice": {
-      "description": "The gas price willing to be paid by the sender in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "gas price",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "input": {
+      "$ref": "#/components/schemas/bytes",
       "title": "input data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/uint",
       "title": "nonce",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "to": {
+      "$ref": "#/components/schemas/address",
       "title": "to address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "type": {
+      "$ref": "#/components/schemas/byte",
       "title": "type",
-      "$ref": "#/components/schemas/byte"
+      "pattern": ""
      },
      "value": {
+      "$ref": "#/components/schemas/uint",
       "title": "value",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "TransactionInfo": {
     "type": "object",
@@ -1794,38 +2211,49 @@
       ],
       "properties": {
        "blockHash": {
+        "$ref": "#/components/schemas/hash32",
         "title": "block hash",
-        "$ref": "#/components/schemas/hash32"
+        "pattern": ""
        },
        "blockNumber": {
+        "$ref": "#/components/schemas/uint",
         "title": "block number",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "from": {
+        "$ref": "#/components/schemas/address",
         "title": "from address",
-        "$ref": "#/components/schemas/address"
+        "pattern": ""
        },
        "hash": {
+        "$ref": "#/components/schemas/hash32",
         "title": "transaction hash",
-        "$ref": "#/components/schemas/hash32"
+        "pattern": ""
        },
        "transactionIndex": {
+        "$ref": "#/components/schemas/uint",
         "title": "transaction index",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        }
-      }
+      },
+      "pattern": ""
      },
      {
-      "$ref": "#/components/schemas/TransactionSigned"
+      "$ref": "#/components/schemas/TransactionSigned",
+      "title": "",
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "TransactionLegacySigned": {
     "type": "object",
     "title": "Signed Legacy Transaction",
     "allOf": [
      {
-      "$ref": "#/components/schemas/TransactionLegacyUnsigned"
+      "$ref": "#/components/schemas/TransactionLegacyUnsigned",
+      "title": "",
+      "pattern": ""
      },
      {
       "title": "Legacy transaction signature properties.",
@@ -1836,20 +2264,25 @@
       ],
       "properties": {
        "r": {
+        "$ref": "#/components/schemas/uint",
         "title": "r",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "s": {
+        "$ref": "#/components/schemas/uint",
         "title": "s",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        },
        "v": {
+        "$ref": "#/components/schemas/uint",
         "title": "v",
-        "$ref": "#/components/schemas/uint"
+        "pattern": ""
        }
-      }
+      },
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "TransactionLegacyUnsigned": {
     "type": "object",
@@ -1864,66 +2297,89 @@
     ],
     "properties": {
      "chainId": {
-      "description": "Chain ID that this transaction is valid on.",
+      "$ref": "#/components/schemas/uint",
       "title": "chainId",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gas": {
+      "$ref": "#/components/schemas/uint",
       "title": "gas limit",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "gasPrice": {
-      "description": "The gas price willing to be paid by the sender in wei",
+      "$ref": "#/components/schemas/uint",
       "title": "gas price",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "input": {
+      "$ref": "#/components/schemas/bytes",
       "title": "input data",
-      "$ref": "#/components/schemas/bytes"
+      "pattern": ""
      },
      "nonce": {
+      "$ref": "#/components/schemas/uint",
       "title": "nonce",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      },
      "to": {
+      "$ref": "#/components/schemas/address",
       "title": "to address",
-      "$ref": "#/components/schemas/address"
+      "pattern": ""
      },
      "type": {
+      "$ref": "#/components/schemas/byte",
       "title": "type",
-      "$ref": "#/components/schemas/byte"
+      "pattern": ""
      },
      "value": {
+      "$ref": "#/components/schemas/uint",
       "title": "value",
-      "$ref": "#/components/schemas/uint"
+      "pattern": ""
      }
-    }
+    },
+    "pattern": ""
    },
    "TransactionSigned": {
+    "title": "",
     "oneOf": [
      {
-      "$ref": "#/components/schemas/Transaction1559Signed"
+      "$ref": "#/components/schemas/Transaction1559Signed",
+      "title": "",
+      "pattern": ""
      },
      {
-      "$ref": "#/components/schemas/Transaction2930Signed"
+      "$ref": "#/components/schemas/Transaction2930Signed",
+      "title": "",
+      "pattern": ""
      },
      {
-      "$ref": "#/components/schemas/TransactionLegacySigned"
+      "$ref": "#/components/schemas/TransactionLegacySigned",
+      "title": "",
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "TransactionUnsigned": {
+    "title": "",
     "oneOf": [
      {
-      "$ref": "#/components/schemas/Transaction1559Unsigned"
+      "$ref": "#/components/schemas/Transaction1559Unsigned",
+      "title": "",
+      "pattern": ""
      },
      {
-      "$ref": "#/components/schemas/Transaction2930Unsigned"
+      "$ref": "#/components/schemas/Transaction2930Unsigned",
+      "title": "",
+      "pattern": ""
      },
      {
-      "$ref": "#/components/schemas/TransactionLegacyUnsigned"
+      "$ref": "#/components/schemas/TransactionLegacyUnsigned",
+      "title": "",
+      "pattern": ""
      }
-    ]
+    ],
+    "pattern": ""
    },
    "address": {
     "type": "string",
@@ -1933,9 +2389,14 @@
    "addresses": {
     "type": "array",
     "title": "Addresses",
-    "items": {
-     "$ref": "#/components/schemas/address"
-    }
+    "items": [
+     {
+      "$ref": "#/components/schemas/address",
+      "title": "",
+      "pattern": ""
+     }
+    ],
+    "pattern": ""
    },
    "byte": {
     "type": "string",
@@ -1959,7 +2420,7 @@
    },
    "bytes65": {
     "type": "string",
-    "title": "bytes65",
+    "title": "bytes645",
     "pattern": "^0x[0-9a-f]{512}$"
    },
    "bytes8": {
diff --git a/openrpc/types/types.go b/openrpc/types/types.go
index 31afcc7..5950218 100644
--- a/openrpc/types/types.go
+++ b/openrpc/types/types.go
@@ -3,8 +3,27 @@ package types
 import (
 	"encoding/json"
 	"fmt"
+	"os"
+	"path"
+	"path/filepath"
+
+	"sigs.k8s.io/yaml"
 )
 
+type Server struct {
+	Name        string                    `json:"name"`
+	URL         string                    `json:"url"`
+	Summary     string                    `json:"summary,omitempty"`
+	Description string                    `json:"description,omitempty"`
+	Variables   map[string]ServerVariable `json:"variables,omitempty"`
+}
+
+type ServerVariable struct {
+	Enum        []string `json:"enum,omitempty"`
+	Default     string   `json:"default,omitempty"`
+	Description string   `json:"description,omitempty"`
+}
+
 type Info struct {
 	Title   string `json:"title"`
 	Version string `json:"version"`
@@ -24,7 +43,6 @@ func (I *Items) UnmarshalJSON(b []byte) error {
 	default:
 		return fmt.Errorf("expected array or object")
 	}
-	return nil
 }
 
 var _ json.Unmarshaler = (*Items)(nil)
@@ -66,7 +84,106 @@ type OpenRPC struct {
 	Version    string   `json:"openrpc"`
 	Info       Info     `json:"info"`
 	Methods    []Method `json:"methods"`
+	Servers    []Server `json:"servers"`
 	Components struct {
 		Schemas map[string]Schema `json:"schemas"`
 	} `json:"components"`
 }
+
+func NewOpenRPCSpec1() *OpenRPC {
+	return &OpenRPC{
+		Package: "main",
+		Version: "1.0.0",
+		Info: Info{
+			Title:   "gfx.cafe/open/jrpc/openrpc",
+			Version: "0.0.0",
+		},
+		Servers: make([]Server, 0),
+		Methods: make([]Method, 0),
+	}
+}
+
+func (o *OpenRPC) AddSchemas(pth string) error {
+	dr, err := os.ReadDir(pth)
+	if err != nil {
+		return err
+	}
+	for _, v := range dr {
+		if v.IsDir() {
+			if err := o.AddSchemas(path.Join(pth, v.Name())); err != nil {
+				return err
+			}
+		} else {
+			if err := o.AddSchema(path.Join(pth, v.Name())); err != nil {
+				return err
+			}
+		}
+	}
+	return nil
+}
+
+func (o *OpenRPC) AddSchema(pth string) error {
+	schem := map[string]Schema{}
+	bts, err := os.ReadFile(pth)
+	if err != nil {
+		return err
+	}
+	ext := filepath.Ext(path.Base(pth))
+	switch ext {
+	case ".json":
+		err = json.Unmarshal(bts, &schem)
+	case ".yml", ".yaml":
+		err = yaml.Unmarshal(bts, &schem)
+	}
+	if err != nil {
+		return err
+	}
+	if o.Components.Schemas == nil {
+		o.Components.Schemas = map[string]Schema{}
+	}
+	for k, v := range schem {
+		o.Components.Schemas[k] = v
+	}
+	return nil
+}
+
+func (o *OpenRPC) AddMethods(pth string) error {
+	dr, err := os.ReadDir(pth)
+	if err != nil {
+		return err
+	}
+	for _, v := range dr {
+		if v.IsDir() {
+			if err := o.AddMethods(path.Join(pth, v.Name())); err != nil {
+				return err
+			}
+		} else {
+			if err := o.AddMethod(path.Join(pth, v.Name())); err != nil {
+				return err
+			}
+		}
+	}
+	return nil
+}
+
+func (o *OpenRPC) AddMethod(pth string) error {
+	var meth []Method
+	bts, err := os.ReadFile(pth)
+	if err != nil {
+		return err
+	}
+	switch filepath.Ext(path.Base(pth)) {
+	case ".json":
+		err = json.Unmarshal(bts, &meth)
+	case ".yml", ".yaml":
+		err = yaml.Unmarshal(bts, &meth)
+		if err != nil {
+			return err
+		}
+	}
+	if err != nil {
+		return err
+	}
+	o.Methods = append(o.Methods, meth...)
+	return nil
+}
-- 
GitLab